commit 4b21dac4b69b9447615daeb952c975d7450d2200 Author: MikeyIsBaeYT Date: Wed Oct 27 18:03:19 2021 -0400 Terraria 1.3.5.3 Source Code diff --git a/Achievements/Achievement.cs b/Achievements/Achievement.cs new file mode 100644 index 0000000..463e3a1 --- /dev/null +++ b/Achievements/Achievement.cs @@ -0,0 +1,138 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.Achievement +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..91259b6 --- /dev/null +++ b/Achievements/AchievementCategory.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementCategory +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..23d82aa --- /dev/null +++ b/Achievements/AchievementCondition.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c7f48b2 --- /dev/null +++ b/Achievements/AchievementManager.cs @@ -0,0 +1,177 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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() => 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) + { + } + } + } + + 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(); + } + + 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 + { + public Dictionary Conditions; + } + } +} diff --git a/Achievements/AchievementTracker`1.cs b/Achievements/AchievementTracker`1.cs new file mode 100644 index 0000000..8daf3e3 --- /dev/null +++ b/Achievements/AchievementTracker`1.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementTracker`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..2e20a15 --- /dev/null +++ b/Achievements/ConditionFloatTracker.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionFloatTracker +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..b2aa48f --- /dev/null +++ b/Achievements/ConditionIntTracker.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionIntTracker +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d9ebb00 --- /dev/null +++ b/Achievements/ConditionsCompletedTracker.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionsCompletedTracker +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..14a4735 --- /dev/null +++ b/Achievements/IAchievementTracker.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.IAchievementTracker +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..80615be --- /dev/null +++ b/Achievements/TrackerType.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.TrackerType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..54a01c8 --- /dev/null +++ b/Animation.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Animation +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + } + } + + 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..51ca452 --- /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 © Re-Logic 2017")] +[assembly: AssemblyTrademark("")] +[assembly: ComVisible(false)] +[assembly: Guid("f571b16a-2c9b-44ab-b115-7c762c9e4e7e")] +[assembly: AssemblyFileVersion("1.3.5.3")] +[assembly: AssemblyVersion("1.3.5.3")] +[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] diff --git a/Audio/ActiveSound.cs b/Audio/ActiveSound.cs new file mode 100644 index 0000000..7aee544 --- /dev/null +++ b/Audio/ActiveSound.cs @@ -0,0 +1,101 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.ActiveSound +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 + { + private SoundEffectInstance _sound; + public readonly bool IsGlobal; + public Vector2 Position; + public float Volume; + private SoundStyle _style; + + public SoundEffectInstance Sound => this._sound; + + public SoundStyle Style => this._style; + + 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(); + Main.PlaySoundInstance(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..6985726 --- /dev/null +++ b/Audio/CustomSoundStyle.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.CustomSoundStyle +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UnifiedRandom _random = new UnifiedRandom(); + private 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/LegacySoundStyle.cs b/Audio/LegacySoundStyle.cs new file mode 100644 index 0000000..3b587c5 --- /dev/null +++ b/Audio/LegacySoundStyle.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.LegacySoundStyle +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UnifiedRandom _random = new UnifiedRandom(); + private int _style; + private int _styleVariations; + private int _soundId; + + public int Style => this._styleVariations != 1 ? LegacySoundStyle._random.Next(this._style, this._style + this._styleVariations) : this._style; + + public int Variations => this._styleVariations; + + public int SoundId => this._soundId; + + public override bool IsTrackable => this._soundId == 42; + + public LegacySoundStyle(int soundId, int style, SoundType type = SoundType.Sound) + : base(type) + { + this._style = style; + this._styleVariations = 1; + this._soundId = soundId; + } + + public LegacySoundStyle(int soundId, int style, int variations, SoundType type = SoundType.Sound) + : base(type) + { + this._style = style; + this._styleVariations = 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._styleVariations = variations; + this._soundId = soundId; + } + + public LegacySoundStyle WithVolume(float volume) => new LegacySoundStyle(this._soundId, this._style, this._styleVariations, this.Type, volume, this.PitchVariance); + + public LegacySoundStyle WithPitchVariance(float pitchVariance) => new LegacySoundStyle(this._soundId, this._style, this._styleVariations, this.Type, this.Volume, pitchVariance); + + public LegacySoundStyle AsMusic() => new LegacySoundStyle(this._soundId, this._style, this._styleVariations, SoundType.Music, this.Volume, this.PitchVariance); + + public LegacySoundStyle AsAmbient() => new LegacySoundStyle(this._soundId, this._style, this._styleVariations, SoundType.Ambient, this.Volume, this.PitchVariance); + + public LegacySoundStyle AsSound() => new LegacySoundStyle(this._soundId, this._style, this._styleVariations, SoundType.Sound, this.Volume, this.PitchVariance); + + public bool Includes(int soundId, int style) => this._soundId == soundId && style >= this._style && style < this._style + this._styleVariations; + + public override SoundEffect GetRandomSound() => this.IsTrackable ? Main.trackableSounds[this.Style] : (SoundEffect) null; + } +} diff --git a/Audio/SoundStyle.cs b/Audio/SoundStyle.cs new file mode 100644 index 0000000..b97ece0 --- /dev/null +++ b/Audio/SoundStyle.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundStyle +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a25fd68 --- /dev/null +++ b/Audio/SoundType.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0604e74 --- /dev/null +++ b/BitsByte.cs @@ -0,0 +1,175 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.BitsByte +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(); + } + + public static void SortOfAUnitTest() + { + MemoryStream memoryStream = new MemoryStream(); + BinaryWriter binaryWriter = new BinaryWriter((Stream) memoryStream); + BinaryReader reader = new BinaryReader((Stream) memoryStream); + bool[] flagArray = new bool[28]; + flagArray[3] = true; + flagArray[14] = true; + BitsByte[] bitsByteArray1 = BitsByte.ComposeBitsBytesChain(false, flagArray); + foreach (BitsByte bitsByte in bitsByteArray1) + { + byte num = (byte) bitsByte; + binaryWriter.Write(num); + } + memoryStream.Position = 0L; + BitsByte[] bitsByteArray2 = BitsByte.DecomposeBitsBytesChain(reader); + string str1 = ""; + string str2 = ""; + foreach (BitsByte bitsByte in bitsByteArray1) + str1 = str1 + (object) (byte) bitsByte + ", "; + foreach (BitsByte bitsByte in bitsByteArray2) + str2 = str2 + (object) (byte) bitsByte + ", "; + Main.NewText("done"); + } + } +} diff --git a/Chat/ChatCommandId.cs b/Chat/ChatCommandId.cs new file mode 100644 index 0000000..903d6e0 --- /dev/null +++ b/Chat/ChatCommandId.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatCommandId +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c006a2b --- /dev/null +++ b/Chat/ChatCommandProcessor.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatCommandProcessor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Dictionary _localizedCommands = new Dictionary(); + private Dictionary _commands = 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 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 bool ProcessOutgoingMessage(ChatMessage message) + { + KeyValuePair keyValuePair = this._localizedCommands.FirstOrDefault>((Func, bool>) (pair => ChatCommandProcessor.HasLocalizedCommand(message, pair.Key))); + ChatCommandId commandId = keyValuePair.Value; + if (keyValuePair.Key == null) + return false; + message.SetCommand(commandId); + message.Text = ChatCommandProcessor.RemoveCommandPrefix(message.Text, keyValuePair.Key); + return true; + } + + public bool ProcessReceivedMessage(ChatMessage message, int clientId) + { + IChatCommand chatCommand; + if (this._commands.TryGetValue(message.CommandId, out chatCommand)) + { + chatCommand.ProcessMessage(message.Text, (byte) clientId); + return true; + } + if (this._defaultCommand == null) + return false; + this._defaultCommand.ProcessMessage(message.Text, (byte) clientId); + return true; + } + } +} diff --git a/Chat/ChatMessage.cs b/Chat/ChatMessage.cs new file mode 100644 index 0000000..75aa680 --- /dev/null +++ b/Chat/ChatMessage.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatMessage +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using System.Text; +using Terraria.Chat.Commands; + +namespace Terraria.Chat +{ + public class ChatMessage + { + public ChatCommandId CommandId { get; private set; } + + public string Text { get; set; } + + public ChatMessage(string message) + { + this.CommandId = ChatCommandId.FromType(); + this.Text = message; + } + + private ChatMessage(string message, ChatCommandId commandId) + { + this.CommandId = commandId; + this.Text = message; + } + + public void Serialize(BinaryWriter writer) + { + this.CommandId.Serialize(writer); + writer.Write(this.Text); + } + + public int GetMaxSerializedSize() => 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) => this.CommandId = commandId; + + public void SetCommand() where T : IChatCommand => this.CommandId = ChatCommandId.FromType(); + } +} diff --git a/Chat/Commands/ChatCommandAttribute.cs b/Chat/Commands/ChatCommandAttribute.cs new file mode 100644 index 0000000..b748c65 --- /dev/null +++ b/Chat/Commands/ChatCommandAttribute.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.ChatCommandAttribute +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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, AllowMultiple = false, Inherited = false)] + public sealed class ChatCommandAttribute : Attribute + { + public readonly string Name; + + public ChatCommandAttribute(string name) => this.Name = name; + } +} diff --git a/Chat/Commands/EmoteCommand.cs b/Chat/Commands/EmoteCommand.cs new file mode 100644 index 0000000..fde3d4d --- /dev/null +++ b/Chat/Commands/EmoteCommand.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.EmoteCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 ProcessMessage(string text, byte clientId) + { + if (!(text != "")) + return; + text = string.Format("*{0} {1}", (object) Main.player[(int) clientId].name, (object) text); + NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(text), EmoteCommand.RESPONSE_COLOR); + } + } +} diff --git a/Chat/Commands/IChatCommand.cs b/Chat/Commands/IChatCommand.cs new file mode 100644 index 0000000..49eb579 --- /dev/null +++ b/Chat/Commands/IChatCommand.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.IChatCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Chat.Commands +{ + public interface IChatCommand + { + void ProcessMessage(string text, byte clientId); + } +} diff --git a/Chat/Commands/ListPlayersCommand.cs b/Chat/Commands/ListPlayersCommand.cs new file mode 100644 index 0000000..64cd761 --- /dev/null +++ b/Chat/Commands/ListPlayersCommand.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.ListPlayersCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 ProcessMessage(string text, byte clientId) => NetMessage.SendChatMessageToClient(NetworkText.FromLiteral(string.Join(", ", ((IEnumerable) Main.player).Where((Func) (player => player.active)).Select((Func) (player => player.name)))), ListPlayersCommand.RESPONSE_COLOR, (int) clientId); + } +} diff --git a/Chat/Commands/PartyChatCommand.cs b/Chat/Commands/PartyChatCommand.cs new file mode 100644 index 0000000..e979180 --- /dev/null +++ b/Chat/Commands/PartyChatCommand.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.PartyChatCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Localization; +using Terraria.Net; + +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 ProcessMessage(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) + { + NetPacket packet = NetTextModule.SerializeServerMessage(NetworkText.FromLiteral(text), color, clientId); + NetManager.Instance.SendToClient(packet, playerId); + } + } + } + } + + private void SendNoTeamError(byte clientId) + { + NetPacket packet = NetTextModule.SerializeServerMessage(Lang.mp[10].ToNetworkText(), PartyChatCommand.ERROR_COLOR); + NetManager.Instance.SendToClient(packet, (int) clientId); + } + } +} diff --git a/Chat/Commands/RollCommand.cs b/Chat/Commands/RollCommand.cs new file mode 100644 index 0000000..d989833 --- /dev/null +++ b/Chat/Commands/RollCommand.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.RollCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 string InternalName => "roll"; + + public void ProcessMessage(string text, byte clientId) + { + int num = Main.rand.Next(1, 101); + NetMessage.BroadcastChatMessage(NetworkText.FromFormattable("*{0} {1} {2}", (object) Main.player[(int) clientId].name, (object) Lang.mp[9].ToNetworkText(), (object) num), RollCommand.RESPONSE_COLOR); + } + } +} diff --git a/Chat/Commands/SayChatCommand.cs b/Chat/Commands/SayChatCommand.cs new file mode 100644 index 0000000..8d2d69e --- /dev/null +++ b/Chat/Commands/SayChatCommand.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.SayChatCommand +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.GameContent.NetModules; +using Terraria.Localization; +using Terraria.Net; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Say")] + public class SayChatCommand : IChatCommand + { + public void ProcessMessage(string text, byte clientId) + { + NetPacket packet = NetTextModule.SerializeServerMessage(NetworkText.FromLiteral(text), Main.player[(int) clientId].ChatColor(), clientId); + NetManager.Instance.Broadcast(packet); + Console.WriteLine("<{0}> {1}", (object) Main.player[(int) clientId].name, (object) text); + } + } +} diff --git a/Chat/IChatProcessor.cs b/Chat/IChatProcessor.cs new file mode 100644 index 0000000..9d3a1db --- /dev/null +++ b/Chat/IChatProcessor.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.IChatProcessor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Chat +{ + public interface IChatProcessor + { + bool ProcessReceivedMessage(ChatMessage message, int clientId); + + bool ProcessOutgoingMessage(ChatMessage message); + } +} diff --git a/Chest.cs b/Chest.cs new file mode 100644 index 0000000..309370d --- /dev/null +++ b/Chest.cs @@ -0,0 +1,2221 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chest +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ObjectData; + +namespace Terraria +{ + public class Chest + { + public const int maxChestTypes = 52; + public static int[] chestTypeToIcon = new int[52]; + public static int[] chestItemSpawn = new int[52]; + public const int maxChestTypes2 = 2; + public static int[] chestTypeToIcon2 = new int[2]; + public static int[] chestItemSpawn2 = new int[2]; + public const int maxDresserTypes = 32; + public static int[] dresserTypeToIcon = new int[32]; + public static int[] dresserItemSpawn = new int[32]; + 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; + + 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; + 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; + } + + 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 bool isLocked(int x, int y) => Main.tile[x, y] == null || Main.tile[x, y].frameX >= (short) 72 && Main.tile[x, y].frameX <= (short) 106 || Main.tile[x, y].frameX >= (short) 144 && Main.tile[x, y].frameX <= (short) 178 || Main.tile[x, y].frameX >= (short) 828 && Main.tile[x, y].frameX <= (short) 1006 || Main.tile[x, y].frameX >= (short) 1296 && Main.tile[x, y].frameX <= (short) 1330 || Main.tile[x, y].frameX >= (short) 1368 && Main.tile[x, y].frameX <= (short) 1402 || Main.tile[x, y].frameX >= (short) 1440 && Main.tile[x, y].frameX <= (short) 1474; + + 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 < 1000; ++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() < 200.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) + return false; + short num; + int Type; + switch ((int) Main.tile[X, Y].frameX / 36) + { + case 2: + num = (short) 36; + Type = 11; + AchievementsHelper.NotifyProgressionEvent(19); + break; + case 4: + num = (short) 36; + Type = 11; + break; + case 23: + case 24: + case 25: + case 26: + case 27: + if (!NPC.downedPlantBoss) + return false; + num = (short) 180; + Type = 11; + AchievementsHelper.NotifyProgressionEvent(20); + break; + case 36: + case 38: + case 40: + num = (short) 36; + Type = 11; + break; + default: + return false; + } + Main.PlaySound(22, X * 16, Y * 16); + for (int index1 = X; index1 <= X + 1; ++index1) + { + for (int index2 = Y; index2 <= Y + 1; ++index2) + { + Main.tile[index1, index2].frameX -= num; + for (int index3 = 0; index3 < 4; ++index3) + Dust.NewDust(new Vector2((float) (index1 * 16), (float) (index2 * 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 < 1000; ++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 < 1000; ++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 num = -1; + for (int index = 0; index < 1000; ++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) + { + 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 < 1000; ++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 < 1000; ++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 AddShop(Item newItem) + { + 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; + if (this.item[index].value <= 0) + break; + this.item[index].value /= 5; + if (this.item[index].value >= 1) + break; + this.item[index].value = 1; + break; + } + } + } + + public static void SetupTravelShop() + { + for (int index = 0; index < 40; ++index) + Main.travelShop[index] = 0; + int num1 = Main.rand.Next(4, 7); + if (Main.rand.Next(4) == 0) + ++num1; + if (Main.rand.Next(8) == 0) + ++num1; + if (Main.rand.Next(16) == 0) + ++num1; + if (Main.rand.Next(32) == 0) + ++num1; + if (Main.expertMode && Main.rand.Next(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 (Main.rand.Next(numArray[4]) == 0) + num3 = 3309; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 3314; + if (Main.rand.Next(numArray[5]) == 0) + num3 = 1987; + if (Main.rand.Next(numArray[4]) == 0 && Main.hardMode) + num3 = 2270; + if (Main.rand.Next(numArray[4]) == 0) + num3 = 2278; + if (Main.rand.Next(numArray[4]) == 0) + num3 = 2271; + if (Main.rand.Next(numArray[3]) == 0 && Main.hardMode && NPC.downedPlantBoss) + num3 = 2223; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2272; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2219; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2276; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2284; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2285; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2286; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2287; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 2296; + if (Main.rand.Next(numArray[3]) == 0) + num3 = 3628; + if (Main.rand.Next(numArray[2]) == 0 && WorldGen.shadowOrbSmashed) + num3 = 2269; + if (Main.rand.Next(numArray[2]) == 0) + num3 = 2177; + if (Main.rand.Next(numArray[2]) == 0) + num3 = 1988; + if (Main.rand.Next(numArray[2]) == 0) + num3 = 2275; + if (Main.rand.Next(numArray[2]) == 0) + num3 = 2279; + if (Main.rand.Next(numArray[2]) == 0) + num3 = 2277; + if (Main.rand.Next(numArray[2]) == 0 && NPC.downedBoss1) + num3 = 3262; + if (Main.rand.Next(numArray[2]) == 0 && NPC.downedMechBossAny) + num3 = 3284; + if (Main.rand.Next(numArray[2]) == 0 && Main.hardMode && NPC.downedMoonlord) + num3 = 3596; + if (Main.rand.Next(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2865; + if (Main.rand.Next(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2866; + if (Main.rand.Next(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2867; + if (Main.rand.Next(numArray[2]) == 0 && Main.xMas) + num3 = 3055; + if (Main.rand.Next(numArray[2]) == 0 && Main.xMas) + num3 = 3056; + if (Main.rand.Next(numArray[2]) == 0 && Main.xMas) + num3 = 3057; + if (Main.rand.Next(numArray[2]) == 0 && Main.xMas) + num3 = 3058; + if (Main.rand.Next(numArray[2]) == 0 && Main.xMas) + num3 = 3059; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2214; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2215; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2216; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2217; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 3624; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2273; + if (Main.rand.Next(numArray[1]) == 0) + num3 = 2274; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2266; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2267; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2268; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2281 + Main.rand.Next(3); + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2258; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2242; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 2260; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 3637; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 3119; + if (Main.rand.Next(numArray[0]) == 0) + num3 = 3118; + if (Main.rand.Next(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 == 3637) + { + --index1; + switch (Main.rand.Next(6)) + { + case 0: + int[] travelShop1 = Main.travelShop; + int index4 = index1; + int num4 = index4 + 1; + travelShop1[index4] = 3637; + int[] travelShop2 = Main.travelShop; + int index5 = num4; + index1 = index5 + 1; + travelShop2[index5] = 3642; + continue; + case 1: + int[] travelShop3 = Main.travelShop; + int index6 = index1; + int num5 = index6 + 1; + travelShop3[index6] = 3621; + int[] travelShop4 = Main.travelShop; + int index7 = num5; + index1 = index7 + 1; + travelShop4[index7] = 3622; + continue; + case 2: + int[] travelShop5 = Main.travelShop; + int index8 = index1; + int num6 = index8 + 1; + travelShop5[index8] = 3634; + int[] travelShop6 = Main.travelShop; + int index9 = num6; + index1 = index9 + 1; + travelShop6[index9] = 3639; + continue; + case 3: + int[] travelShop7 = Main.travelShop; + int index10 = index1; + int num7 = index10 + 1; + travelShop7[index10] = 3633; + int[] travelShop8 = Main.travelShop; + int index11 = num7; + index1 = index11 + 1; + travelShop8[index11] = 3638; + continue; + case 4: + int[] travelShop9 = Main.travelShop; + int index12 = index1; + int num8 = index12 + 1; + travelShop9[index12] = 3635; + int[] travelShop10 = Main.travelShop; + int index13 = num8; + index1 = index13 + 1; + travelShop10[index13] = 3640; + continue; + case 5: + int[] travelShop11 = Main.travelShop; + int index14 = index1; + int num9 = index14 + 1; + travelShop11[index14] = 3636; + int[] travelShop12 = Main.travelShop; + int index15 = num9; + index1 = index15 + 1; + travelShop12[index15] = 3641; + continue; + default: + continue; + } + } + } + } + } + + public void SetupShop(int type) + { + for (int index = 0; index < 40; ++index) + this.item[index] = new Item(); + int index1 = 0; + switch (type) + { + case 1: + this.item[index1].SetDefaults(88); + int index2 = index1 + 1; + this.item[index2].SetDefaults(87); + int index3 = index2 + 1; + this.item[index3].SetDefaults(35); + int index4 = index3 + 1; + this.item[index4].SetDefaults(1991); + int index5 = index4 + 1; + this.item[index5].SetDefaults(3509); + int index6 = index5 + 1; + this.item[index6].SetDefaults(3506); + int index7 = index6 + 1; + this.item[index7].SetDefaults(8); + int index8 = index7 + 1; + this.item[index8].SetDefaults(28); + int index9 = index8 + 1; + this.item[index9].SetDefaults(110); + int index10 = index9 + 1; + this.item[index10].SetDefaults(40); + int index11 = index10 + 1; + this.item[index11].SetDefaults(42); + int index12 = index11 + 1; + this.item[index12].SetDefaults(965); + int index13 = index12 + 1; + if (Main.player[Main.myPlayer].ZoneSnow) + { + this.item[index13].SetDefaults(967); + ++index13; + } + if (Main.bloodMoon) + { + this.item[index13].SetDefaults(279); + ++index13; + } + if (!Main.dayTime) + { + this.item[index13].SetDefaults(282); + ++index13; + } + if (NPC.downedBoss3) + { + this.item[index13].SetDefaults(346); + ++index13; + } + if (Main.hardMode) + { + this.item[index13].SetDefaults(488); + ++index13; + } + for (int index14 = 0; index14 < 58; ++index14) + { + if (Main.player[Main.myPlayer].inventory[index14].type == 930) + { + this.item[index13].SetDefaults(931); + int index15 = index13 + 1; + this.item[index15].SetDefaults(1614); + index13 = index15 + 1; + break; + } + } + this.item[index13].SetDefaults(1786); + index1 = index13 + 1; + if (Main.hardMode) + { + this.item[index1].SetDefaults(1348); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(3107)) + { + this.item[index1].SetDefaults(3108); + ++index1; + } + if (Main.halloween) + { + Item[] objArray1 = this.item; + int index16 = index1; + int num1 = index16 + 1; + objArray1[index16].SetDefaults(3242); + Item[] objArray2 = this.item; + int index17 = num1; + int num2 = index17 + 1; + objArray2[index17].SetDefaults(3243); + Item[] objArray3 = this.item; + int index18 = num2; + index1 = index18 + 1; + objArray3[index18].SetDefaults(3244); + break; + } + break; + case 2: + this.item[index1].SetDefaults(97); + int index19 = index1 + 1; + if (Main.bloodMoon || Main.hardMode) + { + this.item[index19].SetDefaults(278); + ++index19; + } + if (NPC.downedBoss2 && !Main.dayTime || Main.hardMode) + { + this.item[index19].SetDefaults(47); + ++index19; + } + this.item[index19].SetDefaults(95); + int index20 = index19 + 1; + this.item[index20].SetDefaults(98); + index1 = index20 + 1; + if (!Main.dayTime) + { + this.item[index1].SetDefaults(324); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(534); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(1432); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1258)) + { + this.item[index1].SetDefaults(1261); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1835)) + { + this.item[index1].SetDefaults(1836); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(3107)) + { + this.item[index1].SetDefaults(3108); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1782)) + { + this.item[index1].SetDefaults(1783); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1784)) + { + this.item[index1].SetDefaults(1785); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1736); + int index21 = index1 + 1; + this.item[index21].SetDefaults(1737); + int index22 = index21 + 1; + this.item[index22].SetDefaults(1738); + index1 = index22 + 1; + break; + } + break; + case 3: + int index23; + if (Main.bloodMoon) + { + if (WorldGen.crimson) + { + this.item[index1].SetDefaults(2886); + int index24 = index1 + 1; + this.item[index24].SetDefaults(2171); + index23 = index24 + 1; + } + else + { + this.item[index1].SetDefaults(67); + int index25 = index1 + 1; + this.item[index25].SetDefaults(59); + index23 = index25 + 1; + } + } + else + { + this.item[index1].SetDefaults(66); + int index26 = index1 + 1; + this.item[index26].SetDefaults(62); + int index27 = index26 + 1; + this.item[index27].SetDefaults(63); + index23 = index27 + 1; + } + this.item[index23].SetDefaults(27); + int index28 = index23 + 1; + this.item[index28].SetDefaults(114); + int index29 = index28 + 1; + this.item[index29].SetDefaults(1828); + int index30 = index29 + 1; + this.item[index30].SetDefaults(745); + int index31 = index30 + 1; + this.item[index31].SetDefaults(747); + index1 = index31 + 1; + if (Main.hardMode) + { + this.item[index1].SetDefaults(746); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(369); + ++index1; + } + if (Main.shroomTiles > 50) + { + this.item[index1].SetDefaults(194); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1853); + int index32 = index1 + 1; + this.item[index32].SetDefaults(1854); + index1 = index32 + 1; + } + if (NPC.downedSlimeKing) + { + this.item[index1].SetDefaults(3215); + ++index1; + } + if (NPC.downedQueenBee) + { + this.item[index1].SetDefaults(3216); + ++index1; + } + if (NPC.downedBoss1) + { + this.item[index1].SetDefaults(3219); + ++index1; + } + if (NPC.downedBoss2) + { + if (WorldGen.crimson) + { + this.item[index1].SetDefaults(3218); + ++index1; + } + else + { + this.item[index1].SetDefaults(3217); + ++index1; + } + } + if (NPC.downedBoss3) + { + this.item[index1].SetDefaults(3220); + int index33 = index1 + 1; + this.item[index33].SetDefaults(3221); + index1 = index33 + 1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(3222); + ++index1; + break; + } + break; + case 4: + this.item[index1].SetDefaults(168); + int index34 = index1 + 1; + this.item[index34].SetDefaults(166); + int index35 = index34 + 1; + this.item[index35].SetDefaults(167); + index1 = index35 + 1; + if (Main.hardMode) + { + this.item[index1].SetDefaults(265); + ++index1; + } + if (Main.hardMode && NPC.downedPlantBoss && NPC.downedPirates) + { + this.item[index1].SetDefaults(937); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(1347); + ++index1; + break; + } + break; + case 5: + this.item[index1].SetDefaults(254); + int index36 = index1 + 1; + this.item[index36].SetDefaults(981); + int index37 = index36 + 1; + if (Main.dayTime) + { + this.item[index37].SetDefaults(242); + ++index37; + } + switch (Main.moonPhase) + { + case 0: + this.item[index37].SetDefaults(245); + int index38 = index37 + 1; + this.item[index38].SetDefaults(246); + index37 = index38 + 1; + if (!Main.dayTime) + { + Item[] objArray4 = this.item; + int index39 = index37; + int num = index39 + 1; + objArray4[index39].SetDefaults(1288); + Item[] objArray5 = this.item; + int index40 = num; + index37 = index40 + 1; + objArray5[index40].SetDefaults(1289); + break; + } + break; + case 1: + this.item[index37].SetDefaults(325); + int index41 = index37 + 1; + this.item[index41].SetDefaults(326); + index37 = index41 + 1; + break; + } + this.item[index37].SetDefaults(269); + int index42 = index37 + 1; + this.item[index42].SetDefaults(270); + int index43 = index42 + 1; + this.item[index43].SetDefaults(271); + index1 = index43 + 1; + if (NPC.downedClown) + { + this.item[index1].SetDefaults(503); + int index44 = index1 + 1; + this.item[index44].SetDefaults(504); + int index45 = index44 + 1; + this.item[index45].SetDefaults(505); + index1 = index45 + 1; + } + if (Main.bloodMoon) + { + this.item[index1].SetDefaults(322); + ++index1; + if (!Main.dayTime) + { + Item[] objArray6 = this.item; + int index46 = index1; + int num = index46 + 1; + objArray6[index46].SetDefaults(3362); + Item[] objArray7 = this.item; + int index47 = num; + index1 = index47 + 1; + objArray7[index47].SetDefaults(3363); + } + } + if (NPC.downedAncientCultist) + { + if (Main.dayTime) + { + Item[] objArray8 = this.item; + int index48 = index1; + int num = index48 + 1; + objArray8[index48].SetDefaults(2856); + Item[] objArray9 = this.item; + int index49 = num; + index1 = index49 + 1; + objArray9[index49].SetDefaults(2858); + } + else + { + Item[] objArray10 = this.item; + int index50 = index1; + int num = index50 + 1; + objArray10[index50].SetDefaults(2857); + Item[] objArray11 = this.item; + int index51 = num; + index1 = index51 + 1; + objArray11[index51].SetDefaults(2859); + } + } + if (NPC.AnyNPCs(441)) + { + Item[] objArray12 = this.item; + int index52 = index1; + int num3 = index52 + 1; + objArray12[index52].SetDefaults(3242); + Item[] objArray13 = this.item; + int index53 = num3; + int num4 = index53 + 1; + objArray13[index53].SetDefaults(3243); + Item[] objArray14 = this.item; + int index54 = num4; + index1 = index54 + 1; + objArray14[index54].SetDefaults(3244); + } + if (Main.player[Main.myPlayer].ZoneSnow) + { + this.item[index1].SetDefaults(1429); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1740); + ++index1; + } + if (Main.hardMode) + { + if (Main.moonPhase == 2) + { + this.item[index1].SetDefaults(869); + ++index1; + } + if (Main.moonPhase == 4) + { + this.item[index1].SetDefaults(864); + int index55 = index1 + 1; + this.item[index55].SetDefaults(865); + index1 = index55 + 1; + } + if (Main.moonPhase == 6) + { + this.item[index1].SetDefaults(873); + int index56 = index1 + 1; + this.item[index56].SetDefaults(874); + int index57 = index56 + 1; + this.item[index57].SetDefaults(875); + index1 = index57 + 1; + } + } + if (NPC.downedFrost) + { + this.item[index1].SetDefaults(1275); + int index58 = index1 + 1; + this.item[index58].SetDefaults(1276); + index1 = index58 + 1; + } + if (Main.halloween) + { + Item[] objArray15 = this.item; + int index59 = index1; + int num = index59 + 1; + objArray15[index59].SetDefaults(3246); + Item[] objArray16 = this.item; + int index60 = num; + index1 = index60 + 1; + objArray16[index60].SetDefaults(3247); + } + if (BirthdayParty.PartyIsUp) + { + Item[] objArray17 = this.item; + int index61 = index1; + int num5 = index61 + 1; + objArray17[index61].SetDefaults(3730); + Item[] objArray18 = this.item; + int index62 = num5; + int num6 = index62 + 1; + objArray18[index62].SetDefaults(3731); + Item[] objArray19 = this.item; + int index63 = num6; + int num7 = index63 + 1; + objArray19[index63].SetDefaults(3733); + Item[] objArray20 = this.item; + int index64 = num7; + int num8 = index64 + 1; + objArray20[index64].SetDefaults(3734); + Item[] objArray21 = this.item; + int index65 = num8; + index1 = index65 + 1; + objArray21[index65].SetDefaults(3735); + break; + } + break; + case 6: + this.item[index1].SetDefaults(128); + int index66 = index1 + 1; + this.item[index66].SetDefaults(486); + int index67 = index66 + 1; + this.item[index67].SetDefaults(398); + int index68 = index67 + 1; + this.item[index68].SetDefaults(84); + int index69 = index68 + 1; + this.item[index69].SetDefaults(407); + int index70 = index69 + 1; + this.item[index70].SetDefaults(161); + index1 = index70 + 1; + break; + case 7: + this.item[index1].SetDefaults(487); + int index71 = index1 + 1; + this.item[index71].SetDefaults(496); + int index72 = index71 + 1; + this.item[index72].SetDefaults(500); + int index73 = index72 + 1; + this.item[index73].SetDefaults(507); + int index74 = index73 + 1; + this.item[index74].SetDefaults(508); + int index75 = index74 + 1; + this.item[index75].SetDefaults(531); + int index76 = index75 + 1; + this.item[index76].SetDefaults(576); + int index77 = index76 + 1; + this.item[index77].SetDefaults(3186); + index1 = index77 + 1; + if (Main.halloween) + { + this.item[index1].SetDefaults(1739); + ++index1; + break; + } + break; + case 8: + this.item[index1].SetDefaults(509); + int index78 = index1 + 1; + this.item[index78].SetDefaults(850); + int index79 = index78 + 1; + this.item[index79].SetDefaults(851); + int index80 = index79 + 1; + this.item[index80].SetDefaults(3612); + int index81 = index80 + 1; + this.item[index81].SetDefaults(510); + int index82 = index81 + 1; + this.item[index82].SetDefaults(530); + int index83 = index82 + 1; + this.item[index83].SetDefaults(513); + int index84 = index83 + 1; + this.item[index84].SetDefaults(538); + int index85 = index84 + 1; + this.item[index85].SetDefaults(529); + int index86 = index85 + 1; + this.item[index86].SetDefaults(541); + int index87 = index86 + 1; + this.item[index87].SetDefaults(542); + int index88 = index87 + 1; + this.item[index88].SetDefaults(543); + int index89 = index88 + 1; + this.item[index89].SetDefaults(852); + int index90 = index89 + 1; + this.item[index90].SetDefaults(853); + int num9 = index90 + 1; + Item[] objArray22 = this.item; + int index91 = num9; + int index92 = index91 + 1; + objArray22[index91].SetDefaults(3707); + this.item[index92].SetDefaults(2739); + int index93 = index92 + 1; + this.item[index93].SetDefaults(849); + int num10 = index93 + 1; + Item[] objArray23 = this.item; + int index94 = num10; + int num11 = index94 + 1; + objArray23[index94].SetDefaults(3616); + Item[] objArray24 = this.item; + int index95 = num11; + int num12 = index95 + 1; + objArray24[index95].SetDefaults(2799); + Item[] objArray25 = this.item; + int index96 = num12; + int num13 = index96 + 1; + objArray25[index96].SetDefaults(3619); + Item[] objArray26 = this.item; + int index97 = num13; + int num14 = index97 + 1; + objArray26[index97].SetDefaults(3627); + Item[] objArray27 = this.item; + int index98 = num14; + index1 = index98 + 1; + objArray27[index98].SetDefaults(3629); + if (NPC.AnyNPCs(369) && Main.hardMode && Main.moonPhase == 3) + { + this.item[index1].SetDefaults(2295); + ++index1; + break; + } + break; + case 9: + this.item[index1].SetDefaults(588); + int index99 = index1 + 1; + this.item[index99].SetDefaults(589); + int index100 = index99 + 1; + this.item[index100].SetDefaults(590); + int index101 = index100 + 1; + this.item[index101].SetDefaults(597); + int index102 = index101 + 1; + this.item[index102].SetDefaults(598); + int index103 = index102 + 1; + this.item[index103].SetDefaults(596); + index1 = index103 + 1; + for (int Type = 1873; Type < 1906; ++Type) + { + this.item[index1].SetDefaults(Type); + ++index1; + } + break; + case 10: + if (NPC.downedMechBossAny) + { + this.item[index1].SetDefaults(756); + int index104 = index1 + 1; + this.item[index104].SetDefaults(787); + index1 = index104 + 1; + } + this.item[index1].SetDefaults(868); + int index105 = index1 + 1; + if (NPC.downedPlantBoss) + { + this.item[index105].SetDefaults(1551); + ++index105; + } + this.item[index105].SetDefaults(1181); + int index106 = index105 + 1; + this.item[index106].SetDefaults(783); + index1 = index106 + 1; + break; + case 11: + this.item[index1].SetDefaults(779); + int index107 = index1 + 1; + int index108; + if (Main.moonPhase >= 4) + { + this.item[index107].SetDefaults(748); + index108 = index107 + 1; + } + else + { + this.item[index107].SetDefaults(839); + int index109 = index107 + 1; + this.item[index109].SetDefaults(840); + int index110 = index109 + 1; + this.item[index110].SetDefaults(841); + index108 = index110 + 1; + } + if (NPC.downedGolemBoss) + { + this.item[index108].SetDefaults(948); + ++index108; + } + Item[] objArray28 = this.item; + int index111 = index108; + int num15 = index111 + 1; + objArray28[index111].SetDefaults(3623); + Item[] objArray29 = this.item; + int index112 = num15; + int num16 = index112 + 1; + objArray29[index112].SetDefaults(3603); + Item[] objArray30 = this.item; + int index113 = num16; + int num17 = index113 + 1; + objArray30[index113].SetDefaults(3604); + Item[] objArray31 = this.item; + int index114 = num17; + int num18 = index114 + 1; + objArray31[index114].SetDefaults(3607); + Item[] objArray32 = this.item; + int index115 = num18; + int num19 = index115 + 1; + objArray32[index115].SetDefaults(3605); + Item[] objArray33 = this.item; + int index116 = num19; + int num20 = index116 + 1; + objArray33[index116].SetDefaults(3606); + Item[] objArray34 = this.item; + int index117 = num20; + int num21 = index117 + 1; + objArray34[index117].SetDefaults(3608); + Item[] objArray35 = this.item; + int index118 = num21; + int num22 = index118 + 1; + objArray35[index118].SetDefaults(3618); + Item[] objArray36 = this.item; + int index119 = num22; + int num23 = index119 + 1; + objArray36[index119].SetDefaults(3602); + Item[] objArray37 = this.item; + int index120 = num23; + int num24 = index120 + 1; + objArray37[index120].SetDefaults(3663); + Item[] objArray38 = this.item; + int index121 = num24; + int num25 = index121 + 1; + objArray38[index121].SetDefaults(3609); + Item[] objArray39 = this.item; + int index122 = num25; + int index123 = index122 + 1; + objArray39[index122].SetDefaults(3610); + this.item[index123].SetDefaults(995); + int index124 = index123 + 1; + if (NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3) + { + this.item[index124].SetDefaults(2203); + ++index124; + } + if (WorldGen.crimson) + { + this.item[index124].SetDefaults(2193); + ++index124; + } + this.item[index124].SetDefaults(1263); + int index125 = index124 + 1; + if (Main.eclipse || Main.bloodMoon) + { + if (WorldGen.crimson) + { + this.item[index125].SetDefaults(784); + index1 = index125 + 1; + } + else + { + this.item[index125].SetDefaults(782); + index1 = index125 + 1; + } + } + else if (Main.player[Main.myPlayer].ZoneHoly) + { + this.item[index125].SetDefaults(781); + index1 = index125 + 1; + } + else + { + this.item[index125].SetDefaults(780); + index1 = index125 + 1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(1344); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1742); + ++index1; + break; + } + break; + case 12: + this.item[index1].SetDefaults(1037); + int index126 = index1 + 1; + this.item[index126].SetDefaults(2874); + int index127 = index126 + 1; + this.item[index127].SetDefaults(1120); + index1 = index127 + 1; + if (Main.netMode == 1) + { + this.item[index1].SetDefaults(1969); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(3248); + int index128 = index1 + 1; + this.item[index128].SetDefaults(1741); + index1 = index128 + 1; + } + if (Main.moonPhase == 0) + { + this.item[index1].SetDefaults(2871); + int index129 = index1 + 1; + this.item[index129].SetDefaults(2872); + index1 = index129 + 1; + break; + } + break; + case 13: + this.item[index1].SetDefaults(859); + int index130 = index1 + 1; + this.item[index130].SetDefaults(1000); + int index131 = index130 + 1; + this.item[index131].SetDefaults(1168); + int index132 = index131 + 1; + this.item[index132].SetDefaults(1449); + int index133 = index132 + 1; + this.item[index133].SetDefaults(1345); + int index134 = index133 + 1; + this.item[index134].SetDefaults(1450); + int num26 = index134 + 1; + Item[] objArray40 = this.item; + int index135 = num26; + int num27 = index135 + 1; + objArray40[index135].SetDefaults(3253); + Item[] objArray41 = this.item; + int index136 = num27; + int num28 = index136 + 1; + objArray41[index136].SetDefaults(2700); + Item[] objArray42 = this.item; + int index137 = num28; + int index138 = index137 + 1; + objArray42[index137].SetDefaults(2738); + if (Main.player[Main.myPlayer].HasItem(3548)) + { + this.item[index138].SetDefaults(3548); + ++index138; + } + if (NPC.AnyNPCs(229)) + this.item[index138++].SetDefaults(3369); + if (Main.hardMode) + { + this.item[index138].SetDefaults(3214); + int index139 = index138 + 1; + this.item[index139].SetDefaults(2868); + int index140 = index139 + 1; + this.item[index140].SetDefaults(970); + int index141 = index140 + 1; + this.item[index141].SetDefaults(971); + int index142 = index141 + 1; + this.item[index142].SetDefaults(972); + int index143 = index142 + 1; + this.item[index143].SetDefaults(973); + index138 = index143 + 1; + } + Item[] objArray43 = this.item; + int index144 = index138; + int num29 = index144 + 1; + objArray43[index144].SetDefaults(3747); + Item[] objArray44 = this.item; + int index145 = num29; + int num30 = index145 + 1; + objArray44[index145].SetDefaults(3732); + Item[] objArray45 = this.item; + int index146 = num30; + index1 = index146 + 1; + objArray45[index146].SetDefaults(3742); + if (BirthdayParty.PartyIsUp) + { + Item[] objArray46 = this.item; + int index147 = index1; + int num31 = index147 + 1; + objArray46[index147].SetDefaults(3749); + Item[] objArray47 = this.item; + int index148 = num31; + int num32 = index148 + 1; + objArray47[index148].SetDefaults(3746); + Item[] objArray48 = this.item; + int index149 = num32; + int num33 = index149 + 1; + objArray48[index149].SetDefaults(3739); + Item[] objArray49 = this.item; + int index150 = num33; + int num34 = index150 + 1; + objArray49[index150].SetDefaults(3740); + Item[] objArray50 = this.item; + int index151 = num34; + int num35 = index151 + 1; + objArray50[index151].SetDefaults(3741); + Item[] objArray51 = this.item; + int index152 = num35; + int num36 = index152 + 1; + objArray51[index152].SetDefaults(3737); + Item[] objArray52 = this.item; + int index153 = num36; + int num37 = index153 + 1; + objArray52[index153].SetDefaults(3738); + Item[] objArray53 = this.item; + int index154 = num37; + int num38 = index154 + 1; + objArray53[index154].SetDefaults(3736); + Item[] objArray54 = this.item; + int index155 = num38; + int num39 = index155 + 1; + objArray54[index155].SetDefaults(3745); + Item[] objArray55 = this.item; + int index156 = num39; + int num40 = index156 + 1; + objArray55[index156].SetDefaults(3744); + Item[] objArray56 = this.item; + int index157 = num40; + index1 = index157 + 1; + objArray56[index157].SetDefaults(3743); + break; + } + break; + case 14: + this.item[index1].SetDefaults(771); + ++index1; + if (Main.bloodMoon) + { + this.item[index1].SetDefaults(772); + ++index1; + } + if (!Main.dayTime || Main.eclipse) + { + this.item[index1].SetDefaults(773); + ++index1; + } + if (Main.eclipse) + { + this.item[index1].SetDefaults(774); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(760); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(1346); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1743); + int index158 = index1 + 1; + this.item[index158].SetDefaults(1744); + int index159 = index158 + 1; + this.item[index159].SetDefaults(1745); + index1 = index159 + 1; + } + if (NPC.downedMartians) + { + Item[] objArray57 = this.item; + int index160 = index1; + int num41 = index160 + 1; + objArray57[index160].SetDefaults(2862); + Item[] objArray58 = this.item; + int index161 = num41; + index1 = index161 + 1; + objArray58[index161].SetDefaults(3109); + } + if (Main.player[Main.myPlayer].HasItem(3384) || Main.player[Main.myPlayer].HasItem(3664)) + { + this.item[index1].SetDefaults(3664); + ++index1; + break; + } + break; + case 15: + this.item[index1].SetDefaults(1071); + int index162 = index1 + 1; + this.item[index162].SetDefaults(1072); + int index163 = index162 + 1; + this.item[index163].SetDefaults(1100); + int index164 = index163 + 1; + for (int Type = 1073; Type <= 1084; ++Type) + { + this.item[index164].SetDefaults(Type); + ++index164; + } + this.item[index164].SetDefaults(1097); + int index165 = index164 + 1; + this.item[index165].SetDefaults(1099); + int index166 = index165 + 1; + this.item[index166].SetDefaults(1098); + int index167 = index166 + 1; + this.item[index167].SetDefaults(1966); + int index168 = index167 + 1; + if (Main.hardMode) + { + this.item[index168].SetDefaults(1967); + int index169 = index168 + 1; + this.item[index169].SetDefaults(1968); + index168 = index169 + 1; + } + this.item[index168].SetDefaults(1490); + int index170 = index168 + 1; + if (Main.moonPhase <= 1) + { + this.item[index170].SetDefaults(1481); + index1 = index170 + 1; + } + else if (Main.moonPhase <= 3) + { + this.item[index170].SetDefaults(1482); + index1 = index170 + 1; + } + else if (Main.moonPhase <= 5) + { + this.item[index170].SetDefaults(1483); + index1 = index170 + 1; + } + else + { + this.item[index170].SetDefaults(1484); + index1 = index170 + 1; + } + if (Main.player[Main.myPlayer].ZoneCrimson) + { + this.item[index1].SetDefaults(1492); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneCorrupt) + { + this.item[index1].SetDefaults(1488); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneHoly) + { + this.item[index1].SetDefaults(1489); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneJungle) + { + this.item[index1].SetDefaults(1486); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneSnow) + { + this.item[index1].SetDefaults(1487); + ++index1; + } + if (Main.sandTiles > 1000) + { + this.item[index1].SetDefaults(1491); + ++index1; + } + if (Main.bloodMoon) + { + this.item[index1].SetDefaults(1493); + ++index1; + } + if ((double) Main.player[Main.myPlayer].position.Y / 16.0 < Main.worldSurface * 0.349999994039536) + { + this.item[index1].SetDefaults(1485); + ++index1; + } + if ((double) Main.player[Main.myPlayer].position.Y / 16.0 < Main.worldSurface * 0.349999994039536 && Main.hardMode) + { + this.item[index1].SetDefaults(1494); + ++index1; + } + if (Main.xMas) + { + for (int Type = 1948; Type <= 1957; ++Type) + { + this.item[index1].SetDefaults(Type); + ++index1; + } + } + for (int Type = 2158; Type <= 2160; ++Type) + { + if (index1 < 39) + this.item[index1].SetDefaults(Type); + ++index1; + } + for (int Type = 2008; Type <= 2014; ++Type) + { + if (index1 < 39) + this.item[index1].SetDefaults(Type); + ++index1; + } + break; + case 16: + this.item[index1].SetDefaults(1430); + int index171 = index1 + 1; + this.item[index171].SetDefaults(986); + int index172 = index171 + 1; + if (NPC.AnyNPCs(108)) + this.item[index172++].SetDefaults(2999); + if (Main.hardMode && NPC.downedPlantBoss) + { + if (Main.player[Main.myPlayer].HasItem(1157)) + { + this.item[index172].SetDefaults(1159); + int index173 = index172 + 1; + this.item[index173].SetDefaults(1160); + int index174 = index173 + 1; + this.item[index174].SetDefaults(1161); + index172 = index174 + 1; + if (!Main.dayTime) + { + this.item[index172].SetDefaults(1158); + ++index172; + } + if (Main.player[Main.myPlayer].ZoneJungle) + { + this.item[index172].SetDefaults(1167); + ++index172; + } + } + this.item[index172].SetDefaults(1339); + ++index172; + } + if (Main.hardMode && Main.player[Main.myPlayer].ZoneJungle) + { + this.item[index172].SetDefaults(1171); + ++index172; + if (!Main.dayTime) + { + this.item[index172].SetDefaults(1162); + ++index172; + } + } + this.item[index172].SetDefaults(909); + int index175 = index172 + 1; + this.item[index175].SetDefaults(910); + int index176 = index175 + 1; + this.item[index176].SetDefaults(940); + int index177 = index176 + 1; + this.item[index177].SetDefaults(941); + int index178 = index177 + 1; + this.item[index178].SetDefaults(942); + int index179 = index178 + 1; + this.item[index179].SetDefaults(943); + int index180 = index179 + 1; + this.item[index180].SetDefaults(944); + int index181 = index180 + 1; + this.item[index181].SetDefaults(945); + index1 = index181 + 1; + if (Main.player[Main.myPlayer].HasItem(1835)) + { + this.item[index1].SetDefaults(1836); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1258)) + { + this.item[index1].SetDefaults(1261); + ++index1; + } + if (Main.halloween) + { + this.item[index1].SetDefaults(1791); + ++index1; + break; + } + break; + case 17: + this.item[index1].SetDefaults(928); + int index182 = index1 + 1; + this.item[index182].SetDefaults(929); + int index183 = index182 + 1; + this.item[index183].SetDefaults(876); + int index184 = index183 + 1; + this.item[index184].SetDefaults(877); + int index185 = index184 + 1; + this.item[index185].SetDefaults(878); + int index186 = index185 + 1; + this.item[index186].SetDefaults(2434); + index1 = index186 + 1; + int num42 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && (num42 < 380 || num42 > Main.maxTilesX - 380)) + { + this.item[index1].SetDefaults(1180); + ++index1; + } + if (Main.hardMode && NPC.downedMechBossAny && NPC.AnyNPCs(208)) + { + this.item[index1].SetDefaults(1337); + ++index1; + break; + } + break; + case 18: + this.item[index1].SetDefaults(1990); + int index187 = index1 + 1; + this.item[index187].SetDefaults(1979); + index1 = index187 + 1; + if (Main.player[Main.myPlayer].statLifeMax >= 400) + { + this.item[index1].SetDefaults(1977); + ++index1; + } + if (Main.player[Main.myPlayer].statManaMax >= 200) + { + this.item[index1].SetDefaults(1978); + ++index1; + } + long num43 = 0; + for (int index188 = 0; index188 < 54; ++index188) + { + if (Main.player[Main.myPlayer].inventory[index188].type == 71) + num43 += (long) Main.player[Main.myPlayer].inventory[index188].stack; + if (Main.player[Main.myPlayer].inventory[index188].type == 72) + num43 += (long) (Main.player[Main.myPlayer].inventory[index188].stack * 100); + if (Main.player[Main.myPlayer].inventory[index188].type == 73) + num43 += (long) (Main.player[Main.myPlayer].inventory[index188].stack * 10000); + if (Main.player[Main.myPlayer].inventory[index188].type == 74) + num43 += (long) (Main.player[Main.myPlayer].inventory[index188].stack * 1000000); + } + if (num43 >= 1000000L) + { + this.item[index1].SetDefaults(1980); + ++index1; + } + if (Main.moonPhase % 2 == 0 && Main.dayTime || Main.moonPhase % 2 == 1 && !Main.dayTime) + { + this.item[index1].SetDefaults(1981); + ++index1; + } + if (Main.player[Main.myPlayer].team != 0) + { + this.item[index1].SetDefaults(1982); + ++index1; + } + if (Main.hardMode) + { + this.item[index1].SetDefaults(1983); + ++index1; + } + if (NPC.AnyNPCs(208)) + { + this.item[index1].SetDefaults(1984); + ++index1; + } + if (Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + { + this.item[index1].SetDefaults(1985); + ++index1; + } + if (Main.hardMode && NPC.downedMechBossAny) + { + this.item[index1].SetDefaults(1986); + ++index1; + } + if (Main.hardMode && NPC.downedMartians) + { + this.item[index1].SetDefaults(2863); + int index189 = index1 + 1; + this.item[index189].SetDefaults(3259); + index1 = index189 + 1; + break; + } + break; + case 19: + for (int index190 = 0; index190 < 40; ++index190) + { + if (Main.travelShop[index190] != 0) + { + this.item[index1].netDefaults(Main.travelShop[index190]); + ++index1; + } + } + break; + case 20: + if (Main.moonPhase % 2 == 0) + this.item[index1].SetDefaults(3001); + else + this.item[index1].SetDefaults(28); + int index191 = index1 + 1; + if (!Main.dayTime || Main.moonPhase == 0) + this.item[index191].SetDefaults(3002); + else + this.item[index191].SetDefaults(282); + int index192 = index191 + 1; + if (Main.time % 60.0 * 60.0 * 6.0 <= 10800.0) + this.item[index192].SetDefaults(3004); + else + this.item[index192].SetDefaults(8); + int index193 = index192 + 1; + if (Main.moonPhase == 0 || Main.moonPhase == 1 || Main.moonPhase == 4 || Main.moonPhase == 5) + this.item[index193].SetDefaults(3003); + else + this.item[index193].SetDefaults(40); + int index194 = index193 + 1; + if (Main.moonPhase % 4 == 0) + this.item[index194].SetDefaults(3310); + else if (Main.moonPhase % 4 == 1) + this.item[index194].SetDefaults(3313); + else if (Main.moonPhase % 4 == 2) + this.item[index194].SetDefaults(3312); + else + this.item[index194].SetDefaults(3311); + int index195 = index194 + 1; + this.item[index195].SetDefaults(166); + int index196 = index195 + 1; + this.item[index196].SetDefaults(965); + index1 = index196 + 1; + if (Main.hardMode) + { + if (Main.moonPhase < 4) + this.item[index1].SetDefaults(3316); + else + this.item[index1].SetDefaults(3315); + int index197 = index1 + 1; + this.item[index197].SetDefaults(3334); + index1 = index197 + 1; + if (Main.bloodMoon) + { + this.item[index1].SetDefaults(3258); + ++index1; + } + } + if (Main.moonPhase == 0 && !Main.dayTime) + { + this.item[index1].SetDefaults(3043); + ++index1; + break; + } + break; + case 21: + bool flag = Main.hardMode && NPC.downedMechBossAny; + int num44 = !Main.hardMode ? 0 : (NPC.downedGolemBoss ? 1 : 0); + this.item[index1].SetDefaults(353); + int index198 = index1 + 1; + this.item[index198].SetDefaults(3828); + this.item[index198].shopCustomPrice = num44 == 0 ? (!flag ? new int?(Item.buyPrice(silver: 25)) : new int?(Item.buyPrice(gold: 1))) : new int?(Item.buyPrice(gold: 4)); + int index199 = index198 + 1; + this.item[index199].SetDefaults(3816); + int index200 = index199 + 1; + this.item[index200].SetDefaults(3813); + this.item[index200].shopCustomPrice = new int?(75); + this.item[index200].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int num45 = index200 + 1; + int index201 = 10; + this.item[index201].SetDefaults(3818); + this.item[index201].shopCustomPrice = new int?(5); + this.item[index201].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index202 = index201 + 1; + this.item[index202].SetDefaults(3824); + this.item[index202].shopCustomPrice = new int?(5); + this.item[index202].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index203 = index202 + 1; + this.item[index203].SetDefaults(3832); + this.item[index203].shopCustomPrice = new int?(5); + this.item[index203].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + index1 = index203 + 1; + this.item[index1].SetDefaults(3829); + this.item[index1].shopCustomPrice = new int?(5); + this.item[index1].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + if (flag) + { + int index204 = 20; + this.item[index204].SetDefaults(3819); + this.item[index204].shopCustomPrice = new int?(25); + this.item[index204].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index205 = index204 + 1; + this.item[index205].SetDefaults(3825); + this.item[index205].shopCustomPrice = new int?(25); + this.item[index205].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index206 = index205 + 1; + this.item[index206].SetDefaults(3833); + this.item[index206].shopCustomPrice = new int?(25); + this.item[index206].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + index1 = index206 + 1; + this.item[index1].SetDefaults(3830); + this.item[index1].shopCustomPrice = new int?(25); + this.item[index1].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + } + if (num44 != 0) + { + int index207 = 30; + this.item[index207].SetDefaults(3820); + this.item[index207].shopCustomPrice = new int?(100); + this.item[index207].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index208 = index207 + 1; + this.item[index208].SetDefaults(3826); + this.item[index208].shopCustomPrice = new int?(100); + this.item[index208].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index209 = index208 + 1; + this.item[index209].SetDefaults(3834); + this.item[index209].shopCustomPrice = new int?(100); + this.item[index209].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + index1 = index209 + 1; + this.item[index1].SetDefaults(3831); + this.item[index1].shopCustomPrice = new int?(100); + this.item[index1].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + } + if (flag) + { + int index210 = 4; + this.item[index210].SetDefaults(3800); + this.item[index210].shopCustomPrice = new int?(25); + this.item[index210].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index211 = index210 + 1; + this.item[index211].SetDefaults(3801); + this.item[index211].shopCustomPrice = new int?(25); + this.item[index211].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index212 = index211 + 1; + this.item[index212].SetDefaults(3802); + this.item[index212].shopCustomPrice = new int?(25); + this.item[index212].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index212 + 1; + int index213 = 14; + this.item[index213].SetDefaults(3797); + this.item[index213].shopCustomPrice = new int?(25); + this.item[index213].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index214 = index213 + 1; + this.item[index214].SetDefaults(3798); + this.item[index214].shopCustomPrice = new int?(25); + this.item[index214].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index215 = index214 + 1; + this.item[index215].SetDefaults(3799); + this.item[index215].shopCustomPrice = new int?(25); + this.item[index215].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index215 + 1; + int index216 = 24; + this.item[index216].SetDefaults(3803); + this.item[index216].shopCustomPrice = new int?(25); + this.item[index216].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index217 = index216 + 1; + this.item[index217].SetDefaults(3804); + this.item[index217].shopCustomPrice = new int?(25); + this.item[index217].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index218 = index217 + 1; + this.item[index218].SetDefaults(3805); + this.item[index218].shopCustomPrice = new int?(25); + this.item[index218].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index218 + 1; + int index219 = 34; + this.item[index219].SetDefaults(3806); + this.item[index219].shopCustomPrice = new int?(25); + this.item[index219].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index220 = index219 + 1; + this.item[index220].SetDefaults(3807); + this.item[index220].shopCustomPrice = new int?(25); + this.item[index220].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index221 = index220 + 1; + this.item[index221].SetDefaults(3808); + this.item[index221].shopCustomPrice = new int?(25); + this.item[index221].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + index1 = index221 + 1; + } + if (num44 != 0) + { + int index222 = 7; + this.item[index222].SetDefaults(3871); + this.item[index222].shopCustomPrice = new int?(75); + this.item[index222].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index223 = index222 + 1; + this.item[index223].SetDefaults(3872); + this.item[index223].shopCustomPrice = new int?(75); + this.item[index223].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index224 = index223 + 1; + this.item[index224].SetDefaults(3873); + this.item[index224].shopCustomPrice = new int?(75); + this.item[index224].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index224 + 1; + int index225 = 17; + this.item[index225].SetDefaults(3874); + this.item[index225].shopCustomPrice = new int?(75); + this.item[index225].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index226 = index225 + 1; + this.item[index226].SetDefaults(3875); + this.item[index226].shopCustomPrice = new int?(75); + this.item[index226].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index227 = index226 + 1; + this.item[index227].SetDefaults(3876); + this.item[index227].shopCustomPrice = new int?(75); + this.item[index227].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index227 + 1; + int index228 = 27; + this.item[index228].SetDefaults(3877); + this.item[index228].shopCustomPrice = new int?(75); + this.item[index228].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index229 = index228 + 1; + this.item[index229].SetDefaults(3878); + this.item[index229].shopCustomPrice = new int?(75); + this.item[index229].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index230 = index229 + 1; + this.item[index230].SetDefaults(3879); + this.item[index230].shopCustomPrice = new int?(75); + this.item[index230].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num45 = index230 + 1; + int index231 = 37; + this.item[index231].SetDefaults(3880); + this.item[index231].shopCustomPrice = new int?(75); + this.item[index231].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index232 = index231 + 1; + this.item[index232].SetDefaults(3881); + this.item[index232].shopCustomPrice = new int?(75); + this.item[index232].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index233 = index232 + 1; + this.item[index233].SetDefaults(3882); + this.item[index233].shopCustomPrice = new int?(75); + this.item[index233].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + index1 = index233 + 1; + break; + } + break; + } + if (!Main.player[Main.myPlayer].discount) + return; + for (int index234 = 0; index234 < index1; ++index234) + this.item[index234].value = (int) ((double) this.item[index234].value * 0.800000011920929); + } + + public static void UpdateChestFrames() + { + bool[] flagArray = new bool[1000]; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].chest >= 0 && Main.player[index].chest < 1000) + flagArray[Main.player[index].chest] = true; + } + for (int index = 0; index < 1000; ++index) + { + Chest chest = Main.chest[index]; + if (chest != null) + { + if (flagArray[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..75817b6 --- /dev/null +++ b/Cinematics/CinematicManager.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.CinematicManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..efdde1b --- /dev/null +++ b/Cinematics/DD2Film.cs @@ -0,0 +1,359 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.DD2Film +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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) => Main.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; + Main.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) + Main.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..407a384 --- /dev/null +++ b/Cinematics/Film.cs @@ -0,0 +1,120 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.Film +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..e94bf6d --- /dev/null +++ b/Cinematics/FrameEvent.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.FrameEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..622bb21 --- /dev/null +++ b/Cinematics/FrameEventData.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.FrameEventData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..27bfc6f --- /dev/null +++ b/Cloud.cs @@ -0,0 +1,254 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cloud +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 || Main.cloudLimit < 10) + return; + Main.windSpeed = Main.windSpeedSet; + 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) Main.cloudTexture[Main.cloud[index1].type].Width * (double) Main.cloud[index1].scale); + Main.cloud[index1].height = (int) ((double) Main.cloudTexture[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.windSpeed; + if (!Main.gameMenu) + num1 = Main.windSpeed - 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.25)); + Main.cloud[index1].position.Y -= (float) Cloud.rand.Next((int) ((double) Main.screenHeight * 0.150000005960464)); + Main.cloud[index1].position.Y -= (float) Cloud.rand.Next((int) ((double) Main.screenHeight * 0.150000005960464)); + 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.200000002980232 || (double) Main.cloud[index1].position.Y < (double) -Main.screenHeight * 0.200000002980232) && (double) Main.numClouds < 50.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 ((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 + 100)) + Main.cloud[index1].Alpha = 1f; + if ((double) Main.cloud[index1].position.X + (double) Main.cloudTexture[Main.cloud[index1].type].Width * (double) Main.cloud[index1].scale < -100.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; + } + } + } + + 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 (Main.gameMenu) + { + this.position.X += (float) ((double) Main.windSpeed * (double) this.scale * 3.0); + } + else + { + 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 += (float) ((double) Main.windSpeed * (double) num1 * 5.0) * (float) Main.dayRate; + this.position.X -= (Main.screenPosition.X - Main.screenLastPosition.X) * num1; + } + float num = 600f; + 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) Main.cloudTexture[this.type].Width * (double) this.scale < -(double) num || (double) this.position.X > (double) Main.screenWidth + (double) num) + 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) Main.cloudTexture[this.type].Width * (double) this.scale); + this.height = (int) ((double) Main.cloudTexture[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..d41feac --- /dev/null +++ b/Collision.cs @@ -0,0 +1,2858 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Collision +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 +{ + public class Collision + { + public static bool stair = false; + public static bool stairFall = false; + public static bool honey = false; + public static bool sloping = false; + public static bool landMine = false; + public static bool up = false; + public static bool down = false; + 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( + 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.PerLinePoint 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 == (byte) 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 == (byte) 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) + { + 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])) + { + 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 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 (Main.tile[index1, index2].slope() > (byte) 0) + { + if (Main.tile[index1, index2].slope() > (byte) 2) + { + if (Main.tile[index1, index2].slope() == (byte) 3 && (double) vector2_1.Y + (double) Math.Abs(Velocity.X) + 1.0 >= (double) vector2_4.Y && (double) vector2_1.X >= (double) vector2_4.X) + flag1 = true; + if (Main.tile[index1, index2].slope() == (byte) 4 && (double) vector2_1.Y + (double) Math.Abs(Velocity.X) + 1.0 >= (double) vector2_4.Y && (double) vector2_1.X + (double) Width <= (double) vector2_4.X + 16.0) + flag1 = true; + } + else + { + if (Main.tile[index1, index2].slope() == (byte) 1 && (double) vector2_1.Y + (double) Height - (double) Math.Abs(Velocity.X) - 1.0 <= (double) vector2_4.Y + (double) num9 && (double) vector2_1.X >= (double) vector2_4.X) + flag1 = true; + if (Main.tile[index1, index2].slope() == (byte) 2 && (double) vector2_1.Y + (double) Height - (double) Math.Abs(Velocity.X) - 1.0 <= (double) vector2_4.Y + (double) num9 && (double) vector2_1.X + (double) Width <= (double) vector2_4.X + 16.0) + 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 (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 (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) 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)) + { + 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 = 40; + if (type == 232) + num5 = 60; + 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 == 442)) + { + Vector2 vector2; + vector2.X = (float) (index * 16); + vector2.Y = (float) (j * 16 + 12); + bool flag1 = false; + if (objType == 4) + { + if (type == 442) + { + 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) + { + switch (type) + { + case 210: + WorldGen.ExplodeMine(index, j); + continue; + case 442: + continue; + default: + 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) + { + int num5 = (int) Main.tile[index, j].frameY / 18; + bool flag2 = true; + if ((num5 == 4 || num5 == 2 || num5 == 3 || num5 == 6) && 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)); + return true; + } + continue; + } + continue; + } + } + } + } + } + } + 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(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 (Main.tile[x, y].topSlope()) + flag = true; + 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; + bool flag8; + if (gravDir == 1) + { + if (Main.tile[x, index1 - gravDir] == null || Main.tile[x, index1 - (num2 + 1) * gravDir] == null) + return; + Tile tile2 = Main.tile[x, index1 - gravDir]; + Tile tile3 = Main.tile[x, index1 - (num2 + 1) * gravDir]; + flag7 = flag4 && (!tile2.nactive() || !Main.tileSolid[(int) tile2.type] || Main.tileSolidTop[(int) tile2.type] || tile2.slope() == (byte) 1 && (double) position.X + (double) (width / 2) > (double) (x * 16) || tile2.slope() == (byte) 2 && (double) position.X + (double) (width / 2) < (double) (x * 16 + 16) || tile2.halfBrick() && (!tile3.nactive() || !Main.tileSolid[(int) tile3.type] || Main.tileSolidTop[(int) tile3.type])); + Tile tile4 = Main.tile[x, index1]; + Tile tile5 = Main.tile[x, index1 - 1]; + if (specialChecksMode == 1) + flag6 = tile4.type != (ushort) 16 && tile4.type != (ushort) 18 && tile4.type != (ushort) 134; + flag8 = ((!flag5 ? (false ? 1 : 0) : (!tile4.nactive() || tile4.topSlope() && (tile4.slope() != (byte) 1 || (double) position.X + (double) (width / 2) >= (double) (x * 16)) && (tile4.slope() != (byte) 2 || (double) position.X + (double) (width / 2) <= (double) (x * 16 + 16)) || tile4.topSlope() && (double) position.Y + (double) height <= (double) (index1 * 16) || (!Main.tileSolid[(int) tile4.type] || Main.tileSolidTop[(int) tile4.type]) && ((!holdsMatching || (!Main.tileSolidTop[(int) tile4.type] || tile4.frameY != (short) 0) && !TileID.Sets.Platforms[(int) tile4.type] ? 0 : (!Main.tileSolid[(int) tile5.type] ? 1 : (!tile5.nactive() ? 1 : 0))) & (flag6 ? 1 : 0)) == 0 ? (!tile5.halfBrick() ? (false ? 1 : 0) : (tile5.nactive() ? 1 : 0)) : (true ? 1 : 0))) & (!Main.tileSolidTop[(int) tile4.type] ? 1 : (!Main.tileSolidTop[(int) tile5.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]; + Tile tile9 = 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) tile9.type] || !tile9.nactive())) || tile9.halfBrick() && tile9.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()) + 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 + 1; + 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) + { + if (entity is Player) + { + Player player = (Player) entity; + if ((double) Math.Abs(player.gfxOffY) > 2.0 || player.grapCount > 0 || player.pulley) + return; + } + int num1 = 0; + int num2 = 0; + bool flag = false; + int y = (int) entity.position.Y; + int height = 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) + { + Tile tile = Main.tile[point.X, point.Y]; + if (tile != null && tile.active() && tile.nactive()) + { + int num3 = TileID.Sets.ConveyorDirection[(int) tile.type]; + if (num3 != 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 num4 = 0; + if (!TileID.Sets.Platforms[(int) tile.type] && Collision.CheckAABBvLineCollision2(entity.position - vector2_1, entity.Size + vector2_1 * 2f, lineStart1, lineEnd1)) + --num4; + if (Collision.CheckAABBvLineCollision2(entity.position - vector2_1, entity.Size + vector2_1 * 2f, lineStart2, lineEnd2)) + ++num4; + if (num4 != 0) + { + flag = true; + num1 += num3 * num4 * (int) gravDir; + if (tile.leftSlope()) + num2 += (int) gravDir * -num3; + if (tile.rightSlope()) + num2 -= (int) gravDir * -num3; + } + } + } + } + if (!flag || num1 == 0) + return; + int num5 = Math.Sign(num1); + int num6 = Math.Sign(num2); + Vector2 Velocity = Vector2.Normalize(new Vector2((float) num5 * gravDir, (float) num6)) * 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; + } + } + } +} diff --git a/CombatText.cs b/CombatText.cs new file mode 100644 index 0000000..9ef8599 --- /dev/null +++ b/CombatText.cs @@ -0,0 +1,185 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.CombatText +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +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 = Main.fontCombatText[index2].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 => Main.UIScale / (Main.GameViewMatrix.Zoom.X / Main.ForcedMinimumZoom); + + 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..762a3f6 --- /dev/null +++ b/DataStructures/AnchorData.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.AnchorData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/BufferPool.cs b/DataStructures/BufferPool.cs new file mode 100644 index 0000000..eb9ed07 --- /dev/null +++ b/DataStructures/BufferPool.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.BufferPool +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5338912 --- /dev/null +++ b/DataStructures/CachedBuffer.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.CachedBuffer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..67550e3 --- /dev/null +++ b/DataStructures/ColorSlidersSet.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.ColorSlidersSet +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/DoubleStack`1.cs b/DataStructures/DoubleStack`1.cs new file mode 100644 index 0000000..2719f94 --- /dev/null +++ b/DataStructures/DoubleStack`1.cs @@ -0,0 +1,149 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DoubleStack`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..16c23cc --- /dev/null +++ b/DataStructures/DrawAnimation.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawAnimation +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) => texture.Frame(); + } +} diff --git a/DataStructures/DrawAnimationVertical.cs b/DataStructures/DrawAnimationVertical.cs new file mode 100644 index 0000000..d70f67b --- /dev/null +++ b/DataStructures/DrawAnimationVertical.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawAnimationVertical +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 DrawAnimationVertical(int ticksperframe, int frameCount) + { + this.Frame = 0; + this.FrameCounter = 0; + this.FrameCount = frameCount; + this.TicksPerFrame = ticksperframe; + } + + public override void Update() + { + if (++this.FrameCounter < this.TicksPerFrame) + return; + this.FrameCounter = 0; + if (++this.Frame < this.FrameCount) + return; + this.Frame = 0; + } + + public override Rectangle GetFrame(Texture2D texture) => texture.Frame(verticalFrames: this.FrameCount, frameY: this.Frame); + } +} diff --git a/DataStructures/DrawData.cs b/DataStructures/DrawData.cs new file mode 100644 index 0000000..d78bb84 --- /dev/null +++ b/DataStructures/DrawData.cs @@ -0,0 +1,178 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..ee27ea2 --- /dev/null +++ b/DataStructures/DrillDebugDraw.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrillDebugDraw +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/MethodSequenceListItem.cs b/DataStructures/MethodSequenceListItem.cs new file mode 100644 index 0000000..368ef32 --- /dev/null +++ b/DataStructures/MethodSequenceListItem.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.MethodSequenceListItem +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1403316 --- /dev/null +++ b/DataStructures/NPCAimedTarget.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.NPCAimedTarget +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/PlacementHook.cs b/DataStructures/PlacementHook.cs new file mode 100644 index 0000000..a413a45 --- /dev/null +++ b/DataStructures/PlacementHook.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlacementHook +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..28bd4fc --- /dev/null +++ b/DataStructures/PlayerDeathReason.cs @@ -0,0 +1,129 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDeathReason +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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/Point16.cs b/DataStructures/Point16.cs new file mode 100644 index 0000000..16f4ada --- /dev/null +++ b/DataStructures/Point16.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.Point16 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/SoundPlaySet.cs b/DataStructures/SoundPlaySet.cs new file mode 100644 index 0000000..a45ada3 --- /dev/null +++ b/DataStructures/SoundPlaySet.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.SoundPlaySet +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/TileEntity.cs b/DataStructures/TileEntity.cs new file mode 100644 index 0000000..bc3785b --- /dev/null +++ b/DataStructures/TileEntity.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileEntity +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.GameContent.Tile_Entities; + +namespace Terraria.DataStructures +{ + public abstract class TileEntity + { + public const int MaxEntitiesPerChunk = 1000; + public static Dictionary ByID = new Dictionary(); + public static Dictionary ByPosition = new Dictionary(); + public static int TileEntitiesNextID = 0; + 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 event Action _NetPlaceEntity; + + 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() + { + TETrainingDummy.Initialize(); + TEItemFrame.Initialize(); + TELogicSensor.Initialize(); + } + + public static void PlaceEntityNet(int x, int y, int type) + { + if (!WorldGen.InWorld(x, y) || TileEntity.ByPosition.ContainsKey(new Point16(x, y)) || TileEntity._NetPlaceEntity == null) + return; + TileEntity._NetPlaceEntity(x, y, type); + } + + 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) + { + TileEntity tileEntity = (TileEntity) null; + byte num = reader.ReadByte(); + switch (num) + { + case 0: + tileEntity = (TileEntity) new TETrainingDummy(); + break; + case 1: + tileEntity = (TileEntity) new TEItemFrame(); + break; + case 2: + tileEntity = (TileEntity) new TELogicSensor(); + break; + } + tileEntity.type = num; + tileEntity.ReadInner(reader, networkSend); + return tileEntity; + } + + 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) + { + } + } +} diff --git a/DataStructures/TileObjectPreviewData.cs b/DataStructures/TileObjectPreviewData.cs new file mode 100644 index 0000000..b9c986f --- /dev/null +++ b/DataStructures/TileObjectPreviewData.cs @@ -0,0 +1,175 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileObjectPreviewData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/DelegateMethods.cs b/DelegateMethods.cs new file mode 100644 index 0000000..b929a9e --- /dev/null +++ b/DelegateMethods.cs @@ -0,0 +1,237 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DelegateMethods +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; + +namespace Terraria +{ + public static class DelegateMethods + { + public static Vector3 v3_1 = Vector3.Zero; + public static float f_1 = 0.0f; + public static Color c_1 = Color.Transparent; + public static int i_1 = 0; + 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 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 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 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; + } + } + } +} diff --git a/DeprecatedClassLeftInForLoading.cs b/DeprecatedClassLeftInForLoading.cs new file mode 100644 index 0000000..5a82522 --- /dev/null +++ b/DeprecatedClassLeftInForLoading.cs @@ -0,0 +1,145 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DeprecatedClassLeftInForLoading +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0cb9058 --- /dev/null +++ b/Dust.cs @@ -0,0 +1,1892 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Dust +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 5999; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.8) + { + if (Main.rand.Next(3) != 0) + return 5999; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.7) + { + if (Main.rand.Next(2) == 0) + return 5999; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.6) + { + if (Main.rand.Next(4) == 0) + return 5999; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.5) + { + if (Main.rand.Next(5) == 0) + return 5999; + } + 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; + 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 == 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.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(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 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; + default: + return 33; + } + } + + public static void UpdateDust() + { + int num1 = 0; + Dust.lavaBubbles = 0; + Main.snowDust = 0; + Dust.SandStormCount = 0; + bool flag = Sandstorm.Happening && Main.player[Main.myPlayer].ZoneSandstorm && (Main.bgStyle == 2 || Main.bgStyle == 5) && Main.bgDelay < 50; + 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; + } + 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.noLight) + { + 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) + { + 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) + { + 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 == 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 num80 = dust.scale * 0.6f; + int type = dust.type; + float num81 = num80; + float num82 = num80; + float num83 = num80; + float num84 = num81 * 0.5f; + float num85 = num82 * 0.9f; + float num86 = num83 * 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num80 * num84, num80 * num85, num80 * num86); + } + if (dust.type == 234) + { + float num87 = dust.scale * 0.6f; + int type = dust.type; + float num88 = num87; + float num89 = num87; + float num90 = num87; + float num91 = num88 * 0.95f; + float num92 = num89 * 0.65f; + float num93 = num90 * 1.3f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num87 * num91, num87 * num92, num87 * num93); + } + 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 == 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) + { + if (!dust.noGravity) + dust.velocity.Y += 0.05f; + if (dust.type == 229 || dust.type == 228) + { + 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) + { + float num94 = dust.scale * 1.4f; + if (dust.type == 29) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 0.1f, num94 * 0.4f, num94); + } + else if (dust.type == 75) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 0.7f, num94, num94 * 0.2f); + } + else if (dust.type == 169) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 1.1f, num94 * 1.1f, num94 * 0.2f); + } + else if (dust.type == 135) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 0.2f, num94 * 0.7f, num94); + } + else if (dust.type == 158) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 1f, num94 * 0.5f, 0.0f); + } + else if (dust.type == 228) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 0.7f, num94 * 0.65f, num94 * 0.3f); + } + else if (dust.type == 229) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * 0.3f, num94 * 0.65f, num94 * 0.7f); + } + else if (dust.type == 242) + { + if ((double) num94 > 1.0) + num94 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94, 0.0f, num94); + } + else if (dust.type >= 59 && dust.type <= 65) + { + if ((double) num94 > 0.800000011920929) + num94 = 0.8f; + int num95 = dust.type - 58; + float num96 = 1f; + float num97 = 1f; + float num98 = 1f; + switch (num95) + { + case 1: + num96 = 0.0f; + num97 = 0.1f; + num98 = 1.3f; + break; + case 2: + num96 = 1f; + num97 = 0.1f; + num98 = 0.1f; + break; + case 3: + num96 = 0.0f; + num97 = 1f; + num98 = 0.1f; + break; + case 4: + num96 = 0.9f; + num97 = 0.0f; + num98 = 0.9f; + break; + case 5: + num96 = 1.3f; + num97 = 1.3f; + num98 = 1.3f; + break; + case 6: + num96 = 0.9f; + num97 = 0.9f; + num98 = 0.0f; + break; + case 7: + num96 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num97 = 0.3f; + num98 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + } + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94 * num96, num94 * num97, num94 * num98); + } + else if (dust.type == (int) sbyte.MaxValue) + { + float R = num94 * 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 = num94 * 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 ((double) num94 > 0.600000023841858) + num94 = 0.6f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num94, num94 * 0.65f, num94 * 0.4f); + } + } + } + else if (dust.type == 269) + { + if (!dust.noLight) + { + float num99 = dust.scale * 1.4f; + if ((double) num99 > 1.0) + num99 = 1f; + Vector3 vector3 = new Vector3(0.7f, 0.65f, 0.3f); + Lighting.AddLight(dust.position, vector3 * num99); + } + 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 num100 = dust.scale * 1.3f; + if ((double) num100 > 1.0) + num100 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num100, num100, num100 * 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 num101 = dust.scale * 1.3f; + if ((double) num101 > 1.0) + num101 = 1f; + if (dust.type == 162) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num101, num101 * 0.7f, num101 * 0.1f); + else + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num101 * 0.1f, num101, num101); + 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.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + if (dust.type == 31 && 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; + } + } + } + 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 num102; + float num103 = (float) (((double) (num102 = (int) (byte) (((int) color.R + (int) color.G + (int) color.B) / 3)) / 270.0 + 1.0) / 2.0); + float num104 = (float) (((double) num102 / 270.0 + 1.0) / 2.0); + float num105 = (float) (((double) num102 / 270.0 + 1.0) / 2.0); + float num106 = num103 * (dust.scale * 0.9f); + float num107 = num104 * (dust.scale * 0.9f); + float num108 = num105 * (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 num109 = 1f; + if (dust.type == 244) + { + num106 *= 0.8862745f; + num107 *= 0.4627451f; + num108 *= 0.2980392f; + num109 = 0.9f; + } + else if (dust.type == 245) + { + num106 *= 0.5137255f; + num107 *= 0.6745098f; + num108 *= 0.6784314f; + num109 = 1f; + } + else if (dust.type == 246) + { + num106 *= 0.8f; + num107 *= 0.7098039f; + num108 *= 0.282353f; + num109 = 1.1f; + } + else if (dust.type == 247) + { + num106 *= 0.6f; + num107 *= 0.6745098f; + num108 *= 0.7254902f; + num109 = 1.2f; + } + float R = num106 * num109; + float G = num107 * num109; + float B = num108 * num109; + 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 num110 = (float) color.R / 270f; + float num111 = (float) color.G / 270f; + float num112 = (float) color.B / 270f; + float num113 = (float) ((int) dust.color.R / (int) byte.MaxValue); + float num114 = (float) ((int) dust.color.G / (int) byte.MaxValue); + float num115 = (float) ((int) dust.color.B / (int) byte.MaxValue); + float R = num110 * (dust.scale * 1.07f * num113); + float G = num111 * (dust.scale * 1.07f * num114); + float B = num112 * (dust.scale * 1.07f * num115); + 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 + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), R, G, B); + } + else if (dust.type == 15 || dust.type == 57 || dust.type == 58 || dust.type == 274) + { + dust.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + float num116 = dust.scale; + if (dust.type != 15) + num116 = dust.scale * 0.8f; + if (dust.noLight) + dust.velocity *= 0.95f; + if ((double) num116 > 1.0) + num116 = 1f; + if (dust.type == 15) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num116 * 0.45f, num116 * 0.55f, num116); + else if (dust.type == 57) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num116 * 0.95f, num116 * 0.95f, num116 * 0.45f); + else if (dust.type == 58) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num116, num116 * 0.55f, num116 * 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 num117 = dust.scale * 0.1f; + if ((double) num117 > 1.0) + num117 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num117 * 0.8f, num117 * 0.2f, num117 * 0.8f); + } + else if (dust.type == 113) + { + float num118 = dust.scale * 0.1f; + if ((double) num118 > 1.0) + num118 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num118 * 0.2f, num118 * 0.3f, num118 * 1.3f); + } + else if (dust.type == 114) + { + float num119 = dust.scale * 0.1f; + if ((double) num119 > 1.0) + num119 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num119 * 1.2f, num119 * 0.5f, num119 * 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 num120 = dust.scale; + if (dust.type != 15) + num120 = dust.scale * 0.8f; + if ((double) num120 > 1.0) + num120 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num120 * ((float) dust.color.R / (float) byte.MaxValue), num120 * ((float) dust.color.G / (float) byte.MaxValue), num120 * ((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 num121 = dust.scale * 0.8f; + if ((double) num121 > 1.0) + num121 = 1f; + if (dust.noLight) + dust.noLight = false; + if (!dust.noLight) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num121 * ((float) dust.color.R / (float) byte.MaxValue), num121 * ((float) dust.color.G / (float) byte.MaxValue), num121 * ((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) + { + 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; + float num122 = dust.scale * 0.8f; + if (dust.type == 55) + { + if ((double) num122 > 1.0) + num122 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num122, num122, num122 * 0.6f); + } + else if (dust.type == 73) + { + if ((double) num122 > 1.0) + num122 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num122, num122 * 0.35f, num122 * 0.5f); + } + else if (dust.type == 74) + { + if ((double) num122 > 1.0) + num122 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num122 * 0.35f, num122, num122 * 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 num123 = dust.scale; + if ((double) num123 > 1.0) + num123 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num123 * 0.2f, 0.0f, num123 * 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) + { + 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 num124 = 100f - vector2_3.Length(); + if ((double) num124 > 0.0) + dust.scale -= num124 * 0.0015f; + vector2_3.Normalize(); + float num125 = (float) ((1.0 - (double) dust.scale) * 20.0); + Vector2 vector2_4 = vector2_3 * -num125; + 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 num126 = dust.scale; + if ((double) num126 > 1.0) + num126 = 1f; + if (dust.type == 130) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num126 * 1f, num126 * 0.5f, num126 * 0.4f); + if (dust.type == 131) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num126 * 0.4f, num126 * 1f, num126 * 0.6f); + if (dust.type == 132) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num126 * 0.3f, num126 * 0.5f, num126 * 1f); + if (dust.type == 133) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num126 * 0.9f, num126 * 0.9f, num126 * 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 >= 219 && dust.type <= 223) + { + float num127 = dust.scale; + if ((double) num127 > 1.0) + num127 = 1f; + if (!dust.noLight) + { + if (dust.type == 219) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num127 * 1f, num127 * 0.5f, num127 * 0.4f); + if (dust.type == 220) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num127 * 0.4f, num127 * 1f, num127 * 0.6f); + if (dust.type == 221) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num127 * 0.3f, num127 * 0.5f, num127 * 1f); + if (dust.type == 222) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num127 * 0.9f, num127 * 0.9f, num127 * 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 num128 = dust.scale; + if ((double) num128 > 1.0) + num128 = 1f; + if (!dust.noLight) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num128 * 0.2f, num128 * 0.7f, num128 * 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 num129 = dust.scale; + if ((double) num129 > 1.0) + num129 = 1f; + if (!dust.noLight) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num129 * 0.5f, num129 * 0.2f, num129 * 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 num130 = 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) + num130 = 0.11f; + if ((double) Dust.dCount == 0.6) + num130 = 0.13f; + if ((double) Dust.dCount == 0.7) + num130 = 0.16f; + if ((double) Dust.dCount == 0.8) + num130 = 0.22f; + if ((double) Dust.dCount == 0.9) + num130 = 0.25f; + if ((double) dust.scale < (double) num130) + dust.active = false; + } + } + else + dust.active = false; + } + int num131 = num1; + if ((double) num131 > (double) Main.maxDustToDraw * 0.9) + Dust.dCount = 0.9f; + else if ((double) num131 > (double) Main.maxDustToDraw * 0.8) + Dust.dCount = 0.8f; + else if ((double) num131 > (double) Main.maxDustToDraw * 0.7) + Dust.dCount = 0.7f; + else if ((double) num131 > (double) Main.maxDustToDraw * 0.6) + Dust.dCount = 0.6f; + else if ((double) num131 > (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; + 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.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) + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 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 == 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 == 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) + { + 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..05bf322 --- /dev/null +++ b/Entity.cs @@ -0,0 +1,118 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Entity +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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..2698847 --- /dev/null +++ b/Enums/AnchorType.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.AnchorType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/LiquidPlacement.cs b/Enums/LiquidPlacement.cs new file mode 100644 index 0000000..c54a4de --- /dev/null +++ b/Enums/LiquidPlacement.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.LiquidPlacement +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/NPCTargetType.cs b/Enums/NPCTargetType.cs new file mode 100644 index 0000000..a1e0634 --- /dev/null +++ b/Enums/NPCTargetType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.NPCTargetType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d7ea431 --- /dev/null +++ b/Enums/TileCuttingContext.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileCuttingContext +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..45ac574 --- /dev/null +++ b/Enums/TileIDEnum.cs @@ -0,0 +1,363 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileIDEnum +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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, + FleshGrass, + 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..615f2f5 --- /dev/null +++ b/Enums/TileObjectDirection.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileObjectDirection +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a68f1f7 --- /dev/null +++ b/Enums/TileScanGroup.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileScanGroup +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a7bca5c --- /dev/null +++ b/Enums/TownNPCRoomCheckFailureReason.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TownNPCRoomCheckFailureReason +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..36a81e9 --- /dev/null +++ b/Enums/TownNPCSpawnResult.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TownNPCSpawnResult +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Extensions/EnumerationExtensions.cs b/Extensions/EnumerationExtensions.cs new file mode 100644 index 0000000..133e06c --- /dev/null +++ b/Extensions/EnumerationExtensions.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Extensions.EnumerationExtensions +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1840738 --- /dev/null +++ b/FrameSkipTest.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.FrameSkipTest +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 0.0f; + private static float DeltasThisSecond = 0.0f; + 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..ecd35e0 --- /dev/null +++ b/Framing.cs @@ -0,0 +1,376 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Framing +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) 6); + 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; + } + + public static void SelfFrame4Way() + { + } + + public static void SelfFrame8Way(int i, int j, Tile centerTile, bool resetFrame) + { + if (!centerTile.active()) + return; + ushort gemsparkFramingType = TileID.Sets.GemsparkFramingTypes[(int) centerTile.type]; + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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() && (int) TileID.Sets.GemsparkFramingTypes[(int) tileSafely.type] == (int) gemsparkFramingType) + { + 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 (i <= 0 || j <= 0 || i >= Main.maxTilesX - 1 || j >= Main.maxTilesY - 1 || Main.tile[i, j] == null) + return; + WorldGen.UpdateMapTile(i, j); + Tile tile1 = Main.tile[i, j]; + if (tile1.wall == (byte) 0) + { + tile1.wallColor((byte) 0); + } + else + { + int index1 = 0; + Tile tile2 = Main.tile[i, j - 1]; + if (tile2 != null && (tile2.wall > (byte) 0 || tile2.active() && tile2.type == (ushort) 54)) + index1 = 1; + Tile tile3 = Main.tile[i - 1, j]; + if (tile3 != null && (tile3.wall > (byte) 0 || tile3.active() && tile3.type == (ushort) 54)) + index1 |= 2; + Tile tile4 = Main.tile[i + 1, j]; + if (tile4 != null && (tile4.wall > (byte) 0 || tile4.active() && tile4.type == (ushort) 54)) + index1 |= 4; + Tile tile5 = Main.tile[i, j + 1]; + if (tile5 != null && (tile5.wall > (byte) 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); + 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) + { + 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/Achievements/AchievementsHelper.cs b/GameContent/Achievements/AchievementsHelper.cs new file mode 100644 index 0000000..69a4f36 --- /dev/null +++ b/GameContent/Achievements/AchievementsHelper.cs @@ -0,0 +1,311 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.AchievementsHelper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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); + + private 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); + } + 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 index = 0; index < player.extraAccessorySlots + 3 + 5; ++index) + { + if (player.dye[index].type < 1 || player.dye[index].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 index = 0; index < player.extraAccessorySlots + 3 + 5; ++index) + { + if (player.dye[index].type < 1 || player.dye[index].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..2fbc7a8 --- /dev/null +++ b/GameContent/Achievements/CustomFlagCondition.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomFlagCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..9bd5de0 --- /dev/null +++ b/GameContent/Achievements/CustomFloatCondition.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomFloatCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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); + } +} diff --git a/GameContent/Achievements/CustomIntCondition.cs b/GameContent/Achievements/CustomIntCondition.cs new file mode 100644 index 0000000..853e539 --- /dev/null +++ b/GameContent/Achievements/CustomIntCondition.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomIntCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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); + } +} diff --git a/GameContent/Achievements/ItemCraftCondition.cs b/GameContent/Achievements/ItemCraftCondition.cs new file mode 100644 index 0000000..fbd5940 --- /dev/null +++ b/GameContent/Achievements/ItemCraftCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ItemCraftCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + 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..7cfdad2 --- /dev/null +++ b/GameContent/Achievements/ItemPickupCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ItemPickupCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + 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..8d810af --- /dev/null +++ b/GameContent/Achievements/NPCKilledCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.NPCKilledCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + 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..49b717e --- /dev/null +++ b/GameContent/Achievements/ProgressionEventCondition.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ProgressionEventCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + 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..e1dced8 --- /dev/null +++ b/GameContent/Achievements/TileDestroyedCondition.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.TileDestroyedCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + 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/Biomes/CampsiteBiome.cs b/GameContent/Biomes/CampsiteBiome.cs new file mode 100644 index 0000000..d3f20c9 --- /dev/null +++ b/GameContent/Biomes/CampsiteBiome.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CampsiteBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.World.Generation; + +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; + 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 byte[1]), (GenAction) new Actions.PlaceWall((byte) 16))); + 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 byte[1]), (GenAction) new Actions.PlaceWall((byte) 16))); + 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 index1 = 0; index1 < num2; ++index1) + { + int num4 = GenBase._random.Next(1, 3); + for (int index2 = 0; index2 < num4; ++index2) + WorldGen.PlaceTile(origin.X + num3 - index1, j - index2, 331); + } + } + 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.AddStructure(new Microsoft.Xna.Framework.Rectangle(origin.X - radius, origin.Y - radius, radius * 2, radius * 2), 4); + return true; + } + } +} diff --git a/GameContent/Biomes/CaveHouseBiome.cs b/GameContent/Biomes/CaveHouseBiome.cs new file mode 100644 index 0000000..d65657c --- /dev/null +++ b/GameContent/Biomes/CaveHouseBiome.cs @@ -0,0 +1,699 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouseBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.ID; +using Terraria.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class CaveHouseBiome : MicroBiome + { + private const int VERTICAL_EXIT_WIDTH = 3; + private static readonly bool[] _blacklistedTiles = TileID.Sets.Factory.CreateBoolSet(true, 225, 41, 43, 44, 226, 203, 112, 25, 151); + private int _sharpenerCount; + private int _extractinatorCount; + + private Microsoft.Xna.Framework.Rectangle GetRoom(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 float RoomSolidPrecentage(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 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 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 int SortBiomeResults( + Tuple item1, + Tuple item2) + { + return item2.Item2.CompareTo(item1.Item2); + } + + public override bool Place(Point origin, StructureMap structures) + { + Point result1; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(200), (GenCondition) new Conditions.IsSolid()), out result1) || result1 == origin) + return false; + Microsoft.Xna.Framework.Rectangle room1 = this.GetRoom(result1); + Microsoft.Xna.Framework.Rectangle room2 = this.GetRoom(new Point(room1.Center.X, room1.Y + 1)); + Microsoft.Xna.Framework.Rectangle room3 = this.GetRoom(new Point(room1.Center.X, room1.Y + room1.Height + 10)); + room3.Y = room1.Y + room1.Height - 1; + float num1 = this.RoomSolidPrecentage(room2); + float num2 = this.RoomSolidPrecentage(room3); + room1.Y += 3; + room2.Y += 3; + room3.Y += 3; + List rectangleList1 = new List(); + if ((double) GenBase._random.NextFloat() > (double) num1 + 0.200000002980232) + rectangleList1.Add(room2); + else + room2 = room1; + rectangleList1.Add(room1); + if ((double) GenBase._random.NextFloat() > (double) num2 + 0.200000002980232) + rectangleList1.Add(room3); + else + room3 = room1; + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + if (rectangle.Y + rectangle.Height > Main.maxTilesY - 220) + return false; + } + Dictionary resultsOutput = new Dictionary(); + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + WorldUtils.Gen(new Point(rectangle.X - 10, rectangle.Y - 10), (GenShape) new Shapes.Rectangle(rectangle.Width + 20, rectangle.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> tupleList1 = new List>(); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Default, resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1])); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Jungle, resultsOutput[(ushort) 59] + resultsOutput[(ushort) 60] * 10)); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Mushroom, resultsOutput[(ushort) 59] + resultsOutput[(ushort) 70] * 10)); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Snow, resultsOutput[(ushort) 147] + resultsOutput[(ushort) 161])); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Desert, resultsOutput[(ushort) 397] + resultsOutput[(ushort) 396] + resultsOutput[(ushort) 53])); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Granite, resultsOutput[(ushort) 368])); + tupleList1.Add(Tuple.Create(CaveHouseBiome.BuildData.Marble, resultsOutput[(ushort) 367])); + tupleList1.Sort(new Comparison>(this.SortBiomeResults)); + CaveHouseBiome.BuildData buildData = tupleList1[0].Item1; + foreach (Microsoft.Xna.Framework.Rectangle area in rectangleList1) + { + if (buildData != CaveHouseBiome.BuildData.Granite) + { + if (WorldUtils.Find(new Point(area.X - 2, area.Y - 2), Searches.Chain(new Searches.Rectangle(area.Width + 4, area.Height + 4).RequireAll(false), (GenCondition) new Conditions.HasLava()), out Point _)) + return false; + } + if (!structures.CanPlace(area, CaveHouseBiome._blacklistedTiles, 5)) + return false; + } + int val1_1 = room1.X; + int val1_2 = room1.X + room1.Width - 1; + List rectangleList2 = new List(); + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + val1_1 = Math.Min(val1_1, rectangle.X); + val1_2 = Math.Max(val1_2, rectangle.X + rectangle.Width - 1); + } + int num3 = 6; + while (num3 > 4 && (val1_2 - val1_1) % num3 != 0) + --num3; + for (int x = val1_1; x <= val1_2; x += num3) + { + for (int index1 = 0; index1 < rectangleList1.Count; ++index1) + { + Microsoft.Xna.Framework.Rectangle rectangle = rectangleList1[index1]; + if (x >= rectangle.X && x < rectangle.X + rectangle.Width) + { + int y = rectangle.Y + rectangle.Height; + int num4 = 50; + for (int index2 = index1 + 1; index2 < rectangleList1.Count; ++index2) + { + if (x >= rectangleList1[index2].X && x < rectangleList1[index2].X + rectangleList1[index2].Width) + num4 = Math.Min(num4, rectangleList1[index2].Y - y); + } + if (num4 > 0) + { + Point result2; + bool flag = WorldUtils.Find(new Point(x, y), Searches.Chain((GenSearch) new Searches.Down(num4), (GenCondition) new Conditions.IsSolid()), out result2); + if (num4 < 50) + { + flag = true; + result2 = new Point(x, y + num4); + } + if (flag) + rectangleList2.Add(new Microsoft.Xna.Framework.Rectangle(x, y, 1, result2.Y - y)); + } + } + } + } + List pointList1 = new List(); + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int exitY; + if (this.FindSideExit(new Microsoft.Xna.Framework.Rectangle(rectangle.X + rectangle.Width, rectangle.Y + 1, 1, rectangle.Height - 2), false, out exitY)) + pointList1.Add(new Point(rectangle.X + rectangle.Width - 1, exitY)); + if (this.FindSideExit(new Microsoft.Xna.Framework.Rectangle(rectangle.X, rectangle.Y + 1, 1, rectangle.Height - 2), true, out exitY)) + pointList1.Add(new Point(rectangle.X, exitY)); + } + List> tupleList2 = new List>(); + for (int index = 1; index < rectangleList1.Count; ++index) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = rectangleList1[index]; + Microsoft.Xna.Framework.Rectangle rectangle2 = rectangleList1[index - 1]; + if (rectangle2.X - rectangle1.X > rectangle1.X + rectangle1.Width - (rectangle2.X + rectangle2.Width)) + tupleList2.Add(new Tuple(new Point(rectangle1.X + rectangle1.Width - 1, rectangle1.Y + 1), new Point(rectangle1.X + rectangle1.Width - rectangle1.Height + 1, rectangle1.Y + rectangle1.Height - 1))); + else + tupleList2.Add(new Tuple(new Point(rectangle1.X, rectangle1.Y + 1), new Point(rectangle1.X + rectangle1.Height - 1, rectangle1.Y + rectangle1.Height - 1))); + } + List pointList2 = new List(); + int exitX; + if (this.FindVerticalExit(new Microsoft.Xna.Framework.Rectangle(room2.X + 2, room2.Y, room2.Width - 4, 1), true, out exitX)) + pointList2.Add(new Point(exitX, room2.Y)); + if (this.FindVerticalExit(new Microsoft.Xna.Framework.Rectangle(room3.X + 2, room3.Y + room3.Height - 1, room3.Width - 4, 1), false, out exitX)) + pointList2.Add(new Point(exitX, room3.Y + room3.Height - 1)); + foreach (Microsoft.Xna.Framework.Rectangle area in rectangleList1) + { + WorldUtils.Gen(new Point(area.X, area.Y), (GenShape) new Shapes.Rectangle(area.Width, area.Height), Actions.Chain((GenAction) new Actions.SetTile(buildData.Tile), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(new Point(area.X + 1, area.Y + 1), (GenShape) new Shapes.Rectangle(area.Width - 2, area.Height - 2), Actions.Chain((GenAction) new Actions.ClearTile(true), (GenAction) new Actions.PlaceWall(buildData.Wall))); + structures.AddStructure(area, 8); + } + foreach (Tuple tuple in tupleList2) + { + Point origin1 = tuple.Item1; + Point point = tuple.Item2; + int num5 = point.X > origin1.X ? 1 : -1; + ShapeData data = new ShapeData(); + for (int y = 0; y < point.Y - origin1.Y; ++y) + data.Add(num5 * (y + 1), y); + WorldUtils.Gen(origin1, (GenShape) new ModShapes.All(data), Actions.Chain((GenAction) new Actions.PlaceTile((ushort) 19, buildData.PlatformStyle), (GenAction) new Actions.SetSlope(num5 == 1 ? 1 : 2), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(new Point(origin1.X + (num5 == 1 ? 1 : -4), origin1.Y - 1), (GenShape) new Shapes.Rectangle(4, 1), Actions.Chain((GenAction) new Actions.Clear(), (GenAction) new Actions.PlaceWall(buildData.Wall), (GenAction) new Actions.PlaceTile((ushort) 19, buildData.PlatformStyle), (GenAction) new Actions.SetFrames(true))); + } + foreach (Point origin2 in pointList1) + { + WorldUtils.Gen(origin2, (GenShape) new Shapes.Rectangle(1, 3), (GenAction) new Actions.ClearTile(true)); + WorldGen.PlaceTile(origin2.X, origin2.Y, 10, true, true, style: buildData.DoorStyle); + } + foreach (Point origin3 in pointList2) + { + Shapes.Rectangle rectangle = new Shapes.Rectangle(3, 1); + GenAction action = Actions.Chain((GenAction) new Actions.ClearMetadata(), (GenAction) new Actions.PlaceTile((ushort) 19, buildData.PlatformStyle), (GenAction) new Actions.SetFrames(true)); + WorldUtils.Gen(origin3, (GenShape) rectangle, action); + } + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList2) + { + if (rectangle.Height > 1 && GenBase._tiles[rectangle.X, rectangle.Y - 1].type != (ushort) 19) + { + WorldUtils.Gen(new Point(rectangle.X, rectangle.Y), (GenShape) new Shapes.Rectangle(rectangle.Width, rectangle.Height), Actions.Chain((GenAction) new Actions.SetTile((ushort) 124), (GenAction) new Actions.SetFrames(true))); + Tile tile = GenBase._tiles[rectangle.X, rectangle.Y + rectangle.Height]; + tile.slope((byte) 0); + tile.halfBrick(false); + } + } + Point[] pointArray = new Point[7] + { + new Point(14, buildData.TableStyle), + new Point(16, 0), + new Point(18, buildData.WorkbenchStyle), + new Point(86, 0), + new Point(87, buildData.PianoStyle), + new Point(94, 0), + new Point(101, buildData.BookcaseStyle) + }; + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int num6 = rectangle.Width / 8; + int num7 = rectangle.Width / (num6 + 1); + int num8 = GenBase._random.Next(2); + for (int index3 = 0; index3 < num6; ++index3) + { + int num9 = (index3 + 1) * num7 + rectangle.X; + switch (index3 + num8 % 2) + { + case 0: + int num10 = rectangle.Y + Math.Min(rectangle.Height / 2, rectangle.Height - 5); + Vector2 vector2 = WorldGen.randHousePicture(); + int x = (int) vector2.X; + int y = (int) vector2.Y; + if (!WorldGen.nearPicture(num9, num10)) + { + WorldGen.PlaceTile(num9, num10, x, true, style: y); + break; + } + break; + case 1: + int j = rectangle.Y + 1; + WorldGen.PlaceTile(num9, j, 34, true, style: GenBase._random.Next(6)); + for (int index4 = -1; index4 < 2; ++index4) + { + for (int index5 = 0; index5 < 3; ++index5) + GenBase._tiles[index4 + num9, index5 + j].frameX += (short) 54; + } + break; + } + } + int num11 = rectangle.Width / 8 + 3; + WorldGen.SetupStatueList(); + for (; num11 > 0; --num11) + { + int num12 = GenBase._random.Next(rectangle.Width - 3) + 1 + rectangle.X; + int num13 = rectangle.Y + rectangle.Height - 2; + switch (GenBase._random.Next(4)) + { + case 0: + WorldGen.PlaceSmallPile(num12, num13, GenBase._random.Next(31, 34), 1); + break; + case 1: + WorldGen.PlaceTile(num12, num13, 186, true, style: GenBase._random.Next(22, 26)); + break; + case 2: + int index = GenBase._random.Next(2, WorldGen.statueList.Length); + WorldGen.PlaceTile(num12, num13, (int) WorldGen.statueList[index].X, true, style: ((int) WorldGen.statueList[index].Y)); + if (WorldGen.StatuesWithTraps.Contains(index)) + { + WorldGen.PlaceStatueTrap(num12, num13); + break; + } + break; + case 3: + Point point = Utils.SelectRandom(GenBase._random, pointArray); + WorldGen.PlaceTile(num12, num13, point.X, true, style: point.Y); + break; + } + } + } + foreach (Microsoft.Xna.Framework.Rectangle room4 in rectangleList1) + buildData.ProcessRoom(room4); + bool flag1 = false; + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int j = rectangle.Height - 1 + rectangle.Y; + int Style = j > (int) Main.worldSurface ? buildData.ChestStyle : 0; + int num14 = 0; + while (num14 < 10 && !(flag1 = WorldGen.AddBuriedChest(GenBase._random.Next(2, rectangle.Width - 2) + rectangle.X, j, Style: Style))) + ++num14; + if (!flag1) + { + int i = rectangle.X + 2; + while (i <= rectangle.X + rectangle.Width - 2 && !(flag1 = WorldGen.AddBuriedChest(i, j, Style: Style))) + ++i; + if (flag1) + break; + } + else + break; + } + if (!flag1) + { + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int j = rectangle.Y - 1; + int Style = j > (int) Main.worldSurface ? buildData.ChestStyle : 0; + int num15 = 0; + while (num15 < 10 && !(flag1 = WorldGen.AddBuriedChest(GenBase._random.Next(2, rectangle.Width - 2) + rectangle.X, j, Style: Style))) + ++num15; + if (!flag1) + { + int i = rectangle.X + 2; + while (i <= rectangle.X + rectangle.Width - 2 && !(flag1 = WorldGen.AddBuriedChest(i, j, Style: Style))) + ++i; + if (flag1) + break; + } + else + break; + } + } + if (!flag1) + { + for (int index = 0; index < 1000; ++index) + { + int i = GenBase._random.Next(rectangleList1[0].X - 30, rectangleList1[0].X + 30); + int num16 = GenBase._random.Next(rectangleList1[0].Y - 30, rectangleList1[0].Y + 30); + int num17 = num16 > (int) Main.worldSurface ? buildData.ChestStyle : 0; + int j = num16; + int Style = num17; + if (WorldGen.AddBuriedChest(i, j, Style: Style)) + break; + } + } + if (buildData == CaveHouseBiome.BuildData.Jungle && this._sharpenerCount < GenBase._random.Next(2, 5)) + { + bool flag2 = false; + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int j = rectangle.Height - 2 + rectangle.Y; + for (int index = 0; index < 10; ++index) + { + int i = GenBase._random.Next(2, rectangle.Width - 2) + rectangle.X; + WorldGen.PlaceTile(i, j, 377, true, true); + if (flag2 = GenBase._tiles[i, j].active() && GenBase._tiles[i, j].type == (ushort) 377) + break; + } + if (!flag2) + { + int i = rectangle.X + 2; + while (i <= rectangle.X + rectangle.Width - 2 && !(flag2 = WorldGen.PlaceTile(i, j, 377, true, true))) + ++i; + if (flag2) + break; + } + else + break; + } + if (flag2) + ++this._sharpenerCount; + } + if (buildData == CaveHouseBiome.BuildData.Desert && this._extractinatorCount < GenBase._random.Next(2, 5)) + { + bool flag3 = false; + foreach (Microsoft.Xna.Framework.Rectangle rectangle in rectangleList1) + { + int j = rectangle.Height - 2 + rectangle.Y; + for (int index = 0; index < 10; ++index) + { + int i = GenBase._random.Next(2, rectangle.Width - 2) + rectangle.X; + WorldGen.PlaceTile(i, j, 219, true, true); + if (flag3 = GenBase._tiles[i, j].active() && GenBase._tiles[i, j].type == (ushort) 219) + break; + } + if (!flag3) + { + int i = rectangle.X + 2; + while (i <= rectangle.X + rectangle.Width - 2 && !(flag3 = WorldGen.PlaceTile(i, j, 219, true, true))) + ++i; + if (flag3) + break; + } + else + break; + } + if (flag3) + ++this._extractinatorCount; + } + return true; + } + + public override void Reset() + { + this._sharpenerCount = 0; + this._extractinatorCount = 0; + } + + internal static void AgeDefaultRoom(Microsoft.Xna.Framework.Rectangle room) + { + for (int index = 0; index < room.Width * room.Height / 16; ++index) + WorldUtils.Gen(new Point(GenBase._random.Next(1, room.Width - 1) + room.X, GenBase._random.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 byte[1] + { + CaveHouseBiome.BuildData.Default.Wall + }), (double) room.Y > Main.worldSurface ? (GenAction) new Actions.ClearWall(true) : (GenAction) new Actions.PlaceWall((byte) 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))); + } + + internal static void AgeSnowRoom(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] + { + CaveHouseBiome.BuildData.Snow.Tile + }), (GenAction) new Actions.SetTile((ushort) 161, true), (GenAction) new Modifiers.Dither(0.8), (GenAction) new Actions.SetTile((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), (double) room.Y > Main.worldSurface ? (GenAction) new Actions.ClearWall(true) : (GenAction) new Actions.PlaceWall((byte) 40))); + } + + internal static void AgeDesertRoom(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] + { + CaveHouseBiome.BuildData.Desert.Tile + }), (GenAction) new Actions.SetTile((ushort) 396, true), (GenAction) new Modifiers.Dither(), (GenAction) new Actions.SetTile((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 byte[1] + { + CaveHouseBiome.BuildData.Desert.Wall + }), (GenAction) new Actions.PlaceWall((byte) 216))); + } + + internal static void AgeGraniteRoom(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] + { + CaveHouseBiome.BuildData.Granite.Tile + }), (GenAction) new Actions.SetTile((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((byte) 180))); + } + + internal static void AgeMarbleRoom(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] + { + CaveHouseBiome.BuildData.Marble.Tile + }), (GenAction) new Actions.SetTile((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((byte) 178))); + } + + internal static void AgeMushroomRoom(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] + { + CaveHouseBiome.BuildData.Mushroom.Tile + }), (GenAction) new Actions.SetTile((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 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 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())); + } + + internal static void AgeJungleRoom(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] + { + CaveHouseBiome.BuildData.Jungle.Tile + }), (GenAction) new Actions.SetTile((ushort) 60, true), (GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Actions.SetTile((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 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 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((byte) 64))); + } + + private class BuildData + { + public static CaveHouseBiome.BuildData Snow = CaveHouseBiome.BuildData.CreateSnowData(); + public static CaveHouseBiome.BuildData Jungle = CaveHouseBiome.BuildData.CreateJungleData(); + public static CaveHouseBiome.BuildData Default = CaveHouseBiome.BuildData.CreateDefaultData(); + public static CaveHouseBiome.BuildData Granite = CaveHouseBiome.BuildData.CreateGraniteData(); + public static CaveHouseBiome.BuildData Marble = CaveHouseBiome.BuildData.CreateMarbleData(); + public static CaveHouseBiome.BuildData Mushroom = CaveHouseBiome.BuildData.CreateMushroomData(); + public static CaveHouseBiome.BuildData Desert = CaveHouseBiome.BuildData.CreateDesertData(); + public ushort Tile; + public byte Wall; + public int PlatformStyle; + public int DoorStyle; + public int TableStyle; + public int WorkbenchStyle; + public int PianoStyle; + public int BookcaseStyle; + public int ChairStyle; + public int ChestStyle; + public CaveHouseBiome.BuildData.ProcessRoomMethod ProcessRoom; + + public static CaveHouseBiome.BuildData CreateSnowData() => new CaveHouseBiome.BuildData() + { + Tile = 321, + Wall = 149, + DoorStyle = 30, + PlatformStyle = 19, + TableStyle = 28, + WorkbenchStyle = 23, + PianoStyle = 23, + BookcaseStyle = 25, + ChairStyle = 30, + ChestStyle = 11, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeSnowRoom) + }; + + public static CaveHouseBiome.BuildData CreateDesertData() => new CaveHouseBiome.BuildData() + { + Tile = 396, + Wall = 187, + PlatformStyle = 0, + DoorStyle = 0, + TableStyle = 0, + WorkbenchStyle = 0, + PianoStyle = 0, + BookcaseStyle = 0, + ChairStyle = 0, + ChestStyle = 1, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeDesertRoom) + }; + + public static CaveHouseBiome.BuildData CreateJungleData() => new CaveHouseBiome.BuildData() + { + Tile = 158, + Wall = 42, + PlatformStyle = 2, + DoorStyle = 2, + TableStyle = 2, + WorkbenchStyle = 2, + PianoStyle = 2, + BookcaseStyle = 12, + ChairStyle = 3, + ChestStyle = 8, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeJungleRoom) + }; + + public static CaveHouseBiome.BuildData CreateGraniteData() => new CaveHouseBiome.BuildData() + { + Tile = 369, + Wall = 181, + PlatformStyle = 28, + DoorStyle = 34, + TableStyle = 33, + WorkbenchStyle = 29, + PianoStyle = 28, + BookcaseStyle = 30, + ChairStyle = 34, + ChestStyle = 50, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeGraniteRoom) + }; + + public static CaveHouseBiome.BuildData CreateMarbleData() => new CaveHouseBiome.BuildData() + { + Tile = 357, + Wall = 179, + PlatformStyle = 29, + DoorStyle = 35, + TableStyle = 34, + WorkbenchStyle = 30, + PianoStyle = 29, + BookcaseStyle = 31, + ChairStyle = 35, + ChestStyle = 51, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeMarbleRoom) + }; + + public static CaveHouseBiome.BuildData CreateMushroomData() => new CaveHouseBiome.BuildData() + { + Tile = 190, + Wall = 74, + PlatformStyle = 18, + DoorStyle = 6, + TableStyle = 27, + WorkbenchStyle = 7, + PianoStyle = 22, + BookcaseStyle = 24, + ChairStyle = 9, + ChestStyle = 32, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeMushroomRoom) + }; + + public static CaveHouseBiome.BuildData CreateDefaultData() => new CaveHouseBiome.BuildData() + { + Tile = 30, + Wall = 27, + PlatformStyle = 0, + DoorStyle = 0, + TableStyle = 0, + WorkbenchStyle = 0, + PianoStyle = 0, + BookcaseStyle = 0, + ChairStyle = 0, + ChestStyle = 1, + ProcessRoom = new CaveHouseBiome.BuildData.ProcessRoomMethod(CaveHouseBiome.AgeDefaultRoom) + }; + + public delegate void ProcessRoomMethod(Microsoft.Xna.Framework.Rectangle room); + } + } +} diff --git a/GameContent/Biomes/CorruptionPitBiome.cs b/GameContent/Biomes/CorruptionPitBiome.cs new file mode 100644 index 0000000..30cd911 --- /dev/null +++ b/GameContent/Biomes/CorruptionPitBiome.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CorruptionPitBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.World.Generation; + +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 == (byte) 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((byte) 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((byte) 69)); + structures.AddStructure(bounds, 2); + return true; + } + } +} diff --git a/GameContent/Biomes/DesertBiome.cs b/GameContent/Biomes/DesertBiome.cs new file mode 100644 index 0000000..1fe4ed3 --- /dev/null +++ b/GameContent/Biomes/DesertBiome.cs @@ -0,0 +1,460 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.DesertBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class DesertBiome : MicroBiome + { + private void PlaceSand(DesertBiome.ClusterGroup clusters, Point start, Vector2 scale) + { + int num1 = (int) ((double) scale.X * (double) clusters.Width); + int num2 = (int) ((double) scale.Y * (double) clusters.Height); + int num3 = 5; + int val1 = start.Y + (num2 >> 1); + float num4 = 0.0f; + short[] numArray = new short[num1 + num3 * 2]; + for (int index = -num3; index < num1 + num3; ++index) + { + for (int y = 150; y < val1; ++y) + { + if (WorldGen.SolidOrSlopedTile(index + start.X, y)) + { + num4 += (float) (y - 1); + numArray[index + num3] = (short) (y - 1); + break; + } + } + } + float num5 = num4 / (float) (num1 + num3 * 2); + int num6 = 0; + for (int index1 = -num3; index1 < num1 + num3; ++index1) + { + float num7 = MathHelper.Clamp((float) ((double) Math.Abs((float) (index1 + num3) / (float) (num1 + num3 * 2)) * 2.0 - 1.0), -1f, 1f); + if (index1 % 3 == 0) + num6 = Utils.Clamp(num6 + GenBase._random.Next(-1, 2), -10, 10); + float num8 = (float) Math.Sqrt(1.0 - (double) num7 * (double) num7 * (double) num7 * (double) num7); + int val2_1 = val1 - (int) ((double) num8 * (double) ((float) val1 - num5)) + num6; + int val2_2 = val1 - (int) ((double) ((float) val1 - num5) * ((double) num8 - 0.150000005960464 / Math.Sqrt(Math.Max(0.01, (double) Math.Abs(8f * num7) - 0.1)) + 0.25)); + int num9 = Math.Min(val1, val2_2); + if ((double) Math.Abs(num7) < 0.800000011920929) + { + float num10 = Utils.SmoothStep(0.5f, 0.8f, Math.Abs(num7)); + float num11 = num10 * num10 * num10; + int num12 = Math.Min(10 + (int) ((double) num5 - (double) num11 * 20.0) + num6, val2_1); + int num13 = 50; + for (int index2 = num13; (double) index2 < (double) num5; ++index2) + { + int index3 = index1 + start.X; + if (GenBase._tiles[index3, index2].active() && (GenBase._tiles[index3, index2].type == (ushort) 189 || GenBase._tiles[index3, index2].type == (ushort) 196)) + num13 = index2 + 5; + } + for (int index4 = num13; index4 < num12; ++index4) + { + int index5 = index1 + start.X; + int index6 = index4; + GenBase._tiles[index5, index6].active(false); + GenBase._tiles[index5, index6].wall = (byte) 0; + } + numArray[index1 + num3] = (short) num12; + } + for (int index7 = val1 - 1; index7 >= val2_1; --index7) + { + int i = index1 + start.X; + int j = index7; + Tile tile1 = GenBase._tiles[i, j]; + tile1.liquid = (byte) 0; + Tile tile2 = GenBase._tiles[i, j + 1]; + Tile tile3 = GenBase._tiles[i, j + 2]; + tile1.type = !WorldGen.SolidTile(tile2) || !WorldGen.SolidTile(tile3) ? (ushort) 397 : (ushort) 53; + if (index7 > val2_1 + 5) + tile1.wall = (byte) 187; + tile1.active(true); + if (tile1.wall != (byte) 187) + tile1.wall = (byte) 0; + if (index7 < num9) + { + if (index7 > val2_1 + 5) + tile1.wall = (byte) 187; + tile1.active(false); + } + WorldGen.SquareWallFrame(i, j); + } + } + } + + private void PlaceClusters(DesertBiome.ClusterGroup clusters, Point start, Vector2 scale) + { + int num1 = (int) ((double) scale.X * (double) clusters.Width); + int num2 = (int) ((double) scale.Y * (double) clusters.Height); + Vector2 vector2_1 = new Vector2((float) num1, (float) num2); + Vector2 vector2_2 = new Vector2((float) clusters.Width, (float) clusters.Height); + for (int index1 = -20; index1 < num1 + 20; ++index1) + { + for (int index2 = -20; index2 < num2 + 20; ++index2) + { + float num3 = 0.0f; + int num4 = -1; + float num5 = 0.0f; + int x = index1 + start.X; + int y = index2 + start.Y; + Vector2 vector2_3 = new Vector2((float) index1, (float) index2) / vector2_1 * vector2_2; + float num6 = (new Vector2((float) index1, (float) index2) / vector2_1 * 2f - Vector2.One).Length(); + for (int index3 = 0; index3 < clusters.Count; ++index3) + { + DesertBiome.Cluster cluster = clusters[index3]; + if ((double) Math.Abs(cluster[0].Position.X - vector2_3.X) <= 10.0 && (double) Math.Abs(cluster[0].Position.Y - vector2_3.Y) <= 10.0) + { + float num7 = 0.0f; + foreach (DesertBiome.Hub hub in (List) cluster) + num7 += 1f / Vector2.DistanceSquared(hub.Position, vector2_3); + if ((double) num7 > (double) num3) + { + if ((double) num3 > (double) num5) + num5 = num3; + num3 = num7; + num4 = index3; + } + else if ((double) num7 > (double) num5) + num5 = num7; + } + } + float num8 = num3 + num5; + Tile tile = GenBase._tiles[x, y]; + bool flag = (double) num6 >= 0.800000011920929; + if ((double) num8 > 3.5) + { + tile.ClearEverything(); + tile.wall = (byte) 187; + tile.liquid = (byte) 0; + if (num4 % 15 == 2) + { + tile.ResetToType((ushort) 404); + tile.wall = (byte) 187; + tile.active(true); + } + Tile.SmoothSlope(x, y); + } + else if ((double) num8 > 1.79999995231628) + { + tile.wall = (byte) 187; + if (!flag || tile.active()) + { + tile.ResetToType((ushort) 396); + tile.wall = (byte) 187; + tile.active(true); + Tile.SmoothSlope(x, y); + } + tile.liquid = (byte) 0; + } + else if ((double) num8 > 0.699999988079071 || !flag) + { + if (!flag || tile.active()) + { + tile.ResetToType((ushort) 397); + tile.active(true); + Tile.SmoothSlope(x, y); + } + tile.liquid = (byte) 0; + tile.wall = (byte) 216; + } + else if ((double) num8 > 0.25) + { + float num9 = (float) (((double) num8 - 0.25) / 0.449999988079071); + if ((double) GenBase._random.NextFloat() < (double) num9) + { + if (tile.active()) + { + tile.ResetToType((ushort) 397); + tile.active(true); + Tile.SmoothSlope(x, y); + tile.wall = (byte) 216; + } + tile.liquid = (byte) 0; + tile.wall = (byte) 187; + } + } + } + } + } + + private void AddTileVariance(DesertBiome.ClusterGroup clusters, Point start, Vector2 scale) + { + int num1 = (int) ((double) scale.X * (double) clusters.Width); + int num2 = (int) ((double) scale.Y * (double) clusters.Height); + for (int index1 = -20; index1 < num1 + 20; ++index1) + { + for (int index2 = -20; index2 < num2 + 20; ++index2) + { + int index3 = index1 + start.X; + int index4 = index2 + start.Y; + Tile tile1 = GenBase._tiles[index3, index4]; + Tile tile2 = GenBase._tiles[index3, index4 + 1]; + Tile tile3 = GenBase._tiles[index3, index4 + 2]; + if (tile1.type == (ushort) 53 && (!WorldGen.SolidTile(tile2) || !WorldGen.SolidTile(tile3))) + tile1.type = (ushort) 397; + } + } + for (int index5 = -20; index5 < num1 + 20; ++index5) + { + for (int index6 = -20; index6 < num2 + 20; ++index6) + { + int i = index5 + start.X; + int index7 = index6 + start.Y; + Tile tile = GenBase._tiles[i, index7]; + if (tile.active() && tile.type == (ushort) 396) + { + bool flag1 = true; + for (int index8 = -1; index8 >= -3; --index8) + { + if (GenBase._tiles[i, index7 + index8].active()) + { + flag1 = false; + break; + } + } + bool flag2 = true; + for (int index9 = 1; index9 <= 3; ++index9) + { + if (GenBase._tiles[i, index7 + index9].active()) + { + flag2 = false; + break; + } + } + if (flag1 ^ flag2 && GenBase._random.Next(5) == 0) + WorldGen.PlaceTile(i, index7 + (flag1 ? -1 : 1), 165, true, true); + else if (flag1 && GenBase._random.Next(5) == 0) + WorldGen.PlaceTile(i, index7 - 1, 187, true, true, style: (29 + GenBase._random.Next(6))); + } + } + } + } + + private bool FindStart( + Point origin, + Vector2 scale, + int xHubCount, + int yHubCount, + out Point start) + { + start = new Point(0, 0); + int width = (int) ((double) scale.X * (double) xHubCount); + int height = (int) ((double) scale.Y * (double) yHubCount); + origin.X -= width >> 1; + int y = 220; +label_10: + for (int index = -20; index < width + 20; ++index) + { + for (int j = 220; j < Main.maxTilesY; ++j) + { + if (WorldGen.SolidTile(index + origin.X, j)) + { + switch (GenBase._tiles[index + origin.X, j].type) + { + case 59: + case 60: + return false; + default: + if (j > y) + { + y = j; + goto label_10; + } + else + goto label_10; + } + } + } + } + WorldGen.UndergroundDesertLocation = new Microsoft.Xna.Framework.Rectangle(origin.X, y, width, height); + start = new Point(origin.X, y); + return true; + } + + public override bool Place(Point origin, StructureMap structures) + { + float num1 = (float) Main.maxTilesX / 4200f; + int num2 = (int) (80.0 * (double) num1); + int num3 = (int) (((double) GenBase._random.NextFloat() + 1.0) * 80.0 * (double) num1); + Vector2 scale = new Vector2(4f, 2f); + Point start; + if (!this.FindStart(origin, scale, num2, num3, out start)) + return false; + DesertBiome.ClusterGroup clusters = new DesertBiome.ClusterGroup(); + clusters.Generate(num2, num3); + this.PlaceSand(clusters, start, scale); + this.PlaceClusters(clusters, start, scale); + this.AddTileVariance(clusters, start, scale); + int num4 = (int) ((double) scale.X * (double) clusters.Width); + int num5 = (int) ((double) scale.Y * (double) clusters.Height); + for (int index1 = -20; index1 < num4 + 20; ++index1) + { + for (int index2 = -20; index2 < num5 + 20; ++index2) + { + if (index1 + start.X > 0 && index1 + start.X < Main.maxTilesX - 1 && index2 + start.Y > 0 && index2 + start.Y < Main.maxTilesY - 1) + { + WorldGen.SquareWallFrame(index1 + start.X, index2 + start.Y); + WorldUtils.TileFrame(index1 + start.X, index2 + start.Y, true); + } + } + } + return true; + } + + private struct Hub + { + public Vector2 Position; + + public Hub(Vector2 position) => this.Position = position; + + public Hub(float x, float y) => this.Position = new Vector2(x, y); + } + + private class Cluster : List + { + } + + private class ClusterGroup : List + { + public int Width; + public int Height; + + private void SearchForCluster( + bool[,] hubMap, + List pointCluster, + int x, + int y, + int level = 2) + { + pointCluster.Add(new Point(x, y)); + hubMap[x, y] = false; + --level; + if (level == -1) + return; + if (x > 0 && hubMap[x - 1, y]) + this.SearchForCluster(hubMap, pointCluster, x - 1, y, level); + if (x < hubMap.GetLength(0) - 1 && hubMap[x + 1, y]) + this.SearchForCluster(hubMap, pointCluster, x + 1, y, level); + if (y > 0 && hubMap[x, y - 1]) + this.SearchForCluster(hubMap, pointCluster, x, y - 1, level); + if (y >= hubMap.GetLength(1) - 1 || !hubMap[x, y + 1]) + return; + this.SearchForCluster(hubMap, pointCluster, x, y + 1, level); + } + + private 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; + } + + public void Generate(int width, int height) + { + this.Width = width; + this.Height = height; + this.Clear(); + bool[,] hubMap = new bool[width, height]; + int num1 = (width >> 1) - 1; + int y1 = (height >> 1) - 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) + hubMap[index2, index1] = WorldGen.genRand.Next(2) == 0; + } + List> pointClusters = new List>(); + for (int x = 0; x < hubMap.GetLength(0); ++x) + { + for (int y2 = 0; y2 < hubMap.GetLength(1); ++y2) + { + if (hubMap[x, y2] && WorldGen.genRand.Next(2) == 0) + { + List pointCluster = new List(); + this.SearchForCluster(hubMap, pointCluster, x, y2); + if (pointCluster.Count > 2) + pointClusters.Add(pointCluster); + } + } + } + int[,] clusterIndexMap = new int[hubMap.GetLength(0), hubMap.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) + this.AttemptClaim(x - 1, y3, clusterIndexMap, pointClusters, index6); + if (x < clusterIndexMap.GetLength(0) - 1) + this.AttemptClaim(x + 1, y3, clusterIndexMap, pointClusters, index6); + if (y3 > 0) + this.AttemptClaim(x, y3 - 1, clusterIndexMap, pointClusters, index6); + if (y3 < clusterIndexMap.GetLength(1) - 1) + this.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) + { + DesertBiome.Cluster cluster = new DesertBiome.Cluster(); + if (pointList.Count > 0) + { + foreach (Point point4 in pointList) + cluster.Add(new DesertBiome.Hub((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); + } + } + } + } + } +} diff --git a/GameContent/Biomes/EnchantedSwordBiome.cs b/GameContent/Biomes/EnchantedSwordBiome.cs new file mode 100644 index 0000000..a60b082 --- /dev/null +++ b/GameContent/Biomes/EnchantedSwordBiome.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.EnchantedSwordBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class EnchantedSwordBiome : 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[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); + 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)) || !structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X, result.Y + 10, 1, origin.Y - result.Y - 9), 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((byte) 68), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 2 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionVines(3, 5))); + 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), 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 (GenBase._random.Next(3) == 0) + 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.AddStructure(new Microsoft.Xna.Framework.Rectangle(point1.X - (int) (20.0 * (double) xScale), point1.Y - 20, (int) (40.0 * (double) xScale), 40), 4); + return true; + } + } +} diff --git a/GameContent/Biomes/GraniteBiome.cs b/GameContent/Biomes/GraniteBiome.cs new file mode 100644 index 0000000..d7aefba --- /dev/null +++ b/GameContent/Biomes/GraniteBiome.cs @@ -0,0 +1,228 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.GraniteBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class GraniteBiome : MicroBiome + { + private const int MAX_MAGMA_ITERATIONS = 300; + private static GraniteBiome.Magma[,] _sourceMagmaMap = new GraniteBiome.Magma[200, 200]; + private static GraniteBiome.Magma[,] _targetMagmaMap = new GraniteBiome.Magma[200, 200]; + + public override bool Place(Point origin, StructureMap structures) + { + if (GenBase._tiles[origin.X, origin.Y].active()) + return false; + int length1 = GraniteBiome._sourceMagmaMap.GetLength(0); + int length2 = GraniteBiome._sourceMagmaMap.GetLength(1); + int index1 = length1 / 2; + int index2 = length2 / 2; + origin.X -= index1; + origin.Y -= index2; + for (int index3 = 0; index3 < length1; ++index3) + { + for (int index4 = 0; index4 < length2; ++index4) + { + int i = index3 + origin.X; + int j = index4 + origin.Y; + GraniteBiome._sourceMagmaMap[index3, index4] = GraniteBiome.Magma.CreateEmpty(WorldGen.SolidTile(i, j) ? 4f : 1f); + GraniteBiome._targetMagmaMap[index3, index4] = GraniteBiome._sourceMagmaMap[index3, index4]; + } + } + int max1 = index1; + int min1 = index1; + int max2 = index2; + int min2 = index2; + for (int index5 = 0; index5 < 300; ++index5) + { + for (int index6 = max1; index6 <= min1; ++index6) + { + for (int index7 = max2; index7 <= min2; ++index7) + { + GraniteBiome.Magma sourceMagma1 = GraniteBiome._sourceMagmaMap[index6, index7]; + if (sourceMagma1.IsActive) + { + float num1 = 0.0f; + Vector2 zero = Vector2.Zero; + for (int index8 = -1; index8 <= 1; ++index8) + { + for (int index9 = -1; index9 <= 1; ++index9) + { + if (index8 != 0 || index9 != 0) + { + Vector2 vector2 = new Vector2((float) index8, (float) index9); + vector2.Normalize(); + GraniteBiome.Magma sourceMagma2 = GraniteBiome._sourceMagmaMap[index6 + index8, index7 + index9]; + if ((double) sourceMagma1.Pressure > 0.00999999977648258 && !sourceMagma2.IsActive) + { + if (index8 == -1) + max1 = Utils.Clamp(index6 + index8, 1, max1); + else + min1 = Utils.Clamp(index6 + index8, min1, length1 - 2); + if (index9 == -1) + max2 = Utils.Clamp(index7 + index9, 1, max2); + else + min2 = Utils.Clamp(index7 + index9, min2, length2 - 2); + GraniteBiome._targetMagmaMap[index6 + index8, index7 + index9] = sourceMagma2.ToFlow(); + } + float pressure = sourceMagma2.Pressure; + num1 += pressure; + zero += pressure * vector2; + } + } + } + float num2 = num1 / 8f; + if ((double) num2 > (double) sourceMagma1.Resistance) + { + float num3 = zero.Length() / 8f; + float pressure = Math.Max(0.0f, (float) ((double) Math.Max(num2 - num3 - sourceMagma1.Pressure, 0.0f) + (double) num3 + (double) sourceMagma1.Pressure * 0.875) - sourceMagma1.Resistance); + GraniteBiome._targetMagmaMap[index6, index7] = GraniteBiome.Magma.CreateFlow(pressure, Math.Max(0.0f, sourceMagma1.Resistance - pressure * 0.02f)); + } + } + } + } + if (index5 < 2) + GraniteBiome._targetMagmaMap[index1, index2] = GraniteBiome.Magma.CreateFlow(25f); + Utils.Swap(ref GraniteBiome._sourceMagmaMap, ref GraniteBiome._targetMagmaMap); + } + bool flag1 = origin.Y + index2 > WorldGen.lavaLine - 30; + bool flag2 = false; + for (int index10 = -50; index10 < 50 && !flag2; ++index10) + { + for (int index11 = -50; index11 < 50 && !flag2; ++index11) + { + if (GenBase._tiles[origin.X + index1 + index10, origin.Y + index2 + index11].active()) + { + switch (GenBase._tiles[origin.X + index1 + index10, origin.Y + index2 + index11].type) + { + case 147: + case 161: + case 162: + case 163: + case 200: + flag1 = false; + flag2 = true; + continue; + default: + continue; + } + } + } + } + for (int index12 = max1; index12 <= min1; ++index12) + { + for (int index13 = max2; index13 <= min2; ++index13) + { + GraniteBiome.Magma sourceMagma = GraniteBiome._sourceMagmaMap[index12, index13]; + if (sourceMagma.IsActive) + { + Tile tile = GenBase._tiles[origin.X + index12, origin.Y + index13]; + if ((double) Math.Max(1f - Math.Max(0.0f, (float) (Math.Sin((double) (origin.Y + index13) * 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(origin.X + index12, origin.Y + index13) ? 0.0 : 0.5)) + { + if (TileID.Sets.Ore[(int) tile.type]) + tile.ResetToType(tile.type); + else + tile.ResetToType((ushort) 368); + tile.wall = (byte) 180; + } + else if ((double) sourceMagma.Resistance < 0.00999999977648258) + { + WorldUtils.ClearTile(origin.X + index12, origin.Y + index13); + tile.wall = (byte) 180; + } + if (tile.liquid > (byte) 0 & flag1) + tile.liquidType(1); + } + } + } + List point16List = new List(); + for (int index14 = max1; index14 <= min1; ++index14) + { + for (int index15 = max2; index15 <= min2; ++index15) + { + if (GraniteBiome._sourceMagmaMap[index14, index15].IsActive) + { + int num4 = 0; + int num5 = index14 + origin.X; + int num6 = index15 + origin.Y; + if (WorldGen.SolidTile(num5, num6)) + { + for (int index16 = -1; index16 <= 1; ++index16) + { + for (int index17 = -1; index17 <= 1; ++index17) + { + if (WorldGen.SolidTile(num5 + index16, num6 + index17)) + ++num4; + } + } + if (num4 < 3) + point16List.Add(new Point16(num5, num6)); + } + } + } + } + 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 = (byte) 180; + } + point16List.Clear(); + for (int index18 = max1; index18 <= min1; ++index18) + { + for (int index19 = max2; index19 <= min2; ++index19) + { + GraniteBiome.Magma sourceMagma = GraniteBiome._sourceMagmaMap[index18, index19]; + int index20 = index18 + origin.X; + int index21 = index19 + origin.Y; + if (sourceMagma.IsActive) + { + WorldUtils.TileFrame(index20, index21); + WorldGen.SquareWallFrame(index20, index21); + if (GenBase._random.Next(8) == 0 && GenBase._tiles[index20, index21].active()) + { + if (!GenBase._tiles[index20, index21 + 1].active()) + WorldGen.PlaceTight(index20, index21 + 1); + if (!GenBase._tiles[index20, index21 - 1].active()) + WorldGen.PlaceTight(index20, index21 - 1); + } + if (GenBase._random.Next(2) == 0) + Tile.SmoothSlope(index20, index21); + } + } + } + return true; + } + + 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..3b2f2a6 --- /dev/null +++ b/GameContent/Biomes/HiveBiome.cs @@ -0,0 +1,161 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.HiveBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class HiveBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + Ref count1 = new Ref(0); + Ref count2 = new Ref(0); + Ref count3 = new Ref(0); + Ref count4 = new Ref(0); + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(15), Actions.Chain((GenAction) new Actions.Scanner(count3), (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(count4))); + if ((double) count2.Value / (double) count1.Value < 0.75 || count4.Value < 2 || !structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X - 50, origin.Y - 50, 100, 100))) + return false; + int x1 = origin.X; + int y1 = origin.Y; + int num1 = 150; + for (int index1 = x1 - num1; index1 < x1 + num1; index1 += 10) + { + if (index1 > 0 && index1 <= Main.maxTilesX - 1) + { + for (int index2 = y1 - num1; index2 < y1 + num1; 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 == (byte) 87 || Main.tile[index1, index2].wall == (byte) 3 || Main.tile[index1, index2].wall == (byte) 83)) + return false; + } + } + } + int x2 = origin.X; + int y2 = origin.Y; + int index3 = 0; + int[] numArray1 = new int[10]; + int[] numArray2 = new int[10]; + Vector2 vector2_1 = new Vector2((float) x2, (float) y2); + Vector2 vector2_2 = vector2_1; + int num2 = WorldGen.genRand.Next(2, 5); + for (int index4 = 0; index4 < num2; ++index4) + { + int num3 = WorldGen.genRand.Next(2, 5); + for (int index5 = 0; index5 < num3; ++index5) + vector2_2 = WorldGen.Hive((int) vector2_1.X, (int) vector2_1.Y); + vector2_1 = vector2_2; + numArray1[index3] = (int) vector2_1.X; + numArray2[index3] = (int) vector2_1.Y; + ++index3; + } + for (int index6 = 0; index6 < index3; ++index6) + { + int index7 = numArray1[index6]; + int index8 = numArray2[index6]; + bool flag = false; + int num4 = 1; + if (WorldGen.genRand.Next(2) == 0) + num4 = -1; + while (index7 > 10 && index7 < Main.maxTilesX - 10 && index8 > 10 && index8 < Main.maxTilesY - 10 && (!Main.tile[index7, index8].active() || !Main.tile[index7, index8 + 1].active() || !Main.tile[index7 + 1, index8].active() || !Main.tile[index7 + 1, index8 + 1].active())) + { + index7 += num4; + if (Math.Abs(index7 - numArray1[index6]) > 50) + { + flag = true; + break; + } + } + if (!flag) + { + int i = index7 + num4; + for (int index9 = i - 1; index9 <= i + 2; ++index9) + { + for (int index10 = index8 - 1; index10 <= index8 + 2; ++index10) + { + if (index9 < 10 || index9 > Main.maxTilesX - 10) + flag = true; + else if (Main.tile[index9, index10].active() && Main.tile[index9, index10].type != (ushort) 225) + { + flag = true; + break; + } + } + } + if (!flag) + { + for (int index11 = i - 1; index11 <= i + 2; ++index11) + { + for (int index12 = index8 - 1; index12 <= index8 + 2; ++index12) + { + if (index11 >= i && index11 <= i + 1 && index12 >= index8 && index12 <= index8 + 1) + { + Main.tile[index11, index12].active(false); + Main.tile[index11, index12].liquid = byte.MaxValue; + Main.tile[index11, index12].honey(true); + } + else + { + Main.tile[index11, index12].active(true); + Main.tile[index11, index12].type = (ushort) 225; + } + } + } + int num5 = num4 * -1; + int j = index8 + 1; + int num6 = 0; + while ((num6 < 4 || WorldGen.SolidTile(i, j)) && i > 10 && i < Main.maxTilesX - 10) + { + ++num6; + i += num5; + if (WorldGen.SolidTile(i, j)) + { + WorldGen.PoundTile(i, j); + if (!Main.tile[i, j + 1].active()) + { + Main.tile[i, j + 1].active(true); + Main.tile[i, j + 1].type = (ushort) 225; + } + } + } + } + } + } + WorldGen.larvaX[WorldGen.numLarva] = Utils.Clamp((int) vector2_1.X, 5, Main.maxTilesX - 5); + WorldGen.larvaY[WorldGen.numLarva] = Utils.Clamp((int) vector2_1.Y, 5, Main.maxTilesY - 5); + ++WorldGen.numLarva; + int x3 = (int) vector2_1.X; + int y3 = (int) vector2_1.Y; + for (int index13 = x3 - 1; index13 <= x3 + 1 && index13 > 0 && index13 < Main.maxTilesX; ++index13) + { + for (int index14 = y3 - 2; index14 <= y3 + 1 && index14 > 0 && index14 < Main.maxTilesY; ++index14) + { + if (index14 != y3 + 1) + { + Main.tile[index13, index14].active(false); + } + else + { + Main.tile[index13, index14].active(true); + Main.tile[index13, index14].type = (ushort) 225; + Main.tile[index13, index14].slope((byte) 0); + Main.tile[index13, index14].halfBrick(false); + } + } + } + structures.AddStructure(new Microsoft.Xna.Framework.Rectangle(origin.X - 50, origin.Y - 50, 100, 100), 5); + return true; + } + } +} diff --git a/GameContent/Biomes/HoneyPatchBiome.cs b/GameContent/Biomes/HoneyPatchBiome.cs new file mode 100644 index 0000000..9c80038 --- /dev/null +++ b/GameContent/Biomes/HoneyPatchBiome.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.HoneyPatchBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.World.Generation; + +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.AddStructure(new Microsoft.Xna.Framework.Rectangle(result.X - 8, result.Y - 8, 16, 16)); + return true; + } + } +} diff --git a/GameContent/Biomes/MahoganyTreeBiome.cs b/GameContent/Biomes/MahoganyTreeBiome.cs new file mode 100644 index 0000000..40b331e --- /dev/null +++ b/GameContent/Biomes/MahoganyTreeBiome.cs @@ -0,0 +1,92 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MahoganyTreeBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +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; + 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((byte) 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((byte) 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 byte[1] + { + (byte) 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.AddStructure(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..a409544 --- /dev/null +++ b/GameContent/Biomes/MarbleBiome.cs @@ -0,0 +1,193 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MarbleBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +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) + { + for (int x = 0; x < scale; ++x) + { + for (int y = 0; y < scale; ++y) + { + Tile tile = GenBase._tiles[originX + x, originY + y]; + if (TileID.Sets.Ore[(int) tile.type]) + tile.ResetToType(tile.type); + else + tile.ResetToType((ushort) 367); + bool active = slab.State(x, y, scale); + tile.active(active); + if (slab.HasWall) + tile.wall = (byte) 178; + 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 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 (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) + { + float num4 = (float) ((double) (index1 - num1 / 2) / (double) num1 + 0.5); + int num5 = (int) ((0.5 - (double) Math.Abs(num4 - 0.5f)) * 5.0) - 2; + for (int index2 = -1; index2 < num2 + 1; ++index2) + { + bool hasWall = true; + bool flag1 = false; + bool flag2 = this.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 ((double) Math.Abs(num4 - 0.5f) > 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); + } + return true; + } + + private delegate bool SlabState(int x, int y, int scale); + + private 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..a0122ea --- /dev/null +++ b/GameContent/Biomes/MiningExplosivesBiome.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MiningExplosivesBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +namespace Terraria.GameContent.Biomes +{ + public class MiningExplosivesBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + if (WorldGen.SolidTile(origin.X, origin.Y)) + 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.AddStructure(area, 5); + return true; + } + } +} diff --git a/GameContent/Biomes/ThinIceBiome.cs b/GameContent/Biomes/ThinIceBiome.cs new file mode 100644 index 0000000..c3df1c7 --- /dev/null +++ b/GameContent/Biomes/ThinIceBiome.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.ThinIceBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +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[4] + { + (ushort) 0, + (ushort) 59, + (ushort) 147, + (ushort) 1 + }).Output(resultsOutput)); + int num1 = resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1]; + int num2 = resultsOutput[(ushort) 59]; + int num3 = resultsOutput[(ushort) 147]; + if (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; + } + return true; + } + } +} diff --git a/GameContent/ChildSafety.cs b/GameContent/ChildSafety.cs new file mode 100644 index 0000000..093efbe --- /dev/null +++ b/GameContent/ChildSafety.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ChildSafety +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(275); + private static SetFactory factoryGore = new SetFactory(1087); + 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); + 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/Dyes/LegacyHairShaderData.cs b/GameContent/Dyes/LegacyHairShaderData.cs new file mode 100644 index 0000000..8bcfbfd --- /dev/null +++ b/GameContent/Dyes/LegacyHairShaderData.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.LegacyHairShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..35224f5 --- /dev/null +++ b/GameContent/Dyes/ReflectiveArmorShaderData.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.ReflectiveArmorShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..df2786e --- /dev/null +++ b/GameContent/Dyes/TeamArmorShaderData.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.TeamArmorShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Events/BirthdayParty.cs b/GameContent/Events/BirthdayParty.cs new file mode 100644 index 0000000..c5edcd1 --- /dev/null +++ b/GameContent/Events/BirthdayParty.cs @@ -0,0 +1,149 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.BirthdayParty +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Localization; + +namespace Terraria.GameContent.Events +{ + public class BirthdayParty + { + public static bool ManualParty = false; + public static bool GenuineParty = false; + public static int PartyDaysOnCooldown = 0; + public static List CelebratingNPCs = new List(); + private static bool _wasCelebrating = false; + + 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 void NaturalAttempt() + { + if (Main.netMode == 1) + 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 npc = Main.npc[index]; + if (npc.active && npc.townNPC && npc.type != 37 && npc.type != 453 && npc.aiStyle != 0) + source.Add(npc); + } + if (source.Count < 5) + return; + BirthdayParty.GenuineParty = true; + BirthdayParty.PartyDaysOnCooldown = Main.rand.Next(5, 11); + 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); + } + } + + 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) + { + NPC npc = Main.npc[BirthdayParty.CelebratingNPCs[index]]; + if (!npc.active || !npc.townNPC || npc.type == 37 || npc.type == 453 || npc.aiStyle == 0) + 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..1c36ae7 --- /dev/null +++ b/GameContent/Events/CultistRitual.cs @@ -0,0 +1,90 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.CultistRitual +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +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) && !Collision.SolidTiles(num2 - 1, num2 + 1, num3 - 3, num3 - 1)) + { + 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..74a555f --- /dev/null +++ b/GameContent/Events/DD2Event.cs @@ -0,0 +1,1684 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.DD2Event +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics.Effects; +using Terraria.ID; +using Terraria.Localization; +using Terraria.World.Generation; + +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 = false; + public static bool DownedInvasionT2 = false; + public static bool DownedInvasionT3 = false; + public static bool LostThisRun = false; + public static bool WonThisRun = false; + public static int LaneSpawnRate = 60; + private static bool _downedDarkMageT1 = false; + private static bool _downedOgreT2 = false; + private static bool _spawnedBetsyT3 = false; + public static bool Ongoing = false; + public static Microsoft.Xna.Framework.Rectangle ArenaHitbox = new Microsoft.Xna.Framework.Rectangle(); + private static int _arenaHitboxingCooldown = 0; + public static int OngoingDifficulty = 0; + private static List _deadGoblinSpots = new List(); + private static int _crystalsDropping_lastWave = 0; + private static int _crystalsDropping_toDrop = 0; + private static int _crystalsDropping_alreadyDropped = 0; + private static int _timeLeftUntilSpawningBegins = 0; + + 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) + NetMessage.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(); + 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 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; + } + } + 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.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.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.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/MoonlordDeathDrama.cs b/GameContent/Events/MoonlordDeathDrama.cs new file mode 100644 index 0000000..b16ac0c --- /dev/null +++ b/GameContent/Events/MoonlordDeathDrama.cs @@ -0,0 +1,220 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.MoonlordDeathDrama +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; +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 = 0.0f; + private static float requestedLight = 0.0f; + + 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(Main.magicPixel, 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(TextureManager.Load("Images/Misc/MoonExplosion/Spine"), 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(TextureManager.Load("Images/Misc/MoonExplosion/Shoulder"), 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(TextureManager.Load("Images/Misc/MoonExplosion/Torso"), 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(TextureManager.Load("Images/Misc/MoonExplosion/Head"), 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(TextureManager.Load("Images/Misc/MoonExplosion/Explosion"), 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/Sandstorm.cs b/GameContent/Events/Sandstorm.cs new file mode 100644 index 0000000..16dae63 --- /dev/null +++ b/GameContent/Events/Sandstorm.cs @@ -0,0 +1,202 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.Sandstorm +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Events +{ + public class Sandstorm + { + public static bool Happening; + public static int TimeLeft; + public static float Severity; + public static float IntendedSeverity; + private static bool _effectsUp; + + 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.TimeLeft <= 0) + Sandstorm.StopSandstorm(); + } + else + { + int num = (int) ((double) Main.windSpeed * 100.0); + for (int index = 0; index < Main.dayRate; ++index) + { + if (Main.rand.Next(777600) == 0) + Sandstorm.StartSandstorm(); + else if ((Main.numClouds < 40 || Math.Abs(num) > 50) && Main.rand.Next(518400) == 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() + { + 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 = (int) (3600.0 * (8.0 + (double) Main.rand.NextFloat() * 16.0)); + 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 void EmitDust() + { + if (Main.gamePaused) + return; + int sandTiles = Main.sandTiles; + Player player = Main.player[Main.myPlayer]; + bool flag = Sandstorm.Happening && player.ZoneSandstorm && (Main.bgStyle == 2 || Main.bgStyle == 5) && Main.bgDelay < 50; + Sandstorm.HandleEffectAndSky(flag && Main.UseStormEffects); + if (sandTiles < 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.windSpeed); + float amount = Math.Abs(Main.windSpeed); + if ((double) amount < 0.00999999977648258) + return; + float num2 = (float) num1 * MathHelper.Lerp(0.9f, 1f, amount); + float num3 = 2000f / (float) sandTiles; + 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.screenTileCounts[53] + Main.screenTileCounts[396] + Main.screenTileCounts[397])); + weightedRandom.Add(new Color(103, 98, 122, 180), (double) (Main.screenTileCounts[112] + Main.screenTileCounts[400] + Main.screenTileCounts[398])); + weightedRandom.Add(new Color(135, 43, 34, 180), (double) (Main.screenTileCounts[234] + Main.screenTileCounts[401] + Main.screenTileCounts[399])); + weightedRandom.Add(new Color(213, 196, 197, 180), (double) (Main.screenTileCounts[116] + Main.screenTileCounts[403] + Main.screenTileCounts[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 index2 = (int) Position.X / 16; + int index3 = (int) Position.Y / 16; + if (Main.tile[index2, index3] != null && Main.tile[index2, index3].wall == (byte) 0) + { + for (int index4 = 0; index4 < 1; ++index4) + { + 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) + { + --index4; + Position += Utils.RandomVector2(Main.rand, -10f, 10f) + dust.velocity * -1.1f; + int x = (int) Position.X / 16; + int y = (int) Position.Y / 16; + if (WorldGen.InWorld(x, y, 10) && Main.tile[x, y] != null) + { + int wall = (int) Main.tile[x, y].wall; + } + } + } + else + break; + } + if ((double) num8 <= 0.0) + break; + } + } + } + } + + public static void DrawGrains(SpriteBatch spriteBatch) + { + } + } +} diff --git a/GameContent/Events/ScreenDarkness.cs b/GameContent/Events/ScreenDarkness.cs new file mode 100644 index 0000000..7e87aa9 --- /dev/null +++ b/GameContent/Events/ScreenDarkness.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.ScreenDarkness +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(Main.magicPixel, 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(Main.magicPixel, 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..f7ea22b --- /dev/null +++ b/GameContent/Events/ScreenObstruction.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.ScreenObstruction +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 width = Main.extraTexture[49].Width; + int num = 10; + Rectangle rect = Main.player[Main.myPlayer].getRect(); + rect.Inflate((width - rect.Width) / 2, (width - rect.Height) / 2 + num / 2); + rect.Offset(-(int) Main.screenPosition.X, -(int) Main.screenPosition.Y + (int) Main.player[Main.myPlayer].gfxOffY - num); + 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(Main.magicPixel, destinationRectangle1, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(Main.magicPixel, destinationRectangle2, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(Main.magicPixel, destinationRectangle3, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(Main.magicPixel, destinationRectangle4, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(Main.extraTexture[49], rect, color); + } + } +} diff --git a/GameContent/FixExploitManEaters.cs b/GameContent/FixExploitManEaters.cs new file mode 100644 index 0000000..a10c5f0 --- /dev/null +++ b/GameContent/FixExploitManEaters.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.FixExploitManEaters +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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/Generation/ActionGrass.cs b/GameContent/Generation/ActionGrass.cs new file mode 100644 index 0000000..b5bf468 --- /dev/null +++ b/GameContent/Generation/ActionGrass.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionGrass +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.World.Generation; + +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..bdad292 --- /dev/null +++ b/GameContent/Generation/ActionPlaceStatue.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionPlaceStatue +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.World.Generation; + +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..5f7024b --- /dev/null +++ b/GameContent/Generation/ActionStalagtite.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionStalagtite +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.World.Generation; + +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..0611fd3 --- /dev/null +++ b/GameContent/Generation/ActionVines.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionVines +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.World.Generation; + +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..8dd5bc9 --- /dev/null +++ b/GameContent/Generation/PassLegacy.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.PassLegacy +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.World.Generation; + +namespace Terraria.GameContent.Generation +{ + public class PassLegacy : GenPass + { + private static Dictionary _weightMap = PassLegacy.GenerateWeightMap(); + private WorldGenLegacyMethod _method; + + private static Dictionary GenerateWeightMap() + { + Dictionary dictionary = new Dictionary(); + char[] chArray1 = new char[1]{ ',' }; + foreach (string str in "Reset:1.794,Terrain:233.6416,Tunnels:4.6075,Sand:256.211,Mount Caves:28.2501,Dirt Wall Backgrounds:91.1031,Rocks In Dirt:568.933,Dirt In Rocks:612.0777,Clay:99.0829,Small Holes:1080.6658,Dirt Layer Caves:97.6719,Rock Layer Caves:978.5062,Surface Caves:13.8707,Slush Check:40.0098,Grass:14.2435,Jungle:2404.0004,Marble:644.4756,Granite:7445.4057,Mud Caves To Grass:13289.4058,Full Desert:1977.3443,Floating Islands:430.9967,Mushroom Patches:305.0517,Mud To Dirt:135.7024,Silt:76.367,Shinies:106.5187,Webs:22.2261,Underworld:5202.7952,Lakes:12.458,Dungeon:273.1042,Corruption:100.9735,Slush:24.1356,Mud Caves To Grass:8.4174,Beaches:4.4018,Gems:289.1701,Gravitating Sand:207.9566,Clean Up Dirt:459.6188,Pyramids:0.4286,Dirt Rock Wall Runner:18.2315,Living Trees:11.9772,Wood Tree Walls:61.6,Altars:18.7726,Wet Jungle:10.5711,Remove Water From Sand:11.0268,Jungle Temple:140.1556,Hives:2144.6166,Jungle Chests:1.3979,Smooth World:2242.1054,Settle Liquids:4844.7201,Waterfalls:1868.306,Ice:80.3287,Wall Variety:2390.3296,Traps:42.6118,Life Crystals:2.0239,Statues:15.5157,Buried Chests:591.4215,Surface Chests:9.5181,Jungle Chests Placement:1.8203,Water Chests:5.5477,Spider Caves:4979.7116,Gem Caves:41.1786,Moss:2116.5164,Temple:6.6512,Ice Walls:7890.5261,Jungle Trees:230.5412,Floating Island Houses:2.299,Quick Cleanup:417.1482,Pots:515.7405,Hellforge:5.3522,Spreading Grass:47.0313,Piles:160.8168,Moss:11.8533,Spawn Point:0.2951,Grass Wall:293.7116,Guide:4.4433,Sunflowers:4.6765,Planting Trees:203.2509,Herbs:86.5444,Dye Plants:178.949,Webs And Honey:336.4474,Weeds:137.5676,Mud Caves To Grass:179.8629,Jungle Plants:606.4348,Vines:264.2856,Flowers:0.8461,Mushrooms:0.4203,Stalac:347.0403,Gems In Ice Biome:5.491,Random Gems:9.3797,Moss Grass:267.3524,Muds Walls In Jungle:34.8689,Larva:0.6675,Tile Cleanup:675.7305,Lihzahrd Altars:0.2615,Micro Biomes:2734.7864,Final Cleanup:648.6878".Split(chArray1)) + { + char[] chArray2 = new char[1]{ ':' }; + string[] strArray = str.Split(chArray2); + dictionary[strArray[0]] = float.Parse(strArray[1], NumberStyles.AllowDecimalPoint, (IFormatProvider) CultureInfo.InvariantCulture); + } + return dictionary; + } + + 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; + } + + public override void Apply(GenerationProgress progress) => this._method(progress); + } +} diff --git a/GameContent/Generation/ShapeBranch.cs b/GameContent/Generation/ShapeBranch.cs new file mode 100644 index 0000000..d581d70 --- /dev/null +++ b/GameContent/Generation/ShapeBranch.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeBranch +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +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.PerLinePoint) ((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..fd36b48 --- /dev/null +++ b/GameContent/Generation/ShapeFloodFill.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeFloodFill +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +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..24e327c --- /dev/null +++ b/GameContent/Generation/ShapeRoot.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeRoot +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.World.Generation; + +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..6224048 --- /dev/null +++ b/GameContent/Generation/ShapeRunner.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeRunner +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.World.Generation; + +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..03becf5 --- /dev/null +++ b/GameContent/Generation/TrackGenerator.cs @@ -0,0 +1,279 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.TrackGenerator +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation; + +namespace Terraria.GameContent.Generation +{ + public class TrackGenerator + { + private static readonly byte[] INVALID_WALLS = new byte[13] + { + (byte) 7, + (byte) 94, + (byte) 95, + (byte) 8, + (byte) 98, + (byte) 99, + (byte) 9, + (byte) 96, + (byte) 97, + (byte) 3, + (byte) 83, + (byte) 87, + (byte) 86 + }; + private const int TOTAL_TILE_IGNORES = 150; + private const int PLAYER_HEIGHT = 6; + private const int MAX_RETRIES = 400; + private const int MAX_SMOOTH_DISTANCE = 15; + private const int MAX_ITERATIONS = 1000000; + private TrackGenerator.TrackHistory[] _historyCache = new TrackGenerator.TrackHistory[2048]; + + public void Generate(int trackCount, int minimumLength) + { + int num = trackCount; + while (num > 0) + { + int x = WorldGen.genRand.Next(150, Main.maxTilesX - 150); + int y = WorldGen.genRand.Next((int) Main.worldSurface + 25, Main.maxTilesY - 200); + if (this.IsLocationEmpty(x, y)) + { + while (this.IsLocationEmpty(x, y + 1)) + ++y; + if (this.FindPath(x, y, minimumLength)) + --num; + } + } + } + + private bool IsLocationEmpty(int x, int y) + { + if (y > Main.maxTilesY - 200 || x < 0 || y < (int) Main.worldSurface || x > Main.maxTilesX - 5) + return false; + for (int index = 0; index < 6; ++index) + { + if (WorldGen.SolidTile(x, y - index)) + return false; + } + return true; + } + + private bool CanTrackBePlaced(int x, int y) + { + if (y > Main.maxTilesY - 200 || x < 0 || y < (int) Main.worldSurface || x > Main.maxTilesX - 5) + return false; + byte wall = Main.tile[x, y].wall; + for (int index = 0; index < TrackGenerator.INVALID_WALLS.Length; ++index) + { + if ((int) wall == (int) TrackGenerator.INVALID_WALLS[index]) + return false; + } + 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])) + return false; + } + return true; + } + + private void SmoothTrack(TrackGenerator.TrackHistory[] history, int length) + { + int val2 = length - 1; + bool flag = false; + for (int index1 = length - 1; index1 >= 0; --index1) + { + if (flag) + { + val2 = Math.Min(index1 + 15, val2); + if ((int) history[index1].Y >= (int) history[val2].Y) + { + for (int index2 = index1 + 1; (int) history[index2].Y > (int) history[index1].Y; ++index2) + history[index2].Y = history[index1].Y; + if ((int) history[index1].Y == (int) history[val2].Y) + flag = false; + } + } + else if ((int) history[index1].Y > (int) history[val2].Y) + flag = true; + else + val2 = index1; + } + } + + public bool FindPath(int x, int y, int minimumLength, bool debugMode = false) + { + TrackGenerator.TrackHistory[] historyCache = this._historyCache; + int index1 = 0; + Tile[,] tile = Main.tile; + bool flag1 = true; + int num1 = WorldGen.genRand.Next(2) == 0 ? 1 : -1; + if (debugMode) + num1 = Main.player[Main.myPlayer].direction; + int yDirection = 1; + int length = 0; + int num2 = 400; + bool flag2 = false; + int num3 = 150; + int num4 = 0; + for (int index2 = 1000000; index2 > 0 & flag1 && index1 < historyCache.Length - 1; ++index1) + { + --index2; + historyCache[index1] = new TrackGenerator.TrackHistory(x, y, yDirection); + bool flag3 = false; + int num5 = 1; + if (index1 > minimumLength >> 1) + num5 = -1; + else if (index1 > (minimumLength >> 1) - 5) + num5 = 0; + if (flag2) + { + int num6 = 0; + int num7 = num3; + bool flag4 = false; + for (int index3 = Math.Min(1, yDirection + 1); index3 >= Math.Max(-1, yDirection - 1); --index3) + { + int num8; + for (num8 = 0; num8 <= num3; ++num8) + { + if (this.IsLocationEmpty(x + (num8 + 1) * num1, y + (num8 + 1) * index3 * num5)) + { + flag4 = true; + break; + } + } + if (num8 < num7) + { + num7 = num8; + num6 = index3; + } + } + if (flag4) + { + yDirection = num6; + for (int index4 = 0; index4 < num7 - 1; ++index4) + { + ++index1; + x += num1; + y += yDirection * num5; + historyCache[index1] = new TrackGenerator.TrackHistory(x, y, yDirection); + num4 = index1; + } + x += num1; + y += yDirection * num5; + length = index1 + 1; + flag2 = false; + } + num3 -= num7; + if (num3 < 0) + flag1 = false; + } + else + { + for (int index5 = Math.Min(1, yDirection + 1); index5 >= Math.Max(-1, yDirection - 1); --index5) + { + if (this.IsLocationEmpty(x + num1, y + index5 * num5)) + { + yDirection = index5; + flag3 = true; + x += num1; + y += yDirection * num5; + length = index1 + 1; + break; + } + } + if (!flag3) + { + while (index1 > num4 && y == (int) historyCache[index1].Y) + --index1; + x = (int) historyCache[index1].X; + y = (int) historyCache[index1].Y; + yDirection = (int) historyCache[index1].YDirection - 1; + --num2; + if (num2 <= 0) + { + index1 = length; + x = (int) historyCache[index1].X; + y = (int) historyCache[index1].Y; + yDirection = (int) historyCache[index1].YDirection; + flag2 = true; + num2 = 200; + } + --index1; + } + } + } + if (!(length > minimumLength | debugMode)) + return false; + this.SmoothTrack(historyCache, length); + if (!debugMode) + { + for (int index6 = 0; index6 < length; ++index6) + { + for (int index7 = -1; index7 < 7; ++index7) + { + if (!this.CanTrackBePlaced((int) historyCache[index6].X, (int) historyCache[index6].Y - index7)) + return false; + } + } + } + for (int index8 = 0; index8 < length; ++index8) + { + TrackGenerator.TrackHistory trackHistory = historyCache[index8]; + for (int index9 = 0; index9 < 6; ++index9) + Main.tile[(int) trackHistory.X, (int) trackHistory.Y - index9].active(false); + } + for (int index10 = 0; index10 < length; ++index10) + { + TrackGenerator.TrackHistory trackHistory = historyCache[index10]; + Tile.SmoothSlope((int) trackHistory.X, (int) trackHistory.Y + 1); + Tile.SmoothSlope((int) trackHistory.X, (int) trackHistory.Y - 6); + bool wire = Main.tile[(int) trackHistory.X, (int) trackHistory.Y].wire(); + Main.tile[(int) trackHistory.X, (int) trackHistory.Y].ResetToType((ushort) 314); + Main.tile[(int) trackHistory.X, (int) trackHistory.Y].wire(wire); + if (index10 != 0) + { + for (int index11 = 0; index11 < 6; ++index11) + WorldUtils.TileFrame((int) historyCache[index10 - 1].X, (int) historyCache[index10 - 1].Y - index11, true); + if (index10 == length - 1) + { + for (int index12 = 0; index12 < 6; ++index12) + WorldUtils.TileFrame((int) trackHistory.X, (int) trackHistory.Y - index12, true); + } + } + } + return true; + } + + public static void Run(int trackCount = 30, int minimumLength = 250) => new TrackGenerator().Generate(trackCount, minimumLength); + + public static void Run(Point start) => new TrackGenerator().FindPath(start.X, start.Y, 250, true); + + private struct TrackHistory + { + public short X; + public short Y; + public byte YDirection; + + public TrackHistory(int x, int y, int yDirection) + { + this.X = (short) x; + this.Y = (short) y; + this.YDirection = (byte) yDirection; + } + + public TrackHistory(short x, short y, byte yDirection) + { + this.X = x; + this.Y = y; + this.YDirection = yDirection; + } + } + } +} diff --git a/GameContent/Generation/WorldGenLegacyMethod.cs b/GameContent/Generation/WorldGenLegacyMethod.cs new file mode 100644 index 0000000..38402ad --- /dev/null +++ b/GameContent/Generation/WorldGenLegacyMethod.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.WorldGenLegacyMethod +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.World.Generation; + +namespace Terraria.GameContent.Generation +{ + public delegate void WorldGenLegacyMethod(GenerationProgress progress); +} diff --git a/GameContent/Liquid/LiquidRenderer.cs b/GameContent/Liquid/LiquidRenderer.cs new file mode 100644 index 0000000..79b09e1 --- /dev/null +++ b/GameContent/Liquid/LiquidRenderer.cs @@ -0,0 +1,589 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Liquid.LiquidRenderer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +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 = new LiquidRenderer(); + private Tile[,] _tiles = Main.tile; + private Texture2D[] _liquidTextures = new Texture2D[12]; + 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 UnifiedRandom _random = new UnifiedRandom(); + private Color[] _waveMask = new Color[1]; + private float _frameState; + + public event Action WaveFilters; + + public LiquidRenderer() + { + for (int index = 0; index < this._liquidTextures.Length; ++index) + this._liquidTextures[index] = TextureManager.Load("Images/Misc/water_" + (object) index); + } + + 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 = this._tiles[x, y] ?? new Tile(); + liquidCachePtr2->LiquidLevel = (float) tile.liquid / (float) byte.MaxValue; + liquidCachePtr2->IsHalfBrick = tile.halfBrick() && liquidCachePtr2[-1].HasLiquid; + liquidCachePtr2->IsSolid = WorldGen.SolidOrSlopedTile(tile) && !liquidCachePtr2->IsHalfBrick; + liquidCachePtr2->HasLiquid = tile.liquid > (byte) 0; + liquidCachePtr2->VisibleLiquidLevel = 0.0f; + liquidCachePtr2->HasWall = tile.wall > (byte) 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[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache2 = liquidCachePtr3[rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache3 = liquidCachePtr3[-1]; + LiquidRenderer.LiquidCache liquidCache4 = liquidCachePtr3[1]; + if (liquidCache1.HasLiquid && liquidCache2.HasLiquid && (int) liquidCache1.Type == (int) liquidCache2.Type) + { + val1 = liquidCache1.LiquidLevel + liquidCache2.LiquidLevel; + liquidCachePtr3->Type = liquidCache1.Type; + } + if (liquidCache3.HasLiquid && liquidCache4.HasLiquid && (int) liquidCache3.Type == (int) liquidCache4.Type) + { + 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->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->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->IsSolid) + { + 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 && (double) num12 > 0.5) + num12 = 0.5f; + liquidDrawCachePtr2->IsVisible = liquidCachePtr9->HasWall || !liquidCachePtr9->IsHalfBrick || !liquidCachePtr9->HasLiquid; + 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 *= isBackgroundDraw ? 1f : globalAlpha; + break; + case 2: + index = 11; + break; + } + float num = Math.Min(1f, val2); + VertexColors vertices; + Lighting.GetColor4Slice_New(x, y, out vertices); + vertices.BottomLeftColor *= num; + vertices.BottomRightColor *= num; + vertices.TopLeftColor *= num; + vertices.TopRightColor *= num; + Main.tileBatch.Draw(this._liquidTextures[index], 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 val2 = MathHelper.Clamp(Main.windSpeed * 80f, -20f, 20f); + this._frameState += ((double) val2 >= 0.0 ? Math.Max(10f, val2) : Math.Min(-10f, val2)) * (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) + { + 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); + } + + 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/NetModules/NetLiquidModule.cs b/GameContent/NetModules/NetLiquidModule.cs new file mode 100644 index 0000000..45599d9 --- /dev/null +++ b/GameContent/NetModules/NetLiquidModule.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetLiquidModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +namespace Terraria.GameContent.NetModules +{ + public class NetLiquidModule : NetModule + { + 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 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; + } + } +} diff --git a/GameContent/NetModules/NetTextModule.cs b/GameContent/NetModules/NetTextModule.cs new file mode 100644 index 0000000..1c8a959 --- /dev/null +++ b/GameContent/NetModules/NetTextModule.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetTextModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameContent.UI.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 num = reader.ReadByte(); + string str = NetworkText.Deserialize(reader).ToString(); + Color c = reader.ReadRGB(); + if (num < byte.MaxValue) + { + Main.player[(int) num].chatOverhead.NewMessage(str, Main.chatLength / 2); + str = NameTagHandler.GenerateTag(Main.player[(int) num].name) + " " + str; + } + Main.NewTextMultiline(str, c: c); + return true; + } + + private bool DeserializeAsServer(BinaryReader reader, int senderPlayerId) + { + ChatMessage message = ChatMessage.Deserialize(reader); + ChatManager.Commands.ProcessReceivedMessage(message, senderPlayerId); + return true; + } + + private void BroadcastRawMessage(ChatMessage message, byte author, Color messageColor) => NetManager.Instance.Broadcast(NetTextModule.SerializeServerMessage(NetworkText.FromLiteral(message.Text), messageColor)); + + public override bool Deserialize(BinaryReader reader, int senderPlayerId) => this.DeserializeAsClient(reader, senderPlayerId); + } +} diff --git a/GameContent/PortalHelper.cs b/GameContent/PortalHelper.cs new file mode 100644 index 0000000..df9839b --- /dev/null +++ b/GameContent/PortalHelper.cs @@ -0,0 +1,488 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PortalHelper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) + }; + + 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() + { + 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; + } + } + + public static void TryGoingThroughPortals(Entity ent) + { + 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 == 1) + { + 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; + 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 tile1 = Main.tile[position.X, position.Y]; + Tile tile2 = Main.tile[position.X - xOffset, position.Y - yOffset]; + Tile tile3 = 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]) && WorldGen.SolidOrSlopedTile(tile1) && WorldGen.SolidOrSlopedTile(tile2) && WorldGen.SolidOrSlopedTile(tile3) && tile2.HasSameSlope(tile1) && tile3.HasSameSlope(tile1); + } + + 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.PerLinePoint) ((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 number = 0; number < 1000; ++number) + { + Projectile projectile = Main.projectile[number]; + 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: number); + projectile.Kill(); + if (Main.netMode == 2) + NetMessage.SendData(29, number: projectile.whoAmI, number2: ((float) projectile.owner)); + } + } + } + } + + 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: + Main.NewText("Broken portal! (over4s = " + (object) num + ")"); + 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; + } + + 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(); + } + + 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; + } + } +} diff --git a/GameContent/PressurePlateHelper.cs b/GameContent/PressurePlateHelper.cs new file mode 100644 index 0000000..6ce70f7 --- /dev/null +++ b/GameContent/PressurePlateHelper.cs @@ -0,0 +1,142 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PressurePlateHelper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 PressurePlateHelper + { + public static Dictionary PressurePlatesPressed = new Dictionary(); + public static bool NeedsFirstUpdate = false; + 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 (bool[] flagArray in PressurePlateHelper.PressurePlatesPressed.Values) + flagArray[player] = false; + } + + 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/Shaders/BlizzardShaderData.cs b/GameContent/Shaders/BlizzardShaderData.cs new file mode 100644 index 0000000..8273efb --- /dev/null +++ b/GameContent/Shaders/BlizzardShaderData.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.BlizzardShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.windSpeed; + 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..0b88b60 --- /dev/null +++ b/GameContent/Shaders/BloodMoonScreenShaderData.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.BloodMoonScreenShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 BloodMoonScreenShaderData : ScreenShaderData + { + public BloodMoonScreenShaderData(string passName) + : base(passName) + { + } + + public override void Apply() + { + 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); + base.Apply(); + } + } +} diff --git a/GameContent/Shaders/MoonLordScreenShaderData.cs b/GameContent/Shaders/MoonLordScreenShaderData.cs new file mode 100644 index 0000000..a5aacd8 --- /dev/null +++ b/GameContent/Shaders/MoonLordScreenShaderData.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.MoonLordScreenShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + + public MoonLordScreenShaderData(string passName) + : base(passName) + { + } + + private void UpdateMoonLordIndex() + { + if (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._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..8c45ae6 --- /dev/null +++ b/GameContent/Shaders/RippleShape.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.RippleShape +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..969cf34 --- /dev/null +++ b/GameContent/Shaders/SandstormShaderData.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.SandstormShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.windSpeed, -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..2556306 --- /dev/null +++ b/GameContent/Shaders/WaterShaderData.cs @@ -0,0 +1,409 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.WaterShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.DataStructures; +using Terraria.GameContent.Liquid; +using Terraria.Graphics; +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 Texture2D _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.instance.OurLoad("Images/Misc/Ripples"); + 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(); + 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(Main.magicPixel, 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) Main.magicPixel.Width / 2f, (float) Main.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(Main.magicPixel, 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(Main.magicPixel, 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 rippleShapeTexture = this._rippleShapeTexture; + tileBatch.Draw(rippleShapeTexture, 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.lightMode = 2; + this._usingRenderTargets = false; + Console.WriteLine("Failed to create water distortion render targets. " + ex.ToString()); + } + } + + 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. " + ex.ToString()); + } + 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/Skies/BlizzardSky.cs b/GameContent/Skies/BlizzardSky.cs new file mode 100644 index 0000000..1fa5158 --- /dev/null +++ b/GameContent/Skies/BlizzardSky.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.BlizzardSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.bgColor.ToVector4()) * this._opacity * 0.7f * num; + spriteBatch.Draw(Main.magicPixel, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + } + + internal override void Activate(Vector2 position, params object[] args) + { + this._isActive = true; + this._isLeaving = false; + } + + internal 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/MartianSky.cs b/GameContent/Skies/MartianSky.cs new file mode 100644 index 0000000..4556b44 --- /dev/null +++ b/GameContent/Skies/MartianSky.cs @@ -0,0 +1,277 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.MartianSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.bgColor.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(Main.extraTexture[5], (float) (Main.rand.NextDouble() * 4.0 + 6.59999990463257)); + this._ufos[index].GlowTexture = Main.glowMaskTexture[90]; + } + 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(Main.extraTexture[6], (float) (Main.rand.NextDouble() * 5.0 + 1.60000002384186)); + this._ufos[index].Scale = 0.5f; + this._ufos[index].GlowTexture = Main.glowMaskTexture[91]; + } + } + + internal 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; + } + + internal 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..7e0117e --- /dev/null +++ b/GameContent/Skies/MoonLordSky.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.MoonLordSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class MoonLordSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private bool _isActive; + private int _moonLordIndex = -1; + + public override void OnLoad() + { + } + + public override void Update(GameTime gameTime) + { + } + + private float GetIntensity() + { + 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(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * intensity); + } + + public override float GetCloudAlpha() => 0.0f; + + internal override void Activate(Vector2 position, params object[] args) => this._isActive = true; + + internal override void Deactivate(params object[] args) => this._isActive = false; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive; + } +} diff --git a/GameContent/Skies/NebulaSky.cs b/GameContent/Skies/NebulaSky.cs new file mode 100644 index 0000000..50fabef --- /dev/null +++ b/GameContent/Skies/NebulaSky.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.NebulaSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +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 Texture2D _planetTexture; + private Texture2D _bgTexture; + private Texture2D _beamTexture; + private Texture2D[] _rockTextures; + private bool _isActive; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = TextureManager.Load("Images/Misc/NebulaSky/Planet"); + this._bgTexture = TextureManager.Load("Images/Misc/NebulaSky/Background"); + this._beamTexture = TextureManager.Load("Images/Misc/NebulaSky/Beam"); + this._rockTextures = new Texture2D[3]; + for (int index = 0; index < this._rockTextures.Length; ++index) + this._rockTextures[index] = TextureManager.Load("Images/Misc/NebulaSky/Rock_" + (object) index); + } + + 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(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture, 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, 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, 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.GlobalTime * 0.0199999995529652 + Math.Sin((double) index1)) % 1.0); + spriteBatch.Draw(this._rockTextures[index2], 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); + + internal 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); + + internal 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..d58f8a0 --- /dev/null +++ b/GameContent/Skies/PartySky.cs @@ -0,0 +1,212 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.PartySky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 Texture2D[] _textures; + private PartySky.Balloon[] _balloons; + private UnifiedRandom _random = new UnifiedRandom(); + private int _balloonsDrawing; + + public override void OnLoad() + { + this._textures = new Texture2D[3]; + for (int index = 0; index < this._textures.Length; ++index) + this._textures[index] = Main.extraTexture[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)]; + this._balloons[i].Variant = this._random.Next(3); + if (this._random.Next(30) != 0) + return; + this._balloons[i].Texture = this._textures[2]; + } + + private bool IsNearParty() => (double) Main.player[Main.myPlayer].townNPCs > 0.0 || Main.partyMonoliths > 0; + + public override void Update(GameTime gameTime) + { + if (!PartySky.MultipleSkyWorkaroundFix) + 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.windSpeed * (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]; + } + 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.bgColor.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); + } + } + } + + internal 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; + } + } + + internal 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..033cd41 --- /dev/null +++ b/GameContent/Skies/SandstormSky.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SandstormSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.bgColor.ToVector4()) * this._opacity * num; + spriteBatch.Draw(Main.magicPixel, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + } + + internal override void Activate(Vector2 position, params object[] args) + { + this._isActive = true; + this._isLeaving = false; + } + + internal 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..3ce1aea --- /dev/null +++ b/GameContent/Skies/SlimeSky.cs @@ -0,0 +1,196 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SlimeSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class SlimeSky : CustomSky + { + private Texture2D[] _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 Texture2D[4]; + for (int index = 0; index < 4; ++index) + this._textures[index] = TextureManager.Load("Images/Misc/Sky_Slime_" + (object) (index + 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)]; + if (this._random.Next(60) == 0) + { + this._slimes[index].Texture = this._textures[3]; + 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]; + 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)]; + 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]; + 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]; + 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.bgColor.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); + } + } + } + + internal override void Activate(Vector2 position, params object[] args) + { + this.GenerateSlimes(); + this._isActive = true; + this._isLeaving = false; + } + + internal 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..c9ebc6d --- /dev/null +++ b/GameContent/Skies/SolarSky.cs @@ -0,0 +1,126 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SolarSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class SolarSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Texture2D _planetTexture; + private Texture2D _bgTexture; + private Texture2D _meteorTexture; + private bool _isActive; + private SolarSky.Meteor[] _meteors; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = TextureManager.Load("Images/Misc/SolarSky/Planet"); + this._bgTexture = TextureManager.Load("Images/Misc/SolarSky/Background"); + this._meteorTexture = TextureManager.Load("Images/Misc/SolarSky/Meteor"); + } + + 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(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture, 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, 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, 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); + + internal 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); + + internal 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..3da78fe --- /dev/null +++ b/GameContent/Skies/StardustSky.cs @@ -0,0 +1,134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.StardustSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class StardustSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Texture2D _planetTexture; + private Texture2D _bgTexture; + private Texture2D[] _starTextures; + private bool _isActive; + private StardustSky.Star[] _stars; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = TextureManager.Load("Images/Misc/StarDustSky/Planet"); + this._bgTexture = TextureManager.Load("Images/Misc/StarDustSky/Background"); + this._starTextures = new Texture2D[2]; + for (int index = 0; index < this._starTextures.Length; ++index) + this._starTextures[index] = TextureManager.Load("Images/Misc/StarDustSky/Star " + (object) index); + } + + 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(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture, 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, 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.GlobalTime + (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.GlobalTime * 5.0 + (double) this._stars[index].SinOffset) * 0.100000001490116 - 0.100000001490116); + float num6 = MathHelper.Clamp(num4, 0.0f, 1f); + Texture2D starTexture = this._starTextures[this._stars[index].TextureIndex]; + spriteBatch.Draw(starTexture, position, new Rectangle?(), Color.White * num3 * num6 * 0.8f * (1f - num5) * this._fadeOpacity, 0.0f, new Vector2((float) (starTexture.Width >> 1), (float) (starTexture.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); + + internal 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); + + internal 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..b1c64c7 --- /dev/null +++ b/GameContent/Skies/VortexSky.cs @@ -0,0 +1,122 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.VortexSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class VortexSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Texture2D _planetTexture; + private Texture2D _bgTexture; + private Texture2D _boltTexture; + private Texture2D _flashTexture; + private bool _isActive; + private int _ticksUntilNextBolt; + private float _fadeOpacity; + private VortexSky.Bolt[] _bolts; + + public override void OnLoad() + { + this._planetTexture = TextureManager.Load("Images/Misc/VortexSky/Planet"); + this._bgTexture = TextureManager.Load("Images/Misc/VortexSky/Background"); + this._boltTexture = TextureManager.Load("Images/Misc/VortexSky/Bolt"); + this._flashTexture = TextureManager.Load("Images/Misc/VortexSky/Flash"); + } + + 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(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture, 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, 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; + int life = this._bolts[index].Life; + if (life > 26 && life % 2 == 0) + texture = this._flashTexture; + 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); + + internal 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; + } + + internal 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/Tile_Entities/TEItemFrame.cs b/GameContent/Tile_Entities/TEItemFrame.cs new file mode 100644 index 0000000..20d926e --- /dev/null +++ b/GameContent/Tile_Entities/TEItemFrame.cs @@ -0,0 +1,113 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEItemFrame +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEItemFrame : TileEntity + { + public Item item; + + public static void Initialize() => TileEntity._NetPlaceEntity += new Action(TEItemFrame.NetPlaceEntity); + + public static void NetPlaceEntity(int x, int y, int type) + { + if (type != 1 || !TEItemFrame.ValidTile(x, y)) + return; + NetMessage.SendData(86, number: TEItemFrame.Place(x, y), number2: ((float) x), number3: ((float) y)); + } + + 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 = (byte) 1; + TileEntity.ByID[teItemFrame.ID] = (TileEntity) teItemFrame; + TileEntity.ByPosition[teItemFrame.Position] = (TileEntity) teItemFrame; + return teItemFrame.ID; + } + + public static int Hook_AfterPlacement(int x, int y, int type = 395, int style = 0, int direction = 1) + { + 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: 1f); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || tileEntity.type != (byte) 1) + 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) && tileEntity.type == (byte) 1 ? 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: " + this.item.ToString(); + + 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) + { + 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)); + } + } + } +} diff --git a/GameContent/Tile_Entities/TELogicSensor.cs b/GameContent/Tile_Entities/TELogicSensor.cs new file mode 100644 index 0000000..f4f4c72 --- /dev/null +++ b/GameContent/Tile_Entities/TELogicSensor.cs @@ -0,0 +1,360 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TELogicSensor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Dictionary playerBox = new Dictionary(); + private static List> tripPoints = new List>(); + private static List markedIDsForRemoval = new List(); + private static bool inUpdateLoop = false; + private static bool playerBoxFilled = false; + public TELogicSensor.LogicCheckType logicCheck; + public bool On; + public int CountedData; + + public static void Initialize() + { + TileEntity._UpdateStart += new Action(TELogicSensor.UpdateStartInternal); + TileEntity._UpdateEnd += new Action(TELogicSensor.UpdateEndInternal); + TileEntity._NetPlaceEntity += new Action(TELogicSensor.NetPlaceEntity); + } + + public static void NetPlaceEntity(int x, int y, int type) + { + if (type != 2 || !TELogicSensor.ValidTile(x, y)) + return; + int num = TELogicSensor.Place(x, y); + ((TELogicSensor) TileEntity.ByID[num]).FigureCheckState(); + NetMessage.SendData(86, number: num, number2: ((float) x), number3: ((float) y)); + } + + 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); + } + Wiring.blockPlayerTeleportationForOneIteration = false; + TELogicSensor.tripPoints.Clear(); + foreach (int key in TELogicSensor.markedIDsForRemoval) + { + TileEntity tileEntity; + if (TileEntity.ByID.TryGetValue(key, out tileEntity) && tileEntity.type == (byte) 2) + 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 = (byte) 2; + 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) + { + 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: 2f); + 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) || tileEntity.type != (byte) 2) + return; + Wiring.blockPlayerTeleportationForOneIteration = ((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.PlayerAbove; + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.PlayerAbove && ((TELogicSensor) tileEntity).On) + Wiring.HitSwitch((int) tileEntity.Position.X, (int) tileEntity.Position.Y); + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Water && ((TELogicSensor) tileEntity).On) + Wiring.HitSwitch((int) tileEntity.Position.X, (int) tileEntity.Position.Y); + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Lava && ((TELogicSensor) tileEntity).On) + Wiring.HitSwitch((int) tileEntity.Position.X, (int) tileEntity.Position.Y); + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Honey && ((TELogicSensor) tileEntity).On) + Wiring.HitSwitch((int) tileEntity.Position.X, (int) tileEntity.Position.Y); + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Liquid && ((TELogicSensor) tileEntity).On) + Wiring.HitSwitch((int) tileEntity.Position.X, (int) 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) && tileEntity.type == (byte) 2 ? 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/TETrainingDummy.cs b/GameContent/Tile_Entities/TETrainingDummy.cs new file mode 100644 index 0000000..6825f5e --- /dev/null +++ b/GameContent/Tile_Entities/TETrainingDummy.cs @@ -0,0 +1,151 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TETrainingDummy +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = false; + public int npc; + + public static void Initialize() + { + TileEntity._UpdateStart += new Action(TETrainingDummy.ClearBoxes); + TileEntity._NetPlaceEntity += new Action(TETrainingDummy.NetPlaceEntity); + } + + public static void NetPlaceEntity(int x, int y, int type) + { + if (type != 0 || !TETrainingDummy.ValidTile(x, y)) + return; + TETrainingDummy.Place(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 = (byte) 0; + 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) + { + 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))); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || tileEntity.type != (byte) 0) + 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) && tileEntity.type == (byte) 0 ? 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/TownRoomManager.cs b/GameContent/TownRoomManager.cs new file mode 100644 index 0000000..91014d8 --- /dev/null +++ b/GameContent/TownRoomManager.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TownRoomManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +namespace Terraria.GameContent +{ + public class TownRoomManager + { + private List> _roomLocationPairs = new List>(); + private bool[] _hasRoom = new bool[580]; + + public int FindOccupation(int x, int y) => this.FindOccupation(new Point(x, y)); + + public int FindOccupation(Point tilePosition) + { + foreach (Tuple roomLocationPair in this._roomLocationPairs) + { + if (roomLocationPair.Item2 == tilePosition) + return roomLocationPair.Item1; + } + return -1; + } + + 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) + { + 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; + } + } +} diff --git a/GameContent/UI/Chat/AchievementTagHandler.cs b/GameContent/UI/Chat/AchievementTagHandler.cs new file mode 100644 index 0000000..8ec8dc5 --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..8d032bb --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1a0b3e4 --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GlobalTime % 0.600000023841858 < 0.300000011920929 ? 17 : 18; + Texture2D texture2D = Main.textGlyphTexture[0]; + 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/ItemTagHandler.cs b/GameContent/UI/Chat/ItemTagHandler.cs new file mode 100644 index 0000000..0554663 --- /dev/null +++ b/GameContent/UI/Chat/ItemTagHandler.cs @@ -0,0 +1,133 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.ItemTagHandler +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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, 84)); + 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) + { + Texture2D texture2D = Main.itemTexture[this._item.type]; + 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/NameTagHandler.cs b/GameContent/UI/Chat/NameTagHandler.cs new file mode 100644 index 0000000..92ec8f2 --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a0d2374 --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/CustomCurrencyManager.cs b/GameContent/UI/CustomCurrencyManager.cs new file mode 100644 index 0000000..edbd90c --- /dev/null +++ b/GameContent/UI/CustomCurrencyManager.cs @@ -0,0 +1,127 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencyManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 0; + 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 totalCoins = currency.CombineStacks(out overFlowing, num1, num2, num3); + if (totalCoins <= 0L) + return; + if (num3 > 0L) + sb.Draw(Main.itemTexture[3813], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Main.itemTexture[3813].Size() * 0.65f), new Rectangle?(), Color.White); + if (num2 > 0L) + sb.Draw(Main.itemTexture[346], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Main.itemTexture[346].Size() * 0.65f), new Rectangle?(), Color.White); + if (num1 > 0L) + sb.Draw(Main.itemTexture[87], Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), Main.itemTexture[87].Size() * 0.65f), new Rectangle?(), Color.White); + Utils.DrawBorderStringFourWay(sb, Main.fontMouseText, 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); + if (currency.CombineStacks(out overFlowing, num1, num2, num3, num4) < (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(); + objArrayList.Add(player.inventory); + objArrayList.Add(player.bank.item); + objArrayList.Add(player.bank2.item); + objArrayList.Add(player.bank3.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); + return currency.TryPurchasing(price, objArrayList, slotCoins, pointList1, pointList2, pointList3, pointList4); + } + + 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)); + } + } + } +} diff --git a/GameContent/UI/CustomCurrencySingleCoin.cs b/GameContent/UI/CustomCurrencySingleCoin.cs new file mode 100644 index 0000000..67bd993 --- /dev/null +++ b/GameContent/UI/CustomCurrencySingleCoin.cs @@ -0,0 +1,107 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencySingleCoin +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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> 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; + } + 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 index = this._valuePerUnit.Keys.ElementAt(0); + Texture2D texture2D = Main.itemTexture[index]; + if (horizontal) + { + Vector2 position = new Vector2((float) ((double) shopx + (double) ChatManager.GetStringSize(Main.fontMouseText, 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, Main.fontItemStack, 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, Main.fontItemStack, 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..37a6b50 --- /dev/null +++ b/GameContent/UI/CustomCurrencySystem.cs @@ -0,0 +1,237 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencySystem +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) + { + 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 (--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 (--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)); + } + 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; + } + } +} diff --git a/GameContent/UI/Elements/UIAchievementListItem.cs b/GameContent/UI/Elements/UIAchievementListItem.cs new file mode 100644 index 0000000..97a386c --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; +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 Texture2D _innerPanelTopTexture; + private Texture2D _innerPanelBottomTexture; + private Texture2D _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(TextureManager.Load("Images/UI/Achievements"), 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(TextureManager.Load("Images/UI/Achievement_Borders")); + this._achievementIconBorders.Left.Set(pixels1 - 4f, 0.0f); + this._achievementIconBorders.Top.Set(pixels2 - 4f, 0.0f); + this.Append((UIElement) this._achievementIconBorders); + this._innerPanelTopTexture = TextureManager.Load("Images/UI/Achievement_InnerPanelTop"); + this._innerPanelBottomTexture = !this._large ? TextureManager.Load("Images/UI/Achievement_InnerPanelBottom") : TextureManager.Load("Images/UI/Achievement_InnerPanelBottom_Large"); + this._categoryTexture = TextureManager.Load("Images/UI/Achievement_Categories"); + } + + 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 = Main.fontItemStack.CreateWrappedText(this._achievement.Description.Value, (float) (((double) num2 - 20.0) * (1.0 / (double) baseScale2.X)), Language.ActiveCulture.CultureInfo); + Vector2 stringSize1 = ChatManager.GetStringSize(Main.fontItemStack, wrappedText, baseScale2, num2); + if (!this._large) + stringSize1 = ChatManager.GetStringSize(Main.fontItemStack, 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, 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, Main.fontItemStack, 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, Main.fontItemStack, 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() + "/" + ((int) trackerValues.Item2).ToString(); + Vector2 baseScale3 = new Vector2(0.75f); + Vector2 stringSize2 = ChatManager.GetStringSize(Main.fontItemStack, 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, Main.fontItemStack, 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, position, new Rectangle?(new Rectangle(0, 0, 2, this._innerPanelTopTexture.Height)), color); + spriteBatch.Draw(this._innerPanelTopTexture, 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, 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, position, new Rectangle?(new Rectangle(0, 0, 6, this._innerPanelBottomTexture.Height)), color); + spriteBatch.Draw(this._innerPanelBottomTexture, 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, 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 colorBarTexture = Main.colorBarTexture; + Texture2D colorBlipTexture = Main.colorBlipTexture; + Texture2D magicPixel = Main.magicPixel; + 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(colorBarTexture, spot, new Rectangle?(new Rectangle(5, 0, colorBarTexture.Width - 9, colorBarTexture.Height)), BackColor, 0.0f, new Vector2(84.5f, 0.0f), new Vector2(x, 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(colorBarTexture, spot + new Vector2((float) (-(double) x * 84.5 - 5.0), 0.0f), new Rectangle?(new Rectangle(0, 0, 5, colorBarTexture.Height)), BackColor, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 0.0f); + spriteBatch.Draw(colorBarTexture, spot + new Vector2(x * 84.5f, 0.0f), new Rectangle?(new Rectangle(colorBarTexture.Width - 4, 0, 4, colorBarTexture.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(magicPixel, 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(magicPixel, 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(magicPixel, 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/UICharacter.cs b/GameContent/UI/Elements/UICharacter.cs new file mode 100644 index 0000000..2eef6ee --- /dev/null +++ b/GameContent/UI/Elements/UICharacter.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICharacter +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICharacter : UIElement + { + private Player _player; + private Texture2D _texture; + private static Item _blankItem = new Item(); + + public UICharacter(Player player) + { + this._player = player; + this.Width.Set(59f, 0.0f); + this.Height.Set(58f, 0.0f); + this._texture = TextureManager.Load("Images/UI/PlayerBackground"); + this._useImmediateMode = true; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(this._texture, dimensions.Position(), Color.White); + 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.instance.DrawPlayer(this._player, vector2 + Main.screenPosition, 0.0f, Vector2.Zero); + this._player.inventory[this._player.selectedItem] = obj; + } + } +} diff --git a/GameContent/UI/Elements/UICharacterListItem.cs b/GameContent/UI/Elements/UICharacterListItem.cs new file mode 100644 index 0000000..4709642 --- /dev/null +++ b/GameContent/UI/Elements/UICharacterListItem.cs @@ -0,0 +1,271 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICharacterListItem +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +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 Texture2D _dividerTexture; + private Texture2D _innerPanelTexture; + private UICharacter _playerPanel; + private UIText _buttonLabel; + private UIText _deleteButtonLabel; + private Texture2D _buttonCloudActiveTexture; + private Texture2D _buttonCloudInactiveTexture; + private Texture2D _buttonFavoriteActiveTexture; + private Texture2D _buttonFavoriteInactiveTexture; + private Texture2D _buttonPlayTexture; + private Texture2D _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 = TextureManager.Load("Images/UI/Divider"); + this._innerPanelTexture = TextureManager.Load("Images/UI/InnerPanelBackground"); + this._buttonCloudActiveTexture = TextureManager.Load("Images/UI/ButtonCloudActive"); + this._buttonCloudInactiveTexture = TextureManager.Load("Images/UI/ButtonCloudInactive"); + this._buttonFavoriteActiveTexture = TextureManager.Load("Images/UI/ButtonFavoriteActive"); + this._buttonFavoriteInactiveTexture = TextureManager.Load("Images/UI/ButtonFavoriteInactive"); + this._buttonPlayTexture = TextureManager.Load("Images/UI/ButtonPlay"); + this._buttonDeleteTexture = TextureManager.Load("Images/UI/ButtonDelete"); + 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; + uiImageButton4.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + uiImageButton4.OnMouseOver += new UIElement.MouseEvent(this.DeleteMouseOver); + uiImageButton4.OnMouseOut += new UIElement.MouseEvent(this.DeleteMouseOut); + this._deleteButton = uiImageButton4; + if (!this._data.IsFavorite) + 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) => 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) + { + Main.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.RemoveChild((UIElement) this._deleteButton); + } + else + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + this.Append((UIElement) this._deleteButton); + } + 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); + } + + 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; + } + + private void DrawPanel(SpriteBatch spriteBatch, Vector2 position, float width) + { + spriteBatch.Draw(this._innerPanelTexture, position, new Rectangle?(new Rectangle(0, 0, 8, this._innerPanelTexture.Height)), Color.White); + spriteBatch.Draw(this._innerPanelTexture, 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, 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, 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(Main.heartTexture, position1 + new Vector2(5f, 2f), Color.White); + position1.X += 10f + (float) Main.heartTexture.Width; + Utils.DrawBorderString(spriteBatch, this._data.Player.statLifeMax.ToString() + " HP", position1 + new Vector2(0.0f, 3f), Color.White); + position1.X += 65f; + spriteBatch.Draw(Main.manaTexture, position1 + new Vector2(5f, 2f), Color.White); + position1.X += 10f + (float) Main.manaTexture.Width; + Utils.DrawBorderString(spriteBatch, this._data.Player.statManaMax.ToString() + " MP", position1 + new Vector2(0.0f, 3f), Color.White); + vector2.X += width1 + 5f; + Vector2 position2 = vector2; + float width2 = 140f; + if (GameCulture.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; + } + Vector2 pos1 = position2 + new Vector2((float) ((double) width2 * 0.5 - (double) Main.fontMouseText.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) Main.fontMouseText.MeasureString(text2).X * 0.5), 3f); + Utils.DrawBorderString(spriteBatch, text2, pos2, Color.White); + } + } +} diff --git a/GameContent/UI/Elements/UIGenProgressBar.cs b/GameContent/UI/Elements/UIGenProgressBar.cs new file mode 100644 index 0000000..7306622 --- /dev/null +++ b/GameContent/UI/Elements/UIGenProgressBar.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIGenProgressBar +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIGenProgressBar : UIElement + { + private Texture2D _texInnerDirt; + private Texture2D _texOuterCrimson; + private Texture2D _texOuterCorrupt; + private Texture2D _texOuterLower; + private float _visualOverallProgress; + private float _targetOverallProgress; + private float _visualCurrentProgress; + private float _targetCurrentProgress; + + public UIGenProgressBar() + { + if (Main.netMode != 2) + { + this._texInnerDirt = TextureManager.Load("Images/UI/WorldGen/Outer Dirt"); + this._texOuterCorrupt = TextureManager.Load("Images/UI/WorldGen/Outer Corrupt"); + this._texOuterCrimson = TextureManager.Load("Images/UI/WorldGen/Outer Crimson"); + this._texOuterLower = TextureManager.Load("Images/UI/WorldGen/Outer Lower"); + } + 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) + { + this._visualOverallProgress = this._targetOverallProgress; + this._visualCurrentProgress = this._targetCurrentProgress; + CalculatedStyle dimensions = this.GetDimensions(); + int completedWidth1 = (int) ((double) this._visualOverallProgress * 504.0); + int completedWidth2 = (int) ((double) this._visualCurrentProgress * 504.0); + Vector2 vector2 = new Vector2(dimensions.X, dimensions.Y); + Color filled = new Color(); + filled.PackedValue = WorldGen.crimson ? 4286836223U : 4283888223U; + this.DrawFilling2(spriteBatch, vector2 + new Vector2(20f, 40f), 16, completedWidth1, 564, 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, 504, filled, Color.Lerp(filled, Color.Black, 0.5f), new Color(33, 33, 33)); + Rectangle rectangle = this.GetDimensions().ToRectangle(); + rectangle.X -= 8; + spriteBatch.Draw(WorldGen.crimson ? this._texOuterCrimson : this._texOuterCorrupt, rectangle.TopLeft(), Color.White); + spriteBatch.Draw(this._texOuterLower, 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(Main.magicPixel, new Rectangle((int) topLeft.X + completedWidth, (int) topLeft.Y, totalWidth - completedWidth, tex.Height), new Rectangle?(new Rectangle(0, 0, 1, 1)), empty); + spritebatch.Draw(Main.magicPixel, 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(Main.magicPixel, new Rectangle((int) topLeft.X, (int) topLeft.Y, completedWidth, height), new Rectangle?(new Rectangle(0, 0, 1, 1)), filled); + spritebatch.Draw(Main.magicPixel, new Rectangle((int) topLeft.X + completedWidth, (int) topLeft.Y, totalWidth - completedWidth, height), new Rectangle?(new Rectangle(0, 0, 1, 1)), empty); + spritebatch.Draw(Main.magicPixel, 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/UIHeader.cs b/GameContent/UI/Elements/UIHeader.cs new file mode 100644 index 0000000..e6f3582 --- /dev/null +++ b/GameContent/UI/Elements/UIHeader.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIHeader +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = Main.fontDeathText.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(); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, Main.fontDeathText, this.Text, new Vector2(dimensions.X, dimensions.Y), Color.White); + } + } +} diff --git a/GameContent/UI/Elements/UIImage.cs b/GameContent/UI/Elements/UIImage.cs new file mode 100644 index 0000000..b5a0154 --- /dev/null +++ b/GameContent/UI/Elements/UIImage.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImage +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UIImage : UIElement + { + private Texture2D _texture; + public float ImageScale = 1f; + + public UIImage(Texture2D 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(Texture2D 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, dimensions.Position() + this._texture.Size() * (1f - this.ImageScale) / 2f, new Rectangle?(), Color.White, 0.0f, Vector2.Zero, 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..ff414e5 --- /dev/null +++ b/GameContent/UI/Elements/UIImageButton.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImageButton +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UIImageButton : UIElement + { + private Texture2D _texture; + private float _visibilityActive = 1f; + private float _visibilityInactive = 0.4f; + + public UIImageButton(Texture2D 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(Texture2D 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, dimensions.Position(), Color.White * (this.IsMouseHovering ? this._visibilityActive : this._visibilityInactive)); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + Main.PlaySound(12); + } + + 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..9a32b43 --- /dev/null +++ b/GameContent/UI/Elements/UIImageFramed.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImageFramed +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UIImageFramed : UIElement + { + private Texture2D _texture; + private Rectangle _frame; + public Color Color = Color.White; + + public UIImageFramed(Texture2D 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 SetImage(Texture2D 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); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(this._texture, dimensions.Position(), new Rectangle?(this._frame), this.Color); + } + } +} diff --git a/GameContent/UI/Elements/UIKeybindingListItem.cs b/GameContent/UI/Elements/UIKeybindingListItem.cs new file mode 100644 index 0000000..df211f1 --- /dev/null +++ b/GameContent/UI/Elements/UIKeybindingListItem.cs @@ -0,0 +1,202 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIKeybindingListItem +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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, Main.fontItemStack, 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(Main.fontItemStack, 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, Main.fontItemStack, 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 "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..be23ddf --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(Main.fontItemStack, text, baseScale); + position.X = (float) ((double) dimensions.X + (double) dimensions.Width / 2.0 - (double) stringSize.X / 2.0); + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, Main.fontItemStack, 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..5463dea --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.Graphics; +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 Texture2D _toggleTexture; + + public UIKeybindingSliderItem( + Func getText, + Func getStatus, + Action setStatusKeyboard, + Action setStatusGamepad, + int sliderIDInPage, + Color color) + { + this._color = color; + this._toggleTexture = TextureManager.Load("Images/UI/Settings_Toggle"); + 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, Main.fontItemStack, this._TextDisplayFunction(), position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + position.X -= 17f; + Main.colorBarTexture.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..1b75d0e --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +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 Texture2D _toggleTexture; + + public UIKeybindingToggleListItem(Func getText, Func getStatus, Color color) + { + this._color = color; + this._toggleTexture = TextureManager.Load("Images/UI/Settings_Toggle"); + 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, Main.fontItemStack, 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, 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..b07ee09 --- /dev/null +++ b/GameContent/UI/Elements/UIList.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIList +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIList : UIElement + { + protected List _items = new List(); + protected UIScrollbar _scrollbar; + private UIElement _innerList = (UIElement) new UIList.UIInnerList(); + private float _innerListHeight; + public float ListPadding = 5f; + + 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) + { + this._items[index].Top.Set(pixels, 0.0f); + this._items[index].Recalculate(); + CalculatedStyle outerDimensions = this._items[index].GetOuterDimensions(); + pixels += outerDimensions.Height + this.ListPadding; + } + 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() + { + 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 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); + } + } + } + } +} diff --git a/GameContent/UI/Elements/UIPanel.cs b/GameContent/UI/Elements/UIPanel.cs new file mode 100644 index 0000000..3cc4100 --- /dev/null +++ b/GameContent/UI/Elements/UIPanel.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIPanel +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIPanel : UIElement + { + private static int CORNER_SIZE = 12; + private static int BAR_SIZE = 4; + private static Texture2D _borderTexture; + private static Texture2D _backgroundTexture; + public Color BorderColor = Color.Black; + public Color BackgroundColor = new Color(63, 82, 151) * 0.7f; + + public UIPanel() + { + if (UIPanel._borderTexture == null) + UIPanel._borderTexture = TextureManager.Load("Images/UI/PanelBorder"); + if (UIPanel._backgroundTexture == null) + UIPanel._backgroundTexture = TextureManager.Load("Images/UI/PanelBackground"); + this.SetPadding((float) UIPanel.CORNER_SIZE); + } + + 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 - UIPanel.CORNER_SIZE, point1.Y + (int) dimensions.Height - UIPanel.CORNER_SIZE); + int width = point2.X - point1.X - UIPanel.CORNER_SIZE; + int height = point2.Y - point1.Y - UIPanel.CORNER_SIZE; + spriteBatch.Draw(texture, new Rectangle(point1.X, point1.Y, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(0, 0, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point1.Y, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, 0, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X, point2.Y, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(0, UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point2.Y, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + UIPanel.CORNER_SIZE, point1.Y, width, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE, 0, UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + UIPanel.CORNER_SIZE, point2.Y, width, UIPanel.CORNER_SIZE), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X, point1.Y + UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE, height), new Rectangle?(new Rectangle(0, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE, UIPanel.BAR_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point1.Y + UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE, height), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE + UIPanel.BAR_SIZE, UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE, UIPanel.BAR_SIZE)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + UIPanel.CORNER_SIZE, point1.Y + UIPanel.CORNER_SIZE, width, height), new Rectangle?(new Rectangle(UIPanel.CORNER_SIZE, UIPanel.CORNER_SIZE, UIPanel.BAR_SIZE, UIPanel.BAR_SIZE)), color); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + this.DrawPanel(spriteBatch, UIPanel._backgroundTexture, this.BackgroundColor); + this.DrawPanel(spriteBatch, UIPanel._borderTexture, this.BorderColor); + } + } +} diff --git a/GameContent/UI/Elements/UIProgressBar.cs b/GameContent/UI/Elements/UIProgressBar.cs new file mode 100644 index 0000000..4617b72 --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(Main.magicPixel, 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/UIScrollbar.cs b/GameContent/UI/Elements/UIScrollbar.cs new file mode 100644 index 0000000..3ce6b70 --- /dev/null +++ b/GameContent/UI/Elements/UIScrollbar.cs @@ -0,0 +1,113 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIScrollbar +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; +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 Texture2D _texture; + private Texture2D _innerTexture; + + public float ViewPosition + { + get => this._viewPosition; + set => this._viewPosition = MathHelper.Clamp(value, 0.0f, this._maxViewSize - this._viewSize); + } + + public UIScrollbar() + { + this.Width.Set(20f, 0.0f); + this.MaxWidth.Set(20f, 0.0f); + this._texture = TextureManager.Load("Images/UI/Scrollbar"); + this._innerTexture = TextureManager.Load("Images/UI/ScrollbarInner"); + 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) + Main.PlaySound(12); + this.DrawBar(spriteBatch, this._texture, dimensions.ToRectangle(), Color.White); + this.DrawBar(spriteBatch, this._innerTexture, 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/UIText.cs b/GameContent/UI/Elements/UIText.cs new file mode 100644 index 0000000..56f37c0 --- /dev/null +++ b/GameContent/UI/Elements/UIText.cs @@ -0,0 +1,75 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIText +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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; + + public string Text => this._text.ToString(); + + public Color TextColor + { + get => this._color; + set => this._color = value; + } + + public UIText(string text, float textScale = 1f, bool large = false) => this.InternalSetText((object) text, textScale, large); + + public UIText(LocalizedText text, float textScale = 1f, bool large = false) => 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); + + private void InternalSetText(object text, float textScale, bool large) + { + Vector2 vector2 = new Vector2((large ? Main.fontDeathText : Main.fontMouseText).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) + { + base.DrawSelf(spriteBatch); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + if (this._isLarge) + pos.Y -= 10f * this._textScale; + else + pos.Y -= 2f * this._textScale; + pos.X += (float) (((double) innerDimensions.Width - (double) this._textSize.X) * 0.5); + 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/UITextBox.cs b/GameContent/UI/Elements/UITextBox.cs new file mode 100644 index 0000000..97f941d --- /dev/null +++ b/GameContent/UI/Elements/UITextBox.cs @@ -0,0 +1,83 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UITextBox +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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.ToString().Length > this._maxLength) + text = text.ToString().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) + { + this._cursor = this.Text.Length; + base.DrawSelf(spriteBatch); + ++this._frameCount; + if ((this._frameCount %= 40) > 20) + return; + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + Vector2 vector2 = new Vector2((this.IsLarge ? Main.fontDeathText : Main.fontMouseText).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) * 0.5 + (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..0440fb4 --- /dev/null +++ b/GameContent/UI/Elements/UITextPanel`1.cs @@ -0,0 +1,84 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UITextPanel`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 + { + private T _text; + private float _textScale = 1f; + private Vector2 _textSize = Vector2.Zero; + private bool _isLarge; + private Color _color = Color.White; + private bool _drawPanel = true; + + 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 ? Main.fontDeathText : Main.fontMouseText).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); + 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 += (float) (((double) innerDimensions.Width - (double) this._textSize.X) * 0.5); + 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..e4b553f --- /dev/null +++ b/GameContent/UI/Elements/UIToggleImage.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIToggleImage +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 UIToggleImage : UIElement + { + private Texture2D _onTexture; + private Texture2D _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( + Texture2D 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; + point = this._onTextureOffset; + } + else + { + texture = this._offTexture; + 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/UIWorldListItem.cs b/GameContent/UI/Elements/UIWorldListItem.cs new file mode 100644 index 0000000..7d2579b --- /dev/null +++ b/GameContent/UI/Elements/UIWorldListItem.cs @@ -0,0 +1,297 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIWorldListItem +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.OS; +using Terraria.Graphics; +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 Texture2D _dividerTexture; + private Texture2D _innerPanelTexture; + private UIImage _worldIcon; + private UIText _buttonLabel; + private UIText _deleteButtonLabel; + private Texture2D _buttonCloudActiveTexture; + private Texture2D _buttonCloudInactiveTexture; + private Texture2D _buttonFavoriteActiveTexture; + private Texture2D _buttonFavoriteInactiveTexture; + private Texture2D _buttonPlayTexture; + private Texture2D _buttonSeedTexture; + private Texture2D _buttonDeleteTexture; + private UIImageButton _deleteButton; + + public bool IsFavorite => this._data.IsFavorite; + + public UIWorldListItem(WorldFileData data, int snapPointIndex) + { + this._data = data; + 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", snapPointIndex); + this.Append((UIElement) uiImageButton3); + pixels3 += 24f; + } + if (Main.UseSeedUI && 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", snapPointIndex); + this.Append((UIElement) uiImageButton4); + pixels3 += 24f; + } + UIImageButton uiImageButton5 = new UIImageButton(this._buttonDeleteTexture); + uiImageButton5.VAlign = 1f; + uiImageButton5.HAlign = 1f; + uiImageButton5.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + uiImageButton5.OnMouseOver += new UIElement.MouseEvent(this.DeleteMouseOver); + uiImageButton5.OnMouseOut += new UIElement.MouseEvent(this.DeleteMouseOut); + this._deleteButton = uiImageButton5; + if (!this._data.IsFavorite) + 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", snapPointIndex); + uiImageButton2.SetSnapPoint("Favorite", snapPointIndex); + uiImageButton5.SetSnapPoint("Delete", snapPointIndex); + } + + private void LoadTextures() + { + this._dividerTexture = TextureManager.Load("Images/UI/Divider"); + this._innerPanelTexture = TextureManager.Load("Images/UI/InnerPanelBackground"); + this._buttonCloudActiveTexture = TextureManager.Load("Images/UI/ButtonCloudActive"); + this._buttonCloudInactiveTexture = TextureManager.Load("Images/UI/ButtonCloudInactive"); + this._buttonFavoriteActiveTexture = TextureManager.Load("Images/UI/ButtonFavoriteActive"); + this._buttonFavoriteInactiveTexture = TextureManager.Load("Images/UI/ButtonFavoriteInactive"); + this._buttonPlayTexture = TextureManager.Load("Images/UI/ButtonPlay"); + this._buttonSeedTexture = TextureManager.Load("Images/UI/ButtonSeed"); + this._buttonDeleteTexture = TextureManager.Load("Images/UI/ButtonDelete"); + } + + private void InitializeAppearance() + { + this.Height.Set(96f, 0.0f); + this.Width.Set(0.0f, 1f); + this.SetPadding(6f); + this.BorderColor = new Color(89, 116, 213) * 0.7f; + } + + private Texture2D GetIcon() => TextureManager.Load("Images/UI/Icon" + (this._data.IsHardMode ? "Hallow" : "") + (this._data.HasCorruption ? "Corruption" : "Crimson")); + + 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.SeedText)); + + private void DeleteMouseOver(UIMouseEvent evt, UIElement listeningElement) => 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) + { + Main.PlaySound(10); + Main.selectedWorld = index; + Main.menuMode = 9; + break; + } + } + } + + private void PlayGame(UIMouseEvent evt, UIElement listeningElement) + { + if (listeningElement != evt.Target) + return; + this._data.SetAsActive(); + Main.PlaySound(10); + Main.GetInputText(""); + Main.menuMode = !Main.menuMultiplayer || SocialAPI.Network == null ? (!Main.menuMultiplayer ? 10 : 30) : 889; + if (Main.menuMultiplayer) + return; + WorldGen.playWorld(); + } + + 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.RemoveChild((UIElement) this._deleteButton); + } + else + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + this.Append((UIElement) this._deleteButton); + } + if (!(this.Parent.Parent is UIList parent)) + return; + parent.UpdateOrder(); + } + + private void SeedButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + ((Platform) Platform.Current).Clipboard = this._data.SeedText; + this._buttonLabel.SetText(Language.GetTextValue("UI.SeedCopied")); + } + + public override int CompareTo(object obj) + { + if (!(obj is UIWorldListItem uiWorldListItem)) + return base.CompareTo(obj); + if (this.IsFavorite && !uiWorldListItem.IsFavorite) + return -1; + if (!this.IsFavorite && uiWorldListItem.IsFavorite) + return 1; + return this._data.Name.CompareTo(uiWorldListItem._data.Name) != 0 ? this._data.Name.CompareTo(uiWorldListItem._data.Name) : this._data.GetFileName().CompareTo(uiWorldListItem._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); + } + + 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; + } + + private void DrawPanel(SpriteBatch spriteBatch, Vector2 position, float width) + { + spriteBatch.Draw(this._innerPanelTexture, position, new Rectangle?(new Rectangle(0, 0, 8, this._innerPanelTexture.Height)), Color.White); + spriteBatch.Draw(this._innerPanelTexture, 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, 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 color = this._data.IsValid ? Color.White : Color.Red; + Utils.DrawBorderString(spriteBatch, this._data.Name, new Vector2(x1 + 6f, dimensions.Y - 2f), color); + spriteBatch.Draw(this._dividerTexture, 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); + string text = this._data.IsExpertMode ? Language.GetTextValue("UI.Expert") : Language.GetTextValue("UI.Normal"); + float x2 = Main.fontMouseText.MeasureString(text).X; + float x3 = (float) ((double) width1 * 0.5 - (double) x2 * 0.5); + Utils.DrawBorderString(spriteBatch, text, position + new Vector2(x3, 3f), this._data.IsExpertMode ? new Color(217, 143, 244) : Color.White); + position.X += width1 + 5f; + float width2 = 150f; + if (!GameCulture.English.IsActive) + width2 += 40f; + this.DrawPanel(spriteBatch, position, width2); + string textValue1 = Language.GetTextValue("UI.WorldSizeFormat", (object) this._data.WorldSizeName); + float x4 = Main.fontMouseText.MeasureString(textValue1).X; + float x5 = (float) ((double) width2 * 0.5 - (double) x4 * 0.5); + Utils.DrawBorderString(spriteBatch, textValue1, 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 textValue2 = Language.GetTextValue("UI.WorldCreatedFormat", !GameCulture.English.IsActive ? (object) this._data.CreationTime.ToShortDateString() : (object) this._data.CreationTime.ToString("d MMMM yyyy")); + float x6 = Main.fontMouseText.MeasureString(textValue2).X; + float x7 = (float) ((double) width3 * 0.5 - (double) x6 * 0.5); + Utils.DrawBorderString(spriteBatch, textValue2, 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..9a2e998 --- /dev/null +++ b/GameContent/UI/EmoteBubble.cs @@ -0,0 +1,800 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.EmoteBubble +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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[580]; + 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 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); + } + 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 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 = Main.extraTexture[48]; + SpriteEffects effect = SpriteEffects.None; + Vector2 vector2 = this.GetPosition(out effect); + bool flag = this.lifeTime < 6 || this.lifeTimeStart - this.lifeTime < 6; + Rectangle rectangle = texture2D.Frame(8, 33, 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) + effect = SpriteEffects.None; + sb.Draw(texture2D, vector2, new Rectangle?(texture2D.Frame(8, 35, 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 = Main.npcHeadTexture[this.metadata]; + 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 this.anchor.entity.Top + 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 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.ZoneHoly) + 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) && WorldGen.shadowOrbSmashed) + 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 < 580; ++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 < 580; ++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.ZoneHoly) + 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); + if (!Main.bloodMoon || Main.dayTime) + return; + int num = Utils.SelectRandom(Main.rand, 16, 1); + 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) + return; + list.Add(54); + } + + 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..4070a27 --- /dev/null +++ b/GameContent/UI/EmoteID.cs @@ -0,0 +1,148 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.EmoteID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI +{ + public class EmoteID + { + public const int ItemDisplay = -1; + public const int Count = 126; + 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 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 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 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; + } +} diff --git a/GameContent/UI/ItemRarity.cs b/GameContent/UI/ItemRarity.cs new file mode 100644 index 0000000..baf16be --- /dev/null +++ b/GameContent/UI/ItemRarity.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.ItemRarity +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/States/UIAchievementsMenu.cs b/GameContent/UI/States/UIAchievementsMenu.cs new file mode 100644 index 0000000..f00a3de --- /dev/null +++ b/GameContent/UI/States/UIAchievementsMenu.cs @@ -0,0 +1,221 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIAchievementsMenu +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.Graphics; +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); + Texture2D texture = TextureManager.Load("Images/UI/Achievement_Categories"); + 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 = Main.fontMouseText.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, Main.fontMouseText, 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) + { + Main.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) => ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + + private void FilterList(UIMouseEvent evt, UIElement listeningElement) + { + 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/UICharacterSelect.cs b/GameContent/UI/States/UICharacterSelect.cs new file mode 100644 index 0000000..b8443a8 --- /dev/null +++ b/GameContent/UI/States/UICharacterSelect.cs @@ -0,0 +1,268 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UICharacterSelect +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UICharacterSelect : UIState + { + private static string noteToEveryone = "This code is terrible and you will risk cancer reading it --Yoraiz0r"; + private UIList _playerList; + private UITextPanel _backPanel; + private UITextPanel _newPanel; + private UIPanel _containerPanel; + 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(-25f, 1f); + this._playerList.Height.Set(0.0f, 1f); + this._playerList.ListPadding = 5f; + uiPanel.Append((UIElement) this._playerList); + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(0.0f, 1f); + scrollbar.HAlign = 1f; + uiPanel.Append((UIElement) scrollbar); + this._playerList.SetScrollbar(scrollbar); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.SelectPlayer"), 0.8f, true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-35f, 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); + } + + private void NewCharacterClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(10); + Player player = new Player(); + player.inventory[0].SetDefaults(3507); + player.inventory[0].Prefix(-1); + player.inventory[1].SetDefaults(3509); + player.inventory[1].Prefix(-1); + player.inventory[2].SetDefaults(3506); + player.inventory[2].Prefix(-1); + Main.PendingPlayer = player; + Main.menuMode = 2; + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(11); + Main.menuMode = 0; + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) => ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + + public override void OnActivate() + { + Main.ClearPendingPlayerSelectCallbacks(); + Main.LoadPlayers(); + 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; + Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft(); + Vector2 maximum = clippingRectangle.BottomRight(); + 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 num2 = 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[num2]; + point3.Unlink(); + UILinkPointNavigator.SetPosition(num2, snapPointArray[index2, index1].Position); + if (key3 != -1) + { + point3.Up = key3; + UILinkPointNavigator.Points[key3].Down = num2; + } + if (numArray[index2] != -1) + { + point3.Left = numArray[index2]; + UILinkPointNavigator.Points[numArray[index2]].Right = num2; + } + point3.Down = num1; + if (index1 == 0) + UILinkPointNavigator.Points[num1].Up = UILinkPointNavigator.Points[num1 + 1].Up = num2; + key3 = num2; + numArray[index2] = num2; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num2; + ++num2; + } + } + } + if (!PlayerInput.UsingGamepadUI || this._playerList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) + return; + UILinkPointNavigator.ChangePoint(3001); + } + } +} diff --git a/GameContent/UI/States/UIManageControls.cs b/GameContent/UI/States/UIManageControls.cs new file mode 100644 index 0000000..cf90bd6 --- /dev/null +++ b/GameContent/UI/States/UIManageControls.cs @@ -0,0 +1,1065 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIManageControls +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Linq; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.Graphics; +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", + "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 Texture2D _KeyboardGamepadTexture; + private Texture2D _keyboardGamepadBorderTexture; + private Texture2D _GameplayVsUITexture; + private Texture2D _GameplayVsUIBorderTexture; + private static int SnapPointIndex = 0; + + public override void OnInitialize() + { + this._KeyboardGamepadTexture = TextureManager.Load("Images/UI/Settings_Inputs"); + this._keyboardGamepadBorderTexture = TextureManager.Load("Images/UI/Settings_Inputs_Border"); + this._GameplayVsUITexture = TextureManager.Load("Images/UI/Settings_Inputs_2"); + this._GameplayVsUIBorderTexture = TextureManager.Load("Images/UI/Settings_Inputs_2_Border"); + 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; + 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; + 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; + 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; + uiPanel.Append((UIElement) this._buttonBorderVs2); + this._buttonProfile = new UIKeybindingSimpleListItem((Func) (() => PlayerInput.CurrentProfile.Name), 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", + "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.HandleSlider(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.InverseLerp(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 currentValue = Utils.InverseLerp(4f, 12f, (float) PlayerInput.CurrentProfile.InventoryMoveCD, true); + float num = UILinksInitializer.HandleSlider(currentValue, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if ((double) currentValue == (double) num) + return; + UILinkPointNavigator.Shortcuts.INV_MOVE_OPTION_CD = 8; + PlayerInput.CurrentProfile.InventoryMoveCD = (int) MathHelper.Clamp((float) (PlayerInput.CurrentProfile.InventoryMoveCD + Math.Sign(num - currentValue)), 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.HandleSlider(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.HandleSlider(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.HandleSlider(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.HandleSlider(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.HandleSlider(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.HandleSlider(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; + Main.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; + Main.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) + { + Main.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) => ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + + 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/UISortableElement.cs b/GameContent/UI/States/UISortableElement.cs new file mode 100644 index 0000000..1d16a7a --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..4dc02ad --- /dev/null +++ b/GameContent/UI/States/UIVirtualKeyboard.cs @@ -0,0 +1,789 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIVirtualKeyboard +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; +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 Texture2D _textureShift; + private Texture2D _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 = 0; + 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; + this._lastOffsetDown = 0; + this._edittingSign = this._keyboardContext == 1; + this._edittingChest = this._keyboardContext == 2; + UIVirtualKeyboard._currentInstance = this; + this._submitAction = submitAction; + this._cancelAction = cancelAction; + this._textureShift = TextureManager.Load("Images/UI/VK_Shift"); + this._textureBackspace = TextureManager.Load("Images/UI/VK_Backspace"); + this.Top.Pixels = (float) this._lastOffsetDown; + float num1 = (float) (-5000 * this._edittingSign.ToInt()); + float maxValue = (float) byte.MaxValue; + float num2 = 0.0f; + float num3 = 516f; + UIElement element = new UIElement(); + element.Width.Pixels = (float) ((double) num3 + 8.0 + 16.0); + element.Top.Precent = num2; + element.Top.Pixels = maxValue; + element.Height.Pixels = 266f; + element.HAlign = 0.5f; + element.SetPadding(0.0f); + this.outerLayer1 = element; + UIElement uiElement = new UIElement(); + uiElement.Width.Pixels = (float) ((double) num3 + 8.0 + 16.0); + uiElement.Top.Precent = num2; + uiElement.Top.Pixels = maxValue; + 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 num4 = -79f; + 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 = num3; + this._textBox.Top.Pixels = (float) ((double) num4 + (double) maxValue - 10.0) + num1; + this._textBox.Top.Precent = num2; + 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) => + { + Main.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) => + { + Main.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 += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string text = this.Text.Trim(); + if (text.Length <= 0 && !this._edittingSign && !this._edittingChest && !this._allowEmpty) + return; + Main.PlaySound(10); + this._submitAction(text); + }); + 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) => + { + Main.PlaySound(11); + this._cancelAction(); + }); + 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.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string text = this.Text.Trim(); + if (text.Length <= 0 && !this._edittingSign && !this._edittingChest && !this._allowEmpty) + return; + Main.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) => + { + Main.PlaySound(11); + this._cancelAction(); + }); + this.outerLayer2.Append((UIElement) this._cancelButton2); + UITextPanel keyboardButton1 = this.CreateKeyboardButton((object) "", 8, 4, 2); + keyboardButton1.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + Main.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 = num3; + uiText.Top.Pixels = (float) ((double) num4 - 37.0 - 4.0) + maxValue + num1; + uiText.Top.Precent = num2; + uiText.Height.Pixels = 37f; + this.Append((UIElement) uiText); + this._label = uiText; + this.Append(element); + this._textBox.SetTextMaxLength(this._edittingSign ? 99999 : 20); + this.Text = startingText; + if (this.Text.Length == 0) + this.SetKeyState(UIVirtualKeyboard.KeyState.Shift); + UIVirtualKeyboard.OffsetDown = 9999; + this.UpdateOffsetDown(); + } + + 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) => + { + Main.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) => + { + Main.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) => + { + Main.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) + { + Main.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; + this.SetupGamepadPoints(spriteBatch); + PlayerInput.WritingText = true; + Main.instance.HandleIME(); + Vector2 position; + ref Vector2 local1 = ref position; + double num1 = (double) (Main.screenWidth / 2); + Rectangle rectangle = this._textBox.GetDimensions().ToRectangle(); + double num2 = (double) (rectangle.Bottom + 32); + local1 = new Vector2((float) num1, (float) num2); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + string inputText = Main.GetInputText(this.Text); + 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 (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 num3 = (byte) (((int) byte.MaxValue + (int) Main.tileColor.R * 2) / 3); + Color color = new Color((int) num3, (int) num3, (int) num3, (int) byte.MaxValue); + this._textBox.TextColor = Color.Lerp(Color.White, color, 0.2f); + this._label.TextColor = Color.Lerp(Color.White, color, 0.2f); + ref Vector2 local2 = ref position; + double num4 = (double) (Main.screenWidth / 2); + rectangle = this._textBox.GetDimensions().ToRectangle(); + double num5 = (double) (rectangle.Bottom + 32); + local2 = new Vector2((float) num4, (float) num5); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + } + } + + private void UpdateOffsetDown() + { + 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; + Main.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; + string text = UIVirtualKeyboard._currentInstance.Text.Trim(); + if (text.Length <= 0) + return; + Main.PlaySound(10); + UIVirtualKeyboard._currentInstance._submitAction(text); + } + + public static void Cancel() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + Main.PlaySound(11); + UIVirtualKeyboard._currentInstance._cancelAction(); + } + + public static void Write(string text) + { + if (UIVirtualKeyboard._currentInstance == null) + return; + Main.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; + Main.PlaySound(12); + UIVirtualKeyboard._currentInstance._textBox.CursorLeft(); + } + + public static void CursorRight() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + Main.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; + } + + public delegate void KeyboardSubmitEvent(string text); + + public enum KeyState + { + Default, + Symbol, + Shift, + } + } +} diff --git a/GameContent/UI/States/UIWorldLoad.cs b/GameContent/UI/States/UIWorldLoad.cs new file mode 100644 index 0000000..6052acd --- /dev/null +++ b/GameContent/UI/States/UIWorldLoad.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIWorldLoad +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.UI; +using Terraria.UI.Gamepad; +using Terraria.World.Generation; + +namespace Terraria.GameContent.UI.States +{ + public class UIWorldLoad : UIState + { + private UIGenProgressBar _progressBar = new UIGenProgressBar(); + private UIHeader _progressMessage = new UIHeader(); + private GenerationProgress _progress; + + public UIWorldLoad(GenerationProgress progress) + { + this._progressBar.Top.Pixels = 370f; + 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._progress = progress; + 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); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + this._progressBar.SetProgress(this._progress.TotalProgress, this._progress.Value); + this._progressMessage.Text = this._progress.Message; + this.UpdateGamepadSquiggle(); + } + + private void UpdateGamepadSquiggle() + { + Vector2 vector2 = new Vector2((float) Math.Cos((double) Main.GlobalTime * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTime * 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() => 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..ba8517c --- /dev/null +++ b/GameContent/UI/States/UIWorldSelect.cs @@ -0,0 +1,259 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIWorldSelect +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameContent.UI.Elements; +using Terraria.GameInput; +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 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(-25f, 1f); + this._worldList.Height.Set(0.0f, 1f); + this._worldList.ListPadding = 5f; + uiPanel.Append((UIElement) this._worldList); + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(0.0f, 1f); + scrollbar.HAlign = 1f; + uiPanel.Append((UIElement) scrollbar); + this._worldList.SetScrollbar(scrollbar); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.SelectWorld"), 0.8f, true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-35f, 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); + } + + private void NewWorldClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(10); + Main.menuMode = 16; + Main.newWorldName = Lang.gen[57].Value + " " + (object) (Main.WorldList.Count + 1); + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(11); + Main.menuMode = Main.menuMultiplayer ? 12 : 1; + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + Main.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) => ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + + 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(); + 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()); + })); + int num = 0; + foreach (WorldFileData data in worldFileDataList) + this._worldList.Add((UIElement) new UIWorldListItem(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 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; + Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft(); + Vector2 maximum = clippingRectangle.BottomRight(); + 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 num2 = 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[num2]; + point3.Unlink(); + UILinkPointNavigator.SetPosition(num2, snapPointArray[index2, index1].Position); + if (key3 != -1) + { + point3.Up = key3; + UILinkPointNavigator.Points[key3].Down = num2; + } + if (numArray[index2] != -1) + { + point3.Left = numArray[index2]; + UILinkPointNavigator.Points[numArray[index2]].Right = num2; + } + point3.Down = num1; + if (index1 == 0) + UILinkPointNavigator.Points[num1].Up = UILinkPointNavigator.Points[num1 + 1].Up = num2; + key3 = num2; + numArray[index2] = num2; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num2; + ++num2; + } + } + } + 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..3fee3cb --- /dev/null +++ b/GameContent/UI/WiresUI.cs @@ -0,0 +1,595 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.WiresUI +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 0; + + 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.showItemIcon && player.showItemIcon2 != 0 && player.showItemIcon2 != 3625) + { + flag2 = false; + this._lineOpacity = 0.0f; + } + else if (!player.showItemIcon && (!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.LockTileUseButton || 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 = Main.wireUITexture[(WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 8 : 0) + (flag3 ? 1 : 0)]; + Texture2D texture2D2 = (Texture2D) null; + switch (index) + { + case 0: + case 1: + case 2: + case 3: + texture2D2 = Main.wireUITexture[2 + index]; + break; + case 4: + texture2D2 = Main.wireUITexture[WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 7 : 6]; + break; + case 5: + texture2D2 = Main.wireUITexture[10]; + 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 = Main.wireUITexture[(WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 8 : 0) + (flag3 ? 1 : 0)]; + Texture2D texture2D2 = (Texture2D) null; + switch (index) + { + case 0: + case 1: + case 2: + case 3: + texture2D2 = Main.wireUITexture[2 + index]; + break; + case 4: + texture2D2 = Main.wireUITexture[WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 7 : 6]; + break; + case 5: + texture2D2 = Main.wireUITexture[10]; + 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 builderAccTexture = Main.builderAccTexture; + Texture2D texture = builderAccTexture; + 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(texture, position, new Rectangle?(r3), color1 * num2, 0.0f, r3.Size() / 2f, scale, SpriteEffects.None, 0.0f); + spriteBatch.Draw(builderAccTexture, 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(builderAccTexture, 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..2dac9b7 --- /dev/null +++ b/GameContent/UI/WorldUIAnchor.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.WorldUIAnchor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/GameInput/InputMode.cs b/GameInput/InputMode.cs new file mode 100644 index 0000000..3cbcef6 --- /dev/null +++ b/GameInput/InputMode.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.InputMode +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..70bf00e --- /dev/null +++ b/GameInput/KeyConfiguration.cs @@ -0,0 +1,80 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.KeyConfiguration +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Add("MouseLeft", new List() + { + "Mouse1" + }); + if (!dictionary.ContainsKey("Inventory") || dictionary["Inventory"].Count == 0) + dictionary.Add("Inventory", new List() + { + "Escape" + }); + return dictionary; + } + } +} diff --git a/GameInput/LockOnHelper.cs b/GameInput/LockOnHelper.cs new file mode 100644 index 0000000..fd2b378 --- /dev/null +++ b/GameInput/LockOnHelper.cs @@ -0,0 +1,402 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.LockOnHelper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 = false; + 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 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 (!PlayerInput.UsingGamepad) + { + LockOnHelper.SetActive(false); + } + else + { + if (--LockOnHelper._lifeTimeArrowDisplay < 0) + LockOnHelper._lifeTimeArrowDisplay = 0; + LockOnHelper.Handle3DSTarget(); + 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 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 Handle3DSTarget() + { + LockOnHelper._threeDSTarget = -1; + if (LockOnHelper.UseMode != LockOnHelper.LockOnMode.ThreeDS || !PlayerInput.UsingGamepad) + 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) + LockOnHelper._threeDSTarget = 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; + } + } + + 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; + Vector2 vector2 = 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.00999999977648258 && (LockOnHelper.UseMode != LockOnHelper.LockOnMode.ThreeDS || (double) Vector2.Dot(n.DirectionFrom(center), vector2) >= 0.649999976158142)) + 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.townNPC && 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 lockOnCursorTexture = Main.LockOnCursorTexture; + Rectangle r1 = new Rectangle(0, 0, lockOnCursorTexture.Width, 12); + Rectangle r2 = new Rectangle(0, 16, lockOnCursorTexture.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.GlobalTime * 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) + 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)) - Main.screenPosition, (float) Main.npc[i].height); + spriteBatch.Draw(lockOnCursorTexture, 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(lockOnCursorTexture, 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.GlobalTime * 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(lockOnCursorTexture, 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(lockOnCursorTexture, 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..c596899 --- /dev/null +++ b/GameInput/PlayerInput.cs @@ -0,0 +1,1811 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PlayerInput +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 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" + }; + private static bool _canReleaseRebindingLock = true; + private static int _memoOfLastPoint = -1; + public static int NavigatorRebindingLock = 0; + 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 = false; + private static string _invalidatorCheck = ""; + private static bool _lastActivityState = false; + public static MouseState MouseInfo; + public static MouseState MouseInfoOld; + public static int MouseX; + public static int MouseY; + public static bool LockTileUseButton = false; + public static List MouseKeys = new List(); + public static int PreUIX = 0; + public static int PreUIY = 0; + public static int PreLockOnX = 0; + public static int PreLockOnY = 0; + 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 static bool _InBuildingMode = false; + private static int _UIPointForBuildingMode = -1; + public static bool WritingText = false; + 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 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 ? 1 : (Main.player[Main.myPlayer].sign != -1 ? 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 => PlayerInput.UsingGamepad && !UILinkPointNavigator.Available; + + private static bool InvalidateKeyboardSwap() + { + if (PlayerInput._invalidatorCheck.Length == 0) + return false; + string str = ""; + foreach (Keys pressedKey in Main.keyState.GetPressedKeys()) + str = str + pressedKey.ToString() + ", "; + 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 = ""; + foreach (Keys pressedKey in Main.keyState.GetPressedKeys()) + str = str + pressedKey.ToString() + ", "; + PlayerInput._invalidatorCheck = str; + } + PlayerInput._lastActivityState = isActive; + } + + public static bool InBuildingMode => PlayerInput._InBuildingMode; + + public static void EnterBuildingMode() + { + PlayerInput._InBuildingMode = true; + PlayerInput._UIPointForBuildingMode = UILinkPointNavigator.CurrentPoint; + Main.SmartCursorEnabled = true; + 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() + { + 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(); + PlayerInput.KeyboardInput(); + PlayerInput.GamePadInput(); + 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(); + } + + 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; + } + + private static void 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 (!flag2 || !Main.instance.IsActive && !Main.AllowUnfocusedInputOnGamepad) + return; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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 = Main.GameViewMatrix.ZoomMatrix.M11; + Vector2 vector2_4 = gamepadThumbstickRight * vector2_3 * m11; + 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 = Main.GameViewMatrix.ZoomMatrix.M11; + Vector2 vector2_6 = gamepadThumbstickLeft * new Vector2((float) (Player.tileRangeX * 16), (float) (Player.tileRangeY * 16)) * m11; + if (num3 != 0) + vector2_6 = gamepadThumbstickLeft * new Vector2((float) ((Player.tileRangeX + num3) * 16), (float) ((Player.tileRangeY + num3) * 16)) * m11; + 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; + int num11 = num4; + PlayerInput.MouseX = x + num11; + PlayerInput.MouseY = y + num5; + } + 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 m11 = Main.GameViewMatrix.ZoomMatrix.M11; + num14 = (int) Utils.Clamp((float) num12, (float) (-(Player.tileRangeX + num3) * 16) * m11, (float) ((Player.tileRangeX + num3) * 16) * m11); + num15 = (int) Utils.Clamp((float) num13, (float) (-(Player.tileRangeY + num3) * 16) * m11, (float) ((Player.tileRangeY + num3) * 16) * m11); + } + if (flag6 && !flag1 | flag4) + { + float num19 = 0.81f; + if (flag4) + num19 = 0.95f; + num14 = (int) ((double) num14 * (double) num19); + num15 = (int) ((double) num15 * (double) num19); + } + } + 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) + return; + Main.SetCameraGamepadLerp(0.1f); + } + + private static void MouseInput() + { + bool flag = false; + PlayerInput.MouseInfoOld = PlayerInput.MouseInfo; + PlayerInput.MouseInfo = Mouse.GetState(); + PlayerInput.ScrollWheelValue += PlayerInput.MouseInfo.ScrollWheelValue; + int num1 = PlayerInput.MouseInfo.X - PlayerInput.MouseInfoOld.X; + int num2 = PlayerInput.MouseInfo.Y - PlayerInput.MouseInfoOld.Y; + if (num1 != 0 || num2 != 0 || PlayerInput.MouseInfo.ScrollWheelValue != PlayerInput.MouseInfoOld.ScrollWheelValue) + { + PlayerInput.MouseX = PlayerInput.MouseInfo.X; + PlayerInput.MouseY = PlayerInput.MouseInfo.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 void KeyboardInput() + { + bool flag1 = false; + bool flag2 = false; + Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + if (PlayerInput.InvalidateKeyboardSwap() && PlayerInput.MouseKeys.Count == 0) + return; + for (int index = 0; index < pressedKeys.Length; ++index) + { + if (pressedKeys[index] == Keys.LeftShift || pressedKeys[index] == Keys.RightShift) + flag1 = true; + else if (pressedKeys[index] == Keys.LeftAlt || pressedKeys[index] == Keys.RightAlt) + flag2 = true; + } + string blockKey = Main.blockKey; + Keys keys = Keys.None; + string str1 = keys.ToString(); + if (blockKey != str1) + { + bool flag3 = false; + for (int index = 0; index < pressedKeys.Length; ++index) + { + if (pressedKeys[index].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 stringList = new List(pressedKeys.Length); + for (int index = 0; index < pressedKeys.Length; ++index) + stringList.Add(pressedKeys[index].ToString()); + if (PlayerInput.WritingText) + stringList.Clear(); + int count = stringList.Count; + stringList.AddRange((IEnumerable) PlayerInput.MouseKeys); + bool flag4 = false; + for (int index = 0; index < stringList.Count; ++index) + { + string newKey = stringList[index].ToString(); + string str2 = stringList[index]; + keys = Keys.Tab; + string str3 = keys.ToString(); + if (!(str2 == str3) || ((!flag1 ? 0 : (SocialAPI.Mode == SocialMode.Steam ? 1 : 0)) | (flag2 ? 1 : 0)) == 0) + { + if (PlayerInput.CheckRebindingProcessKeyboard(newKey)) + return; + 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) + return; + PlayerInput.CurrentInputMode = InputMode.Keyboard; + } + + private static void FixDerpedRebinds() + { + List stringList = new List() + { + "MouseLeft", + "MouseRight", + "Inventory" + }; + foreach (InputMode key1 in Enum.GetValues(typeof (InputMode))) + { + if (key1 != InputMode.Mouse) + { + foreach (string key2 in stringList) + { + if (PlayerInput.CurrentProfile.InputModes[key1].KeyStatus[key2].Count < 1) + { + string key3 = "Redigit's Pick"; + if (PlayerInput.OriginalProfiles.ContainsKey(PlayerInput._selectedProfile)) + key3 = PlayerInput._selectedProfile; + PlayerInput.CurrentProfile.InputModes[key1].KeyStatus[key2].AddRange((IEnumerable) PlayerInput.OriginalProfiles[key3].InputModes[key1].KeyStatus[key2]); + } + } + } + } + } + + private static bool CheckRebindingProcessGamepad(string newKey) + { + PlayerInput._canReleaseRebindingLock = false; + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.XBoxGamepad) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + Main.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; + Main.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(); + 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; + Main.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; + } + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.KeyboardUI) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + Main.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; + } + PlayerInput.FixDerpedRebinds(); + 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; + Point tileCoordinates = (Main.MouseScreen + Main.screenPosition + zero * new Vector2(16f)).ToTileCoordinates(); + PlayerInput.MouseX = tileCoordinates.X * 16 + 8 - (int) Main.screenPosition.X; + PlayerInput.MouseY = tileCoordinates.Y * 16 + 8 - (int) Main.screenPosition.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["HotbarMinus"]) + PlayerInput.BuildCommand(Lang.inter[119].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"]); + 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 + { + if (!PlayerInput.GrappleAndInteractAreShared || !WiresUI.Settings.DrawToolModeUI && (!Main.SmartInteractShowingGenuine || Main.SmartInteractNPC == -1 && (Main.SmartInteractX == -1 || Main.SmartInteractY == -1))) + str1 += PlayerInput.BuildCommand(Lang.misc[57].Value, false, inputMode.KeyStatus["Grapple"]); + 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"]); + if (Main.SmartInteractShowingGenuine) + { + if (Main.SmartInteractNPC != -1) + str2 += PlayerInput.BuildCommand(Lang.misc[80].Value, false, inputMode.KeyStatus["MouseRight"]); + else if (Main.SmartInteractX != -1 && Main.SmartInteractY != -1) + { + 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"]); + } + } + 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.GenInput(Bindings[0]); + for (int index = 1; index < Bindings.Length; ++index) + { + string str3 = PlayerInput.GenInput(Bindings[index]); + if (str3.Length > 0) + str2 = str2 + "/" + str3; + } + if (str2.Length > 0) + { + str2 = str2 + ": " + CommandText; + if (!Last) + str2 += " "; + } + return str2; + } + + private static string GenInput(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; + } + + 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"); + 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.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["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"); + 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"); + 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"); + 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..519f9cd --- /dev/null +++ b/GameInput/PlayerInputProfile.cs @@ -0,0 +1,305 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PlayerInputProfile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 (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) 194); + 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[18] + { + "MouseLeft", + "MouseRight", + "Up", + "Down", + "Left", + "Right", + "Jump", + "Grapple", + "SmartSelect", + "SmartCursor", + "QuickMount", + "QuickHeal", + "QuickMana", + "QuickBuff", + "Throw", + "Inventory", + "ViewZoomIn", + "ViewZoomOut" + }; + 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..c05ae22 --- /dev/null +++ b/GameInput/PresetProfiles.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PresetProfiles +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/TriggerNames.cs b/GameInput/TriggerNames.cs new file mode 100644 index 0000000..5b92a7b --- /dev/null +++ b/GameInput/TriggerNames.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggerNames +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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"; + } +} diff --git a/GameInput/TriggersPack.cs b/GameInput/TriggersPack.cs new file mode 100644 index 0000000..ffc78b9 --- /dev/null +++ b/GameInput/TriggersPack.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggersPack +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..4f5eda3 --- /dev/null +++ b/GameInput/TriggersSet.cs @@ -0,0 +1,434 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggersSet +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 && 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; + 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.LockTileUseButton = false; + if (this.MouseRight && !p.mouseInterface && !Main.blockMouse & !PlayerInput.LockTileUseButton && !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.LockTileUseButton = false; + if (this.MouseRight && !p.mouseInterface && !Main.blockMouse & !PlayerInput.LockTileUseButton && !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; + } + } +} diff --git a/Gore.cs b/Gore.cs new file mode 100644 index 0000000..23d44d7 --- /dev/null +++ b/Gore.cs @@ -0,0 +1,743 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Gore +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 frame; + public byte frameCounter; + public byte numFrames = 1; + + public void Update() + { + if (Main.netMode == 2 || !this.active) + return; + bool flag = 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; + Gore.goreTime = 0; + } + this.sticky = false; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type >= 706 && this.type <= 717 || this.type == 943) + { + this.alpha = (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.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; + } + if (this.type == 943 && this.frame > (byte) 4) + { + if (Main.rand.Next(2) == 0) + { + Gore gore = Main.gore[Gore.NewGore(this.position, this.velocity, this.type, this.scale)]; + gore.frameCounter = (byte) 0; + gore.frame = (byte) 7; + gore.velocity = Vector2.UnitY * 1f; + } + if (Main.rand.Next(2) == 0) + { + Gore gore = Main.gore[Gore.NewGore(this.position, this.velocity, this.type, this.scale)]; + gore.frameCounter = (byte) 0; + gore.frame = (byte) 7; + gore.velocity = Vector2.UnitY * 2f; + } + } + } + } + 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 == 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 / 4; + if ((int) ++this.frame >= 4 + num * 4) + this.frame = (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 < 411 || this.type > 430) + this.velocity.Y += 0.2f; + } + 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.windSpeed * 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 (Main.goreLoaded[this.type]) + { + Rectangle rectangle1 = new Rectangle((int) this.position.X, (int) this.position.Y, (int) ((double) Main.goreTexture[this.type].Width * (double) this.scale), (int) ((double) Main.goreTexture[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 (Main.goreLoaded[this.type] && (double) num5 != -1.0) + { + float num6 = (float) ((double) Main.goreTexture[this.type].Width * (double) this.scale * 0.800000011920929); + float x = this.position.X; + float y = this.position.Y; + float num7 = (float) Main.goreTexture[this.type].Width * this.scale; + float num8 = (float) Main.goreTexture[this.type].Height * this.scale; + int Type = 31; + for (int index1 = 0; (double) index1 < (double) num6; ++index1) + { + int index2 = Dust.NewDust(new Vector2(x, y), (int) num7, (int) num8, Type); + Main.dust[index2].velocity *= (float) ((1.0 + (double) num5) / 3.0); + Main.dust[index2].noGravity = true; + Main.dust[index2].alpha = 100; + Main.dust[index2].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.windSpeed * 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 (Main.goreLoaded[this.type]) + { + Rectangle rectangle3 = new Rectangle((int) this.position.X, (int) this.position.Y, (int) ((double) Main.goreTexture[this.type].Width * (double) this.scale), (int) ((double) Main.goreTexture[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) Main.goreTexture[this.type].Width * (double) this.scale), (int) ((double) Main.goreTexture[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 (Main.goreLoaded[this.type]) + { + float num9 = (float) ((double) Main.goreTexture[this.type].Width * (double) this.scale * 0.800000011920929); + float x = this.position.X; + float y = this.position.Y; + float num10 = (float) Main.goreTexture[this.type].Width * this.scale; + float num11 = (float) Main.goreTexture[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 index3 = 0; (double) index3 < (double) num9; ++index3) + { + int index4 = Dust.NewDust(new Vector2(x, y), (int) num10, (int) num11, Type); + Main.dust[index4].noGravity = true; + Main.dust[index4].alpha = 100; + Main.dust[index4].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) + { + 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) + Main.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) + Main.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 index5 = (int) ((double) this.position.X + 8.0) / 16; + int index6 = (int) ((double) this.position.Y + 14.0) / 16; + if (Main.tile[index5, index6] != null && Main.tile[index5, index6].liquid > (byte) 0) + { + this.velocity *= 0.0f; + this.position.Y = (float) (index6 * 16 - (int) Main.tile[index5, index6].liquid / 16); + } + } + } + else if (this.sticky) + { + int num14 = 32; + if (Main.goreLoaded[this.type]) + { + num14 = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num14) + num14 = Main.goreTexture[this.type].Height; + } + if (flag) + 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 (flag) + 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 (Main.goreLoaded[this.type]) + { + num16 = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num16) + num16 = Main.goreTexture[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) + { + if ((double) this.velocity.Y < 0.0) + { + Vector2 Velocity = new Vector2(this.velocity.X, 0.6f); + int num18 = 32; + if (Main.goreLoaded[this.type]) + { + num18 = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num18) + num18 = Main.goreTexture[this.type].Height; + } + int num19 = (int) ((double) num18 * 0.899999976158142); + Vector2 vector2 = Collision.TileCollision(this.position, Velocity, (int) ((double) num19 * (double) this.scale), (int) ((double) num19 * (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 (Main.goreLoaded[this.type]) + { + num = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num) + num = Main.goreTexture[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; + } + } + else if (GoreID.Sets.SpecialAI[this.type] == 3) + { + if ((double) this.velocity.Y < 0.0) + { + Vector2 Velocity = new Vector2(this.velocity.X, -0.2f); + int num20 = 8; + if (Main.goreLoaded[this.type]) + { + num20 = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num20) + num20 = Main.goreTexture[this.type].Height; + } + int num21 = (int) ((double) num20 * 0.899999976158142); + Vector2 vector2 = Collision.TileCollision(this.position, Velocity, (int) ((double) num21 * (double) this.scale), (int) ((double) num21 * (double) this.scale)); + vector2.X *= 0.94f; + if ((double) vector2.X > -0.01 && (double) vector2.X < 0.01) + vector2.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.X; + } + else + { + this.velocity.Y += (float) Math.PI / 180f; + Vector2 Velocity = new Vector2(Vector2.UnitY.RotatedBy((double) this.velocity.Y).X * 1f, Math.Abs(Vector2.UnitY.RotatedBy((double) this.velocity.Y).Y) * 1f); + int num = 8; + if (Main.goreLoaded[this.type]) + { + num = Main.goreTexture[this.type].Width; + if (Main.goreTexture[this.type].Height < num) + num = Main.goreTexture[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() + 1.570796f; + if (this.timeLeft > 0) + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + else + this.alpha += GoreID.Sets.DisappearSpeedAlpha[this.type]; + } + } + else + this.position += this.velocity; + if (this.alpha >= (int) byte.MaxValue) + this.active = false; + if ((double) this.light <= 0.0) + return; + 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 (Main.goreLoaded[this.type]) + Lighting.AddLight((int) (((double) this.position.X + (double) Main.goreTexture[this.type].Width * (double) this.scale / 2.0) / 16.0), (int) (((double) this.position.Y + (double) Main.goreTexture[this.type].Height * (double) this.scale / 2.0) / 16.0), R, G, B); + else + 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); + } + + 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) + return 500; + if (Main.rand == null) + Main.rand = new UnifiedRandom(); + int index1 = 500; + for (int index2 = 0; index2 < 500; ++index2) + { + if (!Main.gore[index2].active) + { + index1 = index2; + break; + } + } + if (index1 == 500) + return index1; + Main.gore[index1].numFrames = (byte) 1; + Main.gore[index1].frame = (byte) 0; + 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) + { + 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 (GoreID.Sets.SpecialAI[Type] == 3) + { + Main.gore[index1].velocity = new Vector2((float) (((double) Main.rand.NextFloat() - 0.5) * 1.0), Main.rand.NextFloat() * 6.283185f); + Main.gore[index1].numFrames = (byte) 8; + Main.gore[index1].frame = (byte) Main.rand.Next(8); + Main.gore[index1].frameCounter = (byte) Main.rand.Next(8); + } + if (GoreID.Sets.SpecialAI[Type] == 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 && Main.goreLoaded[Type]) + { + Main.gore[index1].position.X = Position.X - (float) (Main.goreTexture[Type].Width / 2) * Scale; + Main.gore[index1].position.Y = Position.Y - (float) Main.goreTexture[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 num = Main.rand.Next(4) * 5; + Main.gore[index1].type += num; + 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 (GoreID.Sets.SpecialAI[Type] == 2) + { + Main.gore[index1].sticky = false; + if (Main.goreLoaded[Type]) + { + Main.gore[index1].alpha = 150; + Main.gore[index1].velocity = Velocity; + Main.gore[index1].position.X = Position.X - (float) (Main.goreTexture[Type].Width / 2) * Scale; + Main.gore[index1].position.Y = Position.Y - (float) ((double) Main.goreTexture[Type].Height * (double) Scale / 2.0); + Main.gore[index1].timeLeft = Main.rand.Next(Gore.goreTime / 2, Gore.goreTime + 1); + } + } + 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); + 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 new Color(r, g, b, a); + } + } +} diff --git a/Graphics/Capture/CaptureBiome.cs b/Graphics/Capture/CaptureBiome.cs new file mode 100644 index 0000000..86f30bb --- /dev/null +++ b/Graphics/Capture/CaptureBiome.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Capture +{ + public class CaptureBiome + { + public static CaptureBiome[] Biomes = new CaptureBiome[12] + { + new CaptureBiome(0, 0, 0), + null, + new CaptureBiome(1, 2, 2, CaptureBiome.TileColorStyle.Corrupt), + new CaptureBiome(3, 0, 3, CaptureBiome.TileColorStyle.Jungle), + new CaptureBiome(6, 2, 4), + new CaptureBiome(7, 4, 5), + new CaptureBiome(2, 1, 6), + new CaptureBiome(9, 6, 7, CaptureBiome.TileColorStyle.Mushroom), + new CaptureBiome(0, 0, 8), + null, + new CaptureBiome(8, 5, 10, CaptureBiome.TileColorStyle.Crimson), + null + }; + public readonly int WaterStyle; + public readonly int BackgroundIndex; + public readonly int BackgroundIndex2; + public readonly CaptureBiome.TileColorStyle TileColor; + + public CaptureBiome( + int backgroundIndex, + int backgroundIndex2, + int waterStyle, + CaptureBiome.TileColorStyle tileColorStyle = CaptureBiome.TileColorStyle.Normal) + { + this.BackgroundIndex = backgroundIndex; + this.BackgroundIndex2 = backgroundIndex2; + this.WaterStyle = waterStyle; + this.TileColor = tileColorStyle; + } + + public enum TileColorStyle + { + Normal, + Jungle, + Crimson, + Corrupt, + Mushroom, + } + } +} diff --git a/Graphics/Capture/CaptureCamera.cs b/Graphics/Capture/CaptureCamera.cs new file mode 100644 index 0000000..0cdd472 --- /dev/null +++ b/Graphics/Capture/CaptureCamera.cs @@ -0,0 +1,319 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureCamera +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 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.Depth24); + } + 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 << 4 > 4096) + num1 = 4096f / (float) (area.Width << 4); + if (area.Height << 4 > 4096) + num1 = Math.Min(num1, 4096f / (float) (area.Height << 4)); + num1 = Math.Min(1f, num1); + this._outputImageSize = new Size((int) MathHelper.Clamp((float) (int) ((double) num1 * (double) (area.Width << 4)), 1f, 4096f), (int) MathHelper.Clamp((float) (int) ((double) num1 * (double) (area.Height << 4)), 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.Depth24); + } + 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 << 4)); + int height2 = (int) Math.Floor((double) num1 * (double) (height1 << 4)); + int x2 = (int) Math.Floor((double) num1 * (double) (x1 - area.X << 4)); + int y2 = (int) Math.Floor((double) num1 * (double) (y1 - area.Y << 4)); + 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; + if (this._renderQueue.Count > 0) + { + CaptureCamera.CaptureChunk captureChunk = this._renderQueue.Dequeue(); + this._graphics.SetRenderTarget(this._frameBuffer); + this._graphics.Clear(Microsoft.Xna.Framework.Color.Transparent); + 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) + { + try + { + string savePath = Main.SavePath; + char directorySeparatorChar = Path.DirectorySeparatorChar; + string str1 = directorySeparatorChar.ToString(); + directorySeparatorChar = Path.DirectorySeparatorChar; + string str2 = directorySeparatorChar.ToString(); + Directory.CreateDirectory(savePath + str1 + "Captures" + str2); + 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); + Directory.CreateDirectory(str); + 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(); + 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..fcfe4b1 --- /dev/null +++ b/Graphics/Capture/CaptureInterface.cs @@ -0,0 +1,1342 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureInterface +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Diagnostics; +using System.IO; +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 = false; + private const Keys KeyToggleActive = Keys.F1; + private bool KeyToggleActiveHeld; + public int SelectedMode; + public int HoveredMode; + public static bool EdgeAPinned = false; + public static bool EdgeBPinned = false; + public static Point EdgeA = new Point(); + public static Point EdgeB = new Point(); + public static bool CameraLock = false; + private static float CameraFrame = 0.0f; + private static float CameraWaiting = 0.0f; + 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) + 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.PointClamp, 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.PointClamp, 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) + Main.PlaySound(12); + 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.Biomes[CaptureInterface.Settings.BiomeChoice], + 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) + { + this.SelectedMode = 0; + this.ToggleCamera(); + } + int num12 = index; + int num13 = num11; + int num14 = num13 + 1; + if (num12 == num13 && flag2 && this.SelectedMode != 1) + { + this.SelectedMode = 1; + this.ToggleCamera(); + } + int num15 = index; + int num16 = num14; + int num17 = num16 + 1; + if (num15 == num16 && flag2) + CaptureInterface.ResetFocus(); + int num18 = index; + int num19 = num17; + int num20 = num19 + 1; + if (num18 == num19 && flag2 && Main.mapEnabled) + Main.mapFullscreen = !Main.mapFullscreen; + int num21 = index; + int num22 = num20; + int num23 = num22 + 1; + if (num21 == num22 && flag2 && this.SelectedMode != 2) + { + this.SelectedMode = 2; + this.ToggleCamera(); + } + int num24 = index; + int num25 = num23; + int num26 = num25 + 1; + if (num24 == num25 && flag2 & flag1) + Process.Start(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.Biomes[CaptureInterface.Settings.BiomeChoice], + 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 = Main.inventoryBackTexture; + 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 = Main.inventoryBack14Texture; + else if (this.SelectedMode == 1 && index == 3) + texture2D = Main.inventoryBack14Texture; + else if (this.SelectedMode == 2 && index == 6) + texture2D = Main.inventoryBack14Texture; + else if (index >= 2 && index <= 3) + texture2D = Main.inventoryBack2Texture; + sb.Draw(texture2D, position, new Rectangle?(), color, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + switch (index) + { + case 0: + texture2D = Main.cameraTexture[7]; + break; + case 1: + texture2D = Main.cameraTexture[0]; + break; + case 2: + case 3: + case 4: + texture2D = Main.cameraTexture[index]; + break; + case 5: + texture2D = Main.mapFullscreen ? Main.mapIconTexture[0] : Main.mapIconTexture[4]; + break; + case 6: + texture2D = Main.cameraTexture[1]; + break; + case 7: + texture2D = Main.cameraTexture[6]; + break; + case 8: + texture2D = Main.cameraTexture[5]; + 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(Main.cdTexture, position + new Vector2(26f) * scale, new Rectangle?(), Color.White * 0.65f, 0.0f, Main.cdTexture.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 width = (float) Main.mapTexture.Width; + float height = (float) Main.mapTexture.Height; + float num19; + float num20; + float num21; + float num22; + switch (Main.maxTilesX) + { + case 4200: + float num23 = num16 * 0.998f; + num19 = num17 - 37.3f * num23; + num20 = num18 - 1.7f * num23; + num21 = (width - 16f) * num23; + num22 = (height - 8.31f) * num23; + break; + case 6300: + float num24 = num16 * 1.09f; + num19 = num17 - 39.8f * num24; + num20 = y2 - 4.08f * num24; + num21 = (width - 26.69f) * num24; + float num25 = (height - 6.92f) * num24; + if ((double) num24 < 1.2) + { + num22 = num25 + 2f; + break; + } + break; + case 6400: + float num26 = num16 * 1.09f; + num19 = num17 - 38.8f * num26; + num20 = y2 - 3.85f * num26; + num21 = (width - 13.6f) * num26; + float num27 = (height - 6.92f) * num26; + if ((double) num26 < 1.2) + { + num22 = num27 + 2f; + break; + } + break; + case 8400: + float num28 = num16 * 0.999f; + num19 = num17 - 40.6f * num28; + num20 = y2 - 5f * num28; + num21 = (width - 8.045f) * num28; + float num29 = (height + 0.12f) * num28; + if ((double) num28 < 1.2) + { + num22 = num29 + 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; + Main.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(Main.magicPixel, 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 = Main.fontDeathText.MeasureString(text1); + Vector2 vector2_2 = Main.fontDeathText.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, Main.fontDeathText, text1, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2_3, Color.White * num2, 0.0f, Vector2.Zero, Vector2.One); + ChatManager.DrawColorCodedStringWithShadow(sb, Main.fontDeathText, 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) + { + Main.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 = false; + public static int BiomeChoice = 0; + 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.PointClamp, 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.PointClamp, 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(Main.magicPixel, result, CaptureInterface.Settings.MarkedAreaColor); + for (int index = 0; index < 2; ++index) + { + sb.Draw(Main.magicPixel, new Rectangle(result.X, result.Y + (index == 1 ? result.Height : -2), result.Width, 2), Color.White); + sb.Draw(Main.magicPixel, 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(Main.magicPixel, result3, CaptureInterface.Settings.MarkedAreaColor); + for (int index = 0; index < 2; ++index) + { + sb.Draw(Main.magicPixel, new Rectangle(result3.X, result3.Y + (index == 1 ? result3.Height : -2), result3.Width, 2), Color.White); + sb.Draw(Main.magicPixel, 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.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.CurrentWantedZoomMatrix); + PlayerInput.SetZoom_Context(); + this.DrawMarkedArea(sb); + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, 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(Main.magicPixel, 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(Main.magicPixel, r, Color.Silver); + break; + case 1: + Rectangle destinationRectangle1 = new Rectangle(r.X - 2, r.Y, r.Width + 4, r.Height); + sb.Draw(Main.magicPixel, destinationRectangle1, Color.White); + destinationRectangle1 = new Rectangle(r.X, r.Y - 2, r.Width, r.Height + 4); + sb.Draw(Main.magicPixel, destinationRectangle1, Color.White); + sb.Draw(Main.magicPixel, r, Color.White); + break; + case 2: + Rectangle destinationRectangle2 = new Rectangle(r.X - 2, r.Y, r.Width + 4, r.Height); + sb.Draw(Main.magicPixel, destinationRectangle2, Color.Gold); + destinationRectangle2 = new Rectangle(r.X, r.Y - 2, r.Width, r.Height + 4); + sb.Draw(Main.magicPixel, destinationRectangle2, Color.Gold); + sb.Draw(Main.magicPixel, 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; + int index = 0; + Player player = Main.player[Main.myPlayer]; + while (index < player.buffTime.Length && player.buffTime[index] > 0) + ++index; + int num = index / 11 + (index % 11 >= 3 ? 1 : 0); + rectangle.Y += 48 * num; + } + 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) + { + switch (button) + { + case 0: + CaptureInterface.Settings.PackImage = !CaptureInterface.Settings.PackImage; + break; + case 1: + CaptureInterface.Settings.IncludeEntities = !CaptureInterface.Settings.IncludeEntities; + break; + case 2: + CaptureInterface.Settings.TransparentBackground = !CaptureInterface.Settings.TransparentBackground; + break; + case 6: + CaptureInterface.Settings.PackImage = false; + CaptureInterface.Settings.IncludeEntities = true; + CaptureInterface.Settings.TransparentBackground = false; + CaptureInterface.Settings.BiomeChoice = 0; + break; + } + } + + 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 < 5; ++index2) + { + if (index1 != 1 || index2 != 3) + { + int index3 = index2 + index1 * 5; + r.X = start.X + 24 * index2 + 12 * index1; + r.Y = start.Y + 24 * index1; + if (index1 == 1 && index2 == 4) + r.X -= 24; + int num1 = 0; + if (r.Contains(mouse)) + { + if (Main.mouseLeft && Main.mouseLeftRelease) + CaptureInterface.Settings.BiomeChoice = this.BiomeWater(index3); + ++num1; + } + if (CaptureInterface.Settings.BiomeChoice == this.BiomeWater(index3)) + num1 += 2; + Texture2D texture = Main.liquidTexture[this.BiomeWater(index3)]; + int x = (int) Main.wFrame * 18; + Color white = Color.White; + float num2 = 1f; + if (num1 < 2) + num2 *= 0.5f; + if (num1 % 2 == 1) + spritebatch.Draw(Main.magicPixel, 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(Main.magicPixel, r.TopLeft(), new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.White * num2, 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 * num2); + } + } + } + } + + private int BiomeWater(int index) + { + switch (index) + { + case 0: + return 0; + case 1: + return 2; + case 2: + return 3; + case 3: + return 4; + case 4: + return 5; + case 5: + return 6; + case 6: + return 7; + case 7: + return 8; + case 8: + return 9; + case 9: + return 10; + 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.PointClamp, 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.PointClamp, 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, Main.fontItemStack, key, rect.TopLeft() + new Vector2(20f, (float) (20 + 20 * button)), baseColor, 0.0f, Vector2.Zero, Vector2.One); + ChatManager.DrawColorCodedStringWithShadow(sb, Main.fontItemStack, text, rect.TopRight() + new Vector2(-20f, (float) (20 + 20 * button)), baseColor, 0.0f, Main.fontItemStack.MeasureString(text) * Vector2.UnitX, Vector2.One); + } + this.DrawWaterChoices(sb, (rect.TopLeft() + new Vector2((float) (rect.Width / 2 - 58), 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..5206b2d --- /dev/null +++ b/Graphics/Capture/CaptureManager.cs @@ -0,0 +1,57 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..433d4ed --- /dev/null +++ b/Graphics/Capture/CaptureSettings.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureSettings +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Biomes[0]; + 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..d4618dd --- /dev/null +++ b/Graphics/Effects/CustomSky.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.CustomSky +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c55801c --- /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.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..e3fdcbc --- /dev/null +++ b/Graphics/Effects/EffectPriority.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.EffectPriority +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5412e07 --- /dev/null +++ b/Graphics/Effects/Filter.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Filter +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + + internal override void Activate(Vector2 position, params object[] args) + { + this._shader.UseGlobalOpacity(this.Opacity); + this._shader.UseTargetPosition(position); + this.Active = true; + } + + internal 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..bcb79ab --- /dev/null +++ b/Graphics/Effects/FilterManager.cs @@ -0,0 +1,193 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.FilterManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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() + { + if (this._activeFilterCount == 0 && this.OnPostDraw == null) + { + this._captureThisFrame = false; + } + else + { + this._captureThisFrame = true; + Main.instance.GraphicsDevice.SetRenderTarget(Main.screenTarget); + Main.instance.GraphicsDevice.Clear(Color.Black); + } + } + + 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() + { + if (!this._captureThisFrame) + return; + LinkedListNode linkedListNode = this._activeFilters.First; + int count = this._activeFilters.Count; + Filter filter1 = (Filter) null; + RenderTarget2D renderTarget2D = Main.screenTarget; + GraphicsDevice graphicsDevice = Main.instance.GraphicsDevice; + int num = 0; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + RenderTarget2D screenTargetSwap = Main.screenTargetSwap; + graphicsDevice.SetRenderTarget(screenTargetSwap); + graphicsDevice.Clear(Color.Black); + 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 = Main.screenTargetSwap; + } + 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 != Main.screenTarget ? Main.screenTarget : Main.screenTargetSwap; + graphicsDevice.SetRenderTarget(renderTarget); + graphicsDevice.Clear(Color.Black); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + filter1.Apply(); + Main.spriteBatch.Draw((Texture2D) renderTarget2D, Vector2.Zero, Main.bgColor); + Main.spriteBatch.End(); + renderTarget2D = renderTarget2D != Main.screenTarget ? Main.screenTarget : Main.screenTargetSwap; + } + filter1 = filter2; + } + } + } + graphicsDevice.SetRenderTarget((RenderTarget2D) null); + graphicsDevice.Clear(Color.Black); + 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.bgColor); + } + 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..1fe0baa --- /dev/null +++ b/Graphics/Effects/Filters.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Filters +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..55f26e0 --- /dev/null +++ b/Graphics/Effects/GameEffect.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.GameEffect +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(); + + internal abstract void Activate(Vector2 position, params object[] args); + + internal abstract void Deactivate(params object[] args); + } +} diff --git a/Graphics/Effects/MissingEffectException.cs b/Graphics/Effects/MissingEffectException.cs new file mode 100644 index 0000000..66dd161 --- /dev/null +++ b/Graphics/Effects/MissingEffectException.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.MissingEffectException +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0539a2b --- /dev/null +++ b/Graphics/Effects/Overlay.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Overlay +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d653c89 --- /dev/null +++ b/Graphics/Effects/OverlayManager.cs @@ -0,0 +1,113 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.OverlayManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..519cfef --- /dev/null +++ b/Graphics/Effects/OverlayMode.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.OverlayMode +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..31ccec8 --- /dev/null +++ b/Graphics/Effects/Overlays.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Overlays +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..fdb876e --- /dev/null +++ b/Graphics/Effects/RenderLayers.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.RenderLayers +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..946bff7 --- /dev/null +++ b/Graphics/Effects/SimpleOverlay.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.SimpleOverlay +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics.Effects +{ + public class SimpleOverlay : Overlay + { + private Ref _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 = TextureManager.AsyncLoad(textureName == null ? "" : textureName); + this._shader = shader; + } + + public SimpleOverlay( + string textureName, + string shaderName = "Default", + EffectPriority priority = EffectPriority.VeryLow, + RenderLayers layer = RenderLayers.All) + : base(priority, layer) + { + this._texture = TextureManager.AsyncLoad(textureName == null ? "" : textureName); + 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.bgColor); + } + + public override void Update(GameTime gameTime) => this._shader.Update(gameTime); + + internal override void Activate(Vector2 position, params object[] args) + { + this.TargetPosition = position; + this.Mode = OverlayMode.FadeIn; + } + + internal 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..8569988 --- /dev/null +++ b/Graphics/Effects/SkyManager.cs @@ -0,0 +1,86 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.SkyManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 (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/Shaders/ArmorShaderData.cs b/Graphics/Shaders/ArmorShaderData.cs new file mode 100644 index 0000000..8bb4d51 --- /dev/null +++ b/Graphics/Shaders/ArmorShaderData.cs @@ -0,0 +1,98 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ArmorShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 Ref _uImage; + + 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.GlobalTime); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + if (drawData.HasValue) + { + DrawData drawData1 = drawData.Value; + this.Shader.Parameters["uSourceRect"].SetValue(!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["uWorldPosition"].SetValue(Main.screenPosition + drawData1.position); + this.Shader.Parameters["uImageSize0"].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 + { + this.Shader.Parameters["uSourceRect"].SetValue(new Vector4(0.0f, 0.0f, 4f, 4f)); + 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.Value.Width, (float) this._uImage.Value.Height)); + } + if (entity != null) + this.Shader.Parameters["uDirection"].SetValue((float) entity.direction); + 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 = TextureManager.AsyncLoad(path); + return this; + } + + public ArmorShaderData UseOpacity(float alpha) + { + this._uOpacity = alpha; + 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..fedea1c --- /dev/null +++ b/Graphics/Shaders/ArmorShaderDataSet.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ArmorShaderDataSet +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 != 0 && 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 != 0 && 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..1fc168e --- /dev/null +++ b/Graphics/Shaders/GameShaders.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.GameShaders +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..4d134d3 --- /dev/null +++ b/Graphics/Shaders/HairShaderData.cs @@ -0,0 +1,97 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.HairShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +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 Ref _uImage; + protected bool _shaderDisabled; + + 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.GlobalTime); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + 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.Value.Width, (float) this._uImage.Value.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 = TextureManager.AsyncLoad(path); + 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; + } + } +} diff --git a/Graphics/Shaders/HairShaderDataSet.cs b/Graphics/Shaders/HairShaderDataSet.cs new file mode 100644 index 0000000..844b89b --- /dev/null +++ b/Graphics/Shaders/HairShaderDataSet.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.HairShaderDataSet +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..eff7b18 --- /dev/null +++ b/Graphics/Shaders/MiscShaderData.cs @@ -0,0 +1,93 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.MiscShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +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 Ref _uImage; + + 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.GlobalTime); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + 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._uImage != null) + { + Main.graphics.GraphicsDevice.Textures[1] = (Texture) this._uImage.Value; + this.Shader.Parameters["uImageSize1"].SetValue(new Vector2((float) this._uImage.Value.Width, (float) this._uImage.Value.Height)); + } + 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 UseImage(string path) + { + this._uImage = TextureManager.AsyncLoad(path); + 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 UseSaturation(float saturation) + { + this._uSaturation = saturation; + return this; + } + + public virtual MiscShaderData GetSecondaryShader(Entity entity) => this; + } +} diff --git a/Graphics/Shaders/ScreenShaderData.cs b/Graphics/Shaders/ScreenShaderData.cs new file mode 100644 index 0000000..7f4f1c0 --- /dev/null +++ b/Graphics/Shaders/ScreenShaderData.cs @@ -0,0 +1,175 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ScreenShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 Ref[] _uImages = new Ref[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 new virtual 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.GlobalTime); + 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._uImages.Length; ++index) + { + if (this._uImages[index] != null && this._uImages[index].Value != null) + { + Main.graphics.GraphicsDevice.Textures[index + 1] = (Texture) this._uImages[index].Value; + int width = this._uImages[index].Value.Width; + int height = this._uImages[index].Value.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; + if (this._uImages[index] == null) + this._uImages[index] = new Ref(image); + else + this._uImages[index].Value = image; + return this; + } + + public ScreenShaderData UseImage( + string path, + int index = 0, + SamplerState samplerState = null) + { + this._uImages[index] = TextureManager.AsyncLoad(path); + 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..4655d73 --- /dev/null +++ b/Graphics/Shaders/ShaderData.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ShaderData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 + { + protected Ref _shader; + protected string _passName; + private EffectPass _effectPass; + private Effect _lastEffect; + + 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]; + } + + protected virtual void Apply() + { + if (this._shader != null && this._lastEffect != this._shader.Value && this.Shader != null && this._passName != null) + this._effectPass = this.Shader.CurrentTechnique.Passes[this._passName]; + this._effectPass.Apply(); + } + } +} diff --git a/Graphics/SpriteViewMatrix.cs b/Graphics/SpriteViewMatrix.cs new file mode 100644 index 0000000..6b02571 --- /dev/null +++ b/Graphics/SpriteViewMatrix.cs @@ -0,0 +1,128 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.SpriteViewMatrix +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 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; + 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._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/TextureManager.cs b/Graphics/TextureManager.cs new file mode 100644 index 0000000..933dcd8 --- /dev/null +++ b/Graphics/TextureManager.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.TextureManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Concurrent; +using System.Threading; + +namespace Terraria.Graphics +{ + public static class TextureManager + { + private static ConcurrentDictionary _textures = new ConcurrentDictionary(); + private static ConcurrentQueue _loadQueue = new ConcurrentQueue(); + private static Thread _loadThread; + private static readonly object _loadThreadLock = new object(); + public static Texture2D BlankTexture; + + public static void Initialize() => TextureManager.BlankTexture = new Texture2D(Main.graphics.GraphicsDevice, 4, 4); + + public static Texture2D Load(string name) + { + if (TextureManager._textures.ContainsKey(name)) + return TextureManager._textures[name]; + Texture2D texture2D = TextureManager.BlankTexture; + if (name != "") + { + if (name != null) + { + try + { + texture2D = Main.instance.OurLoad(name); + } + catch (Exception ex) + { + texture2D = TextureManager.BlankTexture; + } + } + } + TextureManager._textures[name] = texture2D; + return texture2D; + } + + public static Ref AsyncLoad(string name) => new Ref(TextureManager.Load(name)); + + private static void Run(object context) + { + bool looping = true; + Main.instance.Exiting += (EventHandler) ((obj, args) => + { + looping = false; + if (!Monitor.TryEnter(TextureManager._loadThreadLock)) + return; + Monitor.Pulse(TextureManager._loadThreadLock); + Monitor.Exit(TextureManager._loadThreadLock); + }); + Monitor.Enter(TextureManager._loadThreadLock); + while (looping) + { + if (TextureManager._loadQueue.Count != 0) + { + TextureManager.LoadPair result; + if (TextureManager._loadQueue.TryDequeue(out result)) + result.TextureRef.Value = TextureManager.Load(result.Path); + } + else + Monitor.Wait(TextureManager._loadThreadLock); + } + Monitor.Exit(TextureManager._loadThreadLock); + } + + private struct LoadPair + { + public string Path; + public Ref TextureRef; + + public LoadPair(string path, Ref textureRef) + { + this.Path = path; + this.TextureRef = textureRef; + } + } + } +} diff --git a/Graphics/TileBatch.cs b/Graphics/TileBatch.cs new file mode 100644 index 0000000..cb1f8cf --- /dev/null +++ b/Graphics/TileBatch.cs @@ -0,0 +1,368 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.TileBatch +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) ((sender, e) => 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) ((sender, e) => 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..f127eeb --- /dev/null +++ b/Graphics/VertexColors.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.VertexColors +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/HitTile.cs b/HitTile.cs new file mode 100644 index 0000000..0fc7a9f --- /dev/null +++ b/HitTile.cs @@ -0,0 +1,311 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.HitTile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 = 20; + 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 HitTile() + { + HitTile.rand = new UnifiedRandom(); + this.data = new HitTile.HitTileObject[21]; + this.order = new int[21]; + for (int index = 0; index <= 20; ++index) + { + this.data[index] = new HitTile.HitTileObject(); + this.order[index] = index; + } + this.bufferLocation = 0; + } + + public int HitObject(int x, int y, int hitType) + { + for (int index1 = 0; index1 <= 20; ++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 > 20) + 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 > 20 || 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; + if (tileId == this.bufferLocation) + { + this.bufferLocation = this.order[20]; + this.data[this.bufferLocation].Clear(); + for (int index = 20; index > 0; --index) + this.order[index] = this.order[index - 1]; + this.order[0] = this.bufferLocation; + } + else + { + int index = 0; + while (index <= 20 && 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; + } + return hitTileObject.damage; + } + + public void Clear(int tileId) + { + if (tileId < 0 || tileId > 20) + return; + this.data[tileId].Clear(); + int index = 0; + while (index < 20 && this.order[index] != tileId) + ++index; + for (; index < 20; ++index) + this.order[index] = this.order[index + 1]; + this.order[20] = tileId; + } + + public void Prune() + { + bool flag = false; + for (int index = 0; index <= 20; ++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 == (byte) 0) + { + hitTileObject.Clear(); + flag = true; + } + } + } + } + if (!flag) + return; + int num1 = 1; + while (flag) + { + flag = false; + for (int index = num1; index < 20; ++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 > (byte) 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 (Main.tile[x, y].type == (ushort) 5) + { + 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 texture = !Main.canDrawColorTile(tileSafely.type, (int) tileSafely.color()) ? Main.tileTexture[(int) tileSafely.type] : (Texture2D) Main.tileAltTexture[(int) tileSafely.type, (int) tileSafely.color()]; + 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(texture, 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(Main.tileCrackTexture, 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..8294f41 --- /dev/null +++ b/ID/AchievementHelperID.cs @@ -0,0 +1,58 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AchievementHelperID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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..fb1804e --- /dev/null +++ b/ID/AmmoID.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AmmoID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +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; + } +} diff --git a/ID/AnimationID.cs b/ID/AnimationID.cs new file mode 100644 index 0000000..64d9558 --- /dev/null +++ b/ID/AnimationID.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AnimationID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + } +} diff --git a/ID/ArmorIDs.cs b/ID/ArmorIDs.cs new file mode 100644 index 0000000..ab67d80 --- /dev/null +++ b/ID/ArmorIDs.cs @@ -0,0 +1,753 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ArmorIDs +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +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 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 Count = 216; + } + + 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 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 Count = 210; + + public class Sets + { + public static SetFactory Factory = new SetFactory(210); + public static bool[] NeedsToDrawArm = ArmorIDs.Body.Sets.Factory.CreateBoolSet(false, 200, 202, 201, 203, 195, 205, 207, 206); + } + } + + 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 Count = 161; + + public class Sets + { + public static SetFactory Factory = new SetFactory(161); + 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 int Count = 20; + } + + 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 int Count = 12; + } + + 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 int Count = 14; + } + + 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 int Count = 5; + } + + 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 int Count = 18; + } + + 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 int Count = 13; + } + + 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 int Count = 40; + } + + 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 int Count = 7; + } + + 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 int Count = 10; + } + + 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 int Count = 9; + } + + 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; + } + } +} diff --git a/ID/BuffID.cs b/ID/BuffID.cs new file mode 100644 index 0000000..44cd5bc --- /dev/null +++ b/ID/BuffID.cs @@ -0,0 +1,218 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.BuffID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Count = 206; + } +} diff --git a/ID/ChainID.cs b/ID/ChainID.cs new file mode 100644 index 0000000..b686619 --- /dev/null +++ b/ID/ChainID.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ChainID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Colors.cs b/ID/Colors.cs new file mode 100644 index 0000000..c08fc1b --- /dev/null +++ b/ID/Colors.cs @@ -0,0 +1,98 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.Colors +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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[] _waterfallColors; + public static readonly Color[] _liquidColors; + + 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); + + 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) + }; + } + } +} diff --git a/ID/CustomCurrencyID.cs b/ID/CustomCurrencyID.cs new file mode 100644 index 0000000..e5f7f2d --- /dev/null +++ b/ID/CustomCurrencyID.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.CustomCurrencyID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..9eac874 --- /dev/null +++ b/ID/DustID.cs @@ -0,0 +1,93 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.DustID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Blood = 5; + public const short Fire = 6; + public const short Iron = 8; + public const short Copper = 9; + public const short Gold = 10; + public const short Silver = 11; + public const short Shadowflame = 27; + public const short Web = 30; + public const short Smoke = 31; + public const short Rainbow = 66; + public const short BlueCrystalShard = 68; + public const short PinkCrystalShard = 69; + public const short PurpleCrystalShard = 70; + 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 Confetti = 139; + public const short Fireworks = 219; + public const short Electric = 226; + public const short GoldFlame = 228; + public const short Vortex = 229; + 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 PinkFlame = 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 Count = 275; + 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; + } +} diff --git a/ID/ExtrasID.cs b/ID/ExtrasID.cs new file mode 100644 index 0000000..eb5f44b --- /dev/null +++ b/ID/ExtrasID.cs @@ -0,0 +1,104 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ExtrasID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Count = 91; + } +} diff --git a/ID/GlowMaskID.cs b/ID/GlowMaskID.cs new file mode 100644 index 0000000..fe8e561 --- /dev/null +++ b/ID/GlowMaskID.cs @@ -0,0 +1,266 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GlowMaskID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 Count = 252; + } +} diff --git a/ID/GoreID.cs b/ID/GoreID.cs new file mode 100644 index 0000000..943d544 --- /dev/null +++ b/ID/GoreID.cs @@ -0,0 +1,459 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GoreID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 WalkingAntlion1 = 811; + public const int WalkingAntlion2 = 812; + public const int WalkingAntlion3 = 813; + public const int WalkingAntlion4 = 814; + public const int FlyingAntlion1 = 815; + public const int FlyingAntlion2 = 816; + public const int FlyingAntlion3 = 817; + public const int FlyingAntlion4 = 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_Last = 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 short Count = 1087; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(1087); + 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, 1007, 3, 1008, 3); + 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); + } + } +} diff --git a/ID/InvasionID.cs b/ID/InvasionID.cs new file mode 100644 index 0000000..14f1a4d --- /dev/null +++ b/ID/InvasionID.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.InvasionID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..52434a5 --- /dev/null +++ b/ID/ItemAlternativeFunctionID.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemAlternativeFunctionID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/ItemID.cs b/ID/ItemID.cs new file mode 100644 index 0000000..959c443 --- /dev/null +++ b/ID/ItemID.cs @@ -0,0 +1,6817 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Reflection; +using System.Collections.Generic; + +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 AmanitiaFungifin = 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 Count = 3930; + + 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(3930); + 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); + public static bool[] CanFishInLava = ItemID.Sets.Factory.CreateBoolSet(2422); + 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); + 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); + public static bool[] Deprecated = ItemID.Sets.Factory.CreateBoolSet(2784, 2783, 2785, 2782, 2774, 2773, 2775, 2772, 2779, 2778, 2780, 2777, 3464, 3463, 3465, 3462, 3341, 3342, 3343, 3340, 3344, 3345, 3346, 3273, 2881, 3750, 3847, 3848, 3849, 3850, 3851, 3850, 3861, 3862); + public static bool[] NeverShiny = 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); + 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); + public static int[] SortingPriorityBossSpawns = ItemID.Sets.Factory.CreateIntSet(-1, 43, 1, 560, 2, 70, 3, 1331, 3, 361, 4, 1133, 5, 544, 6, 556, 7, 557, 8, 2495, 9, 2673, 10, 602, 11, 1844, 12, 1958, 13, 1293, 14, 2767, 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, 101, 3625, 100, 509, 99, 851, 98, 850, 97, 3612, 96, 849, 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, 1309, 2364, 2365, 2551, 2535, 2584, 1157, 2749, 1802, 2621, 3249, 3531, 3474, 2366, 1572, 3569, 3571, 3611, 1299, 1254); + 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); + 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, 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); + } + } +} diff --git a/ID/MessageID.cs b/ID/MessageID.cs new file mode 100644 index 0000000..d0a6ecd --- /dev/null +++ b/ID/MessageID.cs @@ -0,0 +1,139 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.MessageID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Unknown1 = 1; + public const byte Kick = 2; + public const byte Unknown3 = 3; + public const byte SyncPlayer = 4; + public const byte SyncEquipment = 5; + public const byte Unknown6 = 6; + public const byte WorldData = 7; + public const byte Unknown8 = 8; + public const byte Unknown9 = 9; + public const byte TileSection = 10; + public const byte Unknown11 = 11; + public const byte Unknown12 = 12; + public const byte Unknown13 = 13; + public const byte Unknown14 = 14; + public const byte Unknown15 = 15; + public const byte Unknown16 = 16; + public const byte Unknown17 = 17; + public const byte Unknown18 = 18; + public const byte Unknown19 = 19; + public const byte Unknown20 = 20; + public const byte SyncItem = 21; + public const byte Unknown22 = 22; + public const byte Unknown23 = 23; + public const byte Unknown24 = 24; + [Obsolete("Deprecated. Use NetTextModule instead.")] + public const byte Unknown25 = 25; + [Obsolete("Deprecated.")] + public const byte Unknown26 = 26; + public const byte Unknown27 = 27; + public const byte Unknown28 = 28; + public const byte Unknown29 = 29; + public const byte Unknown30 = 30; + public const byte RequestChestOpen = 31; + public const byte SyncChestItem = 32; + public const byte SyncPlayerChest = 33; + public const byte ChestUpdates = 34; + public const byte Unknown35 = 35; + public const byte Unknown36 = 36; + public const byte Unknown37 = 37; + public const byte Unknown38 = 38; + public const byte Unknown39 = 39; + public const byte Unknown40 = 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 Unknown55 = 55; + public const byte SyncNPCName = 56; + public const byte Unknown57 = 57; + public const byte Unknown58 = 58; + public const byte Unknown59 = 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 Unknown65 = 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 TeleportationPotion = 73; + public const byte AnglerQuest = 74; + public const byte AnglerQuestFinished = 75; + public const byte AnglerQuestCountSync = 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 MurderSomeoneElsesProjectile = 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 Count = 120; + } +} diff --git a/ID/MountID.cs b/ID/MountID.cs new file mode 100644 index 0000000..83cdff3 --- /dev/null +++ b/ID/MountID.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.MountID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class MountID + { + public static int Count = 15; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(MountID.Count); + public static bool[] Cart = MountID.Sets.Factory.CreateBoolSet(6, 11, 13); + } + } +} diff --git a/ID/NPCID.cs b/ID/NPCID.cs new file mode 100644 index 0000000..fdbcdd2 --- /dev/null +++ b/ID/NPCID.cs @@ -0,0 +1,2812 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.NPCID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 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 WalkingAntlion = 508; + public const short FlyingAntlion = 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 Count = 580; + + 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(580); + 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, 509, 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); + 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); + 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); + 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); + 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); + 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); + 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); + 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, 550, -2); + 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); + 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, 368, 10, 369, 9, 453, 9, 441, 9, 550, 9); + 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, 368, 5, 369, 4, 453, 4, 441, 4, 550, 4); + 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, 550, 120); + 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, 550, 34); + 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, 550, 40); + 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, 550, 0); + 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 List Skeletons = new List() + { + 77, + -49, + -51, + -53, + -47, + 449, + 450, + 451, + 452, + 481, + 201, + -15, + 202, + 203, + 21, + 324, + 110, + 323, + 293, + 291, + 322, + -48, + -50, + -52, + -46, + 292, + 197, + 167, + 44 + }; + 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, 16, 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); + public static bool[] ExcludedFromDeathTally = NPCID.Sets.Factory.CreateBoolSet(false, 121, 384, 406); + public static bool[] TechnicallyABoss = 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, 550, 0); + public static int[] NPCFramingGroup = NPCID.Sets.Factory.CreateIntSet(0, 18, 1, 20, 1, 208, 1, 178, 1, 124, 1, 353, 1, 369, 2, 160, 3); + public static int[][] TownNPCsFramingGroups = new int[4][] + { + 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 + } + }; + } + } +} diff --git a/ID/PlayerTextureID.cs b/ID/PlayerTextureID.cs new file mode 100644 index 0000000..3ae8a04 --- /dev/null +++ b/ID/PlayerTextureID.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PlayerTextureID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Count = 15; + } +} diff --git a/ID/PlayerVariantID.cs b/ID/PlayerVariantID.cs new file mode 100644 index 0000000..4ac0f44 --- /dev/null +++ b/ID/PlayerVariantID.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PlayerVariantID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(10); + 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 Count = 10; + + public class Sets + { + public static bool[] Male = PlayerVariantID.Factory.CreateBoolSet(0, 1, 2, 3, 8); + 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); + public static int[] VariantOrderMale = new int[5] + { + 0, + 1, + 2, + 3, + 8 + }; + public static int[] VariantOrderFemale = new int[5] + { + 4, + 5, + 6, + 7, + 9 + }; + } + } +} diff --git a/ID/PrefixID.cs b/ID/PrefixID.cs new file mode 100644 index 0000000..0d06b8a --- /dev/null +++ b/ID/PrefixID.cs @@ -0,0 +1,96 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PrefixID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Count = 84; + } +} diff --git a/ID/ProjectileID.cs b/ID/ProjectileID.cs new file mode 100644 index 0000000..fd223e9 --- /dev/null +++ b/ID/ProjectileID.cs @@ -0,0 +1,751 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ProjectileID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +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 Count = 714; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(714); + 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 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, 385, 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) 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) 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) 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); + public static int[] TrailCacheLength = ProjectileID.Sets.Factory.CreateIntSet(10, 466, 20, 502, 25, 580, 20, 636, 20, 640, 20, 686, 20, 711, 20); + public static bool[] LightPet = ProjectileID.Sets.Factory.CreateBoolSet(18, 500, 72, 87, 86, 211, 492, 650, 702); + public static bool[] Homing = 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, 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, 625, 626, 627, 628); + public static bool[] DontAttachHideToAlpha = ProjectileID.Sets.Factory.CreateBoolSet(598, 641, 617, 636, 579, 578, 625, 626, 627, 628); + 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[] NoLiquidDistortion = ProjectileID.Sets.Factory.CreateBoolSet(511, 512, 513); + } + } +} diff --git a/ID/RecipeGroupID.cs b/ID/RecipeGroupID.cs new file mode 100644 index 0000000..77f1b5d --- /dev/null +++ b/ID/RecipeGroupID.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.RecipeGroupID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + } +} diff --git a/ID/SetFactory.cs b/ID/SetFactory.cs new file mode 100644 index 0000000..6457273 --- /dev/null +++ b/ID/SetFactory.cs @@ -0,0 +1,127 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.SetFactory +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Queue _intBufferCache = new Queue(); + private Queue _ushortBufferCache = new Queue(); + private Queue _boolBufferCache = new Queue(); + private 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) + objArray[(int) (short) inputs[index]] = (T) inputs[index + 1]; + } + return objArray; + } + } +} diff --git a/ID/SoundID.cs b/ID/SoundID.cs new file mode 100644 index 0000000..281734e --- /dev/null +++ b/ID/SoundID.cs @@ -0,0 +1,450 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.SoundID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Audio; + +namespace Terraria.ID +{ + public static 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 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 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 DD2_GoblinBomb = new LegacySoundStyle(2, 14).WithVolume(0.5f); + 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 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); + } + + 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..28fb2cd --- /dev/null +++ b/ID/StatusID.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.StatusID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/TileChangeType.cs b/ID/TileChangeType.cs new file mode 100644 index 0000000..d0a86a7 --- /dev/null +++ b/ID/TileChangeType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileChangeType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..bdeb557 --- /dev/null +++ b/ID/TileEntityID.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileEntityID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class TileEntityID + { + public const byte TrainingDummy = 0; + public const byte ItemFrame = 1; + public const byte LogicSensor = 2; + } +} diff --git a/ID/TileID.cs b/ID/TileID.cs new file mode 100644 index 0000000..6852ff6 --- /dev/null +++ b/ID/TileID.cs @@ -0,0 +1,611 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class TileID + { + 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 FleshGrass = 199; + public const ushort FleshIce = 200; + public const ushort FleshWeeds = 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 CrimtaneThorns = 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 Count = 470; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(470); + public static bool[] Platforms = TileID.Sets.Factory.CreateBoolSet(19, 427, 435, 436, 437, 438, 439); + public static bool[] DrawsWalls = TileID.Sets.Factory.CreateBoolSet(10, 54, 138, 388, 191, 137, 328, 162, 387, 48, 232, (int) sbyte.MaxValue, 459); + 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[] HasSlopeFrames = TileID.Sets.Factory.CreateBoolSet(421, 422); + public static bool[] TileInteractRead = TileID.Sets.Factory.CreateBoolSet(55, 85, 425); + public static bool[] HasOutlines = TileID.Sets.Factory.CreateBoolSet(10, 11, 21, 29, 55, 79, 85, 88, 97, 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); + 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[] GeneralPlacementTiles = TileID.Sets.Factory.CreateBoolSet(true, 225, 41, 43, 44, 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[] CanBeClearedDuringGeneration = TileID.Sets.Factory.CreateBoolSet(true, 396, 400, 401, 397, 398, 399, 404, 368, 367); + 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[] BlocksStairs = TileID.Sets.Factory.CreateBoolSet(386, 387, 54); + public static bool[] BlocksStairsAbove = TileID.Sets.Factory.CreateBoolSet(386, 387); + public static bool[] NotReallySolid = TileID.Sets.Factory.CreateBoolSet(387, 388, 10); + 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, 57, 58, 75, 76, 147, 161, 164, 163, 200, 162, 189, 196, 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); + 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); + public static bool[] InteractibleByNPCs = TileID.Sets.Factory.CreateBoolSet(17, 77, 133, 12, 26, 35, 36, 55, 395, 21, 467, 29, 97, 88, 99, 463, 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); + public static bool[] HousingWalls = TileID.Sets.Factory.CreateBoolSet(11, 389, 386); + public static bool[] BreakableWhenPlacing = TileID.Sets.Factory.CreateBoolSet(324, 186, 187, 185, 165); + 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); + 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[] ForceObsidianKill = TileID.Sets.Factory.CreateBoolSet(21, 467, 88); + + public static class Conversion + { + public static bool[] Grass = TileID.Sets.Factory.CreateBoolSet(2, 23, 60, 199, 109); + 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); + } + + 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[4] + { + 15, + 79, + 89, + 102 + }; + public static int[] CountsAsTable = new int[10] + { + 14, + 18, + 87, + 88, + 90, + 101, + 354, + 355, + 464, + 469 + }; + public static int[] CountsAsTorch = new int[20] + { + 4, + 33, + 34, + 35, + 42, + 49, + 93, + 95, + 98, + 100, + 149, + 173, + 174, + 270, + 271, + 316, + 317, + 318, + 372, + 405 + }; + public static int[] CountsAsDoor = new int[13] + { + 10, + 11, + 19, + 387, + 386, + 388, + 389, + 436, + 435, + 438, + 427, + 439, + 437 + }; + } + } + } +} diff --git a/ID/WallID.cs b/ID/WallID.cs new file mode 100644 index 0000000..1a01db6 --- /dev/null +++ b/ID/WallID.cs @@ -0,0 +1,261 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.WallID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class WallID + { + public const byte None = 0; + public const byte Stone = 1; + public const byte DirtUnsafe = 2; + public const byte EbonstoneUnsafe = 3; + public const byte Wood = 4; + public const byte GrayBrick = 5; + public const byte RedBrick = 6; + public const byte BlueDungeonUnsafe = 7; + public const byte GreenDungeonUnsafe = 8; + public const byte PinkDungeonUnsafe = 9; + public const byte GoldBrick = 10; + public const byte SilverBrick = 11; + public const byte CopperBrick = 12; + public const byte HellstoneBrickUnsafe = 13; + public const byte ObsidianBrickUnsafe = 14; + public const byte MudUnsafe = 15; + public const byte Dirt = 16; + public const byte BlueDungeon = 17; + public const byte GreenDungeon = 18; + public const byte PinkDungeon = 19; + public const byte ObsidianBrick = 20; + public const byte Glass = 21; + public const byte PearlstoneBrick = 22; + public const byte IridescentBrick = 23; + public const byte MudstoneBrick = 24; + public const byte CobaltBrick = 25; + public const byte MythrilBrick = 26; + public const byte Planked = 27; + public const byte PearlstoneBrickUnsafe = 28; + public const byte CandyCane = 29; + public const byte GreenCandyCane = 30; + public const byte SnowBrick = 31; + public const byte AdamantiteBeam = 32; + public const byte DemoniteBrick = 33; + public const byte SandstoneBrick = 34; + public const byte EbonstoneBrick = 35; + public const byte RedStucco = 36; + public const byte YellowStucco = 37; + public const byte GreenStucco = 38; + public const byte Gray = 39; + public const byte SnowWallUnsafe = 40; + public const byte Ebonwood = 41; + public const byte RichMaogany = 42; + public const byte Pearlwood = 43; + public const byte RainbowBrick = 44; + public const byte TinBrick = 45; + public const byte TungstenBrick = 46; + public const byte PlatinumBrick = 47; + public const byte AmethystUnsafe = 48; + public const byte TopazUnsafe = 49; + public const byte SapphireUnsafe = 50; + public const byte EmeraldUnsafe = 51; + public const byte RubyUnsafe = 52; + public const byte DiamondUnsafe = 53; + public const byte CaveUnsafe = 54; + public const byte Cave2Unsafe = 55; + public const byte Cave3Unsafe = 56; + public const byte Cave4Unsafe = 57; + public const byte Cave5Unsafe = 58; + public const byte Cave6Unsafe = 59; + public const byte LivingLeaf = 60; + public const byte Cave7Unsafe = 61; + public const byte SpiderUnsafe = 62; + public const byte GrassUnsafe = 63; + public const byte JungleUnsafe = 64; + public const byte FlowerUnsafe = 65; + public const byte Grass = 66; + public const byte Jungle = 67; + public const byte Flower = 68; + public const byte CorruptGrassUnsafe = 69; + public const byte HallowedGrassUnsafe = 70; + public const byte IceUnsafe = 71; + public const byte Cactus = 72; + public const byte Cloud = 73; + public const byte Mushroom = 74; + public const byte Bone = 75; + public const byte Slime = 76; + public const byte Flesh = 77; + public const byte LivingWood = 78; + public const byte ObsidianBackUnsafe = 79; + public const byte MushroomUnsafe = 80; + public const byte CrimsonGrassUnsafe = 81; + public const byte DiscWall = 82; + public const byte CrimstoneUnsafe = 83; + public const byte IceBrick = 84; + public const byte Shadewood = 85; + public const byte HiveUnsafe = 86; + public const byte LihzahrdBrickUnsafe = 87; + public const byte PurpleStainedGlass = 88; + public const byte YellowStainedGlass = 89; + public const byte BlueStainedGlass = 90; + public const byte GreenStainedGlass = 91; + public const byte RedStainedGlass = 92; + public const byte RainbowStainedGlass = 93; + public const byte BlueDungeonSlabUnsafe = 94; + public const byte BlueDungeonTileUnsafe = 95; + public const byte PinkDungeonSlabUnsafe = 96; + public const byte PinkDungeonTileUnsafe = 97; + public const byte GreenDungeonSlabUnsafe = 98; + public const byte GreenDungeonTileUnsafe = 99; + public const byte BlueDungeonSlab = 100; + public const byte BlueDungeonTile = 101; + public const byte PinkDungeonSlab = 102; + public const byte PinkDungeonTile = 103; + public const byte GreenDungeonSlab = 104; + public const byte GreenDungeonTile = 105; + public const byte WoodenFence = 106; + public const byte MetalFence = 107; + public const byte Hive = 108; + public const byte PalladiumColumn = 109; + public const byte BubblegumBlock = 110; + public const byte TitanstoneBlock = 111; + public const byte LihzahrdBrick = 112; + public const byte Pumpkin = 113; + public const byte Hay = 114; + public const byte SpookyWood = 115; + public const byte ChristmasTreeWallpaper = 116; + public const byte OrnamentWallpaper = 117; + public const byte CandyCaneWallpaper = 118; + public const byte FestiveWallpaper = 119; + public const byte StarsWallpaper = 120; + public const byte SquigglesWallpaper = 121; + public const byte SnowflakeWallpaper = 122; + public const byte KrampusHornWallpaper = 123; + public const byte BluegreenWallpaper = 124; + public const byte GrinchFingerWallpaper = 125; + public const byte FancyGrayWallpaper = 126; + public const byte IceFloeWallpaper = 127; + public const byte MusicWallpaper = 128; + public const byte PurpleRainWallpaper = 129; + public const byte RainbowWallpaper = 130; + public const byte SparkleStoneWallpaper = 131; + public const byte StarlitHeavenWallpaper = 132; + public const byte BubbleWallpaper = 133; + public const byte CopperPipeWallpaper = 134; + public const byte DuckyWallpaper = 135; + public const byte Waterfall = 136; + public const byte Lavafall = 137; + public const byte EbonwoodFence = 138; + public const byte RichMahoganyFence = 139; + public const byte PearlwoodFence = 140; + public const byte ShadewoodFence = 141; + public const byte WhiteDynasty = 142; + public const byte BlueDynasty = 143; + public const byte ArcaneRunes = 144; + public const byte IronFence = 145; + public const byte CopperPlating = 146; + public const byte StoneSlab = 147; + public const byte Sail = 148; + public const byte BorealWood = 149; + public const byte BorealWoodFence = 150; + public const byte PalmWood = 151; + public const byte PalmWoodFence = 152; + public const byte AmberGemspark = 153; + public const byte AmethystGemspark = 154; + public const byte DiamondGemspark = 155; + public const byte EmeraldGemspark = 156; + public const byte AmberGemsparkOff = 157; + public const byte AmethystGemsparkOff = 158; + public const byte DiamondGemsparkOff = 159; + public const byte EmeraldGemsparkOff = 160; + public const byte RubyGemsparkOff = 161; + public const byte SapphireGemsparkOff = 162; + public const byte TopazGemsparkOff = 163; + public const byte RubyGemspark = 164; + public const byte SapphireGemspark = 165; + public const byte TopazGemspark = 166; + public const byte TinPlating = 167; + public const byte Confetti = 168; + public const byte ConfettiBlack = 169; + public const byte CaveWall = 170; + public const byte CaveWall2 = 171; + public const byte Honeyfall = 172; + public const byte ChlorophyteBrick = 173; + public const byte CrimtaneBrick = 174; + public const byte ShroomitePlating = 175; + public const byte MartianConduit = 176; + public const byte HellstoneBrick = 177; + public const byte MarbleUnsafe = 178; + public const byte MarbleBlock = 179; + public const byte GraniteUnsafe = 180; + public const byte GraniteBlock = 181; + public const byte MeteoriteBrick = 182; + public const byte Marble = 183; + public const byte Granite = 184; + public const byte Cave8Unsafe = 185; + public const byte Crystal = 186; + public const byte Sandstone = 187; + public const byte CorruptionUnsafe1 = 188; + public const byte CorruptionUnsafe2 = 189; + public const byte CorruptionUnsafe3 = 190; + public const byte CorruptionUnsafe4 = 191; + public const byte CrimsonUnsafe1 = 192; + public const byte CrimsonUnsafe2 = 193; + public const byte CrimsonUnsafe3 = 194; + public const byte CrimsonUnsafe4 = 195; + public const byte DirtUnsafe1 = 196; + public const byte DirtUnsafe2 = 197; + public const byte DirtUnsafe3 = 198; + public const byte DirtUnsafe4 = 199; + public const byte HallowUnsafe1 = 200; + public const byte HallowUnsafe2 = 201; + public const byte HallowUnsafe3 = 202; + public const byte HallowUnsafe4 = 203; + public const byte JungleUnsafe1 = 204; + public const byte JungleUnsafe2 = 205; + public const byte JungleUnsafe3 = 206; + public const byte JungleUnsafe4 = 207; + public const byte LavaUnsafe1 = 208; + public const byte LavaUnsafe2 = 209; + public const byte LavaUnsafe3 = 210; + public const byte LavaUnsafe4 = 211; + public const byte RocksUnsafe1 = 212; + public const byte RocksUnsafe2 = 213; + public const byte RocksUnsafe3 = 214; + public const byte RocksUnsafe4 = 215; + public const byte HardenedSand = 216; + public const byte CorruptHardenedSand = 217; + public const byte CrimsonHardenedSand = 218; + public const byte HallowHardenedSand = 219; + public const byte CorruptSandstone = 220; + public const byte CrimsonSandstone = 221; + public const byte HallowSandstone = 222; + public const byte DesertFossil = 223; + public const byte LunarBrickWall = 224; + public const byte CogWall = 225; + public const byte SandFall = 226; + public const byte SnowFall = 227; + public const byte SillyBalloonPinkWall = 228; + public const byte SillyBalloonPurpleWall = 229; + public const byte SillyBalloonGreenWall = 230; + public const byte Count = 231; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(231); + public static bool[] Transparent = WallID.Sets.Factory.CreateBoolSet(88, 89, 90, 91, 92); + 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 class Conversion + { + public static bool[] Grass = WallID.Sets.Factory.CreateBoolSet(63, 64, 65, 66, 67, 68, 69, 70, 81); + public static bool[] Stone = WallID.Sets.Factory.CreateBoolSet(1, 3, 28, 83); + public static bool[] Sandstone = WallID.Sets.Factory.CreateBoolSet(187, 220, 222, 221); + public static bool[] HardenedSand = WallID.Sets.Factory.CreateBoolSet(216, 217, 219, 218); + } + } + } +} diff --git a/IO/FavoritesFile.cs b/IO/FavoritesFile.cs new file mode 100644 index 0000000..8af8806 --- /dev/null +++ b/IO/FavoritesFile.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FavoritesFile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Text; +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() => FileUtilities.WriteAllBytes(this.Path, Encoding.ASCII.GetBytes(JsonConvert.SerializeObject((object) this._data, (Formatting) 1)), this.IsCloudSave); + + public void Load() + { + if (!FileUtilities.Exists(this.Path, this.IsCloudSave)) + { + this._data.Clear(); + } + else + { + this._data = JsonConvert.DeserializeObject>>(Encoding.ASCII.GetString(FileUtilities.ReadAllBytes(this.Path, this.IsCloudSave))); + if (this._data != null) + return; + this._data = new Dictionary>(); + } + } + } +} diff --git a/IO/FileData.cs b/IO/FileData.cs new file mode 100644 index 0000000..f601c54 --- /dev/null +++ b/IO/FileData.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5fd9a9f --- /dev/null +++ b/IO/FileMetadata.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileMetadata +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..f73f031 --- /dev/null +++ b/IO/FileType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/PlayerFileData.cs b/IO/PlayerFileData.cs new file mode 100644 index 0000000..05ede1a --- /dev/null +++ b/IO/PlayerFileData.cs @@ -0,0 +1,143 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.PlayerFileData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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() + { + if (Main.instance.IsActive && !Main.gamePaused && Main.hasFocus && this._isTimerActive) + this.StartPlayTimer(); + else + this.PausePlayTimer(); + } + + public void StartPlayTimer() + { + this._isTimerActive = true; + if (this._timer.IsRunning) + return; + this._timer.Start(); + } + + public void PausePlayTimer() + { + if (!this._timer.IsRunning) + return; + this._timer.Stop(); + } + + public TimeSpan GetPlayTime() => this._timer.IsRunning ? this._playTime + this._timer.Elapsed : this._playTime; + + public void StopPlayTimer() + { + 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..f6f0b23 --- /dev/null +++ b/IO/Preferences.cs @@ -0,0 +1,180 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.Preferences +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Threading; +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 createFile = true) + { + lock (this._lock) + { + try + { + if (this.OnSave != null) + this.OnSave(this); + if (!createFile && !File.Exists(this._path)) + return false; + Directory.GetParent(this._path).Create(); + if (!createFile) + 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()); + Monitor.Exit(this._lock); + 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/WorldFile.cs b/IO/WorldFile.cs new file mode 100644 index 0000000..04799c3 --- /dev/null +++ b/IO/WorldFile.cs @@ -0,0 +1,2382 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.WorldFile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria.IO +{ + public class WorldFile + { + private static object padlock = new object(); + public static double tempTime = Main.time; + public static bool tempRaining = false; + public static float tempMaxRain = 0.0f; + public static int tempRainTime = 0; + public static bool tempDayTime = Main.dayTime; + public static bool tempBloodMoon = Main.bloodMoon; + public static bool tempEclipse = Main.eclipse; + public static int tempMoonPhase = Main.moonPhase; + public static int tempCultistDelay = CultistRitual.delay; + public static int versionNumber; + public static bool IsWorldOnCloud = false; + public static bool tempPartyGenuine = false; + public static bool tempPartyManual = false; + public static int tempPartyCooldown = 0; + public static List tempPartyCelebratingNPCs = new List(); + private static bool HasCache = false; + private static bool? CachedDayTime = new bool?(); + private static double? CachedTime = new double?(); + private static int? CachedMoonPhase = new int?(); + private static bool? CachedBloodMoon = new bool?(); + private static bool? CachedEclipse = new bool?(); + private static int? CachedCultistDelay = new int?(); + private static bool? CachedPartyGenuine = new bool?(); + private static bool? CachedPartyManual = new bool?(); + private static int? CachedPartyDaysOnCooldown = new int?(); + private static List CachedCelebratingNPCs = new List(); + private static bool? Cached_Sandstorm_Happening = new bool?(); + private static bool Temp_Sandstorm_Happening = false; + private static int? Cached_Sandstorm_TimeLeft = new int?(); + private static int Temp_Sandstorm_TimeLeft = 0; + private static float? Cached_Sandstorm_Severity = new float?(); + private static float Temp_Sandstorm_Severity = 0.0f; + private static float? Cached_Sandstorm_IntendedSeverity = new float?(); + private static float Temp_Sandstorm_IntendedSeverity = 0.0f; + + 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.Cached_Sandstorm_Happening = new bool?(Sandstorm.Happening); + WorldFile.Cached_Sandstorm_TimeLeft = new int?(Sandstorm.TimeLeft); + WorldFile.Cached_Sandstorm_Severity = new float?(Sandstorm.Severity); + WorldFile.Cached_Sandstorm_IntendedSeverity = new float?(Sandstorm.IntendedSeverity); + } + + 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.Temp_Sandstorm_Happening = false; + WorldFile.Temp_Sandstorm_TimeLeft = 0; + WorldFile.Temp_Sandstorm_Severity = 0.0f; + WorldFile.Temp_Sandstorm_IntendedSeverity = 0.0f; + } + + 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.Temp_Sandstorm_Happening = Sandstorm.Happening; + WorldFile.Temp_Sandstorm_TimeLeft = Sandstorm.TimeLeft; + WorldFile.Temp_Sandstorm_Severity = Sandstorm.Severity; + WorldFile.Temp_Sandstorm_IntendedSeverity = Sandstorm.IntendedSeverity; + } + + 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.Temp_Sandstorm_Happening = WorldFile.Cached_Sandstorm_Happening.Value; + WorldFile.Temp_Sandstorm_TimeLeft = WorldFile.Cached_Sandstorm_TimeLeft.Value; + WorldFile.Temp_Sandstorm_Severity = WorldFile.Cached_Sandstorm_Severity.Value; + WorldFile.Temp_Sandstorm_IntendedSeverity = WorldFile.Cached_Sandstorm_IntendedSeverity.Value; + } + + 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.Temp_Sandstorm_Happening; + Sandstorm.TimeLeft = WorldFile.Temp_Sandstorm_TimeLeft; + Sandstorm.Severity = WorldFile.Temp_Sandstorm_Severity; + Sandstorm.IntendedSeverity = WorldFile.Temp_Sandstorm_IntendedSeverity; + } + + public static void loadWorld(bool loadFromCloud) + { + 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() ?? "")) + { + Directory.CreateDirectory(Main.worldPathName.Substring(0, index)); + break; + } + } + } + WorldGen.clearWorld(); + Main.ActiveWorldFileData = WorldFile.CreateMetadata(Main.worldName == "" ? "World" : Main.worldName, flag, Main.expertMode); + 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; + WorldFile.versionNumber = num1 = binaryReader.ReadInt32(); + int num2 = num1 > 87 ? WorldFile.LoadWorld_Version2(binaryReader) : WorldFile.LoadWorld_Version1(binaryReader); + if (num1 < 141) + Main.ActiveWorldFileData.CreationTime = loadFromCloud ? DateTime.Now : File.GetCreationTime(Main.worldPathName); + binaryReader.Close(); + memoryStream.Close(); + if (num2 != 0) + WorldGen.loadFailed = true; + else + WorldGen.loadSuccess = true; + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + return; + 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(); + Main.InitLifeBytes(); + if (Main.slimeRainTime > 0.0) + Main.StartSlimeRain(false); + NPC.setWorldMonsters(); + } + catch + { + WorldGen.loadFailed = true; + WorldGen.loadSuccess = false; + try + { + binaryReader.Close(); + memoryStream.Close(); + return; + } + catch + { + return; + } + } + } + } + if (WorldFile.OnWorldLoad == null) + return; + WorldFile.OnWorldLoad(); + } + + public static void saveWorld() => WorldFile.saveWorld(WorldFile.IsWorldOnCloud); + + public static void saveWorld(bool useCloudSaving, bool resetTime = false) + { + if (useCloudSaving && SocialAPI.Cloud == null) + return; + if (Main.worldName == "") + Main.worldName = "World"; + if (WorldGen.saveLock) + return; + WorldGen.saveLock = true; + while (WorldGen.IsGeneratingHardMode) + Main.statusText = Lang.gen[48].Value; + lock (WorldFile.padlock) + { + try + { + Directory.CreateDirectory(Main.WorldPath); + } + catch + { + } + 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[] data1 = (byte[]) null; + int num = 0; + using (MemoryStream memoryStream = new MemoryStream(7000000)) + { + using (BinaryWriter writer = new BinaryWriter((Stream) memoryStream)) + WorldFile.SaveWorld_Version2(writer); + data1 = memoryStream.ToArray(); + num = data1.Length; + } + if (data1 == null) + return; + byte[] data2 = (byte[]) null; + if (FileUtilities.Exists(Main.worldPathName, useCloudSaving)) + data2 = FileUtilities.ReadAllBytes(Main.worldPathName, useCloudSaving); + FileUtilities.Write(Main.worldPathName, data1, num, useCloudSaving); + byte[] buffer = FileUtilities.ReadAllBytes(Main.worldPathName, useCloudSaving); + string path = (string) null; + using (MemoryStream memoryStream = new MemoryStream(buffer, 0, num, false)) + { + using (BinaryReader fileIO = new BinaryReader((Stream) memoryStream)) + { + if (!Main.validateSaves || WorldFile.validateWorld(fileIO)) + { + if (data2 != null) + { + path = Main.worldPathName + ".bak"; + Main.statusText = Lang.gen[50].Value; + } + } + else + path = Main.worldPathName; + } + } + if (path != null && data2 != null) + FileUtilities.WriteAllBytes(path, data2, useCloudSaving); + WorldGen.saveLock = false; + } + Main.serverGenLock = false; + } + + public static int LoadWorld_Version1(BinaryReader fileIO) + { + Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World); + int versionNumber = WorldFile.versionNumber; + if (versionNumber > 194) + 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.expertMode = versionNumber >= 112 && fileIO.ReadBoolean(); + 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(); + 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.oreTier1 = fileIO.ReadInt32(); + WorldGen.oreTier2 = fileIO.ReadInt32(); + WorldGen.oreTier3 = fileIO.ReadInt32(); + } + else if (versionNumber >= 23 && WorldGen.altarCount == 0) + { + WorldGen.oreTier1 = -1; + WorldGen.oreTier2 = -1; + WorldGen.oreTier3 = -1; + } + else + { + WorldGen.oreTier1 = 107; + WorldGen.oreTier2 = 108; + WorldGen.oreTier3 = 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; + 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); + 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.windSpeedSet = fileIO.ReadSingle(); + Main.windSpeed = Main.windSpeedSet; + } + 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.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 + { + 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 = fileIO.ReadByte(); + 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]) + tile.halfBrick(false); + if (versionNumber >= 49) + { + tile.slope(fileIO.ReadByte()); + if (!Main.tileSolid[(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; + for (int index5 = 0; index5 < 1000; ++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 num6 = versionNumber < 59 ? (int) fileIO.ReadByte() : (int) fileIO.ReadInt16(); + if (num6 > 0) + { + if (versionNumber >= 38) + { + Main.chest[index5].item[index6].netDefaults(fileIO.ReadInt32()); + } + else + { + short num7 = ItemID.FromLegacyName(fileIO.ReadString(), versionNumber); + Main.chest[index5].item[index6].SetDefaults((int) num7); + } + Main.chest[index5].item[index6].stack = num6; + 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 num8 = fileIO.ReadBoolean() ? 1 : 0; + string str1 = fileIO.ReadString(); + int num9 = fileIO.ReadInt32(); + return num8 != 0 && (str1 == Main.worldName || num9 == Main.worldID) ? 0 : 2; + } + + public static void SaveWorld_Version2(BinaryWriter writer) + { + int[] pointers = new int[10] + { + 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), + 0 + }; + WorldFile.SaveFooter(writer); + WorldFile.SaveHeaderPointers(writer, pointers); + } + + private static int SaveFileFormatHeader(BinaryWriter writer) + { + short num1 = 470; + short num2 = 10; + writer.Write(194); + 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(194); + 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.expertMode); + 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.oreTier1); + writer.Write(WorldGen.oreTier2); + writer.Write(WorldGen.oreTier3); + writer.Write((byte) WorldGen.treeBG); + 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.windSpeedSet); + 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(Main.invasionSizeStart); + writer.Write(WorldFile.tempCultistDelay); + writer.Write((short) 580); + for (int index = 0; index < 580; ++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.Temp_Sandstorm_Happening); + writer.Write(WorldFile.Temp_Sandstorm_TimeLeft); + writer.Write(WorldFile.Temp_Sandstorm_Severity); + writer.Write(WorldFile.Temp_Sandstorm_IntendedSeverity); + writer.Write(NPC.savedBartender); + DD2Event.Save(writer); + return (int) writer.BaseStream.Position; + } + + private static int SaveWorldTiles(BinaryWriter writer) + { + byte[] buffer = new byte[13]; + for (int i = 0; i < Main.maxTilesX; ++i) + { + float num1 = (float) i / (float) Main.maxTilesX; + Main.statusText = Lang.gen[49].Value + " " + (object) (int) ((double) num1 * 100.0 + 1.0) + "%"; + int num2; + for (int j = 0; j < Main.maxTilesY; j = num2 + 1) + { + Tile tile = Main.tile[i, j]; + int index1 = 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 (tile.type == (ushort) sbyte.MaxValue) + { + WorldGen.KillTile(i, j); + if (!tile.active()) + { + flag = false; + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + } + if (flag) + { + num6 |= (byte) 2; + if (tile.type == (ushort) sbyte.MaxValue) + { + WorldGen.KillTile(i, j); + if (!tile.active() && Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + buffer[index1] = (byte) tile.type; + ++index1; + if (tile.type > (ushort) byte.MaxValue) + { + buffer[index1] = (byte) ((uint) tile.type >> 8); + ++index1; + num6 |= (byte) 32; + } + if (Main.tileFrameImportant[(int) tile.type]) + { + buffer[index1] = (byte) ((uint) tile.frameX & (uint) byte.MaxValue); + int index2 = index1 + 1; + buffer[index2] = (byte) (((int) tile.frameX & 65280) >> 8); + int index3 = index2 + 1; + buffer[index3] = (byte) ((uint) tile.frameY & (uint) byte.MaxValue); + int index4 = index3 + 1; + buffer[index4] = (byte) (((int) tile.frameY & 65280) >> 8); + index1 = index4 + 1; + } + if (tile.color() != (byte) 0) + { + num4 |= (byte) 8; + buffer[index1] = tile.color(); + ++index1; + } + } + if (tile.wall != (byte) 0) + { + num6 |= (byte) 4; + buffer[index1] = tile.wall; + ++index1; + if (tile.wallColor() != (byte) 0) + { + num4 |= (byte) 16; + buffer[index1] = tile.wallColor(); + ++index1; + } + } + if (tile.liquid != (byte) 0) + { + if (tile.lava()) + num6 |= (byte) 16; + else if (tile.honey()) + num6 |= (byte) 24; + else + num6 |= (byte) 8; + buffer[index1] = tile.liquid; + ++index1; + } + 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; + int index5 = 2; + if (num4 != (byte) 0) + { + num8 |= (byte) 1; + buffer[index5] = num4; + --index5; + } + if (num8 != (byte) 0) + { + num6 |= (byte) 1; + buffer[index5] = num8; + --index5; + } + short num9 = 0; + int index6 = j + 1; + for (int index7 = Main.maxTilesY - j - 1; index7 > 0 && tile.isTheSameAs(Main.tile[i, index6]); ++index6) + { + ++num9; + --index7; + } + num2 = j + (int) num9; + if (num9 > (short) 0) + { + buffer[index1] = (byte) ((uint) num9 & (uint) byte.MaxValue); + ++index1; + if (num9 > (short) byte.MaxValue) + { + num6 |= (byte) 128; + buffer[index1] = (byte) (((int) num9 & 65280) >> 8); + ++index1; + } + else + num6 |= (byte) 64; + } + buffer[index5] = num6; + writer.Write(buffer, index5, index1 - index5); + } + } + return (int) writer.BaseStream.Position; + } + + private static int SaveChests(BinaryWriter writer) + { + short num = 0; + for (int index = 0; index < 1000; ++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 < 1000; ++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 SaveDummies(BinaryWriter writer) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (DeprecatedClassLeftInForLoading.dummies[index] != null) + ++num; + } + writer.Write(num); + for (int index = 0; index < 1000; ++index) + { + DeprecatedClassLeftInForLoading dummy = DeprecatedClassLeftInForLoading.dummies[index]; + if (dummy != null) + { + writer.Write(dummy.x); + writer.Write(dummy.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); + } + } + 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; + } + + public 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; + } + 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(); + Main.expertMode = versionNumber >= 112 && reader.ReadBoolean(); + 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.oreTier1 = reader.ReadInt32(); + WorldGen.oreTier2 = reader.ReadInt32(); + WorldGen.oreTier3 = 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.windSpeedSet = reader.ReadSingle(); + Main.windSpeed = Main.windSpeedSet; + 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 < 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 < 580) + NPC.killCount[index] = reader.ReadInt32(); + else + reader.ReadInt32(); + } + if (versionNumber < 128) + return; + Main.fastForwardTime = reader.ReadBoolean(); + Main.UpdateSundial(); + 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.Temp_Sandstorm_Happening = false; + WorldFile.Temp_Sandstorm_TimeLeft = 0; + WorldFile.Temp_Sandstorm_Severity = 0.0f; + WorldFile.Temp_Sandstorm_IntendedSeverity = 0.0f; + } + else + { + WorldFile.Temp_Sandstorm_Happening = reader.ReadBoolean(); + WorldFile.Temp_Sandstorm_TimeLeft = reader.ReadInt32(); + WorldFile.Temp_Sandstorm_Severity = reader.ReadSingle(); + WorldFile.Temp_Sandstorm_IntendedSeverity = reader.ReadSingle(); + } + DD2Event.Load(reader, versionNumber); + } + + 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 = reader.ReadByte(); + 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]) + { + 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); + } + int num8; + switch ((byte) (((int) num4 & 192) >> 6)) + { + case 0: + num8 = 0; + break; + case 1: + num8 = (int) reader.ReadByte(); + break; + default: + num8 = (int) reader.ReadInt16(); + break; + } + if (index3 != -1) + { + if ((double) index2 <= Main.worldSurface) + { + if ((double) (index2 + num8) <= Main.worldSurface) + { + WorldGen.tileCounts[index3] += (num8 + 1) * 5; + } + else + { + int num9 = (int) (Main.worldSurface - (double) index2 + 1.0); + int num10 = num8 + 1 - num9; + WorldGen.tileCounts[index3] += num9 * 5 + num10; + } + } + else + WorldGen.tileCounts[index3] += num8 + 1; + } + for (; num8 > 0; --num8) + { + ++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 < 1000; ++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(); + ++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 int LoadFooter(BinaryReader reader) => !reader.ReadBoolean() || reader.ReadString() != Main.worldName || reader.ReadInt32() != Main.worldID ? 6 : 0; + + public static bool validateWorld(BinaryReader fileIO) + { + new Stopwatch().Start(); + try + { + Stream baseStream = fileIO.BaseStream; + int num1 = fileIO.ReadInt32(); + if (num1 == 0 || num1 > 194) + 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(); + } + 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 num17 = (int) fileIO.ReadInt16(); + int num18 = (int) fileIO.ReadInt16(); + for (int index4 = 0; index4 < num17; ++index4) + { + fileIO.ReadInt32(); + fileIO.ReadInt32(); + fileIO.ReadString(); + for (int index5 = 0; index5 < num18; ++index5) + { + if (fileIO.ReadInt16() > (short) 0) + { + fileIO.ReadInt32(); + int num19 = (int) fileIO.ReadByte(); + } + } + } + if (baseStream.Position != (long) positions[3]) + return false; + int num20 = (int) fileIO.ReadInt16(); + for (int index = 0; index < num20; ++index) + { + fileIO.ReadString(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + } + if (baseStream.Position != (long) positions[4]) + return false; + for (bool flag = fileIO.ReadBoolean(); flag; flag = fileIO.ReadBoolean()) + { + fileIO.ReadInt32(); + fileIO.ReadString(); + double num21 = (double) fileIO.ReadSingle(); + double num22 = (double) fileIO.ReadSingle(); + fileIO.ReadBoolean(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + } + for (bool flag = fileIO.ReadBoolean(); flag; flag = fileIO.ReadBoolean()) + { + fileIO.ReadInt32(); + double num23 = (double) fileIO.ReadSingle(); + double num24 = (double) fileIO.ReadSingle(); + } + if (baseStream.Position != (long) positions[5]) + return false; + if (WorldFile.versionNumber >= 116 && WorldFile.versionNumber <= 121) + { + int num25 = fileIO.ReadInt32(); + for (int index = 0; index < num25; ++index) + { + int num26 = (int) fileIO.ReadInt16(); + int num27 = (int) fileIO.ReadInt16(); + } + if (baseStream.Position != (long) positions[6]) + return false; + } + if (WorldFile.versionNumber >= 122) + { + int num28 = fileIO.ReadInt32(); + for (int index = 0; index < num28; ++index) + TileEntity.Read(fileIO); + } + if (WorldFile.versionNumber >= 170) + { + int num29 = fileIO.ReadInt32(); + for (int index = 0; index < num29; ++index) + fileIO.ReadInt64(); + } + if (WorldFile.versionNumber >= 189) + { + int num30 = fileIO.ReadInt32(); + fileIO.ReadBytes(12 * num30); + } + int num31 = fileIO.ReadBoolean() ? 1 : 0; + string str2 = fileIO.ReadString(); + int num32 = fileIO.ReadInt32(); + bool flag1 = false; + if (num31 != 0 && (str2 == str1 || num32 == num3)) + flag1 = true; + return flag1; + } + 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; + } + } + + public static string GetWorldName(string WorldFileName) + { + if (WorldFileName == null) + return string.Empty; + try + { + using (FileStream fileStream = new FileStream(WorldFileName, FileMode.Open)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) fileStream)) + { + int num1 = binaryReader.ReadInt32(); + if (num1 > 0) + { + if (num1 <= 194) + { + if (num1 <= 87) + { + string str = binaryReader.ReadString(); + binaryReader.Close(); + return str; + } + if (num1 >= 135) + binaryReader.BaseStream.Position += 20L; + int num2 = (int) binaryReader.ReadInt16(); + fileStream.Position = (long) binaryReader.ReadInt32(); + string str1 = binaryReader.ReadString(); + binaryReader.Close(); + return str1; + } + } + } + } + } + catch + { + } + string[] strArray = WorldFileName.Split(Path.DirectorySeparatorChar); + string str2 = strArray[strArray.Length - 1]; + return str2.Substring(0, str2.Length - 4); + } + + public static bool GetWorldDifficulty(string WorldFileName) + { + if (WorldFileName == null) + return false; + try + { + using (FileStream fileStream = new FileStream(WorldFileName, FileMode.Open)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) fileStream)) + { + int num1 = binaryReader.ReadInt32(); + if (num1 >= 135) + binaryReader.BaseStream.Position += 20L; + if (num1 >= 112) + { + if (num1 <= 194) + { + int num2 = (int) binaryReader.ReadInt16(); + fileStream.Position = (long) binaryReader.ReadInt32(); + binaryReader.ReadString(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + binaryReader.ReadInt32(); + return binaryReader.ReadBoolean(); + } + } + } + } + } + catch + { + } + return false; + } + + 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 <= 194) + { + 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); + worldFileData.IsExpertMode = num1 >= 112 && reader.ReadBoolean(); + 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, + bool isExpertMode) + { + WorldFileData worldFileData = new WorldFileData(Main.GetWorldPathFromName(name, cloudSave), cloudSave); + worldFileData.Name = name; + worldFileData.IsExpertMode = isExpertMode; + worldFileData.CreationTime = DateTime.Now; + worldFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.World); + worldFileData.SetFavorite(false); + worldFileData.WorldGeneratorVersion = 833223655425UL; + worldFileData.UniqueId = Guid.NewGuid(); + if (Main.DefaultSeed == "") + worldFileData.SetSeedToRandom(); + else + worldFileData.SetSeed(Main.DefaultSeed); + return worldFileData; + } + + public 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; + } + + 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; + } + + public 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) + { + 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 (keyValuePair.Value.type == (byte) 0 && !TETrainingDummy.ValidTile((int) keyValuePair.Value.Position.X, (int) keyValuePair.Value.Position.Y)) + point16List.Add(keyValuePair.Value.Position); + if (keyValuePair.Value.type == (byte) 2 && !TELogicSensor.ValidTile((int) keyValuePair.Value.Position.X, (int) keyValuePair.Value.Position.Y)) + point16List.Add(keyValuePair.Value.Position); + if (keyValuePair.Value.type == (byte) 1 && !TEItemFrame.ValidTile((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) + { + 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); + } +} diff --git a/IO/WorldFileData.cs b/IO/WorldFileData.cs new file mode 100644 index 0000000..1c9b379 --- /dev/null +++ b/IO/WorldFileData.cs @@ -0,0 +1,134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.WorldFileData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 bool IsExpertMode; + 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 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.IsExpertMode = false; + 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; + if (!int.TryParse(seedText, out this._seed)) + this._seed = seedText.GetHashCode(); + this._seed = 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..008d746 --- /dev/null +++ b/IngameOptions.cs @@ -0,0 +1,1183 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IngameOptions +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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[9] + { + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f + }; + public static float[] rightScale = new float[15] + { + 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 + }; + 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 = false; + public static bool notBar = false; + public static bool noSound = false; + private static Rectangle _GUIHover = new Rectangle(); + public static int category = 0; + public static Vector2 valuePosition = Vector2.Zero; + private static string _mouseOverText; + + public static void Open() + { + Main.playerInventory = false; + Main.editChest = false; + Main.npcChatText = ""; + Main.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; + Main.PlaySound(11); + Recipe.FindRecipes(); + Main.playerInventory = true; + Main.SaveSettings(); + } + + public static void Draw(Main mainInstance, SpriteBatch sb) + { + if (Main.player[Main.myPlayer].dead && !Main.player[Main.myPlayer].ghost) + { + Main.setKey = -1; + IngameOptions.Close(); + Main.playerInventory = false; + } + else + { + for (int index = 0; index < IngameOptions.skipRightSlot.Length; ++index) + IngameOptions.skipRightSlot[index] = false; + bool flag1 = GameCulture.Russian.IsActive || GameCulture.Portuguese.IsActive || GameCulture.Polish.IsActive || GameCulture.French.IsActive; + bool isActive1 = GameCulture.Polish.IsActive; + bool isActive2 = GameCulture.German.IsActive; + bool flag2 = GameCulture.Italian.IsActive || GameCulture.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) + Main.PlaySound(12); + if (IngameOptions.oldRightHover != IngameOptions.rightHover && IngameOptions.rightHover != -1) + Main.PlaySound(12); + if (flag4 && IngameOptions.rightHover != -1 && !IngameOptions.noSound) + Main.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 index = 0; index <= num8; ++index) + { + if (IngameOptions.leftHover == index || index == IngameOptions.category) + IngameOptions.leftScale[index] += num7; + else + IngameOptions.leftScale[index] -= num7; + if ((double) IngameOptions.leftScale[index] < (double) num5) + IngameOptions.leftScale[index] = num5; + if ((double) IngameOptions.leftScale[index] > (double) num6) + IngameOptions.leftScale[index] = 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; + Main.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; + Main.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; + Main.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; + Main.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; + WorldGen.SaveAndQuit(); + } + } + int num9 = i8 + 1; + int category2 = IngameOptions.category; + if (category1 != category2) + { + for (int index = 0; index < IngameOptions.rightScale.Length; ++index) + IngameOptions.rightScale[index] = 0.0f; + } + int num10 = 0; + switch (IngameOptions.category) + { + case 0: + num10 = 15; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 1: + num10 = 6; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 2: + num10 = 12; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 3: + num10 = 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 = num10; + Vector2 anchor2 = new Vector2(vector2_4.X + (float) ((double) vector2_3.X * 3.0 / 4.0), vector2_4.Y + (float) (num4 * 5 / 2)); + if (flag1) + anchor2.X = vector2_4.X + (float) ((double) vector2_3.X * 2.0 / 3.0); + Vector2 offset2 = new Vector2(0.0f, vector2_3.Y - (float) (num4 * 3)) / (float) (num10 + 1); + if (IngameOptions.category == 2) + offset2.Y -= 2f; + for (int index = 0; index < 15; ++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 num11 = 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 = num11; + } + 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 num12 = 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 = num12; + 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 num13 = 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 = num13; + 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 = Main.fontItemStack.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 num14 = 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 = num14 + 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 flag6 = 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 = Main.fontItemStack.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 num15 = IngameOptions.DrawValueBar(sb, scale, Main.temporaryGUIScaleSlider - 1f); + if ((IngameOptions.inBar || IngameOptions.rightLock == i16) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i16; + if (Main.mouseLeft && IngameOptions.rightLock == i16) + { + Main.temporaryGUIScaleSlider = num15 + 1f; + Main.temporaryGUIScaleSliderUpdate = true; + flag6 = true; + } + } + if (!flag6 && 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, Player.SmartCursorSettings.SmartWallReplacement ? Lang.menu[226].Value : Lang.menu[225].Value, i21, anchor2, offset2, IngameOptions.rightScale[i21], (float) (((double) IngameOptions.rightScale[i21] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i21; + if (flag4) + Player.SmartCursorSettings.SmartWallReplacement = !Player.SmartCursorSettings.SmartWallReplacement; + } + int i22 = i21 + 1; + if (IngameOptions.DrawRightSide(sb, Main.ReversedUpDownArmorSetBonuses ? Lang.menu[220].Value : Lang.menu[221].Value, i22, anchor2, offset2, IngameOptions.rightScale[i22], (float) (((double) IngameOptions.rightScale[i22] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i22; + if (flag4) + Main.ReversedUpDownArmorSetBonuses = !Main.ReversedUpDownArmorSetBonuses; + } + int i23 = i22 + 1; + IngameOptions.DrawRightSide(sb, "", i23, anchor2, offset2, IngameOptions.rightScale[i23], 1f); + IngameOptions.skipRightSlot[i23] = true; + int num16 = i23 + 1; + } + if (IngameOptions.category == 1) + { + int i24 = 0; + if (IngameOptions.DrawRightSide(sb, Main.showItemText ? Lang.menu[71].Value : Lang.menu[72].Value, i24, anchor2, offset2, IngameOptions.rightScale[i24], (float) (((double) IngameOptions.rightScale[i24] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i24; + if (flag4) + Main.showItemText = !Main.showItemText; + } + int i25 = i24 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[123].Value + " " + (object) Lang.menu[124 + Main.invasionProgressMode], i25, anchor2, offset2, IngameOptions.rightScale[i25], (float) (((double) IngameOptions.rightScale[i25] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i25; + if (flag4) + { + ++Main.invasionProgressMode; + if (Main.invasionProgressMode >= 3) + Main.invasionProgressMode = 0; + } + } + int i26 = i25 + 1; + if (IngameOptions.DrawRightSide(sb, Main.placementPreview ? Lang.menu[128].Value : Lang.menu[129].Value, i26, anchor2, offset2, IngameOptions.rightScale[i26], (float) (((double) IngameOptions.rightScale[i26] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i26; + if (flag4) + Main.placementPreview = !Main.placementPreview; + } + int i27 = i26 + 1; + if (IngameOptions.DrawRightSide(sb, ItemSlot.Options.HighlightNewItems ? Lang.inter[117].Value : Lang.inter[116].Value, i27, anchor2, offset2, IngameOptions.rightScale[i27], (float) (((double) IngameOptions.rightScale[i27] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i27; + if (flag4) + ItemSlot.Options.HighlightNewItems = !ItemSlot.Options.HighlightNewItems; + } + int i28 = i27 + 1; + if (IngameOptions.DrawRightSide(sb, Main.MouseShowBuildingGrid ? Lang.menu[229].Value : Lang.menu[230].Value, i28, anchor2, offset2, IngameOptions.rightScale[i28], (float) (((double) IngameOptions.rightScale[i28] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i28; + if (flag4) + Main.MouseShowBuildingGrid = !Main.MouseShowBuildingGrid; + } + int i29 = i28 + 1; + if (IngameOptions.DrawRightSide(sb, Main.GamepadDisableInstructionsDisplay ? Lang.menu[241].Value : Lang.menu[242].Value, i29, anchor2, offset2, IngameOptions.rightScale[i29], (float) (((double) IngameOptions.rightScale[i29] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i29; + if (flag4) + Main.GamepadDisableInstructionsDisplay = !Main.GamepadDisableInstructionsDisplay; + } + int num17 = i29 + 1; + } + if (IngameOptions.category == 2) + { + int i30 = 0; + if (IngameOptions.DrawRightSide(sb, Main.graphics.IsFullScreen ? Lang.menu[49].Value : Lang.menu[50].Value, i30, anchor2, offset2, IngameOptions.rightScale[i30], (float) (((double) IngameOptions.rightScale[i30] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i30; + if (flag4) + Main.ToggleFullScreen(); + } + int i31 = i30 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[51].Value + ": " + (object) Main.PendingResolutionWidth + "x" + (object) Main.PendingResolutionHeight, i31, anchor2, offset2, IngameOptions.rightScale[i31], (float) (((double) IngameOptions.rightScale[i31] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i31; + if (flag4) + { + int num18 = 0; + for (int index = 0; index < Main.numDisplayModes; ++index) + { + if (Main.displayWidth[index] == Main.PendingResolutionWidth && Main.displayHeight[index] == Main.PendingResolutionHeight) + { + num18 = index; + break; + } + } + int index1 = num18 + 1; + if (index1 >= Main.numDisplayModes) + index1 = 0; + Main.PendingResolutionWidth = Main.displayWidth[index1]; + Main.PendingResolutionHeight = Main.displayHeight[index1]; + } + } + int i32 = i31 + 1; + anchor2.X -= (float) num1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[52].Value + ": " + (object) Main.bgScroll + "%", i32, anchor2, offset2, IngameOptions.rightScale[i32], (float) (((double) IngameOptions.rightScale[i32] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.noSound = 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) Main.bgScroll / 100f); + if ((IngameOptions.inBar || IngameOptions.rightLock == i32) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i32; + if (Main.mouseLeft && IngameOptions.rightLock == i32) + { + Main.bgScroll = (int) ((double) num19 * 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 = i32; + } + if (IngameOptions.rightHover == i32) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 1; + int i33 = i32 + 1; + anchor2.X += (float) num1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[247 + Main.FrameSkipMode].Value, i33, anchor2, offset2, IngameOptions.rightScale[i33], (float) (((double) IngameOptions.rightScale[i33] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i33; + if (flag4) + { + ++Main.FrameSkipMode; + if (Main.FrameSkipMode < 0 || Main.FrameSkipMode > 2) + Main.FrameSkipMode = 0; + } + } + int i34 = i33 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[55 + Lighting.lightMode].Value, i34, anchor2, offset2, IngameOptions.rightScale[i34], (float) (((double) IngameOptions.rightScale[i34] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i34; + if (flag4) + Lighting.NextLightMode(); + } + int i35 = i34 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[116].Value + " " + (Lighting.LightingThreads > 0 ? string.Concat((object) (Lighting.LightingThreads + 1)) : Lang.menu[117].Value), i35, anchor2, offset2, IngameOptions.rightScale[i35], (float) (((double) IngameOptions.rightScale[i35] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i35; + if (flag4) + { + ++Lighting.LightingThreads; + if (Lighting.LightingThreads > Environment.ProcessorCount - 1) + Lighting.LightingThreads = 0; + } + } + int i36 = i35 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[59 + Main.qaStyle].Value, i36, anchor2, offset2, IngameOptions.rightScale[i36], (float) (((double) IngameOptions.rightScale[i36] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i36; + if (flag4) + { + ++Main.qaStyle; + if (Main.qaStyle > 3) + Main.qaStyle = 0; + } + } + int i37 = i36 + 1; + if (IngameOptions.DrawRightSide(sb, Main.BackgroundEnabled ? Lang.menu[100].Value : Lang.menu[101].Value, i37, anchor2, offset2, IngameOptions.rightScale[i37], (float) (((double) IngameOptions.rightScale[i37] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i37; + if (flag4) + Main.BackgroundEnabled = !Main.BackgroundEnabled; + } + int i38 = i37 + 1; + if (IngameOptions.DrawRightSide(sb, ChildSafety.Disabled ? Lang.menu[132].Value : Lang.menu[133].Value, i38, anchor2, offset2, IngameOptions.rightScale[i38], (float) (((double) IngameOptions.rightScale[i38] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i38; + if (flag4) + ChildSafety.Disabled = !ChildSafety.Disabled; + } + int i39 = i38 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.HeatDistortion", Main.UseHeatDistortion ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")), i39, anchor2, offset2, IngameOptions.rightScale[i39], (float) (((double) IngameOptions.rightScale[i39] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i39; + if (flag4) + Main.UseHeatDistortion = !Main.UseHeatDistortion; + } + int i40 = i39 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.StormEffects", Main.UseStormEffects ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")), i40, anchor2, offset2, IngameOptions.rightScale[i40], (float) (((double) IngameOptions.rightScale[i40] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i40; + if (flag4) + Main.UseStormEffects = !Main.UseStormEffects; + } + int i41 = i40 + 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), i41, anchor2, offset2, IngameOptions.rightScale[i41], (float) (((double) IngameOptions.rightScale[i41] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i41; + if (flag4) + Main.WaveQuality = (Main.WaveQuality + 1) % 4; + } + int num20 = i41 + 1; + } + if (IngameOptions.category == 3) + { + int i42 = 0; + float num21 = (float) num1; + if (flag1) + num2 = 126f; + Vector3 hslVector = Main.mouseColorSlider.GetHSLVector(); + Main.mouseColorSlider.ApplyToMainLegacyBars(); + IngameOptions.DrawRightSide(sb, Lang.menu[64].Value, i42, anchor2, offset2, IngameOptions.rightScale[i42], 1f); + IngameOptions.skipRightSlot[i42] = true; + int i43 = i42 + 1; + anchor2.X -= num21; + if (IngameOptions.DrawRightSide(sb, "", i43, anchor2, offset2, IngameOptions.rightScale[i43], (float) (((double) IngameOptions.rightScale[i43] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i43; + } + 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 = hslVector; + float num22 = IngameOptions.DrawValueBar(sb, scale, hslVector.X, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_H)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i43) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i43; + if (Main.mouseLeft && IngameOptions.rightLock == i43) + { + hslVector.X = num22; + 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 = i43; + } + if (IngameOptions.rightHover == i43) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5; + Main.menuMode = 25; + } + int i44 = i43 + 1; + if (IngameOptions.DrawRightSide(sb, "", i44, anchor2, offset2, IngameOptions.rightScale[i44], (float) (((double) IngameOptions.rightScale[i44] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i44; + } + 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 = hslVector; + float num23 = IngameOptions.DrawValueBar(sb, scale, hslVector.Y, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_S)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i44) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i44; + if (Main.mouseLeft && IngameOptions.rightLock == i44) + { + hslVector.Y = num23; + 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 = i44; + } + if (IngameOptions.rightHover == i44) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6; + Main.menuMode = 25; + } + int i45 = i44 + 1; + if (IngameOptions.DrawRightSide(sb, "", i45, anchor2, offset2, IngameOptions.rightScale[i45], (float) (((double) IngameOptions.rightScale[i45] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i45; + } + 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 = hslVector; + DelegateMethods.v3_1.Z = Utils.InverseLerp(0.15f, 1f, DelegateMethods.v3_1.Z, true); + float num24 = IngameOptions.DrawValueBar(sb, scale, DelegateMethods.v3_1.Z, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_L)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i45) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i45; + if (Main.mouseLeft && IngameOptions.rightLock == i45) + { + hslVector.Z = (float) ((double) num24 * 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 = i45; + } + if (IngameOptions.rightHover == i45) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7; + Main.menuMode = 25; + } + int i46 = i45 + 1; + if ((double) hslVector.Z < 0.150000005960464) + hslVector.Z = 0.15f; + Main.mouseColorSlider.SetHSL(hslVector); + Main.mouseColor = Main.mouseColorSlider.GetColor(); + anchor2.X += num21; + IngameOptions.DrawRightSide(sb, "", i46, anchor2, offset2, IngameOptions.rightScale[i46], 1f); + IngameOptions.skipRightSlot[i46] = true; + int i47 = i46 + 1; + hslVector = Main.mouseBorderColorSlider.GetHSLVector(); + if (PlayerInput.UsingGamepad && IngameOptions.rightHover == -1) + Main.mouseBorderColorSlider.ApplyToMainLegacyBars(); + IngameOptions.DrawRightSide(sb, Lang.menu[217].Value, i47, anchor2, offset2, IngameOptions.rightScale[i47], 1f); + IngameOptions.skipRightSlot[i47] = true; + int i48 = i47 + 1; + anchor2.X -= num21; + 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 = hslVector; + float num25 = IngameOptions.DrawValueBar(sb, scale, hslVector.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) + { + hslVector.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 = 252; + } + 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 = hslVector; + float num26 = IngameOptions.DrawValueBar(sb, scale, hslVector.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) + { + hslVector.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 = 252; + } + 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 = hslVector; + float num27 = IngameOptions.DrawValueBar(sb, scale, hslVector.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) + { + hslVector.Z = num27; + 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 = 252; + } + int i51 = i50 + 1; + if (IngameOptions.DrawRightSide(sb, "", i51, anchor2, offset2, IngameOptions.rightScale[i51], (float) (((double) IngameOptions.rightScale[i51] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i51; + } + 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 = hslVector; + float perc = Main.mouseBorderColorSlider.Alpha; + float num28 = IngameOptions.DrawValueBar(sb, scale, perc, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_O)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i51) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i51; + if (Main.mouseLeft && IngameOptions.rightLock == i51) + { + perc = 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 = i51; + } + if (IngameOptions.rightHover == i51) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 8; + Main.menuMode = 252; + } + int i52 = i51 + 1; + Main.mouseBorderColorSlider.SetHSL(hslVector); + Main.mouseBorderColorSlider.Alpha = perc; + Main.MouseBorderColor = Main.mouseBorderColorSlider.GetColor(); + anchor2.X += num21; + IngameOptions.DrawRightSide(sb, "", i52, anchor2, offset2, IngameOptions.rightScale[i52], 1f); + IngameOptions.skipRightSlot[i52] = true; + int i53 = i52 + 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, i53, anchor2, offset2, IngameOptions.rightScale[i53] * 0.9f, (float) (((double) IngameOptions.rightScale[i53] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i53; + if (flag4) + LockOnHelper.CycleUseModes(); + } + int i54 = i53 + 1; + if (IngameOptions.DrawRightSide(sb, Player.SmartCursorSettings.SmartBlocksEnabled ? Lang.menu[215].Value : Lang.menu[216].Value, i54, anchor2, offset2, IngameOptions.rightScale[i54] * 0.9f, (float) (((double) IngameOptions.rightScale[i54] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i54; + if (flag4) + Player.SmartCursorSettings.SmartBlocksEnabled = !Player.SmartCursorSettings.SmartBlocksEnabled; + } + int i55 = i54 + 1; + if (IngameOptions.DrawRightSide(sb, Main.cSmartCursorToggle ? Lang.menu[121].Value : Lang.menu[122].Value, i55, anchor2, offset2, IngameOptions.rightScale[i55], (float) (((double) IngameOptions.rightScale[i55] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i55; + if (flag4) + Main.cSmartCursorToggle = !Main.cSmartCursorToggle; + } + int i56 = i55 + 1; + if (IngameOptions.DrawRightSide(sb, Player.SmartCursorSettings.SmartAxeAfterPickaxe ? Lang.menu[214].Value : Lang.menu[213].Value, i56, anchor2, offset2, IngameOptions.rightScale[i56] * 0.9f, (float) (((double) IngameOptions.rightScale[i56] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i56; + if (flag4) + Player.SmartCursorSettings.SmartAxeAfterPickaxe = !Player.SmartCursorSettings.SmartAxeAfterPickaxe; + } + int num29 = i56 + 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)); + int num30 = 0; + Vector2 zero = Vector2.Zero; + if (flag1) + zero.X = -40f; + for (int index = 0; index < num10; ++index) + { + if (!IngameOptions.skipRightSlot[index]) + { + UILinkPointNavigator.SetPosition(2930 + num30, anchor2 + zero + offset2 * (float) (index + 1)); + ++num30; + } + } + UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT = num30; + 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) + { + int num = i == IngameOptions.category ? 1 : 0; + Color color = Color.Lerp(Color.Gray, Color.White, (float) (((double) scales[i] - (double) minscale) / ((double) maxscale - (double) minscale))); + if (num != 0) + 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 bool DrawValue(SpriteBatch sb, string txt, int i, float scale, Color over = default (Color)) + { + Color color = Color.Gray; + Vector2 vector2 = Main.fontMouseText.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 colorBarTexture = Main.colorBarTexture; + Vector2 vector2 = new Vector2((float) colorBarTexture.Width, (float) colorBarTexture.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(colorBarTexture, 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(Main.colorBlipTexture, new Vector2(num2 + num3 * scale, y), new Rectangle?(), colorMethod(percent), 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + } + destinationRectangle1.X = (int) num2; + destinationRectangle1.Y = (int) y; + bool flag = destinationRectangle1.Contains(new Point(Main.mouseX, Main.mouseY)); + if (lockState == 2) + flag = false; + if (flag || lockState == 1) + sb.Draw(Main.colorHighlightTexture, destinationRectangle2, Main.OurFavoriteColor); + sb.Draw(Main.colorSliderTexture, new Vector2(num2 + 167f * scale * perc, y + 4f * scale), new Rectangle?(), Color.White, 0.0f, new Vector2(0.5f * (float) Main.colorSliderTexture.Width, 0.5f * (float) Main.colorSliderTexture.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..029ba10 --- /dev/null +++ b/Initializers/AchievementInitializer.cs @@ -0,0 +1,751 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.AchievementInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Achievements; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.UI.Chat; +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("NO_HOBO"); + achievement2.AddCondition((AchievementCondition) ProgressionEventCondition.Create(8)); + Main.Achievements.Register(achievement2); + Achievement achievement3 = new Achievement("OBTAIN_HAMMER"); + achievement3.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) 1305)); + Main.Achievements.Register(achievement3); + Achievement achievement4 = new Achievement("OOO_SHINY"); + achievement4.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(achievement4); + Achievement achievement5 = new Achievement("HEART_BREAKER"); + achievement5.AddCondition(TileDestroyedCondition.Create((ushort) 12)); + Main.Achievements.Register(achievement5); + Achievement achievement6 = new Achievement("HEAVY_METAL"); + achievement6.AddCondition(ItemPickupCondition.Create((short) 35, (short) 716)); + Main.Achievements.Register(achievement6); + Achievement achievement7 = new Achievement("I_AM_LOOT"); + achievement7.AddCondition(CustomFlagCondition.Create("Peek")); + Main.Achievements.Register(achievement7); + Achievement achievement8 = new Achievement("STAR_POWER"); + achievement8.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement8); + Achievement achievement9 = new Achievement("HOLD_ON_TIGHT"); + achievement9.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement9); + Achievement achievement10 = new Achievement("EYE_ON_YOU"); + achievement10.AddCondition(NPCKilledCondition.Create((short) 4)); + Main.Achievements.Register(achievement10); + Achievement achievement11 = new Achievement("SMASHING_POPPET"); + achievement11.AddCondition((AchievementCondition) ProgressionEventCondition.Create(7)); + Main.Achievements.Register(achievement11); + Achievement achievement12 = new Achievement("WORM_FODDER"); + achievement12.AddCondition(NPCKilledCondition.Create((short) 13, (short) 14, (short) 15)); + Main.Achievements.Register(achievement12); + Achievement achievement13 = new Achievement("MASTERMIND"); + achievement13.AddCondition(NPCKilledCondition.Create((short) 266)); + Main.Achievements.Register(achievement13); + Achievement achievement14 = new Achievement("WHERES_MY_HONEY"); + achievement14.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement14); + Achievement achievement15 = new Achievement("STING_OPERATION"); + achievement15.AddCondition(NPCKilledCondition.Create((short) 222)); + Main.Achievements.Register(achievement15); + Achievement achievement16 = new Achievement("BONED"); + achievement16.AddCondition(NPCKilledCondition.Create((short) 35)); + Main.Achievements.Register(achievement16); + Achievement achievement17 = new Achievement("DUNGEON_HEIST"); + achievement17.AddCondition(ItemPickupCondition.Create((short) 327)); + achievement17.AddCondition((AchievementCondition) ProgressionEventCondition.Create(19)); + Main.Achievements.Register(achievement17); + Achievement achievement18 = new Achievement("ITS_GETTING_HOT_IN_HERE"); + achievement18.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement18); + Achievement achievement19 = new Achievement("MINER_FOR_FIRE"); + achievement19.AddCondition(ItemCraftCondition.Create((short) 122)); + Main.Achievements.Register(achievement19); + Achievement achievement20 = new Achievement("STILL_HUNGRY"); + achievement20.AddCondition(NPCKilledCondition.Create((short) 113, (short) 114)); + Main.Achievements.Register(achievement20); + Achievement achievement21 = new Achievement("ITS_HARD"); + achievement21.AddCondition((AchievementCondition) ProgressionEventCondition.Create(9)); + Main.Achievements.Register(achievement21); + Achievement achievement22 = new Achievement("BEGONE_EVIL"); + achievement22.AddCondition((AchievementCondition) ProgressionEventCondition.Create(6)); + Main.Achievements.Register(achievement22); + Achievement achievement23 = new Achievement("EXTRA_SHINY"); + achievement23.AddCondition(TileDestroyedCondition.Create((ushort) 107, (ushort) 108, (ushort) 111, (ushort) 221, (ushort) 222, (ushort) 223)); + Main.Achievements.Register(achievement23); + Achievement achievement24 = new Achievement("HEAD_IN_THE_CLOUDS"); + achievement24.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement24); + Achievement achievement25 = new Achievement("LIKE_A_BOSS"); + achievement25.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(achievement25); + Achievement achievement26 = new Achievement("BUCKETS_OF_BOLTS"); + achievement26.AddCondition(NPCKilledCondition.Create((short) 125, (short) 126)); + achievement26.AddConditions(NPCKilledCondition.CreateMany((short) sbyte.MaxValue, (short) 134)); + achievement26.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement26); + Achievement achievement27 = new Achievement("DRAX_ATTAX"); + achievement27.AddCondition(ItemCraftCondition.Create((short) 579, (short) 990)); + Main.Achievements.Register(achievement27); + Achievement achievement28 = new Achievement("PHOTOSYNTHESIS"); + achievement28.AddCondition(TileDestroyedCondition.Create((ushort) 211)); + Main.Achievements.Register(achievement28); + Achievement achievement29 = new Achievement("GET_A_LIFE"); + achievement29.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement29); + Achievement achievement30 = new Achievement("THE_GREAT_SOUTHERN_PLANTKILL"); + achievement30.AddCondition(NPCKilledCondition.Create((short) 262)); + Main.Achievements.Register(achievement30); + Achievement achievement31 = new Achievement("TEMPLE_RAIDER"); + achievement31.AddCondition(TileDestroyedCondition.Create((ushort) 226)); + Main.Achievements.Register(achievement31); + Achievement achievement32 = new Achievement("LIHZAHRDIAN_IDOL"); + achievement32.AddCondition(NPCKilledCondition.Create((short) 245)); + Main.Achievements.Register(achievement32); + Achievement achievement33 = new Achievement("ROBBING_THE_GRAVE"); + achievement33.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)); + Main.Achievements.Register(achievement33); + Achievement achievement34 = new Achievement("BIG_BOOTY"); + achievement34.AddCondition((AchievementCondition) ProgressionEventCondition.Create(20)); + Main.Achievements.Register(achievement34); + Achievement achievement35 = new Achievement("FISH_OUT_OF_WATER"); + achievement35.AddCondition(NPCKilledCondition.Create((short) 370)); + Main.Achievements.Register(achievement35); + Achievement achievement36 = new Achievement("OBSESSIVE_DEVOTION"); + achievement36.AddCondition(NPCKilledCondition.Create((short) 439)); + Main.Achievements.Register(achievement36); + Achievement achievement37 = new Achievement("STAR_DESTROYER"); + achievement37.AddConditions(NPCKilledCondition.CreateMany((short) 517, (short) 422, (short) 507, (short) 493)); + Main.Achievements.Register(achievement37); + Achievement achievement38 = new Achievement("CHAMPION_OF_TERRARIA"); + achievement38.AddCondition(NPCKilledCondition.Create((short) 398)); + Main.Achievements.Register(achievement38); + Achievement achievement39 = new Achievement("BLOODBATH"); + achievement39.AddCondition((AchievementCondition) ProgressionEventCondition.Create(5)); + Main.Achievements.Register(achievement39); + Achievement achievement40 = new Achievement("SLIPPERY_SHINOBI"); + achievement40.AddCondition(NPCKilledCondition.Create((short) 50)); + Main.Achievements.Register(achievement40); + Achievement achievement41 = new Achievement("GOBLIN_PUNTER"); + achievement41.AddCondition((AchievementCondition) ProgressionEventCondition.Create(10)); + Main.Achievements.Register(achievement41); + Achievement achievement42 = new Achievement("WALK_THE_PLANK"); + achievement42.AddCondition((AchievementCondition) ProgressionEventCondition.Create(11)); + Main.Achievements.Register(achievement42); + Achievement achievement43 = new Achievement("KILL_THE_SUN"); + achievement43.AddCondition((AchievementCondition) ProgressionEventCondition.Create(3)); + Main.Achievements.Register(achievement43); + Achievement achievement44 = new Achievement("DO_YOU_WANT_TO_SLAY_A_SNOWMAN"); + achievement44.AddCondition((AchievementCondition) ProgressionEventCondition.Create(12)); + Main.Achievements.Register(achievement44); + Achievement achievement45 = new Achievement("TIN_FOIL_HATTER"); + achievement45.AddCondition((AchievementCondition) ProgressionEventCondition.Create(13)); + Main.Achievements.Register(achievement45); + Achievement achievement46 = new Achievement("BALEFUL_HARVEST"); + achievement46.AddCondition((AchievementCondition) ProgressionEventCondition.Create(15)); + Main.Achievements.Register(achievement46); + Achievement achievement47 = new Achievement("ICE_SCREAM"); + achievement47.AddCondition((AchievementCondition) ProgressionEventCondition.Create(14)); + Main.Achievements.Register(achievement47); + Achievement achievement48 = new Achievement("STICKY_SITUATION"); + achievement48.AddCondition((AchievementCondition) ProgressionEventCondition.Create(16)); + Main.Achievements.Register(achievement48); + Achievement achievement49 = new Achievement("REAL_ESTATE_AGENT"); + achievement49.AddCondition((AchievementCondition) ProgressionEventCondition.Create(17)); + Main.Achievements.Register(achievement49); + Achievement achievement50 = new Achievement("NOT_THE_BEES"); + achievement50.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement50); + Achievement achievement51 = new Achievement("JEEPERS_CREEPERS"); + achievement51.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement51); + Achievement achievement52 = new Achievement("FUNKYTOWN"); + achievement52.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement52); + Achievement achievement53 = new Achievement("INTO_ORBIT"); + achievement53.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement53); + Achievement achievement54 = new Achievement("ROCK_BOTTOM"); + achievement54.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement54); + Achievement achievement55 = new Achievement("MECHA_MAYHEM"); + achievement55.AddCondition((AchievementCondition) ProgressionEventCondition.Create(21)); + Main.Achievements.Register(achievement55); + Achievement achievement56 = new Achievement("GELATIN_WORLD_TOUR"); + achievement56.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)); + achievement56.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement56); + Achievement achievement57 = new Achievement("FASHION_STATEMENT"); + achievement57.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement57); + Achievement achievement58 = new Achievement("VEHICULAR_MANSLAUGHTER"); + achievement58.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement58); + Achievement achievement59 = new Achievement("BULLDOZER"); + achievement59.AddCondition(CustomIntCondition.Create("Pick", 10000)); + achievement59.UseTrackerFromCondition("Pick"); + Main.Achievements.Register(achievement59); + Achievement achievement60 = new Achievement("THERE_ARE_SOME_WHO_CALL_HIM"); + achievement60.AddCondition(NPCKilledCondition.Create((short) 45)); + Main.Achievements.Register(achievement60); + Achievement achievement61 = new Achievement("DECEIVER_OF_FOOLS"); + achievement61.AddCondition(NPCKilledCondition.Create((short) 196)); + Main.Achievements.Register(achievement61); + Achievement achievement62 = new Achievement("SWORD_OF_THE_HERO"); + achievement62.AddCondition(ItemPickupCondition.Create((short) 757)); + Main.Achievements.Register(achievement62); + Achievement achievement63 = new Achievement("LUCKY_BREAK"); + achievement63.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement63); + Achievement achievement64 = new Achievement("THROWING_LINES"); + achievement64.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement64); + Achievement achievement65 = new Achievement("DYE_HARD"); + achievement65.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement65); + Achievement achievement66 = new Achievement("SICK_THROW"); + achievement66.AddCondition(ItemPickupCondition.Create((short) 3389)); + Main.Achievements.Register(achievement66); + Achievement achievement67 = new Achievement("FREQUENT_FLYER"); + achievement67.AddCondition(CustomFloatCondition.Create("Pay", 10000f)); + achievement67.UseTrackerFromCondition("Pay"); + Main.Achievements.Register(achievement67); + Achievement achievement68 = new Achievement("THE_CAVALRY"); + achievement68.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement68); + Achievement achievement69 = new Achievement("COMPLETELY_AWESOME"); + achievement69.AddCondition(ItemPickupCondition.Create((short) 98)); + Main.Achievements.Register(achievement69); + Achievement achievement70 = new Achievement("TIL_DEATH"); + achievement70.AddCondition(NPCKilledCondition.Create((short) 53)); + Main.Achievements.Register(achievement70); + Achievement achievement71 = new Achievement("ARCHAEOLOGIST"); + achievement71.AddCondition(NPCKilledCondition.Create((short) 52)); + Main.Achievements.Register(achievement71); + Achievement achievement72 = new Achievement("PRETTY_IN_PINK"); + achievement72.AddCondition(NPCKilledCondition.Create((short) -4)); + Main.Achievements.Register(achievement72); + Achievement achievement73 = new Achievement("RAINBOWS_AND_UNICORNS"); + achievement73.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement73); + Achievement achievement74 = new Achievement("YOU_AND_WHAT_ARMY"); + achievement74.AddCondition(CustomFlagCondition.Create("Spawn")); + Main.Achievements.Register(achievement74); + Achievement achievement75 = new Achievement("PRISMANCER"); + achievement75.AddCondition(ItemPickupCondition.Create((short) 495)); + Main.Achievements.Register(achievement75); + Achievement achievement76 = new Achievement("IT_CAN_TALK"); + achievement76.AddCondition((AchievementCondition) ProgressionEventCondition.Create(18)); + Main.Achievements.Register(achievement76); + Achievement achievement77 = new Achievement("WATCH_YOUR_STEP"); + achievement77.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement77); + Achievement achievement78 = new Achievement("MARATHON_MEDALIST"); + achievement78.AddCondition(CustomFloatCondition.Create("Move", 1106688f)); + achievement78.UseTrackerFromCondition("Move"); + Main.Achievements.Register(achievement78); + Achievement achievement79 = new Achievement("GLORIOUS_GOLDEN_POLE"); + achievement79.AddCondition(ItemPickupCondition.Create((short) 2294)); + Main.Achievements.Register(achievement79); + Achievement achievement80 = new Achievement("SERVANT_IN_TRAINING"); + achievement80.AddCondition(CustomFlagCondition.Create("Finish")); + Main.Achievements.Register(achievement80); + Achievement achievement81 = new Achievement("GOOD_LITTLE_SLAVE"); + achievement81.AddCondition(CustomIntCondition.Create("Finish", 10)); + achievement81.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement81); + Achievement achievement82 = new Achievement("TROUT_MONKEY"); + achievement82.AddCondition(CustomIntCondition.Create("Finish", 25)); + achievement82.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement82); + Achievement achievement83 = new Achievement("FAST_AND_FISHIOUS"); + achievement83.AddCondition(CustomIntCondition.Create("Finish", 50)); + achievement83.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement83); + Achievement achievement84 = new Achievement("SUPREME_HELPER_MINION"); + achievement84.AddCondition(CustomIntCondition.Create("Finish", 200)); + achievement84.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement84); + Achievement achievement85 = new Achievement("TOPPED_OFF"); + achievement85.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement85); + Achievement achievement86 = new Achievement("SLAYER_OF_WORLDS"); + achievement86.AddCondition(NPCKilledCondition.Create((short) 13, (short) 14, (short) 15)); + achievement86.AddCondition(NPCKilledCondition.Create((short) 113, (short) 114)); + achievement86.AddCondition(NPCKilledCondition.Create((short) 125, (short) 126)); + achievement86.AddConditions(NPCKilledCondition.CreateMany((short) 4, (short) 35, (short) 50, (short) 222, (short) 113, (short) 134, (short) sbyte.MaxValue, (short) 262, (short) 245, (short) 439, (short) 398, (short) 370)); + achievement86.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement86); + Achievement achievement87 = new Achievement("YOU_CAN_DO_IT"); + achievement87.AddCondition((AchievementCondition) ProgressionEventCondition.Create(1)); + Main.Achievements.Register(achievement87); + Achievement achievement88 = new Achievement("MATCHING_ATTIRE"); + achievement88.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement88); + 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); + 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("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))); + } +} diff --git a/Initializers/ChatInitializer.cs b/Initializers/ChatInitializer.cs new file mode 100644 index 0000000..fa96bb8 --- /dev/null +++ b/Initializers/ChatInitializer.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.ChatInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Chat.Commands; +using Terraria.GameContent.UI.Chat; +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().AddDefaultCommand(); + } + } +} diff --git a/Initializers/DyeInitializer.cs b/Initializers/DyeInitializer.cs new file mode 100644 index 0000000..38cff87 --- /dev/null +++ b/Initializers/DyeInitializer.cs @@ -0,0 +1,450 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.DyeInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +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 ArmorShaderData(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(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(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 HairShaderData(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; + 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); + if (!Main.gameMenu && !Main.gamePaused) + { + if (Main.rand.Next(45) == 0) + { + int Type = Main.rand.Next(139, 143); + int index = Dust.NewDust(player.position, player.width, 8, Type, 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 += player.velocity * 0.2f; + } + if (Main.rand.Next(225) == 0) + { + int Type = Main.rand.Next(276, 283); + int index = Gore.NewGore(new Vector2(player.position.X + (float) Main.rand.Next(player.width), player.position.Y + (float) Main.rand.Next(8)), player.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.01f; + Main.gore[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + --Main.gore[index].velocity.Y; + Main.gore[index].velocity += player.velocity * 0.2f; + } + } + 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"); + } + + 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..9454530 --- /dev/null +++ b/Initializers/LaunchInitializer.cs @@ -0,0 +1,203 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.LaunchInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 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 = 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]{ "-autocreate" }; + string worldSize; + if ((worldSize = LaunchInitializer.TryParameter(strArray8)) != null) + game.autoCreate(worldSize); + if (LaunchInitializer.HasParameter("-noupnp")) + Netplay.UseUPNP = false; + if (LaunchInitializer.HasParameter("-experimental")) + Main.UseExperimentalFeatures = true; + string[] strArray9 = new string[1]{ "-world" }; + string world2; + if ((world2 = LaunchInitializer.TryParameter(strArray9)) != null) + game.SetWorld(world2, false); + else if (SocialAPI.Mode == SocialMode.Steam) + { + string[] strArray10 = new string[1]{ "-cloudworld" }; + string world3; + if ((world3 = LaunchInitializer.TryParameter(strArray10)) != null) + game.SetWorld(world3, true); + } + string[] strArray11 = new string[1]{ "-config" }; + string configPath; + if ((configPath = LaunchInitializer.TryParameter(strArray11)) != null) + game.LoadDedConfig(configPath); + string[] strArray12 = new string[1]{ "-seed" }; + string str3; + if ((str3 = LaunchInitializer.TryParameter(strArray12)) == 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..fa8fb0d --- /dev/null +++ b/Initializers/NetworkInitializer.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.NetworkInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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(); + } + } +} diff --git a/Initializers/PlayerDataInitializer.cs b/Initializers/PlayerDataInitializer.cs new file mode 100644 index 0000000..1746483 --- /dev/null +++ b/Initializers/PlayerDataInitializer.cs @@ -0,0 +1,212 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.PlayerDataInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using Terraria.Graphics; + +namespace Terraria.Initializers +{ + public static class PlayerDataInitializer + { + public static void Load() + { + Main.playerTextures = new Texture2D[10, 15]; + PlayerDataInitializer.LoadStarterMale(); + PlayerDataInitializer.LoadStarterFemale(); + PlayerDataInitializer.LoadStickerMale(); + PlayerDataInitializer.LoadStickerFemale(); + PlayerDataInitializer.LoadGangsterMale(); + PlayerDataInitializer.LoadGangsterFemale(); + PlayerDataInitializer.LoadCoatMale(); + PlayerDataInitializer.LoadDressFemale(); + PlayerDataInitializer.LoadDressMale(); + PlayerDataInitializer.LoadCoatFemale(); + } + + private static void LoadDebugs() + { + PlayerDataInitializer.CopyVariant(8, 0); + PlayerDataInitializer.CopyVariant(9, 4); + for (int index = 8; index < 10; ++index) + { + Main.playerTextures[index, 4] = Main.armorArmTexture[191]; + Main.playerTextures[index, 6] = Main.armorArmTexture[191]; + Main.playerTextures[index, 11] = Main.armorArmTexture[191]; + Main.playerTextures[index, 12] = Main.armorArmTexture[191]; + Main.playerTextures[index, 13] = Main.armorArmTexture[191]; + Main.playerTextures[index, 8] = Main.armorArmTexture[191]; + } + } + + private static void LoadVariant(int ID, int[] pieceIDs) + { + for (int index = 0; index < pieceIDs.Length; ++index) + Main.playerTextures[ID, pieceIDs[index]] = TextureManager.Load("Images/Player_" + (object) ID + "_" + (object) pieceIDs[index]); + } + + private static void CopyVariant(int to, int from) + { + for (int index = 0; index < 15; ++index) + Main.playerTextures[to, index] = Main.playerTextures[from, index]; + } + + private static void LoadStarterMale() + { + PlayerDataInitializer.LoadVariant(0, new int[14] + { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + }); + Main.playerTextures[0, 14] = TextureManager.BlankTexture; + } + + 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 + }); + } + } +} diff --git a/Initializers/ScreenEffectInitializer.cs b/Initializers/ScreenEffectInitializer.cs new file mode 100644 index 0000000..7f06787 --- /dev/null +++ b/Initializers/ScreenEffectInitializer.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.ScreenEffectInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.5f), 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.5f), 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"), EffectPriority.VeryHigh); + Filters.Scene["MoonLordShake"] = new Filter((ScreenShaderData) new MoonLordScreenShaderData("FilterMoonLordShake"), EffectPriority.VeryHigh); + 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); + 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(); + 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["Sandstorm"] = (CustomSky) new SandstormSky(); + SkyManager.Instance["Blizzard"] = (CustomSky) new BlizzardSky(); + SkyManager.Instance.Load(); + } + } +} diff --git a/Initializers/UILinksInitializer.cs b/Initializers/UILinksInitializer.cs new file mode 100644 index 0000000..8f4d729 --- /dev/null +++ b/Initializers/UILinksInitializer.cs @@ -0,0 +1,1498 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.UILinksInitializer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +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 HandleSlider( + 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 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, -4, -1, -2)); + cp1.UpdateEvent += (Action) (() => cp1.LinkMap[2501].Right = UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight ? 2502 : -4); + 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].releaseUseTile = false; + }); + 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, 302, 301, 49, -2)); + cp2.LinkMap.Add(301, new UILinkPoint(301, true, 300, 302, 53, 50)); + cp2.LinkMap.Add(302, new UILinkPoint(302, true, 301, 300, 57, 54)); + cp2.LinkMap[301].OnSpecialInteracts += func1; + cp2.LinkMap[302].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; + for (int key = 40; key <= 49; ++key) + cp2.LinkMap[key].Down = !inReforgeMenu ? (!flag1 ? (!flag2 ? -2 : 2700 + key - 40) : 400 + key - 40) : (key < 45 ? 303 : 304); + if (flag1) + { + cp2.LinkMap[300].Up = 439; + cp2.LinkMap[300].Right = -4; + cp2.LinkMap[300].Left = -3; + } + else if (flag2) + { + cp2.LinkMap[300].Up = 2739; + cp2.LinkMap[300].Right = -4; + cp2.LinkMap[300].Left = -3; + } + else + { + cp2.LinkMap[300].Up = 49; + cp2.LinkMap[300].Right = 301; + cp2.LinkMap[300].Left = 302; + cp2.LinkMap[49].Down = 300; + } + cp2.LinkMap[10].Left = 54; + cp2.LinkMap[20].Left = 55; + cp2.LinkMap[30].Left = 56; + cp2.LinkMap[40].Left = 57; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 8) + { + cp2.LinkMap[0].Left = 4000; + cp2.LinkMap[10].Left = 4002; + cp2.LinkMap[20].Left = 4004; + cp2.LinkMap[30].Left = 4006; + cp2.LinkMap[40].Left = 4008; + } + else + { + cp2.LinkMap[0].Left = 9; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 0) + cp2.LinkMap[10].Left = 4000; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 2) + cp2.LinkMap[20].Left = 4002; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 4) + cp2.LinkMap[30].Left = 4004; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 6) + cp2.LinkMap[40].Left = 4006; + } + cp2.PageOnLeft = Main.InReforgeMenu ? 5 : 9; + }); + 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; + } + cp5.LinkMap.Add(index, uiLinkPoint); + } + cp5.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 0); + cp5.UpdateEvent += (Action) (() => + { + int num1 = 107; + int extraAccessorySlots = Main.player[Main.myPlayer].extraAccessorySlots; + for (int index = 0; index < extraAccessorySlots; ++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 + extraAccessorySlots].Down = 308; + cp5.LinkMap[num1 - 100 + 120 + extraAccessorySlots].Down = 308; + cp5.LinkMap[num1 + 10 + extraAccessorySlots].Down = 308; + bool shouldPvpDraw = Main.ShouldPVPDraw; + for (int key = 120; key <= 129; ++key) + { + UILinkPoint link = cp5.LinkMap[key]; + int num2 = key - 120; + 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; + if (num2 == 7) + link.Left = shouldPvpDraw ? 1557 : -3; + } + }); + 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 -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[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[409].Right = 500; + page2.LinkMap[419].Right = 501; + page2.LinkMap[429].Right = 502; + page2.LinkMap[439].Right = 503; + page2.LinkMap[439].Down = 300; + page2.PageOnLeft = 0; + page2.PageOnRight = 0; + page2.DefaultPoint = 500; + 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 - 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 += func9; + 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; + page3.LinkMap.Add(index, uiLinkPoint); + } + page3.LinkMap[2739].Down = 300; + page3.PageOnLeft = 0; + page3.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(page3, 13); + page3.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 func10 = (Func) (() => ItemSlot.GetGamepadInstructions(ref Main.reforgeItem, 5)); + cp6.LinkMap[303].OnSpecialInteracts += func10; + 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) (() => + { + if (PlayerInput.Triggers.JustPressed.Grapple) + { + Point tileCoordinates = Main.player[Main.myPlayer].Center.ToTileCoordinates(); + if (UILinkPointNavigator.CurrentPoint == 600) + { + if (WorldGen.MoveTownNPC(tileCoordinates.X, tileCoordinates.Y, -1)) + Main.NewText(Lang.inter[39].Value, G: (byte) 240, B: (byte) 20); + Main.PlaySound(12); + } + else if (WorldGen.MoveTownNPC(tileCoordinates.X, tileCoordinates.Y, UILinkPointNavigator.Shortcuts.NPCS_LastHovered)) + { + WorldGen.moveRoom(tileCoordinates.X, tileCoordinates.Y, UILinkPointNavigator.Shortcuts.NPCS_LastHovered); + Main.PlaySound(12); + } + } + if (PlayerInput.Triggers.JustPressed.SmartSelect) + UILinkPointNavigator.Shortcuts.NPCS_IconsDisplay = !UILinkPointNavigator.Shortcuts.NPCS_IconsDisplay; + return 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, true, PlayerInput.ProfileGamepadUI.KeyStatus["SmartSelect"]); + }); + 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 func11 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 20, slot); + }); + Func func12 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 19, slot); + }); + Func func13 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 18, slot); + }); + Func func14 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 17, slot); + }); + Func func15 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 16, slot); + }); + Func func16 = (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 += func12; + break; + case 181: + uiLinkPoint.OnSpecialInteracts += func11; + break; + case 182: + uiLinkPoint.OnSpecialInteracts += func13; + break; + case 183: + uiLinkPoint.OnSpecialInteracts += func14; + break; + case 184: + uiLinkPoint.OnSpecialInteracts += func15; + break; + } + } + for (int index = 185; index <= 189; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, index - 5, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func16; + 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].extraAccessorySlots - 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.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 func17 = (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 += func17; + 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; + 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 flag3 = false; + if (Main.mouseItem.type == 0 && player.ItemSpace(Main.recipe[Main.availableRecipe[Main.focusRecipe]].createItem) && !player.IsStackingItems()) + { + flag3 = true; + if (PlayerInput.Triggers.Current.Grapple && Main.stackSplit <= 1) + { + if (PlayerInput.Triggers.JustPressed.Grapple) + UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[Main.focusRecipe]]; + Main.stackSplit = Main.stackSplit != 0 ? Main.stackDelay : 15; + 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); + } + } + } + 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)) + Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem); + } + } + bool flag4 = Main.mouseItem.stack <= 0; + if (flag4 || Main.mouseItem.type == Main.recipe[Main.availableRecipe[Main.focusRecipe]].createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack) + { + if (flag4) + 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 (!flag4 && Main.mouseItem.type == Main.recipe[Main.availableRecipe[Main.focusRecipe]].createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack) + str += PlayerInput.BuildCommand(Lang.misc[93].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + if (flag3) + 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 && player.ItemSpace(Main.recipe[Main.availableRecipe[index]].createItem) && !player.IsStackingItems()) + { + flag = true; + if (PlayerInput.Triggers.JustPressed.Grapple) + UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[index]]; + if (PlayerInput.Triggers.Current.Grapple && Main.stackSplit <= 1) + { + Main.stackSplit = Main.stackSplit != 0 ? Main.stackDelay : 15; + if (UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent == Main.recipe[Main.availableRecipe[index]]) + { + Main.CraftItem(Main.recipe[Main.availableRecipe[index]]); + Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem); + } + } + } + } + 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.ReachEndEvent += (Action) ((current, next) => + { + int craftIconsPerRow = UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow; + switch (next) + { + case -2: + Main.recStart += craftIconsPerRow; + Main.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 num10 = Main.UnlockedMaxHair(); + 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 == num10 - 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; + Main.PlaySound(12); + } + else + { + if (next != -2) + return; + Main.hairStart += num; + Main.PlaySound(12); + } + }); + cp12.CanEnterEvent += (Func) (() => Main.hairWindow); + cp12.IsValidEvent += (Func) (() => Main.hairWindow); + cp12.PageOnLeft = 12; + cp12.PageOnRight = 12; + UILinkPointNavigator.RegisterPage(cp12, 11); + 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"])); + page4.LinkMap.Add(2600, new UILinkPoint(2600, true, -3, -4, -1, 2601)); + page4.LinkMap.Add(2601, new UILinkPoint(2601, true, -3, -4, 2600, 2602)); + page4.LinkMap.Add(2602, new UILinkPoint(2602, true, -3, -4, 2601, 2603)); + page4.LinkMap.Add(2603, new UILinkPoint(2603, true, -3, 2604, 2602, -2)); + page4.LinkMap.Add(2604, new UILinkPoint(2604, true, 2603, -4, 2602, -2)); + page4.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); + Main.PlaySound(12); + }); + page4.CanEnterEvent += (Func) (() => Main.hairWindow); + page4.IsValidEvent += (Func) (() => Main.hairWindow); + page4.PageOnLeft = 11; + page4.PageOnRight = 11; + UILinkPointNavigator.RegisterPage(page4, 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 >= 4) + return; + IngameOptions.category = num; + }); + cp13.UpdateEvent += (Action) (() => + { + int num11 = UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_LEFT; + if (num11 == 0) + num11 = 5; + if (UILinkPointNavigator.OverridePoint == -1 && cp13.CurrentPoint < 2930 && cp13.CurrentPoint > 2900 + num11 - 1) + UILinkPointNavigator.ChangePoint(2900); + for (int key = 2900; key < 2900 + num11; ++key) + { + cp13.LinkMap[key].Up = key - 1; + cp13.LinkMap[key].Down = key + 1; + } + cp13.LinkMap[2900].Up = 2900 + num11 - 1; + cp13.LinkMap[2900 + num11 - 1].Down = 2900; + int num12 = cp13.CurrentPoint - 2900; + if (num12 >= 4 || !PlayerInput.Triggers.JustPressed.MouseLeft) + return; + IngameOptions.category = num12; + 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.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 num13 = UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT; + if (num13 == 0) + num13 = 5; + if (UILinkPointNavigator.OverridePoint == -1 && cp14.CurrentPoint >= 2930 && cp14.CurrentPoint > 2930 + num13 - 1) + UILinkPointNavigator.ChangePoint(2930); + for (int key = 2930; key < 2930 + num13; ++key) + { + cp14.LinkMap[key].Up = key - 1; + cp14.LinkMap[key].Down = key + 1; + } + cp14.LinkMap[2930].Up = -1; + cp14.LinkMap[2930 + num13 - 1].Down = -2; + int num14 = 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 = 1557; + cp15.LinkMap[1556].Down = 1557; + cp15.LinkMap[1556].Right = 122; + cp15.LinkMap[1557].Up = 1555; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + 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) + UILinkPointNavigator.ChangePoint(1557); + cp15.LinkMap[1557].Up = -1; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + } + else + { + cp15.LinkMap[1557].Up = 1555; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + } + int infoacccount = UILinkPointNavigator.Shortcuts.INFOACCCOUNT; + if (infoacccount > 0) + cp15.LinkMap[1557].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 = 1557; + cp15.LinkMap[1556].Down = 1557; + } + if (infoacccount >= 2) + cp15.LinkMap[1556].Down = 1559; + else + cp15.LinkMap[1556].Down = 1557; + }); + 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 : 1557; + 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 = 4000; index < 4010; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, -1, -2); + switch (index - 4000) + { + case 0: + case 1: + uiLinkPoint.Right = 0; + break; + case 2: + case 3: + uiLinkPoint.Right = 10; + break; + case 4: + case 5: + uiLinkPoint.Right = 20; + break; + case 6: + case 7: + uiLinkPoint.Right = 30; + break; + case 8: + case 9: + uiLinkPoint.Right = 40; + break; + } + cp17.LinkMap.Add(index, uiLinkPoint); + } + cp17.UpdateEvent += (Action) (() => + { + int builderacccount = UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT; + if (UILinkPointNavigator.OverridePoint == -1 && cp17.CurrentPoint - 4000 >= builderacccount) + UILinkPointNavigator.ChangePoint(4000 + builderacccount - 1); + for (int index = 0; index < builderacccount; ++index) + { + int num = index % 2; + int key = index + 4000; + 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 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"])); + page5.LinkMap.Add(2806, new UILinkPoint(2806, true, 2805, 2807, -1, 2808)); + page5.LinkMap.Add(2807, new UILinkPoint(2807, true, 2806, -4, -1, 2809)); + page5.LinkMap.Add(2808, new UILinkPoint(2808, true, 2805, 2809, 2806, -2)); + page5.LinkMap.Add(2809, new UILinkPoint(2809, true, 2808, -4, 2807, -2)); + page5.LinkMap.Add(2805, new UILinkPoint(2805, true, -3, 2806, -1, -2)); + page5.LinkMap[2806].OnSpecialInteracts += func1; + page5.LinkMap[2807].OnSpecialInteracts += func1; + page5.LinkMap[2808].OnSpecialInteracts += func1; + page5.LinkMap[2809].OnSpecialInteracts += func1; + page5.LinkMap[2805].OnSpecialInteracts += func1; + page5.CanEnterEvent += (Func) (() => Main.clothesWindow); + page5.IsValidEvent += (Func) (() => Main.clothesWindow); + page5.EnterEvent += (Action) (() => Main.player[Main.myPlayer].releaseInventory = false); + page5.LeaveEvent += (Action) (() => Main.player[Main.myPlayer].releaseUseTile = false); + page5.PageOnLeft = 15; + page5.PageOnRight = 15; + UILinkPointNavigator.RegisterPage(page5, 14); + 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(2800, new UILinkPoint(2800, true, -3, -4, -1, 2801)); + page6.LinkMap.Add(2801, new UILinkPoint(2801, true, -3, -4, 2800, 2802)); + page6.LinkMap.Add(2802, new UILinkPoint(2802, true, -3, -4, 2801, 2803)); + page6.LinkMap.Add(2803, new UILinkPoint(2803, true, -3, 2804, 2802, -2)); + page6.LinkMap.Add(2804, new UILinkPoint(2804, true, 2803, -4, 2802, -2)); + page6.LinkMap[2800].OnSpecialInteracts += func1; + page6.LinkMap[2801].OnSpecialInteracts += func1; + page6.LinkMap[2802].OnSpecialInteracts += func1; + page6.LinkMap[2803].OnSpecialInteracts += func1; + page6.LinkMap[2804].OnSpecialInteracts += func1; + 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 == 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; + } + } + Main.PlaySound(12); + }); + page6.CanEnterEvent += (Func) (() => Main.clothesWindow); + page6.IsValidEvent += (Func) (() => Main.clothesWindow); + page6.EnterEvent += (Action) (() => Main.player[Main.myPlayer].releaseInventory = false); + page6.LeaveEvent += (Action) (() => Main.player[Main.myPlayer].releaseUseTile = false); + page6.PageOnLeft = 14; + page6.PageOnRight = 14; + UILinkPointNavigator.RegisterPage(page6, 15); + UILinkPage cp18 = new UILinkPage(); + cp18.UpdateEvent += (Action) (() => PlayerInput.GamepadAllowScrolling = true); + for (int index = 0; index < 200; ++index) + cp18.LinkMap.Add(3000 + index, new UILinkPoint(3000 + 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); + UILinkPointNavigator.RegisterPage(cp18, 1004); + UILinkPage cp19 = new UILinkPage(); + cp19.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 func18 = (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); + cp19.LinkMap.Add(index, uiLinkPoint); + uiLinkPoint.OnSpecialInteracts += func18; + } + cp19.UpdateEvent += (Action) (() => + { + int num = UILinkPointNavigator.Shortcuts.BUFFS_PER_COLUMN; + if (num == 0) + num = 100; + for (int index = 0; index < 50; ++index) + { + cp19.LinkMap[9000 + index].Up = index % num == 0 ? -1 : 9000 + index - 1; + if (cp19.LinkMap[9000 + index].Up == -1) + cp19.LinkMap[9000 + index].Up = index < num ? 189 : 184; + cp19.LinkMap[9000 + index].Down = (index + 1) % num == 0 || index == UILinkPointNavigator.Shortcuts.BUFFS_DRAWN - 1 ? 308 : 9000 + index + 1; + cp19.LinkMap[9000 + index].Left = index < UILinkPointNavigator.Shortcuts.BUFFS_DRAWN - num ? 9000 + index + num : -3; + cp19.LinkMap[9000 + index].Right = index < num ? -4 : 9000 + index - num; + } + }); + cp19.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 2 && UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0); + cp19.PageOnLeft = 8; + cp19.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp19, 19); + UILinkPage page7 = UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage]; + page7.CurrentPoint = page7.DefaultPoint; + page7.Enter(); + } + + public static void FancyExit() + { + switch (UILinkPointNavigator.Shortcuts.BackButtonCommand) + { + case 1: + Main.PlaySound(11); + Main.menuMode = 0; + break; + case 2: + Main.PlaySound(11); + Main.menuMode = Main.menuMultiplayer ? 12 : 1; + break; + case 3: + Main.menuMode = 0; + IngameFancyUI.Close(); + break; + case 4: + Main.PlaySound(11); + Main.menuMode = 11; + break; + case 5: + Main.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.HandleSlider((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.HandleSlider(Main.musicVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 3: + Main.soundVolume = UILinksInitializer.HandleSlider(Main.soundVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 4: + Main.ambientVolume = UILinksInitializer.HandleSlider(Main.ambientVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 5: + double hBar = (double) Main.hBar; + float num1 = Main.hBar = UILinksInitializer.HandleSlider((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; + } + Main.PlaySound(12); + break; + case 6: + double sBar = (double) Main.sBar; + float num2 = Main.sBar = UILinksInitializer.HandleSlider((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; + } + Main.PlaySound(12); + break; + case 7: + double lBar = (double) Main.lBar; + float min = 0.15f; + if (Main.menuMode == 252) + min = 0.0f; + float num3 = Main.lBar = UILinksInitializer.HandleSlider((float) lBar, min, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if (lBar == (double) num3) + 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 = num3; + break; + case 252: + Main.mouseBorderColorSlider.Luminance = num3; + break; + } + Main.PlaySound(12); + break; + case 8: + double aBar = (double) Main.aBar; + float num4 = Main.aBar = UILinksInitializer.HandleSlider((float) aBar, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if (aBar == (double) num4) + break; + if (Main.menuMode == 252) + Main.mouseBorderColorSlider.Alpha = num4; + Main.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 num5 = 51; + if (Main.PendingPlayer.hair >= num5) + Main.PendingPlayer.hair = 0; + if (Main.PendingPlayer.hair >= 0) + break; + Main.PendingPlayer.hair = num5 - 1; + break; + case 10: + Main.GameZoomTarget = UILinksInitializer.HandleSlider(Main.GameZoomTarget, 1f, 2f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 11: + Main.UIScale = UILinksInitializer.HandleSlider(Main.UIScaleWanted, 1f, 2f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + Main.temporaryGUIScaleSlider = Main.UIScaleWanted; + break; + } + } + + public class SomeVarsForUILinkers + { + public static Recipe SequencedCraftingCurrent; + public static int HairMoveCD; + } + } +} diff --git a/Item.cs b/Item.cs new file mode 100644 index 0000000..9df3c29 --- /dev/null +++ b/Item.cs @@ -0,0 +1,38199 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Item +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameContent.Events; +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 flaskTime = 72000; + public const int copper = 1; + public const int silver = 100; + public const int gold = 10000; + public const int platinum = 1000000; + public static int[] itemCaches = ItemID.Sets.Factory.CreateIntSet(-1); + public static int potionDelay = 3600; + public static int restorationDelay = 3000; + public bool questItem; + public static int[] headType = new int[216]; + public static int[] bodyType = new int[210]; + public static int[] legType = new int[161]; + public static bool[] staff = new bool[3930]; + public static bool[] claw = new bool[3930]; + public bool flame; + public bool mech; + public int noGrabDelay; + public bool beingGrabbed; + public bool isBeingGrabbed; + public int spawnTime; + public int tileWand = -1; + public bool wornArmor; + 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 short makeNPC; + public bool expertOnly; + public bool expert; + 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 int owner = (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 release; + 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 thrown; + public bool summon; + public bool sentry; + public int reuseDelay; + public bool newAndShiny; + + 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.itemCaches[t] != -1) + return; + Item.itemCaches[t] = 0; + } + + public static void DropCache(Vector2 pos, Vector2 spread, int t, bool stopCaching = true) + { + if (Item.itemCaches[t] == -1) + return; + int itemCach = Item.itemCaches[t]; + Item.itemCaches[t] = stopCaching ? -1 : 0; + Item obj = new Item(); + obj.SetDefaults(t); + int Stack; + for (; itemCach > 0; itemCach -= Stack) + { + Stack = obj.maxStack; + if (itemCach < Stack) + Stack = itemCach; + Item.NewItem((int) pos.X, (int) pos.Y, (int) spread.X, (int) spread.Y, t, Stack); + } + } + + 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 (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 == 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 == 3498 || this.type == 3500 || this.type == 3501 || this.type == 3502 || this.type == 3503 || this.type == 3504 || 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 == 3772 || this.type == 3823 || this.type == 3827) + { + 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 == 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) + { + 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 == 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) + { + int num11 = unifiedRandom.Next(36); + 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 = 42; + if (num11 == 23) + num1 = 43; + if (num11 == 24) + num1 = 44; + if (num11 == 25) + num1 = 45; + if (num11 == 26) + num1 = 46; + if (num11 == 27) + num1 = 47; + if (num11 == 28) + num1 = 48; + if (num11 == 29) + num1 = 49; + if (num11 == 30) + num1 = 50; + if (num11 == 31) + num1 = 51; + if (num11 == 32) + num1 = 59; + if (num11 == 33) + num1 = 60; + if (num11 == 34) + num1 = 61; + if (num11 == 35) + 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 == 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) + { + 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) + { + int num13 = unifiedRandom.Next(14); + 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; + } + else + { + if (!this.accessory || this.type == 267 || this.type == 562 || this.type == 563 || this.type == 564 || this.type == 565 || this.type == 566 || this.type == 567 || this.type == 568 || this.type == 569 || this.type == 570 || this.type == 571 || this.type == 572 || this.type == 573 || this.type == 574 || this.type == 576 || this.type == 1307 || this.type >= 1596 && this.type < 1610 || this.vanity) + 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; + } + 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) this.crit * 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; + } + + 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() => 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; + } + 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; + } + } + } + switch (this.type) + { + case 529: + case 541: + case 542: + case 543: + case 852: + case 853: + case 1151: + this.material = true; + return true; + default: + 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 < 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; + + 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 -4: + return 151; + case -3: + return 119; + case -2: + case 121: + return 167; + case 1: + case 302: + case 333: + case 334: + case 335: + case 336: + return 69; + case 2: + case 133: + 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: + 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 16: + return 146; + 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 176: + 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 81: + return 99; + case 82: + return 85; + case 83: + return 23; + case 84: + return 28; + case 85: + 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 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 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: + return 219; + case 411: + return 216; + case 412: + case 413: + case 414: + return 224; + case 415: + return 226; + case 416: + 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 460: + return 196; + case 461: + return 191; + case 462: + return 190; + case 463: + return 199; + case 466: + return 197; + case 467: + return 198; + case 468: + return 192; + case 469: + return 195; + case 471: + return 186; + case 477: + 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: + return 210; + case 509: + 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 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; + 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 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 509; + case 210: + return 508; + 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; + default: + return 0; + } + } + + 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.useStyle = 3; + this.useTurn = false; + this.useAnimation = 12; + this.useTime = 12; + this.width = 24; + this.height = 28; + this.damage = 8; + this.knockBack = 4f; + this.scale = 0.9f; + this.UseSound = SoundID.Item1; + this.useTurn = true; + this.value = 1400; + this.melee = 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 = 99; + 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 = 2000; + } + 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 = 1000; + } + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + this.consumable = 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 = 2; + 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.thrown = 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; + } + 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.1f; + 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 = 4000; + } + else if (type == 57) + { + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.rare = 1; + this.value = 16000; + 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 = 99; + 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 = 99; + 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 = 200; + } + 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.UseSound = SoundID.Item8; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 1; + this.noMelee = true; + this.knockBack = 1f; + this.value = 10000; + 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; + } + 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 = 20; + this.maxStack = 99; + 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 = 750; + } + else if (type == 77) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 2; + this.value = 3000; + } + else if (type == 78) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.legSlot = 3; + this.value = 7500; + } + else if (type == 79) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.legSlot = 4; + this.value = 15000; + } + else if (type == 80) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 1; + this.value = 1000; + } + else if (type == 81) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 2; + this.value = 4000; + } + else if (type == 82) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.bodySlot = 3; + this.value = 10000; + } + else if (type == 83) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.bodySlot = 4; + this.value = 20000; + } + 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 = 99; + 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 = 1250; + } + else if (type == 90) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 2; + this.value = 5000; + } + else if (type == 91) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 3; + this.value = 12500; + } + else if (type == 92) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 4; + this.value = 25000; + } + 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 = 100000; + 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.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 = 2; + 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 = 50000; + 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 = 10000; + this.magic = true; + } + else if (type == 113) + { + this.mana = 10; + 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 = 17; + this.useTime = 17; + this.rare = 2; + this.noMelee = true; + this.knockBack = 7.5f; + this.value = 10000; + 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 = 10000; + 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 = 99; + 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 = 34; + 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 = 2; + 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.Item12; + 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; + } + 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.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.thrown = true; + this.ammo = 154; + this.notAmmo = false; + } + else if (type == 155) + { + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 18; + this.width = 40; + this.height = 40; + this.damage = 19; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = 27000; + this.knockBack = 2.5f; + this.melee = true; + } + else if (type == 156) + { + this.width = 24; + this.height = 28; + this.rare = 2; + this.value = 27000; + 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 = 27000; + 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 = 27000; + 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.thrown = true; + } + else if (type == 162) + { + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 6.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 = 27000; + 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 = 7f; + this.width = 30; + this.height = 10; + this.damage = 23; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 26; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = 27000; + this.melee = true; + this.channel = true; + } + else if (type == 164) + { + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + 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 = 50000; + 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 = 50000; + } + 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 = 30; + 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.thrown = 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; + } + 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; + } + else if (type == 175) + { + this.width = 20; + this.height = 20; + this.maxStack = 99; + 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; + } + 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 = 2; + 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 = 2; + 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.defense = 1; + } + else if (type == 194) + { + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + 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 = 99; + 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 = 1500; + 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 = 15000; + this.melee = true; + } + else if (type == 218) + { + this.mana = 12; + this.channel = true; + this.damage = 40; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 34; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item20; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.knockBack = 6.5f; + this.value = 10000; + 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 = 50000; + 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 = 7.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 = 27000; + 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) + { + type = 227; + this.UseSound = SoundID.Item3; + this.healMana = 80; + this.healLife = 80; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 20; + 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 = 50; + 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 = 10000; + 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 = 54000; + 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 = 27000; + 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 = 400; + 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 = 5f; + this.width = 40; + this.height = 40; + this.damage = 11; + 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.thrown = 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 = 99; + 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 = 5000; + 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 = 99; + 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.thrown = true; + break; + case 288: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + break; + case 289: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 290: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + break; + case 291: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 7200; + this.value = 1000; + this.rare = 1; + break; + case 292: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 293: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 25200; + this.value = 1000; + this.rare = 1; + break; + case 294: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 7200; + this.value = 1000; + this.rare = 1; + break; + case 295: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 296: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 2; + 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 = 7200; + this.value = 1000; + this.rare = 1; + break; + case 298: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 299: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + break; + case 300: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 2; + 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 = 7200; + this.value = 1000; + this.rare = 1; + break; + case 302: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 303: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + break; + case 304: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + break; + case 305: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 5; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 313: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 314: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 315: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 316: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 317: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 318: + this.maxStack = 99; + 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; + 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 = 75000; + 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 353: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 99; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 25; + this.buffTime = 7200; + this.value = 100; + this.holdStyle = 1; + this.ammo = 353; + this.notAmmo = true; + 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 357: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 108000; + this.rare = 1; + this.value = 1000; + 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 = 25; + this.useTime = 25; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 50; + 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 = 99; + 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; + 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 = 99; + 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 = 99; + 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 = 8; + 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 = 8; + 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 = 6; + 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 = 7; + 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 = 7f; + this.width = 30; + this.height = 10; + this.damage = 63; + 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 = 99; + 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 = 100000; + 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; + 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 = 200; + 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 = 30; + this.knockBack = 8f; + this.width = 60; + this.height = 70; + this.damage = 39; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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 = 19; + 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 = 25; + this.useTime = 25; + 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 = 23; + this.useTime = 23; + 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 = 200000; + 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 = 20; + this.useTime = 20; + 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.useStyle = 1; + this.useAnimation = 27; + this.useTime = 27; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 44; + 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 = 34; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 69000; + this.melee = true; + break; + case 484: + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 39; + 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; + break; + case 486: + this.width = 10; + this.height = 26; + this.accessory = true; + this.value = 10000; + this.rare = 1; + 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 = 18; + this.channel = true; + this.damage = 74; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 79; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item28; + this.useAnimation = 18; + this.useTime = 18; + 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 = 150000; + this.rare = 5; + 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; + break; + case 499: + this.UseSound = SoundID.Item3; + this.healLife = 150; + this.useStyle = 2; + 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 = 2; + 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 = 27; + 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 = 4; + this.UseSound = SoundID.Item9; + this.noMelee = true; + this.useStyle = 5; + this.damage = 25; + 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 = 500000; + break; + case 519: + this.autoReuse = true; + this.rare = 4; + this.mana = 12; + this.UseSound = SoundID.Item20; + this.noMelee = true; + this.useStyle = 5; + this.damage = 36; + this.useAnimation = 20; + this.useTime = 20; + 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 = 500000; + 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 = 99; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 8; + this.width = 10; + this.height = 12; + this.value = 300; + 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; + this.notAmmo = 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 = 300000; + 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 = 80; + 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 = 1500; + 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 = 500000; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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 = 19; + this.useTime = 19; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 43; + 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; + 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 = 10; + 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 = 10; + 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 = 10; + 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; + 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; + 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; + 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; + 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; + break; + case 663: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 44; + this.width = 12; + this.height = 12; + 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; + break; + case 667: + this.width = 18; + this.height = 18; + this.bodySlot = 26; + this.rare = 9; + this.vanity = true; + break; + case 668: + this.width = 18; + this.height = 18; + this.legSlot = 25; + this.rare = 9; + this.vanity = true; + 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 = 70; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = 138000; + 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 = 90; + 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 = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 9; + 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 = 700000; + 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 = 40; + 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 = 25; + this.UseSound = SoundID.Item20; + this.noMelee = true; + this.useStyle = 5; + this.damage = 73; + this.useAnimation = 22; + this.useTime = 22; + 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 = 1875; + break; + case 688: + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 28; + this.value = Item.sellPrice(copper: 50); + break; + case 689: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 27; + this.value = 1125; + break; + case 690: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 48; + this.value = 7500; + break; + case 691: + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 29; + this.value = 6000; + break; + case 692: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 28; + this.value = 4500; + break; + case 693: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 49; + this.value = 7500; + break; + case 694: + this.width = 18; + this.height = 18; + this.defense = 5; + this.bodySlot = 30; + this.value = 6000; + break; + case 695: + this.width = 18; + this.height = 18; + this.defense = 3; + this.legSlot = 29; + this.value = 4500; + break; + case 696: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 50; + this.value = 7500; + break; + case 697: + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 31; + this.value = 6000; + break; + case 698: + this.width = 18; + this.height = 18; + this.defense = 5; + this.legSlot = 30; + this.value = 4500; + 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 = 1500; + 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 = 3000; + break; + case 703: + this.width = 20; + this.height = 20; + this.maxStack = 99; + 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 = 99; + 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 = 99; + 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 = 99; + 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.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; + 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 = 15; + this.useTime = 60; + this.width = 30; + this.height = 30; + this.shoot = 116; + this.shootSpeed = 11f; + this.knockBack = 6.5f; + this.melee = true; + this.value = 500000; + 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 = 21; + this.useTime = 21; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 46; + this.shootSpeed = 10f; + this.knockBack = 4.5f; + this.alpha = 30; + this.rare = 5; + this.noMelee = true; + this.value = Item.sellPrice(gold: 3, silver: 50); + this.ranged = true; + break; + case 726: + this.autoReuse = true; + this.rare = 5; + this.mana = 14; + this.UseSound = SoundID.Item20; + this.useStyle = 5; + this.damage = 46; + this.useAnimation = 20; + this.useTime = 20; + this.width = 30; + this.height = 30; + this.shoot = 359; + this.shootSpeed = 16f; + this.knockBack = 5f; + this.magic = true; + this.value = 500000; + 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 = 30; + this.useTime = 30; + 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 = 100000; + 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 = 50; + this.shootSpeed = 5f; + this.noMelee = true; + this.value = 100000; + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + break; + case 760: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 40; + this.useTime = 40; + 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 = 7; + 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 = 10; + this.damage = 28; + this.useStyle = 5; + this.shootSpeed = 32f; + this.shoot = 150; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + 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 = 50000; + this.scale = 0.9f; + this.rare = 1; + this.ranged = true; + break; + case 801: + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 6.5f; + this.width = 30; + this.height = 10; + this.damage = 16; + 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 = 10000; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + break; + case 843: + this.width = 18; + this.height = 14; + this.bodySlot = 40; + this.rare = 1; + this.vanity = true; + break; + case 844: + this.width = 18; + this.height = 14; + this.legSlot = 38; + this.rare = 1; + this.vanity = true; + 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; + 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 = 500000; + this.handOnSlot = (sbyte) 4; + break; + case 861: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = 500000; + break; + case 862: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = 500000; + 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.vanity = true; + 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 = 4500; + break; + case 881: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 25; + this.useTime = 25; + this.width = 24; + this.height = 28; + this.damage = 9; + this.knockBack = 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 = 23; + this.useTime = 15; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 5; + 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 = 10; + 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; + break; + case 895: + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 46; + break; + case 896: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 42; + break; + case 897: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 300000; + 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 = 300000; + 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 = 500000; + 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); + 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); + 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; + 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; + 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; + 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 = 300000; + 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); + 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); + 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); + 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); + 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); + 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); + break; + case 946: + this.width = 44; + this.height = 44; + this.rare = 1; + this.value = 10000; + this.holdStyle = 2; + 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 = 3000; + break; + case 948: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 8; + this.wingSlot = (sbyte) 12; + this.value = Item.buyPrice(1); + 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.thrown = 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 = 50000; + 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 = 50000; + 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 969: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 12; + this.height = 12; + this.buffType = 26; + this.buffTime = 36000; + this.rare = 1; + this.value = 1000; + this.value = 1000; + 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 = 99; + 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 = 50000; + 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; + 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 = 24; + this.useAnimation = 18; + this.useTime = 45; + this.scale = 1.1f; + this.width = 30; + this.height = 30; + this.shoot = 173; + this.shootSpeed = 9.5f; + this.knockBack = 5.25f; + this.melee = true; + this.value = 20000; + 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 = 8; + 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 = 8; + 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 = 6; + 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 = 0; + 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 = 25; + 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 = 99; + 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 = 10; + 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 = Item.sellPrice(gold: 3); + 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 = 500000; + this.knockBack = 5f; + this.melee = true; + this.rare = 7; + break; + case 1123: + this.useStyle = 1; + this.useAnimation = 20; + this.knockBack = 5.3f; + this.autoReuse = true; + this.width = 40; + this.height = 40; + this.damage = 26; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = 27000; + 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 = 10; + 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; + 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.thrown = true; + break; + case 1131: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 8; + this.value = 50000; + 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; + break; + case 1134: + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.useStyle = 2; + 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; + 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 = 11; + this.useTime = 11; + this.mana = 6; + this.width = 50; + this.height = 18; + this.shoot = 189; + this.UseSound = SoundID.Item11; + this.damage = 21; + 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: 5, silver: 50); + 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 = 100000; + 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(1); + 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 = 99; + 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 = 36; + 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 = 24; + this.useTime = 24; + 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 = 11; + 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 = 11; + 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 = 8; + 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 = 99; + 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 = 14; + break; + case 1192: + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 41; + 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 = 22; + this.useTime = 22; + 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 = 8; + 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 = 10; + 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 = 7; + 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 = 99; + 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 = 16; + break; + case 1199: + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 46; + 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 = 19; + this.useTime = 19; + 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 = 6; + 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 = 8; + 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 = 7; + 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 = 6; + 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 = 108000; + this.melee = true; + this.scale = 1.1f; + break; + case 1225: + this.width = 20; + this.height = 20; + this.maxStack = 99; + 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 = 75; + 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 = 6; + 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.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 99; + 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; + 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 = 100000; + this.rare = 7; + break; + case 1249: + this.width = 14; + this.height = 28; + this.rare = 2; + this.value = 54000; + this.accessory = true; + this.balloonSlot = (sbyte) 7; + break; + case 1250: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = 45000; + this.accessory = true; + this.balloonSlot = (sbyte) 2; + break; + case 1251: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = 45000; + this.accessory = true; + this.balloonSlot = (sbyte) 9; + break; + case 1252: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = 45000; + 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 = 100000; + 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 = 38; + 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 = 10000; + this.magic = true; + break; + case 1257: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.rare = 1; + 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 = 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 = 350000; + this.rare = 7; + this.ranged = true; + break; + case 1259: + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.knockBack = 7.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 = 350000; + 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 = 17; + this.damage = 55; + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 253; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item20; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 6; + this.noMelee = true; + this.knockBack = 6.5f; + this.value = 10000; + 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 = 50000; + 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.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 = 50000; + 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 = 16; + this.useTime = 16; + this.width = 24; + this.height = 18; + this.shoot = 260; + this.UseSound = SoundID.Item12; + this.damage = 55; + this.shootSpeed = 15f; + this.noMelee = true; + this.value = 350000; + this.knockBack = 3f; + this.rare = 7; + this.magic = true; + break; + case 1296: + this.mana = 15; + this.damage = 73; + this.useStyle = 1; + this.shootSpeed = 11f; + this.shoot = 261; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item69; + this.useAnimation = 40; + this.useTime = 40; + this.rare = 7; + this.noMelee = true; + this.knockBack = 7.5f; + this.value = Item.sellPrice(gold: 10); + 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 = 76; + this.scale = 0.9f; + this.shoot = 262; + this.shootSpeed = 14f; + this.UseSound = SoundID.Item10; + this.rare = 7; + this.value = Item.sellPrice(gold: 5); + 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.UseSound = SoundID.Item47; + 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 = 48; + 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 = 270; + this.scale = 0.9f; + this.shootSpeed = 3.5f; + this.knockBack = 3.5f; + this.magic = true; + this.value = 50000; + 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 = 27000; + 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; + 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 = 50; + 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 = 11; + this.shoot = 273; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = 1000; + 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 = 250000; + 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 = 99; + 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; + 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 = 99; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 11; + this.width = 10; + this.height = 12; + this.value = 330; + 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 = 80; + 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 = 500000; + 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.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); + break; + case 1339: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 10); + break; + case 1340: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 17; + 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 = 14; + 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: 1); + 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: 10); + 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 = 40; + this.ranged = true; + this.rare = 3; + break; + case 1350: + this.shootSpeed = 4.6f; + this.shoot = 285; + 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 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 = 2; + 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 = 2; + 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 = 2; + 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 = 2; + 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 = 2; + 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 = 2; + 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: 5); + this.rare = 4; + break; + case 1359: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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.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.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.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.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.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.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; + 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; + 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; + 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.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.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.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.placeStyle = 7; + break; + case 1432: + this.width = 12; + this.height = 20; + this.maxStack = 999; + this.value = Item.buyPrice(copper: 3); + 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 = 11; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 72; + 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; + 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; + 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 = 10000; + 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 = 99; + 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 = 77; + 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; + return; + case 1555: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 68; + return; + case 1556: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 57; + return; + case 1557: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 107; + return; + case 1558: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 69; + return; + case 1559: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 58; + return; + case 1560: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 108; + return; + case 1561: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 70; + return; + case 1562: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 59; + return; + case 1563: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 109; + return; + case 1564: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 71; + return; + case 1565: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 60; + return; + case 1566: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 110; + return; + case 1567: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 72; + return; + case 1568: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 61; + 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 = Item.sellPrice(gold: 2); + 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; + return; + case 1581: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 73; + return; + case 1582: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 62; + 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; + return; + case 1588: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 63; + 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; + 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; + 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 = 75000; + 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 = 750000; + 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 = 750000; + 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 1787: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 162000; + this.rare = 1; + this.value = 1000; + 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; + 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 = 15.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: 2); + return; + case 1801: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 12; + this.useTime = 12; + this.mana = 3; + this.width = 50; + this.height = 18; + this.shoot = 316; + this.UseSound = SoundID.Item32; + this.damage = 45; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = 500000; + this.rare = 8; + this.magic = true; + this.knockBack = 3f; + return; + case 1802: + this.mana = 10; + this.damage = 37; + 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 = 100000; + 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.thrown = 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; + 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 = 99; + 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 = 8; + this.rare = 8; + return; + case 1833: + this.width = 18; + this.height = 18; + this.bodySlot = 95; + this.value = Item.sellPrice(gold: 1); + this.defense = 10; + this.rare = 8; + return; + case 1834: + this.width = 18; + this.height = 18; + this.legSlot = 79; + this.value = Item.sellPrice(gold: 1); + this.defense = 9; + 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 = 750000; + 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; + 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 = 40; + this.knockBack = 0.425f; + this.shootSpeed = 8.5f; + this.noMelee = true; + this.value = 500000; + this.rare = 8; + this.ranged = true; + return; + case 1911: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 126000; + this.rare = 1; + this.value = 1000; + return; + case 1912: + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.useStyle = 2; + 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.thrown = 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: 4); + 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 1919: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 108000; + this.rare = 1; + this.value = 1000; + return; + case 1920: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 108000; + this.rare = 1; + this.value = 1000; + 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; + 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.useAnimation = 23; + this.useTime = 23; + this.knockBack = 7f; + this.width = 40; + this.height = 40; + this.damage = 86; + this.scale = 1.1f; + this.shoot = 335; + this.shootSpeed = 14f; + 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.sellPrice(gold: 5); + 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.sellPrice(gold: 5); + 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.sellPrice(gold: 5); + 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.sellPrice(gold: 20); + 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 = 180000; + 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; + 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; + 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; + 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 = 2; + 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; + 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 = 2; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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.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.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; + 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.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 = 99; + 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: 1); + 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 = 63; + 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 = 2; + 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 = 22; + this.useTime = 22; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item75; + this.crit = 7; + this.damage = 65; + 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 = 3000; + 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 = 500; + 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; + 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 = 1500; + 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; + 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 = 2500; + 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 = 2000; + 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.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 = 10; + 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 = 2; + 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 2267: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 36000; + this.rare = 1; + this.value = Item.buyPrice(silver: 20); + return; + case 2268: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 54000; + this.rare = 1; + this.value = Item.buyPrice(silver: 30); + 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 = 10; + 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: 4); + 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 = 99; + 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; + 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; + return; + case 2291: + this.fishingPole = 15; + this.shootSpeed = 11f; + 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; + 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; + 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 = 2; + 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 = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2323: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + return; + case 2325: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 54000; + this.value = 1000; + this.rare = 1; + return; + case 2326: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2327: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 2; + 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 = 21600; + this.value = 1000; + this.rare = 1; + return; + case 2329: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 100; + 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 = 2; + 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 = 25200; + this.value = 1000; + this.rare = 1; + return; + case 2345: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 18000; + this.value = 1000; + this.rare = 1; + return; + case 2346: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 2; + 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 = 2; + 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 = 2; + 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 = 2; + 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 2351: + this.UseSound = SoundID.Item6; + this.useStyle = 2; + 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 = 2; + 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 = 2; + 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 = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2356: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 99; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 6; + this.width = 12; + this.height = 14; + this.value = 80; + return; + case 2358: + this.maxStack = 99; + this.width = 12; + this.height = 14; + this.value = 100; + return; + case 2359: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 = 21; + 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; + 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; + 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 = 30; + this.knockBack = 5f; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item1; + this.useAnimation = 30; + this.useTime = 30; + this.noUseGraphic = true; + this.rare = 3; + this.value = 50000; + this.melee = true; + return; + default: + if (type >= 2425 && type <= 2427) + { + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 72000; + this.rare = 1; + this.value = Item.sellPrice(silver: 5); + return; + } + switch (type) + { + 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.questItem = true; + this.maxStack = 1; + this.width = 26; + this.height = 26; + this.uniqueStack = true; + this.rare = -11; + 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.vanity = true; + return; + case 2494: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = Item.sellPrice(gold: 10); + 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.buyPrice(gold: 40); + 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.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; + 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; + 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.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; + 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.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; + 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; + 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.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; + 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; + 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.thrown = 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.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.thrown = 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 = 15; + this.knockBack = 6f; + this.width = 24; + this.height = 28; + this.damage = 30; + 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: 10); + 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.useStyle = 1; + this.autoReuse = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 324; + if (type == 2626) + { + this.placeStyle = 1; + this.width = 26; + this.height = 24; + return; + } + this.width = 22; + this.height = 22; + 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; + 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.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 = 10; + 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 = 334; + 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; + 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 = 2; + 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; + return; + case 2758: + this.width = 18; + this.height = 18; + this.defense = 28; + this.bodySlot = 175; + this.glowMask = (short) 27; + this.rare = 10; + return; + case 2759: + this.width = 18; + this.height = 18; + this.defense = 20; + this.legSlot = 110; + this.rare = 10; + return; + case 2760: + this.width = 18; + this.height = 18; + this.defense = 14; + this.headSlot = 170; + this.glowMask = (short) 28; + this.rare = 10; + return; + case 2761: + this.width = 18; + this.height = 18; + this.defense = 18; + this.bodySlot = 176; + this.glowMask = (short) 29; + this.rare = 10; + return; + case 2762: + this.width = 18; + this.height = 18; + this.defense = 14; + this.legSlot = 111; + this.glowMask = (short) 30; + this.rare = 10; + return; + case 2763: + this.width = 18; + this.height = 18; + this.defense = 24; + this.headSlot = 171; + this.rare = 10; + return; + case 2764: + this.width = 18; + this.height = 18; + this.defense = 34; + this.bodySlot = 177; + this.rare = 10; + return; + case 2765: + this.width = 18; + this.height = 18; + this.defense = 20; + this.legSlot = 112; + this.rare = 10; + 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 = 400000; + 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: 5); + 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: 5); + 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 = 9; + 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: 5); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + this.glowMask = (short) 21; + this.tileBoost += 4; + 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: 5); + 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: 5); + 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 = 7; + this.shootSpeed = 36f; + this.knockBack = 4.75f; + this.width = 20; + this.height = 12; + this.damage = 35; + this.pick = 230; + this.axe = 30; + this.UseSound = SoundID.Item23; + this.shoot = 445; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.tileBoost = 10; + 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: 1); + 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; + 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.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; + 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; + 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 = 2; + 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 = 50; + this.UseSound = SoundID.Item13; + 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 = 23; + this.useTime = 23; + this.width = 12; + this.height = 28; + this.shoot = 469; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item97; + this.damage = 26; + this.shootSpeed = 8f; + this.knockBack = 3f; + this.rare = 3; + this.noMelee = true; + this.value = 27000; + 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 = 2; + 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 = 30; + 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; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + public void SetDefaults4(int type) + { + switch (type) + { + case 3001: + this.rare = 1; + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.healMana = 400; + this.useStyle = 2; + 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 = 99; + 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 = 99; + 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 = 28; + this.shootSpeed = 13f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + 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 = 52; + this.shootSpeed = 14.5f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + 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 = 15; + this.knockBack = 3.5f; + this.shootSpeed = 1f; + this.ranged = true; + this.rare = 3; + this.consumable = true; + break; + case 3010: + this.shoot = 478; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 9; + this.knockBack = 2.2f; + this.shootSpeed = 3f; + this.ranged = true; + this.rare = 3; + this.consumable = true; + break; + case 3011: + this.shoot = 479; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 10; + this.knockBack = 2.5f; + this.shootSpeed = 3f; + this.ranged = true; + this.rare = 3; + 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 = 1000; + this.melee = true; + this.noUseGraphic = true; + break; + case 3013: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 7; + this.useTime = 7; + this.width = 24; + this.height = 28; + this.damage = 70; + 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: 8); + 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 = 14; + this.useTime = 14; + this.width = 18; + this.height = 46; + this.shoot = 485; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 20; + this.knockBack = 5f; + this.shootSpeed = 6f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 4); + 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: 8); + 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 = 43; + 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; + 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 = 99; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 14; + this.width = 10; + this.height = 12; + this.value = 500; + 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 = 19; + this.useStyle = 5; + this.shootSpeed = 32f; + this.shoot = 494; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item101; + 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 = 10000; + 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 = 50000; + return; + case 3069: + this.mana = 2; + this.damage = 8; + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 504; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 1; + this.noMelee = true; + this.value = 5000; + this.magic = true; + 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 = 2; + 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(gold: 1); + 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.thrown = 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(silver: 30); + 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 = Item.sellPrice(gold: 4); + 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: 2); + 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: 2); + 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 = Item.sellPrice(gold: 2); + return; + case 3106: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 20; + this.useTime = 20; + this.knockBack = 3.5f; + this.width = 30; + this.height = 30; + this.damage = 70; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 5); + 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 = Item.sellPrice(gold: 10); + 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 = 2; + this.headSlot = 179; + this.rare = 3; + this.value = Item.sellPrice(gold: 2); + return; + case 3110: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 8; + this.value = 700000; + 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 = 99; + 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 = 99; + 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.thrown = 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.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 = 14; + this.useTime = 14; + 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; + 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; + 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; + return; + case 3139: + this.placeStyle = 36; + return; + case 3140: + this.placeStyle = 35; + return; + default: + return; + } + } + else 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(silver: 1); + 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(silver: 1); + 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(silver: 1); + 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 = 2; + this.headSlot = 180; + this.value = 20000; + return; + case 3188: + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 182; + this.value = 16000; + return; + case 3189: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 122; + this.value = 12000; + 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 3195: + this.UseSound = SoundID.Item3; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 108000; + this.rare = 1; + this.value = 1000; + return; + 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.thrown = 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 = 50000; + this.expert = true; + return; + case 3224: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.neckSlot = (sbyte) 8; + this.expert = true; + return; + case 3225: + this.width = 14; + this.height = 28; + this.rare = 1; + this.value = 27000; + 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; + return; + case 3227: + this.width = 18; + this.height = 14; + this.bodySlot = 183; + this.rare = 9; + this.vanity = true; + 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; + 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 = 27000; + 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: 1); + 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.thrown = 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 = Item.sellPrice(gold: 5); + this.summon = true; + return; + default: + if (type == 3250 || type == 3251 || type == 3252) + { + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = 45000; + 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 = 2; + 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 = 99; + 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 = 20; + 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.15f; + this.damage = 39; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3284: + this.knockBack = 3.8f; + this.damage = 47; + 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 = 43; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3290: + this.knockBack = 4.5f; + this.damage = 41; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3291: + this.knockBack = 4.3f; + this.damage = 90; + this.value = Item.sellPrice(gold: 11); + this.rare = 8; + return; + case 3315: + this.knockBack = 3.25f; + this.damage = 29; + this.value = Item.sellPrice(gold: 4); + this.rare = 3; + this.shoot = 562; + return; + case 3316: + this.knockBack = 3.8f; + this.damage = 34; + this.value = Item.sellPrice(gold: 4); + this.rare = 3; + this.shoot = 563; + return; + case 3317: + this.knockBack = 3.85f; + this.damage = 22; + this.value = Item.sellPrice(gold: 1, silver: 50); + 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 = Item.sellPrice(gold: 11); + 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; + switch (type) + { + case 3305: + this.stringColor = 28; + return; + case 3306: + this.stringColor = 14; + return; + case 3307: + this.stringColor = 27; + return; + case 3308: + this.stringColor = 13; + return; + default: + this.stringColor = 1 + type - 3293; + return; + } + } + else + { + 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 = 45; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 535; + this.mana = 10; + this.rare = 4; + this.value = Item.sellPrice(gold: 1); + 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; + this.rare = 1; + 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 = 187; + 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 = 216; + 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 = 217; + 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 = 218; + 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 = 219; + 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 = 220; + 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 = 221; + 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 = 222; + 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 = 223; + 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; + 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; + 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.sellPrice(gold: 3); + 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 = 2; + 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 = 40000; + 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; + 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; + return; + default: + if (type >= 3372 && type <= 3373) + { + this.width = 28; + this.height = 20; + this.headSlot = type + 186 - 3372; + this.rare = 1; + this.vanity = true; + return; + } + switch (type) + { + case 3374: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 188; + this.rare = 1; + this.value = Item.sellPrice(silver: 30); + return; + case 3375: + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 189; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + return; + case 3376: + this.width = 18; + this.height = 18; + this.defense = 4; + 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 = 20; + 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 = 29; + this.knockBack = 5f; + this.thrown = 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.thrown = 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; + return; + case 3382: + this.width = 18; + this.height = 18; + this.defense = 16; + this.bodySlot = 190; + this.rare = 10; + return; + case 3383: + this.width = 18; + this.height = 18; + this.defense = 12; + this.legSlot = 130; + this.rare = 10; + 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: 10); + 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.UseSound = SoundID.Item116; + 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 = SoundID.Item13; + 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 = 200; + 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.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 = 4000; + return; + case 3489: + this.SetDefaults1(6); + this.type = type; + this.damage = 10; + this.useAnimation = 11; + 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.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.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.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.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 = 11; + this.useAnimation = 11; + 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 3532: + this.UseSound = SoundID.Item2; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 26; + this.buffTime = 108000; + this.rare = 1; + this.value = 1000; + 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 = SoundID.Item13; + 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 = 15; + this.useTime = 15; + 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 = 18; + 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 = 2; + 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 = 1500; + 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; + return; + case 3546: + this.crit = 10; + 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 = 65; + this.shootSpeed = 15f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.knockBack = 4f; + this.rare = 10; + this.ranged = true; + return; + case 3547: + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 637; + this.width = 8; + this.height = 28; + this.maxStack = 30; + 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.thrown = 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 = 2; + 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 = 2; + 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 = 150; + 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 = 16f; + 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; + return; + case 3578: + this.width = 28; + this.height = 20; + this.bodySlot = 192; + this.rare = 9; + this.vanity = true; + return; + case 3579: + this.width = 18; + this.height = 14; + this.legSlot = 132; + this.rare = 9; + 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.accessory = 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.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.vanity = true; + return; + case 3586: + this.width = 28; + this.height = 20; + this.bodySlot = 193; + this.rare = 9; + this.vanity = true; + return; + case 3587: + this.width = 18; + this.height = 14; + this.legSlot = 133; + this.rare = 9; + 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.vanity = true; + return; + case 3590: + this.width = 28; + this.height = 20; + this.bodySlot = 194; + this.rare = 9; + this.vanity = true; + return; + case 3591: + this.width = 18; + this.height = 14; + this.legSlot = 134; + this.rare = 9; + 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.buyPrice(gold: 15); + 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 = 100000; + 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 = 9; + 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.UseSound = SoundID.Item3; + this.useStyle = 2; + 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 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 = 41; + this.scale = 1.15f; + this.autoReuse = true; + this.useTurn = true; + this.rare = 4; + 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 = 18; + this.damage = 85; + this.useStyle = 5; + this.shootSpeed = 3f; + this.shoot = 659; + 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 = 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(silver: 1); + 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 = 14; + 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; + 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 = 12; + 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 = 17; + 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.thrown = 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 = 44; + 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 = 30; + this.useTime = 3; + this.shootSpeed = 11f; + this.knockBack = 9f; + this.width = 16; + this.height = 16; + this.damage = 24; + 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 = 20; + this.useTime = 20; + this.shootSpeed = 20f; + this.knockBack = 2f; + this.width = 20; + this.height = 12; + this.damage = 24; + 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; + 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; + 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 = 14; + this.value = Item.sellPrice(gold: 3); + this.headSlot = 210; + return; + case 3872: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 30; + this.value = Item.sellPrice(gold: 3); + this.bodySlot = 204; + return; + case 3873: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 20; + 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; + this.backSlot = (sbyte) 11; + 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; + this.backSlot = (sbyte) 12; + 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; + this.backSlot = (sbyte) 13; + 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.sellPrice(gold: 5); + 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 = 500; + 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; + 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.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; + 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 = 150; + 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.vanity = true; + return; + case 3922: + this.width = 28; + this.height = 20; + this.bodySlot = 208; + this.rare = 9; + this.vanity = true; + return; + case 3923: + this.width = 18; + this.height = 14; + this.legSlot = 158; + this.rare = 9; + 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.vanity = true; + return; + case 3926: + this.width = 28; + this.height = 20; + this.bodySlot = 209; + this.rare = 9; + this.vanity = true; + return; + case 3927: + this.width = 18; + this.height = 14; + this.legSlot = 159; + this.rare = 9; + 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.accessory = true; + return; + default: + return; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + public void SetDefaults(int Type = 0, bool noMatCheck = false) + { + this.owner = Main.netMode == 1 || Main.netMode == 2 ? (int) byte.MaxValue : Main.myPlayer; + this.ResetStats(Type); + if (this.type >= 3930) + this.type = 0; + if (this.type == 0) + { + this.netID = 0; + this.stack = 0; + } + 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 + this.SetDefaults4(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: 20); + 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: 20); + 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 == 483 || this.type == 1192 || this.type == 482 || this.type == 1185 || this.type == 484 || this.type == 1199 || this.type == 368) + { + this.autoReuse = true; + this.damage = (int) ((double) this.damage * 1.15); + } + 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 (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.checkMat(); + this.RebuildTooltip(); + if (this.type <= 0 || this.type >= 3930 || !ItemID.Sets.Deprecated[this.type]) + return; + this.netID = 0; + this.type = 0; + this.stack = 0; + } + + public void ResetStats(int Type) + { + this.sentry = false; + this.DD2Summon = false; + this.shopSpecialCurrency = -1; + this.shopCustomPrice = new int?(); + this.expert = false; + this.expertOnly = false; + this.instanced = false; + this.thrown = 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.release = 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) + { + switch (this.type) + { + case 51: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + case 58: + case 184: + case 1734: + case 1735: + case 1867: + case 1868: + return new Color(200, 200, 200, 200); + case 75: + case 3065: + case 3858: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) newColor.A - this.alpha); + case 119: + case 120: + case 121: + case 122: + case 217: + case 218: + case 219: + case 220: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + case 198: + case 199: + case 200: + case 201: + case 202: + case 203: + return Color.White; + case 501: + return new Color(200, 200, 200, 50); + case 502: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 150); + case 520: + case 521: + case 522: + case 547: + case 548: + case 549: + case 575: + case 1332: + case 3453: + case 3454: + case 3455: + case 3580: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 50); + case 757: + case 1306: + case 3456: + case 3457: + case 3458: + case 3459: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + case 787: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 175); + case 1260: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 175); + case 1446: + case 1506: + case 1507: + case 1543: + case 1544: + case 1545: + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, (int) Main.gFade); + case 1508: + return new Color(200, 200, 200, 0); + case 1572: + return new Color(200, 200, (int) byte.MaxValue, 125); + case 1826: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + case 2763: + case 2764: + case 2765: + case 2782: + case 2783: + case 2784: + case 2785: + case 2786: + case 3522: + return new Color(250, 250, 250, (int) byte.MaxValue - this.alpha); + case 3191: + return new Color(250, 250, 250, 200); + case 3822: + return Color.Lerp(Color.White, newColor, 0.5f) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + default: + 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.itemLockoutTime[i] > 0) + { + --Main.itemLockoutTime[i]; + } + else + { + if (!this.active) + return; + if (this.instanced) + { + if (Main.netMode == 2) + { + this.active = false; + return; + } + this.keepTime = 600; + } + if (Main.netMode == 0) + this.owner = Main.myPlayer; + float gravity = 0.1f; + float num1 = 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; + num1 = 3f; + } + else if (this.wet) + { + num1 = 5f; + gravity = 0.08f; + } + if (this.ownTime > 0) + --this.ownTime; + else + this.ownIgnore = -1; + if (this.keepTime > 0) + --this.keepTime; + this.isBeingGrabbed = this.beingGrabbed; + Vector2 vector2 = this.velocity * 0.5f; + if (!this.beingGrabbed) + { + bool flag1 = true; + switch (this.type) + { + case 71: + case 72: + case 73: + case 74: + flag1 = false; + break; + } + if (ItemID.Sets.NebulaPickup[this.type]) + flag1 = false; + if (this.owner == Main.myPlayer & flag1 && (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) && this.stack < this.maxStack) + { + for (int number = i + 1; number < 400; ++number) + { + if (Main.item[number].active && Main.item[number].type == this.type && Main.item[number].stack > 0 && Main.item[number].owner == this.owner && (double) Math.Abs((float) ((double) this.position.X + (double) (this.width / 2) - ((double) Main.item[number].position.X + (double) (Main.item[number].width / 2)))) + (double) Math.Abs((float) ((double) this.position.Y + (double) (this.height / 2) - ((double) Main.item[number].position.Y + (double) (Main.item[number].height / 2)))) < 30.0) + { + this.position = (this.position + Main.item[number].position) / 2f; + this.velocity = (this.velocity + Main.item[number].velocity) / 2f; + int num2 = Main.item[number].stack; + if (num2 > this.maxStack - this.stack) + num2 = this.maxStack - this.stack; + Main.item[number].stack -= num2; + this.stack += num2; + if (Main.item[number].stack <= 0) + { + Main.item[number].SetDefaults(); + Main.item[number].active = false; + } + if (Main.netMode != 0 && this.owner == Main.myPlayer) + { + NetMessage.SendData(21, number: i); + NetMessage.SendData(21, number: number); + } + } + } + } + if (Main.netMode != 2 && Main.expertMode && this.owner == Main.myPlayer && this.type >= 71 && this.type <= 74) + { + Rectangle rectangle1 = new Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + for (int index3 = 0; index3 < 200; ++index3) + { + if (Main.npc[index3].active && Main.npc[index3].lifeMax > 5 && !Main.npc[index3].friendly && !Main.npc[index3].immortal && !Main.npc[index3].dontTakeDamage) + { + float stack = (float) this.stack; + float num3 = 1f; + if (this.type == 72) + num3 = 100f; + if (this.type == 73) + num3 = 10000f; + if (this.type == 74) + num3 = 1000000f; + float num4 = stack * num3; + float extraValue = Main.npc[index3].extraValue; + int index4 = Main.npc[index3].realLife; + if (index4 >= 0 && Main.npc[index4].active) + extraValue = Main.npc[index4].extraValue; + else + index4 = -1; + if ((double) extraValue < (double) num4) + { + Rectangle rectangle2 = new Rectangle((int) Main.npc[index3].position.X, (int) Main.npc[index3].position.Y, Main.npc[index3].width, Main.npc[index3].height); + if (rectangle1.Intersects(rectangle2)) + { + float num5 = (float) Main.rand.Next(50, 76) * 0.01f; + if (this.type == 71) + num5 += (float) Main.rand.Next(51) * 0.01f; + if (this.type == 72) + num5 += (float) Main.rand.Next(26) * 0.01f; + if ((double) num5 > 1.0) + num5 = 1f; + int num6 = (int) ((double) this.stack * (double) num5); + if (num6 < 1) + num6 = 1; + if (num6 > this.stack) + num6 = this.stack; + this.stack -= num6; + float number2 = (float) num6 * num3; + int number = index3; + if (index4 >= 0) + number = index4; + Main.npc[number].extraValue += number2; + if (Main.netMode == 0) + Main.npc[number].moneyPing(this.position); + else + NetMessage.SendData(92, number: number, number2: number2, number3: this.position.X, number4: this.position.Y); + if (this.stack <= 0) + { + this.SetDefaults(); + this.active = false; + } + NetMessage.SendData(21, number: i); + } + } + } + } + } + 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) num1) + this.velocity.Y = num1; + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < 0.1 && (double) this.velocity.X > -0.1) + this.velocity.X = 0.0f; + } + bool flag2 = Collision.LavaCollision(this.position, this.width, this.height); + if (flag2) + this.lavaWet = true; + int num7 = Collision.WetCollision(this.position, this.width, this.height) ? 1 : 0; + if (Collision.honey) + this.honeyWet = true; + if (num7 != 0) + { + if (!this.wet) + { + if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 20; + if (!flag2) + { + if (this.honeyWet) + { + 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, 152); + --Main.dust[index6].velocity.Y; + Main.dust[index6].velocity.X *= 2.5f; + Main.dust[index6].scale = 1.3f; + Main.dust[index6].alpha = 100; + Main.dust[index6].noGravity = true; + } + Main.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, Dust.dustWater()); + Main.dust[index8].velocity.Y -= 4f; + Main.dust[index8].velocity.X *= 2.5f; + Main.dust[index8].scale *= 0.8f; + Main.dust[index8].alpha = 100; + Main.dust[index8].noGravity = true; + } + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + else + { + for (int index9 = 0; index9 < 5; ++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, 35); + Main.dust[index10].velocity.Y -= 1.5f; + Main.dust[index10].velocity.X *= 2.5f; + Main.dust[index10].scale = 1.3f; + Main.dust[index10].alpha = 100; + Main.dust[index10].noGravity = true; + } + Main.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) + vector2.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity.Y) + vector2.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); + if (this.lavaWet) + { + if (this.type == 267) + { + if (Main.netMode != 1) + { + 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.owner == Main.myPlayer && this.type != 312 && this.type != 318 && this.type != 173 && this.type != 174 && this.type != 175 && this.type != 2701 && this.rare == 0) + { + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode != 0) + NetMessage.SendData(21, number: i); + } + } + if (this.type == 3191) + { + float num8 = (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 * num8, 0.1f * num8, 0.25f * num8); + } + else if (this.type == 520 || this.type == 3454) + { + float num9 = (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 * num9, 0.1f * num9, 0.25f * num9); + } + else if (this.type == 521 || this.type == 3455) + { + float num10 = (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 * num10, 0.1f * num10, 0.5f * num10); + } + else if (this.type == 547 || this.type == 3453) + { + float num11 = (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 * num11, 0.3f * num11, 0.05f * num11); + } + else if (this.type == 548) + { + float num12 = (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 * num12, 0.1f * num12, 0.6f * num12); + } + else if (this.type == 575) + { + float num13 = (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 * num13, 0.3f * num13, 0.5f * num13); + } + else if (this.type == 549) + { + float num14 = (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 * num14, 0.5f * num14, 0.2f * num14); + } + else if (this.type == 58 || this.type == 1734 || this.type == 1867) + { + float num15 = (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 * num15, 0.1f * num15, 0.1f * num15); + } + else if (this.type == 184 || this.type == 1735 || this.type == 1868) + { + float num16 = (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 * num16, 0.1f * num16, 0.5f * num16); + } + else if (this.type == 522) + { + float num17 = (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 * num17, 1f * num17, 0.1f * num17); + } + else if (this.type == 1332) + { + float num18 = (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 * num18, 1f * num18, 0.1f * num18); + } + 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); + 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 == 3822 && !DD2Event.Ongoing) + { + int num19 = Main.rand.Next(18, 24); + for (int index11 = 0; index11 < num19; ++index11) + { + int index12 = Dust.NewDust(this.Center, 0, 0, 61, Scale: 1.7f); + Main.dust[index12].velocity *= 8f; + --Main.dust[index12].velocity.Y; + Main.dust[index12].position = Vector2.Lerp(Main.dust[index12].position, this.Center, 0.5f); + Main.dust[index12].noGravity = true; + Main.dust[index12].noLight = true; + } + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode == 2) + NetMessage.SendData(21, number: i); + } + } + else + this.beingGrabbed = false; + if (this.type == 501) + { + if (Main.rand.Next(6) == 0) + { + 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 == 8 || this.type == 105) + { + if (!this.wet) + 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.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, 1f, 0.7f); + else if (this.type == 974) + { + if (!this.wet) + 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.85f, 1f); + } + 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.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) + 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) + { + float R = 0.0f; + float G = 0.0f; + float B = 0.0f; + int num20 = this.type - 426; + if (num20 == 1) + { + R = 0.1f; + G = 0.2f; + B = 1.1f; + } + if (num20 == 2) + { + R = 1f; + G = 0.1f; + B = 0.1f; + } + if (num20 == 3) + { + R = 0.0f; + G = 1f; + B = 0.1f; + } + if (num20 == 4) + { + R = 0.9f; + G = 0.0f; + B = 0.9f; + } + if (num20 == 5) + { + R = 1.3f; + G = 1.3f; + B = 1.3f; + } + if (num20 == 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) + 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) + 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 == 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.type == 75) + { + if (Main.rand.Next(25) == 0) + Dust.NewDust(this.position, this.width, this.height, 58, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 150, Scale: 1.2f); + if (Main.rand.Next(50) == 0) + Gore.NewGore(this.position, new Vector2(this.velocity.X * 0.2f, this.velocity.Y * 0.2f), Main.rand.Next(16, 18)); + } + if (this.spawnTime < 2147483646) + { + if (this.type == 58 || this.type == 184 || this.type == 1867 || this.type == 1868 || this.type == 1734 || this.type == 1735) + this.spawnTime += 4; + ++this.spawnTime; + } + if (Main.netMode == 2 && this.owner != Main.myPlayer) + { + ++this.release; + if (this.release >= 300) + { + this.release = 0; + NetMessage.SendData(39, this.owner, number: i); + } + } + if (this.wet) + this.position = this.position + vector2; + else + this.position = this.position + this.velocity; + if (this.noGrabDelay <= 0) + return; + --this.noGrabDelay; + } + } + + 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(); + int index1 = 400; + Main.item[400] = new Item(); + 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 (Item.itemCaches[Type] != -1) + { + Item.itemCaches[Type] += Stack; + return 400; + } + if (Main.netMode != 1) + { + if (reverseLookup) + { + for (int index2 = 399; index2 >= 0; --index2) + { + if (!Main.item[index2].active && Main.itemLockoutTime[index2] == 0) + { + index1 = index2; + break; + } + } + } + else + { + for (int index3 = 0; index3 < 400; ++index3) + { + if (!Main.item[index3].active && Main.itemLockoutTime[index3] == 0) + { + index1 = index3; + break; + } + } + } + } + if (index1 == 400 && Main.netMode != 1) + { + int num = 0; + for (int index4 = 0; index4 < 400; ++index4) + { + if (Main.item[index4].spawnTime - Main.itemLockoutTime[index4] > num) + { + num = Main.item[index4].spawnTime - Main.itemLockoutTime[index4]; + index1 = index4; + } + } + } + Main.itemLockoutTime[index1] = 0; + Main.item[index1] = new Item(); + Main.item[index1].SetDefaults(Type); + Main.item[index1].Prefix(pfix); + Main.item[index1].position.X = (float) (X + Width / 2 - Main.item[index1].width / 2); + Main.item[index1].position.Y = (float) (Y + Height / 2 - Main.item[index1].height / 2); + Main.item[index1].wet = Collision.WetCollision(Main.item[index1].position, Main.item[index1].width, Main.item[index1].height); + Main.item[index1].velocity.X = (float) Main.rand.Next(-30, 31) * 0.1f; + Main.item[index1].velocity.Y = (float) Main.rand.Next(-40, -15) * 0.1f; + if (Type == 859) + { + Item obj = Main.item[index1]; + obj.velocity = obj.velocity * 0.0f; + } + if (Type == 520 || Type == 521 || Main.item[index1].type >= 0 && ItemID.Sets.NebulaPickup[Main.item[index1].type]) + { + Main.item[index1].velocity.X = (float) Main.rand.Next(-30, 31) * 0.1f; + Main.item[index1].velocity.Y = (float) Main.rand.Next(-30, 31) * 0.1f; + } + Main.item[index1].active = true; + Main.item[index1].spawnTime = 0; + Main.item[index1].stack = Stack; + if (ItemSlot.Options.HighlightNewItems && Main.item[index1].type >= 0 && !ItemID.Sets.NeverShiny[Main.item[index1].type]) + Main.item[index1].newAndShiny = true; + if (Main.netMode == 2 && !noBroadcast) + { + int num = 0; + if (noGrabDelay) + num = 1; + NetMessage.SendData(21, number: index1, number2: ((float) num)); + Main.item[index1].FindOwner(index1); + } + else if (Main.netMode == 0) + Main.item[index1].owner = Main.myPlayer; + return index1; + } + + public void FindOwner(int whoAmI) + { + if (this.keepTime > 0) + return; + int owner = this.owner; + this.owner = (int) byte.MaxValue; + float num1 = 999999f; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (this.ownIgnore != index && Main.player[index].active && Main.player[index].ItemSpace(Main.item[whoAmI])) + { + float 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); + if (Main.player[index].manaMagnet && (this.type == 184 || this.type == 1735 || this.type == 1868)) + num2 -= (float) Item.manaGrabRange; + if (Main.player[index].lifeMagnet && (this.type == 58 || this.type == 1734 || this.type == 1867)) + num2 -= (float) Item.lifeGrabRange; + if ((double) num2 < (double) NPC.sWidth && (double) num2 < (double) num1) + { + num1 = num2; + this.owner = index; + } + } + } + if (this.owner == owner || (owner != Main.myPlayer || Main.netMode != 1) && (owner != (int) byte.MaxValue || Main.netMode != 2) && (owner == (int) byte.MaxValue || Main.player[owner].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; + } + + 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; + } +} diff --git a/ItemText.cs b/ItemText.cs new file mode 100644 index 0000000..a70df62 --- /dev/null +++ b/ItemText.cs @@ -0,0 +1,395 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ItemText +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Localization; + +namespace Terraria +{ + public class ItemText + { + 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 bool expert; + + public static float TargetScale => Main.UIScale / Main.GameViewMatrix.Zoom.X; + + public static void NewText(Item newItem, int stack, bool noStack = false, bool longText = false) + { + bool flag = newItem.type >= 71 && newItem.type <= 74; + if (!Main.showItemText || newItem.Name == null || !newItem.active || Main.netMode == 2) + return; + for (int index = 0; index < 20; ++index) + { + if (Main.itemText[index].active && (Main.itemText[index].name == newItem.AffixName() || flag && Main.itemText[index].coinText) && !Main.itemText[index].NoStack && !noStack) + { + string str1 = newItem.Name + " (" + (object) (Main.itemText[index].stack + stack) + ")"; + string str2 = newItem.Name; + if (Main.itemText[index].stack > 1) + str2 = str2 + " (" + (object) Main.itemText[index].stack + ")"; + Main.fontMouseText.MeasureString(str2); + Vector2 vector2 = Main.fontMouseText.MeasureString(str1); + if (Main.itemText[index].lifeTime < 0) + Main.itemText[index].scale = 1f; + if (Main.itemText[index].lifeTime < 60) + Main.itemText[index].lifeTime = 60; + if (flag && Main.itemText[index].coinText) + { + int num = 0; + if (newItem.type == 71) + num += newItem.stack; + else if (newItem.type == 72) + num += 100 * newItem.stack; + else if (newItem.type == 73) + num += 10000 * newItem.stack; + else if (newItem.type == 74) + num += 1000000 * newItem.stack; + Main.itemText[index].coinValue += num; + string name = ItemText.ValueToName(Main.itemText[index].coinValue); + vector2 = Main.fontMouseText.MeasureString(name); + Main.itemText[index].name = name; + if (Main.itemText[index].coinValue >= 1000000) + { + if (Main.itemText[index].lifeTime < 300) + Main.itemText[index].lifeTime = 300; + Main.itemText[index].color = new Color(220, 220, 198); + } + else if (Main.itemText[index].coinValue >= 10000) + { + if (Main.itemText[index].lifeTime < 240) + Main.itemText[index].lifeTime = 240; + Main.itemText[index].color = new Color(224, 201, 92); + } + else if (Main.itemText[index].coinValue >= 100) + { + if (Main.itemText[index].lifeTime < 180) + Main.itemText[index].lifeTime = 180; + Main.itemText[index].color = new Color(181, 192, 193); + } + else if (Main.itemText[index].coinValue >= 1) + { + if (Main.itemText[index].lifeTime < 120) + Main.itemText[index].lifeTime = 120; + Main.itemText[index].color = new Color(246, 138, 96); + } + } + Main.itemText[index].stack += stack; + Main.itemText[index].scale = 0.0f; + Main.itemText[index].rotation = 0.0f; + Main.itemText[index].position.X = (float) ((double) newItem.position.X + (double) newItem.width * 0.5 - (double) vector2.X * 0.5); + Main.itemText[index].position.Y = (float) ((double) newItem.position.Y + (double) newItem.height * 0.25 - (double) vector2.Y * 0.5); + Main.itemText[index].velocity.Y = -7f; + if (!Main.itemText[index].coinText) + return; + Main.itemText[index].stack = 1; + return; + } + } + int index1 = -1; + for (int index2 = 0; index2 < 20; ++index2) + { + if (!Main.itemText[index2].active) + { + index1 = index2; + break; + } + } + if (index1 == -1) + { + double num = (double) Main.bottomWorld; + for (int index3 = 0; index3 < 20; ++index3) + { + if (num > (double) Main.itemText[index3].position.Y) + { + index1 = index3; + num = (double) Main.itemText[index3].position.Y; + } + } + } + if (index1 < 0) + return; + string str = newItem.AffixName(); + if (stack > 1) + str = str + " (" + (object) stack + ")"; + Vector2 vector2_1 = Main.fontMouseText.MeasureString(str); + Main.itemText[index1].alpha = 1f; + Main.itemText[index1].alphaDir = -1; + Main.itemText[index1].active = true; + Main.itemText[index1].scale = 0.0f; + Main.itemText[index1].NoStack = noStack; + Main.itemText[index1].rotation = 0.0f; + Main.itemText[index1].position.X = (float) ((double) newItem.position.X + (double) newItem.width * 0.5 - (double) vector2_1.X * 0.5); + Main.itemText[index1].position.Y = (float) ((double) newItem.position.Y + (double) newItem.height * 0.25 - (double) vector2_1.Y * 0.5); + Main.itemText[index1].color = Color.White; + if (newItem.rare == 1) + Main.itemText[index1].color = new Color(150, 150, (int) byte.MaxValue); + else if (newItem.rare == 2) + Main.itemText[index1].color = new Color(150, (int) byte.MaxValue, 150); + else if (newItem.rare == 3) + Main.itemText[index1].color = new Color((int) byte.MaxValue, 200, 150); + else if (newItem.rare == 4) + Main.itemText[index1].color = new Color((int) byte.MaxValue, 150, 150); + else if (newItem.rare == 5) + Main.itemText[index1].color = new Color((int) byte.MaxValue, 150, (int) byte.MaxValue); + else if (newItem.rare == -11) + Main.itemText[index1].color = new Color((int) byte.MaxValue, 175, 0); + else if (newItem.rare == -1) + Main.itemText[index1].color = new Color(130, 130, 130); + else if (newItem.rare == 6) + Main.itemText[index1].color = new Color(210, 160, (int) byte.MaxValue); + else if (newItem.rare == 7) + Main.itemText[index1].color = new Color(150, (int) byte.MaxValue, 10); + else if (newItem.rare == 8) + Main.itemText[index1].color = new Color((int) byte.MaxValue, (int) byte.MaxValue, 10); + else if (newItem.rare == 9) + Main.itemText[index1].color = new Color(5, 200, (int) byte.MaxValue); + else if (newItem.rare == 10) + Main.itemText[index1].color = new Color((int) byte.MaxValue, 40, 100); + else if (newItem.rare >= 11) + Main.itemText[index1].color = new Color(180, 40, (int) byte.MaxValue); + Main.itemText[index1].expert = newItem.expert; + Main.itemText[index1].name = newItem.AffixName(); + Main.itemText[index1].stack = stack; + Main.itemText[index1].velocity.Y = -7f; + Main.itemText[index1].lifeTime = 60; + if (longText) + Main.itemText[index1].lifeTime *= 5; + Main.itemText[index1].coinValue = 0; + Main.itemText[index1].coinText = newItem.type >= 71 && newItem.type <= 74; + if (!Main.itemText[index1].coinText) + return; + if (newItem.type == 71) + Main.itemText[index1].coinValue += Main.itemText[index1].stack; + else if (newItem.type == 72) + Main.itemText[index1].coinValue += 100 * Main.itemText[index1].stack; + else if (newItem.type == 73) + Main.itemText[index1].coinValue += 10000 * Main.itemText[index1].stack; + else if (newItem.type == 74) + Main.itemText[index1].coinValue += 1000000 * Main.itemText[index1].stack; + Main.itemText[index1].ValueToName(); + Main.itemText[index1].stack = 1; + int index4 = index1; + if (Main.itemText[index4].coinValue >= 1000000) + { + if (Main.itemText[index4].lifeTime < 300) + Main.itemText[index4].lifeTime = 300; + Main.itemText[index4].color = new Color(220, 220, 198); + } + else if (Main.itemText[index4].coinValue >= 10000) + { + if (Main.itemText[index4].lifeTime < 240) + Main.itemText[index4].lifeTime = 240; + Main.itemText[index4].color = new Color(224, 201, 92); + } + else if (Main.itemText[index4].coinValue >= 100) + { + if (Main.itemText[index4].lifeTime < 180) + Main.itemText[index4].lifeTime = 180; + Main.itemText[index4].color = new Color(181, 192, 193); + } + else + { + if (Main.itemText[index4].coinValue < 1) + return; + if (Main.itemText[index4].lifeTime < 120) + Main.itemText[index4].lifeTime = 120; + Main.itemText[index4].color = new Color(246, 138, 96); + } + } + + 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 = ItemText.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.expert) + this.color = new Color((int) (byte) Main.DiscoR, (int) (byte) Main.DiscoG, (int) (byte) Main.DiscoB, (int) Main.mouseTextColor); + bool flag = false; + string str1 = this.name; + if (this.stack > 1) + str1 = str1 + " (" + (object) this.stack + ")"; + Vector2 vector2_1 = Main.fontMouseText.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.itemText[index].active && index != whoAmI) + { + string str2 = Main.itemText[index].name; + if (Main.itemText[index].stack > 1) + str2 = str2 + " (" + (object) Main.itemText[index].stack + ")"; + Vector2 vector2_2 = Main.fontMouseText.MeasureString(str2) * Main.itemText[index].scale; + vector2_2.Y *= 0.8f; + Rectangle rectangle2 = new Rectangle((int) ((double) Main.itemText[index].position.X - (double) vector2_2.X / 2.0), (int) ((double) Main.itemText[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.itemText[index].position.Y || (double) this.position.Y == (double) Main.itemText[index].position.Y && whoAmI < index)) + { + flag = true; + int num = ItemText.numActive; + if (num > 3) + num = 3; + Main.itemText[index].lifeTime = ItemText.activeTime + 15 * num; + this.lifeTime = ItemText.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; + 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.itemText[whoAmI].active) + { + ++num; + Main.itemText[whoAmI].Update(whoAmI); + } + } + ItemText.numActive = num; + } + } +} diff --git a/Lang.cs b/Lang.cs new file mode 100644 index 0000000..41e108f --- /dev/null +++ b/Lang.cs @@ -0,0 +1,732 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Lang +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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[82]; + [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[60]; + [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[32]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] chestType2 = new LocalizedText[2]; + public static LocalizedText[] prefix = new LocalizedText[84]; + public static LocalizedText[] _mapLegendCache; + private static LocalizedText[] _itemNameCache = new LocalizedText[3930]; + private static LocalizedText[] _projectileNameCache = new LocalizedText[714]; + private static LocalizedText[] _npcNameCache = new LocalizedText[580]; + private static LocalizedText[] _negativeNpcNameCache = new LocalizedText[65]; + private static LocalizedText[] _buffNameCache = new LocalizedText[206]; + private static LocalizedText[] _buffDescriptionCache = new LocalizedText[206]; + private static ItemTooltip[] _itemTooltipCache = new ItemTooltip[3930]; + + 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.ActiveWorldFileData.Name, + Day = Main.dayTime, + BloodMoon = Main.bloodMoon, + MoonLordDefeated = NPC.downedMoonlord, + HardMode = Main.hardMode, + Homeless = (npc != null && npc.homeless), + InventoryKey = Main.cInv, + PlayerName = Main.player[Main.myPlayer].name + }; + + [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 < 580) + 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 < 3930 && Lang._itemNameCache[id] != null ? Lang._itemNameCache[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 <= 10 ? 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 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, true); + 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 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 (int64 != 0L || !(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); + 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")); + } + 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; + Lang._mapLegendCache[MapHelper.TileToLookup(4, 0)] = Lang._itemNameCache[8]; + Lang._mapLegendCache[MapHelper.TileToLookup(4, 1)] = Lang._itemNameCache[8]; + Lang._mapLegendCache[MapHelper.TileToLookup(5, 0)] = Language.GetText("MapObject.Tree"); + 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(15, 0)] = Language.GetText("MapObject.Chair"); + 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(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]; + 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(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(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(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, 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(270, 0)] = Lang._itemNameCache[1993]; + Lang._mapLegendCache[MapHelper.TileToLookup(271, 0)] = Lang._itemNameCache[2005]; + 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(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(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(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(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(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(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(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]; + } + + 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 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.English.IsActive; + if (time.Days > 0) + { + string str2 = str1 + (object) time.Days + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortDays")) : (time.Days == 1 ? (object) " day" : (object) " days")); + if (!showAllAvailableUnits) + return str2; + str1 = str2 + " "; + } + if (time.Hours > 0) + { + string str3 = str1 + (object) time.Hours + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortHours")) : (time.Hours == 1 ? (object) " hour" : (object) " hours")); + if (!showAllAvailableUnits) + return str3; + str1 = str3 + " "; + } + if (time.Minutes > 0) + { + string str4 = str1 + (object) time.Minutes + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortMinutes")) : (time.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/ReLogic/ReLogic.dll b/Libraries/ReLogic/ReLogic.dll new file mode 100644 index 0000000..8cf49ca 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..a3391d9 --- /dev/null +++ b/Lighting.cs @@ -0,0 +1,3274 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Lighting +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria +{ + public class Lighting + { + public static int maxRenderCount = 4; + public static float brightness = 1f; + public static float defBrightness = 1f; + public static int lightMode = 0; + public static bool RGB = true; + private static float oldSkyColor = 0.0f; + private static float skyColor = 0.0f; + private static int lightCounter = 0; + public static int offScreenTiles = 45; + public static int offScreenTiles2 = 35; + private static int firstTileX; + private static int lastTileX; + private static int firstTileY; + private static int lastTileY; + public static int LightingThreads = 0; + private static Lighting.LightingState[][] states; + private static Lighting.LightingState[][] axisFlipStates; + private static Lighting.LightingSwipeData swipe; + private static Lighting.LightingSwipeData[] threadSwipes; + private static CountdownEvent countdown; + public static int scrX; + public static int scrY; + public static int minX; + public static int maxX; + public static int minY; + public static int maxY; + private static int maxTempLights = 2000; + private static Dictionary tempLights; + private static int firstToLightX; + private static int firstToLightY; + private static int lastToLightX; + private static int lastToLightY; + private static float negLight = 0.04f; + private static float negLight2 = 0.16f; + private static float wetLightR = 0.16f; + private static float wetLightG = 0.16f; + private static float wetLightB = 0.16f; + private static float honeyLightR = 0.16f; + private static float honeyLightG = 0.16f; + private static float honeyLightB = 0.16f; + private static float blueWave = 1f; + private static int blueDir = 1; + private static int minX7; + private static int maxX7; + private static int minY7; + private static int maxY7; + private static int firstTileX7; + private static int lastTileX7; + private static int lastTileY7; + private static int firstTileY7; + private static int firstToLightX7; + private static int lastToLightX7; + private static int firstToLightY7; + private static int lastToLightY7; + private static int firstToLightX27; + private static int lastToLightX27; + private static int firstToLightY27; + private static int lastToLightY27; + + public static bool NotRetro => Lighting.lightMode < 2; + + public static bool UpdateEveryFrame => Main.LightingEveryFrame && !Main.RenderTargetsRequired && !Lighting.NotRetro; + + public static bool LightingDrawToScreen => Main.drawToScreen; + + public static void Initialize(bool resize = false) + { + if (!resize) + { + Lighting.tempLights = new Dictionary(); + Lighting.swipe = new Lighting.LightingSwipeData(); + Lighting.countdown = new CountdownEvent(0); + Lighting.threadSwipes = new Lighting.LightingSwipeData[Environment.ProcessorCount]; + for (int index = 0; index < Lighting.threadSwipes.Length; ++index) + Lighting.threadSwipes[index] = new Lighting.LightingSwipeData(); + } + int length1 = Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10; + int length2 = Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10; + if (Lighting.states != null && Lighting.states.Length >= length1 && Lighting.states[0].Length >= length2) + return; + Lighting.states = new Lighting.LightingState[length1][]; + Lighting.axisFlipStates = new Lighting.LightingState[length2][]; + for (int index = 0; index < length2; ++index) + Lighting.axisFlipStates[index] = new Lighting.LightingState[length1]; + for (int index1 = 0; index1 < length1; ++index1) + { + Lighting.LightingState[] lightingStateArray = new Lighting.LightingState[length2]; + for (int index2 = 0; index2 < length2; ++index2) + { + Lighting.LightingState lightingState = new Lighting.LightingState(); + lightingStateArray[index2] = lightingState; + Lighting.axisFlipStates[index2][index1] = lightingState; + } + Lighting.states[index1] = lightingStateArray; + } + } + + public static void LightTiles(int firstX, int lastX, int firstY, int lastY) + { + Main.render = true; + Lighting.oldSkyColor = Lighting.skyColor; + float num1 = (float) Main.tileColor.R / (float) byte.MaxValue; + float num2 = (float) Main.tileColor.G / (float) byte.MaxValue; + float num3 = (float) Main.tileColor.B / (float) byte.MaxValue; + Lighting.skyColor = (float) (((double) num1 + (double) num2 + (double) num3) / 3.0); + if (Lighting.lightMode < 2) + { + Lighting.brightness = 1.2f; + Lighting.offScreenTiles2 = 34; + Lighting.offScreenTiles = 40; + } + else + { + Lighting.brightness = 1f; + Lighting.offScreenTiles2 = 18; + Lighting.offScreenTiles = 23; + } + Lighting.brightness = 1.2f; + if (Main.player[Main.myPlayer].blind) + Lighting.brightness = 1f; + Lighting.defBrightness = Lighting.brightness; + Lighting.firstTileX = firstX; + Lighting.lastTileX = lastX; + Lighting.firstTileY = firstY; + Lighting.lastTileY = lastY; + Lighting.firstToLightX = Lighting.firstTileX - Lighting.offScreenTiles; + Lighting.firstToLightY = Lighting.firstTileY - Lighting.offScreenTiles; + Lighting.lastToLightX = Lighting.lastTileX + Lighting.offScreenTiles; + Lighting.lastToLightY = Lighting.lastTileY + Lighting.offScreenTiles; + ++Lighting.lightCounter; + ++Main.renderCount; + int num4 = Main.screenWidth / 16 + Lighting.offScreenTiles * 2; + int num5 = Main.screenHeight / 16 + Lighting.offScreenTiles * 2; + Vector2 screenLastPosition = Main.screenLastPosition; + if (Main.renderCount < 3) + Lighting.doColors(); + if (Main.renderCount == 2) + { + Vector2 screenPosition = Main.screenPosition; + int num6 = (int) Math.Floor((double) Main.screenPosition.X / 16.0) - Lighting.scrX; + int num7 = (int) Math.Floor((double) Main.screenPosition.Y / 16.0) - Lighting.scrY; + if (num6 > 16) + num6 = 0; + if (num7 > 16) + num7 = 0; + int num8 = 0; + int num9 = num4; + int num10 = 0; + int num11 = num5; + if (num6 < 0) + num8 -= num6; + else + num9 -= num6; + if (num7 < 0) + num10 -= num7; + else + num11 -= num7; + if (Lighting.RGB) + { + int num12 = num4; + if (Lighting.states.Length <= num12 + num6) + num12 = Lighting.states.Length - num6 - 1; + for (int index1 = num8; index1 < num12; ++index1) + { + Lighting.LightingState[] state1 = Lighting.states[index1]; + Lighting.LightingState[] state2 = Lighting.states[index1 + num6]; + int num13 = num11; + if (state2.Length <= num13 + num6) + num13 = state2.Length - num7 - 1; + for (int index2 = num10; index2 < num13; ++index2) + { + Lighting.LightingState lightingState1 = state1[index2]; + Lighting.LightingState lightingState2 = state2[index2 + num7]; + lightingState1.r = lightingState2.r2; + lightingState1.g = lightingState2.g2; + lightingState1.b = lightingState2.b2; + } + } + } + else + { + int num14 = num9; + if (Lighting.states.Length <= num14 + num6) + num14 = Lighting.states.Length - num6 - 1; + for (int index3 = num8; index3 < num14; ++index3) + { + Lighting.LightingState[] state3 = Lighting.states[index3]; + Lighting.LightingState[] state4 = Lighting.states[index3 + num6]; + int num15 = num11; + if (state4.Length <= num15 + num6) + num15 = state4.Length - num7 - 1; + for (int index4 = num10; index4 < num15; ++index4) + { + Lighting.LightingState lightingState3 = state3[index4]; + Lighting.LightingState lightingState4 = state4[index4 + num7]; + lightingState3.r = lightingState4.r2; + lightingState3.g = lightingState4.r2; + lightingState3.b = lightingState4.r2; + } + } + } + } + else if (!Main.renderNow) + { + int num16 = (int) Math.Floor((double) Main.screenPosition.X / 16.0) - (int) Math.Floor((double) screenLastPosition.X / 16.0); + if (num16 > 5 || num16 < -5) + num16 = 0; + int num17; + int num18; + int num19; + if (num16 < 0) + { + num17 = -1; + num16 *= -1; + num18 = num4; + num19 = num16; + } + else + { + num17 = 1; + num18 = 0; + num19 = num4 - num16; + } + int num20 = (int) Math.Floor((double) Main.screenPosition.Y / 16.0) - (int) Math.Floor((double) screenLastPosition.Y / 16.0); + if (num20 > 5 || num20 < -5) + num20 = 0; + int num21; + int num22; + int num23; + if (num20 < 0) + { + num21 = -1; + num20 *= -1; + num22 = num5; + num23 = num20; + } + else + { + num21 = 1; + num22 = 0; + num23 = num5 - num20; + } + if (num16 != 0 || num20 != 0) + { + for (int index5 = num18; index5 != num19; index5 += num17) + { + Lighting.LightingState[] state5 = Lighting.states[index5]; + Lighting.LightingState[] state6 = Lighting.states[index5 + num16 * num17]; + for (int index6 = num22; index6 != num23; index6 += num21) + { + Lighting.LightingState lightingState5 = state5[index6]; + Lighting.LightingState lightingState6 = state6[index6 + num20 * num21]; + lightingState5.r = lightingState6.r; + lightingState5.g = lightingState6.g; + lightingState5.b = lightingState6.b; + } + } + } + if (Netplay.Connection.StatusMax > 0) + Main.mapTime = 1; + if (Main.mapTime == 0 && Main.mapEnabled) + { + if (Main.renderCount == 3) + { + try + { + Main.mapTime = Main.mapTimeMax; + Main.updateMap = true; + Main.mapMinX = Utils.Clamp(Lighting.firstToLightX + Lighting.offScreenTiles, 0, Main.maxTilesX - 1); + Main.mapMaxX = Utils.Clamp(Lighting.lastToLightX - Lighting.offScreenTiles, 0, Main.maxTilesX - 1); + Main.mapMinY = Utils.Clamp(Lighting.firstToLightY + Lighting.offScreenTiles, 0, Main.maxTilesY - 1); + Main.mapMaxY = Utils.Clamp(Lighting.lastToLightY - Lighting.offScreenTiles, 0, Main.maxTilesY - 1); + for (int mapMinX = Main.mapMinX; mapMinX < Main.mapMaxX; ++mapMinX) + { + Lighting.LightingState[] state = Lighting.states[mapMinX - Lighting.firstTileX + Lighting.offScreenTiles]; + for (int mapMinY = Main.mapMinY; mapMinY < Main.mapMaxY; ++mapMinY) + { + Lighting.LightingState lightingState = state[mapMinY - Lighting.firstTileY + Lighting.offScreenTiles]; + Tile tile = Main.tile[mapMinX, mapMinY]; + float num24 = 0.0f; + if ((double) lightingState.r > (double) num24) + num24 = lightingState.r; + if ((double) lightingState.g > (double) num24) + num24 = lightingState.g; + if ((double) lightingState.b > (double) num24) + num24 = lightingState.b; + if (Lighting.lightMode < 2) + num24 *= 1.5f; + byte light = (byte) Math.Min((float) byte.MaxValue, num24 * (float) byte.MaxValue); + if ((double) mapMinY < Main.worldSurface && !tile.active() && tile.wall == (byte) 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); + } + } + } + } + catch + { + } + } + } + if ((double) Lighting.oldSkyColor != (double) Lighting.skyColor) + { + int num25 = Utils.Clamp(Lighting.firstToLightX, 0, Main.maxTilesX - 1); + int num26 = Utils.Clamp(Lighting.lastToLightX, 0, Main.maxTilesX - 1); + int num27 = Utils.Clamp(Lighting.firstToLightY, 0, Main.maxTilesY - 1); + int num28 = Utils.Clamp(Lighting.lastToLightY, 0, (int) Main.worldSurface - 1); + if ((double) num27 < Main.worldSurface) + { + for (int index7 = num25; index7 < num26; ++index7) + { + Lighting.LightingState[] state = Lighting.states[index7 - Lighting.firstToLightX]; + for (int index8 = num27; index8 < num28; ++index8) + { + Lighting.LightingState lightingState = state[index8 - Lighting.firstToLightY]; + Tile tile = Main.tile[index7, index8]; + if (tile == null) + { + tile = new Tile(); + Main.tile[index7, index8] = tile; + } + if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type]) && (double) lightingState.r < (double) Lighting.skyColor && tile.liquid < (byte) 200 && (Main.wallLight[(int) tile.wall] || tile.wall == (byte) 73)) + { + lightingState.r = num1; + if ((double) lightingState.g < (double) Lighting.skyColor) + lightingState.g = num2; + if ((double) lightingState.b < (double) Lighting.skyColor) + lightingState.b = num3; + } + } + } + } + } + } + else + Lighting.lightCounter = 0; + if (Main.renderCount <= Lighting.maxRenderCount) + return; + Lighting.PreRenderPhase(); + } + + public static void PreRenderPhase() + { + float num1 = (float) Main.tileColor.R / (float) byte.MaxValue; + float num2 = (float) Main.tileColor.G / (float) byte.MaxValue; + float num3 = (float) Main.tileColor.B / (float) byte.MaxValue; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num4 = 0; + int num5 = Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10; + int num6 = 0; + int num7 = Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10; + Lighting.minX = num5; + Lighting.maxX = num4; + Lighting.minY = num7; + Lighting.maxY = num6; + Lighting.RGB = Lighting.lightMode == 0 || Lighting.lightMode == 3; + for (int index1 = num4; index1 < num5; ++index1) + { + Lighting.LightingState[] state = Lighting.states[index1]; + for (int index2 = num6; index2 < num7; ++index2) + { + Lighting.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.wof >= 0) + { + if (Main.player[Main.myPlayer].gross) + { + try + { + int num8 = (int) Main.screenPosition.Y / 16 - 10; + int num9 = (int) ((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16 + 10; + int num10 = (int) Main.npc[Main.wof].position.X / 16; + int num11 = Main.npc[Main.wof].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) + { + Lighting.LightingState[] state = Lighting.states[index3 - num11]; + for (int index4 = num8; index4 <= num9; ++index4) + { + Lighting.LightingState lightingState = state[index4 - Lighting.firstToLightY]; + 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 + { + } + } + } + Main.sandTiles = 0; + Main.evilTiles = 0; + Main.bloodTiles = 0; + Main.shroomTiles = 0; + Main.snowTiles = 0; + Main.holyTiles = 0; + Main.meteorTiles = 0; + Main.jungleTiles = 0; + Main.dungeonTiles = 0; + Main.campfire = false; + Main.sunflower = false; + Main.starInBottle = false; + Main.heartLantern = false; + Main.campfire = false; + Main.clock = false; + Main.musicBox = -1; + Main.waterCandles = 0; + for (int index = 0; index < Main.player[Main.myPlayer].NPCBannerBuff.Length; ++index) + Main.player[Main.myPlayer].NPCBannerBuff[index] = false; + Main.player[Main.myPlayer].hasBanner = false; + int[] screenTileCounts = Main.screenTileCounts; + Array.Clear((Array) screenTileCounts, 0, screenTileCounts.Length); + int num19 = Utils.Clamp(Lighting.firstToLightX, 5, Main.maxTilesX - 1); + int num20 = Utils.Clamp(Lighting.lastToLightX, 5, Main.maxTilesX - 1); + int num21 = Utils.Clamp(Lighting.firstToLightY, 5, Main.maxTilesY - 1); + int num22 = Utils.Clamp(Lighting.lastToLightY, 5, Main.maxTilesY - 1); + int num23 = (num20 - num19 - Main.zoneX) / 2; + int num24 = (num22 - num21 - Main.zoneY) / 2; + Main.fountainColor = -1; + Main.monolithType = -1; + for (int index5 = num19; index5 < num20; ++index5) + { + Lighting.LightingState[] state = Lighting.states[index5 - Lighting.firstToLightX]; + for (int index6 = num21; index6 < num22; ++index6) + { + Lighting.LightingState lightingState = state[index6 - Lighting.firstToLightY]; + Tile tile = Main.tile[index5, index6]; + if (tile == null) + { + tile = new Tile(); + Main.tile[index5, index6] = tile; + } + float num25 = 0.0f; + float num26 = 0.0f; + float num27 = 0.0f; + if ((double) index6 < Main.worldSurface) + { + if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type] || (tile.slope() != (byte) 0 || tile.halfBrick()) && Main.tile[index5, index6 - 1].liquid == (byte) 0 && Main.tile[index5, index6 + 1].liquid == (byte) 0 && Main.tile[index5 - 1, index6].liquid == (byte) 0 && Main.tile[index5 + 1, index6].liquid == (byte) 0) && (double) lightingState.r2 < (double) Lighting.skyColor && (Main.wallLight[(int) tile.wall] || tile.wall == (byte) 73 || tile.wall == (byte) 227) && tile.liquid < (byte) 200 && (!tile.halfBrick() || Main.tile[index5, index6 - 1].liquid < (byte) 200)) + { + num25 = num1; + num26 = num2; + num27 = num3; + } + if ((!tile.active() || tile.halfBrick() || !Main.tileNoSunLight[(int) tile.type]) && tile.wall >= (byte) 88 && tile.wall <= (byte) 93 && tile.liquid < byte.MaxValue) + { + num25 = num1; + num26 = num2; + num27 = num3; + switch (tile.wall) + { + case 88: + num25 *= 0.9f; + num26 *= 0.15f; + num27 *= 0.9f; + break; + case 89: + num25 *= 0.9f; + num26 *= 0.9f; + num27 *= 0.15f; + break; + case 90: + num25 *= 0.15f; + num26 *= 0.15f; + num27 *= 0.9f; + break; + case 91: + num25 *= 0.15f; + num26 *= 0.9f; + num27 *= 0.15f; + break; + case 92: + num25 *= 0.9f; + num26 *= 0.15f; + num27 *= 0.15f; + break; + case 93: + float num28 = 0.2f; + float num29 = 0.7f - num28; + num25 *= num29 + (float) Main.DiscoR / (float) byte.MaxValue * num28; + num26 *= num29 + (float) Main.DiscoG / (float) byte.MaxValue * num28; + num27 *= num29 + (float) Main.DiscoB / (float) byte.MaxValue * num28; + break; + } + } + if (!Lighting.RGB) + { + double num30; + num27 = (float) (num30 = ((double) num25 + (double) num26 + (double) num27) / 3.0); + num26 = (float) num30; + num25 = (float) num30; + } + if ((double) lightingState.r2 < (double) num25) + lightingState.r2 = num25; + if ((double) lightingState.g2 < (double) num26) + lightingState.g2 = num26; + if ((double) lightingState.b2 < (double) num27) + lightingState.b2 = num27; + } + float num31 = (float) (0.550000011920929 + Math.Sin((double) Main.GlobalTime * 2.0) * 0.0799999982118607); + if (index6 > Main.maxTilesY - 200) + { + if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type] || (tile.slope() != (byte) 0 || tile.halfBrick()) && Main.tile[index5, index6 - 1].liquid == (byte) 0 && Main.tile[index5, index6 + 1].liquid == (byte) 0 && Main.tile[index5 - 1, index6].liquid == (byte) 0 && Main.tile[index5 + 1, index6].liquid == (byte) 0) && (double) lightingState.r2 < (double) num31 && (Main.wallLight[(int) tile.wall] || tile.wall == (byte) 73 || tile.wall == (byte) 227) && tile.liquid < (byte) 200 && (!tile.halfBrick() || Main.tile[index5, index6 - 1].liquid < (byte) 200)) + { + num25 = num31; + num26 = num31 * 0.6f; + num27 = num31 * 0.2f; + } + if ((!tile.active() || tile.halfBrick() || !Main.tileNoSunLight[(int) tile.type]) && tile.wall >= (byte) 88 && tile.wall <= (byte) 93 && tile.liquid < byte.MaxValue) + { + num25 = num31; + num26 = num31 * 0.6f; + num27 = num31 * 0.2f; + switch (tile.wall) + { + case 88: + num25 *= 0.9f; + num26 *= 0.15f; + num27 *= 0.9f; + break; + case 89: + num25 *= 0.9f; + num26 *= 0.9f; + num27 *= 0.15f; + break; + case 90: + num25 *= 0.15f; + num26 *= 0.15f; + num27 *= 0.9f; + break; + case 91: + num25 *= 0.15f; + num26 *= 0.9f; + num27 *= 0.15f; + break; + case 92: + num25 *= 0.9f; + num26 *= 0.15f; + num27 *= 0.15f; + break; + case 93: + float num32 = 0.2f; + float num33 = 0.7f - num32; + num25 *= num33 + (float) Main.DiscoR / (float) byte.MaxValue * num32; + num26 *= num33 + (float) Main.DiscoG / (float) byte.MaxValue * num32; + num27 *= num33 + (float) Main.DiscoB / (float) byte.MaxValue * num32; + break; + } + } + if (!Lighting.RGB) + { + double num34; + num27 = (float) (num34 = ((double) num25 + (double) num26 + (double) num27) / 3.0); + num26 = (float) num34; + num25 = (float) num34; + } + if ((double) lightingState.r2 < (double) num25) + lightingState.r2 = num25; + if ((double) lightingState.g2 < (double) num26) + lightingState.g2 = num26; + if ((double) lightingState.b2 < (double) num27) + lightingState.b2 = num27; + } + switch (tile.wall) + { + case 33: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = 0.09f; + num26 = 0.0525f; + num27 = 0.24f; + break; + } + break; + case 44: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = (float) ((double) Main.DiscoR / (double) byte.MaxValue * 0.150000005960464); + num26 = (float) ((double) Main.DiscoG / (double) byte.MaxValue * 0.150000005960464); + num27 = (float) ((double) Main.DiscoB / (double) byte.MaxValue * 0.150000005960464); + break; + } + break; + case 137: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + float num35 = 0.4f + (float) (270 - (int) Main.mouseTextColor) / 1500f + (float) Main.rand.Next(0, 50) * 0.0005f; + num25 = 1f * num35; + num26 = 0.5f * num35; + num27 = 0.1f * num35; + break; + } + break; + case 153: + num25 = 0.6f; + num26 = 0.3f; + break; + case 154: + num25 = 0.6f; + num27 = 0.6f; + break; + case 155: + num25 = 0.6f; + num26 = 0.6f; + num27 = 0.6f; + break; + case 156: + num26 = 0.6f; + break; + case 164: + num25 = 0.6f; + break; + case 165: + num27 = 0.6f; + break; + case 166: + num25 = 0.6f; + num26 = 0.6f; + break; + case 174: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = 0.2975f; + break; + } + break; + case 175: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = 0.075f; + num26 = 0.15f; + num27 = 0.4f; + break; + } + break; + case 176: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = 0.1f; + num26 = 0.1f; + num27 = 0.1f; + break; + } + break; + case 182: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num25 = 0.24f; + num26 = 0.12f; + num27 = 0.09f; + break; + } + break; + } + if (tile.active()) + { + if (index5 > num19 + num23 && index5 < num20 - num23 && index6 > num21 + num24 && index6 < num22 - num24) + { + ++screenTileCounts[(int) tile.type]; + if (tile.type == (ushort) 215 && tile.frameY < (short) 36) + Main.campfire = true; + if (tile.type == (ushort) 405) + Main.campfire = true; + if (tile.type == (ushort) 42 && tile.frameY >= (short) 324 && tile.frameY <= (short) 358) + Main.heartLantern = true; + if (tile.type == (ushort) 42 && tile.frameY >= (short) 252 && tile.frameY <= (short) 286) + Main.starInBottle = 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 index7 = Item.BannerToItem(banner); + if (ItemID.Sets.BannerStrength[index7].Enabled) + { + Main.player[Main.myPlayer].NPCBannerBuff[banner] = true; + Main.player[Main.myPlayer].hasBanner = true; + } + } + } + switch (tile.type) + { + case 139: + if (tile.frameX >= (short) 36) + { + Main.musicBox = (int) tile.frameY / 36; + break; + } + break; + case 207: + if (tile.frameY >= (short) 72) + { + switch ((int) tile.frameX / 36) + { + case 0: + Main.fountainColor = 0; + break; + case 1: + Main.fountainColor = 6; + break; + case 2: + Main.fountainColor = 3; + break; + case 3: + Main.fountainColor = 5; + break; + case 4: + Main.fountainColor = 2; + break; + case 5: + Main.fountainColor = 10; + break; + case 6: + Main.fountainColor = 4; + break; + case 7: + Main.fountainColor = 9; + break; + default: + Main.fountainColor = -1; + break; + } + } + else + break; + break; + case 410: + if (tile.frameY >= (short) 56) + { + Main.monolithType = (int) tile.frameX / 36; + break; + } + break; + } + if (Main.tileBlockLight[(int) tile.type] && (Lighting.lightMode >= 2 || tile.type != (ushort) 131 && !tile.inActive() && tile.slope() == (byte) 0)) + lightingState.stopLight = true; + if (tile.type == (ushort) 104) + Main.clock = true; + if (Main.tileLighted[(int) tile.type]) + { + switch (tile.type) + { + case 4: + if (tile.frameX < (short) 66) + { + switch ((int) tile.frameY / 22) + { + case 0: + num25 = 1f; + num26 = 0.95f; + num27 = 0.8f; + break; + case 1: + num25 = 0.0f; + num26 = 0.1f; + num27 = 1.3f; + break; + case 2: + num25 = 1f; + num26 = 0.1f; + num27 = 0.1f; + break; + case 3: + num25 = 0.0f; + num26 = 1f; + num27 = 0.1f; + break; + case 4: + num25 = 0.9f; + num26 = 0.0f; + num27 = 0.9f; + break; + case 5: + num25 = 1.3f; + num26 = 1.3f; + num27 = 1.3f; + break; + case 6: + num25 = 0.9f; + num26 = 0.9f; + num27 = 0.0f; + break; + case 7: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 8: + num25 = 0.85f; + num26 = 1f; + num27 = 0.7f; + break; + case 9: + num25 = 0.7f; + num26 = 0.85f; + num27 = 1f; + break; + case 10: + num25 = 1f; + num26 = 0.5f; + num27 = 0.0f; + break; + case 11: + num25 = 1.25f; + num26 = 1.25f; + num27 = 0.8f; + break; + case 12: + num25 = 0.75f; + num26 = 1.2825f; + num27 = 1.2f; + break; + case 13: + num25 = 0.95f; + num26 = 0.65f; + num27 = 1.3f; + break; + case 14: + num25 = (float) Main.DiscoR / (float) byte.MaxValue; + num26 = (float) Main.DiscoG / (float) byte.MaxValue; + num27 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + case 15: + num25 = 1f; + num26 = 0.0f; + num27 = 1f; + break; + default: + num25 = 1f; + num26 = 0.95f; + num27 = 0.8f; + break; + } + } + else + break; + break; + case 17: + case 133: + case 302: + num25 = 0.83f; + num26 = 0.6f; + num27 = 0.5f; + break; + case 22: + case 140: + num25 = 0.12f; + num26 = 0.07f; + num27 = 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 num36 = (float) Main.rand.Next(-5, 6) * (1f / 400f); + num25 = (float) (0.5 + (double) num36 * 2.0); + num26 = 0.2f + num36; + num27 = 0.1f; + break; + } + float num37 = (float) Main.rand.Next(-5, 6) * (1f / 400f); + num25 = 0.31f + num37; + num26 = 0.1f; + num27 = (float) (0.439999997615814 + (double) num37 * 2.0); + break; + case 27: + if (tile.frameY < (short) 36) + { + num25 = 0.3f; + num26 = 0.27f; + break; + } + break; + case 33: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 22) + { + case 0: + num25 = 1f; + num26 = 0.95f; + num27 = 0.65f; + break; + case 1: + num25 = 0.55f; + num26 = 0.85f; + num27 = 0.35f; + break; + case 2: + num25 = 0.65f; + num26 = 0.95f; + num27 = 0.5f; + break; + case 3: + num25 = 0.2f; + num26 = 0.75f; + num27 = 1f; + break; + case 14: + num25 = 1f; + num26 = 1f; + num27 = 0.6f; + break; + case 19: + num25 = 0.37f; + num26 = 0.8f; + num27 = 1f; + break; + case 20: + num25 = 0.0f; + num26 = 0.9f; + num27 = 1f; + break; + case 21: + num25 = 0.25f; + num26 = 0.7f; + num27 = 1f; + break; + case 25: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 28: + num25 = 0.9f; + num26 = 0.75f; + num27 = 1f; + break; + case 30: + Vector3 vector3_1 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + num25 = vector3_1.X; + num26 = vector3_1.Y; + num27 = vector3_1.Z; + break; + default: + num25 = 1f; + num26 = 0.95f; + num27 = 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: + num25 = 0.95f; + num26 = 0.95f; + num27 = 0.5f; + break; + case 8: + num25 = 0.85f; + num26 = 0.6f; + num27 = 1f; + break; + case 9: + num25 = 1f; + num26 = 0.6f; + num27 = 0.6f; + break; + case 11: + case 17: + num25 = 0.75f; + num26 = 0.9f; + num27 = 1f; + break; + case 15: + num25 = 1f; + num26 = 1f; + num27 = 0.7f; + break; + case 18: + num25 = 1f; + num26 = 1f; + num27 = 0.6f; + break; + case 24: + num25 = 0.37f; + num26 = 0.8f; + num27 = 1f; + break; + case 25: + num25 = 0.0f; + num26 = 0.9f; + num27 = 1f; + break; + case 26: + num25 = 0.25f; + num26 = 0.7f; + num27 = 1f; + break; + case 27: + num25 = 0.55f; + num26 = 0.85f; + num27 = 0.35f; + break; + case 28: + num25 = 0.65f; + num26 = 0.95f; + num27 = 0.5f; + break; + case 29: + num25 = 0.2f; + num26 = 0.75f; + num27 = 1f; + break; + case 32: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 35: + num25 = 0.9f; + num26 = 0.75f; + num27 = 1f; + break; + case 37: + Vector3 vector3_2 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + num25 = vector3_2.X; + num26 = vector3_2.Y; + num27 = vector3_2.Z; + break; + default: + num25 = 1f; + num26 = 0.95f; + num27 = 0.8f; + break; + } + } + else + break; + break; + case 35: + if (tile.frameX < (short) 36) + { + num25 = 0.75f; + num26 = 0.6f; + num27 = 0.3f; + break; + } + break; + case 37: + num25 = 0.56f; + num26 = 0.43f; + num27 = 0.15f; + break; + case 42: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 36) + { + case 0: + num25 = 0.7f; + num26 = 0.65f; + num27 = 0.55f; + break; + case 1: + num25 = 0.9f; + num26 = 0.75f; + num27 = 0.6f; + break; + case 2: + num25 = 0.8f; + num26 = 0.6f; + num27 = 0.6f; + break; + case 3: + num25 = 0.65f; + num26 = 0.5f; + num27 = 0.2f; + break; + case 4: + num25 = 0.5f; + num26 = 0.7f; + num27 = 0.4f; + break; + case 5: + num25 = 0.9f; + num26 = 0.4f; + num27 = 0.2f; + break; + case 6: + num25 = 0.7f; + num26 = 0.75f; + num27 = 0.3f; + break; + case 7: + float num38 = Main.demonTorch * 0.2f; + num25 = 0.9f - num38; + num26 = 0.9f - num38; + num27 = 0.7f + num38; + break; + case 8: + num25 = 0.75f; + num26 = 0.6f; + num27 = 0.3f; + break; + case 9: + float num39 = 1f; + float num40 = 0.3f; + num27 = 0.5f + Main.demonTorch * 0.2f; + num25 = num39 - Main.demonTorch * 0.1f; + num26 = num40 - Main.demonTorch * 0.2f; + break; + case 28: + num25 = 0.37f; + num26 = 0.8f; + num27 = 1f; + break; + case 29: + num25 = 0.0f; + num26 = 0.9f; + num27 = 1f; + break; + case 30: + num25 = 0.25f; + num26 = 0.7f; + num27 = 1f; + break; + case 32: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 35: + num25 = 0.7f; + num26 = 0.6f; + num27 = 0.9f; + break; + case 37: + Vector3 vector3_3 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + num25 = vector3_3.X; + num26 = vector3_3.Y; + num27 = vector3_3.Z; + break; + default: + num25 = 1f; + num26 = 1f; + num27 = 1f; + break; + } + } + else + break; + break; + case 49: + num25 = 0.0f; + num26 = 0.35f; + num27 = 0.8f; + break; + case 61: + if (tile.frameX == (short) 144) + { + float num41 = (float) (1.0 + (double) (270 - (int) Main.mouseTextColor) / 400.0); + float num42 = (float) (0.800000011920929 - (double) (270 - (int) Main.mouseTextColor) / 400.0); + num25 = 0.42f * num42; + num26 = 0.81f * num41; + num27 = 0.52f * num42; + break; + } + break; + case 70: + case 71: + case 72: + case 190: + case 348: + case 349: + if (tile.type != (ushort) 349 || tile.frameX >= (short) 36) + { + float num43 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + num25 = 0.1f; + num26 = (float) (0.200000002980232 + (double) num43 / 2.0); + num27 = 0.7f + num43; + break; + } + break; + case 77: + num25 = 0.75f; + num26 = 0.45f; + num27 = 0.25f; + break; + case 83: + if (tile.frameX == (short) 18 && !Main.dayTime) + { + num25 = 0.1f; + num26 = 0.4f; + num27 = 0.6f; + } + if (tile.frameX == (short) 90 && !Main.raining && Main.time > 40500.0) + { + num25 = 0.9f; + num26 = 0.72f; + num27 = 0.18f; + break; + } + break; + case 84: + switch ((int) tile.frameX / 18) + { + case 2: + float num44 = (float) (270 - (int) Main.mouseTextColor) / 800f; + if ((double) num44 > 1.0) + num44 = 1f; + else if ((double) num44 < 0.0) + num44 = 0.0f; + num25 = num44 * 0.7f; + num26 = num44; + num27 = num44 * 0.1f; + break; + case 5: + float num45 = 0.9f; + num25 = num45; + num26 = num45 * 0.8f; + num27 = num45 * 0.2f; + break; + case 6: + float num46 = 0.08f; + num26 = num46 * 0.8f; + num27 = num46; + break; + } + break; + case 92: + if (tile.frameY <= (short) 18 && tile.frameX == (short) 0) + { + num25 = 1f; + num26 = 1f; + num27 = 1f; + break; + } + break; + case 93: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 54) + { + case 1: + num25 = 0.95f; + num26 = 0.95f; + num27 = 0.5f; + break; + case 2: + num25 = 0.85f; + num26 = 0.6f; + num27 = 1f; + break; + case 3: + num25 = 0.75f; + num26 = 1f; + num27 = 0.6f; + break; + case 4: + case 5: + num25 = 0.75f; + num26 = 0.9f; + num27 = 1f; + break; + case 9: + num25 = 1f; + num26 = 1f; + num27 = 0.7f; + break; + case 13: + num25 = 1f; + num26 = 1f; + num27 = 0.6f; + break; + case 19: + num25 = 0.37f; + num26 = 0.8f; + num27 = 1f; + break; + case 20: + num25 = 0.0f; + num26 = 0.9f; + num27 = 1f; + break; + case 21: + num25 = 0.25f; + num26 = 0.7f; + num27 = 1f; + break; + case 23: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 24: + num25 = 0.35f; + num26 = 0.5f; + num27 = 0.3f; + break; + case 25: + num25 = 0.34f; + num26 = 0.4f; + num27 = 0.31f; + break; + case 26: + num25 = 0.25f; + num26 = 0.32f; + num27 = 0.5f; + break; + case 29: + num25 = 0.9f; + num26 = 0.75f; + num27 = 1f; + break; + case 31: + Vector3 vector3_4 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + num25 = vector3_4.X; + num26 = vector3_4.Y; + num27 = vector3_4.Z; + break; + default: + num25 = 1f; + num26 = 0.97f; + num27 = 0.85f; + break; + } + } + else + break; + break; + case 95: + if (tile.frameX < (short) 36) + { + num25 = 1f; + num26 = 0.95f; + num27 = 0.8f; + break; + } + break; + case 96: + if (tile.frameX >= (short) 36) + { + num25 = 0.5f; + num26 = 0.35f; + num27 = 0.1f; + break; + } + break; + case 98: + if (tile.frameY == (short) 0) + { + num25 = 1f; + num26 = 0.97f; + num27 = 0.85f; + break; + } + break; + case 100: + case 173: + if (tile.frameX < (short) 36) + { + switch ((int) tile.frameY / 36) + { + case 1: + num25 = 0.95f; + num26 = 0.95f; + num27 = 0.5f; + break; + case 3: + num25 = 1f; + num26 = 0.6f; + num27 = 0.6f; + break; + case 6: + case 9: + num25 = 0.75f; + num26 = 0.9f; + num27 = 1f; + break; + case 11: + num25 = 1f; + num26 = 1f; + num27 = 0.7f; + break; + case 13: + num25 = 1f; + num26 = 1f; + num27 = 0.6f; + break; + case 19: + num25 = 0.37f; + num26 = 0.8f; + num27 = 1f; + break; + case 20: + num25 = 0.0f; + num26 = 0.9f; + num27 = 1f; + break; + case 21: + num25 = 0.25f; + num26 = 0.7f; + num27 = 1f; + break; + case 22: + num25 = 0.35f; + num26 = 0.5f; + num27 = 0.3f; + break; + case 23: + num25 = 0.34f; + num26 = 0.4f; + num27 = 0.31f; + break; + case 24: + num25 = 0.25f; + num26 = 0.32f; + num27 = 0.5f; + break; + case 25: + num25 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num26 = 0.3f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 29: + num25 = 0.9f; + num26 = 0.75f; + num27 = 1f; + break; + case 31: + Vector3 vector3_5 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + num25 = vector3_5.X; + num26 = vector3_5.Y; + num27 = vector3_5.Z; + break; + default: + num25 = 1f; + num26 = 0.95f; + num27 = 0.65f; + break; + } + } + else + break; + break; + case 125: + float num47 = (float) Main.rand.Next(28, 42) * 0.01f + (float) (270 - (int) Main.mouseTextColor) / 800f; + num26 = lightingState.g2 = 0.3f * num47; + num27 = lightingState.b2 = 0.6f * num47; + break; + case 126: + if (tile.frameX < (short) 36) + { + num25 = (float) Main.DiscoR / (float) byte.MaxValue; + num26 = (float) Main.DiscoG / (float) byte.MaxValue; + num27 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + } + break; + case 129: + switch ((int) tile.frameX / 18 % 3) + { + case 0: + num25 = 0.0f; + num26 = 0.05f; + num27 = 0.25f; + break; + case 1: + num25 = 0.2f; + num26 = 0.0f; + num27 = 0.15f; + break; + case 2: + num25 = 0.1f; + num26 = 0.0f; + num27 = 0.2f; + break; + } + break; + case 149: + if (tile.frameX <= (short) 36) + { + switch ((int) tile.frameX / 18) + { + case 0: + num25 = 0.1f; + num26 = 0.2f; + num27 = 0.5f; + break; + case 1: + num25 = 0.5f; + num26 = 0.1f; + num27 = 0.1f; + break; + case 2: + num25 = 0.2f; + num26 = 0.5f; + num27 = 0.1f; + break; + } + num25 *= (float) Main.rand.Next(970, 1031) * (1f / 1000f); + num26 *= (float) Main.rand.Next(970, 1031) * (1f / 1000f); + num27 *= (float) Main.rand.Next(970, 1031) * (1f / 1000f); + break; + } + break; + case 160: + num25 = (float) ((double) Main.DiscoR / (double) byte.MaxValue * 0.25); + num26 = (float) ((double) Main.DiscoG / (double) byte.MaxValue * 0.25); + num27 = (float) ((double) Main.DiscoB / (double) byte.MaxValue * 0.25); + break; + case 171: + int index8 = index5; + int index9 = index6; + if (tile.frameX < (short) 10) + { + index8 -= (int) tile.frameX; + index9 -= (int) tile.frameY; + } + switch (((int) Main.tile[index8, index9].frameY & 15360) >> 10) + { + case 1: + num25 = 0.1f; + num26 = 0.1f; + num27 = 0.1f; + break; + case 2: + num25 = 0.2f; + break; + case 3: + num26 = 0.2f; + break; + case 4: + num27 = 0.2f; + break; + case 5: + num25 = 0.125f; + num26 = 0.125f; + break; + case 6: + num25 = 0.2f; + num26 = 0.1f; + break; + case 7: + num25 = 0.125f; + num26 = 0.125f; + break; + case 8: + num25 = 0.08f; + num26 = 0.175f; + break; + case 9: + num26 = 0.125f; + num27 = 0.125f; + break; + case 10: + num25 = 0.125f; + num27 = 0.125f; + break; + case 11: + num25 = 0.1f; + num26 = 0.1f; + num27 = 0.2f; + break; + default: + double num48; + num27 = (float) (num48 = 0.0); + num26 = (float) num48; + num25 = (float) num48; + break; + } + num25 *= 0.5f; + num26 *= 0.5f; + num27 *= 0.5f; + break; + case 174: + if (tile.frameX == (short) 0) + { + num25 = 1f; + num26 = 0.95f; + num27 = 0.65f; + break; + } + break; + case 184: + if (tile.frameX == (short) 110) + { + num25 = 0.25f; + num26 = 0.1f; + num27 = 0.0f; + break; + } + break; + case 204: + case 347: + num25 = 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; + num25 = vector3_6.X; + num26 = vector3_6.Y; + num27 = vector3_6.Z; + break; + } + if (tile.frameX == (short) 306 || tile.frameX == (short) 324) + { + Vector3 vector3_7 = PortalHelper.GetPortalColor(Main.myPlayer, 1).ToVector3() * 0.65f; + num25 = vector3_7.X; + num26 = vector3_7.Y; + num27 = vector3_7.Z; + break; + } + break; + case 215: + if (tile.frameY < (short) 36) + { + float num49 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 700f; + float num50; + float num51; + float num52; + switch ((int) tile.frameX / 54) + { + case 1: + num50 = 0.7f; + num51 = 1f; + num52 = 0.5f; + break; + case 2: + num50 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num51 = 0.3f; + num52 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 3: + num50 = 0.45f; + num51 = 0.75f; + num52 = 1f; + break; + case 4: + num50 = 1.15f; + num51 = 1.15f; + num52 = 0.5f; + break; + case 5: + num50 = (float) Main.DiscoR / (float) byte.MaxValue; + num51 = (float) Main.DiscoG / (float) byte.MaxValue; + num52 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + case 6: + num50 = 0.75f; + num51 = 1.2825f; + num52 = 1.2f; + break; + case 7: + num50 = 0.95f; + num51 = 0.65f; + num52 = 1.3f; + break; + default: + num50 = 0.9f; + num51 = 0.3f; + num52 = 0.1f; + break; + } + num25 = num50 + num49; + num26 = num51 + num49; + num27 = num52 + num49; + break; + } + break; + case 235: + if ((double) lightingState.r2 < 0.6) + lightingState.r2 = 0.6f; + if ((double) lightingState.g2 < 0.6) + { + lightingState.g2 = 0.6f; + break; + } + break; + case 237: + num25 = 0.1f; + num26 = 0.1f; + break; + case 238: + if ((double) lightingState.r2 < 0.5) + lightingState.r2 = 0.5f; + if ((double) lightingState.b2 < 0.5) + { + lightingState.b2 = 0.5f; + break; + } + break; + case 262: + num25 = 0.75f; + num27 = 0.75f; + break; + case 263: + num25 = 0.75f; + num26 = 0.75f; + break; + case 264: + num27 = 0.75f; + break; + case 265: + num26 = 0.75f; + break; + case 266: + num25 = 0.75f; + break; + case 267: + num25 = 0.75f; + num26 = 0.75f; + num27 = 0.75f; + break; + case 268: + num25 = 0.75f; + num26 = 0.375f; + break; + case 270: + num25 = 0.73f; + num26 = 1f; + num27 = 0.41f; + break; + case 271: + num25 = 0.45f; + num26 = 0.95f; + num27 = 1f; + break; + case 286: + num25 = 0.1f; + num26 = 0.2f; + num27 = 0.7f; + break; + case 316: + case 317: + case 318: + int index10 = (index5 - (int) tile.frameX / 18) / 2 * ((index6 - (int) tile.frameY / 18) / 3) % Main.cageFrames; + bool flag1 = Main.jellyfishCageMode[(int) tile.type - 316, index10] == (byte) 2; + if (tile.type == (ushort) 316) + { + if (flag1) + { + num25 = 0.2f; + num26 = 0.3f; + num27 = 0.8f; + } + else + { + num25 = 0.1f; + num26 = 0.2f; + num27 = 0.5f; + } + } + if (tile.type == (ushort) 317) + { + if (flag1) + { + num25 = 0.2f; + num26 = 0.7f; + num27 = 0.3f; + } + else + { + num25 = 0.05f; + num26 = 0.45f; + num27 = 0.1f; + } + } + if (tile.type == (ushort) 318) + { + if (flag1) + { + num25 = 0.7f; + num26 = 0.2f; + num27 = 0.5f; + break; + } + num25 = 0.4f; + num26 = 0.1f; + num27 = 0.25f; + break; + } + break; + case 327: + float num53 = 0.5f + (float) (270 - (int) Main.mouseTextColor) / 1500f + (float) Main.rand.Next(0, 50) * 0.0005f; + num25 = 1f * num53; + num26 = 0.5f * num53; + num27 = 0.1f * num53; + break; + case 336: + num25 = 0.85f; + num26 = 0.5f; + num27 = 0.3f; + break; + case 340: + num25 = 0.45f; + num26 = 1f; + num27 = 0.45f; + break; + case 341: + num25 = (float) (0.400000005960464 * (double) Main.demonTorch + 0.600000023841858 * (1.0 - (double) Main.demonTorch)); + num26 = 0.35f; + num27 = (float) (1.0 * (double) Main.demonTorch + 0.600000023841858 * (1.0 - (double) Main.demonTorch)); + break; + case 342: + num25 = 0.5f; + num26 = 0.5f; + num27 = 1.1f; + break; + case 343: + num25 = 0.85f; + num26 = 0.85f; + num27 = 0.3f; + break; + case 344: + num25 = 0.6f; + num26 = 1.026f; + num27 = 0.96f; + break; + case 350: + double num54 = Main.time * 0.08; + double num55; + num25 = (float) (num55 = -Math.Cos((int) (num54 / 6.283) % 3 == 1 ? num54 : 0.0) * 0.1 + 0.1); + num26 = (float) num55; + num27 = (float) num55; + break; + case 370: + num25 = 0.32f; + num26 = 0.16f; + num27 = 0.12f; + break; + case 372: + if (tile.frameX == (short) 0) + { + num25 = 0.9f; + num26 = 0.1f; + num27 = 0.75f; + break; + } + break; + case 381: + num25 = 0.25f; + num26 = 0.1f; + num27 = 0.0f; + break; + case 390: + num25 = 0.4f; + num26 = 0.2f; + num27 = 0.1f; + break; + case 391: + num25 = 0.3f; + num26 = 0.1f; + num27 = 0.25f; + break; + case 405: + if (tile.frameX < (short) 54) + { + float num56 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 700f; + float num57; + float num58; + float num59; + switch ((int) tile.frameX / 54) + { + case 1: + num57 = 0.7f; + num58 = 1f; + num59 = 0.5f; + break; + case 2: + num57 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num58 = 0.3f; + num59 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 3: + num57 = 0.45f; + num58 = 0.75f; + num59 = 1f; + break; + case 4: + num57 = 1.15f; + num58 = 1.15f; + num59 = 0.5f; + break; + case 5: + num57 = (float) Main.DiscoR / (float) byte.MaxValue; + num58 = (float) Main.DiscoG / (float) byte.MaxValue; + num59 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + default: + num57 = 0.9f; + num58 = 0.3f; + num59 = 0.1f; + break; + } + num25 = num57 + num56; + num26 = num58 + num56; + num27 = num59 + num56; + break; + } + break; + case 415: + num25 = 0.7f; + num26 = 0.5f; + num27 = 0.1f; + break; + case 416: + num25 = 0.0f; + num26 = 0.6f; + num27 = 0.7f; + break; + case 417: + num25 = 0.6f; + num26 = 0.2f; + num27 = 0.6f; + break; + case 418: + num25 = 0.6f; + num26 = 0.6f; + num27 = 0.9f; + break; + case 429: + int num60 = (int) tile.frameX / 18; + bool flag2 = num60 % 2 >= 1; + bool flag3 = num60 % 4 >= 2; + bool flag4 = num60 % 8 >= 4; + int num61 = num60 % 16 >= 8 ? 1 : 0; + if (flag2) + num25 += 0.5f; + if (flag3) + num26 += 0.5f; + if (flag4) + num27 += 0.5f; + if (num61 != 0) + { + num25 += 0.2f; + num26 += 0.2f; + break; + } + break; + case 463: + num25 = 0.2f; + num26 = 0.4f; + num27 = 0.8f; + break; + } + } + } + if (Lighting.RGB) + { + if ((double) lightingState.r2 < (double) num25) + lightingState.r2 = num25; + if ((double) lightingState.g2 < (double) num26) + lightingState.g2 = num26; + if ((double) lightingState.b2 < (double) num27) + lightingState.b2 = num27; + } + else + { + float num62 = (float) (((double) num25 + (double) num26 + (double) num27) / 3.0); + if ((double) lightingState.r2 < (double) num62) + lightingState.r2 = num62; + } + if (tile.lava() && tile.liquid > (byte) 0) + { + if (Lighting.RGB) + { + float num63 = (float) ((double) ((int) tile.liquid / (int) byte.MaxValue) * 0.409999996423721 + 0.140000000596046); + float num64 = 0.55f + (float) (270 - (int) Main.mouseTextColor) / 900f; + if ((double) lightingState.r2 < (double) num64) + lightingState.r2 = num64; + if ((double) lightingState.g2 < (double) num64) + lightingState.g2 = num64 * 0.6f; + if ((double) lightingState.b2 < (double) num64) + lightingState.b2 = num64 * 0.2f; + } + else + { + float num65 = (float) ((double) ((int) tile.liquid / (int) byte.MaxValue) * 0.379999995231628 + 0.0799999982118607) + (float) (270 - (int) Main.mouseTextColor) / 2000f; + if ((double) lightingState.r2 < (double) num65) + lightingState.r2 = num65; + } + } + else if (tile.liquid > (byte) 128) + { + lightingState.wetLight = true; + if (tile.honey()) + lightingState.honeyLight = true; + } + if ((double) lightingState.r2 > 0.0 || Lighting.RGB && ((double) lightingState.g2 > 0.0 || (double) lightingState.b2 > 0.0)) + { + int num66 = index5 - Lighting.firstToLightX; + int num67 = index6 - Lighting.firstToLightY; + if (Lighting.minX > num66) + Lighting.minX = num66; + if (Lighting.maxX < num66 + 1) + Lighting.maxX = num66 + 1; + if (Lighting.minY > num67) + Lighting.minY = num67; + if (Lighting.maxY < num67 + 1) + Lighting.maxY = num67 + 1; + } + } + } + foreach (KeyValuePair tempLight in Lighting.tempLights) + { + int index11 = (int) tempLight.Key.X - Lighting.firstTileX + Lighting.offScreenTiles; + int index12 = (int) tempLight.Key.Y - Lighting.firstTileY + Lighting.offScreenTiles; + if (index11 >= 0 && index11 < Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 && index12 >= 0 && index12 < Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10) + { + Lighting.LightingState lightingState = Lighting.states[index11][index12]; + 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 (Lighting.minX > index11) + Lighting.minX = index11; + if (Lighting.maxX < index11 + 1) + Lighting.maxX = index11 + 1; + if (Lighting.minY > index12) + Lighting.minY = index12; + if (Lighting.maxY < index12 + 1) + Lighting.maxY = index12 + 1; + } + } + if (!Main.gamePaused) + Lighting.tempLights.Clear(); + if (screenTileCounts[27] > 0) + Main.sunflower = true; + Main.holyTiles = screenTileCounts[109] + screenTileCounts[110] + screenTileCounts[113] + screenTileCounts[117] + screenTileCounts[116] + screenTileCounts[164] + screenTileCounts[403] + screenTileCounts[402]; + Main.evilTiles = screenTileCounts[23] + screenTileCounts[24] + screenTileCounts[25] + screenTileCounts[32] + screenTileCounts[112] + screenTileCounts[163] + screenTileCounts[400] + screenTileCounts[398] + -5 * screenTileCounts[27]; + Main.bloodTiles = screenTileCounts[199] + screenTileCounts[203] + screenTileCounts[200] + screenTileCounts[401] + screenTileCounts[399] + screenTileCounts[234] + screenTileCounts[352] - 5 * screenTileCounts[27]; + Main.snowTiles = screenTileCounts[147] + screenTileCounts[148] + screenTileCounts[161] + screenTileCounts[162] + screenTileCounts[164] + screenTileCounts[163] + screenTileCounts[200]; + Main.jungleTiles = screenTileCounts[60] + screenTileCounts[61] + screenTileCounts[62] + screenTileCounts[74] + screenTileCounts[226]; + Main.shroomTiles = screenTileCounts[70] + screenTileCounts[71] + screenTileCounts[72]; + Main.meteorTiles = screenTileCounts[37]; + Main.dungeonTiles = screenTileCounts[41] + screenTileCounts[43] + screenTileCounts[44]; + Main.sandTiles = screenTileCounts[53] + screenTileCounts[112] + screenTileCounts[116] + screenTileCounts[234] + screenTileCounts[397] + screenTileCounts[398] + screenTileCounts[402] + screenTileCounts[399] + screenTileCounts[396] + screenTileCounts[400] + screenTileCounts[403] + screenTileCounts[401]; + Main.waterCandles = screenTileCounts[49]; + Main.peaceCandles = screenTileCounts[372]; + Main.partyMonoliths = screenTileCounts[455]; + if (Main.player[Main.myPlayer].accOreFinder) + { + Main.player[Main.myPlayer].bestOre = -1; + for (int index = 0; index < 470; ++index) + { + if (screenTileCounts[index] > 0 && Main.tileValue[index] > (short) 0 && (Main.player[Main.myPlayer].bestOre < 0 || (int) Main.tileValue[index] > (int) Main.tileValue[Main.player[Main.myPlayer].bestOre])) + Main.player[Main.myPlayer].bestOre = index; + } + } + if (Main.holyTiles < 0) + Main.holyTiles = 0; + if (Main.evilTiles < 0) + Main.evilTiles = 0; + if (Main.bloodTiles < 0) + Main.bloodTiles = 0; + int holyTiles = Main.holyTiles; + Main.holyTiles -= Main.evilTiles; + Main.holyTiles -= Main.bloodTiles; + Main.evilTiles -= holyTiles; + Main.bloodTiles -= holyTiles; + if (Main.holyTiles < 0) + Main.holyTiles = 0; + if (Main.evilTiles < 0) + Main.evilTiles = 0; + if (Main.bloodTiles < 0) + Main.bloodTiles = 0; + Lighting.minX += Lighting.firstToLightX; + Lighting.maxX += Lighting.firstToLightX; + Lighting.minY += Lighting.firstToLightY; + Lighting.maxY += Lighting.firstToLightY; + Lighting.minX7 = Lighting.minX; + Lighting.maxX7 = Lighting.maxX; + Lighting.minY7 = Lighting.minY; + Lighting.maxY7 = Lighting.maxY; + Lighting.firstTileX7 = Lighting.firstTileX; + Lighting.lastTileX7 = Lighting.lastTileX; + Lighting.lastTileY7 = Lighting.lastTileY; + Lighting.firstTileY7 = Lighting.firstTileY; + Lighting.firstToLightX7 = Lighting.firstToLightX; + Lighting.lastToLightX7 = Lighting.lastToLightX; + Lighting.firstToLightY7 = Lighting.firstToLightY; + Lighting.lastToLightY7 = Lighting.lastToLightY; + Lighting.firstToLightX27 = Lighting.firstTileX - Lighting.offScreenTiles2; + Lighting.firstToLightY27 = Lighting.firstTileY - Lighting.offScreenTiles2; + Lighting.lastToLightX27 = Lighting.lastTileX + Lighting.offScreenTiles2; + Lighting.lastToLightY27 = Lighting.lastTileY + Lighting.offScreenTiles2; + Lighting.scrX = (int) Math.Floor((double) Main.screenPosition.X / 16.0); + Lighting.scrY = (int) Math.Floor((double) Main.screenPosition.Y / 16.0); + Main.renderCount = 0; + TimeLogger.LightingTime(0, stopwatch.Elapsed.TotalMilliseconds); + Lighting.doColors(); + } + + public static void doColors() + { + if (Lighting.lightMode < 2) + { + Lighting.blueWave += (float) Lighting.blueDir * 0.0001f; + if ((double) Lighting.blueWave > 1.0) + { + Lighting.blueWave = 1f; + Lighting.blueDir = -1; + } + else if ((double) Lighting.blueWave < 0.970000028610229) + { + Lighting.blueWave = 0.97f; + Lighting.blueDir = 1; + } + if (Lighting.RGB) + { + Lighting.negLight = 0.91f; + Lighting.negLight2 = 0.56f; + Lighting.honeyLightG = 0.7f * Lighting.negLight * Lighting.blueWave; + Lighting.honeyLightR = 0.75f * Lighting.negLight * Lighting.blueWave; + Lighting.honeyLightB = 0.6f * Lighting.negLight * Lighting.blueWave; + switch (Main.waterStyle) + { + case 0: + case 1: + case 7: + case 8: + Lighting.wetLightG = 0.96f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.88f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1.015f * Lighting.negLight * Lighting.blueWave; + break; + case 2: + Lighting.wetLightG = 0.85f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.94f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1.01f * Lighting.negLight * Lighting.blueWave; + break; + case 3: + Lighting.wetLightG = 0.95f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.84f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1.015f * Lighting.negLight * Lighting.blueWave; + break; + case 4: + Lighting.wetLightG = 0.86f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.9f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1.01f * Lighting.negLight * Lighting.blueWave; + break; + case 5: + Lighting.wetLightG = 0.99f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.84f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1.01f * Lighting.negLight * Lighting.blueWave; + break; + case 6: + Lighting.wetLightG = 0.98f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.95f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 0.85f * Lighting.negLight * Lighting.blueWave; + break; + case 9: + Lighting.wetLightG = 0.88f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 1f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 0.84f * Lighting.negLight * Lighting.blueWave; + break; + case 10: + Lighting.wetLightG = 1f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightR = 0.83f * Lighting.negLight * Lighting.blueWave; + Lighting.wetLightB = 1f * Lighting.negLight * Lighting.blueWave; + break; + default: + Lighting.wetLightG = 0.0f; + Lighting.wetLightR = 0.0f; + Lighting.wetLightB = 0.0f; + break; + } + } + else + { + Lighting.negLight = 0.9f; + Lighting.negLight2 = 0.54f; + Lighting.wetLightR = 0.95f * Lighting.negLight * Lighting.blueWave; + } + if (Main.player[Main.myPlayer].nightVision) + { + Lighting.negLight *= 1.03f; + Lighting.negLight2 *= 1.03f; + } + if (Main.player[Main.myPlayer].blind) + { + Lighting.negLight *= 0.95f; + Lighting.negLight2 *= 0.95f; + } + if (Main.player[Main.myPlayer].blackout) + { + Lighting.negLight *= 0.85f; + Lighting.negLight2 *= 0.85f; + } + if (Main.player[Main.myPlayer].headcovered) + { + Lighting.negLight *= 0.85f; + Lighting.negLight2 *= 0.85f; + } + } + else + { + Lighting.negLight = 0.04f; + Lighting.negLight2 = 0.16f; + if (Main.player[Main.myPlayer].nightVision) + { + Lighting.negLight -= 0.013f; + Lighting.negLight2 -= 0.04f; + } + if (Main.player[Main.myPlayer].blind) + { + Lighting.negLight += 0.03f; + Lighting.negLight2 += 0.06f; + } + if (Main.player[Main.myPlayer].blackout) + { + Lighting.negLight += 0.09f; + Lighting.negLight2 += 0.18f; + } + if (Main.player[Main.myPlayer].headcovered) + { + Lighting.negLight += 0.09f; + Lighting.negLight2 += 0.18f; + } + Lighting.wetLightR = Lighting.negLight * 1.2f; + Lighting.wetLightG = Lighting.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; + } + if (Lighting.LightingThreads < 0) + Lighting.LightingThreads = 0; + if (Lighting.LightingThreads >= Environment.ProcessorCount) + Lighting.LightingThreads = Environment.ProcessorCount - 1; + int lightingThreads = Lighting.LightingThreads; + if (lightingThreads > 0) + ++lightingThreads; + Stopwatch stopwatch = new Stopwatch(); + for (int index1 = num1; index1 < num2; ++index1) + { + stopwatch.Restart(); + switch (index1) + { + case 0: + Lighting.swipe.innerLoop1Start = Lighting.minY7 - Lighting.firstToLightY7; + Lighting.swipe.innerLoop1End = Lighting.lastToLightY27 + Lighting.maxRenderCount - Lighting.firstToLightY7; + Lighting.swipe.innerLoop2Start = Lighting.maxY7 - Lighting.firstToLightY; + Lighting.swipe.innerLoop2End = Lighting.firstTileY7 - Lighting.maxRenderCount - Lighting.firstToLightY7; + Lighting.swipe.outerLoopStart = Lighting.minX7 - Lighting.firstToLightX7; + Lighting.swipe.outerLoopEnd = Lighting.maxX7 - Lighting.firstToLightX7; + Lighting.swipe.jaggedArray = Lighting.states; + break; + case 1: + Lighting.swipe.innerLoop1Start = Lighting.minX7 - Lighting.firstToLightX7; + Lighting.swipe.innerLoop1End = Lighting.lastTileX7 + Lighting.maxRenderCount - Lighting.firstToLightX7; + Lighting.swipe.innerLoop2Start = Lighting.maxX7 - Lighting.firstToLightX7; + Lighting.swipe.innerLoop2End = Lighting.firstTileX7 - Lighting.maxRenderCount - Lighting.firstToLightX7; + Lighting.swipe.outerLoopStart = Lighting.firstToLightY7 - Lighting.firstToLightY7; + Lighting.swipe.outerLoopEnd = Lighting.lastToLightY7 - Lighting.firstToLightY7; + Lighting.swipe.jaggedArray = Lighting.axisFlipStates; + break; + case 2: + Lighting.swipe.innerLoop1Start = Lighting.firstToLightY27 - Lighting.firstToLightY7; + Lighting.swipe.innerLoop1End = Lighting.lastTileY7 + Lighting.maxRenderCount - Lighting.firstToLightY7; + Lighting.swipe.innerLoop2Start = Lighting.lastToLightY27 - Lighting.firstToLightY; + Lighting.swipe.innerLoop2End = Lighting.firstTileY7 - Lighting.maxRenderCount - Lighting.firstToLightY7; + Lighting.swipe.outerLoopStart = Lighting.firstToLightX27 - Lighting.firstToLightX7; + Lighting.swipe.outerLoopEnd = Lighting.lastToLightX27 - Lighting.firstToLightX7; + Lighting.swipe.jaggedArray = Lighting.states; + break; + case 3: + Lighting.swipe.innerLoop1Start = Lighting.firstToLightX27 - Lighting.firstToLightX7; + Lighting.swipe.innerLoop1End = Lighting.lastTileX7 + Lighting.maxRenderCount - Lighting.firstToLightX7; + Lighting.swipe.innerLoop2Start = Lighting.lastToLightX27 - Lighting.firstToLightX7; + Lighting.swipe.innerLoop2End = Lighting.firstTileX7 - Lighting.maxRenderCount - Lighting.firstToLightX7; + Lighting.swipe.outerLoopStart = Lighting.firstToLightY27 - Lighting.firstToLightY7; + Lighting.swipe.outerLoopEnd = Lighting.lastToLightY27 - Lighting.firstToLightY7; + Lighting.swipe.jaggedArray = Lighting.axisFlipStates; + break; + } + if (Lighting.swipe.innerLoop1Start > Lighting.swipe.innerLoop1End) + Lighting.swipe.innerLoop1Start = Lighting.swipe.innerLoop1End; + if (Lighting.swipe.innerLoop2Start < Lighting.swipe.innerLoop2End) + Lighting.swipe.innerLoop2Start = Lighting.swipe.innerLoop2End; + if (Lighting.swipe.outerLoopStart > Lighting.swipe.outerLoopEnd) + Lighting.swipe.outerLoopStart = Lighting.swipe.outerLoopEnd; + switch (Lighting.lightMode) + { + case 0: + Lighting.swipe.function = new Action(Lighting.doColors_Mode0_Swipe); + break; + case 1: + Lighting.swipe.function = new Action(Lighting.doColors_Mode1_Swipe); + break; + case 2: + Lighting.swipe.function = new Action(Lighting.doColors_Mode2_Swipe); + break; + case 3: + Lighting.swipe.function = new Action(Lighting.doColors_Mode3_Swipe); + break; + default: + Lighting.swipe.function = (Action) null; + break; + } + if (lightingThreads == 0) + { + Lighting.swipe.function(Lighting.swipe); + } + else + { + int num3 = Lighting.swipe.outerLoopEnd - Lighting.swipe.outerLoopStart; + int num4 = num3 / lightingThreads; + int num5 = num3 % lightingThreads; + int outerLoopStart = Lighting.swipe.outerLoopStart; + Lighting.countdown.Reset(lightingThreads); + for (int index2 = 0; index2 < lightingThreads; ++index2) + { + Lighting.LightingSwipeData threadSwipe = Lighting.threadSwipes[index2]; + threadSwipe.CopyFrom(Lighting.swipe); + threadSwipe.outerLoopStart = outerLoopStart; + outerLoopStart += num4; + if (num5 > 0) + { + ++outerLoopStart; + --num5; + } + threadSwipe.outerLoopEnd = outerLoopStart; + ThreadPool.QueueUserWorkItem(new WaitCallback(Lighting.callback_LightingSwipe), (object) threadSwipe); + } + while (Lighting.countdown.CurrentCount != 0) + ; + } + TimeLogger.LightingTime(index1 + 1, stopwatch.Elapsed.TotalMilliseconds); + } + } + + private static void callback_LightingSwipe(object obj) + { + Lighting.LightingSwipeData lightingSwipeData = obj as Lighting.LightingSwipeData; + try + { + lightingSwipeData.function(lightingSwipeData); + } + catch + { + } + Lighting.countdown.Signal(); + } + + private static void doColors_Mode0_Swipe(Lighting.LightingSwipeData swipeData) + { + try + { + bool flag1 = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag1) + { + num1 = 1; + num2 = swipeData.innerLoop1Start; + num3 = swipeData.innerLoop1End; + } + else + { + num1 = -1; + num2 = swipeData.innerLoop2Start; + num3 = swipeData.innerLoop2End; + } + int outerLoopStart = swipeData.outerLoopStart; + int outerLoopEnd = swipeData.outerLoopEnd; + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + Lighting.LightingState[] jagged = swipeData.jaggedArray[index1]; + float num4 = 0.0f; + float num5 = 0.0f; + float num6 = 0.0f; + int num7 = num2; + int num8 = num3; + for (int index2 = num7; index2 != num8; index2 += num1) + { + Lighting.LightingState lightingState1 = jagged[index2]; + Lighting.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 (!flag3 && (double) lightingState2.r2 <= (double) num4) + { + if (lightingState1.stopLight) + num4 *= Lighting.negLight2; + else if (lightingState1.wetLight) + { + if (lightingState1.honeyLight) + num4 *= (float) ((double) Lighting.honeyLightR * (double) swipeData.rand.Next(98, 100) * 0.00999999977648258); + else + num4 *= (float) ((double) Lighting.wetLightR * (double) swipeData.rand.Next(98, 100) * 0.00999999977648258); + } + else + num4 *= Lighting.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 *= Lighting.negLight2; + else if (lightingState1.wetLight) + { + if (lightingState1.honeyLight) + num5 *= (float) ((double) Lighting.honeyLightG * (double) swipeData.rand.Next(97, 100) * 0.00999999977648258); + else + num5 *= (float) ((double) Lighting.wetLightG * (double) swipeData.rand.Next(97, 100) * 0.00999999977648258); + } + else + num5 *= Lighting.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 *= Lighting.negLight2; + else if (lightingState1.wetLight) + { + if (lightingState1.honeyLight) + num6 *= (float) ((double) Lighting.honeyLightB * (double) swipeData.rand.Next(97, 100) * 0.00999999977648258); + else + num6 *= (float) ((double) Lighting.wetLightB * (double) swipeData.rand.Next(97, 100) * 0.00999999977648258); + } + else + num6 *= Lighting.negLight; + } + } + } + if (flag1) + flag1 = false; + else + break; + } + } + catch + { + } + } + + private static void doColors_Mode1_Swipe(Lighting.LightingSwipeData swipeData) + { + try + { + bool flag = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag) + { + num1 = 1; + num2 = swipeData.innerLoop1Start; + num3 = swipeData.innerLoop1End; + } + else + { + num1 = -1; + num2 = swipeData.innerLoop2Start; + num3 = swipeData.innerLoop2End; + } + int outerLoopStart = swipeData.outerLoopStart; + int outerLoopEnd = swipeData.outerLoopEnd; + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + Lighting.LightingState[] jagged = swipeData.jaggedArray[index1]; + float num4 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + Lighting.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 *= Lighting.negLight2; + else if (lightingState.wetLight) + { + if (lightingState.honeyLight) + num4 *= (float) ((double) Lighting.honeyLightR * (double) swipeData.rand.Next(98, 100) * 0.00999999977648258); + else + num4 *= (float) ((double) Lighting.wetLightR * (double) swipeData.rand.Next(98, 100) * 0.00999999977648258); + } + else + num4 *= Lighting.negLight; + } + } + } + if (flag) + flag = false; + else + break; + } + } + catch + { + } + } + + private static void doColors_Mode2_Swipe(Lighting.LightingSwipeData swipeData) + { + try + { + bool flag = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag) + { + num1 = 1; + num2 = swipeData.innerLoop1Start; + num3 = swipeData.innerLoop1End; + } + else + { + num1 = -1; + num2 = swipeData.innerLoop2Start; + num3 = swipeData.innerLoop2End; + } + int outerLoopStart = swipeData.outerLoopStart; + int outerLoopEnd = swipeData.outerLoopEnd; + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + Lighting.LightingState[] jagged = swipeData.jaggedArray[index1]; + float num4 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + Lighting.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 -= Lighting.negLight2; + else if (lightingState.wetLight) + num4 -= Lighting.wetLightR; + else + num4 -= Lighting.negLight; + } + } + if (flag) + flag = false; + else + break; + } + } + catch + { + } + } + + private static void doColors_Mode3_Swipe(Lighting.LightingSwipeData swipeData) + { + try + { + bool flag1 = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag1) + { + num1 = 1; + num2 = swipeData.innerLoop1Start; + num3 = swipeData.innerLoop1End; + } + else + { + num1 = -1; + num2 = swipeData.innerLoop2Start; + num3 = swipeData.innerLoop2End; + } + int outerLoopStart = swipeData.outerLoopStart; + int outerLoopEnd = swipeData.outerLoopEnd; + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + Lighting.LightingState[] jagged = swipeData.jaggedArray[index1]; + float num4 = 0.0f; + float num5 = 0.0f; + float num6 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + Lighting.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 -= Lighting.negLight2; + else if (lightingState.wetLight) + num4 -= Lighting.wetLightR; + else + num4 -= Lighting.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 -= Lighting.negLight2; + else if (lightingState.wetLight) + num5 -= Lighting.wetLightG; + else + num5 -= Lighting.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 -= Lighting.negLight2; + else + num6 -= Lighting.negLight; + } + } + if (flag1) + flag1 = false; + else + break; + } + } + catch + { + } + } + + 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, float R, float G, float B) + { + if (Main.gamePaused || Main.netMode == 2 || i - Lighting.firstTileX + Lighting.offScreenTiles < 0 || i - Lighting.firstTileX + Lighting.offScreenTiles >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 || j - Lighting.firstTileY + Lighting.offScreenTiles < 0 || j - Lighting.firstTileY + Lighting.offScreenTiles >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10 || Lighting.tempLights.Count == Lighting.maxTempLights) + return; + Point16 key = new Point16(i, j); + Lighting.ColorTriplet colorTriplet; + if (Lighting.tempLights.TryGetValue(key, out colorTriplet)) + { + if (Lighting.RGB) + { + if ((double) colorTriplet.r < (double) R) + colorTriplet.r = R; + if ((double) colorTriplet.g < (double) G) + colorTriplet.g = G; + if ((double) colorTriplet.b < (double) B) + colorTriplet.b = B; + Lighting.tempLights[key] = colorTriplet; + } + else + { + float averageColor = (float) (((double) R + (double) G + (double) B) / 3.0); + if ((double) colorTriplet.r >= (double) averageColor) + return; + Lighting.tempLights[key] = new Lighting.ColorTriplet(averageColor); + } + } + else + { + colorTriplet = !Lighting.RGB ? new Lighting.ColorTriplet((float) (((double) R + (double) G + (double) B) / 3.0)) : new Lighting.ColorTriplet(R, G, B); + Lighting.tempLights.Add(key, colorTriplet); + } + } + + public static void NextLightMode() + { + Lighting.lightCounter += 100; + ++Lighting.lightMode; + if (Lighting.lightMode >= 4) + Lighting.lightMode = 0; + if (Lighting.lightMode != 2 && Lighting.lightMode != 0) + return; + Main.renderCount = 0; + Main.renderNow = true; + Lighting.BlackOut(); + } + + public static void BlackOut() + { + int num1 = Main.screenWidth / 16 + Lighting.offScreenTiles * 2; + int num2 = Main.screenHeight / 16 + Lighting.offScreenTiles * 2; + for (int index1 = 0; index1 < num1; ++index1) + { + Lighting.LightingState[] state = Lighting.states[index1]; + for (int index2 = 0; index2 < num2; ++index2) + { + Lighting.LightingState lightingState = state[index2]; + lightingState.r = 0.0f; + lightingState.g = 0.0f; + lightingState.b = 0.0f; + } + } + } + + public static Color GetColor(int x, int y, Color oldColor) + { + int index1 = x - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = y - Lighting.firstTileY + Lighting.offScreenTiles; + if (Main.gameMenu) + return oldColor; + if (index1 < 0 || index2 < 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10) + return Color.Black; + Color white = Color.White; + Lighting.LightingState lightingState = Lighting.states[index1][index2]; + int num1 = (int) ((double) oldColor.R * (double) lightingState.r * (double) Lighting.brightness); + int num2 = (int) ((double) oldColor.G * (double) lightingState.g * (double) Lighting.brightness); + int num3 = (int) ((double) oldColor.B * (double) lightingState.b * (double) Lighting.brightness); + 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; + white.R = (byte) num1; + white.G = (byte) num2; + white.B = (byte) num3; + return white; + } + + public static Color GetColor(int x, int y) + { + int index1 = x - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = y - Lighting.firstTileY + Lighting.offScreenTiles; + if (Main.gameMenu) + return Color.White; + if (index1 < 0 || index2 < 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2) + return Color.Black; + Lighting.LightingState lightingState = Lighting.states[index1][index2]; + int num1 = (int) ((double) byte.MaxValue * (double) lightingState.r * (double) Lighting.brightness); + int num2 = (int) ((double) byte.MaxValue * (double) lightingState.g * (double) Lighting.brightness); + int num3 = (int) ((double) byte.MaxValue * (double) lightingState.b * (double) Lighting.brightness); + 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; + return new Color((int) (byte) num1, (int) (byte) num2, (int) (byte) num3, (int) byte.MaxValue); + } + + public static void GetColor9Slice(int centerX, int centerY, ref Color[] slices) + { + int num1 = centerX - Lighting.firstTileX + Lighting.offScreenTiles; + int num2 = centerY - Lighting.firstTileY + Lighting.offScreenTiles; + if (num1 <= 0 || num2 <= 0 || num1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 - 1 || num2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 - 1) + { + for (int index = 0; index < 9; ++index) + slices[index] = Color.Black; + } + else + { + int index1 = 0; + for (int index2 = num1 - 1; index2 <= num1 + 1; ++index2) + { + Lighting.LightingState[] state = Lighting.states[index2]; + for (int index3 = num2 - 1; index3 <= num2 + 1; ++index3) + { + Lighting.LightingState lightingState = state[index3]; + int num3 = (int) ((double) byte.MaxValue * (double) lightingState.r * (double) Lighting.brightness); + int num4 = (int) ((double) byte.MaxValue * (double) lightingState.g * (double) Lighting.brightness); + int num5 = (int) ((double) byte.MaxValue * (double) lightingState.b * (double) Lighting.brightness); + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + if (num4 > (int) byte.MaxValue) + num4 = (int) byte.MaxValue; + if (num5 > (int) byte.MaxValue) + num5 = (int) byte.MaxValue; + slices[index1] = new Color((int) (byte) num3, (int) (byte) num4, (int) (byte) num5, (int) byte.MaxValue); + index1 += 3; + } + index1 -= 8; + } + } + } + + 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 index1 = (int) vector2_1.X - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = (int) vector2_1.Y - Lighting.firstTileY + Lighting.offScreenTiles; + if (index1 <= 0 || index2 <= 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 - 1 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 - 1) + return Vector3.One; + Vector3 vector3_1 = Lighting.states[index1][index2].ToVector3(); + Vector3 vector3_2 = Lighting.states[index1 + 1][index2].ToVector3(); + Vector3 vector3_3 = Lighting.states[index1][index2 + 1].ToVector3(); + Vector3 vector3_4 = Lighting.states[index1 + 1][index2 + 1].ToVector3(); + Vector3 vector3_5 = vector3_2; + double x = (double) vector2_2.X; + return Vector3.Lerp(Vector3.Lerp(vector3_1, vector3_5, (float) x), Vector3.Lerp(vector3_3, vector3_4, vector2_2.X), vector2_2.Y); + } + + public static void GetColor4Slice_New( + int centerX, + int centerY, + out VertexColors vertices, + float scale = 1f) + { + int index1 = centerX - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = centerY - Lighting.firstTileY + Lighting.offScreenTiles; + if (index1 <= 0 || index2 <= 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 - 1 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 - 1) + { + vertices.BottomLeftColor = Color.Black; + vertices.BottomRightColor = Color.Black; + vertices.TopLeftColor = Color.Black; + vertices.TopRightColor = Color.Black; + } + else + { + Lighting.LightingState lightingState1 = Lighting.states[index1][index2]; + Lighting.LightingState lightingState2 = Lighting.states[index1][index2 - 1]; + Lighting.LightingState lightingState3 = Lighting.states[index1][index2 + 1]; + Lighting.LightingState lightingState4 = Lighting.states[index1 - 1][index2]; + Lighting.LightingState lightingState5 = Lighting.states[index1 + 1][index2]; + Lighting.LightingState lightingState6 = Lighting.states[index1 - 1][index2 - 1]; + Lighting.LightingState lightingState7 = Lighting.states[index1 + 1][index2 - 1]; + Lighting.LightingState lightingState8 = Lighting.states[index1 - 1][index2 + 1]; + Lighting.LightingState lightingState9 = Lighting.states[index1 + 1][index2 + 1]; + float num1 = (float) ((double) Lighting.brightness * (double) scale * (double) byte.MaxValue * 0.25); + float num2 = (lightingState2.r + lightingState6.r + lightingState4.r + lightingState1.r) * num1; + float num3 = (lightingState2.g + lightingState6.g + lightingState4.g + lightingState1.g) * num1; + float num4 = (lightingState2.b + lightingState6.b + lightingState4.b + lightingState1.b) * num1; + if ((double) num2 > (double) byte.MaxValue) + num2 = (float) byte.MaxValue; + if ((double) num3 > (double) byte.MaxValue) + num3 = (float) byte.MaxValue; + if ((double) num4 > (double) byte.MaxValue) + num4 = (float) byte.MaxValue; + vertices.TopLeftColor = new Color((int) (byte) num2, (int) (byte) num3, (int) (byte) num4, (int) byte.MaxValue); + float num5 = (lightingState2.r + lightingState7.r + lightingState5.r + lightingState1.r) * num1; + float num6 = (lightingState2.g + lightingState7.g + lightingState5.g + lightingState1.g) * num1; + float num7 = (lightingState2.b + lightingState7.b + lightingState5.b + lightingState1.b) * num1; + if ((double) num5 > (double) byte.MaxValue) + num5 = (float) byte.MaxValue; + if ((double) num6 > (double) byte.MaxValue) + num6 = (float) byte.MaxValue; + if ((double) num7 > (double) byte.MaxValue) + num7 = (float) byte.MaxValue; + vertices.TopRightColor = new Color((int) (byte) num5, (int) (byte) num6, (int) (byte) num7, (int) byte.MaxValue); + float num8 = (lightingState3.r + lightingState8.r + lightingState4.r + lightingState1.r) * num1; + float num9 = (lightingState3.g + lightingState8.g + lightingState4.g + lightingState1.g) * num1; + float num10 = (lightingState3.b + lightingState8.b + lightingState4.b + lightingState1.b) * num1; + if ((double) num8 > (double) byte.MaxValue) + num8 = (float) byte.MaxValue; + if ((double) num9 > (double) byte.MaxValue) + num9 = (float) byte.MaxValue; + if ((double) num10 > (double) byte.MaxValue) + num10 = (float) byte.MaxValue; + vertices.BottomLeftColor = new Color((int) (byte) num8, (int) (byte) num9, (int) (byte) num10, (int) byte.MaxValue); + float num11 = (lightingState3.r + lightingState9.r + lightingState5.r + lightingState1.r) * num1; + float num12 = (lightingState3.g + lightingState9.g + lightingState5.g + lightingState1.g) * num1; + float num13 = (lightingState3.b + lightingState9.b + lightingState5.b + lightingState1.b) * num1; + 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; + vertices.BottomRightColor = new Color((int) (byte) num11, (int) (byte) num12, (int) (byte) num13, (int) byte.MaxValue); + } + } + + public static void GetColor4Slice_New( + int centerX, + int centerY, + out VertexColors vertices, + Color centerColor, + float scale = 1f) + { + int index1 = centerX - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = centerY - Lighting.firstTileY + Lighting.offScreenTiles; + if (index1 <= 0 || index2 <= 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 - 1 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 - 1) + { + vertices.BottomLeftColor = Color.Black; + vertices.BottomRightColor = Color.Black; + vertices.TopLeftColor = Color.Black; + vertices.TopRightColor = Color.Black; + } + else + { + float num1 = (float) centerColor.R / (float) byte.MaxValue; + float num2 = (float) centerColor.G / (float) byte.MaxValue; + float num3 = (float) centerColor.B / (float) byte.MaxValue; + Lighting.LightingState lightingState1 = Lighting.states[index1][index2 - 1]; + Lighting.LightingState lightingState2 = Lighting.states[index1][index2 + 1]; + Lighting.LightingState lightingState3 = Lighting.states[index1 - 1][index2]; + Lighting.LightingState lightingState4 = Lighting.states[index1 + 1][index2]; + Lighting.LightingState lightingState5 = Lighting.states[index1 - 1][index2 - 1]; + Lighting.LightingState lightingState6 = Lighting.states[index1 + 1][index2 - 1]; + Lighting.LightingState lightingState7 = Lighting.states[index1 - 1][index2 + 1]; + Lighting.LightingState lightingState8 = Lighting.states[index1 + 1][index2 + 1]; + float num4 = (float) ((double) Lighting.brightness * (double) scale * (double) byte.MaxValue * 0.25); + float num5 = (lightingState1.r + lightingState5.r + lightingState3.r + num1) * num4; + float num6 = (lightingState1.g + lightingState5.g + lightingState3.g + num2) * num4; + float num7 = (lightingState1.b + lightingState5.b + lightingState3.b + num3) * num4; + if ((double) num5 > (double) byte.MaxValue) + num5 = (float) byte.MaxValue; + if ((double) num6 > (double) byte.MaxValue) + num6 = (float) byte.MaxValue; + if ((double) num7 > (double) byte.MaxValue) + num7 = (float) byte.MaxValue; + vertices.TopLeftColor = new Color((int) (byte) num5, (int) (byte) num6, (int) (byte) num7, (int) byte.MaxValue); + float num8 = (lightingState1.r + lightingState6.r + lightingState4.r + num1) * num4; + float num9 = (lightingState1.g + lightingState6.g + lightingState4.g + num2) * num4; + float num10 = (lightingState1.b + lightingState6.b + lightingState4.b + num3) * num4; + if ((double) num8 > (double) byte.MaxValue) + num8 = (float) byte.MaxValue; + if ((double) num9 > (double) byte.MaxValue) + num9 = (float) byte.MaxValue; + if ((double) num10 > (double) byte.MaxValue) + num10 = (float) byte.MaxValue; + vertices.TopRightColor = new Color((int) (byte) num8, (int) (byte) num9, (int) (byte) num10, (int) byte.MaxValue); + float num11 = (lightingState2.r + lightingState7.r + lightingState3.r + num1) * num4; + float num12 = (lightingState2.g + lightingState7.g + lightingState3.g + num2) * num4; + float num13 = (lightingState2.b + lightingState7.b + lightingState3.b + num3) * 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; + vertices.BottomLeftColor = new Color((int) (byte) num11, (int) (byte) num12, (int) (byte) num13, (int) byte.MaxValue); + float num14 = (lightingState2.r + lightingState8.r + lightingState4.r + num1) * num4; + float num15 = (lightingState2.g + lightingState8.g + lightingState4.g + num2) * num4; + float num16 = (lightingState2.b + lightingState8.b + lightingState4.b + num3) * num4; + if ((double) num14 > (double) byte.MaxValue) + num14 = (float) byte.MaxValue; + if ((double) num15 > (double) byte.MaxValue) + num15 = (float) byte.MaxValue; + if ((double) num16 > (double) byte.MaxValue) + num16 = (float) byte.MaxValue; + vertices.BottomRightColor = new Color((int) (byte) num14, (int) (byte) num15, (int) (byte) num16, (int) byte.MaxValue); + } + } + + public static void GetColor4Slice(int centerX, int centerY, ref Color[] slices) + { + int index1 = centerX - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = centerY - Lighting.firstTileY + Lighting.offScreenTiles; + if (index1 <= 0 || index2 <= 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 - 1 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 - 1) + { + for (int index3 = 0; index3 < 4; ++index3) + slices[index3] = Color.Black; + } + else + { + Lighting.LightingState lightingState1 = Lighting.states[index1][index2 - 1]; + Lighting.LightingState lightingState2 = Lighting.states[index1][index2 + 1]; + Lighting.LightingState lightingState3 = Lighting.states[index1 - 1][index2]; + Lighting.LightingState lightingState4 = Lighting.states[index1 + 1][index2]; + double num1 = (double) lightingState1.r + (double) lightingState1.g + (double) lightingState1.b; + float num2 = lightingState2.r + lightingState2.g + lightingState2.b; + float num3 = lightingState4.r + lightingState4.g + lightingState4.b; + float num4 = lightingState3.r + lightingState3.g + lightingState3.b; + if (num1 >= (double) num4) + { + int num5 = (int) ((double) byte.MaxValue * (double) lightingState3.r * (double) Lighting.brightness); + int num6 = (int) ((double) byte.MaxValue * (double) lightingState3.g * (double) Lighting.brightness); + int num7 = (int) ((double) byte.MaxValue * (double) lightingState3.b * (double) Lighting.brightness); + 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) lightingState1.r * (double) Lighting.brightness); + int num9 = (int) ((double) byte.MaxValue * (double) lightingState1.g * (double) Lighting.brightness); + int num10 = (int) ((double) byte.MaxValue * (double) lightingState1.b * (double) Lighting.brightness); + 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) lightingState4.r * (double) Lighting.brightness); + int num12 = (int) ((double) byte.MaxValue * (double) lightingState4.g * (double) Lighting.brightness); + int num13 = (int) ((double) byte.MaxValue * (double) lightingState4.b * (double) Lighting.brightness); + 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) lightingState1.r * (double) Lighting.brightness); + int num15 = (int) ((double) byte.MaxValue * (double) lightingState1.g * (double) Lighting.brightness); + int num16 = (int) ((double) byte.MaxValue * (double) lightingState1.b * (double) Lighting.brightness); + 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) lightingState3.r * (double) Lighting.brightness); + int num18 = (int) ((double) byte.MaxValue * (double) lightingState3.g * (double) Lighting.brightness); + int num19 = (int) ((double) byte.MaxValue * (double) lightingState3.b * (double) Lighting.brightness); + 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) lightingState2.r * (double) Lighting.brightness); + int num21 = (int) ((double) byte.MaxValue * (double) lightingState2.g * (double) Lighting.brightness); + int num22 = (int) ((double) byte.MaxValue * (double) lightingState2.b * (double) Lighting.brightness); + 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) lightingState4.r * (double) Lighting.brightness); + int num24 = (int) ((double) byte.MaxValue * (double) lightingState4.g * (double) Lighting.brightness); + int num25 = (int) ((double) byte.MaxValue * (double) lightingState4.b * (double) Lighting.brightness); + 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) lightingState2.r * (double) Lighting.brightness); + int num27 = (int) ((double) byte.MaxValue * (double) lightingState2.g * (double) Lighting.brightness); + int num28 = (int) ((double) byte.MaxValue * (double) lightingState2.b * (double) Lighting.brightness); + 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 Color GetBlackness(int x, int y) + { + int index1 = x - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = y - Lighting.firstTileY + Lighting.offScreenTiles; + return index1 < 0 || index2 < 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10 ? Color.Black : new Color(0, 0, 0, (int) (byte) ((double) byte.MaxValue - (double) byte.MaxValue * (double) Lighting.states[index1][index2].r)); + } + + public static float Brightness(int x, int y) + { + int index1 = x - Lighting.firstTileX + Lighting.offScreenTiles; + int index2 = y - Lighting.firstTileY + Lighting.offScreenTiles; + if (index1 < 0 || index2 < 0 || index1 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10 || index2 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10) + return 0.0f; + Lighting.LightingState lightingState = Lighting.states[index1][index2]; + return (float) ((double) Lighting.brightness * ((double) lightingState.r + (double) lightingState.g + (double) lightingState.b) / 3.0); + } + + public static float BrightnessAverage(int x, int y, int width, int height) + { + int num1 = x - Lighting.firstTileX + Lighting.offScreenTiles; + int num2 = y - Lighting.firstTileY + Lighting.offScreenTiles; + int num3 = num1 + width; + int num4 = num2 + height; + if (num1 < 0) + num1 = 0; + if (num2 < 0) + num2 = 0; + if (num3 >= Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10) + num3 = Main.screenWidth / 16 + Lighting.offScreenTiles * 2 + 10; + if (num4 >= Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10) + num4 = Main.screenHeight / 16 + Lighting.offScreenTiles * 2 + 10; + float num5 = 0.0f; + float num6 = 0.0f; + for (int index1 = num1; index1 < num3; ++index1) + { + for (int index2 = num2; index2 < num4; ++index2) + { + ++num5; + Lighting.LightingState lightingState = Lighting.states[index1][index2]; + num6 += (float) (((double) lightingState.r + (double) lightingState.g + (double) lightingState.b) / 3.0); + } + } + return (double) num5 == 0.0 ? 0.0f : num6 / num5; + } + + private class LightingSwipeData + { + public int outerLoopStart; + public int outerLoopEnd; + public int innerLoop1Start; + public int innerLoop1End; + public int innerLoop2Start; + public int innerLoop2End; + public UnifiedRandom rand; + public Action function; + public Lighting.LightingState[][] jaggedArray; + + public LightingSwipeData() + { + this.innerLoop1Start = 0; + this.outerLoopStart = 0; + this.innerLoop1End = 0; + this.outerLoopEnd = 0; + this.innerLoop2Start = 0; + this.innerLoop2End = 0; + this.function = (Action) null; + this.rand = new UnifiedRandom(); + } + + public void CopyFrom(Lighting.LightingSwipeData from) + { + this.innerLoop1Start = from.innerLoop1Start; + this.outerLoopStart = from.outerLoopStart; + this.innerLoop1End = from.innerLoop1End; + this.outerLoopEnd = from.outerLoopEnd; + this.innerLoop2Start = from.innerLoop2Start; + this.innerLoop2End = from.innerLoop2End; + this.function = from.function; + 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/Liquid.cs b/Liquid.cs new file mode 100644 index 0000000..64f1e79 --- /dev/null +++ b/Liquid.cs @@ -0,0 +1,1050 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Liquid +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.ID; +using Terraria.Localization; +using Terraria.Net; +using Terraria.ObjectData; + +namespace Terraria +{ + public class Liquid + { + public static int skipCount = 0; + public static int stuckCount = 0; + public static int stuckAmount = 0; + public static int cycles = 10; + public static int resLiquid = 5000; + public static int maxLiquid = 5000; + public static int numLiquid; + public static bool stuck = false; + public static bool quickFall = false; + public static bool quickSettle = false; + private static int wetCounter; + public static int panicCounter = 0; + public static bool panicMode = false; + public static int panicY = 0; + 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 ReInit() + { + Liquid.skipCount = 0; + Liquid.stuckCount = 0; + Liquid.stuckAmount = 0; + Liquid.cycles = 10; + Liquid.resLiquid = 5000; + Liquid.maxLiquid = 5000; + Liquid.numLiquid = 0; + Liquid.stuck = false; + Liquid.quickFall = false; + Liquid.quickSettle = false; + Liquid.wetCounter = 0; + Liquid.panicCounter = 0; + Liquid.panicMode = false; + Liquid.panicY = 0; + } + + public static double QuickWater(int verbose = 0, int minY = -1, int maxY = -1) + { + Main.tileSolid[379] = true; + int num1 = 0; + if (minY == -1) + minY = 3; + if (maxY == -1) + maxY = Main.maxTilesY - 3; + for (int index1 = maxY; index1 >= minY; --index1) + { + if (verbose > 0) + { + float num2 = (float) (maxY - index1) / (float) (maxY - minY + 1) / (float) verbose; + Main.statusText = Lang.gen[27].Value + " " + (object) (int) ((double) num2 * 100.0 + 1.0) + "%"; + } + else if (verbose < 0) + { + float num3 = (float) (maxY - index1) / (float) (maxY - minY + 1) / (float) -verbose; + Main.statusText = Lang.gen[18].Value + " " + (object) (int) ((double) num3 * 100.0 + 1.0) + "%"; + } + for (int index2 = 0; index2 < 2; ++index2) + { + int num4 = 2; + int num5 = Main.maxTilesX - 2; + int num6 = 1; + if (index2 == 1) + { + num4 = Main.maxTilesX - 2; + num5 = 2; + num6 = -1; + } + for (int index3 = num4; index3 != num5; index3 += num6) + { + Tile tile = Main.tile[index3, index1]; + if (tile.liquid > (byte) 0) + { + int num7 = -num6; + bool flag1 = false; + int x = index3; + int y = index1; + byte num8 = tile.liquidType(); + bool flag2 = tile.lava(); + bool flag3 = tile.honey(); + byte liquid = tile.liquid; + tile.liquid = (byte) 0; + bool flag4 = true; + int num9 = 0; + while (flag4 && x > 3 && x < Main.maxTilesX - 3 && y < Main.maxTilesY - 3) + { + flag4 = false; + while (Main.tile[x, y + 1].liquid == (byte) 0 && y < Main.maxTilesY - 5 && (!Main.tile[x, y + 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y + 1].type] || Main.tileSolidTop[(int) Main.tile[x, y + 1].type])) + { + flag1 = true; + num7 = num6; + num9 = 0; + flag4 = true; + ++y; + if (y > WorldGen.waterLine && WorldGen.gen && !flag3) + num8 = (byte) 1; + } + if (Main.tile[x, y + 1].liquid > (byte) 0 && Main.tile[x, y + 1].liquid < byte.MaxValue && (int) Main.tile[x, y + 1].liquidType() == (int) num8) + { + int num10 = (int) byte.MaxValue - (int) Main.tile[x, y + 1].liquid; + if (num10 > (int) liquid) + num10 = (int) liquid; + Main.tile[x, y + 1].liquid += (byte) num10; + liquid -= (byte) num10; + if (liquid == (byte) 0) + { + ++num1; + break; + } + } + if (num9 == 0) + { + if (Main.tile[x + num7, y].liquid == (byte) 0 && (!Main.tile[x + num7, y].nactive() || !Main.tileSolid[(int) Main.tile[x + num7, y].type] || Main.tileSolidTop[(int) Main.tile[x + num7, y].type])) + num9 = num7; + else if (Main.tile[x - num7, y].liquid == (byte) 0 && (!Main.tile[x - num7, y].nactive() || !Main.tileSolid[(int) Main.tile[x - num7, y].type] || Main.tileSolidTop[(int) Main.tile[x - num7, y].type])) + num9 = -num7; + } + if (num9 != 0 && Main.tile[x + num9, y].liquid == (byte) 0 && (!Main.tile[x + num9, y].nactive() || !Main.tileSolid[(int) Main.tile[x + num9, y].type] || Main.tileSolidTop[(int) Main.tile[x + num9, y].type])) + { + flag4 = true; + x += num9; + } + if (flag1 && !flag4) + { + flag1 = false; + flag4 = true; + num7 = -num6; + num9 = 0; + } + } + if (index3 != x && index1 != y) + ++num1; + Main.tile[x, y].liquid = liquid; + Main.tile[x, y].liquidType((int) num8); + if (Main.tile[x - 1, y].liquid > (byte) 0 && Main.tile[x - 1, y].lava() != flag2) + { + if (flag2) + 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() != flag2) + { + if (flag2) + 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() != flag2) + { + if (flag2) + 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() != flag2) + { + if (flag2) + Liquid.LavaCheck(x, y); + else + Liquid.LavaCheck(x, y + 1); + } + if (Main.tile[x, y].liquid > (byte) 0) + { + if (Main.tile[x - 1, y].liquid > (byte) 0 && Main.tile[x - 1, y].honey() != flag3) + { + if (flag3) + 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() != flag3) + { + if (flag3) + 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() != flag3) + { + if (flag3) + 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() != flag3) + { + if (flag3) + Liquid.HoneyCheck(x, y); + else + Liquid.HoneyCheck(x, y + 1); + } + } + } + } + } + } + return (double) num1; + } + + 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 = 9; + } + else + { + byte liquid = tile5.liquid; + if (this.y > Main.maxTilesY - 200 && 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 = 9; + } + 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) + { + float num = (float) ((int) byte.MaxValue - (int) tile4.liquid); + if ((double) num > (double) tile5.liquid) + num = (float) tile5.liquid; + 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 (tile5.liquid > (byte) 250) + { + tile5.liquid = byte.MaxValue; + } + else + { + 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 (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 + 0.001); + 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 + 0.001); + 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 + 0.001); + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num8) + tile1.liquid = (byte) num8; + if ((int) tile5.liquid != (int) (byte) num8 || (int) tile1.liquid != (int) (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; + if ((int) tile5.liquid != (int) (byte) num8 || (int) tile2.liquid != (int) (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 + 0.001); + 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 + 0.001); + 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) + { + tile5.liquid = byte.MaxValue; + ++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 netMode1 = Main.netMode; + if (!WorldGen.gen) + { + if (!Liquid.panicMode) + { + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > 4000) + { + ++Liquid.panicCounter; + if (Liquid.panicCounter > 1800 || Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > 13500) + Liquid.StartPanic(); + } + else + Liquid.panicCounter = 0; + } + if (Liquid.panicMode) + { + int num = 0; + while (Liquid.panicY >= 3 && num < 5) + { + ++num; + 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; + } + } + Liquid.quickFall = Liquid.quickSettle || Liquid.numLiquid > 2000; + ++Liquid.wetCounter; + int num1 = Liquid.maxLiquid / Liquid.cycles; + int num2 = num1 * (Liquid.wetCounter - 1); + int num3 = num1 * Liquid.wetCounter; + if (Liquid.wetCounter == Liquid.cycles) + num3 = Liquid.numLiquid; + if (num3 > Liquid.numLiquid) + { + num3 = Liquid.numLiquid; + int netMode2 = Main.netMode; + Liquid.wetCounter = Liquid.cycles; + } + if (Liquid.quickFall) + { + for (int index = num2; index < num3; ++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 = num2; index < num3; ++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 > 4) + Liquid.DelWater(l); + } + int num4 = Liquid.maxLiquid - (Liquid.maxLiquid - Liquid.numLiquid); + if (num4 > LiquidBuffer.numLiquidBuffer) + num4 = LiquidBuffer.numLiquidBuffer; + for (int index = 0; index < num4; ++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) + return; + Utils.Swap>(ref Liquid._netChangeSet, ref Liquid._swapNetChangeSet); + NetManager.Instance.Broadcast(NetLiquidModule.Serialize(Liquid._swapNetChangeSet)); + Liquid._swapNetChangeSet.Clear(); + } + + 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) + return; + if (Liquid.numLiquid >= Liquid.maxLiquid - 1) + { + LiquidBuffer.AddBuffer(x, y); + } + else + { + checkTile.checkingLiquid(true); + Main.liquid[Liquid.numLiquid].kill = 0; + Main.liquid[Liquid.numLiquid].x = x; + Main.liquid[Liquid.numLiquid].y = y; + Main.liquid[Liquid.numLiquid].delay = 0; + checkTile.skipLiquid(false); + ++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)); + } + } + + public static void LavaCheck(int x, int 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 + 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 (tile5.active()) + return; + tile5.liquid = (byte) 0; + tile5.lava(false); + if (type == 56) + Main.PlaySound(SoundID.LiquidsWaterLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + Main.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.ForceObsidianKill[(int) tile5.type] && !TileID.Sets.ForceObsidianKill[(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 + { + int type = 56; + if (tile4.honey()) + type = 230; + tile5.liquid = (byte) 0; + tile5.lava(false); + tile4.liquid = (byte) 0; + if (type == 56) + Main.PlaySound(SoundID.LiquidsWaterLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + Main.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) + { + 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) + Main.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + Main.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) + Main.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + Main.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.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 && Main.tile[x + 1, y + 1].liquid < (byte) 250 && !Main.tile[x + 1, y + 1].active() || tile1.liquid > (byte) 0 && Main.tile[x - 1, y + 1].liquid < (byte) 250 && !Main.tile[x - 1, y + 1].active()) + { + Liquid.AddWater(x - 1, y); + 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) 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]) + return; + WorldGen.CheckAlch(x, y); + } + } +} diff --git a/LiquidBuffer.cs b/LiquidBuffer.cs new file mode 100644 index 0000000..ebf63a1 --- /dev/null +++ b/LiquidBuffer.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.LiquidBuffer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public class LiquidBuffer + { + public const int maxLiquidBuffer = 10000; + public static int numLiquidBuffer; + public int x; + public int y; + + public static void AddBuffer(int x, int y) + { + if (LiquidBuffer.numLiquidBuffer == 9999 || 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..11ef502 --- /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", + "50": "Terraria: Und probier auch Edge of Space aus!", + "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_Description": "Erhalte so viel Gesundheit und Mana wie nur möglich ohne Accessoires oder Buffs.", + "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_Description": "Besiege den Weltenfresser, ein massiver Wurm, der im Verderben lebt.", + "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", + "SetInitialMaxPlayers": "Max. Spieler (drücke Eingabe für 8): ", + "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.", + "CaptureError": "Ein Fehler ist beim Speichern aufgetreten. Neuer Versuch ...", + "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" + }, + "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", + "CraftingWindow": "Herstellungsfenster", + "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", + "QuickStackToNearby": "Schnellstapeln in nahen Truhen", + "Rain": "Regen", + "RulerOff": "Lineal AUS", + "RulerOn": "Lineal EIN", + "SettingsMenu": "Einstellungsmenü", + "SortInventory": "Inventar sortieren", + "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", + "NormalDescription": "(Die typische Terraria-Erfahrung)", + "NormalDescriptionFlavor": "Deine Reise beginnt ...", + "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": "..." + }, + "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_2": "{0} kann nicht wieder heile gemacht werden.", + "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)" + } +} \ 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..6f319cb --- /dev/null +++ b/Localization/Content/de-DE/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "Um 20% reduzierte Mananutzung", + "HallowMelee": "Um 19% erhöhtes Nahkampf-und Bewegungstempo", + "HallowRanged": "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", + "Turtle": "Angreifer stecken außerdem vollen Schaden ein", + "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%", + "Bone": "20% Chance, keine Munition zu verbrauchen", + "Spider": "Erhöht Günstlingschaden um 12%", + "Ninja": "33% Chance, einen geworfenen Gegenstand nicht zu verbrauchen", + "Fossil": "50% Chance, einen geworfenen Gegenstand nicht zu verbrauchen", + "Solar": "Nach und nach werden Sonnenschilde erstellt, die dich beschützen.\nDu kannst sie verbrauchen, um zu sprinten und Gegner Schaden zuzufügen.", + "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.", + "Nebula": "Wenn du Feinden weh tust, hast du die Chance, Buff-Booster zu spawnen.\nHebe sie auf, um gestapelte Buffs zu erhalten.", + "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", + "Calm": "Verringerte Gegneraggression", + "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", + "Fishing": "Verbesserter Angellevel", + "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", + "PetParrot": "Polly will Keks haben", + "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", + "WellFed": "Geringe Verbesserung aller Werte", + "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" + }, + "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", + "ShadowDodge": "Schattenausweichung", + "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" + }, + "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" + } +} \ 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..c6e1aba --- /dev/null +++ b/Localization/Content/de-DE/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Lila Mukus", + "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", + "OilRagSconse": "Öllumpenhalter", + "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", + "FrozenChest": "Gefrorene 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)", + "MusicBoxSpace": "Spieluhr (Weltall)", + "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)", + "MusicBoxOcean": "Spieluhr (Ozean)", + "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", + "ZombieEskimoBanner": "Zombieeskimobanner", + "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", + "SpookyPlatform": "Schaurige Klappe", + "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", + "AmanitiaFungifin": "Amanitia-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", + "BlueCultistCasterBanner": "Blauer-Kultistenmagier-Banner", + "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", + "IceChest": "Eistruhe", + "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", + "EskimoHood": "Eskimokapuze", + "EskimoCoat": "Eskimomantel", + "EskimoPants": "Eskimohose", + "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", + "PinkEskimoHood": "Rosa Eskimokapuze", + "PinkEskimoCoat": "Rosa Eskimomantel", + "Minishark": "Minihai", + "PinkEskimoPants": "Rosa Eskimohose", + "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", + "AncientCultistTrophy": "Uralte Kultistentrophäe", + "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", + "BossMaskCultist": "Uralte Kultistenmaske", + "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", + "DevDye": "Skiphs Blut", + "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_FrozenChest": "Gefangen Gefrorene Truhe", + "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_IceChest": "Gefangen Eistruhe", + "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", + "SandFallBlock": "Sandstrom", + "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", + "SkiphsHelm": "Skiphs Maske", + "SkiphsPants": "Skiphs Bärenstiefel", + "SkiphsShirt": "Skiphs Oberkörper", + "SkiphsWings": "Skiphs Pratzen", + "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", + "SnowFallBlock": "Schneefall", + "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", + "UltraBrightCampfire": "Ultrahelles Lagerfeuer", + "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", + "DynastyPlatform": "Dynastieklappe", + "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", + "ArkhalisHat": "Arkhalis Kapuze", + "ArkhalisShirt": "Arkhalis Korsett", + "ArkhalisPants": "Arkhalis Strumpfhose", + "ArkhalisWings": "Arkhalis Lichtschwingen", + "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", + "PaintScraper": "Zum Entfernen von Farbe", + "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", + "HoneyComb": "Verströmt Bienen, wenn beschädigt", + "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", + "PygmyNecklace": "Erhöht die maximale Anzahl deiner Günstlinge", + "TikiMask": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 10%", + "TikiShirt": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 10%", + "TikiPants": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 10%", + "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", + "BeeCloak": "Lässt Sterne fallen und verströmt Bienen, wenn verletzt", + "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", + "FrozenTurtleShell": "Hüllt den Besitzer in einen Panzer, der Schaden reduziert, wenn die Lebenspunkte unter 50% sinken", + "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", + "Stynger": "Verschießt einen explosiven Bolzen", + "FlowerPow": "Verschießt rasiermesserscharfe Blütenblätter auf Gegner in der Nähe", + "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%", + "PanicNecklace": "Erhöht Bewegungstempo nach Treffer", + "LifeFruit": "Erhöht die maximalen Lebenspunkte um 5", + "LihzahrdPowerCell": "Wird am Lihzahrdaltar verwendet", + "Picksaw": "Du kannst Lihzahrdziegel abbauen", + "HeatRay": "Verschießt einen durchdringenden Hitzestrahl\n'Oolaa!!'", + "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", + "MagicQuiver": "Erhöht Schaden um 10% und erhöht Pfeilgeschwindigkeit stark\n20%ige Chance, keinen Pfeil zu verwenden", + "MagmaStone": "Richtet beim Angriff Feuerschaden an", + "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", + "FireGauntlet": "Erhöht Nahkampf-Rückstoß und richtet beim Angriff Feuerschaden an\nUm 10% erhöhter Nahkampfschaden und -geschwindigkeit", + "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", + "FrozenKey": "Öffnet eine Gefrorene Truhe im Verlies", + "SpectrePaintbrush": "Verwendet mit Farbe, um Blöcke anzumalen", + "SpectrePaintRoller": "Verwendet mit Farbe, um Wände anzumalen", + "SpectrePaintScraper": "Zum Entfernen von Farbe", + "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", + "ShroomiteBreastplate": "Um 13% erhöhte kritische Fernkampf-Trefferchance\n20% Chance, keine Munition zu verbrauchen", + "ShroomiteLeggings": "Um 7% erhöhte kritische Fernkampf-Trefferchance\nUm 12% erhöhte Bewegungsgeschwindigkeit", + "Autohammer": "Verwandelt Grünalgenbarren in Pilzmitbarren", + "SDMG": "50% Chance, keine Munition zu verbrauchen\n‚Es kam vom Rand des Weltraums‘", + "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", + "StaffoftheFrostHydra": "Beschwört eine mächtige Frosthydra, die Eis auf deine Gegner spuckt", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Eine kleine Explosion, die einige Felder zerstören wird", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 11%", + "SpookyBreastplate": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 11%", + "SpookyLeggings": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 11%", + "CursedSapling": "Beschwört einen verwünschten Schößling, der dir folgt", + "PumpkinMoonMedallion": "Beschwört den Kürbismond", + "NecromanticScroll": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 10%", + "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", + "FrostsparkBoots": "Erlaubt Fliegen, superschnelles Rennen und sorgt für bessere Beweglichkeit auf Eis\nUm 7% erhöhte Bewegungsgeschwindigkeit", + "FartInABalloon": "Ermöglicht einen Doppelsprung\nVergrößert die Sprunghöhe", + "PapyrusScarab": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Schaden und Rückstoß deiner Günstline", + "CelestialStone": "Leichte Erhöhung bei Schaden, Nahkampfgeschwindigkeit, Chance auf kritischen Treffer,\nLebensregeneration, Verteidigung, Einsammelgeschwindigkeit und Günstling-Rückstoß", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nNach UNTEN und SPRINGEN halten zum Schweben", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Beschwört ein Rentier zum Reiten", + "CnadyCanePickaxe": "Kann Meteorite abbauen", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Macht immun gegen Kälte- und Einfriereffekte", + "Coal": "‚Du warst unartig dieses Jahr.‘", + "Toolbox": "Erhöht Itemplatzierung und Werkzeugreichweite um 1", + "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", + "StaffofRegrowth": "Lässt Gras und Moos auf Schmutz und Steinen wachsen\nErhöht Sammlung von alchemistischen Pflanzen, wenn es zum Sammeln benutzt wird", + "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", + "ExtendoGrip": "Erhöht Feldreichweite", + "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", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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.‘", + "GoldenCarp": "So glänzend. Verkauft sich vermutlich gut.", + "MiningPotion": "Erhöht Abbautempo um 25%", + "HeartreachPotion": "Erhöht Einsammelreichweite bei Lebensherzen", + "CalmingPotion": "Verringerte Gegneraggression", + "BuilderPotion": "Platzierungstempo und Reichweite erhöht", + "TitanPotion": "Verbesserter Rückstoß", + "FlipperPotion": "Lässt dich in Flüssigkeit schneller vorankommen", + "SummoningPotion": "Erhöht die maximale Anzahl deiner Günstlinge", + "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%", + "StickyBomb": "‚Werfen könnte schwer werden.‘", + "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", + "FishingPotion": "Verbessert Angelfähigkeit", + "SonarPotion": "Entdeckt Fisch am Haken", + "CratePotion": "Erhöht Chance auf Kiste", + "WarmthPotion": "Verringert Schaden aus kalten Quellen", + "BeeHeadgear": "Erhöht Günstlingschaden um 4%\nErhöht die maximale Anzahl deiner Günstlinge", + "BeeBreastplate": "Erhöht Günstlingschaden um 4%\nErhöht die maximale Anzahl deiner Günstlinge", + "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", + "AnglerHat": "Verbessert Angellevel", + "AnglerVest": "Verbessert Angellevel", + "AnglerPants": "Verbessert Angellevel", + "Sunglasses": "‚Lässt dich cool aussehen!‘", + "SpiderMask": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 6%", + "SpiderBreastplate": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 6%", + "SpiderGreaves": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 6%", + "HighTestFishingLine": "Angelschnur reißt nie", + "AnglerEarring": "Verbessert Angelfähigkeit", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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‘", + "GoldenKey": "Öffnet eine Gold- oder Verliestruhe", + "ShadowKey": "Öffnet alle Schattentruhen", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "Kann Verwirrung stiften\n‚Finde deine inneren Stück‘", + "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", + "Toolbelt": "Erweitert den Platzierbereich von Blöcken", + "HolyWater": "Verbreitet Heil auf einige Blöcke", + "UnholyWater": "Verbreitet Verderben auf einige Blöcke", + "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", + "Ruler": "Zeigt Linien auf dem Bildschirm zum Platzieren der Blöcke", + "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!‘", + "DarkShard": "‚Kreaturen in verderbten Wüsten tragen sie mitunter‘", + "LightShard": "‚Werden mitunter von Kreaturen in Lichtwüsten getragen‘", + "RedPressurePlate": "Wird beim Drauftreten aktiviert", + "CloudinaBottle": "Ermöglicht einen Doppelsprung", + "SpellTome": "Kann verzaubert werden", + "StarCloak": "Lässt Sterne bei Verletzung herabfallen", + "Megashark": "50% Chance, keine Munition zu verbrauchen\n'Minihais großer Bruder'", + "Shotgun": "Feuert einen Kugelregen ab", + "PhilosophersStone": "Verringert die Abklingzeit von Heiltränken", + "TitanGlove": "Erhöht Nahkampf-Rückstoß", + "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", + "MechanicalWorm": "Ruft den Zerstörer", + "MechanicalSkull": "Ruft Skeletron Prime herbei", + "HallowedHeadgear": "Erhöht das Höchstmana um 100\nUm 12% erhöhter Magieschaden und Chance auf kritischen Treffer", + "HallowedMask": "Um 10% erhöhter Nahkampfschaden und Chance auf kritischen Treffer\nUm 10% erhöhte Nahkampfgeschwindigkeit", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Beschwört einen Babypinguin", + "VilePowder": "Verbannt das Heilige", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nNach OBEN gedrückt halten, um schneller zu steigen", + "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", + "DiscountCard": "Läden haben günstigere Preise", + "LuckyCoin": "Angegriffene Gegner lassen mehr Münzen fallen", + "UnicornonaStick": "‚Ich habe einen Riesenspaß!‘", + "SandstorminaBottle": "Ermöglicht einen verbesserten Doppelsprung", + "CharmofMyths": "Bietet Lebensregeneration und verringert die Abklingzeit von Heiltränken", + "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", + "WaterWalkingBoots": "Befähigt, auf dem Wasser zu gehen", + "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", + "PowerGlove": "Erhöht Nahkampf-Rückstoß\nUm 12% erhöhtes Nahkampftempo", + "LightningBoots": "Lässt dich fliegen\nDer Träger kann superschnell rennen", + "SunStone": "Erhöht alle Werte, wenn tagsüber getragen", + "MoonStone": "Erhöht alle Werte, wenn nachts getragen", + "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", + "ObsidianWaterWalkingBoots": "Befähigt, auf dem Wasser zu gehen\nMacht immun gegen Feuer-Blöcke", + "LavaWaders": "Befähigt, auf dem Wasser und auf Lava zu gehen\nMacht immun gegen Feuerblöcke und 7 Sekunden lang gegen Lava", + "BoneWand": "Platziert Knochen", + "LeafWand": "Platziert Blätter", + "FlyingCarpet": "Gestattet es dem Besitzer, ein paar Sekunden zu schweben", + "AvengerEmblem": "Um 12% erhöhter Schaden", + "MechanicalGlove": "Erhöht Nahkampf-Rückstoß\nUm 12% erhöhter Schaden und Nahkampfgeschwindigkeit", + "LandMine": "Explodiert beim Drauftreten", + "PaladinsShield": "Absorbiert 25% Schaden, der Spielern in deiner Gruppe zugefügt wird\nNur aktiv bei mehr als 25% Leben", + "Umbrella": "Du fällst langsamer, wenn du das hältst", + "ChlorophyteOre": "Reagiert auf Licht", + "SteampunkWings": "Ermöglicht Flug und langsames Fallen", + "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!", + "CookedMarshmallow": "{$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", + "Extractinator": "Verwandelt Schlick/Schlacke/Fossilien in etwas Nützliches\n‚Anleitung: Schlick/Schlacke/Fossilien in den Extraktinator geben‘", + "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", + "AncientBattleArmorPants": "Erhöht die maximale Anzahl deiner Günstlinge", + "AncientBattleArmorShirt": "Erhöht das Höchstmana um 80", + "AncientHorn": "Beschwört einen Basilisken zum Reiten", + "AnglerTackleBag": "Angelschnur reißt nie, verringert Chance, dass Köder verbraucht wird, erhöht Angelfähigkeit", + "ArchitectGizmoPack": "Erhöht Feld- und Wandplatzierungsgeschwindigkeit und -reichweite\nPlatzierte Gegenstände werden automatisch angemalt", + "AviatorSunglasses": "Ruf deinen inneren Flügelmann\n‚Toll, wenn man sich als Wimpel ausgeben will!‘", + "Bacon": "{$CommonItemTooltip.MinorStats}\n'Bacon? Bacon.'", + "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.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nDie Walküren-Satellitenbarrierenklappe ist total sicher. Meistens.", + "BewitchingTable": ", um mehr Günstlinge zu erhalten", + "Bladetongue": "Speit bei Kontakt einen Ichorstrahl", + "BlessedApple": "Beschwört ein Einhorn zum Reiten", + "BloodWater": "Verbreitet Purpur auf einige Blöcke", + "BombFish": "Eine kleine Explosion, die einige Felder zerstören wird", + "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", + "BottomlessBucket": "Enthält eine endlose Menge Wasser", + "BouncyBomb": "Eine kleine Explosion, die einige Felder zerstören wird\nSehr federnd", + "BouncyDynamite": "‚Das wird sich als schreckliche Idee rausstellen‘", + "BouncyGlowstick": "Funktioniert bei Nässe", + "BouncyGrenade": "Eine kleine Explosion, die keine Felder zerstört\nSehr federnd", + "BrainOfConfusion": "Kann Feinde in der Nähe verwirren, wenn sie getroffen wurden", + "BrainScrambler": "Beschwört ein Scutlix zum Reiten", + "BubbleGun": "Verschießt starke Blasen schnell nacheinander", + "ButchersChainsaw": "Getroffene Feinde versprühen Funken", + "CelestialShell": "Verwandelt den Besitzer nachts in einen Werwolf und beim Hineingehen ins Wasser in einen Meermenschen\nGeringe Verbesserung aller Werte", + "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", + "FossilHelm": "Wurfgeschwindigkeit erhöht um 20%", + "FossilPants": "Kritische Trefferchance beim Werfen um 15% erhöht", + "FossilShirt": "Wurfschaden erhöht um 20%", + "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", + "GreedyRing": "Erhöht die Münzsammelreichweite und Läden haben bessere Preise\nAngegriffene Gegner lassen mehr Münzen fallen", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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 ...", + "LokisWings": "{$CommonItemTooltip.DevItem}\nMögen deine Plände dunkel und undurchdringbar wie die Nacht sein, und wenn du dich bewegst, fallen sie herab wie Blitze.", + "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 ...‘", + "MoonlordTurretStaff": "Beschwört ein Mondportal, das Laserstrahlen auf deine Feinde schießt", + "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", + "NinjaHood": "Wurfgeschwindigkeit erhöht um 15%", + "NinjaPants": "Kritische Trefferchance beim Werfen um 10% erhöht", + "NinjaShirt": "Wurfschaden erhöht um 15%", + "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", + "QueenSpiderStaff": "Beschwört eine Spinnenkönigin, die Eier auf deine Feinde speit", + "Radar": "Erkennt Feinde um dich herum", + "RainbowCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "RainbowCrystalStaff": "Beschwört einen hellen Kristall, der deine Feinde verbannt\n‚Die Farben, Herzog, die Farben!‘", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Rein in den Mund. Rein in den Mund von jemand anderem. Whatever.", + "SlimeGun": "Versprüht einen harmlosen Schleimstrahl", + "SlimySaddle": "Beschwört einen Schleim zum Reiten", + "SnowCloudBlock": "Da oben wir es ziemlich kalt", + "SnowFallBlock": "Sehr viel kälter als eine Schneekugel", + "SnowFallWall": "Sehr viel kälter als eine Schneekugel", + "SolarEruption": "‚Schlage mit dem Zorn der Sonne zu‘", + "SolarFlareBreastplate": "Um 22% erhöhter Nahkampfschaden\nFeinde greifen dich eher an", + "SolarFlareHelmet": "Um 17% erhöhte kritische Nahkampf-Trefferchance\nFeinde greifen dich eher an", + "SolarFlareLeggings": "Um 15% erhöhte Bewegungs- und Nahkampfgeschwindigkeit\nFeinde greifen dich eher an", + "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", + "StardustBreastplate": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 22%", + "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?‘", + "StardustHelmet": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 22%", + "StardustLeggings": "Erhöht die maximale Anzahl deiner Günstlinge\nErhöht Günstlingschaden um 22%", + "StardustMonolith": "‚Du verfügst über eine kleine Menge Macht vom Sternenstaubturm‘", + "StickyDynamite": "‚Werfen könnte schwer werden.‘", + "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}", + "ViciousPowder": "Verbannt das Heilige", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nWas auch immer dieses Accessoire mit dir macht ist kein Bug!", + "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}", + "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 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}", + "ApprenticeAltHead": "Erhöht die Höchstanzahl deiner Wächter\nUm 10% erhöhter Günstling- & Magieschaden ", + "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", + "ApprenticeHat": "Erhöht die Höchstanzahl deiner Wächter und verringert Manakosten um 10%", + "ApprenticeRobe": "Um 20% erhöhter Günstlingschaden und 10% erhöhter Magieschaden", + "ApprenticeStaffT3": "Versprüht Verteidigung, die einen üblen Geruch verströmt", + "ApprenticeTrousers": "Um 10% erhöhter Günstlingschaden und 20% erhöhte Bewegungsgeschwindigkeit", + "BookStaff": "Da fragt man sich, wer ein Buch des unendlichen Wissens auf einen Stock gesteckt hat ...\n, um einen mächtigen Tornado zu zaubern", + "DD2BallistraTowerT1Popper": "Ein langsamer Turm, der jedoch hohen Schaden mit durchbohrenden Bolzen verursacht\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Eine Falle, die explodiert, wenn Feinde in die Nähe kommen\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Ein Turm mit durchschnittlicher Geschwindigkeit, der explodierende Feuerbälle verschießt\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Eine Aura, die Feinden, die hineingelangen, einen Stromstoß verpasst\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Erhöht die Höchstanzahl deiner Wächter\nUm 10% erhöhter Günstlingsschaden und kritische Fernkampfchance", + "HuntressAltPants": "Um 25% erhöhter Günstlingschaden und 20% erhöhte Bewegungsgeschwindigkeit", + "HuntressAltShirt": "Um 25% erhöhter Günstlings- & Fernkampfschaden", + "HuntressBuckler": "Erhöht die Höchstanzahl deiner Wächter\nErhöht Günstlingsschaden um 10%", + "HuntressJerkin": "Um 20% erhöhter Günstlings- und Fernkampfschaden", + "HuntressPants": "Um 10% erhöhter Günstlingschaden und 20% erhöhte Bewegungsgeschwindigkeit", + "HuntressWig": "Erhöht die Höchstanzahl deiner Wächter und erhöht die kritische Fernkampfchance um 10%", + "MonkAltHead": "Erhöht die Höchstanzahl deiner Wächter und erhöht Nahkampf- & Günstlingschaden um 20%", + "MonkAltPants": "Um 20% erhöhter Günstlingschaden, Bewegungsgeschwindigkeit und kritische Nahkampfchance", + "MonkAltShirt": "Um 20% erhöhter Günstlingschaden und Nahkampfgeschwindigkeit", + "MonkBrows": "Erhöht die Höchstanzahl deiner Wächter und erhöht die Angriffsgeschwindigkeit für Nahkampf um 20%", + "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!", + "SquireAltHead": "Erhöht die Höchstanzahl deiner Wächter und gibt dir 10% Günstlingsschaden", + "SquireAltPants": "Um 20% erhöhter Günstlingsschaden, kritische Angriffschance und um 30% erhöhte Bewegungsgeschwindigkeit", + "SquireAltShirt": "Um 30% erhöhter Günstlingschaden und massiv erhöhte Lebensregeneration", + "SquireGreatHelm": "Erhöht die Höchstanzahl deiner Wächter und erhöht deine Lebensregeneration", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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?‘", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'Mitten drauf! Was soll das überhaupt bedeuten?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n‚Beste Ergebnisse erzielt man in Kombination mit einer Pastadiät‘" + }, + "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", + "MinorStats": "Geringe Verbesserung aller Werte", + "BannerBonus": "Spieler in der Nähe erhalten einen Bonus gegen: ", + "Counterweight": "Wirft ein Gegengewicht, nachdem er einen Feind mit einem Jo-jo getroffen hat", + "EtherianManaCost10": "Verwende 10 etherische Mana, um mehr als einen zu beschwören", + "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..6c8815a --- /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", + "3": "Dreck wird hinter Dreck geschoben", + "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!", + "76": "Strukturen werden erstellt.", + "77": "Mehr Gras hinzufügen", + "78": "Wüstifizierung", + "79": "Wände erhalten etwas Pepp", + "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.", + "17": "Achte auf den Preis, kaufe eine Linse!", + "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.", + "187": "Ambosse können aus Eisen hergestellt oder von einem Händler gekauft werden.", + "188": "Im Untergrund findest du Kristallherzen, mit denen du deine maximale Lebensspanne erhöhen kannst. Du kannst sie mit der Spitzhacke zerschlagen.", + "189": "Wenn du 5 Sternschnuppen gesammelt hast, kannst du daraus Items herstellen, die deine magischen Kapazitäten erhöhen", + "19": "{PlayerName}, richtig? Ich habe nur Gutes über dich gehört!", + "190": "Sterne fallen nachts auf der ganzen Welt herunter. Sie können für alle möglichen nützlichen Dinge verwendet werden. Wenn du einen erspäht hast, dann greif ihn dir schnell - sie verschwinden nach Sonnenaufgang.", + "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", + "207": "Du kannst einen Greifhaken aus einem Haken und 3 Ketten herstellen. Die Skelette tief im Untergrund tragen gewöhnlich Haken bei sich. Die Ketten dazu können aus Eisenbarren gefertigt werden.", + "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", + "403": "Mit Wirbeln kannst du eine Blutige Wirbelsäule herstellen. Achte aber darauf, dass du dich vor der Verwendung in einem purpurnen Gebiet befindest.", + "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?", + "71": "Warum versucht {Merchant}, mir Engelsstatuen zu verkaufen? Jeder weiß, dass sie nutzlos sind.", + "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", + "216": "Smarte Blockplatzierung: Auffüllen", + "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", + "29": "Hardcore-Charaktere bleiben tot", + "2": "Trennen", + "30": "Mediumcore-Charaktere lassen beim Sterben Beute zurück", + "31": "Softcore-Charaktere lassen beim Sterben Geld zurück", + "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.", + "1": "Falsches Passwort.", + "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!", + "85": "Insekt", + "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", + "11": "Eistruhe", + "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", + "22": "Gefrorene Truhe", + "23": "Verschlossene Dschungeltruhe", + "24": "Verschlossene Verdorbene Truhe", + "25": "Verschlossene Purpur-Truhe", + "26": "Verschlossene Heilige Truhe", + "27": "Verschlossene Gefrorene 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}" + }, + "LegacyChestType2": { + "0": "Kristalltruhe", + "1": "Goldene Truhe" + } +} \ 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..1781a0f --- /dev/null +++ b/Localization/Content/de-DE/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Zombieeskimo", + "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", + "CultistArcherBlue": "Blauer-Kultistenbogenschütze", + "Demolitionist": "Sprengmeister", + "CultistArcherWhite": "Weißer-Kultistenbogenschütze", + "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", + "ArmedZombieEskimo": "Zombieeskimo", + "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", + "CrimsonBunny": "Purpurtan-Häschen", + "CrimsonGoldfish": "Purpurtan-Goldfisch", + "CrimsonPenguin": "Böser Pinguin", + "CultistBoss": "Irrer Kultist", + "CultistBossClone": "Irrer Kultist", + "CultistDevote": "Irrer Anhänger", + "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", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Schattenflammenerscheinung", + "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", + "WalkingAntlion": "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..13d9f44 --- /dev/null +++ b/Localization/Content/de-DE/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..f79edb8 --- /dev/null +++ b/Localization/Content/de-DE/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "Ich brauch dringend etwas Geburtstags-Text, Yorai!", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Alle sagen, sie mögen mehrstöckige Torten, deswegen haben meine einen Fahrstuhl gekriegt." + }, + "CyborgSpecialText": { + "Party": "Die Party wird der Hammer! Oder sogar der Meißel!" + }, + "SantaClausSpecialText": { + "Party": "Komm schon, du glaubst doch nicht, dass ich nur Weihnachten feiere, oder?" + }, + "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_Dirtfish": "Ich war gerade dabei, den großen Dicken an Land zu ziehen, als dieser seltsam sprechende Zombie aus dem Waldsee gesprungen kam und anfing, von dieser 'furchterregenden' Fischart aus Schmutz zu faseln. Er sagte, er könne zehn Typen seiner Größe ersticken oder so ... Ich will ihn! SOFORT!\n\n(Gefangen auf der Oberfläche, Untergrund & Höhlen)", + "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_AmanitiaFungifin": "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_Slimefish": "Im Wald ist der Schleim ganz schön bäh! Schleimfische sind sogar noch bähiger! Ich will mich nicht vollschleimen lassen, also stibitz einen aus dem Wasser für mich!\n\n(Irgendwo 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..e054cec --- /dev/null +++ b/Localization/Content/en-US.json @@ -0,0 +1,698 @@ +{ + "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 occured 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.", + "SetInitialMaxPlayers": "Max players (press enter for 8): ", + "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}" + }, + "UI": { + "Effects": "Effects", + "LoadingCode": "Loading:", + "Favorite": "Favorite", + "Unfavorite": "Unfavorite", + "MoveToCloud": "Move to cloud", + "MoveOffCloud": "Move off cloud", + "Play": "Play", + "Delete": "Delete", + "Softcore": "Softcore", + "Mediumcore": "Mediumcore", + "Hardcore": "Hardcore", + "Expert": "Expert", + "Normal": "Normal", + "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 Journey 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": "..." + }, + "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." + }, + "GameUI": { + "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", + "SettingsMenu": "Settings Menu", + "Buy": "Buy", + "BuyWithValue": "Buy ({0})", + "Cancel": "Cancel", + "Change": "Change", + "Expert": "Expert", + "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": "Normal", + "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" + }, + "Controls": { + "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}", + "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}", + "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" + }, + "Enemies": { + "TheTwins": "The Twins", + "MoonLord": "Moon Lord" + }, + "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 plead 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} cant be put back together again.", + "Petrified_3": "{0} needs to be swept up.", + "Petrified_4": "{0} just became another dirt pile." + }, + "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" + }, + "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.", + "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 whom 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 health 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 Edge of Space!", + "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!" + } +} \ 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..fa5d146 --- /dev/null +++ b/Localization/Content/en-US/Game.json @@ -0,0 +1,549 @@ +{ + "ChatCommand": { + "Party": "/p", + "Emote": "/me", + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}" + }, + "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" + }, + "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", + "WellFed": "Well Fed", + "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": "Shadow Dodge", + "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" + }, + "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", + "WellFed": "Minor improvements to all stats", + "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 want's 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": "Reduced enemy aggression", + "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 level", + "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" + }, + "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", + "HallowCaster": "20% reduced mana usage", + "HallowMelee": "19% increased melee and movement speed", + "HallowRanged": "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": "Become immune after striking an enemy", + "Chlorophyte": "Summons a powerful leaf crystal to shoot at nearby enemies", + "Wizard": "10% increased magic critical strike chance", + "Turtle": "Attackers also take full damage", + "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%", + "Bone": "20% chance to not consume ammo", + "Spider": "Increases minion damage by 12%", + "Ninja": "33% chance to not consume thrown item", + "Fossil": "50% chance to not consume thrown item", + "Solar": "Solar shields generate over time protecting you,\nconsume the shield power to dash, damaging enemies", + "Vortex": "Double tap {0} to toggle stealth,\nincreasing ranged ability and reducing chance for enemies to target you but slowing movement speed", + "Nebula": "Hurting enemies has a chance to spawn buff boosters,\npick boosters up to get stacking buffs", + "Stardust": "Double tap {0} to direct your guardian to a location", + "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" + } +} \ 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..41c235a --- /dev/null +++ b/Localization/Content/en-US/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "RightClickToOpen": " to open", + "MinorStats": "Minor improvements to all stats", + "EtherianManaCost10": "Use 10 Etherian Mana to summon more than one" + }, + "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'" + }, + "BuffDescription": { + "WellFed_Expert": "Minor 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", + "Unreal": "Unreal", + "Mythical": "Mythical", + "Terrible": "Terrible", + "Small": "Small" + }, + "ItemName": { + "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 Mucos", + "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": "Vertebrae", + "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 Sconse", + "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": "Frozen 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)", + "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)", + "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": "Zombie Eskimo 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 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", + "AmanitiaFungifin": "Amanitia 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": "Blue Cultist Caster 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": "Ice 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": "Eskimo Hood", + "EskimoCoat": "Eskimo Coat", + "EskimoPants": "Eskimo 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 Eskimo Hood", + "PinkEskimoCoat": "Pink Eskimo Coat", + "Minishark": "Minishark", + "PinkEskimoPants": "Pink Eskimo 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": "Ancient 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": "Ancient 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's 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 Frozen 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 Ice 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", + "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's Mask", + "SkiphsPants": "Skiphs's Bear Butt", + "SkiphsShirt": "Skiphs's Skin", + "SkiphsWings": "Skiphs's 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", + "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": "Ultra Bright 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 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's Hood", + "ArkhalisShirt": "Arkhalis's Bodice", + "ArkhalisPants": "Arkhalis's Tights", + "ArkhalisWings": "Arkhalis's 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}" + }, + "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", + "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 when damaged", + "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", + "TikiMask": "Increases your max number of minions\nIncreases minion damage by 10%", + "TikiShirt": "Increases your max number of minions\nIncreases minion damage by 10%", + "TikiPants": "Increases your max number of minions\nIncreases minion damage by 10%", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "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 when injured", + "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", + "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", + "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 being struck", + "LifeFruit": "Permanently increases maximum life by 5", + "LihzahrdPowerCell": "Used at the Lihzahrd Altar", + "Picksaw": "Capable of mining Lihzahrd Bricks", + "HeatRay": "Shoots a piercing 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 damage by 10% and greatly increases arrow speed\n20% chance to not consume arrows", + "MagmaStone": "Inflicts fire damage on attack", + "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", + "FireGauntlet": "Increases melee knockback and inflicts fire damage on attack\n10% increased melee damage and speed", + "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", + "NecroHelmet": "5% increased ranged damage.", + "PaladinsHammer": "A powerful returning hammer", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "5% increased ranged damage.", + "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", + "NecroGreaves": "5% increased ranged damage.", + "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 a Frozen Chest in the dungeon", + "SpectrePaintbrush": "Used with paint to color blocks", + "SpectrePaintRoller": "Used with paint to color walls", + "SpectrePaintScraper": "Used to remove paint", + "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 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": "50% 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": "Summons 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}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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 some 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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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\nIncreases minion damage by 11%", + "SpookyBreastplate": "Increases your max number of minions\nIncreases minion damage by 11%", + "SpookyLeggings": "Increases your max number of minions\nIncreases minion damage by 11%", + "CursedSapling": "Summons a cursed sapling to follow you", + "PumpkinMoonMedallion": "Summons the Pumpkin Moon", + "NecromanticScroll": "Increases your max number of minions\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\n7% increased movement speed", + "FartInABalloon": "Allows the holder to double jump\nIncreases jump height", + "PapyrusScarab": "Increases your max number of minions\nIncreases the damage and knockback of your minions", + "CelestialStone": "Minor increase to damage, melee speed, critical strike chance,\nlife regeneration, defense, pick speed, and minion knockback", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nHold DOWN and JUMP to hover", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Summons a rideable reindeer", + "CnadyCanePickaxe": "Can mine Meteorite", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Provides immunity to chill and freezing effects", + "Coal": "'You've been naughty this year'", + "Toolbox": "Increases item placement and 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 and moss on dirt and stone\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 tile reach", + "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", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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": "Reduces enemy aggression", + "BuilderPotion": "Increases placement speed and range", + "TitanPotion": "Increases knockback", + "FlipperPotion": "Lets you move swiftly in liquids", + "SummoningPotion": "Increases your max number of minions", + "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": "'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 skill", + "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", + "BeeBreastplate": "Increases minion damage by 4%\nIncreases your max number of minions", + "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 level", + "AnglerVest": "Increases fishing level", + "AnglerPants": "Increases fishing level", + "Sunglasses": "'Makes you look cool!'", + "SpiderMask": "Increases your max number of minions\nIncreases minion damage by 6%", + "SpiderBreastplate": "Increases your max number of minions\nIncreases minion damage by 6%", + "SpiderGreaves": "Increases your max number of minions\nIncreases minion damage by 6%", + "HighTestFishingLine": "Fishing line will never break", + "AnglerEarring": "Increases fishing skill", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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", + "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 Gold or Dungeon Chest", + "ShadowKey": "Opens all Shadow Chests", + "Furnace": "Used for smelting ore", + "Loom": "Used for crafting cloth", + "IronAnvil": "Used to craft items from metal bars", + "Keg": "Used for brewing ale", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "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", + "Ruler": "Creates measurement lines on screen for block placement", + "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 corrupt 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 when injured", + "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", + "TitanGlove": "Increases melee knockback", + "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 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 haste", + "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}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Summons a baby penguin", + "VilePowder": "Banishes the Hallow", + "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}\nHold UP to rocket faster", + "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 have lower prices", + "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", + "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", + "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", + "PowerGlove": "Increases melee knockback\n12% increased melee speed", + "LightningBoots": "Allows flight\nThe wearer can run incredibly fast", + "SunStone": "Increases all stats if worn during the day", + "MoonStone": "Increases all stats if worn during the night", + "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\nGrants immunity to fire blocks", + "LavaWaders": "Provides the ability to walk on water and 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", + "MechanicalGlove": "Increases melee knockback\n12% increased damage and melee speed", + "LandMine": "Explodes when stepped on", + "PaladinsShield": "Absorbs 25% of damage done to players on your team\nOnly active above 25% life", + "Umbrella": "You will fall slower while holding this", + "ChlorophyteOre": "'Reacts to the light'", + "SteampunkWings": "Allows flight and slowfall", + "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", + "AncientNecroHelmet": "5% increased ranged damage.", + "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", + "MarshmallowonaStick": "Roast it over a campfire!", + "CookedMarshmallow": "{$CommonItemTooltip.MinorStats}", + "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": "Turns silt/slush/fossils into something more useful\n'To use: Place silt/slush/fossils in the extractinator'", + "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 your max number of minions", + "AncientBattleArmorShirt": "Increases maximum mana by 80", + "AncientHorn": "Summons a rideable basilisk mount", + "AnglerTackleBag": "Fishing line will never break, Decreases chance of bait consumption, Increases fishing skill", + "ArchitectGizmoPack": "Increases tile and wall placement speed and reach\nAutomatically paints placed objects", + "AviatorSunglasses": "Enables your inner wingman\n'Great for impersonating streamers!'", + "Bacon": "{$CommonItemTooltip.MinorStats}\n'Bacon? Bacon.'", + "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}\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 some 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", + "BouncyBomb": "A small explosion that will destroy some tiles\nVery bouncy", + "BouncyDynamite": "'This will prove to be terrible idea'", + "BouncyGlowstick": "Works when wet", + "BouncyGrenade": "A small explosion that will not destroy tiles\nVery bouncy", + "BrainOfConfusion": "May 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 increases to all stats", + "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", + "FossilHelm": "20% increased throwing velocity", + "FossilPants": "15% increased throwing critical strike chance", + "FossilShirt": "20% increased throwing damage", + "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 have lower prices\nHitting enemies will sometimes drop extra coins", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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}", + "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}\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": "Summons 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", + "NinjaHood": "15% increased throwing velocity", + "NinjaPants": "10% increased throwing critical strike chance", + "NinjaShirt": "15% increased throwing damage", + "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": "Summons a spider queen to spit eggs at your enemies", + "Radar": "Detects enemies around you", + "RainbowCampfire": "Life regen is increased when near a campfire", + "RainbowCrystalStaff": "Summons 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", + "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}", + "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": "22% increased melee damage\nEnemies are more likely to target you", + "SolarFlareHelmet": "17% increased melee critical strike chance\nEnemies are more likely to target you", + "SolarFlareLeggings": "15% increased movement and melee speed\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\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\nIncreases minion damage by 22%", + "StardustLeggings": "Increases your max number of minions\nIncreases minion damage by 22%", + "StardustMonolith": "'Wield a small amount of power from the Stardust Tower'", + "StickyDynamite": "'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": "Banishes the Hallow", + "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", + "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}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}\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": "An average speed tower that shoots exploding fireballs\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT1Popper": "A slow but high damage tower that shoots piercing bolts\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT1Popper": "A trap that explodes when enemies come near\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT1Popper": "An 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 and reduces mana costs by 10%", + "ApprenticeRobe": "20% increased minion damage and 10% increased magic damage", + "ApprenticeTrousers": "10% increased minion damage and 20% increased movement speed", + "SquireGreatHelm": "Increases your max number of sentries 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 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 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\nIncreases minion damage by 10%", + "SquireAltHead": "Increases your max number of sentries and grants you 10% minion damage", + "SquireAltShirt": "30% increased minion damage and massively increased life regeneration", + "SquireAltPants": "20% increased minion damage, critical strike chance and 30% movement speed", + "ApprenticeAltHead": "Increases your max number of sentries\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\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 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}", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'To keep those luscious locks as gorgeous as ever'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Bringing sexy back'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'Shia suprise! Didn't expect that from pants, did you?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'It's full on! What does it mean?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'For best results, use with pasta-based diet'" + } +} \ 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..948dca6 --- /dev/null +++ b/Localization/Content/en-US/Legacy.json @@ -0,0 +1,1143 @@ +{ + "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": "Puttin 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": "Spicing up walls", + "7": "Making random holes", + "80": "Chiseling marble", + "81": "Growing granite", + "8": "Generating small caves", + "9": "Generating large caves" + }, + "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 lense!", + "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 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 5 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 usefull 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.", + "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 crimtane area before using it.", + "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 an 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: Filling", + "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": "Softcore", + "27": "Random", + "28": "Create", + "29": "Hardcore characters die for good", + "2": "Disconnect", + "30": "Mediumcore characters drop items on death", + "31": "Softcore 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", + "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", + "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": "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", + "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": "Ice 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": "Frozen Chest", + "23": "Locked Jungle Chest", + "24": "Locked Corruption Chest", + "25": "Locked Crimson Chest", + "26": "Locked Hallowed Chest", + "27": "Locked Frozen 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}", + "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": "Crystal Chest", + "1": "Golden Chest" + } +} \ 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..7c3b200 --- /dev/null +++ b/Localization/Content/en-US/NPCs.json @@ -0,0 +1,590 @@ +{ + "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": "Zombie Eskimo", + "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": "Blue Cultist Archer", + "Demolitionist": "Demolitionist", + "CultistArcherWhite": "White 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": "Zombie Eskimo", + "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": "Crimtane Bunny", + "CrimsonGoldfish": "Crimtane Goldfish", + "CrimsonPenguin": "Vicious Penguin", + "CultistBoss": "Lunatic Cultist", + "CultistBossClone": "Lunatic Cultist", + "CultistDevote": "Lunatic Devote", + "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 Apparation", + "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" + } +} \ 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..8592c25 --- /dev/null +++ b/Localization/Content/en-US/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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", + "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", + "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", + "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", + "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", + "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", + "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", + "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}" + } +} \ 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..d27ce56 --- /dev/null +++ b/Localization/Content/en-US/Town.json @@ -0,0 +1,237 @@ +{ + "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" + }, + "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." + }, + "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": "I really need some birthday text, Yorai!" + }, + "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." + }, + "GoblinTinkererChatter": { + "Chatter_1": "You know, these Etherian Goblins are nothing like my people. Really rowdy bunch. Not that my people are much better..." + }, + "AnglerChatter": { + "Chatter_1": "How come {Bartender} won't sell me any ale? I want to try some! What a grouch!" + }, + "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, & Caverns)", + "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_AmanitiaFungifin": "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_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 Anywhere)", + "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)" + }, + "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." + }, + "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." + }, + "PirateChatter": { + "Chatter_1": "About time we gotta barkeep around here! Me rum was almost gone!" + }, + "NurseChatter": { + "Chatter_1": "I keep asking for wine, but all {Bartender} gives me are mugs of ale." + }, + "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." + }, + "StylistChatter": { + "Chatter_1": "I offered {Bartender} a free trim, but he refused. I mean, I could have at least worked on his mustache!" + }, + "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." + }, + "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!" + }, + "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." + }, + "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." + }, + "GuideSpecialText": { + "Party": "Never been to a party before? You might want to check around with the others. People sometimes bring out special party favors." + }, + "MerchantSpecialText": { + "Party": "You know what would be the best way to party? Buying things for others, specifically from me." + }, + "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." + }, + "ClothierSpecialText": { + "Party": "Mama always said you've got to put the past behind you before you can party on." + }, + "TravellingMerchantSpecialText": { + "Party": "Many say that parties give you the richest of memories. So buy something and make this memory rich!" + }, + "MechanicSpecialText": { + "Party": "Do you think anyone would mind if I wired a cake with bulbs instead of candles?" + }, + "PirateSpecialText": { + "Party": "After all that cake, you might have to call me White Beard for a while." + }, + "TruffleSpecialText": { + "Party": "I would have invited everyone to party in my home, but there's not mushroom." + }, + "NurseSpecialText": { + "Party": "No, I will not tell you how many candles are on my cake." + }, + "SteampunkerSpecialText": { + "Party": "Everyone said they like stacked cakes, so I installed smokestacks in mine." + }, + "CyborgSpecialText": { + "Party": "This party is going to be nuts, maybe even bolts!" + }, + "SantaClausSpecialText": { + "Party": "Come now, you didn't think I only celebrated on Christmas did you?" + }, + "ArmsDealerSpecialText": { + "Party": "Parties are great for getting people to come out of their shell, just like with bullets." + }, + "StylistSpecialText": { + "Party": "I may have gotten my hair done up just for today, but honestly, I just want to pop balloons with my scissors." + }, + "PainterSpecialText": { + "Party": "I tried having a paintball fight, but everyone wanted food and decorations instead." + }, + "AnglerSpecialText": { + "Party": "What, you think I like parties because I am a kid? Well, you're right, so get to partying!" + } +} \ 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..d082537 --- /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", + "50": "Terraria: ¡Edge of Space también mola!", + "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_Description": "Consigue el máximo de maná y de vida sin accesorios ni mejoras.", + "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_Description": "Derrota al Devoramundos, un gigantesco gusano que se alimenta de corrupción.", + "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", + "SetInitialMaxPlayers": "Máximo de jugadores (pulsa Intro para 8): ", + "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.", + "CaptureError": "Se produjo un error mientras se guardaba la captura. Volviendo a intentarlo...", + "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." + }, + "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", + "CraftingWindow": "Ventana de creación", + "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", + "SortInventory": "Ordenar inventario", + "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", + "QuickStackToNearby": "Guarda rápido cosas en los cofres cercanos", + "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", + "NormalDescription": "(La experiencia básica de Terraria)", + "NormalDescriptionFlavor": "Comienza tu viaje...", + "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": "..." + }, + "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_2": "{0} no va a poder volver a montarse.", + "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)" + } +} \ 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..64bddcb --- /dev/null +++ b/Localization/Content/es-ES/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "Reduce el uso de maná en un 20%", + "HallowMelee": "Aumenta en un 19% la velocidad de movimiento y del cuerpo a cuerpo", + "HallowRanged": "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", + "Turtle": "Los atacantes también sufren el daño completo", + "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", + "Bone": "Probabilidad del 20% de no gastar munición", + "Spider": "Aumenta un 12% el daño de los súbditos", + "Ninja": "Probabilidad del 33% de no gastar el objeto lanzado", + "Fossil": "Probabilidad del 50% de no gastar el objeto lanzado", + "Solar": "Con el tiempo, se generan escudos solares que te protegen,\nconsumes la energía de escudo al correr y dañas a los enemigos", + "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", + "Nebula": "Al dañar a los enemigos, tendrás una probabilidad de provocar debilitaciones\ny generar mejoras para acumular potenciadores", + "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", + "Calm": "Reduce la agresión de los enemigos", + "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", + "Fishing": "Aumenta el nivel de pesca", + "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", + "PetParrot": "Lorito quiere su galletita", + "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", + "WellFed": "Pequeñas mejoras a todas las características", + "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" + }, + "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", + "ShadowDodge": "Esquiva sombría", + "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" + }, + "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" + } +} \ 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..200a083 --- /dev/null +++ b/Localization/Content/es-ES/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Babas moradas", + "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", + "OilRagSconse": "Candelero de aceite", + "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", + "FrozenChest": "Cofre congelado", + "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)", + "MusicBoxSpace": "Caja de música (Espacio)", + "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)", + "MusicBoxOcean": "Caja de música (Océano)", + "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", + "ZombieEskimoBanner": "Estandarte de zombi esquimal", + "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", + "SpookyPlatform": "Plataforma tétrica", + "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", + "AmanitiaFungifin": "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", + "BlueCultistCasterBanner": "Estandarte de mago sectario azul", + "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", + "IceChest": "Cofre de hielo", + "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", + "EskimoHood": "Capucha de esquimal", + "EskimoCoat": "Abrigo de esquimal", + "EskimoPants": "Pantalones de esquimal", + "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", + "PinkEskimoHood": "Caperuza de esquimal rosa", + "PinkEskimoCoat": "Abrigo de esquimal rosa", + "Minishark": "Minitiburón", + "PinkEskimoPants": "Pantalones de esquimal rosas", + "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", + "AncientCultistTrophy": "Trofeo de Sectario Antiguo", + "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", + "BossMaskCultist": "Máscara de Sectario Antiguo", + "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", + "DevDye": "Sangre de Skiphs", + "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_FrozenChest": "Cofre congelado 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_IceChest": "Cofre de hielo 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", + "SandFallBlock": "Catarata 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", + "SkiphsHelm": "Máscara de Skiphs", + "SkiphsPants": "Culo de oso de Skiphs", + "SkiphsShirt": "Piel de Skiphs", + "SkiphsWings": "Garras de Skiphs", + "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", + "SnowFallBlock": "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", + "UltraBrightCampfire": "Hoguera ultrabrillante", + "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", + "DynastyPlatform": "Plataforma dinástica", + "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", + "ArkhalisHat": "Caperuza de Arkhalis", + "ArkhalisShirt": "Corpiño de Arkhalis", + "ArkhalisPants": "Mallas de Arkhalis", + "ArkhalisWings": "Alas ligeras de Arkhalis", + "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", + "PaintScraper": "Se usa para quitar la pintura", + "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", + "HoneyComb": "Libera abejas al sufrir daños", + "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", + "PygmyNecklace": "Aumenta el máximo de súbditos que puedes tener", + "TikiMask": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 10% el daño de los súbditos", + "TikiShirt": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 10% el daño de los súbditos", + "TikiPants": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 10% el daño de los súbditos", + "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", + "BeeCloak": "Hace que las estrellas caigan y libera abejas al recibir daños", + "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", + "FrozenTurtleShell": "Cuando el portador está por debajo del 50% de vida, una coraza lo envuelve y reduce el daño", + "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", + "Stynger": "Dispara un proyectil explosivo", + "FlowerPow": "Dispara pétalos de flores afilados como cuchillas a los enemigos cercanos", + "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%", + "PanicNecklace": "Aumenta la velocidad de movimiento tras ser golpeado", + "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", + "HeatRay": "Dispara un penetrante rayo de calor\n¡Hoolaaa!", + "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", + "MagicQuiver": "Aumenta un 10% el daño y aumenta notablemente la velocidad de las flechas\nProbabilidad del 20% de no gastar flechas", + "MagmaStone": "Inflige daño de fuego al atacar", + "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", + "FireGauntlet": "Aumenta el retroceso en el cuerpo a cuerpo e inflige daño de fuego al atacar\nAumenta un 10% la velocidad y el daño del cuerpo a cuerpo", + "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", + "FrozenKey": "Desbloquea un cofre congelado en esta mazmorra", + "SpectrePaintbrush": "Se usa para colorear bloques", + "SpectrePaintRoller": "Se usa para colorear paredes", + "SpectrePaintScraper": "Se usa para quitar la pintura", + "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", + "ShroomiteBreastplate": "Aumenta un 13% la probabilidad de asestar ataques críticos a distancia\nProbabilidad del 20% de no gastar munición", + "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", + "SDMG": "Probabilidad del 50% de no gastar munición\nLlegó desde los confines del espacio", + "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", + "StaffoftheFrostHydra": "Dispara una poderosa hidra de escarcha para escupir hielo a tus enemigos", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Pequeña explosión capaz de romper varios ladrillos", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 11% el daño de los súbditos", + "SpookyBreastplate": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 11% el daño de los súbditos", + "SpookyLeggings": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 11% el daño de los súbditos", + "CursedSapling": "Invoca a un retoño maldito para que te siga", + "PumpkinMoonMedallion": "Invoca a la Luna calabaza", + "NecromanticScroll": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 10% el daño de los súbditos", + "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", + "FrostsparkBoots": "Permite volar, correr muy rápido y tener más movilidad sobre el hielo\nAumenta en un 7% la velocidad de movimiento", + "FartInABalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos", + "PapyrusScarab": "Aumenta el máximo de súbditos que puedes tener\nAumenta el daño y el retroceso de tus súbditos", + "CelestialStone": "Pequeño aumento del daño, la velocidad y la probabilidad de crítico del cuerpo a cuerpo\nRegeneración de vida, defensa, velocidad y retroceso de los súbditos", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nMantén ABAJO y SALTO para planear", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Invoca a un reno que podrás usar", + "CnadyCanePickaxe": "Permite excavar meteoritos", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Ofrece inmunidad a los efectos de helado y congelación", + "Coal": "¡Este año te has portado muy mal!", + "Toolbox": "Aumenta en 1 el alcance de las herramientas y la colocación de objetos", + "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", + "StaffofRegrowth": "Crea hierba y musgo sobre el barro y la piedra\nAl usarlo para recolectar, aumenta la recolección de plantas de alquimia", + "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", + "ExtendoGrip": "Aumenta el alcance de las baldosas", + "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%", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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", + "GoldenCarp": "Brilla mucho. Seguro que se puede vender por mucho dinero.", + "MiningPotion": "Aumenta un 25% la velocidad de minería", + "HeartreachPotion": "Aumenta el rango de recogida de corazones", + "CalmingPotion": "Reduce la agresión de los enemigos", + "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", + "SummoningPotion": "Aumenta el máximo de súbditos que puedes tener", + "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", + "StickyBomb": "Puede ser difícil de lanzar", + "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", + "FishingPotion": "Aumenta la habilidad de pesca", + "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", + "BeeHeadgear": "Aumenta un 4% el daño de los súbditos\nAumenta el máximo de súbditos que puedes tener", + "BeeBreastplate": "Aumenta un 4% el daño de los súbditos\nAumenta el máximo de súbditos que puedes tener", + "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", + "AnglerHat": "Aumenta el nivel de pesca", + "AnglerVest": "Aumenta el nivel de pesca", + "AnglerPants": "Aumenta el nivel de pesca", + "Sunglasses": "¡Te quedan muy bien!", + "SpiderMask": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 6% el daño de los súbditos", + "SpiderBreastplate": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 6% el daño de los súbditos", + "SpiderGreaves": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 6% el daño de los súbditos", + "HighTestFishingLine": "El sedal nunca se romperá", + "AnglerEarring": "Aumenta la habilidad de pesca", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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", + "GoldenKey": "Abre un cofre de oro o un cofre de mazmorra", + "ShadowKey": "Abre todos los cofres de las sombras", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "Puede llegar a confundir\nBusca en tu interior", + "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", + "Toolbelt": "Aumenta la distancia de colocación de bloques", + "HolyWater": "Extiende lo sagrado a algunos bloques", + "UnholyWater": "Extiende la corrupción a algunos bloques", + "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", + "Ruler": "Dibuja líneas de medidas en pantalla para colocar los bloques", + "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!", + "DarkShard": "A veces lo llevan las criaturas de los desiertos corrompidos", + "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", + "StarCloak": "Hace que caigan estrellas al sufrir daños", + "Megashark": "Probabilidad del 50% de no gastar munición\nEl hermano mayor del minitiburón", + "Shotgun": "Dispara una ráfaga dispersa de balas", + "PhilosophersStone": "Reduce el tiempo de espera para usar pociones curativas", + "TitanGlove": "Aumenta el retroceso en el cuerpo a cuerpo", + "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", + "MechanicalWorm": "Invoca al Destructor", + "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", + "HallowedMask": "Aumenta un 10% el daño cuerpo a cuerpo y la probabilidad de ataque crítico\nAumenta un 10% la velocidad del cuerpo a cuerpo", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoca a un bebé pingüino", + "VilePowder": "Elimina lo sagrado", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nMantén ARRIBA para mayor velocidad", + "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", + "DiscountCard": "Las tiendas tienen precios más bajos", + "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", + "CharmofMyths": "Regenera la vida y reduce el tiempo de espera para usar pociones curativas", + "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", + "WaterWalkingBoots": "Otorga la habilidad de caminar sobre el agua", + "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", + "PowerGlove": "Aumenta el retroceso en el cuerpo a cuerpo\nAumenta un 12% la velocidad del cuerpo a cuerpo", + "LightningBoots": "Permite volar\nEl portador podrá correr a una velocidad increíble", + "SunStone": "Aumenta todas las características y se usa durante el día", + "MoonStone": "Aumenta todas las características y se usa durante la noche", + "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", + "ObsidianWaterWalkingBoots": "Otorga la habilidad de caminar sobre el agua\nOfrece inmunidad ante los bloques de fuego", + "LavaWaders": "Otorga la habilidad de caminar sobre el agua y la lava\nOtorga inmunidad a los bloques de fuego y 7 segundos de inmunidad a la lava", + "BoneWand": "Coloca un hueso", + "LeafWand": "Coloca hojas", + "FlyingCarpet": "Permite al propietario flotar durante unos segundos", + "AvengerEmblem": "Aumenta un 12% el daño", + "MechanicalGlove": "Aumenta el retroceso en el cuerpo a cuerpo\nAumenta un 12% el daño y la velocidad del cuerpo a cuerpo", + "LandMine": "Explota cuando se pisa", + "PaladinsShield": "Absorbe un 25% del daño infligido a jugadores de tu equipo\nSolo se activa por encima del 25% de vida", + "Umbrella": "Con esto, caerás más despacio", + "ChlorophyteOre": "Reacciona a la luz", + "SteampunkWings": "Permite volar y caer despacio", + "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!", + "CookedMarshmallow": "{$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", + "Extractinator": "Convierte el limo, el aguanieve o los fósiles en algo más útil\nPara usarlo: Pon limo, aguanieve o fósiles en el Expriminator", + "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", + "AncientBattleArmorPants": "Aumenta el máximo de súbditos que puedes tener", + "AncientBattleArmorShirt": "Aumenta el maná máximo en 80", + "AncientHorn": "Invoca un basilisco como montura", + "AnglerTackleBag": "El sedal nunca se romperá, reduce la probabilidad de consumir cebo y aumenta la habilidad de pesca", + "ArchitectGizmoPack": "Aumenta la velocidad y el alcance de la colocación de paredes y casillas\nPinta automáticamente los objetos colocados", + "AviatorSunglasses": "Activa a tu compañero interior\n¡Ideal para suplantar a los retransmisores!", + "Bacon": "{$CommonItemTooltip.MinorStats}\n¿Beicon? Beicon.", + "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.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nLa plataforma barrera del satélite valquiria está a salvo. Casi todo el tiempo.", + "BewitchingTable": " para tener más súbditos", + "Bladetongue": "Al contacto, escupe un río de icor", + "BlessedApple": "Invoca un unicornio como montura", + "BloodWater": "Extiende el carmesí a algunos bloques", + "BombFish": "Pequeña explosión capaz de romper varios ladrillos", + "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", + "BottomlessBucket": "Contiene una cantidad ilimitada de agua", + "BouncyBomb": "Pequeña explosión capaz de romper varios ladrillos\nMuy rebotante", + "BouncyDynamite": "Esto te demostrará que es muy mala idea", + "BouncyGlowstick": "Funciona si se moja", + "BouncyGrenade": "Pequeña explosión que no rompe ningún ladrillo\nMuy rebotante", + "BrainOfConfusion": "Puede confundir a los enemigos cercanos tras golpearlos", + "BrainScrambler": "Invoca un scutlix como montura", + "BubbleGun": "Dispara con rapidez burbujas fuertes", + "ButchersChainsaw": "Se emiten chispas al golpear a los enemigos", + "CelestialShell": "Convierte a quien lo lleve en hombre lobo por la noche y en tritón al entrar en el agua\nPequeñas mejoras a todas las características", + "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", + "FossilHelm": "Aumenta un 20% la velocidad de lanzamiento", + "FossilPants": "Aumenta un 15% la probabilidad de impacto crítico al lanzar", + "FossilShirt": "Aumenta un 20% el daño de lanzamiento", + "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", + "GreedyRing": "Aumenta el alcance de la recolección de monedas y las tiendas tienen precios más bajos\nEn ocasiones, golpear a los enemigos te dará monedas extra", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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...", + "LokisWings": "{$CommonItemTooltip.DevItem}\nDeja que tus planes sean tan oscuros e impenetrables como la noche. Al moverte, caerás como un relámpago.", + "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...", + "MoonlordTurretStaff": "Invoca un portal lunar para disparar lásers a tus enemigos", + "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", + "NinjaHood": "Aumenta un 15% la velocidad de lanzamiento", + "NinjaPants": "Aumenta un 10% la probabilidad de impacto crítico al lanzar", + "NinjaShirt": "Aumenta un 15% el daño de lanzamiento", + "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", + "QueenSpiderStaff": "Invoca una reina araña que escupe arañas a los enemigos", + "Radar": "Detecta a los enemigos a tu alrededor", + "RainbowCampfire": "La regeneración de vida es mayor junto a una hoguera", + "RainbowCrystalStaff": "Invoca un cristal radiante que elimina a tus enemigos\n¡Los colores, duque! ¡Los colores!", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Rellénate la cara. Rellénale la cara a otra persona. Pues vale.", + "SlimeGun": "Lanza un inofensivo chorro de slime", + "SlimySaddle": "Invoca un slime como montura", + "SnowCloudBlock": "Hace mucho frío ahí arriba", + "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", + "SolarFlareBreastplate": "Aumenta un 22% el daño cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "SolarFlareHelmet": "Aumenta un 17% la probabilidad de ataque crítico en el cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "SolarFlareLeggings": "Aumenta un 15% la velocidad de movimiento y del cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "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", + "StardustBreastplate": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 22% el daño de los súbditos", + "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?", + "StardustHelmet": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 22% el daño de los súbditos", + "StardustLeggings": "Aumenta el máximo de súbditos que puedes tener\nAumenta un 22% el daño de los súbditos", + "StardustMonolith": "Obtienes una pequeña cantidad de poder de la Torre de Polvo estelar", + "StickyDynamite": "Puede ser difícil de lanzar", + "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}", + "ViciousPowder": "Elimina lo sagrado", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nSea lo que sea lo que haga este accesorio, ¡no es un error!", + "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}", + "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}\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}", + "ApprenticeAltHead": "Aumenta el número máximo de centinelas\nAumenta un 10% el daño mágico y de súbditos", + "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", + "ApprenticeHat": "Aumenta el número máximo de centinelas y se reduce un 10% el coste de maná", + "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!", + "ApprenticeTrousers": "Aumenta un 10% el daño de súbditos y un 20% la velocidad de movimiento", + "BookStaff": "Me pregunto quién clavaría un libro de sabiduría infinita en un palito...\n para liberar un poderoso tornado", + "DD2BallistraTowerT1Popper": "Una torre lenta, pero que dispara proyectiles perforantes e inflige mucho daño\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Una trampa que explota cuando se aproximan enemigos\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Una torre de velocidad media que dispara bolas de fuego explosivas\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Un aura que electrocuta sin parar a los enemigos que entren en su interior\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Aumenta el número máximo de centinelas\nAumenta un 10% el daño de súbditos y la probabilidad de impacto crítico a distancia", + "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", + "HuntressBuckler": "Aumenta el número máximo de centinelas\nAumenta un 10% el daño de súbditos", + "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", + "HuntressWig": "Aumenta el número máximo de centinelas y aumenta un 10% la probabilidad de impacto crítico a distancia", + "MonkAltHead": "Aumenta el número máximo de centinelas y aumenta un 20% el daño de súbditos y cuerpo a cuerpo", + "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", + "MonkBrows": "Aumenta el número máximo de centinelas y aumenta un 20% la velocidad de los ataques cuerpo a cuerpo", + "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.", + "SquireAltHead": "Aumenta el número máximo de centinelas y otorga un 20% de daño de súbditos", + "SquireAltPants": "Aumenta un 20% el daño de súbditos y la probabilidad de impacto crítico, así como un 30% la velocidad de movimiento", + "SquireAltShirt": "Aumenta un 30% el daño de súbditos y aumenta drásticamente la regeneración de vida", + "SquireGreatHelm": "Aumenta el número máximo de centinelas y aumenta la regeneración de vida", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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?\"", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n\"¡A tope! ¡¿Qué significa eso?!\".", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n\"Para obtener los mejores resultados, se ha de usar con una dieta basada en pasta\"." + }, + "CommonItemTooltip": { + "SpecialCrafting": "Se usa para crear cosas especiales", + "DevItem": "¡Ideal para suplantar a los desarrolladores!", + "FlightAndSlowfall": "Permite volar y caer lentamente", + "RightClickToOpen": " para abrir", + "MinorStats": "Pequeñas mejoras a todas las características", + "BannerBonus": "Los jugadores cercanos obtienen una bonificación contra: ", + "Counterweight": "Lanza un contrapeso tras golpear a un enemigo con un yoyó", + "EtherianManaCost10": "Usa 10 de maná etéreo para invocar más de uno", + "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..3f57203 --- /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", + "3": "Amontonando tierra", + "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.", + "76": "Generando estructuras", + "77": "Añadiendo más hierba", + "78": "Desertificando", + "79": "Alegrando las paredes", + "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.", + "17": "No pierdas de vista tus sueños. ¡Compra una lente!", + "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.", + "187": "Los yunques se pueden fabricar con hierro o bien comprarse a un mercader.", + "188": "En el subsuelo hay corazones de cristal que puedes usar para aumentar el máximo de vida. Podrás destrozarlos con un pico.", + "189": "Si recoges 5 estrellas fugaces, podrás combinarlas para crear un objeto que aumente tu poder mágico.", + "19": "¿Tu nombre era {PlayerName}? ¡Me han hablado bien de ti, amigo!", + "190": "Por la noche, caen estrellas fugaces del cielo. Se pueden utilizar para toda clase de objetos útiles. Si ves una, date prisa en cogerla ya que desaparecen al amanecer.", + "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.", + "207": "Puedes hacerte un gancho de escalada con un gancho y tres cadenas. Los esqueletos se encuentran en las profundidades del subsuelo y suelen llevar ganchos. En cuanto a las cadenas, se pueden fabricar con lingotes de hierro.", + "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.", + "403": "Puedes crear una espina dorsal sangrienta con vértebras. Asegúrate de estar en una zona carmesí antes de usarlo.", + "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?", + "71": "¿Por qué se empeña {Merchant} en intentar venderme una estatua de ángel? Todo el mundo sabe que no sirven para nada.", + "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", + "216": "Colocación inteligente de bloques: Rellenando", + "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", + "29": "Los personajes extremos mueren para siempre", + "2": "Desconectar", + "30": "Los personajes de núcleo medio sueltan objetos al morir", + "31": "Los personajes de núcleo suave sueltan dinero al morir", + "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.", + "1": "Contraseña errónea.", + "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!", + "85": "Insecto", + "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", + "11": "Cofre de hielo", + "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", + "22": "Cofre congelado", + "23": "Cofre cerrado de la selva", + "24": "Cofre cerrado corrompido", + "25": "Cofre cerrado carmesí", + "26": "Cofre cerrado sagrado", + "27": "Cofre cerrado gélido", + "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}" + }, + "LegacyChestType2": { + "0": "Cofre de cristal", + "1": "Cofre de oro" + } +} \ 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..9812ecb --- /dev/null +++ b/Localization/Content/es-ES/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Zombi esquimal", + "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", + "CultistArcherBlue": "Arquero sectario azul", + "Demolitionist": "Demoledor", + "CultistArcherWhite": "Arquero sectario blanco", + "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", + "ArmedZombieEskimo": "Zombi esquimal", + "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", + "CrimsonBunny": "Conejito carmesí", + "CrimsonGoldfish": "Pececillo carmesí", + "CrimsonPenguin": "Pingüino violento", + "CultistBoss": "Sectario lunático", + "CultistBossClone": "Sectario lunático", + "CultistDevote": "Devoto 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", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Aparición de Llamas oscuras", + "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", + "WalkingAntlion": "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..4d57b46 --- /dev/null +++ b/Localization/Content/es-ES/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..591e7b5 --- /dev/null +++ b/Localization/Content/es-ES/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "¡Necesito algún mensaje de cumpleaños, Yorai!", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Todos decían que les gustaban las tartas apiladas, así que metí chimeneas en la mía." + }, + "CyborgSpecialText": { + "Party": "¡Esta fiesta será un desmadre! ¡Y hasta un despadre!" + }, + "SantaClausSpecialText": { + "Party": "Venga, no creerías que solo celebraba las Navidades, ¿no?" + }, + "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_Dirtfish": "Había pescado a uno muy gordo, pero un zombi parlanchín salió del bosque y empezó a divagar sobre una \"feroz\" especie de pescado hecho de basura. Dice que podría ahogar a diez tipos de su tamaño o algo así… ¡Lo quiero! ¡Ya!\n\n(Se encuentra en la superficie, el subterráneo y las cavernas)", + "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_AmanitiaFungifin": "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_Slimefish": "En el bosque, los slimes dan mucho asco. ¡Y los pez slime, dan más asco todavía! No quiero nadar con slimes, ¡así que sácame uno fuera del agua!\n\n(Se encuentra en cualquier parte)", + "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..451340e --- /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", + "50": "Terraria : Essayez aussi Edge of Space !", + "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_Description": "Atteignez la santé et le mana max sans accessoires ni bonus.", + "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_Description": "Éliminez le Dévoreur des mondes, un ver gigantesque qui vit dans la Corruption.", + "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é", + "SetInitialMaxPlayers": "Max de joueurs (appuyez sur Entrée pour 8) :", + "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.", + "CaptureError": "Une erreur s'est produite lors de l'enregistrement de la capture. Nouvel essai en cours…", + "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" + }, + "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}", + "CraftingWindow": "Fenêtre d'artisanat", + "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", + "QuickStackToNearby": "Pile rapide vers les coffres à proximité", + "Rain": "Pluie", + "RulerOff": "Règle désactivée", + "RulerOn": "Règle activée", + "SettingsMenu": "Menu de paramètres", + "SortInventory": "Trier l'inventaire", + "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", + "NormalDescription": "(L'expérience normale de Terraria)", + "NormalDescriptionFlavor": "Votre aventure commence…", + "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": "..." + }, + "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_2": "{0} ne peut pas guérir.", + "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)" + } +} \ 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..5f77a77 --- /dev/null +++ b/Localization/Content/fr-FR/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "-20 % d'usage de mana", + "HallowMelee": "+18 % de vitesse de déplacement et au corps à corps", + "HallowRanged": "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", + "Turtle": "Les agresseurs subissent aussi tous les dégâts", + "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", + "Bone": "20 % de chances de ne pas utiliser de munitions", + "Spider": "+12 % de dégâts des sbires", + "Ninja": "33 % de chances de ne pas utiliser d'objets de lancer", + "Fossil": "50 % de chances de ne pas utiliser d'objets de lancer", + "Solar": "Les boucliers solaires génèrent du temps qui vous protège,\nconsomment le pouvoir du bouclier pour foncer, infligeant des dégâts aux ennemis", + "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", + "Nebula": "Blesser des ennemis a une chance de faire apparaître des bonus :\nramassez-les pour cumuler les effets positifs", + "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", + "Calm": "Agression des ennemis réduite", + "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", + "Fishing": "Niveau de pêche augmenté", + "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", + "PetParrot": "Coco veut le biscuit", + "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", + "WellFed": "Améliorations mineures de toutes les stats", + "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" + }, + "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", + "ShadowDodge": "Esquive d'ombre", + "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" + }, + "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" + } +} \ 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..e9c46ef --- /dev/null +++ b/Localization/Content/fr-FR/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Mucus violet", + "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", + "OilRagSconse": "Chiffon huilé", + "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é", + "FrozenChest": "Coffre gelé", + "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)", + "MusicBoxSpace": "Boîte à musique (espace)", + "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)", + "MusicBoxOcean": "Boîte à musique (océan)", + "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", + "ZombieEskimoBanner": "Bannière d'Eskimo zombie", + "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", + "SpookyPlatform": "Plateforme 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", + "AmanitiaFungifin": "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", + "BlueCultistCasterBanner": "Bannière d'Incantateur adepte bleu", + "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", + "IceChest": "Coffre de glace", + "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", + "EskimoHood": "Capuche d'Eskimo", + "EskimoCoat": "Manteau d'Eskimo", + "EskimoPants": "Pantalon d'Eskimo", + "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", + "PinkEskimoHood": "Capuche d'Eskimo rose", + "PinkEskimoCoat": "Manteau d'Eskimo rose", + "Minishark": "Minirequin", + "PinkEskimoPants": "Pantalon d'Eskimo rose", + "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", + "AncientCultistTrophy": "Trophée d'Adepte ancien", + "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", + "BossMaskCultist": "Masque d'Adepte ancien", + "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", + "DevDye": "Sang de Skiph", + "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_FrozenChest": "Coffre gelé 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_IceChest": "Coffre de glace 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", + "SandFallBlock": "Chutes 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", + "SkiphsHelm": "Masque de Skiph", + "SkiphsPants": "Derrière de Skiph", + "SkiphsShirt": "Peau de Skiph", + "SkiphsWings": "Pattes de Skiph", + "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", + "SnowFallBlock": "Chute 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", + "UltraBrightCampfire": "Feu de camp très vif", + "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", + "DynastyPlatform": "Plateforme 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", + "ArkhalisHat": "Capuche d'Arkhalis", + "ArkhalisShirt": "Corsage d'Arkhalis", + "ArkhalisPants": "Collants d'Arkhalis", + "ArkhalisWings": "Ailes lumineuses d'Arkhalis", + "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", + "PaintScraper": "Utilisé pour retirer de la peinture", + "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é", + "HoneyComb": "Libère des abeilles si endommagée", + "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", + "PygmyNecklace": "Augmente votre nombre maximal de sbires", + "TikiMask": "Augmente votre nombre maximal de sbires\n+10 % de dégâts des sbires", + "TikiShirt": "Augmente votre nombre maximal de sbires\n+10 % de dégâts des sbires", + "TikiPants": "Augmente votre nombre maximal de sbires\n+10 % de dégâts des sbires", + "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", + "BeeCloak": "Fait tomber les étoiles et libère les abeilles quand le joueur est blessé", + "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", + "FrozenTurtleShell": "Enveloppe le porteur d'une carapace qui réduit les dégâts lorsque sa santé est inférieure à 50 %", + "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", + "Stynger": "Tire un projectile explosif", + "FlowerPow": "Tire des pétales de fleur acérées aux ennemis à proximité", + "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", + "PanicNecklace": "Augmente la vitesse de déplacement une fois le joueur touché", + "LifeFruit": "+5 points de santé max définitifs", + "LihzahrdPowerCell": "Sert d'autel de Lihzahrd", + "Picksaw": "Peut extraire des briques de Lihzhard", + "HeatRay": "Tire un rayon de chaleur transperçant\nChaud devant !", + "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", + "MagicQuiver": "+10 % de dégâts et augmente considérablement la vitesse des flèches\n20 % de chances de ne pas utiliser de munitions", + "MagmaStone": "Inflige des dégâts de feu à l'attaque", + "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", + "FireGauntlet": "Augmente le recul au corps à corps et inflige des dégâts de feu à l'attaque\n+10 % de vitesse et de dégâts au corps à corps", + "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", + "FrozenKey": "Ouvre un coffre gelé dans le donjon", + "SpectrePaintbrush": "Utilisé avec de la peinture pour colorer les blocs", + "SpectrePaintRoller": "Utilisé avec de la peinture pour colorer les murs", + "SpectrePaintScraper": "Sert à retirer de la peinture", + "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", + "ShroomiteBreastplate": "+13 % de chances de coup critique à distance\n20 % de chances de ne pas utiliser de munitions", + "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", + "SDMG": "50 % de chances de ne pas utiliser de munitions\nElle est venue du bout de l'espace", + "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", + "StaffoftheFrostHydra": "Invoque une hydre givrée puissante qui crache de la glace sur vos ennemis", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Une petite explosion qui détruira quelques tuiles", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Augmente votre nombre maximal de sbires\n+11 % de dégâts de sbires", + "SpookyBreastplate": "Augmente votre nombre maximal de sbires\n+11 % de dégâts de sbires", + "SpookyLeggings": "Augmente votre nombre maximal de sbires\n+11 % de dégâts de sbires", + "CursedSapling": "Invoque un arbuste maudit pour vous suivre", + "PumpkinMoonMedallion": "Invoque la Lune citrouille", + "NecromanticScroll": "Augmente votre nombre maximal de sbires\n+10 % de dégâts de sbires", + "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", + "FrostsparkBoots": "Permettent de voler, de courir très vite et de mieux se déplacer sur la glace\n+7 % de vitesse de déplacement", + "FartInABalloon": "Permet au porteur de faire un double saut\nPermet de sauter plus haut", + "PapyrusScarab": "Augmente votre nombre maximal de sbires\nAugmente les dégâts et le recul de vos sbires", + "CelestialStone": "Augmente légèrement les dégâts, la vitesse au corps à corps et les chances de coup critique\nRégénération de santé, défense, vitesse de collecte et recul de sbires", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nMaintenir BAS et SAUTER pour planer", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Invoque un renne à monter", + "CnadyCanePickaxe": "Peut extraire de la météorite", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Immunise contre les effets de froid et de gel", + "Coal": "Vous n'avez pas été sage cette année", + "Toolbox": "+1 point de placement d'objets et de portée des outils", + "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", + "StaffofRegrowth": "Crée de l'herbe et de la mousse sur la terre et la pierre\nAugmente la récupération de plantes d'alchimie quand il est utilisé pour la récolte", + "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", + "ExtendoGrip": "Augmente la portée des tuiles", + "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", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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.", + "GoldenCarp": "Plutôt brillante. Ça se vendra sûrement bien.", + "MiningPotion": "+25 % de vitesse d'extraction", + "HeartreachPotion": "Augmente la portée de collecte des cœurs de vie", + "CalmingPotion": "Réduit l'agression ennemie", + "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", + "SummoningPotion": "Augmente votre nombre maximal de sbires", + "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", + "StickyBomb": "Le lancer peut s'avérer difficile", + "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", + "FishingPotion": "Améliore les compétences de pêche", + "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", + "BeeHeadgear": "+4 % de dégâts de sbires\nAugmente votre nombre maximal de sbires", + "BeeBreastplate": "+4 % de dégâts de sbires\nReinndit après avoir touché cr mur", + "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", + "AnglerHat": "Améliore le niveau de pêche", + "AnglerVest": "Améliore le niveau de pêche", + "AnglerPants": "Améliore le niveau de pêche", + "Sunglasses": "Elles vous donnent un air cool !", + "SpiderMask": "Augmente votre nombre maximal de sbires\n+6 % de dégâts de sbires", + "SpiderBreastplate": "Augmente votre nombre maximal de sbires\n+6 % de dégâts de sbires", + "SpiderGreaves": "Augmentent votre nombre maximal de sbires\n+6 % de dégâts de sbires", + "HighTestFishingLine": "Le fil ne se cassera jamais", + "AnglerEarring": "Améliorent les compétences de pêche", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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", + "GoldenKey": "Ouvre un coffre d'or ou de donjon", + "ShadowKey": "Ouvre tous les coffres de l'ombre", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "A une chance de rendre confus\nTrouvez la force intérieure", + "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", + "Toolbelt": "Augmente la portée de placement de blocs", + "HolyWater": "Étend le sacré à certains blocs", + "UnholyWater": "Étend la corruption à certains blocs", + "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", + "Ruler": "Crée des lignes de mesure à l'écran pour placer les blocs", + "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 !", + "DarkShard": "Parfois, des créatures en portent dans les déserts altérés", + "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é", + "StarCloak": "Fait tomber des étoiles quand le joueur est blessé", + "Megashark": "50 % de chances de ne pas utiliser de munitions\nLe grand frère de Minirequin", + "Shotgun": "Tire une série de balles", + "PhilosophersStone": "Réduit la recharge des potions de soin", + "TitanGlove": "Augmente le recul en corps à corps", + "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", + "MechanicalWorm": "Invoque le Destructeur", + "MechanicalSkull": "Invoque le Grand Squeletron", + "HallowedHeadgear": "+100 points de mana max\n+12 % de dégâts magiques et de chances de coup critique", + "HallowedMask": "+10 % de dégâts au corps à corps et de chances de coup critique\n+10 % de vitesse au corps à corps", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoque un petit manchot", + "VilePowder": "Bannit le sacré", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nMaintenir HAUT pour s'envoler plus vite", + "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", + "DiscountCard": "Les boutiques font des réductions", + "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", + "CharmofMyths": "Régénère la santé et réduit le temps de recharge des potions de soin", + "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", + "WaterWalkingBoots": "Permet de marcher sur l'eau", + "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", + "PowerGlove": "Augmente le recul en corps à corps\n+12 % de vitesse au corps à corps", + "LightningBoots": "Permettent de voler\nLe porteur peut courir incroyablement vite", + "SunStone": "Augmente toutes les stats si équipée de jour", + "MoonStone": "Augmente toutes les stats si équipée de nuit", + "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", + "ObsidianWaterWalkingBoots": "Permettent de marcher sur l'eau\nImmunisent contre les blocs de feu", + "LavaWaders": "Permettent de marcher sur l'eau et la lave\nImmunisent contre les blocs de feu et immunisent pendant 7 secondes à la lave", + "BoneWand": "Place des os", + "LeafWand": "Place des feuilles", + "FlyingCarpet": "Permet à qui le possède de voler quelques secondes", + "AvengerEmblem": "+12 % de dégâts", + "MechanicalGlove": "Augmente le recul au corps à corps\n+12 % de dégâts et de vitesse de déplacement", + "LandMine": "Explose quand on marche dessus", + "PaladinsShield": "Absorbe 25 % des dégâts infligés à un joueur de votre équipe\nActif uniquement à un niveau de santé supérieur à 25 %", + "Umbrella": "Vous tomberez plus lentement en le tenant", + "ChlorophyteOre": "Réagit à la lumière", + "SteampunkWings": "Permet de voler et de ralentir la chute", + "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 !", + "CookedMarshmallow": "{$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", + "Extractinator": "Transforme la vase, la gadoue et les fossiles en quelque chose de plus utile\nPour l'utiliser, placer la vase, la gadoue ou les fossiles dans l'extractinateur", + "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", + "AncientBattleArmorPants": "Augmente votre nombre maximal de sbires", + "AncientBattleArmorShirt": "+80 points de mana max", + "AncientHorn": "Invoque une monture basilic", + "AnglerTackleBag": "La canne à pêche ne se cassera jamais, réduit les chances de consommer les appâts, augmente les compétences de pêche", + "ArchitectGizmoPack": "Augmente la vitesse et la portée du placement de murs\nPeint automatiquement les objets placés", + "AviatorSunglasses": "Fait ressortir l'aviateur en vous\nSuper pour prétendre que vous faites des vidéos", + "Bacon": "{$CommonItemTooltip.MinorStats}\n Bacon ? Vous avez dit bacon ?", + "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", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nLa plateforme protectrice du satellite des Valkyries est sécurisée. La plupart du temps.", + "BewitchingTable": " pour obtenir plus de sbires", + "Bladetongue": "Crache un flot d'ichor au contact", + "BlessedApple": "Invoque une monture licorne", + "BloodWater": "Étend le carmin à certains blocs", + "BombFish": "Une petite explosion qui détruira quelques tuiles", + "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", + "BottomlessBucket": "Contient un volume d'eau infini", + "BouncyBomb": "Une petite explosion qui détruira quelques tuiles\nRebondit beaucoup", + "BouncyDynamite": "Ceci s'avèrera être une idée terrible", + "BouncyGlowstick": "Fonctionne même mouillé", + "BouncyGrenade": "Une petite explosion qui ne détruira pas de tuiles\nRebondit beaucoup", + "BrainOfConfusion": "Les ennemis à proximité peuvent être confus s'ils sont touchés", + "BrainScrambler": "Invoque une monture Scutlix", + "BubbleGun": "Tire rapidement des bulles puissantes", + "ButchersChainsaw": "Étincelles émises par les ennemis touchés", + "CelestialShell": "Transforme en loup-garou la nuit et en sirène ou triton au contact de l'eau si équipé\nAugmente légèrement toutes les stats", + "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", + "FossilHelm": "+20 % de rapidité de lancer", + "FossilPants": "+15 % de chances de coup critique au lancer", + "FossilShirt": "+20 % de dégâts de lancer", + "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", + "GreedyRing": "Augmente la portée de récolte des pièces et les boutiques font des réductions\nFrapper les ennemis peut parfois rapporter des pièces", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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…", + "LokisWings": "{$CommonItemTooltip.DevItem}\nQue vos plans soient aussi obscurs et impénétrables que la nuit, et lorsque vous avancez, tombez comme une éclair.", + "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 !", + "MoonlordTurretStaff": "Invoque un portail lunaire pour tirer au laser sur vos ennemis", + "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", + "NinjaHood": "+15 % de vitesse de lancer", + "NinjaPants": "+10 % de chances de coup critique au lancer", + "NinjaShirt": "+15 % de dégâts de lancer", + "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", + "QueenSpiderStaff": "Invoque une reine-araignée pour cracher des œufs à vos ennemis", + "Radar": "Détecte les ennemis autour de vous", + "RainbowCampfire": "Régénération de santé augmentée près d'un feu de camp", + "RainbowCrystalStaff": "Invoque un cristal rayonnant qui bannit vos ennemis\nLes couleurs, Duc, regardez !", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Mangez tout. Donnez tout à quelqu'un. Peu importe.", + "SlimeGun": "Asperge un jet inoffensif de gelée", + "SlimySaddle": "Invoque une gelée à chevaucher", + "SnowCloudBlock": "Il y fait assez froid là-haut", + "SnowFallBlock": "Bien plus cool qu'une boule à neige", + "SnowFallWall": "Bien plus cool qu'une boule à neige", + "SolarEruption": "Attaquez avec la furie du soleil", + "SolarFlareBreastplate": "+22 % de dégâts au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "SolarFlareHelmet": "+7 % de chances de coup critique au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "SolarFlareLeggings": "+15 % de vitesse de mouvement et au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "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", + "StardustBreastplate": "Augmente votre nombre maximal de sbires\n+22 % de dégâts de sbires", + "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 ?", + "StardustHelmet": "Augmente votre nombre maximal de sbires\n+22 % de dégâts de sbires", + "StardustLeggings": "Augmente votre nombre maximal de sbires\n+22 % de dégâts de sbires", + "StardustMonolith": "Exerce une petite quantité de pouvoir de la tour astrale", + "StickyDynamite": "Le lancer peut s'avérer difficile", + "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}", + "ViciousPowder": "Bannit le sacré", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nPeu importe ce que cet accessoire vous fait, ce n'est pas un bug !", + "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}", + "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}\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}", + "ApprenticeAltHead": "Augmente votre nombre maximal de sentinelles\n+10 % de dégâts des sbires et magiques", + "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", + "ApprenticeHat": "Augmente votre nombre max de sentinelles et -10 % de coûts de mana", + "ApprenticeRobe": "+20 % de dégâts des sbires et +10 % de dégâts magiques", + "ApprenticeStaffT3": "Éclabousse du miasme qui affaiblit la défense !", + "ApprenticeTrousers": "+10 % de dégâts des sbires et +20 % de vitesse de déplacement", + "BookStaff": "C'est à se demander qui a mis un tome de sagesse infinie sur un bâton...\n pour lancer une tornade puissante", + "DD2BallistraTowerT1Popper": "Une tour lente, mais haute qui tire des flèches perçantes\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Un piège qui explose quand les ennemis s'approchent\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Une tour à vitesse moyenne qui tire des boules de feu explosives\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Une aura qui inflige des dégâts répétés aux ennemis qui la pénètrent\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Augmente votre nombre maximal de sentinelles\n+10 % de dégât des sbires et de chances de coup critique à distance", + "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", + "HuntressBuckler": "Augmente votre nombre maximal de sentinelles\n+10 % de dégâts des sbires", + "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", + "HuntressWig": "Augmente votre nombre maximal de sentinelles et +10 % de chances de coup critique à distance", + "MonkAltHead": "Augmente votre nombre maximal de sentinelles et +20 % de dégâts au corps à corps et des sbires", + "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", + "MonkBrows": "Augmente votre nombre maximal de sentinelles et +20 % de vitesse d'attaques au corps à corps", + "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 !", + "SquireAltHead": "Augmente votre nombre maximal de sentinelles et +10 % de dégâts des sbires", + "SquireAltPants": "+20 % de dégâts des sbires, de chances de coup critique et +30 % de vitesse de déplacement", + "SquireAltShirt": "+30 % de dégâts des sbires et augmente énormément la régénération de santé", + "SquireGreatHelm": "Augmente votre nombre maximal de sentinelles et la régénération de santé", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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 ?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'C'est intense ! Qu'est-ce que ça veut dire ?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Pour de meilleurs résultats, faites un régime à base de pâtes'" + }, + "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", + "MinorStats": "Améliore légèrement toutes les stats", + "BannerBonus": "Les joueurs à proximité obtiennent un bonus contre : ", + "Counterweight": "Lance un contrepoids après avoir touché un ennemi avec un yoyo", + "EtherianManaCost10": "Utilisez 10 points de mana d'Etheria pour invoquer plus d'une", + "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..1d0b9f2 --- /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", + "3": "Placement de terre sous la terre", + "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 !", + "76": "Génération de structures.", + "77": "Ajout d'herbe", + "78": "Désertification", + "79": "Assaisonnement des murs", + "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.", + "17": "Ne perds pas l'objectif de vue, achète des lentilles !", + "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.", + "187": "Fabrique les enclumes avec du fer ou achète-les auprès d'un marchand.", + "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.", + "189": "Si tu récupères 5 étoiles filantes, elles peuvent créer un objet qui augmentera ta capacité magique.", + "19": "{PlayerName}, c'est bien cela ? J'ai entendu de bonnes choses à ton sujet !", + "190": "Les étoiles tombent partout dans le monde la nuit. Elles peuvent servir à beaucoup de choses très utiles. Si tu en vois une, ramasse-la sans hésiter, car elles disparaissent au lever du soleil.", + "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.", + "207": "Fabrique un grappin avec un crochet et trois chaînes. Les squelettes trouvés dans le souterrain transportent en général des crochets, et les chaînes se fabriquent à partir de lingots de fer.", + "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.", + "403": "Tu peux créer une colonne sanglante avec des vertèbres. Tu dois être dans une zone carmin avant de l'utiliser.", + "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 ?", + "71": "Pourquoi {Merchant} essaie-t-il constamment de me vendre des statues d'ange ? Tout le monde sait qu'elles ne servent à rien.", + "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", + "216": "Placement intelligent de blocs : remplissage", + "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", + "29": "Les personnages en mode difficile meurent pour de bon", + "2": "Déconnecter", + "30": "Les personnages en difficulté moyenne perdent des objets en mourant", + "31": "Les personnages en difficulté facile perdent de l'argent en mourant", + "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.", + "1": "Mot de passe incorrect.", + "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 !", + "85": "Insecte", + "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", + "11": "Coffre de glace", + "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é", + "22": "Coffre gelé", + "23": "Coffre de la jungle verrouillé ", + "24": "Coffre de la corruption verrouillé ", + "25": "Coffre carmin verrouillé ", + "26": "Coffre sacré verrouillé ", + "27": "Coffre gelé 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}" + }, + "LegacyChestType2": { + "0": "Coffre de cristal", + "1": "Coffre doré" + } +} \ 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..552008a --- /dev/null +++ b/Localization/Content/fr-FR/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Eskimo zombie", + "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", + "CultistArcherBlue": "Archer adepte bleu", + "Demolitionist": "Démolisseur", + "CultistArcherWhite": "Archer adepte blanc", + "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", + "ArmedZombieEskimo": "Eskimo 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", + "CrimsonBunny": "Lapin de carmitane", + "CrimsonGoldfish": "Poisson doré de carmitane", + "CrimsonPenguin": "Manchot cruel", + "CultistBoss": "Adepte lunatique", + "CultistBossClone": "Adepte lunatique", + "CultistDevote": "Dévot 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é", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Apparition de flamme d'ombre", + "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", + "WalkingAntlion": "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..e47d6d1 --- /dev/null +++ b/Localization/Content/fr-FR/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..e569977 --- /dev/null +++ b/Localization/Content/fr-FR/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "Je veux vraiment un texto d'anniversaire, Yorai !", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Tout le monde aime les bougies, alors j'ai mis des cheminées sur mon gâteau." + }, + "CyborgSpecialText": { + "Party": "Cette fête va être géante !" + }, + "SantaClausSpecialText": { + "Party": "Allez, tu ne pensais pas vraiment que je ne célébrais que Noël, si ?" + }, + "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_Dirtfish": "Le gros venait de mordre à l'hameçon quand un étrange zombie qui parle a émergé du lac de la forêt en répétant qu'il existait un poisson de terre « féroce » ! D'après lui, il peut asphyxier dix personnes comme lui, ou un truc du genre... Je le veux ! MAINTENANT !\n\n(Se trouve à la surface, dans le souterrain et les grottes)", + "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_AmanitiaFungifin": "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_Slimefish": "Dans la forêt, les gelées sont vraiment dégoûtantes. Les Geloissons encore plus ! Je ne veux pas nager avec des gelées, alors sors en un de l'eau !\n\n(Se trouve partout)", + "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..417f9a8 --- /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", + "50": "Terraria: Prova anche Edge of Space!", + "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_Description": "Ottieni più salute e mana possibile senza accessori o bonus.", + "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_Description": "Sconfiggi il mangiatore di mondi, enorme verme che dimora nella Corruzione.", + "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", + "SetInitialMaxPlayers": "Max giocatori (premi Invio per 8):", + "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.", + "CaptureError": "Si è verificato un errore durante il salvataggio dell'immagine. Riprova...", + "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" + }, + "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", + "CraftingWindow": "Fabbricazione finestra", + "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", + "QuickStackToNearby": "Accumula subito nelle casse vicine", + "Rain": "Pioggia", + "RulerOff": "Righello: no", + "RulerOn": "Righello: sì", + "SettingsMenu": "Menu impostazioni", + "SortInventory": "Organizza inventario", + "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", + "NormalDescription": "(Esperienza standard Terraria)", + "NormalDescriptionFlavor": "Il tuo viaggio inizia...", + "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": "..." + }, + "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_2": "{0} non si può rimettere in sesto.", + "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)" + } +} \ 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..419d6f8 --- /dev/null +++ b/Localization/Content/it-IT/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "Consumo mana ridotto del 20%", + "HallowMelee": "Velocità di corpo a corpo e movimento aumentata del 19%", + "HallowRanged": "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%", + "Turtle": "Tutti i danni si riversano anche sugli aggressori", + "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%", + "Bone": "20% di probabilità di non consumare munizioni", + "Spider": "Aumenta il danno dei seguaci del 12%", + "Ninja": "33% di probabilità di non consumare gli oggetti lanciati", + "Fossil": "50% di probabilità di non consumare gli oggetti lanciati", + "Solar": "Gli scudi solari si generano nel tempo proteggendoti,\nil potere dello scudo si consuma per scattare, infliggendo danni ai nemici", + "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", + "Nebula": "Se ferisci i nemici potresti trovare bonus,\nprendi i potenziamenti accumulando bonus", + "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", + "Calm": "Ridotta l'aggressività del nemico", + "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", + "Fishing": "Livello di pesca aumentato", + "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", + "PetParrot": "Vuole il suo biscottino", + "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", + "WellFed": "Piccole migliorie a tutti i parametri", + "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" + }, + "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", + "ShadowDodge": "Schivata nell'ombra", + "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" + }, + "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" + } +} \ 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..e22dd81 --- /dev/null +++ b/Localization/Content/it-IT/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Guscio viola", + "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", + "OilRagSconse": "Candeliere a olio", + "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", + "FrozenChest": "Cassa congelata", + "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)", + "MusicBoxSpace": "Carillon (Spazio)", + "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)", + "MusicBoxOcean": "Carillon (Oceano)", + "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", + "ZombieEskimoBanner": "Stendardo eschimese zombie", + "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", + "SpookyPlatform": "Piattaforma 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", + "AmanitiaFungifin": "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", + "BlueCultistCasterBanner": "Stendardo lanciatore cultista blu", + "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", + "IceChest": "Cassa di ghiaccio", + "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", + "EskimoHood": "Cappuccio eschimese", + "EskimoCoat": "Cappotto eschimese", + "EskimoPants": "Pantaloni eschimesi", + "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", + "PinkEskimoHood": "Cappuccio eschimese rosa", + "PinkEskimoCoat": "Cappotto eschimese rosa", + "Minishark": "Minishark", + "PinkEskimoPants": "Pantaloni eschimesi rosa", + "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", + "AncientCultistTrophy": "Trofeo cultista 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", + "BossMaskCultist": "Maschera da cultista antico", + "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", + "DevDye": "Sangue di Skiphs", + "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_FrozenChest": "Cassa congelata 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_IceChest": "Cassa di ghiaccio 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", + "SandFallBlock": "Cascata 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", + "SkiphsHelm": "Maschera di Skiphs", + "SkiphsPants": "Pantaloni di Skiphs", + "SkiphsShirt": "Pelle di Skiphs", + "SkiphsWings": "Zampe di Skiphs", + "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", + "SnowFallBlock": "Nevicata", + "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", + "UltraBrightCampfire": "Fuoco di bivacco luminosissimo", + "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", + "DynastyPlatform": "Piattaforma dinastica", + "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", + "ArkhalisHat": "Cappuccio di Arkhalis", + "ArkhalisShirt": "Bustino di Arkhalis", + "ArkhalisPants": "Calzamaglia di Arkhalis", + "ArkhalisWings": "Ali di Arkhalis", + "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", + "PaintScraper": "Si usa per rimuovere la vernice", + "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à", + "HoneyComb": "Rilascia api quando si danneggia", + "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", + "PygmyNecklace": "Aumenta il numero massimo dei tuoi seguaci", + "TikiMask": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 10%", + "TikiShirt": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 10%", + "TikiPants": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 10%", + "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", + "BeeCloak": "Provoca la caduta di stelle e rilascia api se ferito", + "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", + "FrozenTurtleShell": "Crea un guscio attorno al suo proprietario quando ha meno del 50% di vita per ridurre il danno", + "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", + "Stynger": "Spara un dardo esplosivo", + "FlowerPow": "Spara petali affilatissimi contro i nemici circostanti", + "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%", + "PanicNecklace": "Aumenta la velocità di movimento dopo aver ricevuto un colpo", + "LifeFruit": "Aumenta in maniera permanente la vita massima di 5", + "LihzahrdPowerCell": "Si usa presso l'altare rettiliano", + "Picksaw": "Consente di estrarre mattoni rettiliani", + "HeatRay": "Spara un raggio di calore perforante\nOolaa!!!", + "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", + "MagicQuiver": "Aumenta i danni del 10% e aumenta notevolmente la velocità della freccia\n20% di probabilità di non consumare frecce", + "MagmaStone": "Infligge danno da fuoco attaccando", + "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", + "FireGauntlet": "Aumenta lo spintone nella mischia e infligge danno da fuoco attaccando\nDanno in mischia e velocità aumentano del 10%", + "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", + "FrozenKey": "Sblocca una cassa congelata nel dungeon", + "SpectrePaintbrush": "Si usa con la vernice per colorare i blocchi", + "SpectrePaintRoller": "Si usa con la vernice per colorare i i muri", + "SpectrePaintScraper": "Si usa per rimuovere la vernice", + "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%", + "ShroomiteBreastplate": "Possibilità di colpo critico a distanza aumentata del 13%\n20% di probabilità di non consumare munizioni", + "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", + "SDMG": "50% di probabilità di non consumare munizioni\nVeniva dai confini dello spazio", + "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", + "StaffoftheFrostHydra": "Evoca una potente idra del gelo che sputa ghiaccio contro i nemici", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Una piccola esplosione che distruggerà alcune mattonelle", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci dell'11%", + "SpookyBreastplate": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci dell'11%", + "SpookyLeggings": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci dell'11%", + "CursedSapling": "Evoca uno arboscello maledetto che ti segue", + "PumpkinMoonMedallion": "Evoca la luna a zucca", + "NecromanticScroll": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 10%", + "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", + "FrostsparkBoots": "Consente di volare, correre velocissimo e dona maggiore mobilità sul ghiaccio\nVelocità di movimento aumentata del 7%", + "FartInABalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto", + "PapyrusScarab": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno e lo spintone dei tuoi seguaci", + "CelestialStone": "Incremento minimo a danni, velocità in mischia, probabilità di colpo critico,\nrigenerazione vita, difesa, velocità di raccolta e spintone dei seguaci", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nTieni premuto GIÙ e SALTA per sollevarti", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Evoca una renna cavalcabile", + "CnadyCanePickaxe": "Può estrarre meteorite", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Offre immunità dal freddo e dagli effetti di congelamento", + "Coal": "Quest'anno sei stato birichino", + "Toolbox": "Aumenta la collocazione degli oggetti e la portata degli attrezzi di 1", + "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%", + "StaffofRegrowth": "Crea erba e muschio sulla terra e sulla pietra\nAumenta la raccolta di piante alchemiche quando si usa per raccogliere", + "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", + "ExtendoGrip": "Aumenta la portata delle mattonelle", + "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%", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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.", + "GoldenCarp": "Niente male. Probabilmente si venderà bene.", + "MiningPotion": "Aumenta la velocità di estrazione del 25%", + "HeartreachPotion": "Aumenta la portata di raccolta dei cuori", + "CalmingPotion": "Riduce l'aggressività del nemico", + "BuilderPotion": "Aumenta la velocità e la portata di posizionamento", + "TitanPotion": "Aumenta lo spintone", + "FlipperPotion": "Ti consente di muoverti agilmente nei liquidi", + "SummoningPotion": "Aumenta il numero massimo dei tuoi seguaci", + "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%", + "StickyBomb": "Lanciare potrebbe essere difficile.", + "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", + "FishingPotion": "Migliora le capacità di pesca", + "SonarPotion": "Rileva i pesci presi all'amo", + "CratePotion": "Aumenta la probabilità di ottenere una cassa", + "WarmthPotion": "Riduce il danno dalle fonti di freddo", + "BeeHeadgear": "Aumenta il danno dei seguaci del 4%\nAumenta il numero massimo dei tuoi seguaci", + "BeeBreastplate": "Aumenta il danno dei seguaci del 4%\nAumenta il numero massimo dei tuoi seguaci", + "BeeGreaves": "Aumenta il danno dei seguaci del 5%", + "HornetStaff": "Evoca un calabrone che combatte per te", + "ImpStaff": "Evoca un diavoletto che combatte per te", + "AnglerHat": "Aumenta il livello di pesca", + "AnglerVest": "Aumenta il livello di pesca", + "AnglerPants": "Aumenta il livello di pesca", + "Sunglasses": "Migliora il tuo look!", + "SpiderMask": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 6%", + "SpiderBreastplate": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 6%", + "SpiderGreaves": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 6%", + "HighTestFishingLine": "La lenza non si romperà mai", + "AnglerEarring": "Migliora le capacità di pesca", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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", + "GoldenKey": "Apre una cassa d'oro o da dungeon", + "ShadowKey": "Apre tutte le casse ombra", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "Può confondere\nTrova i pezzi interni", + "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", + "Toolbelt": "Aumenta la portata di posizionamento dei blocchi", + "HolyWater": "Sparge consacrazione su alcuni blocchi", + "UnholyWater": "Sparge corruzione su alcuni blocchi", + "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", + "Ruler": "Crea delle linee sullo schermo per posizionare i blocchi", + "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!", + "DarkShard": "A volte portato dalle creature nei deserti corrotti", + "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", + "StarCloak": "Fa cadere le stelle se ferito", + "Megashark": "50% di probabilità di non consumare munizioni\nFratello maggiore del Minishark", + "Shotgun": "Spara una rosa di proiettili", + "PhilosophersStone": "Riduce la ricarica della pozione curativa", + "TitanGlove": "Aumenta lo spintone nel corpo a corpo", + "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", + "MechanicalWorm": "Evoca il Distruttore", + "MechanicalSkull": "Evoca lo Skeletron primario", + "HallowedHeadgear": "Aumenta il mana massimo di 100\nProbabilità di colpo critico e danno magico aumentate del 12%", + "HallowedMask": "Probabilità di colpo critico e danno da mischia aumentata del 10%\nVelocità in mischia aumentata del 10%", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Evoca un pinguino piccolo", + "VilePowder": "Scaccia la Consacrazione", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nPremi SU per decollare velocemente", + "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", + "DiscountCard": "Fa ottenere sconti nei negozi", + "LuckyCoin": "Colpendo i nemici a volte si guadagneranno più monete", + "UnicornonaStick": "Un momento magico!", + "SandstorminaBottle": "Consente di compiere un salto doppio superiore", + "CharmofMyths": "Rigenera la vita e riduce la ricarica delle pozioni curative", + "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", + "WaterWalkingBoots": "Per camminare sull'acqua", + "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", + "PowerGlove": "Aumenta lo spintone nel corpo a corpo\nVelocità nel corpo a corpo aumentata del 12%", + "LightningBoots": "Consente di volare\nChi li indossa può correre incredibilmente veloce", + "SunStone": "Aumenta tutti i parametri se si indossa di giorno", + "MoonStone": "Aumenta tutti i parametri se si indossa di notte", + "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", + "ObsidianWaterWalkingBoots": "Per camminare sull'acqua\nDona immunità dai blocchi di fuoco", + "LavaWaders": "Per camminare sull'acqua e sulla lava\nRende immuni dai blocchi di fuoco e dona 7 secondi di immunità dalla lava", + "BoneWand": "Posiziona osso", + "LeafWand": "Posiziona foglie", + "FlyingCarpet": "Il portatore può fluttuare per qualche secondo", + "AvengerEmblem": "Danno aumentato del 12%", + "MechanicalGlove": "Aumenta lo spintone nel corpo a corpo\nDanni e velocità in mischia aumentano del 12%", + "LandMine": "Esplode quando si calpesta", + "PaladinsShield": "Assorbe il 25% di danni inflitti ai tuoi compagni di squadra\nSi attiva soltanto con più del 25% di vita", + "Umbrella": "Tenendolo in mano scenderai più lentamente", + "ChlorophyteOre": "Reagisce alla luce", + "SteampunkWings": "Per volare e scendere lentamente", + "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!", + "CookedMarshmallow": "{$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", + "Extractinator": "Trasforma sabbia/fango/fossili in qualcosa di più utile\nPer usare: colloca sabbia/fango/fossili nell'estrattificatore", + "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%", + "AncientBattleArmorPants": "Aumenta il numero massimo dei tuoi seguaci", + "AncientBattleArmorShirt": "Aumenta il mana massimo di 80", + "AncientHorn": "Evoca un basilisco cavalcabile", + "AnglerTackleBag": "La lenza non si romperà mai; riduce la probabilità di consumo dell'esca; migliora le capacità di pesca", + "ArchitectGizmoPack": "Aumenta la velocità e la portata di posizionamento di mattonelle e muri\nColora automaticamente gli oggetti piazzati", + "AviatorSunglasses": "Esprimi la tua natura da wingman\nFantastico per impersonare gli streamer!", + "Bacon": "{$CommonItemTooltip.MinorStats}\nPancetta? Pancetta...", + "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.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nLa piattaforma barriera satellitare della valchiria è sicurissima... il più delle volte.", + "BewitchingTable": " per avere più seguaci", + "Bladetongue": "Sputa uno spruzzo di icore al contatto", + "BlessedApple": "Evoca un unicorno cavalcabile", + "BloodWater": "Diffonde il Cremisi su alcuni blocchi", + "BombFish": "Una piccola esplosione che distruggerà alcune mattonelle", + "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", + "BottomlessBucket": "Contiene una quantità di acqua infinita", + "BouncyBomb": "Una piccola esplosione che distruggerà alcune mattonelle\nMolto saltellante", + "BouncyDynamite": "Questa idea sarà terribile", + "BouncyGlowstick": "Funziona quando si bagna", + "BouncyGrenade": "Una piccola esplosione che non distruggerà mattonelle\nMolto saltellante", + "BrainOfConfusion": "Potrebbe confondere i nemici vicini dopo averli colpiti", + "BrainScrambler": "Evoca uno Scutlix cavalcabile", + "BubbleGun": "Spara rapidamente bolle potenti", + "ButchersChainsaw": "I nemici colpiti emettono scintille", + "CelestialShell": "Trasforma il portatore in un lupo mannaro di notte e in un tritone quando entra in acqua\nPiccoli aumenti a tutti i parametri", + "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", + "FossilHelm": "Velocità di lancio aumentata del 20%", + "FossilPants": "Possibilità colpo critico da lancio aumentata del 15%", + "FossilShirt": "Danni da lancio aumentati del 20%", + "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", + "GreedyRing": "Aumenta la portata di raccolta delle monete e i negozi hanno prezzi più bassi\nColpendo i nemici a volte si guadagneranno più monete", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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...", + "LokisWings": "{$CommonItemTooltip.DevItem}\nRendi i tuoi piani scuri e impenetrabili come la notte e quando ti muovi colpisci come un fulmine a ciel sereno.", + "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...", + "MoonlordTurretStaff": "Evoca un portale lunare per sparare laser contro i nemici", + "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", + "NinjaHood": "Velocità di lancio aumentata del 15%", + "NinjaPants": "Possibilità colpo critico da lancio aumentata del 10%", + "NinjaShirt": "Danni da lancio aumentati del 15%", + "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%", + "QueenSpiderStaff": "Evoca un ragno regina che sputa uova contro i nemici", + "Radar": "Rileva i nemici attorno a te", + "RainbowCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "RainbowCrystalStaff": "Evoca un cristallo radioso che scaccia i nemici\nI colori, Duca, i colori!", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Mangiane in quantità enorme con i tuoi amici.", + "SlimeGun": "Spruzza uno schizzo di slime innocuo", + "SlimySaddle": "Evoca uno slime cavalcabile", + "SnowCloudBlock": "Lassù fa parecchio freddo", + "SnowFallBlock": "Molto meglio di una sfera di neve", + "SnowFallWall": "Molto meglio di una sfera di neve", + "SolarEruption": "Colpisce con la furia del sole", + "SolarFlareBreastplate": "Danno da mischia aumentato del 22%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "SolarFlareHelmet": "Possibilità di colpo critico nel corpo a corpo aumentata del 17%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "SolarFlareLeggings": "Movimento e velocità in mischia aumentano del 15%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "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", + "StardustBreastplate": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 22%", + "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?", + "StardustHelmet": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 22%", + "StardustLeggings": "Aumenta il numero massimo dei tuoi seguaci\nAumenta il danno dei seguaci del 22%", + "StardustMonolith": "Usa una piccola quantità di potere dalla torre di polvere di stella", + "StickyDynamite": "Lanciare potrebbe essere difficile.", + "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}", + "ViciousPowder": "Scaccia la Consacrazione", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nQualsiasi cosa faccia il tuo accessorio, non è un errore!", + "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}", + "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}\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}", + "ApprenticeAltHead": "Aumenta il numero massimo di sentinelle\nDanno dei seguaci e magico aumentato del 10%", + "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%", + "ApprenticeHat": "Aumenta il numero massimo di sentinelle e riduce il costo di mana del 10%", + "ApprenticeRobe": "Danno dei seguaci aumentato del 20% e danno magico aumentato del 10%", + "ApprenticeStaffT3": "Spruzza miasma che riduce le difese!", + "ApprenticeTrousers": "Danno dei seguaci aumentato del 10% e velocità di movimento aumentata del 20%", + "BookStaff": "Chissà chi ha attaccato un tomo della saggezza infinita a un bastone...\n per scatenare un potente tornado", + "DD2BallistraTowerT1Popper": "Una torre lenta ma a danno elevato che spara dardi perforanti\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Una trappola che esplode quando i nemici si avvicinano\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Una torre di velocità media che spara meteoriti esplosivi\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Un'aura che lancia ripetutamente scariche ai nemici al suo interno\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Aumenta il numero massimo di sentinelle\nDanno dei seguaci aumentato del 10% e possibilità colpo critico a distanza", + "HuntressAltPants": "Danno dei seguaci aumentato del 25% e velocità di movimento aumentata del 20%", + "HuntressAltShirt": "Danno dei seguaci e a distanza aumentato del 25%", + "HuntressBuckler": "Aumenta il numero massimo di sentinelle\nAumenta il danno dei seguaci del 10%", + "HuntressJerkin": "Danno dei seguaci e a distanza aumentato del 20%", + "HuntressPants": "Danno dei seguaci aumentato del 10% e velocità di movimento aumentata del 20%", + "HuntressWig": "Aumenta il numero massimo di sentinelle e la possibilità di attacco critico a distanza del 10%", + "MonkAltHead": "Aumenta il numero massimo di sentinelle e i danni da mischia e dei seguaci del 20%", + "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%", + "MonkBrows": "Aumenta il numero massimo di sentinelle e la velocità di attacco in mischia del 20%", + "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!", + "SquireAltHead": "Aumenta il numero massimo di sentinelle e ti dona 10% di danno dei seguaci", + "SquireAltPants": "Danno dei seguaci aumentato del 20%, probabilità colpi critici e velocità di movimento aumentata del 30%", + "SquireAltShirt": "Danno dei seguaci aumentato del 30% e rigenerazione vita enormemente aumentata", + "SquireGreatHelm": "Aumenta il numero massimo di sentinelle e la tua rigenerazione vita", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'Una copertura perfetta!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Per i risultati migliori, usare con dieta a base di pasta'" + }, + "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", + "MinorStats": "Migliorie minori a tutti i parametri", + "BannerBonus": "I giocatori nei dintorni ottengono un bonus contro:", + "Counterweight": "Lancia un contrappeso dopo aver colpito un nemico con uno yo-yo", + "EtherianManaCost10": "Usa 10 unità di mana eteriano per evocarne più di una", + "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..0203753 --- /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", + "3": "Aggiunta terra su terra", + "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.", + "76": "Creazione strutture.", + "77": "Aggiunta di altra erba", + "78": "Desertificazione", + "79": "Decorazione muri", + "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.", + "17": "Tieni d'occhio il premio, compra una lente!", + "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.", + "187": "Le incudini possono essere create con del ferro o acquistate da un mercante.", + "188": "Sottoterra ci sono cuori di cristallo che possono essere utilizzati per aumentare la tua vita massima. Dovrai spaccarli con il piccone.", + "189": "Se raccoglierai 5 stelle cadenti, potrai unirle per creare un oggetto che aumenterà le tue abilità magiche.", + "19": "Sei, {PlayerName}, vero? Ho sentito belle cose su di te!", + "190": "Le stelle cadono sul mondo di notte. Possono essere utilizzate per un sacco di cose utili. Se ne vedi una, cerca di afferrarla, poiché scomparirà dopo l'alba.", + "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.", + "207": "Puoi creare un rampino con un uncino e tre catene. Gli scheletri sottoterra di solito trasportano gli uncini, mentre le catene possono essere ricavate dalle barre di ferro.", + "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.", + "403": "Puoi creare una spina dorsale insanguinata usando le vertebre. Cerca di trovarti in una zona di crimtano prima di utilizzarla.", + "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?", + "71": "Perché {Merchant} continua a cercare di vendermi statue dell'angelo? Lo sanno tutti che non servono a nulla.", + "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", + "216": "Posizionamento blocco automatico: riempimento", + "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", + "29": "I personaggi difficili muoiono permanentemente", + "2": "Disconnetti", + "30": "I personaggi medi rilasciano oggetti quando muoiono", + "31": "I personaggi facili rilasciano soldi quando muoiono", + "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.", + "1": "Password errata.", + "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!", + "85": "Cimice", + "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", + "11": "Cassa di ghiaccio", + "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", + "22": "Cassa congelata", + "23": "Cassa della giungla chiusa", + "24": "Cassa della corruzione chiusa", + "25": "Cassa cremisi chiusa", + "26": "Cassa consacrata chiusa", + "27": "Cassa congelata 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}" + }, + "LegacyChestType2": { + "0": "Cassa di cristallo", + "1": "Cassa dorata" + } +} \ 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..a6e0a27 --- /dev/null +++ b/Localization/Content/it-IT/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Eschimese zombie", + "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", + "CultistArcherBlue": "Arciere cultista blu", + "Demolitionist": "Esperto in demolizioni", + "CultistArcherWhite": "Arciere cultista bianco", + "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", + "ArmedZombieEskimo": "Eschimese 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à", + "CrimsonBunny": "Coniglio di crimtano", + "CrimsonGoldfish": "Pesce rosso di crimtano", + "CrimsonPenguin": "Pinguino malvagio", + "CultistBoss": "Cultista lunatico", + "CultistBossClone": "Cultista lunatico", + "CultistDevote": "Devoto 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", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Apparizione fiamma d'ombra", + "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", + "WalkingAntlion": "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..9b2b7f9 --- /dev/null +++ b/Localization/Content/it-IT/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..d49c4b4 --- /dev/null +++ b/Localization/Content/it-IT/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "I really need some birthday text, Yorai!", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Tutti dicono di amare le torte a più piani, quindi la mia sembra un palazzo." + }, + "CyborgSpecialText": { + "Party": "Questa sarà una festa da pazzi... e anche da svitati!" + }, + "SantaClausSpecialText": { + "Party": "Suvvia! Credevi davvero che festeggio solo a Natale?" + }, + "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_Dirtfish": "Stavo tirando su un pesce bello grande quando dal lago della foresta è apparso uno zombie e ha iniziato a parlare di questo pesce feroce fatto di fango! Ha detto che riuscirebbe a soffocare dieci tizi delle sue dimensioni, o qualcosa del genere... Lo voglio! ADESSO!\n\n(Catturato in superficie, nei sotterranei e nelle caverne)", + "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_AmanitiaFungifin": "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_Slimefish": "Gli slime nella foresta sono davvero raccapriccianti. I pesci slime sono ancora più schifosi! Non voglio nuotare con gli slime, quindi tirane uno fuori dall'acqua!\n\n(Catturato ovunque)", + "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..6f0db07 --- /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", + "50": "Terraria: zagraj też w Edge of Space!", + "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_Description": "Zdobądź maksymalną liczbę punktów życia i many bez akcesoriów czy wzmocnień.", + "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_Description": "Pokonaj Pożeracza Światów, ogromnego robaka zamieszkującego Zepsucie.", + "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", + "SetInitialMaxPlayers": "Maksymalna liczba graczy (wciśnij Enter dla 8): ", + "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.", + "CaptureError": "Podczas zapisywania zdjęcia wystąpił błąd. Ponawianie próby...", + "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ę" + }, + "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", + "CraftingWindow": "Okno tworzenia", + "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", + "QuickStackToNearby": "Szybkie łączenie w pobliskich kufrach", + "Rain": "Deszcz", + "RulerOff": "Linijka wył.", + "RulerOn": "Linijka wł.", + "SettingsMenu": "Menu ustawień", + "SortInventory": "Uporządkuj ekwipunek", + "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", + "NormalDescription": "(standardowy poziom Terrarii)", + "NormalDescriptionFlavor": "Twoja podróż właśnie się rozpoczyna...", + "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": "..." + }, + "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_2": "{0} rozbija się i nie ma czego zbierać.", + "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" + } +} \ 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..8070a27 --- /dev/null +++ b/Localization/Content/pl-PL/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "20% mniejsze zużycie many", + "HallowMelee": "19% zwiększona szybkość poruszania się i walki w zwarciu", + "HallowRanged": "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", + "Turtle": "Atakujący również otrzymują pełne obrażenia", + "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%", + "Bone": "20% szans niezużycia amunicji", + "Spider": "Zwiększa obrażenia sług o 12%", + "Ninja": "33% szans niezużycia rzucanego przedmiotu", + "Fossil": "50% szans niezużycia rzucanego przedmiotu", + "Solar": "Z czasem tworzą się chroniące cię tarcze słoneczne,\nmożesz zużyć moc tarczy, żeby wykonać zryw, zadając przeciwnikom obrażenia", + "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ę", + "Nebula": "Zadawanie obrażeń wrogom może spowodować powstanie intensyfikatorów wzmocnień,\nzbieraj je, żeby zyskiwać nakładające się na siebie wzmocnienia", + "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ę", + "Calm": "Zmniejszona agresja przeciwników", + "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", + "Fishing": "Zwiększony poziom wędkarstwa", + "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", + "PetParrot": "Polly chce krakersa", + "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ć", + "WellFed": "Niewielkie ulepszenie wszystkich statystyk", + "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ć" + }, + "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", + "ShadowDodge": "Unik cienia", + "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" + }, + "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" + } +} \ 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..7e05c9d --- /dev/null +++ b/Localization/Content/pl-PL/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Fioletowy śluz", + "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", + "OilRagSconse": "Kinkiet naftowy", + "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", + "FrozenChest": "Zamarznięty 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)", + "MusicBoxSpace": "Pozytywka (kosmos)", + "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)", + "MusicBoxOcean": "Pozytywka (ocean)", + "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", + "ZombieEskimoBanner": "Sztandar eskimoskiego zombie", + "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", + "SpookyPlatform": "Straszna platforma", + "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", + "AmanitiaFungifin": "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", + "BlueCultistCasterBanner": "Sztandar niebieskich magów-kultystów", + "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", + "IceChest": "Lodowy kufer", + "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", + "EskimoHood": "Eskimoski kaptur", + "EskimoCoat": "Eskimoski płaszcz", + "EskimoPants": "Eskimoskie spodnie", + "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", + "PinkEskimoHood": "Różowy, eskimoski kaptur", + "PinkEskimoCoat": "Różowy, eskimoski płaszcz", + "Minishark": "Minirekin", + "PinkEskimoPants": "Różowe, eskimoskie spodnie", + "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", + "AncientCultistTrophy": "Starożytne trofeum kultystów", + "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", + "BossMaskCultist": "Starożytna maska kultystów", + "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", + "DevDye": "Krew Skiphsa", + "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_FrozenChest": "Pułapka: Zamarznięty 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_IceChest": "Pułapka: Lodowy 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", + "SandFallBlock": "Piaskospad", + "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", + "SkiphsHelm": "Maska Skiphsa", + "SkiphsPants": "Niedźwiedzie nogawice Skiphsa", + "SkiphsShirt": "Skóra Skiphsa", + "SkiphsWings": "Łapy Skiphsa", + "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", + "SnowFallBlock": "Śniegospad", + "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", + "UltraBrightCampfire": "Ultrajasne ognisko", + "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", + "DynastyPlatform": "Platforma 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", + "ArkhalisHat": "Kaptur Arkhalis", + "ArkhalisShirt": "Gorset Arkhalis", + "ArkhalisPants": "Rajstopy Arkhalis", + "ArkhalisWings": "Skrzydła Arkhalis", + "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", + "PaintScraper": "Używany do usuwania farby", + "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ę", + "HoneyComb": "Po otrzymaniu obrażeń uwalnia pszczoły", + "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ł", + "PygmyNecklace": "Zwiększa maksymalną liczbę sług gracza", + "TikiMask": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 10%", + "TikiShirt": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 10%", + "TikiPants": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 10%", + "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", + "BeeCloak": "Wypuszcza pszczoły i sprawia, że spadają gwiazdy, gdy gracz otrzyma obrażenia", + "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", + "FrozenTurtleShell": "Tworzy wokół posiadacza skorupę, która go chroni, gdy ma on poniżej 50% punktów życia", + "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", + "Stynger": "Strzela wybuchowymi pociskami", + "FlowerPow": "Strzela w pobliskich wrogów ostrymi jak brzytwa płatkami kwiatków", + "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%", + "PanicNecklace": "Po otrzymaniu obrażeń zwiększa szybkość poruszania się", + "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", + "HeatRay": "Strzela przeszywającym promieniem ciepła\n„Oolaa!”", + "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", + "MagicQuiver": "Zwiększa obrażenia o 10%, a także znacznie zwiększa szybkość strzał\n20% szans niezużycia strzał", + "MagmaStone": "Zadaje obrażenia od ognia", + "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", + "FireGauntlet": "Zwiększa odrzut od ataków w zwarciu i zadaje obrażenia od ognia\n10% zwiększone obrażenia w walce w zwarciu oraz szybkość", + "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", + "FrozenKey": "Odblokowuje zamarznięty kufer w lochu", + "SpectrePaintbrush": "Używany w połączeniu z farbą do malowania bloków", + "SpectrePaintRoller": "Używany w połączeniu z farbą do malowania ścian", + "SpectrePaintScraper": "Używany do usuwania farby", + "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", + "ShroomiteBreastplate": "13% większa szansa na dystansowe trafienie krytyczne\n20% szans niezużycia amunicji", + "ShroomiteLeggings": "7% większa szansa na dystansowe trafienie krytyczne\n12% zwiększona szybkość poruszania się", + "Autohammer": "Zamienia sztabki zielenicowe w sztabki grzybielenicowe", + "SDMG": "50% szans niezużycia amunicji\n„Pochodzi z Edge of Space”", + "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", + "StaffoftheFrostHydra": "Przyzywa potężną, mroźną hydrę, która zieje lodem w twoich wrogów", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Mały wybuch niszczący niektóre płytki", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 11%", + "SpookyBreastplate": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 11%", + "SpookyLeggings": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 11%", + "CursedSapling": "Przyzywa przeklęte drzewko, które za tobą podąża", + "PumpkinMoonMedallion": "Przyzywa dyniowy księżyc", + "NecromanticScroll": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 10%", + "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", + "FrostsparkBoots": "Pozwala latać, superszybko biegać i daje dodatkową zwinność na lodzie\n7% zwiększona szybkość poruszania się", + "FartInABalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku", + "PapyrusScarab": "Zwiększa maksymalną liczbę sług gracza\nZwiększa odrzut i obrażenia sług", + "CelestialStone": "Niewielki wzrost obrażeń, szybkości walki w zwarciu, szansy na trafienie krytyczne\nregeneracji życia, obrony, szybkości podnoszenia i odrzutu sług", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nPrzytrzymaj W DÓŁ i SKOK, żeby latać", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Przyzywa renifera, którego można dosiąść", + "CnadyCanePickaxe": "Może wydobywać meteoryt", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Daje odporność na efekty chłodu i zamrożenia", + "Coal": "„Grzeczność nie była w tym roku twoją najmocniejszą stroną”", + "Toolbox": "Zwiększa zasięg narzędzi oraz umieszczania przedmiotów o 1", + "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ę", + "StaffofRegrowth": "Tworzy trawę i mech na ziemi i kamieniu\nUżywany do zbieractwa zwiększa liczbę zbieranych roślin wykorzystywanych w alchemii", + "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", + "ExtendoGrip": "Zwiększa zasięg płytek", + "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", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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ć”.", + "GoldenCarp": "Ładnie się świeci. To nie są tanie rzeczy.", + "MiningPotion": "Zwiększa szybkość kopania o 25%", + "HeartreachPotion": "Zwiększa zasięg podnoszenia serc życia", + "CalmingPotion": "Zmniejsza agresję przeciwników", + "BuilderPotion": "Zwiększa szybkość i zasięg układania obiektów", + "TitanPotion": "Zwiększa odrzut", + "FlipperPotion": "Pozwala ci szybko poruszać się w cieczach", + "SummoningPotion": "Zwiększa maksymalną liczbę sług gracza", + "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%", + "StickyBomb": "„Może ciężko się rzucać”.", + "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ł", + "FishingPotion": "Zwiększa umiejętności wędkarskie", + "SonarPotion": "Wykrywa rybę, która połknęła haczyk", + "CratePotion": "Zwiększa szansę wyłowienia skrzyni", + "WarmthPotion": "Zmniejsza obrażenia od źródeł zimna", + "BeeHeadgear": "Zwiększa obrażenia sług o 4%\nZwiększa maksymalną liczbę sług gracza", + "BeeBreastplate": "Zwiększa obrażenia sług o 4%\nZwiększa maksymalną liczbę sług gracza", + "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", + "AnglerHat": "Zwiększa poziom wędkarstwa", + "AnglerVest": "Zwiększa poziom wędkarstwa", + "AnglerPants": "Zwiększa poziom wędkarstwa", + "Sunglasses": "„Świetnie w nich wyglądasz!”", + "SpiderMask": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 6%", + "SpiderBreastplate": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 6%", + "SpiderGreaves": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 6%", + "HighTestFishingLine": "Żyłka nigdy nie pęka", + "AnglerEarring": "Zwiększa umiejętności wędkarskie", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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”", + "GoldenKey": "Otwiera jeden złoty kufer lub kufer z lochu", + "ShadowKey": "Otwiera wszystkie kufry cienia", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "Może zdezorientować przeciwnika\n„Odnajdź swój pokój”", + "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", + "Toolbelt": "Zwiększa zasięg układania bloków", + "HolyWater": "Rozprzestrzenia efekt Bajkowa na niektóre bloki", + "UnholyWater": "Rozprzestrzenia efekt Zepsucia na niektóre bloki", + "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", + "Ruler": "Tworzy na ekranie linie pomiarowe ułatwiające ustawianie bloków", + "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!”", + "DarkShard": "„Czasami mają go stworzenia ze spaczonych zepsuciem pustyń”", + "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ć", + "StarCloak": "Powoduje spadanie gwiazd, gdy gracz otrzyma obrażenia", + "Megashark": "50% szans niezużycia amunicji\n„Starszy brat minirekina”", + "Shotgun": "Strzela salwą kul", + "PhilosophersStone": "Zmniejsza czas odnowienia mikstur leczenia", + "TitanGlove": "Zwiększa odrzut od ataków w zwarciu", + "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", + "MechanicalWorm": "Przyzywa Niszczyciela", + "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", + "HallowedMask": "10% zwiększone obrażenia w walce w zwarciu oraz szansa na trafienie krytyczne\n10% zwiększona szybkość walki w zwarciu", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Przyzywa młodego pingwina", + "VilePowder": "Usuwa Bajkowo", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nPrzytrzymaj W GÓRĘ, żeby szybciej lecieć", + "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", + "DiscountCard": "Towary w sklepach są tańsze", + "LuckyCoin": "Atakowanie przeciwników czasami daje dodatkowe monety", + "UnicornonaStick": "„Bawię się jak nigdy!”", + "SandstorminaBottle": "Daje posiadaczowi umiejętność ulepszonego podwójnego skoku", + "CharmofMyths": "Daje regenerację życia i skraca czas odnowienia mikstur leczenia", + "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ń", + "WaterWalkingBoots": "Pozwala chodzić po wodzie", + "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ę", + "PowerGlove": "Zwiększa odrzut od ataków w zwarciu\n12% zwiększona szybkość walki w zwarciu", + "LightningBoots": "Pozwala latać\nPosiadacz może niezwykle szybko biegać", + "SunStone": "Zwiększa wszystkie statystyki, gdy jest używany za dnia", + "MoonStone": "Zwiększa wszystkie statystyki, gdy jest używany nocą", + "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ę", + "ObsidianWaterWalkingBoots": "Pozwala chodzić po wodzie\nDaje odporność na bloki ognia", + "LavaWaders": "Pozwala chodzić po wodzie i lawie\nDaje odporność na bloki ognia i 7-sekundową odporność na lawę", + "BoneWand": "Umieszcza kości", + "LeafWand": "Umieszcza liście", + "FlyingCarpet": "Pozwala posiadaczowi przez kilka sekund unosić się w powietrzu", + "AvengerEmblem": "12% zwiększone obrażenia", + "MechanicalGlove": "Zwiększa odrzut od ataków w zwarciu\n12% zwiększone obrażenia oraz szybkość ataku w zwarciu", + "LandMine": "Wybucha, gdy się na nią stanie", + "PaladinsShield": "Pochłania 25% obrażeń zadanych graczom z twojej drużyny\nAktywna tylko powyżej 25% punktów życia", + "Umbrella": "Trzymając ten przedmiot, będziesz wolniej spadać", + "ChlorophyteOre": "„Reaguje na światło”", + "SteampunkWings": "Daje umiejętność latania i powolnego upadku", + "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!", + "CookedMarshmallow": "{$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", + "Extractinator": "Zamienia muł/breję/skamieliny w coś bardziej użytecznego\n„Używasz, umieszczając muł/breję/skamieliny w ekstraktorze”", + "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", + "AncientBattleArmorPants": "Zwiększa maksymalną liczbę sług gracza", + "AncientBattleArmorShirt": "Zwiększa maksymalną liczbę punktów many o 80", + "AncientHorn": "Przyzywa bazyliszka, którego można dosiąść", + "AnglerTackleBag": "Żyłka nigdy nie pęknie, zmniejsza szanse ryby na połknięcie przynęty, zwiększa umiejętności wędkarskie", + "ArchitectGizmoPack": "Zwiększa szybkość i zasięg ustawiania płytek i ścian\nAutomatycznie maluje umieszczone przedmioty", + "AviatorSunglasses": "Uwalnia twojego wewnętrznego pilota\n„Przebierz się za streamerów!”", + "Bacon": "{$CommonItemTooltip.MinorStats}\n„Bekon? Bekon.”", + "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ę.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nLatająca, satelitarna platforma walkirii jest całkowicie bezpieczna. W większości przypadków.", + "BewitchingTable": ", jeśli chcesz więcej sług", + "Bladetongue": "Przy zderzeniu wypuszcza strumień ichoru", + "BlessedApple": "Przyzywa jednorożca, którego można dosiąść", + "BloodWater": "Rozprzestrzenia efekt Szkarłatu na niektóre bloki", + "BombFish": "Mały wybuch niszczący niektóre płytki", + "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", + "BottomlessBucket": "Zawiera nieskończoną ilość wody", + "BouncyBomb": "Mały wybuch niszczący niektóre płytki\nSkacze jak pasikonik", + "BouncyDynamite": "„Ten pomysł okaże się fatalny w skutkach”", + "BouncyGlowstick": "Działa, kiedy go zmoczysz", + "BouncyGrenade": "Mały wybuch, który nie niszczy płytek\nSkacze jak pasikonik", + "BrainOfConfusion": "Może zdezorientować pobliskich wrogów, kiedy gracz otrzyma obrażenia", + "BrainScrambler": "Przyzywa scutlixa, którego można dosiąść", + "BubbleGun": "Strzela szybko potężnymi bańkami", + "ButchersChainsaw": "Z trafionych przeciwników aż iskry idą", + "CelestialShell": "Nocą zamienia posiadacza w wilkołaka, a podczas wchodzenia do wody w ryboludzia\nNiewielki wzrost wszystkich statystyk", + "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ć", + "FossilHelm": "20% zwiększona prędkość rzutu", + "FossilPants": "15% większa szansa na trafienie krytyczne rzutu", + "FossilShirt": "20% zwiększone obrażenia rzutu", + "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", + "GreedyRing": "Zwiększa zasięg podnoszenia monet i obniża ceny towarów w sklepach\nAtakowanie przeciwników czasami daje dodatkowe monety", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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...", + "LokisWings": "{$CommonItemTooltip.DevItem}\nNiech twoje plany będą ciemne i nieprzeniknione jak noc, a gdy ruszasz, uderzaj jak piorun.", + "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”", + "MoonlordTurretStaff": "Przyzywa księżycowy portal, który strzela laserem w twoich przeciwników", + "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", + "NinjaHood": "15% zwiększona prędkość rzutu", + "NinjaPants": "10% większa szansa na trafienie krytyczne rzutu", + "NinjaShirt": "15% zwiększone obrażenia rzutu", + "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", + "QueenSpiderStaff": "Przyzywa królową pająków, która pluje jajami w twoich wrogów", + "Radar": "Wykrywa pobliskich wrogów", + "RainbowCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "RainbowCrystalStaff": "Przyzywa promienny kryształ, który usuwa twoich wrogów\n„I te kolory!”", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Napchaj się. Napchaj kogoś innego. Bez różnicy.", + "SlimeGun": "Strzela nieszkodliwym strumieniem szlamu", + "SlimySaddle": "Przyzywa szlama, którego można dosiąść", + "SnowCloudBlock": "Zimno tutaj", + "SnowFallBlock": "Dużo lepszy niż śnieżna kula", + "SnowFallWall": "Dużo lepszy niż śnieżna kula", + "SolarEruption": "„Uderz furią słońca”", + "SolarFlareBreastplate": "22% zwiększone obrażenia w walce w zwarciu\nWrogowie częściej biorą cię na cel", + "SolarFlareHelmet": "17% większa szansa na trafienie krytyczne w walce w zwarciu\nWrogowie częściej biorą cię na cel", + "SolarFlareLeggings": "15% zwiększona szybkość poruszania się i walki w zwarciu\nWrogowie częściej biorą cię na cel", + "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", + "StardustBreastplate": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 22%", + "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?”", + "StardustHelmet": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 22%", + "StardustLeggings": "Zwiększa maksymalną liczbę sług gracza\nZwiększa obrażenia sług o 22%", + "StardustMonolith": "„Posiądź cząstkę mocy z wieży pyłu gwiezdnego”", + "StickyDynamite": "„Może ciężko się rzucać”.", + "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}", + "ViciousPowder": "Usuwa Bajkowo", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nCokolwiek to akcesorium by nie robiło, to nie jest błąd!", + "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}", + "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„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}", + "ApprenticeAltHead": "Zwiększa maksymalną liczbę wartowników\n10% zwiększone obrażenia sług i obrażenia magiczne", + "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", + "ApprenticeHat": "Zwiększa twoją maksymalną liczbę wartowników i zmniejsza koszt many o 10%", + "ApprenticeRobe": "20% zwiększone obrażenia sług oraz 10% zwiększone obrażenia magiczne", + "ApprenticeStaffT3": "Chlapie wyziewami zmniejszającymi obronę!", + "ApprenticeTrousers": "10% zwiększone obrażenia sług oraz 20% zwiększona szybkość poruszania się", + "BookStaff": "Ciekawe, kto wsadził księgę nieskończonej mądrości na kijek...\n, żeby rzucić potężne tornado", + "DD2BallistraTowerT1Popper": "Wolna, lecz zadająca duże obrażenia wieża, która strzela przeszywającymi pociskami\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Pułapka, która wybucha, gdy zbliży się do niej przeciwnik\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Wieża o przeciętnej szybkości, która strzela wybuchającymi kulami ognia\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Aura wielokrotnie uderzająca przeciwnika, który wejdzie w jej pole rażenia\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Zwiększa maksymalną liczbę wartowników\n10% zwiększone obrażenia sług oraz dystansowa szansa na trafienie krytyczne", + "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", + "HuntressBuckler": "Zwiększ maksymalną liczbę wartowników\nZwiększa obrażenia sług o 10%", + "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ę", + "HuntressWig": "Zwiększa maksymalną liczbę wartowników oraz szansę na dystansowe trafienie krytyczne o 10%", + "MonkAltHead": "Zwiększa maksymalną liczbę wartowników, a także zwiększa o 20% obrażenia sług i obrażenia w walce w zwarciu", + "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", + "MonkBrows": "Zwiększa maksymalną liczbę wartowników, a także zwiększa o 20% szybkość ataku w zwarciu", + "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!", + "SquireAltHead": "Zwiększa maksymalną liczbę wartowników, a także zwiększa o 10% obrażenia sług", + "SquireAltPants": "20% zwiększone obrażenia sług i szansa na trafienie krytyczne, a także 30% zwiększona szybkość poruszania się", + "SquireAltShirt": "30% zwiększone obrażenia sług oraz znacznie zwiększona regeneracja życia", + "SquireGreatHelm": "Zwiększa maksymalną liczbę wartowników, a także zwiększa regenerację życia", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'Pojechana! Co to właściwie znaczy?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Najlepiej połączyć go z dietą makaronową'" + }, + "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ć", + "MinorStats": "Niewielkie ulepszenie wszystkich statystyk", + "BannerBonus": "Pobliscy gracze otrzymują premię w walce z następującymi przeciwnikami: ", + "Counterweight": "Rzuca przeciwwagę po trafieniu przeciwnika przy pomocy jojo", + "EtherianManaCost10": "Zużyj 10 kryształów etheriańskiej many, żeby przywołać więcej niż 1", + "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..f9faa47 --- /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", + "3": "Zamiatanie ziemi pod ziemię", + "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.", + "76": "Generowanie struktur.", + "77": "Dodawanie trawy", + "78": "Pustynie", + "79": "Upiększanie ścian", + "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.", + "17": "Nie spuszczaj celu z oka, kup soczewkę!", + "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.", + "187": "Kowadło robi się z żelaza albo kupuje u kupca.", + "188": "Pod ziemią znajdziesz kryształowe serca, którymi zwiększasz swoje maksymalne punkty życia. Rozbijesz je za pomocą kilofa.", + "189": "Jeśli zbierzesz 5 spadających gwiazd, możesz je połączyć, tworząc przedmiot zwiększający twoją moc magiczną.", + "19": "{PlayerName}, tak? Mam dobre wieści!", + "190": "Gwiazdy spadają w nocy na całym obszarze. Można je wykorzystywać na przeróżne, użyteczne sposoby. Nie przegap żadnej, bo znikają po wschodzie słońca.", + "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.", + "207": "Używając haka i 3 łańcuchów, wykonasz hak wspinaczkowy. Łańcuchy stworzysz z żelaznych sztabek, a haki znajdziesz przy szkieletach w podziemiach.", + "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.", + "403": "Używając kręgów, stworzysz krwawy kręgosłup. Musisz znajdować się na szkarłatnym obszarze.", + "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?", + "71": "Czemu {Merchant} ciągle wciska mi posągi aniołów? Każdy wie, że one nic nie robią.", + "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", + "216": "Inteligentne rozmieszczanie bloków: Wypełnianie", + "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", + "29": "Postacie na poziomie hardcore giną nieodwracalnie", + "2": "Rozłącz się", + "30": "Postacie na średnim poziomie upuszczają przedmioty po śmierci", + "31": "Postacie na łatwym poziomie upuszczają pieniądze po śmierci", + "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.", + "1": "Nieprawidłowe hasło.", + "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!", + "85": "Robak", + "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", + "11": "Lodowy kufer", + "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", + "22": "Zamarznięty kufer", + "23": "Zamknięty kufer z dżungli", + "24": "Zamknięty kufer zepsucia", + "25": "Zamknięty, szkarłatny kufer", + "26": "Zamknięta, bajkowa skrzynia", + "27": "Zamknięty, zamarznięty kufer", + "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}" + }, + "LegacyChestType2": { + "0": "Kryształowy kufer", + "1": "Złoty kufer" + } +} \ 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..5336b00 --- /dev/null +++ b/Localization/Content/pl-PL/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Eskimoski zombie", + "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", + "CultistArcherBlue": "Niebieski łucznik-kultysta", + "Demolitionist": "Dewastator", + "CultistArcherWhite": "Biały łucznik-kultysta", + "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", + "ArmedZombieEskimo": "Eskimoski 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", + "CrimsonBunny": "Szkarłatny króliczek", + "CrimsonGoldfish": "Szkarłatna złota rybka", + "CrimsonPenguin": "Niecny pingwin", + "CultistBoss": "Obłąkany kultysta", + "CultistBossClone": "Obłąkany kultysta", + "CultistDevote": "Obłąkany zelant", + "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", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Zjawa cienistego płomienia", + "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", + "WalkingAntlion": "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..962b17f --- /dev/null +++ b/Localization/Content/pl-PL/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..d626d25 --- /dev/null +++ b/Localization/Content/pl-PL/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "Yorai, nie mam żadnego tekstu urodzinowego!", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Wszyscy mówili, że lubią torty kominowe, więc włożyłam do swojego kilka kominów." + }, + "CyborgSpecialText": { + "Party": "Dokręcimy dziś śrubę!" + }, + "SantaClausSpecialText": { + "Party": "Daj spokój, chyba nie myślisz, że bawię się tylko na święta?" + }, + "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_Dirtfish": "Właśnie wyciągałem dużą sztukę, kiedy ten zabawny, gadający zombie wyskoczył z leśnego jeziora i zaczął bredzić coś o „tych dzikich rybach ulepionych z brudu”! Mówi, że taka ryba da radę udusić 10 takich jak on, albo coś w tym rodzaju... Muszę ją mieć! Już!\n\n(można złapać na Powierzchni, w Podziemiach i Jaskiniach)", + "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_AmanitiaFungifin": "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_Slimefish": "Te leśne szlamy są obrzydliwe. Ryboszlamy są jeszcze gorsze! Nie będę pływać ze szlamami, więc skubnij jedną dla mnie prosto z wody!\n\n(można złapać gdziekolwiek)", + "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..d363645 --- /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", + "50": "Terraria: Experimente também o Edge of Space!", + "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_Description": "Obtenha o máximo de vida e de mana sem usar acessórios ou bônus.", + "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_Description": "Derrote o Devorador de Mundos, um verme enorme, que vive na corrupção.", + "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.", + "SetInitialMaxPlayers": "Limite de Jogadores (pressione enter para 8): ", + "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.", + "CaptureError": "Ocorreu um erro durante a gravação da captura. Tentando outra vez...", + "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" + }, + "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", + "CraftingWindow": "Criando janela", + "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", + "QuickStackToNearby": "Pilha rápida para baús próximos", + "Rain": "Chuva", + "RulerOff": "Régua Desligada", + "RulerOn": "Régua Ligada", + "SettingsMenu": "Menu de Configurações", + "SortInventory": "Organizar Inventário", + "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", + "NormalDescription": "(A Experiência Padrão do Terraria)", + "NormalDescriptionFlavor": "Sua Jornada Começou...", + "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": "..." + }, + "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_2": "Não vai dar para reconstruir {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)" + } +} \ 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..b2d7613 --- /dev/null +++ b/Localization/Content/pt-BR/Game.json @@ -0,0 +1,549 @@ +{ + "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", + "HallowCaster": "20% de redução no consumo de mana", + "HallowMelee": "19% de aumento na velocidade do ataque físico e do movimento", + "HallowRanged": "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", + "Turtle": "Os atacantes também sofrem dano total", + "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%", + "Bone": "20% de chance de não consumir munição", + "Spider": "Aumenta os danos causados por lacaios em 12%", + "Ninja": "33% de chance de não consumir itens arremessados", + "Fossil": "50% de chance de não consumir itens arremessados", + "Solar": "Escudos solares são gerados com o tempo, protegendo você,\nconsuma o escudo para correr, causando danos a inimigos", + "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", + "Nebula": "Ferir inimigos poderá fazer surgir reforços,\nescolha reforços para receber bônus cumulativos", + "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", + "Calm": "Redução na agressão dos inimigos", + "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", + "Fishing": "Aumento no nível de pescaria", + "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", + "PetParrot": "Louro quer bolacha", + "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", + "WellFed": "Pequenas melhorias em todas as estatísticas", + "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" + }, + "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", + "ShadowDodge": "Desvio da sombra", + "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" + }, + "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" + } +} \ 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..a57190f --- /dev/null +++ b/Localization/Content/pt-BR/Items.json @@ -0,0 +1,5512 @@ +{ + "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", + "PurpleMucos": "Muco Roxo", + "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", + "OilRagSconse": "Lanterna de Óleo", + "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", + "FrozenChest": "Baú Congelado", + "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)", + "MusicBoxSpace": "Caixinha de Música (Espaço)", + "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)", + "MusicBoxOcean": "Caixinha de Música (Oceano)", + "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", + "ZombieEskimoBanner": "Bandeira do Esquimó Zumbi", + "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", + "SpookyPlatform": "Plataforma 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", + "AmanitiaFungifin": "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", + "BlueCultistCasterBanner": "Bandeira do Feiticeiro Cultista Azul", + "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", + "IceChest": "Baú de Gelo", + "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", + "EskimoHood": "Capuz Esquimó", + "EskimoCoat": "Capa Esquimó", + "EskimoPants": "Calça Esquimó", + "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", + "PinkEskimoHood": "Capuz de Esquimó Cor-de-rosa", + "PinkEskimoCoat": "Capa de Esquimó Cor-de-rosa", + "Minishark": "Mini-tubarão", + "PinkEskimoPants": "Calça de Esquimó Cor-de-rosa", + "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", + "AncientCultistTrophy": "Troféu Antigo do Cultista", + "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", + "BossMaskCultist": "Máscara Cultista Antiga", + "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", + "DevDye": "Sangue de Skiphs", + "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_FrozenChest": "Preso Baú Congelado", + "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_IceChest": "Preso Baú de Gelo", + "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", + "SandFallBlock": "Cascata 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", + "SkiphsHelm": "Máscara de Skiphs", + "SkiphsPants": "Traseiro de Urso de Skiphs", + "SkiphsShirt": "Pele de Skiphs", + "SkiphsWings": "Patas de Skiphs", + "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", + "SnowFallBlock": "Nevada", + "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", + "UltraBrightCampfire": "Fogueira Ultra Brilhante", + "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", + "DynastyPlatform": "Plataforma 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", + "ArkhalisHat": "Capuz de Arkhalis", + "ArkhalisShirt": "Corpete de Arkhalis", + "ArkhalisPants": "Collant de Arkhalis", + "ArkhalisWings": "Asas de Luz de Arkhalis", + "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", + "PaintScraper": "Utiliza-se para remover tinta", + "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", + "HoneyComb": "Libera abelhas quando sofrer danos", + "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ê", + "PygmyNecklace": "Aumenta o número máximo de lacaios que você pode ter", + "TikiMask": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 10%", + "TikiShirt": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 10%", + "TikiPants": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 10%", + "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", + "BeeCloak": "Faz com que estrelas caiam e libera abelhas quando ferido", + "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", + "FrozenTurtleShell": "Cria uma concha ao redor do usuário quando estiver com menos de 50% de vida, reduzindo os danos", + "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", + "Stynger": "Atira um raio explosivo", + "FlowerPow": "Atira pétalas de flores afiadíssimas em inimigos próximos", + "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%", + "PanicNecklace": "Aumenta a velocidade de movimentos depois de ser atingido", + "LifeFruit": "Aumenta a vida máxima permanentemente em 5", + "LihzahrdPowerCell": "Utilizada no Altar lagharto", + "Picksaw": "Capaz de minerar tijolos lagharto", + "HeatRay": "Atira um raio de calor perfurante\n'Oolaa!!'", + "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", + "MagicQuiver": "Aumenta os danos causados em 10% e aumenta bastante a velocidade de flechas\n20% de chance de não gastar flechas", + "MagmaStone": "Inflige dano por fogo ao atacar", + "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", + "FireGauntlet": "Aumenta o poder de derrubar e inflige dano por fogo em ataques físicos\n10% de aumento nos danos por ataque físico e na velocidade", + "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", + "FrozenKey": "Desbloqueia um baú congelado no calabouço", + "SpectrePaintbrush": "Utiliza-se com tinta para colorir blocos", + "SpectrePaintRoller": "Utiliza-se com tinta para colorir paredes", + "SpectrePaintScraper": "Utiliza-se para remover tinta", + "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", + "ShroomiteBreastplate": "13% de aumento na chance de acerto crítico à distância\n20% de chance de não consumir munição", + "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", + "SDMG": "50% de chance de não consumir munição\n'Ele veio do espaço sideral'", + "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", + "StaffoftheFrostHydra": "Invoca uma poderosa hidra congelada que cospe gelo em seus inimigos", + "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}", + "DTownsWings": "{$CommonItemTooltip.DevItem}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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", + "Bomb": "Uma pequena explosão que destruirá algumass peças", + "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", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "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}", + "SpookyHelmet": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 11%", + "SpookyBreastplate": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 11%", + "SpookyLeggings": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 11%", + "CursedSapling": "Invoca uma plantinha amaldiçoada para seguir você", + "PumpkinMoonMedallion": "Invoca a Lua de abóbora", + "NecromanticScroll": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 10%", + "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", + "FrostsparkBoots": "Permite voar, correr em altíssima velocidade e garante maior mobilidade no gelo\n7% de aumento na velocidade dos movimentos", + "FartInABalloon": "Permite pulos duplos\nAumenta a altura dos pulos", + "PapyrusScarab": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos e as quedas dos seus lacaios", + "CelestialStone": "Pequeno aumento nos danos, na velocidade dos ataques físicos, na chance de acertos críticos,\nregeneração da vida, defesa, velocidade da picareta e recuo de lacaios", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\nMantenha pressionado PARA BAIXO e PULO para pairar", + "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", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "Invoca uma rena que pode ser montada", + "CnadyCanePickaxe": "Pode minerar meteoritos", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "Garante imunidade contra efeitos de congelamento", + "Coal": "'Você foi malcriado este ano'", + "Toolbox": "Aumenta a criação de itens e o alcance das ferramentas em 1", + "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", + "StaffofRegrowth": "Cria grama e musgo sobre areia e pedras\nAumenta a coleta de plantas para alquimia quando usado na colheita", + "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", + "ExtendoGrip": "Aumenta o alcance das peças", + "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", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "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.'", + "GoldenCarp": "Belo brilho. Provavelmente terá um bom preço de revenda.", + "MiningPotion": "Aumenta a velocidade de mineração em 25%", + "HeartreachPotion": "Aumenta o alcance de coleta de corações", + "CalmingPotion": "Reduz a agressão dos inimigos", + "BuilderPotion": "Aumenta a velocidade e o alcance do posicionamento", + "TitanPotion": "Aumenta o recuo", + "FlipperPotion": "Permite que você mova-se rapidamente em líquidos", + "SummoningPotion": "Aumenta o número máximo de lacaios que você pode ter", + "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%", + "StickyBomb": "Pode ser difícil de arremessar.", + "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", + "FishingPotion": "Aumenta as habilidades de pescaria", + "SonarPotion": "Detecta peixes no anzol", + "CratePotion": "Aumenta as chances de obter um caixote", + "WarmthPotion": "Reduz os danos sofridos por fontes de frio", + "BeeHeadgear": "Aumenta os danos causados por lacaios em 4%\nAumenta o número máximo de lacaios que você pode ter", + "BeeBreastplate": "Aumenta os danos causados por lacaios em 4%\nAumenta o número máximo de lacaios que você pode ter", + "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ê", + "AnglerHat": "Aumenta o nível de pescaria", + "AnglerVest": "Aumenta o nível de pescaria", + "AnglerPants": "Aumenta o nível de pescaria", + "Sunglasses": "Vai te deixar na moda!", + "SpiderMask": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 6%", + "SpiderBreastplate": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 6%", + "SpiderGreaves": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 6%", + "HighTestFishingLine": "Os fios de pesca nunca quebram", + "AnglerEarring": "Aumenta as habilidades de pescaria", + "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", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "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", + "GoldenKey": "Abre um Baú de Ouro ou de Calabouço", + "ShadowKey": "Abre todos os Baús das sombras", + "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", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "DaoofPow": "Tem chance de causar confusão\nEncontre sua paz interior... em pedacinhos", + "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", + "Toolbelt": "Aumenta o alcance do posicionamento de blocos", + "HolyWater": "Espalha a Consagração a alguns blocos", + "UnholyWater": "Espalha a corrupção a alguns blocos", + "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", + "Ruler": "Cria linhas com medidas na tela para o posicionamento de blocos", + "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!", + "DarkShard": "Às vezes é encontrado com criaturas em desertos corruptos", + "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", + "StarCloak": "Faz com que estrelas caiam quando sofre ferimento", + "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", + "PhilosophersStone": "Reduz o tempo de recarga da cura", + "TitanGlove": "Aumenta o recuo por ataque físico", + "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", + "MechanicalWorm": "Invoca o Destruidor", + "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", + "HallowedMask": "10% de aumento nos danos por ataque físico e na chance de ataque crítico\n10% de aumento na velocidade dos ataques físicos", + "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", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoca um filhote de pinguim", + "VilePowder": "Expulsa a Consagração", + "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", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\nMantenha pressionado PARA CIMA para subir mais rápido", + "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", + "DiscountCard": "Os preços nas lojas serão menores", + "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", + "CharmofMyths": "Oferece regeneração de vida e reduz a recarga de poções de cura", + "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", + "WaterWalkingBoots": "Permite andar sobre a água", + "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", + "PowerGlove": "Aumenta o recuo por ataque físico\n12% de aumento na velocidade do ataque físico", + "LightningBoots": "Permite o voo\nO usuário pode correr em altíssima velocidade", + "SunStone": "Aumenta todas as estatísticas se for usado durante o dia", + "MoonStone": "Aumenta todas as estatísticas se for usado durante a noite", + "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", + "ObsidianWaterWalkingBoots": "Permite andar sobre a água\nOferece imunidade a blocos de fogo", + "LavaWaders": "Permite andar sobre a água e sobre a lava\nOferece imunidade a blocos de fogo e 7 segundos de imunidade a lava", + "BoneWand": "Cria um osso", + "LeafWand": "Cria folhas", + "FlyingCarpet": "Permite que o usuário flutue por alguns segundos", + "AvengerEmblem": "12% de aumento nos danos", + "MechanicalGlove": "Aumenta o recuo por ataque físico\n12% de aumento nos danos e na velocidade dos ataques físicos", + "LandMine": "Explode quando alguém sobe em cima", + "PaladinsShield": "Absorve 25% de danos causados aos jogadores em sua equipe\nSó fica ativo com mais de 25% de vida", + "Umbrella": "Você vai cair mais lentamente enquanto estiver segurando isto", + "ChlorophyteOre": "'Reage à luz'", + "SteampunkWings": "Permite voar e desacelera a queda", + "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!", + "CookedMarshmallow": "{$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", + "Extractinator": "Transforma limo/lama/fósseis em algo mais útil\n'Para usar: Posicione o limo/a lama/os fósseis no extrator'", + "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", + "AncientBattleArmorPants": "Aumenta o número máximo de lacaios que você pode ter", + "AncientBattleArmorShirt": "Aumenta a mana máxima em 80", + "AncientHorn": "Invoca um basilisco que pode ser montado", + "AnglerTackleBag": "Os fios de pesca nunca quebram, Diminui as chances de consumo de iscas, Aumenta as habilidades de pescaria", + "ArchitectGizmoPack": "Aumenta a velocidade e o alcance de posicionamento de peças\nPinta automaticamente os objetos posicionados", + "AviatorSunglasses": "Ativa seu parceiro interior\n'Ótimo para fingir que é um streamer!'", + "Bacon": "{$CommonItemTooltip.MinorStats}\n'Bacon? Bacon.'", + "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.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\nA Barreira-Plataforma do Satélite da Valquíria é super seguro. Na maioria das vezes.", + "BewitchingTable": " para ter mais lacaios", + "Bladetongue": "Dá uma cusparada de fluxo de Ichor ao toque", + "BlessedApple": "Invoca um unicórnio que pode ser montado", + "BloodWater": "Espalha o carmim a alguns blocos", + "BombFish": "Uma pequena explosão que destruirá algumas peças", + "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", + "BottomlessBucket": "Contém uma quantidade interminável de água", + "BouncyBomb": "Uma pequena explosão que destruirá algumas peças\nMuito borrachudo", + "BouncyDynamite": "'Essa ideia não vai dar certo'", + "BouncyGlowstick": "Funciona com água", + "BouncyGrenade": "Uma pequena explosão que não destruirá peças\nMuito borrachudo", + "BrainOfConfusion": "Pode confundir inimigos próximos depois de ser atingido", + "BrainScrambler": "Invoca um Scutlix que pode ser montado", + "BubbleGun": "Dispara fortes bolhas rapidamente", + "ButchersChainsaw": "Faíscas são emitidas de inimigos atingidos", + "CelestialShell": "Transforma o usuário em um lobisomem à noite e em um tritão quando entrar na água\nPequenas melhorias em todas as estatísticas", + "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", + "FossilHelm": "20% de aumento na velocidade do arremesso", + "FossilPants": "15% de aumento na chance de acerto crítico no arremesso", + "FossilShirt": "20% de aumento nos danos por arremessos", + "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", + "GreedyRing": "Aumenta a coleta de moedas e diminui os preços nas lojas\nAcertar inimigos às vezes faz com que deixem cair mais moedas", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "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", + "JimsWings": "{$CommonItemTooltip.DevItem}", + "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...", + "LokisWings": "{$CommonItemTooltip.DevItem}\nQue os seus planos sejam sombrios e impenetráveis como a noite, e quando você mover-se, que caia como um trovão.", + "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...'", + "MoonlordTurretStaff": "Invoca um portal da Lua para disparar lasers contra seus inimigos", + "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", + "NinjaHood": "15% de aumento na velocidade do arremesso", + "NinjaPants": "10% de aumento na chance de acerto crítico no arremesso", + "NinjaShirt": "15% de aumento nos danos por arremessos", + "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", + "QueenSpiderStaff": "Invoca uma aranha rainha que cospe ovos em seus inimigos", + "Radar": "Detecta inimigos ao seu redor", + "RainbowCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "RainbowCrystalStaff": "Invoca um cristal radiante que expulsa seus inimigos\n'As cores, Duque, as cores!'", + "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}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}", + "SliceOfCake": "Pode exagerar. Faça outros exagerarem. Deixa pra lá.", + "SlimeGun": "Espirra um jato de geleia inofensivo", + "SlimySaddle": "Invoca uma Geleia que pode ser montada", + "SnowCloudBlock": "Lá em cima faz bastante frio", + "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'", + "SolarFlareBreastplate": "22% de aumento nos danos por ataques físicos\nA chance dos inimigos mirarem em você é maior", + "SolarFlareHelmet": "17% de aumento na chance de acerto crítico em ataque físico\nA chance dos inimigos mirarem em você é maior", + "SolarFlareLeggings": "15% de aumento na velocidade dos movimentos e dos ataques físicos\nA chance dos inimigos mirarem em você é maior", + "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", + "StardustBreastplate": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 22%", + "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?'", + "StardustHelmet": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 22%", + "StardustLeggings": "Aumenta o número máximo de lacaios que você pode ter\nAumenta os danos causados por lacaios em 22%", + "StardustMonolith": "'Use uma pequena quantidade da energia da Torre de Pó das Estrelas'", + "StickyDynamite": "Pode ser difícil de arremessar.", + "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}", + "ViciousPowder": "Expulsa a Consagração", + "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", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\nSeja lá o que este acessório faça, não é um bug!", + "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}", + "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'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}", + "ApprenticeAltHead": "Aumenta o número máximo de sentinelas\n10% de aumento nos danos por lacaios e magia", + "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", + "ApprenticeHat": "Aumenta o número máximo de sentinelas e reduz em 10% o custo em mana", + "ApprenticeRobe": "20% de aumento nos danos por lacaios e 10% de aumento nos danos mágicos", + "ApprenticeStaffT3": "Jorra defesa, reduzindo o miasma!", + "ApprenticeTrousers": "10% de aumento nos danos por lacaios e 20% de aumento na velocidade dos movimentos", + "BookStaff": "Quem será que enfiou um tomo de sabedoria infinita em um pedaço de madeira...\n para lançar um poderoso tornado", + "DD2BallistraTowerT1Popper": "Uma torre lenta, mas capaz de causar danos graves, que dispara raios perfurantes\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "DD2ExplosiveTrapT1Popper": "Uma armadilha que explode quando inimigos chegam perto\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "Uma torre de velocidade média, que dispara bolas de fogo explosivas\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "Uma aura que atinge repetidamente os inimigos que a penetram\n{$CommonItemTooltip.EtherianManaCost10}", + "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", + "HuntressAltHead": "Aumenta o número máximo de sentinelas\n10% de aumento nos danos por lacaios e chance de ataque à distância crítico", + "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", + "HuntressBuckler": "Aumente o número máximo de sentinelas\nAumenta os danos causados por lacaios em 10%", + "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", + "HuntressWig": "Aumenta o número máximo de sentinelas e aumenta a chance de acerto crítico à distância em 10%", + "MonkAltHead": "Aumenta o número máximo de sentinelas e aumenta em 20% os danos físicos e dos lacaios", + "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", + "MonkBrows": "Aumenta o número máximo de sentinelas e aumenta a velocidade de ataque físico em 20%", + "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!", + "SquireAltHead": "Aumenta o número máximo de sentinelas e concede 10% de danos por lacaios", + "SquireAltPants": "20% de aumento nos danos por lacaios, chance de acerto crítico e 30% de aumento na velocidade dos movimentos", + "SquireAltShirt": "30% de aumento nos danos por lacaios e aumento enorme na regeneração de vida", + "SquireGreatHelm": "Aumenta o número máximo de sentinelas e aumenta a regeneração de vida", + "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}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}", + "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é?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'Vale tudo! O que isso significa?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Para melhores resultados, use com uma dieta das massas'" + }, + "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", + "MinorStats": "Pequenas melhorias em todas as estatísticas", + "BannerBonus": "Jogadores próximos recebem um bônus contra: ", + "Counterweight": "Arremessa um contrapeso depois de atingir um inimigo com um ioiô", + "EtherianManaCost10": "Use 10 Mana de Éter para invocar mais de um", + "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..4ee12c4 --- /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", + "3": "Jogando terra atrás de terra", + "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.", + "76": "Gerando estruturas.", + "77": "Adicionando mais grama", + "78": "Criando desertos", + "79": "Decorando paredes", + "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.", + "17": "Fique de olho no prêmio, compre uma lente!", + "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.", + "187": "Bigornas podem ser criadas com ferro ou compradas de comerciantes.", + "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.", + "189": "Se você juntar 5 estrelas caídas, elas poderão ser combinadas para se criar um item que aumentará sua capacidade mágica.", + "19": "{PlayerName}, não é isso? Ouvi falar bem de você, colega!", + "190": "Estrelas caem no mundo inteiro à noite. Elas podem ser utilizadas de várias maneiras. Se vir uma, não deixe de pegá-la, pois desaparecem depois que o Sol nasce.", + "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.", + "207": "Você pode criar um gancho com corrente utilizando um gancho e 3 correntes. Esqueletos encontrados nas profundezas do subterrâneo normalmente carregam ganchos. Correntes podem ser feitas com barras de ferro.", + "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.", + "403": "Você pode criar uma espinha sangrenta com vértebras. Certifique-se de que está em uma área carmim antes de usar.", + "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?", + "71": "Por que {Merchant} continua tentando me vender estátuas de anjos? Todo mundo sabe que elas não fazem nada.", + "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", + "216": "Posicionamento de Blocos Inteligente: Preenchimento", + "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", + "29": "Personagens no modo Hardcore têm morte definitiva", + "2": "Desconectar", + "30": "Personagens no modo Mediumcore perdem os itens ao morrer", + "31": "Personagens no modo Softcore perdem dinheiro ao morrer", + "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.", + "1": "Senha incorreta.", + "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!", + "85": "Inseto", + "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", + "11": "Baú de Gelo", + "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", + "22": "Baú Congelado", + "23": "Baú da Selva Bloqueado", + "24": "Baú Corrompido Bloqueado", + "25": "Baú de Carmim Bloqueado", + "26": "Baú Consagrado Bloqueado", + "27": "Baú Congelado 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}" + }, + "LegacyChestType2": { + "0": "Baú de Cristal", + "1": "Baú de Ouro" + } +} \ 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..8af3a18 --- /dev/null +++ b/Localization/Content/pt-BR/NPCs.json @@ -0,0 +1,590 @@ +{ + "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", + "ZombieEskimo": "Esquimó Zumbi", + "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", + "CultistArcherBlue": "Arqueiro Cultista Azul", + "Demolitionist": "Especialista em Demolição", + "CultistArcherWhite": "Arqueiro Cultista Branco", + "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", + "ArmedZombieEskimo": "Esquimó 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", + "CrimsonBunny": "Coelhinho de Carmim", + "CrimsonGoldfish": "Peixe-dourado de Carmim", + "CrimsonPenguin": "Pinguim Terrível", + "CultistBoss": "Cultista Lunático", + "CultistBossClone": "Cultista Lunático", + "CultistDevote": "Devoto 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", + "FlyingAntlion": "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", + "ShadowFlameApparition": "Aparição das Chamas das Sombras", + "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", + "WalkingAntlion": "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..5a81dcb --- /dev/null +++ b/Localization/Content/pt-BR/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..b7b247f --- /dev/null +++ b/Localization/Content/pt-BR/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "Eu preciso mesmo de um texto de aniversário, Yorai!", + "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." + }, + "SteampunkerSpecialText": { + "Party": "Todo mundo disse que gosta de bolos altos, então eu instalei uma chaminé no meu." + }, + "CyborgSpecialText": { + "Party": "Esta festa vai ser loucura completa!" + }, + "SantaClausSpecialText": { + "Party": "Ora, você não achou que eu só fazia festa no Natal, achou?" + }, + "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_Dirtfish": "Eu estava puxando o grandão quando apareceu um zumbi falante engraçado do lago na floresta, dizendo algo sobre uma espécie de peixe 'feroz', feito de lama! Ele disse que o peixe era capaz de sufocar dez caras do tamanho dele, ou algo parecido... Eu quero ele! AGORA!\n\n(Capturado na Superfície, no Submundo, e nas Cavernas)", + "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_AmanitiaFungifin": "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_Slimefish": "Na floresta, as melecas são meio nojentas. Os peixes-geleia são ainda mais! Eu não quero nadar com melecas, então arranque um de lá para mim!\n\n(Capturado em Qualquer Lugar)", + "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..846a2e8 --- /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: сказка о кроликах", + "50": "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_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": "кадры в секунду", + "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": "Сервер запущен", + "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": "Bad header lead to a read buffer overflow.", + "CaptureError": "При сохранении снимка произошла ошибка. Повтор попытки...", + "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} устраивают вечеринку" + }, + "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} миль в час с востока)", + "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} миль в час", + "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": "Обычная", + "NormalDescription": "(стандартная игра Terraria)", + "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": "..." + }, + "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_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} был устранен из мира", + "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 (Польский)" + } +} \ 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..6ab6bbb --- /dev/null +++ b/Localization/Content/ru-RU/Game.json @@ -0,0 +1,549 @@ +{ + "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 % не потратить боеприпасы", + "HallowCaster": "Снижает использование маны на 20 %", + "HallowMelee": "Увеличивает скорость ближнего боя и передвижения на 19 %", + "HallowRanged": "Шанс 25 % не потратить боеприпасы", + "ShadowScale": "Увеличивает скорость движения на 15 %", + "Wood": "1 ед. защиты", + "Crimson": "Значительно ускоряет восстановление жизни", + "Frost": "Ближние и дистанционные атаки вызывают ледяной ожог", + "Tiki": "Увеличивает ваше максимальное количество питомцев", + "Palladium": "Значительно ускоряет восстановление жизни после удара по врагу", + "Orichalcum": "На вашего врага будут падать лепестки цветов, нанося дополнительный урон", + "Titanium": "Получение невосприимчивости после удара по врагу", + "Chlorophyte": "Призывает мощный лиственный кристалл, который стреляет в ближайших врагов", + "Wizard": "Увеличивает шанс критического магического урона на 10 %", + "Turtle": "Атакующие получают в ответ столько же урона", + "Meteor": "Космическая пушка стоит 0 маны", + "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": "Сжигается солнечными лучами", + "Dazed": "Движение значительно замедлено", + "DeadlySphere": "Смертельная сфера будет сражаться за вас", + "DrillMount": "Ездит на летающем буре", + "DryadsWard": "Вас защищает сила природы", + "DryadsWardDebuff": "Вас принуждает сила природы", + "Electrified": "Вы не можете двигаться", + "Endurance": "Получаемый урон снижен на 10 %", + "EyeballSpring": "За вами следует прыгающий глаз", + "FairyBlue": "За вами следует фея", + "FairyGreen": "За вами следует фея", + "FairyRed": "За вами следует фея", + "Featherfall": "Нажми ВВЕРХ или ВНИЗ, чтобы контролировать скорость спуска", + "Fishing": "Увеличивает навык рыбной ловли", + "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": "Холодный как рептилия", + "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": "поедается клетками", + "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": "Вы застряли", + "WellFed": "Немного повышает все характеристики", + "Werewolf": "Физические способности повышены", + "Wet": "С вас капает вода", + "WindPushed": "Вас сдвигает ветер!", + "Wisp": "За вами следует дух", + "WitheredArmor": "Ваша броня снижена!", + "WitheredWeapon": "Ваши атаки ослаблены!", + "Wrath": "Увеличивает урон на 10 %", + "ZephyrFish": "Любит плавать вокруг вас" + }, + "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": "Ездовой скутликс", + "ShadowDodge": "Теневое уклонение", + "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": "Рыба-зефир" + }, + "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": "/я" + } +} \ 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..cabf986 --- /dev/null +++ b/Localization/Content/ru-RU/Items.json @@ -0,0 +1,5512 @@ +{ + "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": "Шлем SWAT", + "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": "Музыкальная шкатулка (Босс 4)", + "SilverWatch": "Серебряные часы", + "Harpoon": "Гарпун", + "MusicBoxAltOverworldDay": "Музыкальная шкатулка (другой день божественного мира)", + "MusicBoxRain": "Музыкальная шкатулка (дождь)", + "MusicBoxIce": "Музыкальная шкатулка (лед)", + "MusicBoxDesert": "Музыкальная шкатулка (пустыня)", + "MusicBoxOcean": "Музыкальная шкатулка (океан)", + "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": "Знамя зачарованного меча", + "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": "Трофей Санты-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": "Рыба-зомби", + "AmanitiaFungifin": "Аманитиновая гриборыба", + "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": "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": "Плющевой сундук", + "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": "Ракета 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": "Гнилая вилка", + "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": "Аркалис", + "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": "Формат 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": "Знамя песчаного элементаля", + "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": "Великий шлем 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": "Мешок с сокровищами", + "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": "Яйцо кота", + "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": "Капюшон Архалиса", + "ArkhalisShirt": "Нагрудник Архалиса", + "ArkhalisPants": "Поножи Архалиса", + "ArkhalisWings": "Крылья легкости Архалиса", + "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", + "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Нажмите ВВЕРХ, чтобы изменить гравитацию", + "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 % и значительно увеличивает скорость стрельбы стрелами\nШанс 20 % не потратить стрелы", + "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 %\nШанс 20 % не потратить боеприпасы", + "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}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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Удерживайте ВНИЗ и ПРЫЖОК, чтобы парить", + "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": "Ночью превращает владельца в оборотня", + "Ruler": "Создает линии измерения на экране для удобства установки блоков", + "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": "Активируется каждую секунду", + "Timer3Second": "Активируется каждые 3 секунды", + "Timer5Second": "Активируется каждые 5 секунд", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Призывает ледяной легион", + "Carrot": "Призывает ручного кролика", + "Vilethorn": "Призывает злую колючку", + "Starfury": "Вызывает падение звезд с неба\nВыковано с яростью рая", + "PurificationPowder": "Уничтожает зло", + "RedsWings": "{$CommonItemTooltip.DevItem}", + "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Удерживайте ВВЕРХ, чтобы взлетать быстрее", + "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": "Позволяет летать и замедляет падение", + "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": "Выпустите своего внутреннего wingman\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": "Призывает ездовой НЛО", + "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}", + "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Познай себя, познай врага. Тысяча боев, тысяча побед...", + "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": "Станьте 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 % урон и шанс критического удара", + "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}", + "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 % дистанционный урон и шанс критического удара\nШанс 25 % не потратить боеприпасы", + "VortexHelmet": "Увеличивает дистанционный урон на 16 %\nУвеличивает шанс критического дистанционного урона на 7 %", + "VortexLeggings": "Увеличивает на 8 % дистанционный урон и шанс критического удара\nУвеличивает скорость движения на 10 %", + "VortexMonolith": "Использует немного силы от башни вихря", + "WandofSparking": "Стреляет искоркой", + "WeaponRack": "Нажмите , чтобы поместить предмет на оружейную стойку", + "WeatherRadio": "Показывает погоду", + "WeightedPressurePlateCyan": "Активируется, когда игрок наступает", + "WeightedPressurePlateOrange": "Активируется, когда игрок наступает", + "WeightedPressurePlatePink": "Активируется, когда игрок наступает", + "WeightedPressurePlatePurple": "Активируется, когда игрок наступает", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "WireBulb": "Включает лампы для каждого цвета проводов", + "WireKite": "Дает полный контроль над проводами!\nНажмите при удержании, чтобы изменить настройки проводов", + "WirePipe": "Разделяет проложенные провода\nМожно бить молотом!", + "WormholePotion": "Телепортирует вас к участнику команды\nЩелкните по их голове на полноэкранной карте", + "WormScarf": "Получаемый урон снижен на 17 %", + "XenoStaff": "Призывает НЛО, который сражается за вас", + "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.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С любовью", + "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": "Призывает ручного кота", + "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}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n\"Мне досталось это не от Грида\"", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n\"Чтобы эти прекрасные замки всегда выглядели роскошно\"", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n\"Делает попку сексуальной\"", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n\"Сюрприз Шии! Не ожидали этого от штанов?\"", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n\"Полностью включено! Что это значит?\"", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n\"Для лучшего результата сочетать с макаронной диетой\"" + }, + "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/ru-RU/Legacy.json b/Localization/Content/ru-RU/Legacy.json new file mode 100644 index 0000000..e39b404 --- /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": "Высаживание подсолнухов...", + "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": "Подожди, мне почти удалось провести сюда Wi-Fi.", + "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": "Кош, каплек Мог. Извини, на клингонском это значит «Купи что-нибудь или умри».", + "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": "Крюк-кошку можно сделать из 3 железных цепей и одного крюка. У скелетов, живущих глубоко под землей, обычно есть крючья, а цепи можно сделать из железных слитков.", + "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": "Багровые алтари обычно можно найти в Багрянце. Для создания предметов нужно быть рядом с ними.", + "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": "Запустите вторую копию игры 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": "Смарт-укладка блоков: к курсору", + "216": "Смарт-укладка блоков: заполнение", + "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": "Создать", + "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": "Взять 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": "Нельзя менять команды внутри командных блоков!", + "85": "Жук", + "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": "Плющевой сундук", + "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}" + }, + "LegacyChestType2": { + "0": "Хрустальный сундук", + "1": "Золотой сундук" + } +} \ 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..a9902e4 --- /dev/null +++ b/Localization/Content/ru-RU/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": "Зачарованный ночной ползун", + "FlyingAntlion": "Взрослый муравьиный лев", + "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": "Вихревик", + "WalkingAntlion": "Муравьиный лев-воин", + "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..895be54 --- /dev/null +++ b/Localization/Content/ru-RU/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..b460ca5 --- /dev/null +++ b/Localization/Content/ru-RU/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "Мне бы и правда не помешал поздравительный текст!", + "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": "Эта тусовка будет огонь! Или даже пожар!" + }, + "SantaClausSpecialText": { + "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": "Я как раз подсекал одну крупную рыбину, как из лесного озера выскочил забавный зомби и начал нести чушь о какой-то «свирепой» рыбе, полностью состоящей из грязи! Сказал, что такая рыба может придушить десяток ребят его размера или что-то в этом роде… Мне она нужна! НЕМЕДЛЕННО!\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_AmanitiaFungifin": "Я нашел замечательное место с гигантскими светящимися грибами! Все вокруг светилось голубым! Я начал собирать грибы, которые нашел возле сверкающего голубого озера, но тут один из них цапнул меня и уплыл! Хочу отплатить ему тем же — хорошенько его потрепать! Поэтому найди его и принеси сюда!\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": "Тебе тут не встречались Мёбрусы?", + "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..7daa447 --- /dev/null +++ b/Localization/Content/zh-Hans.json @@ -0,0 +1,697 @@ +{ + "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}正在开派对" + }, + "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": "缩放" + }, + "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": "..." + }, + "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 (波兰语)" + } +} \ 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..88a26d0 --- /dev/null +++ b/Localization/Content/zh-Hans/Game.json @@ -0,0 +1,549 @@ +{ + "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%的几率不消耗弹药", + "HallowCaster": "魔力消耗减少20%", + "HallowMelee": "近战和移动速度各提高19%", + "HallowRanged": "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": "它喜欢在你周围游泳" + }, + "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": "和风鱼" + }, + "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": "/表情" + } +} \ 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..bdc927e --- /dev/null +++ b/Localization/Content/zh-Hans/Items.json @@ -0,0 +1,5512 @@ +{ + "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": "僵尸鱼", + "AmanitiaFungifin": "毒菌鱼", + "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}" + }, + "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}", + "WillsWings": "{$CommonItemTooltip.DevItem}", + "CrownosWings": "{$CommonItemTooltip.DevItem}", + "CenxsWings": "{$CommonItemTooltip.DevItem}", + "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按住DOWN和JUMP可悬停", + "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": "在晚上将持有者变成狼人", + "Ruler": "在屏幕上创建用于放置块的测量线", + "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}", + "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按住UP可以飞得更快", + "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": "可飞行和缓慢坠落", + "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}", + "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}", + "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}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}", + "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.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“爱的回忆”", + "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}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'我没有从网格中拿到'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'为了保持甜美动人的风格'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'重获性感'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'什叶的惊喜!没想到会用在裤子上吧?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'羽翼丰满!神马意思?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'为了获得最佳结果,请搭配意大利面食'" + }, + "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..e334fdf --- /dev/null +++ b/Localization/Content/zh-Hans/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": "正在种向日葵", + "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}" + }, + "LegacyChestType2": { + "0": "水晶宝箱", + "1": "金色宝箱" + } +} \ 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..db9f61f --- /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": "附魔夜行者", + "FlyingAntlion": "蚁狮蜂", + "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": "星旋怪", + "WalkingAntlion": "蚁狮马", + "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..62c51fc --- /dev/null +++ b/Localization/Content/zh-Hans/Projectiles.json @@ -0,0 +1,718 @@ +{ + "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}" + } +} \ 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..64af159 --- /dev/null +++ b/Localization/Content/zh-Hans/Town.json @@ -0,0 +1,237 @@ +{ + "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": { + "Party": "我真的需要一些生日祝福,尤莱!", + "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": "这个派对要变成螺母了,甚至可能会变成螺栓!" + }, + "SantaClausSpecialText": { + "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_AmanitiaFungifin": "我在巨大的发光蘑菇中发现了这个惊人的地方!一切都是蓝的!我正在采摘蓝光湖畔的一些蘑菇,其中一只蘑菇突然咬了我一口,然后游走了!我想以其人之道还治其人之身,并狂咬他一顿!我的意思是,你去把它弄回来给我!\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..4aa4de2 --- /dev/null +++ b/Localization/GameCulture.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.GameCulture +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 + { + public static readonly GameCulture English = new GameCulture("en-US", 1); + public static readonly GameCulture German = new GameCulture("de-DE", 2); + public static readonly GameCulture Italian = new GameCulture("it-IT", 3); + public static readonly GameCulture French = new GameCulture("fr-FR", 4); + public static readonly GameCulture Spanish = new GameCulture("es-ES", 5); + public static readonly GameCulture Russian = new GameCulture("ru-RU", 6); + public static readonly GameCulture Chinese = new GameCulture("zh-Hans", 7); + public static readonly GameCulture Portuguese = new GameCulture("pt-BR", 8); + public static readonly GameCulture Polish = new GameCulture("pl-PL", 9); + private static Dictionary _legacyCultures; + public readonly CultureInfo CultureInfo; + public readonly int LegacyId; + + public bool IsActive => Language.ActiveCulture == this; + + public string Name => this.CultureInfo.Name; + + public static GameCulture FromLegacyId(int id) + { + if (id < 1) + id = 1; + return GameCulture._legacyCultures[id]; + } + + public static GameCulture FromName(string name) => GameCulture._legacyCultures.Values.SingleOrDefault((Func) (culture => culture.Name == name)) ?? GameCulture.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); + } + } +} diff --git a/Localization/Language.cs b/Localization/Language.cs new file mode 100644 index 0000000..8244585 --- /dev/null +++ b/Localization/Language.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.Language +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0c9260e --- /dev/null +++ b/Localization/LanguageChangeCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageChangeCallback +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d8bf4c2 --- /dev/null +++ b/Localization/LanguageManager.cs @@ -0,0 +1,237 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +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.Utilities; + +namespace Terraria.Localization +{ + public class LanguageManager + { + public static LanguageManager Instance = new LanguageManager(); + private Dictionary _localizedTexts = new Dictionary(); + private Dictionary> _categoryGroupedKeys = new Dictionary>(); + private GameCulture _fallbackCulture = GameCulture.English; + + 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) + return; + this.OnLanguageChanged(this); + } + + 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 = LanguageManager.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 static string ReadEmbeddedResource(string path) + { + using (Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path)) + { + using (StreamReader streamReader = new StreamReader(manifestResourceStream)) + return streamReader.ReadToEnd(); + } + } + + 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..bb27581 --- /dev/null +++ b/Localization/LanguageSearchFilter.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageSearchFilter +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..f9c27c1 --- /dev/null +++ b/Localization/LocalizedText.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LocalizedText +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c59767c --- /dev/null +++ b/Localization/NetworkText.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.NetworkText +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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: " + ex.ToString(); + 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..0a8e27c --- /dev/null +++ b/Main.cs @@ -0,0 +1,49788 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Main +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; +using ReLogic.Localization.IME; +using ReLogic.OS; +using ReLogic.Utilities; +using System; +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.Windows.Forms; +using Terraria.Achievements; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.Cinematics; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.GameContent.Liquid; +using Terraria.GameContent.Skies; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI; +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.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.World.Generation; + +namespace Terraria +{ + public class Main : Game + { + public const int curRelease = 194; + public const ulong WorldGeneratorVersion = 833223655425; + private const string versionStringBecauseTheyreTheSame = "v1.3.5.3"; + public const string assemblyVersionNumber = "1.3.5.3"; + public static bool RunningAchievementEnabled = true; + 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 = false; + public static bool SettingsEnabled_MinersWobble = true; + public static bool HidePassword = false; + public static bool ReversedUpDownArmorSetBonuses = false; + public static Microsoft.Xna.Framework.Color MouseBorderColor = Microsoft.Xna.Framework.Color.Transparent; + public static bool MouseShowBuildingGrid = false; + public static bool AllowUnfocusedInputOnGamepad = false; + public static bool InvisibleCursorForGamepad = true; + public static bool GamepadDisableCursorItemIconInner = true; + public static bool GamepadDisableInstructionsDisplay = false; + public static bool CrouchingEnabled = false; + public static float MouseBuildingGridAlpha = 0.0f; + public static bool CaptureModeDisabled = false; + public bool unityMouseOver; + public static Main instance; + public static string versionNumber = "v1.3.5.3"; + public static string versionNumber2 = "v1.3.5.3"; + public static string SavePath = Program.LaunchParameters.ContainsKey("-savedirectory") ? Program.LaunchParameters["-savedirectory"] : ((Platform) Platform.Current).GetStoragePath("Terraria"); + public static bool AnnouncementBoxDisabled = false; + public static int AnnouncementBoxRange = -1; + public static string AutogenSeedName; + 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; + private AchievementManager _achievements; + private static List ActiveSoundInstances = new List(128); + public static UserInterface MenuUI = new UserInterface(); + public static UserInterface InGameUI = new UserInterface(); + private static Main.OnPlayerSelected _pendingCharacterSelect; + public static bool drawBackGore = false; + public static ulong LobbyId = 0; + private static object _audioLock = new object(); + private static Microsoft.Xna.Framework.Color[] _mapColorCacheArray = new Microsoft.Xna.Framework.Color[30000]; + public static float expertLife = 2f; + public static float expertDamage = 2f; + public static float expertDebuffTime = 2f; + public static float expertKnockBack = 0.9f; + public static float expertNPCDamage = 1.5f; + public static float knockBackMultiplier = 1f; + public static float damageMultiplier = 1f; + public WaterfallManager waterfallManager; + public static WorldSections sectionManager; + public static bool ServerSideCharacter = false; + public static string clientUUID; + public static bool ContentLoaded = false; + public static int maxMsg = 121; + private static int toolTipDistance = 6; + public static float GlobalTime = 0.0f; + public static bool GlobalTimerPaused = false; + private static ulong _tileFrameSeed = (ulong) Guid.NewGuid().GetHashCode(); + private static ulong _drawCycleCounter = 0; + public static ContentManager ShaderContentManager; + public static Ref ScreenShaderRef = new Ref(); + public static Ref PixelShaderRef = new Ref(); + public static Ref TileShaderRef = new Ref(); + public static int WaveQuality = 3; + public static bool UseStormEffects = true; + public static bool UseHeatDistortion = true; + public static int npcStreamSpeed = 60; + public static int musicError = 0; + public static bool dedServFPS = false; + public static int dedServCount1 = 0; + public static int dedServCount2 = 0; + public static bool superFast = false; + public const int offLimitBorderTiles = 40; + public const int maxItemTypes = 3930; + public const int maxProjectileTypes = 714; + public const int maxNPCTypes = 580; + public const int maxTileSets = 470; + public const int maxWallTypes = 231; + public const int maxBuffTypes = 206; + public const int maxGlowMasks = 252; + public const int maxExtras = 91; + public const int maxGoreTypes = 1087; + public const int maxMusic = 42; + public const int MaxBannerTypes = 267; + public const int numArmorHead = 216; + public const int numArmorBody = 210; + public const int numArmorLegs = 161; + public const int numAccHandsOn = 20; + public const int numAccHandsOff = 12; + public const int numAccNeck = 10; + public const int numAccBack = 14; + public const int numAccFront = 5; + public const int numAccShoes = 18; + public const int numAccWaist = 13; + public const int numAccShield = 7; + public const int numAccFace = 9; + public const int numAccBalloon = 18; + public const int maxWings = 40; + public const int maxBackgrounds = 207; + public static int MaxShopIDs = 22; + public static bool[] hairLoaded = new bool[134]; + public static bool[] wingsLoaded = new bool[40]; + public static bool[] goreLoaded = new bool[1087]; + public static bool[] projectileLoaded = new bool[714]; + public static bool[] itemFlameLoaded = new bool[3930]; + public static bool[] backgroundLoaded = new bool[207]; + public static bool[] tileSetsLoaded = new bool[470]; + public static bool[] wallLoaded = new bool[231]; + public static bool[] NPCLoaded = new bool[580]; + public static bool[] armorHeadLoaded = new bool[216]; + public static bool[] armorBodyLoaded = new bool[210]; + public static bool[] armorLegsLoaded = new bool[161]; + public static bool[] accHandsOnLoaded = new bool[20]; + public static bool[] accHandsOffLoaded = new bool[12]; + public static bool[] accBackLoaded = new bool[14]; + public static bool[] accFrontLoaded = new bool[5]; + public static bool[] accShoesLoaded = new bool[18]; + public static bool[] accWaistLoaded = new bool[13]; + public static bool[] accShieldLoaded = new bool[7]; + public static bool[] accNeckLoaded = new bool[10]; + public static bool[] accFaceLoaded = new bool[9]; + public static bool[] accballoonLoaded = new bool[18]; + private static float cameraLerp = 0.0f; + private static int cameraLerpTimer = 0; + private static int cameraLerpTimeToggle = 0; + private static bool cameraGamePadLerp = false; + 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 float zoomX; + public static float zoomY; + public static float sunCircle; + public static int BlackFadeIn = 0; + public static bool noWindowBorder = false; + private RasterizerState Rasterizer = RasterizerState.CullCounterClockwise; + private static string _cachedTitle; + public static int ugBack = 0; + public static int oldUgBack = 0; + public static int[] bgFrame = new int[1]; + public static int[] bgFrameCounter = new int[1]; + 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[580]; + public static int musicBox = -1; + public static int musicBox2 = -1; + public static byte HealthBarDrawSettings = 1; + public static bool cEd = false; + public static float wFrCounter = 0.0f; + public static float wFrame = 0.0f; + public static float upTimer; + public static float upTimerMax; + public static float upTimerMaxDelay; + public static bool drawDiag = false; + public static bool drawRelease = false; + public static bool drawBetterDebug = false; + public static bool betterDebugRelease = false; + public static bool renderNow = false; + public static bool drawToScreen = false; + public static bool targetSet = false; + public static int mouseX; + public static int mouseY; + public static int lastMouseX; + public static int lastMouseY; + 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[] treeMntBG = new int[2]; + public static int[] treeBG = 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[2]; + public static int oceanBG; + 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 = false; + public static bool halloween = false; + public static int snowDust = 0; + public static bool chTitle = false; + public static bool hairWindow = false; + public static bool clothesWindow = false; + public static bool ingameOptionsWindow = false; + public static bool inFancyUI = false; + public static int keyCount = 0; + public static string[] keyString = new string[10]; + public static int[] keyInt = new int[10]; + public static byte gFade = 0; + public static float gFader = 0.0f; + public static byte gFadeDir = 1; + public static bool netDiag = false; + public static int txData = 0; + public static int rxData = 0; + public static int txMsg = 0; + public static int rxMsg = 0; + public static int[] rxMsgType = new int[Main.maxMsg]; + public static int[] rxDataType = new int[Main.maxMsg]; + public static int[] txMsgType = new int[Main.maxMsg]; + public static int[] txDataType = new int[Main.maxMsg]; + public static double UpdateTimeAccumulator = 0.0; + public static bool drawSkip = false; + public static int fpsCount = 0; + public static Stopwatch fpsTimer = new Stopwatch(); + public bool gammaTest; + public static int fountainColor = -1; + public static int monolithType = -1; + public static bool showSplash = true; + public static bool ignoreErrors = true; + public static string defaultIP = ""; + public static int dayRate = 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 = false; + public static int qaStyle = 0; + public static int zoneX = 99; + public static int zoneY = 87; + public static float harpNote = 0.0f; + public static bool[] projHostile = new bool[714]; + public static bool[] projHook = new bool[714]; + public static bool[] pvpBuff = new bool[206]; + public static bool[] persistentBuff = new bool[206]; + public static bool[] vanityPet = new bool[206]; + public static bool[] lightPet = new bool[206]; + public static bool[] meleeBuff = new bool[206]; + public static bool[] debuff = new bool[206]; + public static bool[] buffNoSave = new bool[206]; + public static bool[] buffNoTimeDisplay = new bool[206]; + public static bool[] buffDoubleApply = new bool[206]; + 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 quickBG = 2; + public static int bgDelay = 0; + public static int bgStyle = 0; + public static float[] bgAlpha = new float[10]; + public static float[] bgAlpha2 = new float[10]; + public static int EquipPage = 0; + public static int EquipPageSelected = 0; + public int mouseNPC = -1; + public static int wof = -1; + public static int wofT; + public static int wofB; + public static int wofF = 0; + 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 = false; + public static int loadMapLastX = 0; + public static bool loadMapLock = false; + public static bool loadMap = false; + public static bool mapReady = false; + public static int textureMaxWidth = 2000; + public static int textureMaxHeight = 1800; + public static bool updateMap = false; + public static int mapMinX = 0; + public static int mapMaxX = 0; + public static int mapMinY = 0; + public static int mapMaxY = 0; + 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 static bool flameRingLoaded; + private Texture2D flameRingTexture; + private Texture2D mapDeathTexture; + 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 Texture2D[] infoIconTexture = new Texture2D[14]; + public static Texture2D[] wireUITexture = new Texture2D[12]; + public static Texture2D builderAccTexture; + public static Texture2D quicksIconTexture; + public static Texture2D[] clothesTexture = new Texture2D[4]; + public static Texture2D[] mapIconTexture = new Texture2D[9]; + private static Texture2D[] underworldTexture = new Texture2D[5]; + public static Texture2D mapTexture; + private Texture2D mapBG1Texture; + private Texture2D mapBG2Texture; + private Texture2D mapBG3Texture; + private Texture2D mapBG4Texture; + private Texture2D mapBG5Texture; + private Texture2D mapBG6Texture; + private Texture2D mapBG7Texture; + private Texture2D mapBG8Texture; + private Texture2D mapBG9Texture; + private Texture2D mapBG10Texture; + private Texture2D mapBG11Texture; + private Texture2D mapBG12Texture; + private Texture2D mapBG13Texture; + private Texture2D mapBG14Texture; + private Texture2D mapBG15Texture; + private Texture2D hueTexture; + public static Texture2D colorSliderTexture; + public static Texture2D colorBarTexture; + public static Texture2D colorBlipTexture; + public static Texture2D smartDigTexture; + public static Texture2D colorHighlightTexture; + public static Microsoft.Xna.Framework.Color OurFavoriteColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 231, 69); + public static Texture2D tileCrackTexture; + public static Texture2D LockOnCursorTexture; + private Texture2D iceBarrierTexture; + public static bool mapInit = false; + public static bool mapEnabled = true; + public static int mapStyle = 1; + public static float grabMapX = 0.0f; + public static float grabMapY = 0.0f; + public static int miniMapX = 0; + public static int miniMapY = 0; + public static int miniMapWidth = 0; + public static int miniMapHeight = 0; + public static float mapMinimapScale = 1.25f; + public static float mapMinimapAlpha = 1f; + public static float mapOverlayScale = 2.5f; + public static float mapOverlayAlpha = 0.35f; + public static bool mapFullscreen = false; + public static bool resetMapFull = false; + public static float mapFullscreenScale = 4f; + public static Vector2 mapFullscreenPos = new Vector2(-1f, -1f); + private static bool IsEnginePreloaded = false; + private static bool IsEngineLoaded = false; + private static uint _gameUpdateCount = 0; + public static bool SkipAssemblyLoad = false; + private int firstTileX; + private int lastTileX; + private int firstTileY; + private int lastTileY; + private double bgParallax; + private int bgStart; + private int bgLoops; + private int bgStartY; + private int bgLoopsY; + private int bgTop; + 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 GenerationProgress AutogenProgress = new GenerationProgress(); + private Process tServer = new Process(); + 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(125, 125, (int) byte.MaxValue); + public static Microsoft.Xna.Framework.Color hcColor = new Microsoft.Xna.Framework.Color(200, 125, (int) byte.MaxValue); + 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 Microsoft.Xna.Framework.Color bgColor; + public static bool craftingHide = false; + public static bool armorHide = false; + public static float craftingAlpha = 1f; + public static float armorAlpha = 1f; + public static float[] buffAlpha = new float[206]; + public static bool hardMode = false; + 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 = 0; + public static int DiscoG = 0; + public static int teamCooldown = 0; + public static int teamCooldownLen = 300; + public static bool gamePaused = false; + public static bool gameInactive = false; + public static int updatesCountedForFPS = 0; + public static int drawsCountedForFPS = 0; + public static int uCount = 0; + public static int updateRate = 0; + public static int frameRate = 0; + public static bool RGBRelease = false; + public static bool qRelease = false; + public static bool netRelease = false; + public static bool frameRelease = false; + public static bool showFrameRate = false; + public static int magmaBGFrame = 0; + public static int magmaBGFrameCounter = 0; + public static int saveTimer = 0; + public static bool autoJoin = false; + 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 ActivePlayersCount = 0; + public static int maxNetPlayers = (int) byte.MaxValue; + public const int maxChests = 1000; + 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 = 0; + public static int slimeWarningDelay = 420; + public static float slimeRainNPCSlots = 0.65f; + public static bool[] slimeRainNPC = new bool[580]; + public static double slimeRainTime = 0.0; + public static bool slimeRain = false; + public static int slimeRainKillCount = 0; + 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 = 500; + public const int realInventory = 50; + public const int maxInventory = 58; + public int invBottom = 210; + public const int maxItemSounds = 125; + public const int maxNPCHitSounds = 57; + public const int maxNPCKilledSounds = 62; + public const int maxLiquidTypes = 12; + public static float cameraX = 0.0f; + public static bool drewLava = false; + public static float[] liquidAlpha = new float[12]; + public static int waterStyle = 0; + public static int worldRate = 1; + public static float caveParallax = 0.88f; + public static int dungeonX; + public static int dungeonY; + public static Terraria.Liquid[] liquid = new Terraria.Liquid[Terraria.Liquid.resLiquid]; + public static LiquidBuffer[] liquidBuffer = new LiquidBuffer[10000]; + public static bool dedServ = false; + public static int spamCount = 0; + public static int curMusic = 0; + public static int dayMusic = 0; + public static int ugMusic = 0; + public int newMusic; + public static bool showItemText = true; + public static bool autoSave = true; + public static bool validateSaves = true; + public static bool bannerMouseOver = false; + public static string buffString = ""; + public static string libPath = ""; + public static int lo = 0; + public static int LogoA = (int) byte.MaxValue; + public static int LogoB = 0; + public static bool LogoT = false; + public static string statusText = ""; + public static string worldName = ""; + public static int worldID; + public static int background = 0; + public static int caveBackground = 0; + public static float ugBackTransition = 0.0f; + 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 int moonPhase = 0; + public static short sunModY = 0; + public static short moonModY = 0; + public static bool grabSky = false; + public static bool bloodMoon = false; + public static bool pumpkinMoon = false; + public static bool snowMoon = false; + public static float cloudAlpha = 0.0f; + public static float maxRaining = 0.0f; + public static float oldMaxRaining = 0.0f; + public static int rainTime = 0; + public static bool raining = false; + public static bool eclipse = false; + public static float eclipseLight = 0.0f; + public static int checkForSpawns = 0; + public static int helpText = 0; + public static int BartenderHelpTextIndex = 0; + public static bool autoGen = false; + public static bool autoPause = false; + public static int[] projFrames = new int[714]; + public static bool[] projPet = new bool[714]; + public static float demonTorch = 1f; + public static int demonTorchDir = 1; + public static float martianLight = 1f; + public static int martianLightDir = 1; + public static bool placementPreview = true; + public static int[] screenTileCounts = new int[470]; + public const int maxStars = 130; + public static int numStars; + public const int maxStarTypes = 5; + public const int maxClouds = 200; + public const int maxCloudTypes = 22; + public static int weatherCounter = 0; + public static int cloudLimit = 200; + public static int numClouds = Main.cloudLimit; + public static int numCloudsTemp = Main.numClouds; + public static float windSpeedTemp = 0.0f; + public static float windSpeed = 0.0f; + public static float windSpeedSet = 0.0f; + public static float windSpeedSpeed = 0.0f; + public static Cloud[] cloud = new Cloud[200]; + public static bool resetClouds = true; + public static int sandTiles; + public static int evilTiles; + public static int shroomTiles; + public static float shroomLight; + public static int snowTiles; + public static int holyTiles; + public static int waterCandles; + public static int peaceCandles; + public static int partyMonoliths; + public static int meteorTiles; + public static int bloodTiles; + public static int jungleTiles; + public static int dungeonTiles; + public static bool sunflower; + public static bool clock; + public static bool campfire; + public static bool starInBottle; + public static bool heartLantern; + public static int fadeCounter = 0; + public static float invAlpha = 1f; + public static float invDir = 1f; + [ThreadStatic] + public static UnifiedRandom rand; + public static Texture2D[] chestStackTexture = new Texture2D[2]; + private static bool allChestStackHover = false; + private static bool inventorySortMouseOver = false; + public static Texture2D[] npcHeadTexture = new Texture2D[25]; + public static Texture2D[] npcHeadBossTexture = new Texture2D[37]; + public static Texture2D[] craftToggleTexture = new Texture2D[4]; + public static Texture2D[] inventorySortTexture = new Texture2D[2]; + public static Texture2D[] textGlyphTexture = new Texture2D[1]; + public static Texture2D[] hotbarRadialTexture = new Texture2D[3]; + public static Texture2D craftUpButtonTexture; + public static Texture2D craftDownButtonTexture; + public static Texture2D scrollLeftButtonTexture; + public static Texture2D scrollRightButtonTexture; + public static Texture2D frozenTexture; + public static Texture2D magicPixel; + public static Texture2D settingsPanelTexture; + public static Texture2D settingsPanelTexture2; + public static Texture2D miniMapFrameTexture; + public static Texture2D miniMapFrame2Texture; + public static Texture2D[] miniMapButtonTexture = new Texture2D[3]; + public static Texture2D[] destTexture = new Texture2D[3]; + public static Texture2D[] gemTexture = new Texture2D[7]; + public static Texture2D[] rudolphMountTexture = new Texture2D[3]; + public static Texture2D bunnyMountTexture; + public static Texture2D pigronMountTexture; + public static Texture2D slimeMountTexture; + public static Texture2D minecartMountTexture; + public static Texture2D turtleMountTexture; + public static Texture2D[] beeMountTexture = new Texture2D[2]; + public static Texture2D[] UFOMountTexture = new Texture2D[2]; + public static Texture2D[] drillMountTexture = new Texture2D[6]; + public static Texture2D[] scutlixMountTexture = new Texture2D[3]; + public static Texture2D unicornMountTexture; + public static Texture2D basiliskMountTexture; + public static Texture2D[] minecartMechMountTexture = new Texture2D[2]; + public static Texture2D[] cuteFishronMountTexture = new Texture2D[2]; + public static Texture2D minecartWoodMountTexture; + public static Texture2D[] wingsTexture = new Texture2D[40]; + public static Texture2D[] armorHeadTexture = new Texture2D[216]; + public static Texture2D[] armorBodyTexture = new Texture2D[210]; + public static Texture2D[] femaleBodyTexture = new Texture2D[210]; + public static Texture2D[] armorArmTexture = new Texture2D[210]; + public static Texture2D[] armorLegTexture = new Texture2D[161]; + public static Texture2D[] accHandsOnTexture = new Texture2D[20]; + public static Texture2D[] accHandsOffTexture = new Texture2D[12]; + public static Texture2D[] accBackTexture = new Texture2D[14]; + public static Texture2D[] accFrontTexture = new Texture2D[5]; + public static Texture2D[] accShoesTexture = new Texture2D[18]; + public static Texture2D[] accWaistTexture = new Texture2D[13]; + public static Texture2D[] accShieldTexture = new Texture2D[7]; + public static Texture2D[] accNeckTexture = new Texture2D[10]; + public static Texture2D[] accFaceTexture = new Texture2D[9]; + public static Texture2D[] accBalloonTexture = new Texture2D[18]; + public static Texture2D pulleyTexture; + public static Texture2D[] xmasTree = new Texture2D[5]; + public static Texture2D[] FlameTexture = new Texture2D[17]; + public static Texture2D timerTexture; + public static Texture2D[] reforgeTexture = new Texture2D[2]; + public static Texture2D wallOutlineTexture; + public static Texture2D actuatorTexture; + public static Texture2D wireTexture; + public static Texture2D wire2Texture; + public static Texture2D wire3Texture; + public static Texture2D wire4Texture; + public static Texture2D wireTextureNew; + public static Texture2D[] cameraTexture = new Texture2D[8]; + public static Texture2D flyingCarpetTexture; + public static Texture2D gridTexture; + public static Texture2D lightDiscTexture; + public static Texture2D EyeLaserTexture; + public static Texture2D BoneEyesTexture; + public static Texture2D BoneLaserTexture; + public static Texture2D trashTexture; + public static Texture2D fishingLineTexture; + public static Texture2D beetleTexture; + public static Texture2D probeTexture; + public static Texture2D eyeLaserSmallTexture; + public static Texture2D xmasLightTexture; + public static Texture2D[] golemTexture = new Texture2D[4]; + public static Texture2D confuseTexture; + public static Texture2D sunOrbTexture; + public static Texture2D sunAltarTexture; + public static Texture2D[] chainsTexture = new Texture2D[17]; + public static Texture2D chainTexture; + public static Texture2D[] gemChainTexture = new Texture2D[7]; + public static Texture2D chain2Texture; + public static Texture2D chain3Texture; + public static Texture2D chain4Texture; + public static Texture2D chain5Texture; + public static Texture2D chain6Texture; + public static Texture2D chain7Texture; + public static Texture2D chain8Texture; + public static Texture2D chain9Texture; + public static Texture2D chain10Texture; + public static Texture2D chain11Texture; + public static Texture2D chain12Texture; + public static Texture2D chain13Texture; + public static Texture2D chain14Texture; + public static Texture2D chain15Texture; + public static Texture2D chain16Texture; + public static Texture2D chain17Texture; + public static Texture2D chain18Texture; + public static Texture2D chain19Texture; + public static Texture2D chain20Texture; + public static Texture2D chain21Texture; + public static Texture2D chain22Texture; + public static Texture2D chain23Texture; + public static Texture2D chain24Texture; + public static Texture2D chain25Texture; + public static Texture2D chain26Texture; + public static Texture2D chain27Texture; + public static Texture2D chain28Texture; + public static Texture2D chain29Texture; + public static Texture2D chain30Texture; + public static Texture2D chain31Texture; + public static Texture2D chain32Texture; + public static Texture2D chain33Texture; + public static Texture2D chain34Texture; + public static Texture2D chain35Texture; + public static Texture2D chain36Texture; + public static Texture2D chain37Texture; + public static Texture2D chain38Texture; + public static Texture2D chain39Texture; + public static Texture2D chain40Texture; + public static Texture2D hbTexture1; + public static Texture2D hbTexture2; + public static Texture2D chaosTexture; + public static Texture2D cdTexture; + public static Texture2D wofTexture; + public static Texture2D boneArmTexture; + public static Texture2D boneArm2Texture; + public static Texture2D pumpkingArmTexture; + public static Texture2D pumpkingCloakTexture; + public static Texture2D[] EquipPageTexture = new Texture2D[11]; + public static Texture2D[] HouseBannerTexture = new Texture2D[2]; + public static Texture2D[] PVPTexture = new Texture2D[3]; + public static Texture2D[] npcToggleTexture = new Texture2D[2]; + public static Texture2D[] HBLockTexture = new Texture2D[2]; + public static Texture2D[] buffTexture = new Texture2D[206]; + public static Texture2D[] itemTexture = new Texture2D[3930]; + public static Texture2D[] itemFlameTexture = new Texture2D[3930]; + public static Texture2D[] npcTexture = new Texture2D[580]; + public static Texture2D[][] npcAltTextures; + public static Texture2D[] projectileTexture = new Texture2D[714]; + public static Texture2D[] goreTexture = new Texture2D[1087]; + public static Texture2D[] BackPackTexture = new Texture2D[8]; + public static Texture2D rainTexture; + public static Texture2D[] glowMaskTexture = new Texture2D[252]; + public static Texture2D[] extraTexture = new Texture2D[91]; + public static Texture2D[] highlightMaskTexture = new Texture2D[470]; + public static Texture2D[] coinTexture = new Texture2D[4]; + public static Texture2D[] cursorTextures = new Texture2D[17]; + public static Texture2D cursorRadialTexture; + public static Texture2D dustTexture; + public static Texture2D sunTexture; + public static Texture2D sun2Texture; + public static Texture2D sun3Texture; + public static int maxMoons = 3; + public static int moonType = 0; + public static Texture2D[] moonTexture = new Texture2D[Main.maxMoons]; + public static Texture2D pumpkinMoonTexture; + public static Texture2D snowMoonTexture; + public static Texture2D oneDropLogo; + public static int numTileColors = 31; + public static RenderTarget2D[,] tileAltTexture = new RenderTarget2D[470, Main.numTileColors]; + public static bool[,] tileAltTextureInit = new bool[470, Main.numTileColors]; + public static bool[,] tileAltTextureDrawn = new bool[470, Main.numTileColors]; + public static int numTreeStyles = 19; + public static RenderTarget2D[,] treeTopAltTexture = new RenderTarget2D[Main.numTreeStyles, Main.numTileColors]; + public static RenderTarget2D[,] treeBranchAltTexture = new RenderTarget2D[Main.numTreeStyles, Main.numTileColors]; + public static bool[,] treeAltTextureInit = new bool[Main.numTreeStyles, Main.numTileColors]; + public static bool[,] treeAltTextureDrawn = new bool[Main.numTreeStyles, Main.numTileColors]; + public static bool[,] checkTreeAlt = new bool[Main.numTreeStyles, Main.numTileColors]; + public static RenderTarget2D[,] wallAltTexture = new RenderTarget2D[231, Main.numTileColors]; + public static bool[,] wallAltTextureInit = new bool[231, Main.numTileColors]; + public static bool[,] wallAltTextureDrawn = new bool[231, Main.numTileColors]; + public static Texture2D[] tileTexture = new Texture2D[470]; + public static Texture2D blackTileTexture; + public static Texture2D[] wallTexture = new Texture2D[231]; + public static Texture2D[] backgroundTexture = new Texture2D[207]; + public static Texture2D[] cloudTexture = new Texture2D[22]; + public static Texture2D[] starTexture = new Texture2D[5]; + public static Texture2D[] liquidTexture = new Texture2D[12]; + public static Texture2D heartTexture; + public static Texture2D heart2Texture; + public static Texture2D manaTexture; + public static Texture2D bubbleTexture; + public static Texture2D flameTexture; + public static Texture2D[] treeTopTexture = new Texture2D[Main.numTreeStyles]; + public static Texture2D[] treeBranchTexture = new Texture2D[Main.numTreeStyles]; + public static Texture2D[] woodTexture = new Texture2D[7]; + public static RenderTarget2D[,] woodAltTexture = new RenderTarget2D[Main.woodTexture.Length, Main.numTileColors]; + public static Texture2D shroomCapTexture; + public static Texture2D inventoryBackTexture; + public static Texture2D inventoryBack2Texture; + public static Texture2D inventoryBack3Texture; + public static Texture2D inventoryBack4Texture; + public static Texture2D inventoryBack5Texture; + public static Texture2D inventoryBack6Texture; + public static Texture2D inventoryBack7Texture; + public static Texture2D inventoryBack8Texture; + public static Texture2D inventoryBack9Texture; + public static Texture2D inventoryBack10Texture; + public static Texture2D inventoryBack11Texture; + public static Texture2D inventoryBack12Texture; + public static Texture2D inventoryBack13Texture; + public static Texture2D inventoryBack14Texture; + public static Texture2D inventoryBack15Texture; + public static Texture2D inventoryBack16Texture; + public static Texture2D hairStyleBackTexture; + public static Texture2D clothesStyleBackTexture; + public static Texture2D inventoryTickOnTexture; + public static Texture2D inventoryTickOffTexture; + public static Texture2D loTexture; + public static Texture2D logoTexture; + public static Texture2D logo2Texture; + public static Texture2D textBackTexture; + public static Texture2D chatTexture; + public static Texture2D chat2Texture; + public static Texture2D chatBackTexture; + public static Texture2D teamTexture; + public static Texture2D reTexture; + public static Texture2D raTexture; + public static Texture2D splashTexture; + public static Texture2D fadeTexture; + public static Texture2D ninjaTexture; + public static Texture2D antLionTexture; + public static Texture2D spikeBaseTexture; + public static Texture2D ghostTexture; + public static Texture2D evilCactusTexture; + public static Texture2D goodCactusTexture; + public static Texture2D crimsonCactusTexture; + public static Texture2D wraithEyeTexture; + public static Texture2D fireflyTexture; + public static Texture2D fireflyJarTexture; + public static Texture2D lightningbugTexture; + public static Texture2D lightningbugJarTexture; + public static Texture2D[] jellyfishBowlTexture = new Texture2D[3]; + public static Texture2D glowSnailTexture; + public static Texture2D iceQueenTexture; + public static Texture2D santaTankTexture; + public static Texture2D reaperEyeTexture; + public static Texture2D jackHatTexture; + public static Texture2D treeFaceTexture; + public static Texture2D pumpkingFaceTexture; + public static Texture2D dukeFishronTexture; + public static Texture2D miniMinotaurTexture; + public static Texture2D[,] playerTextures; + public const int maxHairTotal = 134; + public const int maxCharSelectHair = 51; + public static bool UseExperimentalFeatures = false; + public static string DefaultSeed = ""; + public static Texture2D[] playerHairTexture = new Texture2D[134]; + public static Texture2D[] playerHairAltTexture = new Texture2D[134]; + public static SoundEffect[] soundDrip = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstanceDrip = new SoundEffectInstance[3]; + public static SoundEffect[] soundLiquid = new SoundEffect[2]; + public static SoundEffectInstance[] soundInstanceLiquid = new SoundEffectInstance[2]; + public static SoundEffect[] soundMech = new SoundEffect[1]; + public static SoundEffectInstance[] soundInstanceMech = new SoundEffectInstance[1]; + public static SoundEffect[] soundDig = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstanceDig = new SoundEffectInstance[3]; + public static SoundEffect[] soundTink = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstanceTink = new SoundEffectInstance[3]; + public static SoundEffect[] soundCoin = new SoundEffect[5]; + public static SoundEffectInstance[] soundInstanceCoin = new SoundEffectInstance[5]; + public static SoundEffect[] soundPlayerHit = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstancePlayerHit = new SoundEffectInstance[3]; + public static SoundEffect[] soundFemaleHit = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstanceFemaleHit = new SoundEffectInstance[3]; + public static SoundEffect soundPlayerKilled; + public static SoundEffectInstance soundInstancePlayerKilled; + public static SoundEffect soundGrass; + public static SoundEffectInstance soundInstanceGrass; + public static SoundEffect soundGrab; + public static SoundEffectInstance soundInstanceGrab; + public static SoundEffect soundPixie; + public static SoundEffectInstance soundInstancePixie; + public static SoundEffect[] soundItem = new SoundEffect[126]; + public static SoundEffectInstance[] soundInstanceItem = new SoundEffectInstance[126]; + public static SoundEffect[] soundNPCHit = new SoundEffect[58]; + public static SoundEffectInstance[] soundInstanceNPCHit = new SoundEffectInstance[58]; + public static SoundEffect[] soundNPCKilled = new SoundEffect[63]; + public static SoundEffectInstance[] soundInstanceNPCKilled = new SoundEffectInstance[63]; + public static SoundEffectInstance soundInstanceMoonlordCry; + public static SoundEffect soundDoorOpen; + public static SoundEffectInstance soundInstanceDoorOpen; + public static SoundEffect soundDoorClosed; + public static SoundEffectInstance soundInstanceDoorClosed; + public static SoundEffect soundMenuOpen; + public static SoundEffectInstance soundInstanceMenuOpen; + public static SoundEffect soundMenuClose; + public static SoundEffectInstance soundInstanceMenuClose; + public static SoundEffect soundMenuTick; + public static SoundEffectInstance soundInstanceMenuTick; + public static SoundEffect soundShatter; + public static SoundEffectInstance soundInstanceShatter; + public static SoundEffect soundCamera; + public static SoundEffectInstance soundInstanceCamera; + public static SoundEffect[] soundZombie = new SoundEffect[106]; + public static SoundEffectInstance[] soundInstanceZombie = new SoundEffectInstance[106]; + public static SoundEffect[] soundRoar = new SoundEffect[3]; + public static SoundEffectInstance[] soundInstanceRoar = new SoundEffectInstance[3]; + public static SoundEffect[] soundSplash = new SoundEffect[2]; + public static SoundEffectInstance[] soundInstanceSplash = new SoundEffectInstance[2]; + public static SoundEffect soundDoubleJump; + public static SoundEffectInstance soundInstanceDoubleJump; + public static SoundEffect soundRun; + public static SoundEffectInstance soundInstanceRun; + public static SoundEffect soundCoins; + public static SoundEffectInstance soundInstanceCoins; + public static SoundEffect soundUnlock; + public static SoundEffectInstance soundInstanceUnlock; + public static SoundEffect soundChat; + public static SoundEffectInstance soundInstanceChat; + public static SoundEffect soundMaxMana; + public static SoundEffectInstance soundInstanceMaxMana; + public static SoundEffect soundDrown; + public static SoundEffectInstance soundInstanceDrown; + public static SoundEffect[] trackableSounds; + public static SoundEffectInstance[] trackableSoundInstances; + private static bool _areSoundsPaused = false; + public static AudioEngine engine; + public static SoundBank soundBank; + public static WaveBank waveBank; + public static Cue[] music = new Cue[42]; + public static float[] musicFade = new float[42]; + public static float musicVolume = 0.75f; + public static float ambientVolume = 0.75f; + public static float soundVolume = 1f; + public static DynamicSpriteFont fontItemStack; + public static DynamicSpriteFont fontMouseText; + public static DynamicSpriteFont fontDeathText; + public static DynamicSpriteFont[] fontCombatText = new DynamicSpriteFont[2]; + public static ServerMode MenuServerMode = ServerMode.Lobby | ServerMode.FriendsCanJoin; + public static bool[] tileLighted = new bool[470]; + public static bool[] tileMergeDirt = new bool[470]; + public static bool[] tileCut = new bool[470]; + public static bool[] tileAlch = new bool[470]; + public static int[] tileShine = new int[470]; + public static bool[] tileShine2 = new bool[470]; + public static bool[] wallHouse = new bool[231]; + public static bool[] wallDungeon = new bool[231]; + public static bool[] wallLight = new bool[231]; + public static int[] wallBlend = new int[231]; + public static bool[] tileStone = new bool[470]; + public static bool[] tileAxe = new bool[470]; + public static bool[] tileHammer = new bool[470]; + public static bool[] tileWaterDeath = new bool[470]; + public static bool[] tileLavaDeath = new bool[470]; + public static bool[] tileTable = new bool[470]; + public static bool[] tileBlockLight = new bool[470]; + public static bool[] tileNoSunLight = new bool[470]; + public static bool[] tileDungeon = new bool[470]; + public static bool[] tileSpelunker = new bool[470]; + public static bool[] tileSolidTop = new bool[470]; + public static bool[] tileSolid = new bool[470]; + public static bool[] tileBouncy = new bool[470]; + public static short[] tileValue = new short[470]; + public static byte[] tileLargeFrames = new byte[470]; + public static byte[] wallLargeFrames = new byte[231]; + public static bool[] tileRope = new bool[470]; + public static bool[] tileBrick = new bool[470]; + public static bool[] tileMoss = new bool[470]; + public static bool[] tileNoAttach = new bool[470]; + public static bool[] tileNoFail = new bool[470]; + public static bool[] tileObsidianKill = new bool[470]; + public static bool[] tileFrameImportant = new bool[470]; + public static bool[] tilePile = new bool[470]; + public static bool[] tileBlendAll = new bool[470]; + public static short[] tileGlowMask = new short[470]; + public static bool[] tileContainer = new bool[470]; + public static bool[] tileSign = new bool[470]; + public static bool[][] tileMerge = new bool[470][]; + public static int cageFrames = 25; + public static bool critterCage = false; + 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[] 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[,] 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[] 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 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[] penguinCageFrame = new int[Main.cageFrames]; + public static int[] penguinCageFrameCounter = 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[] grasshopperCageFrame = new int[Main.cageFrames]; + public static int[] grasshopperCageFrameCounter = new int[Main.cageFrames]; + public static bool[] tileSand = new bool[470]; + public static bool[] tileFlame = new bool[470]; + public static bool[] npcCatchable = new bool[580]; + public static int[] tileFrame = new int[470]; + public static int[] tileFrameCounter = new int[470]; + public static byte[] wallFrame = new byte[231]; + public static byte[] wallFrameCounter = new byte[231]; + public static int[] backgroundWidth = new int[207]; + public static int[] backgroundHeight = new int[207]; + 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[130]; + public static Item[] item = new Item[401]; + public static int[] itemLockoutTime = new int[401]; + public static NPC[] npc = new NPC[201]; + public static Gore[] gore = new Gore[501]; + 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 ItemText[] itemText = new ItemText[20]; + public static Chest[] chest = new Chest[1000]; + 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[3930]; + 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 = false; + public static bool screenBorderless = false; + public static int screenBorderlessPendingResizes = 0; + public static int chatLength = 600; + public static bool drawingPlayerChat = false; + public static bool chatRelease = false; + public static int showCount = 10; + public static int numChatLines = 500; + public static int startChatLine = 0; + public static string chatText = ""; + public static ChatLine[] chatLine = new ChatLine[Main.numChatLines]; + public static bool inputTextEnter = false; + public static bool inputTextEscape = false; + 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 = 0; + public static int mouseTextColorChange = 1; + public static bool mouseLeftRelease = false; + public static bool mouseRightRelease = false; + public static bool playerInventory = false; + public static int stackSplit; + public static int stackCounter = 0; + public static int stackDelay = 7; + public static int superFastStack = 0; + 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 = false; + public static bool recFastScroll = false; + public static bool recBigList = false; + public static int recStart = 0; + 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 = 0; + public static Player[] player = new Player[256]; + public static List playerDrawData = new List(); + public static List playerDrawDust = new List(); + public static List playerDrawGore = new List(); + public static int spawnTileX; + public static int spawnTileY; + public static bool npcChatRelease = false; + public static bool editSign = false; + public static bool editChest = false; + 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 = false; + public static bool npcChatFocus2 = false; + public static bool npcChatFocus3 = false; + public static int npcShop = 0; + public static int npcChatCornerItem = 0; + public Chest[] shop = new Chest[Main.MaxShopIDs]; + public static int[] travelShop = new int[40]; + public static List anglerWhoFinishedToday = new List(); + public static bool anglerQuestFinished; + public static int anglerQuest = 0; + public static int[] anglerQuestItemNetIDs = new int[39] + { + 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 + }; + public static bool Support4K = true; + 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; + public static float temporaryGUIScaleSlider = -1f; + public static bool temporaryGUIScaleSliderUpdate = false; + public static bool InGuideCraftMenu = false; + public static bool InReforgeMenu = false; + public static Item HoverItem = new Item(); + private static int backSpaceCount = 0; + public static string motd = ""; + public static bool toggleFullscreen; + public static int numDisplayModes = 0; + public static int[] displayWidth = new int[99]; + public static int[] displayHeight = new int[99]; + public static bool gameMenu = true; + 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 = false; + public static int invasionType = 0; + public static double invasionX = 0.0; + public static int invasionSize = 0; + public static int invasionDelay = 0; + public static int invasionWarn = 0; + public static int invasionSizeStart = 0; + public static bool invasionProgressNearInvasion = false; + public static int invasionProgressMode = 2; + public static int invasionProgressIcon = 0; + public static int invasionProgress = 0; + public static int invasionProgressMax = 0; + public static int invasionProgressWave = 0; + public static int invasionProgressDisplayLeft = 0; + public static float invasionProgressAlpha = 0.0f; + public int currentNPCShowingChatBubble = -1; + public static int[] npcFrameCount = new int[580] + { + 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, + 4, + 5, + 6, + 5, + 3, + 3, + 23, + 6, + 3, + 6, + 6, + 2, + 5, + 3, + 2, + 7, + 7, + 4, + 2, + 8, + 1, + 5, + 1, + 2, + 4, + 16, + 5, + 4, + 4, + 15, + 15, + 15, + 15, + 2, + 4, + 6, + 6, + 24, + 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, + 9, + 5, + 6, + 4, + 15, + 23, + 3, + 3, + 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, + 15, + 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, + 15, + 15, + 15, + 15, + 15, + 15, + 3, + 3, + 3, + 3, + 3, + 3, + 15, + 3, + 6, + 12, + 20, + 20, + 20, + 15, + 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, + 15, + 15, + 15, + 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, + 10, + 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, + 10, + 2, + 6, + 2, + 19, + 19, + 19, + 19, + 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 + }; + public static Dictionary npcLifeBytes = new Dictionary(); + private static bool mouseExit = false; + private static float exitScale = 0.8f; + private static bool mouseReforge = false; + private 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 = false; + public static bool menuServer = false; + public static int netMode = 0; + private static int _targetNetMode = 0; + private static bool _hasPendingNetmodeChange = false; + 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 cSmartCursorToggle = true; + public static bool SmartCursorEnabled = false; + public static bool SmartCursorShowing = false; + public static int SmartCursorX; + public static int SmartCursorY; + public static bool SmartInteractShowingGenuine = false; + public static bool SmartInteractShowingFake = false; + public static int SmartInteractX; + public static int SmartInteractY; + public static int SmartInteractNPC; + public static List SmartInteractNPCsNearby = new List(); + 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 = 0.0f; + public static float cursorScale = 0.0f; + public static bool signBubble = false; + public static int signX = 0; + public static int signY = 0; + public static bool hideUI = false; + public static bool releaseUI = false; + 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 static string oldStatusText = ""; + public static bool autoShutdown = false; + public static bool serverGenLock = false; + public static int sundialCooldown = 0; + public static bool fastForwardTime = false; + private System.Type t2d = typeof (Texture2D); + private Stopwatch t2dtest = new Stopwatch(); + public static readonly object globalTextureLocker = new object(); + 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 = 0.0f; + public static int ambientCounter = 0; + public static int ProjectileUpdateLoopIndex = -1; + private bool _crazyTestedMemoryLimit; + private Player[] _crazyTestArrayMemoryLimit; + 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 = 0; + public static int menuMode = 0; + public static int menuSkip = 0; + private static bool _needsLanguageSelect = true; + private static Item cpItem = new Item(); + public int textBlinkerCount; + public int textBlinkerState; + public static string newWorldName = ""; + private static int[] specX = new int[1000]; + private static int[] specY = new int[1000]; + private bool _imeToggle; + public static bool HoveringOverAnNPC = false; + public static string hoverItemName = ""; + public static Microsoft.Xna.Framework.Color inventoryBack = new Microsoft.Xna.Framework.Color(220, 220, 220, 220); + public static bool mouseText = false; + private static int mH = 0; + private static int UI_ScreenAnchorX = Main.screenWidth - 800; + private static int UIDisplay_ManaPerStar = 20; + private static float UIDisplay_LifePerHeart = 20f; + private static int rare = 0; + public static int hairStart = 0; + private static int oldHairStyle; + private static Microsoft.Xna.Framework.Color oldHairColor; + public static int selClothes = 0; + private static Microsoft.Xna.Framework.Color[] oldClothesColor = new Microsoft.Xna.Framework.Color[4]; + private static int oldClothesStyle = 0; + public static int dresserX; + public static int dresserY; + public static Player dresserDummy; + private bool _needToSetupDrawInterfaceLayers = true; + private List _gameInterfaceLayers; + private static GameTime _drawInterfaceGameTime; + private static bool _MouseOversCanClear = false; + private static Vector2 _itemIconCacheScreenPosition; + private static int _itemIconCacheSelectedItemID; + private static int _itemIconCacheTime = 0; + public static Microsoft.Xna.Framework.Color selColor = Microsoft.Xna.Framework.Color.White; + public static int focusColor = 0; + public static int colorDelay = 0; + public static int setKey = -1; + public static int bgScroll = 0; + public static bool autoPass = false; + 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 = false; + private static bool _blockFancyUIWhileLoading = false; + private bool[] menuWide = new bool[100]; + public static float GamepadCursorAlpha = 0.0f; + protected List> DrawWiresSpecialTiles = new List>(); + private static string[] MonolithFilterNames = new string[4] + { + "MonolithVortex", + "MonolithNebula", + "MonolithStardust", + "MonolithSolar" + }; + private static string[] MonolithSkyNames = new string[4] + { + "MonolithVortex", + "MonolithNebula", + "MonolithStardust", + "MonolithSolar" + }; + private static float tranSpeed = 0.05f; + private static float atmo = 0.0f; + private static float bgScale = 1f; + private static int bgW = (int) (1024.0 * (double) Main.bgScale); + private static Microsoft.Xna.Framework.Color backColor = Microsoft.Xna.Framework.Color.White; + private static Microsoft.Xna.Framework.Color trueBackColor = Main.backColor; + private float screenOff; + private float scAdj; + private float cTop; + private bool _isDrawingOrUpdating; + private static SlotVector _trackedSounds = new SlotVector(4096); + + 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 + { + get + { + int realScreenWidth = PlayerInput.RealScreenWidth; + int realScreenHeight = PlayerInput.RealScreenHeight; + float num = 2f; + if ((double) realScreenWidth / 800.0 < (double) num) + num = (float) realScreenWidth / 800f; + if ((double) realScreenHeight / 600.0 < (double) num) + num = (float) realScreenHeight / 600f; + if ((double) num < 1.0) + num = 1f; + return num; + } + } + + public static bool RenderTargetsRequired => (double) Main.GameZoomTarget > 1.0 || (double) Main.GameViewMatrix.TransformationMatrix.M11 > 1.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 bool expertMode + { + get => Main.ActiveWorldFileData != null && Main.ActiveWorldFileData.IsExpertMode; + set + { + if (Main.ActiveWorldFileData == null) + return; + Main.ActiveWorldFileData.IsExpertMode = value; + } + } + + public static AchievementManager Achievements => Main.instance._achievements; + + public static Effect screenShader => Main.ScreenShaderRef.Value; + + public static Effect pixelShader => Main.PixelShaderRef.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 static event Action OnEnginePreload; + + public static event Action OnResolutionChanged; + + public static event Action OnEngineLoad; + + public static uint GameUpdateCount => Main._gameUpdateCount; + + public static event Action OnTick; + + public static event Action OnPreDraw; + + public static event Action OnPostDraw; + + 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 SamplerState MountedSamplerState => !Main.drawToScreen ? SamplerState.AnisotropicClamp : SamplerState.LinearClamp; + + public static bool UseSeedUI => Main.UseExperimentalFeatures; + + public static void SetupTileMerge() + { + int length = 470; + 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(4, 4)); + Main.RegisterItemAnimation(575, (DrawAnimation) new DrawAnimationVertical(5, 4)); + Main.RegisterItemAnimation(547, (DrawAnimation) new DrawAnimationVertical(5, 4)); + Main.RegisterItemAnimation(520, (DrawAnimation) new DrawAnimationVertical(5, 4)); + Main.RegisterItemAnimation(548, (DrawAnimation) new DrawAnimationVertical(5, 4)); + Main.RegisterItemAnimation(521, (DrawAnimation) new DrawAnimationVertical(5, 4)); + Main.RegisterItemAnimation(549, (DrawAnimation) new DrawAnimationVertical(5, 4)); + } + + public static Player LocalPlayer => Main.player[Main.myPlayer]; + + 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 void LoadWorlds() + { + Main.WorldList.Clear(); + Directory.CreateDirectory(Main.WorldPath); + 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(); + Directory.CreateDirectory(Main.PlayerPath); + 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() + { + Directory.CreateDirectory(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(194); + 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("SmartCursorToggle", (object) Main.cSmartCursorToggle); + 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("VolumeSound", (object) Main.soundVolume); + Main.Configuration.Put("VolumeAmbient", (object) Main.ambientVolume); + Main.Configuration.Put("VolumeMusic", (object) Main.musicVolume); + 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.lightMode); + Main.Configuration.Put("LightingThreads", (object) Lighting.LightingThreads); + Main.Configuration.Put("Parallax", (object) Main.caveParallax); + Main.Configuration.Put("ShowItemText", (object) Main.showItemText); + Main.Configuration.Put("LastLaunchedVersion", (object) 194); + 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("UseSmartWallReplacement", (object) Player.SmartCursorSettings.SmartWallReplacement); + 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("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("RunningAchievementEnabled", (object) Main.RunningAchievementEnabled); + 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.cEd = true; + } + catch + { + Main.cEd = false; + } + } + + protected void OpenSettings() + { + if (File.Exists(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat")) + { + this.OpenLegacySettings(); + if (Main.SaveSettings()) + File.Delete(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat"); + Lighting.LightingThreads = 0; + } + else + { + Main.Configuration.Load(); + Main.Configuration.Get("SmartCursorToggle", ref Main.cSmartCursorToggle); + 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)) + { + Main.chTitle = true; + LanguageManager.Instance.SetLanguage(result1); + } + else + { + Main.chTitle = true; + LanguageManager.Instance.SetLanguage(str); + } + Main.Configuration.Get("PlacementPreview", ref Main.placementPreview); + Main.Configuration.Get("GoreVisualsAllowed", ref ChildSafety.Disabled); + 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; + Main.Configuration.Get("WindowMaximized", ref Main.screenMaximized); + Main.Configuration.Get("WindowBorderless", ref Main.screenBorderless); + Main.PendingBorderlessState = Main.screenBorderless; + Main.screenBorderlessPendingResizes = Main.screenBorderless ? 6 : 0; + Main.Configuration.Get("GraphicsQuality", ref Main.qaStyle); + Main.Configuration.Get("BackgroundEnabled", ref Main.BackgroundEnabled); + if (Main.Configuration.GetAllKeys().Contains("FrameSkip")) + { + bool currentValue = false; + Main.Configuration.Get("FrameSkip", ref currentValue); + Main.terrariasFixedTiming = !currentValue; + 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; + Main.Configuration.Get("LightingMode", ref Lighting.lightMode); + Main.Configuration.Get("LightingThreads", ref Lighting.LightingThreads); + Main.Configuration.Get("Parallax", ref Main.caveParallax); + Main.bgScroll = (int) ((1.0 - (double) Main.caveParallax) * 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("UseSmartWallReplacement", ref Player.SmartCursorSettings.SmartWallReplacement); + Main.Configuration.Get("UseSmartAxeAfterSmartPickaxe", ref Player.SmartCursorSettings.SmartAxeAfterPickaxe); + 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("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; + bool currentValue1 = false; + int preferredBackBufferWidth = Main.graphics.PreferredBackBufferWidth; + int backBufferHeight = Main.graphics.PreferredBackBufferHeight; + Main.Configuration.Get("Fullscreen", ref currentValue1); + Main.Configuration.Get("DisplayWidth", ref preferredBackBufferWidth); + Main.Configuration.Get("DisplayHeight", ref backBufferHeight); + Dictionary currentValue2 = new Dictionary(); + Main.Configuration.Get>("MouseColor", ref currentValue2); + byte num; + if (currentValue2.TryGetValue("R", out num)) + Main.mouseColor.R = num; + if (currentValue2.TryGetValue("G", out num)) + Main.mouseColor.G = num; + if (currentValue2.TryGetValue("B", out num)) + Main.mouseColor.B = num; + currentValue2.Clear(); + Main.Configuration.Get>("MouseBorderColor", ref currentValue2); + if (currentValue2.TryGetValue("R", out num)) + Main.MouseBorderColor.R = num; + if (currentValue2.TryGetValue("G", out num)) + Main.MouseBorderColor.G = num; + if (currentValue2.TryGetValue("B", out num)) + Main.MouseBorderColor.B = num; + if (currentValue2.TryGetValue("A", out num)) + Main.MouseBorderColor.A = num; + Main.Configuration.Get("QuickLaunch", ref Main.SkipAssemblyLoad); + Main.GameZoomTarget = Main.Configuration.Get("Zoom", 1f); + Main.UIScale = Main.Configuration.Get("UIScale", 1f); + int currentValue3 = -1; + Main.Configuration.Get("LockOnPriority", ref currentValue3); + if (currentValue3 < 0) + currentValue3 = 0; + if (currentValue3 > 2) + currentValue3 = 2; + LockOnHelper.UseMode = (LockOnHelper.LockOnMode) currentValue3; + if (LockOnHelper.UseMode == LockOnHelper.LockOnMode.FocusTarget) + LockOnHelper.UseMode = LockOnHelper.LockOnMode.ThreeDS; + Main.Configuration.Get("InvisibleCursorForGamepad", ref Main.InvisibleCursorForGamepad); + Form form = (Form) Control.FromHandle(Main.instance.Window.Handle); + if (Main.screenBorderless) + { + form.Location = new System.Drawing.Point(0, 0); + form.FormBorderStyle = FormBorderStyle.None; + } + else if (Main.screenMaximized) + { + form.WindowState = FormWindowState.Maximized; + form.FormBorderStyle = FormBorderStyle.Sizable; + } + else + form.FormBorderStyle = FormBorderStyle.Sizable; + Main.SetDisplayMode(preferredBackBufferWidth, backBufferHeight, currentValue1); + Main.Configuration.Get("SettingsUnlock_WorldEvil", ref Main.SettingsUnlock_WorldEvil); + Main.Configuration.Get("SettingsEnabled_MinersWobble", ref Main.SettingsEnabled_MinersWobble); + int currentValue4 = 0; + Main.Configuration.Get("LastLaunchedVersion", ref currentValue4); + Main.Configuration.Get("RunningAchievementEnabled", ref Main.RunningAchievementEnabled); + if (currentValue4 <= 146) + Lighting.LightingThreads = 0; + if (currentValue4 <= 147) + Main.terrariasFixedTiming = !Main.terrariasFixedTiming; + if (currentValue4 <= 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 (currentValue4 <= 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 (currentValue4 < 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 (currentValue4 == 194) + 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.lightMode = (int) 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) + { + Lighting.LightingThreads = binaryReader.ReadInt32(); + if (Lighting.LightingThreads >= Environment.ProcessorCount) + Lighting.LightingThreads = Environment.ProcessorCount - 1; + } + if (num1 >= 100) + { + Main.cSmart = binaryReader.ReadString(); + Main.cSmartCursorToggle = 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 (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 = ""; + 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 = cloudSave ? Main.CloudWorldPath : Main.WorldPath; + if (FileUtilities.GetFullPath(str3 + Path.DirectorySeparatorChar.ToString() + str2 + ".wld", cloudSave).StartsWith("\\\\.\\", StringComparison.Ordinal)) + str2 += "_"; + string str4 = str3; + char directorySeparatorChar = Path.DirectorySeparatorChar; + string str5 = directorySeparatorChar.ToString(); + string str6 = str2; + if (FileUtilities.Exists(str4 + str5 + str6 + ".wld", cloudSave)) + { + int num = 2; + while (true) + { + object[] objArray = new object[5] + { + (object) str3, + null, + null, + null, + null + }; + directorySeparatorChar = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar.ToString(); + objArray[2] = (object) str2; + objArray[3] = (object) num; + objArray[4] = (object) ".wld"; + if (FileUtilities.Exists(string.Concat(objArray), cloudSave)) + ++num; + else + break; + } + str2 += (string) (object) num; + } + string str7 = str3; + directorySeparatorChar = Path.DirectorySeparatorChar; + string str8 = directorySeparatorChar.ToString(); + string str9 = str2; + return str7 + str8 + str9 + ".wld"; + } + + 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 void LoadDedConfig(string configPath) + { + if (!File.Exists(configPath)) + return; + using (StreamReader streamReader = new StreamReader(configPath)) + { + string str1; + while ((str1 = streamReader.ReadLine()) != null) + { + try + { + if (str1.Length > 6 && str1.Substring(0, 6).ToLower() == "world=") + Main.ActiveWorldFileData = WorldFile.GetAllMetadata(str1.Substring(6), false); + if (str1.Length > 5 && str1.Substring(0, 5).ToLower() == "port=") + { + string str2 = str1.Substring(5); + try + { + Netplay.ListenPort = Convert.ToInt32(str2); + } + catch + { + } + } + if (str1.Length > 11 && str1.Substring(0, 11).ToLower() == "maxplayers=") + { + string str3 = str1.Substring(11); + try + { + Main.maxNetPlayers = Convert.ToInt32(str3); + } + catch + { + } + } + if (str1.Length > 11 && str1.Substring(0, 9).ToLower() == "priority=" && !Program.LaunchParameters.ContainsKey("-forcepriority")) + { + string str4 = str1.Substring(9); + try + { + int int32 = Convert.ToInt32(str4); + 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 (str1.Length > 9 && str1.Substring(0, 9).ToLower() == "password=") + Netplay.ServerPassword = str1.Substring(9); + if (str1.Length > 5 && str1.Substring(0, 5).ToLower() == "motd=") + Main.motd = str1.Substring(5); + if (str1.Length > 5 && str1.Substring(0, 5).ToLower() == "lang=") + { + string str5 = str1.Substring(5); + LanguageManager.Instance.SetLanguage(Convert.ToInt32(str5)); + } + if (str1.Length > 5 && str1.Substring(0, 5).ToLower() == "language=") + { + string cultureName = str1.Substring(9); + LanguageManager.Instance.SetLanguage(cultureName); + } + if (str1.Length >= 10 && str1.Substring(0, 10).ToLower() == "worldpath=") + Main.WorldPath = str1.Substring(10); + if (str1.Length >= 10 && str1.Substring(0, 10).ToLower() == "worldname=") + Main.worldName = str1.Substring(10); + if (str1.Length >= 5 && str1.Substring(0, 5).ToLower() == "seed=") + Main.AutogenSeedName = str1.Substring(5); + if (str1.Length > 8 && str1.Substring(0, 8).ToLower() == "banlist=") + Netplay.BanFilePath = str1.Substring(8); + if (str1.Length > 11 && str1.Substring(0, 11).ToLower() == "difficulty=") + { + string str6 = str1.Substring(11); + if (str6 == "0") + Main.expertMode = false; + else if (str6 == "1") + Main.expertMode = true; + } + if (str1.Length > 11 && str1.Substring(0, 11).ToLower() == "autocreate=") + { + string str7 = str1.Substring(11); + if (str7 == "0") + Main.autoGen = false; + else if (str7 == "1") + { + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + Main.autoGen = true; + } + else if (str7 == "2") + { + Main.maxTilesX = 6300; + Main.maxTilesY = 1800; + Main.autoGen = true; + } + else if (str7 == "3") + { + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + Main.autoGen = true; + } + } + if (str1.Length > 7 && str1.Substring(0, 7).ToLower() == "secure=" && str1.Substring(7) == "1") + Netplay.spamCheck = true; + if (str1.Length > 5 && str1.Substring(0, 5).ToLower() == "upnp=" && str1.Substring(5) != "1") + Netplay.UseUPNP = false; + if (str1.Length > 10) + { + if (str1.Substring(0, 10).ToLower() == "npcstream=") + { + string str8 = str1.Substring(10); + try + { + Main.npcStreamSpeed = Convert.ToInt32(str8); + } + catch + { + } + } + } + } + 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.menuMode = 1; + } + + public void loadLib(string path) + { + Main.libPath = path; + Main.LoadLibrary(Main.libPath); + } + + public void DedServ() + { + 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_125: + if (Main.worldPathName != null) + goto label_126; +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; + 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(string.Format("({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 = "8"; + 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_115; + } + Netplay.UseUPNP = false; + flag4 = false; + } + } + catch + { + } +label_115: + 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(""); + Console.Write(Language.GetTextValue("CLI.ChooseDifficulty")); + string str8 = Console.ReadLine(); + try + { + switch (Convert.ToInt32(str8)) + { + case 1: + Main.expertMode = false; + flag6 = false; + break; + case 2: + Main.expertMode = true; + 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 = Main.UseSeedUI; + 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.expertMode); + string seedText = str10.Trim(); + if (seedText.Length == 0) + Main.ActiveWorldFileData.SetSeedToRandom(); + else + Main.ActiveWorldFileData.SetSeed(seedText); + Main.menuMode = 10; + Main.serverGenLock = true; + GenerationProgress progress = new GenerationProgress(); + WorldGen.CreateNewWorld(progress); + while (Main.menuMode == 10) + { + if (Main.oldStatusText != Main.statusText) + { + Main.oldStatusText = Main.statusText; + Console.WriteLine(Main.statusText); + } + } + try + { + Console.Clear(); + } + catch + { + } + while (Main.serverGenLock) + { + 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_125; +label_126: + if (!(Main.worldPathName == "")) + { + try + { + Console.Clear(); + } + catch + { + } + WorldGen.serverLoadWorld(); + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber)); + Console.WriteLine(""); + while (!Netplay.IsServerRunning) + { + 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 + { + Console.Clear(); + } + catch + { + } + 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(); + 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.anyClients) + this.Update(new GameTime()); + if (Main.OnTick != null) + Main.OnTick(); + 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.anyClients) + { + num4 = 0.0; + Thread.Sleep(10); + } + } + } + } + Thread.Sleep(0); + } + } + else + goto label_5; + } + + public static void startDedInput() => ThreadPool.QueueUserWorkItem(new WaitCallback(Main.startDedInputCallBack), (object) 1); + + public static void startDedInputCallBack(object threadContext) + { + 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" + }; + if (Main.UseSeedUI) + stringList.Add("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 str5 = "AM"; + 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) + str5 = "PM"; + int num4 = (int) num3; + double num5 = (double) (int) ((num3 - (double) num4) * 60.0); + string str6 = string.Concat((object) num5); + if (num5 < 10.0) + str6 = "0" + str6; + if (num4 > 12) + num4 -= 12; + if (num4 == 0) + num4 = 12; + Console.WriteLine(Language.GetTextValue("CLI.Time", (object) (num4.ToString() + ":" + str6 + " " + str5))); + } + 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 str7 = str2.Substring(Language.GetTextValue("CLI.SetPassword_Command").Length + 1); + if (str7 == "") + { + Netplay.ServerPassword = ""; + Console.WriteLine(Language.GetTextValue("CLI.PasswordDisabled")); + } + else + { + Netplay.ServerPassword = str7; + 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 str8 = str2.Substring(length + 1); + Console.WriteLine(Language.GetTextValue("CLI.ServerMessage", (object) str8)); + NetMessage.BroadcastChatMessage(NetworkText.FromKey("CLI.ServerMessage", (object) str8), 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.SeedText)); + } + 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 UpdateSundial() + { + if (Main.fastForwardTime) + Main.dayRate = 60; + else + Main.dayRate = 1; + } + + public Main() + { + Main.instance = this; + Main.graphics = new GraphicsDeviceManager((Game) this); + this.Content.RootDirectory = "Content"; + } + + protected void SetTitle() + { + Main._cachedTitle = Lang.GetRandomGameTitle(); + ((Platform) Platform.Current).SetWindowUnicodeTitle(this.Window, Main._cachedTitle); + } + + public static void InitLifeBytes() + { + NPC npc = new NPC(); + for (int index = -65; index < 580; ++index) + { + if (index != 0) + { + npc.SetDefaults(index); + Main.npcLifeBytes[index] = npc.lifeMax > (int) short.MaxValue || npc.boss ? (byte) 4 : (npc.lifeMax <= (int) sbyte.MaxValue ? (byte) 1 : (byte) 2); + } + } + } + + private static void SetTileValue() + { + Main.tileValue[28] = (short) 100; + Main.tileValue[7] = (short) 200; + Main.tileValue[166] = (short) 210; + Main.tileValue[6] = (short) 220; + Main.tileValue[167] = (short) 230; + Main.tileValue[9] = (short) 240; + Main.tileValue[168] = (short) 250; + Main.tileValue[37] = (short) 300; + Main.tileValue[22] = (short) 310; + Main.tileValue[204] = (short) 320; + Main.tileValue[407] = (short) 350; + Main.tileValue[8] = (short) 400; + Main.tileValue[169] = (short) 410; + Main.tileValue[21] = (short) 500; + Main.tileValue[467] = (short) 500; + Main.tileValue[441] = (short) 500; + Main.tileValue[468] = (short) 500; + Main.tileValue[107] = (short) 600; + Main.tileValue[221] = (short) 610; + Main.tileValue[108] = (short) 620; + Main.tileValue[222] = (short) 630; + Main.tileValue[111] = (short) 640; + Main.tileValue[223] = (short) 650; + Main.tileValue[211] = (short) 700; + Main.tileValue[12] = (short) 800; + Main.tileValue[236] = (short) 810; + } + + private static void ResetGameCounter() => Main._gameUpdateCount = 0U; + + protected override void Initialize() + { + Main.LocalFavoriteData.Load(); + Main.CloudFavoritesData.Load(); + Main.FindAnnouncementBoxStatus(); + PlayerInput.Initialize(); + CustomCurrencyManager.Initialize(); + TileObjectData.Initialize(); + Animation.Initialize(); + Chest.Initialize(); + Wiring.Initialize(); + Framing.Initialize(); + ItemRarity.Initialize(); + TileEntity.InitializeAll(); + Projectile.InitializeStaticThings(); + Main.InitializeItemAnimations(); + Lighting.Initialize(); + MapHelper.Initialize(); + TimeLogger.Initialize(); + WorldGen.RandomizeBackgrounds(); + WorldGen.RandomizeCaveBackgrounds(); + WorldGen.RandomizeMoonState(); + WorldGen.Hooks.Initialize(); + WorldGen.Hooks.OnWorldLoad += new Action(Main.ResetGameCounter); + Main.bgAlpha[0] = 1f; + Main.bgAlpha2[0] = 1f; + this.invBottom = 258; + for (int index = 0; index < 714; ++index) + Main.projFrames[index] = 1; + 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[596] = 4; + Main.projFrames[612] = 5; + Main.projFrames[613] = 4; + Main.projFrames[614] = 4; + Main.projFrames[615] = 7; + Main.projFrames[623] = 12; + Main.projFrames[633] = 5; + Main.projFrames[645] = 7; + Main.projFrames[650] = 4; + Main.projFrames[652] = 6; + Main.projFrames[659] = 4; + 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.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[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.tileLighted[237] = true; + Main.tileLighted[27] = true; + Main.tileLighted[381] = true; + Main.tileLighted[184] = true; + Main.tileLighted[463] = 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.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.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[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[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; + 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[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.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; + 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.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.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[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 < 580; ++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; + 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[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.SetupTileMerge(); + Main.tileSolid[379] = 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.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.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[356] = true; + Main.tileFrameImportant[334] = true; + Main.tileFrameImportant[440] = 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.tileFrameImportant[355] = true; + Main.tileFrameImportant[324] = true; + Main.tileObsidianKill[324] = true; + Main.tileLavaDeath[324] = true; + Main.tileFrameImportant[463] = 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[429] = true; + Main.tileFrameImportant[445] = 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.tileLargeFrames[409] = (byte) 1; + Main.tileFrameImportant[410] = 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.tileSolid[460] = true; + Main.tileSolid[326] = true; + Main.tileBlockLight[326] = true; + Main.tileSolid[458] = true; + Main.tileBlockLight[458] = true; + Main.tileSolid[459] = true; + Main.tileSolid[327] = true; + Main.tileBlockLight[327] = true; + Main.tileSolid[345] = true; + Main.tileBlockLight[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.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.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; + 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[370] = (short) 111; + Main.tileGlowMask[391] = (short) 131; + Main.tileGlowMask[429] = (short) 214; + Main.tileGlowMask[209] = (short) 215; + Main.tileGlowMask[445] = (short) 214; + Main.tileLighted[429] = true; + Main.tileLighted[209] = true; + Main.tileGlowMask[410] = (short) 201; + 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.tileSign[55] = true; + Main.tileSign[85] = true; + Main.tileSign[425] = 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[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.tileLighted[286] = true; + Main.tileLighted[302] = true; + Main.tileFrameImportant[298] = true; + Main.tileFrameImportant[299] = true; + Main.tileSolid[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.tileBrick[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; + 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[390] = true; + Main.tileNoAttach[390] = true; + Main.tileLavaDeath[390] = true; + Main.tileLighted[390] = 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[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[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[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[174] = true; + Main.wallHouse[223] = true; + Main.wallHouse[230] = true; + Main.wallHouse[228] = true; + Main.wallHouse[229] = 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[168] = true; + for (int index = 0; index < 231; ++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; + 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); + Main.critterCage = true; + for (int index = 0; index < 3600; ++index) + Main.CritterCages(); + Main.critterCage = false; + 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[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.tileMergeDirt[202] = true; + Main.tileBrick[202] = true; + Main.tileSolid[202] = true; + Main.tileBlockLight[202] = 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[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.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[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[330] = true; + Main.tileNoFail[331] = true; + Main.tileNoFail[332] = true; + Main.tileNoFail[333] = true; + Main.tileNoFail[254] = 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[323] = 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[233] = 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.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.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.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[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[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] = 800; + 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.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[44] = true; + Main.tileMergeDirt[43] = true; + Main.tileMergeDirt[41] = 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[15] = 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[141] = true; + Main.tileFrameImportant[270] = true; + Main.tileFrameImportant[271] = true; + Main.tileFrameImportant[314] = true; + Main.tileSolidTop[376] = true; + Main.tileTable[376] = true; + Main.tileTable[380] = 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[444] = 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[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.tileBlockLight[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[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[15] = 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.tileBrick[192] = false; + Main.tileWaterDeath[215] = true; + Main.tileWaterDeath[4] = true; + Main.tileWaterDeath[51] = true; + Main.tileWaterDeath[93] = true; + Main.tileWaterDeath[98] = 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[15] = 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[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[316] = true; + Main.tileLavaDeath[317] = true; + Main.tileLavaDeath[318] = true; + Main.tileLavaDeath[319] = true; + Main.tileLavaDeath[354] = true; + Main.tileLavaDeath[355] = true; + Main.tileLavaDeath[323] = true; + Main.tileLavaDeath[335] = true; + Main.tileLavaDeath[338] = true; + Main.tileLavaDeath[339] = 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.tileLighted[316] = true; + Main.tileLighted[317] = true; + Main.tileLighted[318] = true; + for (int index = 0; index < 470; ++index) + { + if (Main.tileLavaDeath[index]) + Main.tileObsidianKill[index] = 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.tileSolid[384] = true; + Main.tileBlockLight[384] = true; + Main.tileNoFail[384] = true; + Main.tileFrameImportant[395] = true; + Main.tileLavaDeath[395] = 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] = true; + 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[455] = true; + Main.tileFrameImportant[412] = true; + for (int index = 0; index < 231; ++index) + Main.wallBlend[index] = index != 20 ? (index != 19 ? (index != 18 ? (index != 17 ? (index == 16 || index == 59 ? 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.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 < 470; ++index) + { + if (Main.tileSolid[index]) + Main.tileNoSunLight[index] = true; + Main.tileFrame[index] = 0; + Main.tileFrameCounter[index] = 0; + } + 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[460] = false; + 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 < 501; ++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.itemText[index] = new ItemText(); + for (int Type = 0; Type < 3930; ++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 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: + Item.staff[obj.type] = true; + break; + case 1827: + case 3245: + Item.claw[obj.type] = true; + break; + } + } + Main.InitLifeBytes(); + for (int index = 0; index < Recipe.maxRecipes; ++index) + { + Main.recipe[index] = new Recipe(); + Main.availableRecipeY[index] = (float) (65 * index); + } + Recipe.SetupRecipes(); + for (int index = 0; index < Main.numChatLines; ++index) + Main.chatLine[index] = new ChatLine(); + for (int index = 0; index < Terraria.Liquid.resLiquid; ++index) + Main.liquid[index] = new Terraria.Liquid(); + for (int index = 0; index < 10000; ++index) + Main.liquidBuffer[index] = new LiquidBuffer(); + this.waterfallManager = new WaterfallManager(); + Lighting.LightingThreads = 0; + this.shop[0] = new Chest(); + Chest.SetupTravelShop(); + for (int type = 1; type < Main.MaxShopIDs; ++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); + if (Main.menuMode == 1) + Main.LoadPlayers(); + for (int Type = 1; Type < 714; ++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.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(); + 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); + } + this.ClientInitialize(); + } + + private void ClientInitialize() + { + MessageBuffer.OnTileChangeReceived += new TileChangeReceivedEvent(this.OnTileChangeEvent); + Main.clientUUID = Guid.NewGuid().ToString(); + FilterManager scene = Filters.Scene; + ((Platform) Platform.Current).InitializeIme(this.Window.Handle); + PlatformIme ime = ((Platform) Platform.Current).Ime; + ime.OnKeyPress = (__Null) Delegate.Combine((Delegate) ime.OnKeyPress, (Delegate) (keyStroke => + { + if (Main.keyCount >= 10) + return; + Main.keyInt[Main.keyCount] = (int) keyStroke; + Main.keyString[Main.keyCount] = keyStroke.ToString() ?? ""; + ++Main.keyCount; + })); + base.Initialize(); + this.Window.AllowUserResizing = true; + this.OpenSettings(); + 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.OpenRecent(); + Star.SpawnStars(); + WorldGen.RandomizeWeather(); + this._achievements = new AchievementManager(); + AchievementInitializer.Load(); + DyeInitializer.Load(); + ScreenEffectInitializer.Load(); + AchievementCompleteUI.Initialize(); + UILinksInitializer.Load(); + ItemSorting.SetupWhiteLists(); + 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; + } + } + } + if (Main.autoJoin) + { + Main.LoadPlayers(); + Main.menuMode = 1; + Main.menuMultiplayer = true; + } + Main.fpsTimer.Start(); + } + + public T OurLoad(string path) + { + lock (Main.globalTextureLocker) + { + Texture2D tex; + return TexturePackSupport.Enabled && typeof (T) == this.t2d && TexturePackSupport.FetchTexture(path + ".png", out tex) ? (T) tex : this.Content.Load(path); + } + } + + protected override void LoadContent() + { + Main.Configuration.Load(); + Main.Configuration.Get("UseExperimentalFeatures", ref Main.UseExperimentalFeatures); + if (Main.UseExperimentalFeatures) + TexturePackSupport.Enabled = true; + 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) + Main.SetGraphicsProfile(GraphicsProfile.HiDef); + TexturePackSupport.FindTexturePack(); + TextureManager.Initialize(); + 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.TileShaderRef.Value = Main.ShaderContentManager.Load("TileShader"); + Main.ScreenShaderRef.Value = Main.ShaderContentManager.Load("ScreenShader"); + try + { + Main.LoadMusic(); + this.LoadSounds(); + } + catch + { + Main.musicVolume = 0.0f; + Main.soundVolume = 0.0f; + } + this.LoadTextures(); + this.LoadFonts(); + Mount.Initialize(); + Minecart.Initialize(); + } + + private void LoadFonts() + { + Main.fontItemStack = this.OurLoad("Fonts" + Path.DirectorySeparatorChar.ToString() + "Item_Stack"); + Main.fontMouseText = this.OurLoad("Fonts" + Path.DirectorySeparatorChar.ToString() + "Mouse_Text"); + Main.fontDeathText = this.OurLoad("Fonts" + Path.DirectorySeparatorChar.ToString() + "Death_Text"); + Main.fontCombatText[0] = this.OurLoad("Fonts" + Path.DirectorySeparatorChar.ToString() + "Combat_Text"); + Main.fontCombatText[1] = this.OurLoad("Fonts" + Path.DirectorySeparatorChar.ToString() + "Combat_Crit"); + } + + private void LoadTextures() + { + Main.tileCrackTexture = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "TileCracks"); + Main.chestStackTexture[0] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "ChestStack_0"); + Main.chestStackTexture[1] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "ChestStack_1"); + Main.smartDigTexture = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "SmartDig"); + this.iceBarrierTexture = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "IceBarrier"); + Main.frozenTexture = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Frozen"); + for (int index = 0; index < Main.PVPTexture.Length; ++index) + Main.PVPTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "PVP_" + (object) index); + for (int index = 0; index < Main.EquipPageTexture.Length; ++index) + Main.EquipPageTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "DisplaySlots_" + (object) index); + for (int index = 0; index < Main.HouseBannerTexture.Length; ++index) + Main.HouseBannerTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "House_Banner_" + (object) index); + for (int index = 0; index < Main.craftToggleTexture.Length; ++index) + Main.craftToggleTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Craft_Toggle_" + (object) index); + for (int index = 0; index < Main.inventorySortTexture.Length; ++index) + Main.inventorySortTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Sort_" + (object) index); + for (int index = 0; index < Main.textGlyphTexture.Length; ++index) + Main.textGlyphTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Glyphs_" + (object) index); + for (int index = 0; index < Main.hotbarRadialTexture.Length; ++index) + Main.hotbarRadialTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "HotbarRadial_" + (object) index); + for (int index = 0; index < this.infoIconTexture.Length; ++index) + this.infoIconTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "InfoIcon_" + (object) index); + for (int index = 0; index < Main.reforgeTexture.Length; ++index) + Main.reforgeTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Reforge_" + (object) index); + for (int index = 0; index < Main.cameraTexture.Length; ++index) + Main.cameraTexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Camera_" + (object) index); + for (int index = 0; index < Main.wireUITexture.Length; ++index) + Main.wireUITexture[index] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "UI" + Path.DirectorySeparatorChar.ToString() + "Wires_" + (object) index); + string[] strArray1 = new string[5] + { + "Images", + null, + null, + null, + null + }; + char directorySeparatorChar1 = Path.DirectorySeparatorChar; + strArray1[1] = directorySeparatorChar1.ToString(); + strArray1[2] = "UI"; + directorySeparatorChar1 = Path.DirectorySeparatorChar; + strArray1[3] = directorySeparatorChar1.ToString(); + strArray1[4] = "BuilderIcons"; + Main.builderAccTexture = this.OurLoad(string.Concat(strArray1)); + string[] strArray2 = new string[5] + { + "Images", + null, + null, + null, + null + }; + char directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray2[1] = directorySeparatorChar2.ToString(); + strArray2[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray2[3] = directorySeparatorChar2.ToString(); + strArray2[4] = "UI_quickicon1"; + Main.quicksIconTexture = this.OurLoad(string.Concat(strArray2)); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.craftUpButtonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "RecUp"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.craftDownButtonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "RecDown"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.scrollLeftButtonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "RecLeft"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.scrollRightButtonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "RecRight"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.oneDropLogo = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "OneDropLogo"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pulleyTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "PlayerPulley"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.timerTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Timer"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wofTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "WallOfFlesh"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wallOutlineTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wall_Outline"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.fadeTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "fade-out"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.ghostTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Ghost"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.evilCactusTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Evil_Cactus"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.goodCactusTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Good_Cactus"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.crimsonCactusTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Crimson_Cactus"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wraithEyeTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wraith_Eyes"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.fireflyTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Firefly"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.fireflyJarTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "FireflyJar"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.lightningbugTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "LightningBug"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.lightningbugJarTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "LightningBugJar"); + AchievementCompleteUI.LoadContent(); + for (int index1 = 1; index1 <= 3; ++index1) + { + Texture2D[] jellyfishBowlTexture = Main.jellyfishBowlTexture; + int index2 = index1 - 1; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "jellyfishBowl"; + objArray[3] = (object) index1; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + jellyfishBowlTexture[index2] = texture2D; + } + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.glowSnailTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "GlowSnail"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.iceQueenTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "IceQueen"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.santaTankTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "SantaTank"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.jackHatTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "JackHat"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.treeFaceTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "TreeFace"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pumpkingFaceTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "PumpkingFace"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.reaperEyeTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Reaper_Eyes"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapDeathTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapDeath"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.dukeFishronTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "DukeFishron"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.miniMinotaurTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MiniMinotaur"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.mapTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Map"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG1Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG1"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG3Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG3"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG4Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG4"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG5Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG5"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG6Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG6"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG7Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG7"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG8Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG8"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG9Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG9"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG10Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG10"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG11Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG11"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG12Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG12"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG13Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG13"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG14Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG14"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.mapBG15Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MapBG15"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + this.hueTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Hue"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.colorSliderTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "ColorSlider"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.colorBarTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "ColorBar"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.colorBlipTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "ColorBlip"); + string[] strArray3 = new string[5] + { + "Images", + null, + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray3[1] = directorySeparatorChar2.ToString(); + strArray3[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray3[3] = directorySeparatorChar2.ToString(); + strArray3[4] = "Slider_Highlight"; + Main.colorHighlightTexture = this.OurLoad(string.Concat(strArray3)); + string[] strArray4 = new string[5] + { + "Images", + null, + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray4[1] = directorySeparatorChar2.ToString(); + strArray4[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray4[3] = directorySeparatorChar2.ToString(); + strArray4[4] = "LockOn_Cursor"; + Main.LockOnCursorTexture = this.OurLoad(string.Concat(strArray4)); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.rainTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Rain"); + for (int index3 = 0; index3 < 252; ++index3) + { + Texture2D[] glowMaskTexture = Main.glowMaskTexture; + int index4 = index3; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Glow_"; + objArray[3] = (object) index3; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + glowMaskTexture[index4] = texture2D; + } + for (int index5 = 0; index5 < Main.highlightMaskTexture.Length; ++index5) + { + if (TileID.Sets.HasOutlines[index5]) + { + Texture2D[] highlightMaskTexture = Main.highlightMaskTexture; + int index6 = index5; + object[] objArray = new object[8]; + objArray[0] = (object) "Images"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Misc"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[3] = (object) directorySeparatorChar2.ToString(); + objArray[4] = (object) "TileOutlines"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[5] = (object) directorySeparatorChar2.ToString(); + objArray[6] = (object) "Tiles_"; + objArray[7] = (object) index5; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + highlightMaskTexture[index6] = texture2D; + } + } + for (int index7 = 0; index7 < 91; ++index7) + { + Texture2D[] extraTexture = Main.extraTexture; + int index8 = index7; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Extra_"; + objArray[3] = (object) index7; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + extraTexture[index8] = texture2D; + } + for (int index9 = 0; index9 < 4; ++index9) + { + Texture2D[] coinTexture = Main.coinTexture; + int index10 = index9; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Coin_"; + objArray[3] = (object) index9; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + coinTexture[index10] = texture2D; + } + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.magicPixel = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MagicPixel"); + string[] strArray5 = new string[5] + { + "Images", + null, + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray5[1] = directorySeparatorChar2.ToString(); + strArray5[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray5[3] = directorySeparatorChar2.ToString(); + strArray5[4] = "Settings_Panel"; + Main.settingsPanelTexture = this.OurLoad(string.Concat(strArray5)); + string[] strArray6 = new string[5] + { + "Images", + null, + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray6[1] = directorySeparatorChar2.ToString(); + strArray6[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray6[3] = directorySeparatorChar2.ToString(); + strArray6[4] = "Settings_Panel_2"; + Main.settingsPanelTexture2 = this.OurLoad(string.Concat(strArray6)); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.miniMapFrameTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MiniMapFrame"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.miniMapFrame2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "MiniMapFrame2"); + for (int index11 = 0; index11 < Main.xmasTree.Length; ++index11) + { + Texture2D[] xmasTree = Main.xmasTree; + int index12 = index11; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Xmas_"; + objArray[3] = (object) index11; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + xmasTree[index12] = texture2D; + } + for (int index13 = 0; index13 < 4; ++index13) + { + Texture2D[] clothesTexture = Main.clothesTexture; + int index14 = index13; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Clothes_"; + objArray[3] = (object) index13; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + clothesTexture[index14] = texture2D; + } + for (int index15 = 0; index15 < Main.FlameTexture.Length; ++index15) + { + Texture2D[] flameTexture = Main.FlameTexture; + int index16 = index15; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Flame_"; + objArray[3] = (object) index15; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + flameTexture[index16] = texture2D; + } + for (int index17 = 0; index17 < 3; ++index17) + { + Texture2D[] mapButtonTexture = Main.miniMapButtonTexture; + int index18 = index17; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "MiniMapButton_"; + objArray[3] = (object) index17; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + mapButtonTexture[index18] = texture2D; + } + for (int index19 = 0; index19 < 8; ++index19) + { + Texture2D[] mapIconTexture = Main.mapIconTexture; + int index20 = index19; + object[] objArray = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar2.ToString(); + objArray[2] = (object) "Map_"; + objArray[3] = (object) index19; + Texture2D texture2D = this.OurLoad(string.Concat(objArray)); + mapIconTexture[index20] = texture2D; + } + for (int index = 0; index < Main.underworldTexture.Length; ++index) + Main.underworldTexture[index] = this.OurLoad("Images/Backgrounds/Underworld " + (object) index); + Texture2D[] destTexture1 = Main.destTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D1 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Dest1"); + destTexture1[0] = texture2D1; + Texture2D[] destTexture2 = Main.destTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D2 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Dest2"); + destTexture2[1] = texture2D2; + Texture2D[] destTexture3 = Main.destTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D3 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Dest3"); + destTexture3[2] = texture2D3; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.actuatorTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Actuator"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wireTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wires"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wire2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wires2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wire3Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wires3"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wire4Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Wires4"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.wireTextureNew = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "WiresNew"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.flyingCarpetTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "FlyingCarpet"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.hbTexture1 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "HealthBar1"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.hbTexture2 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "HealthBar2"); + object[] objArray1 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray1[1] = (object) directorySeparatorChar2.ToString(); + objArray1[2] = (object) "logo_"; + objArray1[3] = (object) Main.rand.Next(1, 9); + Main.loTexture = this.OurLoad(string.Concat(objArray1)); + Main.spriteBatch = new SpriteBatch(this.GraphicsDevice); + Main.tileBatch = new TileBatch(this.GraphicsDevice); + Main.GameViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + Main.BackgroundViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + for (int index21 = 0; index21 < Main.npcHeadTexture.Length; ++index21) + { + Texture2D[] npcHeadTexture = Main.npcHeadTexture; + int index22 = index21; + object[] objArray2 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray2[1] = (object) directorySeparatorChar2.ToString(); + objArray2[2] = (object) "NPC_Head_"; + objArray2[3] = (object) index21; + Texture2D texture2D4 = this.OurLoad(string.Concat(objArray2)); + npcHeadTexture[index22] = texture2D4; + } + for (int index23 = 0; index23 < Main.npcHeadBossTexture.Length; ++index23) + { + Texture2D[] npcHeadBossTexture = Main.npcHeadBossTexture; + int index24 = index23; + object[] objArray3 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray3[1] = (object) directorySeparatorChar2.ToString(); + objArray3[2] = (object) "NPC_Head_Boss_"; + objArray3[3] = (object) index23; + Texture2D texture2D5 = this.OurLoad(string.Concat(objArray3)); + npcHeadBossTexture[index24] = texture2D5; + } + for (int index25 = 1; index25 < Main.BackPackTexture.Length; ++index25) + { + Texture2D[] backPackTexture = Main.BackPackTexture; + int index26 = index25; + object[] objArray4 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray4[1] = (object) directorySeparatorChar2.ToString(); + objArray4[2] = (object) "BackPack_"; + objArray4[3] = (object) index25; + Texture2D texture2D6 = this.OurLoad(string.Concat(objArray4)); + backPackTexture[index26] = texture2D6; + } + for (int index27 = 1; index27 < 206; ++index27) + { + Texture2D[] buffTexture = Main.buffTexture; + int index28 = index27; + object[] objArray5 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray5[1] = (object) directorySeparatorChar2.ToString(); + objArray5[2] = (object) "Buff_"; + objArray5[3] = (object) index27; + Texture2D texture2D7 = this.OurLoad(string.Concat(objArray5)); + buffTexture[index28] = texture2D7; + } + this.LoadBackground(0); + this.LoadBackground(49); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.minecartMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Minecart"); + for (int index29 = 0; index29 < Main.rudolphMountTexture.Length; ++index29) + { + Texture2D[] rudolphMountTexture = Main.rudolphMountTexture; + int index30 = index29; + object[] objArray6 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray6[1] = (object) directorySeparatorChar2.ToString(); + objArray6[2] = (object) "Rudolph_"; + objArray6[3] = (object) index29; + Texture2D texture2D8 = this.OurLoad(string.Concat(objArray6)); + rudolphMountTexture[index30] = texture2D8; + } + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.bunnyMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Bunny"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pigronMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Pigron"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.slimeMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Slime"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.turtleMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Turtle"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.unicornMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Unicorn"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.basiliskMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Basilisk"); + Texture2D[] mechMountTexture1 = Main.minecartMechMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D9 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_MinecartMech"); + mechMountTexture1[0] = texture2D9; + Texture2D[] mechMountTexture2 = Main.minecartMechMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D10 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_MinecartMechGlow"); + mechMountTexture2[1] = texture2D10; + Texture2D[] fishronMountTexture1 = Main.cuteFishronMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D11 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_CuteFishron1"); + fishronMountTexture1[0] = texture2D11; + Texture2D[] fishronMountTexture2 = Main.cuteFishronMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D12 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_CuteFishron2"); + fishronMountTexture2[1] = texture2D12; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.minecartWoodMountTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_MinecartWood"); + Texture2D[] beeMountTexture1 = Main.beeMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D13 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Bee"); + beeMountTexture1[0] = texture2D13; + Texture2D[] beeMountTexture2 = Main.beeMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D14 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_BeeWings"); + beeMountTexture2[1] = texture2D14; + Texture2D[] ufoMountTexture1 = Main.UFOMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D15 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_UFO"); + ufoMountTexture1[0] = texture2D15; + Texture2D[] ufoMountTexture2 = Main.UFOMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D16 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_UFOGlow"); + ufoMountTexture2[1] = texture2D16; + Texture2D[] drillMountTexture1 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D17 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_DrillRing"); + drillMountTexture1[0] = texture2D17; + Texture2D[] drillMountTexture2 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D18 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_DrillSeat"); + drillMountTexture2[1] = texture2D18; + Texture2D[] drillMountTexture3 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D19 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_DrillDiode"); + drillMountTexture3[2] = texture2D19; + Texture2D[] drillMountTexture4 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D20 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Glow_DrillRing"); + drillMountTexture4[3] = texture2D20; + Texture2D[] drillMountTexture5 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D21 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Glow_DrillSeat"); + drillMountTexture5[4] = texture2D21; + Texture2D[] drillMountTexture6 = Main.drillMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D22 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Glow_DrillDiode"); + drillMountTexture6[5] = texture2D22; + Texture2D[] scutlixMountTexture1 = Main.scutlixMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D23 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_Scutlix"); + scutlixMountTexture1[0] = texture2D23; + Texture2D[] scutlixMountTexture2 = Main.scutlixMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D24 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_ScutlixEyes"); + scutlixMountTexture2[1] = texture2D24; + Texture2D[] scutlixMountTexture3 = Main.scutlixMountTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D25 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mount_ScutlixEyeGlow"); + scutlixMountTexture3[2] = texture2D25; + for (int index31 = 0; index31 < 3930; ++index31) + { + int index32 = ItemID.Sets.TextureCopyLoad[index31]; + if (index32 != -1) + { + Main.itemTexture[index31] = Main.itemTexture[index32]; + } + else + { + Texture2D[] itemTexture = Main.itemTexture; + int index33 = index31; + object[] objArray7 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray7[1] = (object) directorySeparatorChar2.ToString(); + objArray7[2] = (object) "Item_"; + objArray7[3] = (object) index31; + Texture2D texture2D26 = this.OurLoad(string.Concat(objArray7)); + itemTexture[index33] = texture2D26; + } + } + for (int index34 = 0; index34 < Main.gemTexture.Length; ++index34) + { + Texture2D[] gemTexture = Main.gemTexture; + int index35 = index34; + object[] objArray8 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray8[1] = (object) directorySeparatorChar2.ToString(); + objArray8[2] = (object) "Gem_"; + objArray8[3] = (object) index34; + Texture2D texture2D27 = this.OurLoad(string.Concat(objArray8)); + gemTexture[index35] = texture2D27; + } + for (int index36 = 0; index36 < 22; ++index36) + { + Texture2D[] cloudTexture = Main.cloudTexture; + int index37 = index36; + object[] objArray9 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray9[1] = (object) directorySeparatorChar2.ToString(); + objArray9[2] = (object) "Cloud_"; + objArray9[3] = (object) index36; + Texture2D texture2D28 = this.OurLoad(string.Concat(objArray9)); + cloudTexture[index37] = texture2D28; + } + for (int index38 = 0; index38 < 5; ++index38) + { + Texture2D[] starTexture = Main.starTexture; + int index39 = index38; + object[] objArray10 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray10[1] = (object) directorySeparatorChar2.ToString(); + objArray10[2] = (object) "Star_"; + objArray10[3] = (object) index38; + Texture2D texture2D29 = this.OurLoad(string.Concat(objArray10)); + starTexture[index39] = texture2D29; + } + for (int index40 = 0; index40 < 12; ++index40) + { + Texture2D[] liquidTexture = Main.liquidTexture; + int index41 = index40; + object[] objArray11 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray11[1] = (object) directorySeparatorChar2.ToString(); + objArray11[2] = (object) "Liquid_"; + objArray11[3] = (object) index40; + Texture2D texture2D30 = this.OurLoad(string.Concat(objArray11)); + liquidTexture[index41] = texture2D30; + } + this.waterfallManager.LoadContent(); + Texture2D[] npcToggleTexture1 = Main.npcToggleTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D31 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "House_1"); + npcToggleTexture1[0] = texture2D31; + Texture2D[] npcToggleTexture2 = Main.npcToggleTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D32 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "House_2"); + npcToggleTexture2[1] = texture2D32; + Texture2D[] hbLockTexture1 = Main.HBLockTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D33 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Lock_0"); + hbLockTexture1[0] = texture2D33; + Texture2D[] hbLockTexture2 = Main.HBLockTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D34 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Lock_1"); + hbLockTexture2[1] = texture2D34; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.gridTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Grid"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.trashTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Trash"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.cdTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "CoolDown"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.logoTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Logo"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.logo2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Logo2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.dustTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Dust"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.sunTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Sun"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.sun2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Sun2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.sun3Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Sun3"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.blackTileTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Black_Tile"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.heartTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Heart"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.heart2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Heart2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.bubbleTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Bubble"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.flameTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Flame"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.manaTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Mana"); + for (int index42 = 0; index42 < Main.cursorTextures.Length; ++index42) + { + Texture2D[] cursorTextures = Main.cursorTextures; + int index43 = index42; + object[] objArray12 = new object[6]; + objArray12[0] = (object) "Images"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray12[1] = (object) directorySeparatorChar2.ToString(); + objArray12[2] = (object) "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray12[3] = (object) directorySeparatorChar2.ToString(); + objArray12[4] = (object) "Cursor_"; + objArray12[5] = (object) index42; + Texture2D texture2D35 = this.OurLoad(string.Concat(objArray12)); + cursorTextures[index43] = texture2D35; + } + string[] strArray7 = new string[5] + { + "Images", + null, + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray7[1] = directorySeparatorChar2.ToString(); + strArray7[2] = "UI"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + strArray7[3] = directorySeparatorChar2.ToString(); + strArray7[4] = "Radial"; + Main.cursorRadialTexture = this.OurLoad(string.Concat(strArray7)); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.ninjaTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Ninja"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.antLionTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "AntlionBody"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.spikeBaseTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Spike_Base"); + Texture2D[] woodTexture1 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D36 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_0"); + woodTexture1[0] = texture2D36; + Texture2D[] woodTexture2 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D37 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_1"); + woodTexture2[1] = texture2D37; + Texture2D[] woodTexture3 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D38 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_2"); + woodTexture3[2] = texture2D38; + Texture2D[] woodTexture4 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D39 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_3"); + woodTexture4[3] = texture2D39; + Texture2D[] woodTexture5 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D40 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_4"); + woodTexture5[4] = texture2D40; + Texture2D[] woodTexture6 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D41 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_5"); + woodTexture6[5] = texture2D41; + Texture2D[] woodTexture7 = Main.woodTexture; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Texture2D texture2D42 = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Tiles_5_6"); + woodTexture7[6] = texture2D42; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pumpkinMoonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Moon_Pumpkin"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.snowMoonTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Moon_Snow"); + for (int index44 = 0; index44 < Main.moonTexture.Length; ++index44) + { + Texture2D[] moonTexture = Main.moonTexture; + int index45 = index44; + object[] objArray13 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray13[1] = (object) directorySeparatorChar2.ToString(); + objArray13[2] = (object) "Moon_"; + objArray13[3] = (object) index44; + Texture2D texture2D43 = this.OurLoad(string.Concat(objArray13)); + moonTexture[index45] = texture2D43; + } + for (int index46 = 0; index46 < Main.treeTopTexture.Length; ++index46) + { + Texture2D[] treeTopTexture = Main.treeTopTexture; + int index47 = index46; + object[] objArray14 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray14[1] = (object) directorySeparatorChar2.ToString(); + objArray14[2] = (object) "Tree_Tops_"; + objArray14[3] = (object) index46; + Texture2D texture2D44 = this.OurLoad(string.Concat(objArray14)); + treeTopTexture[index47] = texture2D44; + } + for (int index48 = 0; index48 < Main.treeBranchTexture.Length; ++index48) + { + Texture2D[] treeBranchTexture = Main.treeBranchTexture; + int index49 = index48; + object[] objArray15 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray15[1] = (object) directorySeparatorChar2.ToString(); + objArray15[2] = (object) "Tree_Branches_"; + objArray15[3] = (object) index48; + Texture2D texture2D45 = this.OurLoad(string.Concat(objArray15)); + treeBranchTexture[index49] = texture2D45; + } + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.shroomCapTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Shroom_Tops"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBackTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack3Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back3"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack4Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back4"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack5Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back5"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack6Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back6"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack7Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back7"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack8Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back8"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack9Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back9"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack10Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back10"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack11Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back11"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack12Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back12"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack13Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back13"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack14Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back14"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack15Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back15"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryBack16Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Back16"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.hairStyleBackTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "HairStyleBack"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.clothesStyleBackTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "ClothesStyleBack"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryTickOffTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Tick_Off"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.inventoryTickOnTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Inventory_Tick_On"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.textBackTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Text_Back"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chatTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chat"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chat2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chat2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chatBackTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chat_Back"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.teamTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Team"); + PlayerDataInitializer.Load(); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chaosTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chaos"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.EyeLaserTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Eye_Laser"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.BoneEyesTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Bone_Eyes"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.BoneLaserTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Bone_Laser"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.lightDiscTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Light_Disc"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.confuseTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Confuse"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.probeTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Probe"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.sunOrbTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "SunOrb"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.sunAltarTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "SunAltar"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.xmasLightTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "XmasLight"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.beetleTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "BeetleOrb"); + for (int index50 = 0; index50 < 17; ++index50) + { + Texture2D[] chainsTexture = Main.chainsTexture; + int index51 = index50; + object[] objArray16 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray16[1] = (object) directorySeparatorChar2.ToString(); + objArray16[2] = (object) "Chains_"; + objArray16[3] = (object) index50; + Texture2D texture2D46 = this.OurLoad(string.Concat(objArray16)); + chainsTexture[index51] = texture2D46; + } + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain20Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain20"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.fishingLineTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "FishingLine"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chainTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain2"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain3Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain3"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain4Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain4"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain5Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain5"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain6Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain6"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain7Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain7"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain8Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain8"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain9Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain9"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain10Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain10"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain11Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain11"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain12Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain12"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain13Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain13"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain14Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain14"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain15Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain15"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain16Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain16"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain17Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain17"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain18Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain18"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain19Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain19"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain20Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain20"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain21Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain21"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain22Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain22"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain23Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain23"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain24Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain24"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain25Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain25"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain26Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain26"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain27Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain27"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain28Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain28"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain29Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain29"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain30Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain30"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain31Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain31"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain32Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain32"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain33Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain33"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain34Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain34"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain35Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain35"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain36Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain36"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain37Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain37"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain38Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain38"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain39Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain39"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.chain40Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Chain40"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.eyeLaserSmallTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Eye_Laser_Small"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.boneArmTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Arm_Bone"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pumpkingArmTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "PumpkingArm"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.pumpkingCloakTexture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "PumpkingCloak"); + directorySeparatorChar2 = Path.DirectorySeparatorChar; + Main.boneArm2Texture = this.OurLoad("Images" + directorySeparatorChar2.ToString() + "Arm_Bone_2"); + for (int index52 = 1; index52 < Main.gemChainTexture.Length; ++index52) + { + Texture2D[] gemChainTexture = Main.gemChainTexture; + int index53 = index52; + object[] objArray17 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray17[1] = (object) directorySeparatorChar2.ToString(); + objArray17[2] = (object) "GemChain_"; + objArray17[3] = (object) index52; + Texture2D texture2D47 = this.OurLoad(string.Concat(objArray17)); + gemChainTexture[index53] = texture2D47; + } + for (int index54 = 1; index54 < Main.golemTexture.Length; ++index54) + { + Texture2D[] golemTexture = Main.golemTexture; + int index55 = index54; + object[] objArray18 = new object[4] + { + (object) "Images", + null, + null, + null + }; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray18[1] = (object) directorySeparatorChar2.ToString(); + objArray18[2] = (object) "GolemLights"; + objArray18[3] = (object) index54; + Texture2D texture2D48 = this.OurLoad(string.Concat(objArray18)); + golemTexture[index55] = texture2D48; + } + Main.npcAltTextures = new Texture2D[Main.npcTexture.Length][]; + for (int i = 0; i < NPCID.Sets.ExtraTextureCount.Length; ++i) + { + int num = NPCID.Sets.ExtraTextureCount[i]; + Main.npcAltTextures[i] = new Texture2D[num + 1]; + if (num > 0) + { + this.LoadNPC(i); + Main.npcAltTextures[i][0] = Main.npcTexture[i]; + } + for (int index56 = 1; index56 <= num; ++index56) + { + Texture2D[] npcAltTexture = Main.npcAltTextures[i]; + int index57 = index56; + object[] objArray19 = new object[6]; + objArray19[0] = (object) "Images"; + directorySeparatorChar2 = Path.DirectorySeparatorChar; + objArray19[1] = (object) directorySeparatorChar2.ToString(); + objArray19[2] = (object) "NPC_"; + objArray19[3] = (object) i; + objArray19[4] = (object) "_Alt_"; + objArray19[5] = (object) index56; + Texture2D texture2D49 = this.OurLoad(string.Concat(objArray19)); + npcAltTexture[index57] = texture2D49; + } + } + } + + private static void LoadMusic() + { + Main.engine = new AudioEngine("Content" + Path.DirectorySeparatorChar.ToString() + "TerrariaMusic.xgs"); + Main.soundBank = new SoundBank(Main.engine, "Content" + Path.DirectorySeparatorChar.ToString() + "Sound Bank.xsb"); + Main.waveBank = new WaveBank(Main.engine, "Content" + Path.DirectorySeparatorChar.ToString() + "Wave Bank.xwb"); + for (int index = 1; index < 42; ++index) + Main.music[index] = Main.soundBank.GetCue("Music_" + (object) index); + } + + private void LoadSounds() + { + Main.soundMech[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Mech_0"); + Main.soundInstanceMech[0] = Main.soundMech[0].CreateInstance(); + Main.soundGrab = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Grab"); + Main.soundInstanceGrab = Main.soundGrab.CreateInstance(); + Main.soundPixie = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Pixie"); + Main.soundInstancePixie = Main.soundGrab.CreateInstance(); + Main.soundDig[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Dig_0"); + Main.soundInstanceDig[0] = Main.soundDig[0].CreateInstance(); + Main.soundDig[1] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Dig_1"); + Main.soundInstanceDig[1] = Main.soundDig[1].CreateInstance(); + Main.soundDig[2] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Dig_2"); + Main.soundInstanceDig[2] = Main.soundDig[2].CreateInstance(); + Main.soundTink[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Tink_0"); + Main.soundInstanceTink[0] = Main.soundTink[0].CreateInstance(); + Main.soundTink[1] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Tink_1"); + Main.soundInstanceTink[1] = Main.soundTink[1].CreateInstance(); + Main.soundTink[2] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Tink_2"); + Main.soundInstanceTink[2] = Main.soundTink[2].CreateInstance(); + Main.soundPlayerHit[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Player_Hit_0"); + Main.soundInstancePlayerHit[0] = Main.soundPlayerHit[0].CreateInstance(); + Main.soundPlayerHit[1] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Player_Hit_1"); + Main.soundInstancePlayerHit[1] = Main.soundPlayerHit[1].CreateInstance(); + Main.soundPlayerHit[2] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Player_Hit_2"); + Main.soundInstancePlayerHit[2] = Main.soundPlayerHit[2].CreateInstance(); + Main.soundFemaleHit[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Female_Hit_0"); + Main.soundInstanceFemaleHit[0] = Main.soundFemaleHit[0].CreateInstance(); + Main.soundFemaleHit[1] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Female_Hit_1"); + Main.soundInstanceFemaleHit[1] = Main.soundFemaleHit[1].CreateInstance(); + Main.soundFemaleHit[2] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Female_Hit_2"); + Main.soundInstanceFemaleHit[2] = Main.soundFemaleHit[2].CreateInstance(); + Main.soundPlayerKilled = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Player_Killed"); + Main.soundInstancePlayerKilled = Main.soundPlayerKilled.CreateInstance(); + Main.soundChat = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Chat"); + Main.soundInstanceChat = Main.soundChat.CreateInstance(); + Main.soundGrass = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Grass"); + Main.soundInstanceGrass = Main.soundGrass.CreateInstance(); + Main.soundDoorOpen = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Door_Opened"); + Main.soundInstanceDoorOpen = Main.soundDoorOpen.CreateInstance(); + Main.soundDoorClosed = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Door_Closed"); + Main.soundInstanceDoorClosed = Main.soundDoorClosed.CreateInstance(); + Main.soundMenuTick = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Menu_Tick"); + Main.soundInstanceMenuTick = Main.soundMenuTick.CreateInstance(); + Main.soundMenuOpen = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Menu_Open"); + Main.soundInstanceMenuOpen = Main.soundMenuOpen.CreateInstance(); + Main.soundMenuClose = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Menu_Close"); + Main.soundInstanceMenuClose = Main.soundMenuClose.CreateInstance(); + Main.soundShatter = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Shatter"); + Main.soundInstanceShatter = Main.soundShatter.CreateInstance(); + Main.soundCamera = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Camera"); + Main.soundInstanceCamera = Main.soundShatter.CreateInstance(); + for (int index = 0; index < Main.soundCoin.Length; ++index) + { + Main.soundCoin[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Coin_" + (object) index); + Main.soundInstanceCoin[index] = Main.soundCoin[index].CreateInstance(); + } + for (int index = 0; index < Main.soundDrip.Length; ++index) + { + Main.soundDrip[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Drip_" + (object) index); + Main.soundInstanceDrip[index] = Main.soundDrip[index].CreateInstance(); + } + for (int index = 0; index < Main.soundZombie.Length; ++index) + { + Main.soundZombie[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Zombie_" + (object) index); + Main.soundInstanceZombie[index] = Main.soundZombie[index].CreateInstance(); + } + for (int index = 0; index < Main.soundLiquid.Length; ++index) + { + Main.soundLiquid[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Liquid_" + (object) index); + Main.soundInstanceLiquid[index] = Main.soundLiquid[index].CreateInstance(); + } + for (int index = 0; index < Main.soundRoar.Length; ++index) + { + Main.soundRoar[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Roar_" + (object) index); + Main.soundInstanceRoar[index] = Main.soundRoar[index].CreateInstance(); + } + Main.soundSplash[0] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Splash_0"); + Main.soundInstanceSplash[0] = Main.soundRoar[0].CreateInstance(); + Main.soundSplash[1] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Splash_1"); + Main.soundInstanceSplash[1] = Main.soundSplash[1].CreateInstance(); + Main.soundDoubleJump = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Double_Jump"); + Main.soundInstanceDoubleJump = Main.soundRoar[0].CreateInstance(); + Main.soundRun = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Run"); + Main.soundInstanceRun = Main.soundRun.CreateInstance(); + Main.soundCoins = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Coins"); + Main.soundInstanceCoins = Main.soundCoins.CreateInstance(); + Main.soundUnlock = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Unlock"); + Main.soundInstanceUnlock = Main.soundUnlock.CreateInstance(); + Main.soundMaxMana = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "MaxMana"); + Main.soundInstanceMaxMana = Main.soundMaxMana.CreateInstance(); + Main.soundDrown = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Drown"); + Main.soundInstanceDrown = Main.soundDrown.CreateInstance(); + for (int index = 1; index < 126; ++index) + { + Main.soundItem[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Item_" + (object) index); + Main.soundInstanceItem[index] = Main.soundItem[index].CreateInstance(); + } + for (int index = 1; index < 58; ++index) + { + Main.soundNPCHit[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "NPC_Hit_" + (object) index); + Main.soundInstanceNPCHit[index] = Main.soundNPCHit[index].CreateInstance(); + } + for (int index = 1; index < 63; ++index) + { + Main.soundNPCKilled[index] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "NPC_Killed_" + (object) index); + Main.soundInstanceNPCKilled[index] = Main.soundNPCKilled[index].CreateInstance(); + } + Main.trackableSounds = new SoundEffect[SoundID.TrackableLegacySoundCount]; + Main.trackableSoundInstances = new SoundEffectInstance[Main.trackableSounds.Length]; + for (int id = 0; id < Main.trackableSounds.Length; ++id) + { + Main.trackableSounds[id] = this.OurLoad("Sounds" + Path.DirectorySeparatorChar.ToString() + "Custom" + Path.DirectorySeparatorChar.ToString() + SoundID.GetTrackableLegacySoundPath(id)); + Main.trackableSoundInstances[id] = Main.trackableSounds[id].CreateInstance(); + } + Main.soundInstanceMoonlordCry = Main.soundNPCKilled[10].CreateInstance(); + } + + protected override void UnloadContent() + { + } + + public static void stopMoonEvent() + { + 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; + 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; + NetMessage.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; + 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; + NetMessage.BroadcastChatMessage(invasionWaveText, new Microsoft.Xna.Framework.Color(175, 75, (int) byte.MaxValue)); + } + } + + protected void UpdateAudio() + { + if (!Main.dedServ) + { + bool flag = (!Main.hasFocus || Main.gamePaused) && Main.netMode == 0; + if (flag) + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) Main._trackedSounds) + ((ActiveSound) trackedSound.Value).Pause(); + } + else if (Main._areSoundsPaused && !flag) + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) Main._trackedSounds) + ((ActiveSound) trackedSound.Value).Resume(); + } + Main._areSoundsPaused = flag; + if (!Main._areSoundsPaused) + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) Main._trackedSounds) + { + ((ActiveSound) trackedSound.Value).Update(); + if (!((ActiveSound) trackedSound.Value).IsPlaying) + Main._trackedSounds.Remove((SlotId) trackedSound.Id); + } + } + } + if ((double) Main.musicVolume == 0.0) + Main.curMusic = 0; + try + { + if (Main.dedServ) + return; + if (Main.curMusic > 0) + { + if (!this.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) + { + } + } + } + } + for (int index = 0; index < Main.soundInstanceLiquid.Length; ++index) + Main.soundInstanceLiquid[index].Stop(); + } + 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) + { + } + } + } + } + } + } + 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; + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + int num1 = 5000; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + 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: + num2 = 11; + break; + case 113: + case 114: + case 125: + case 126: + num2 = 2; + break; + case 134: + case 143: + case 144: + case 145: + case 266: + num2 = 3; + break; + case 212: + case 213: + case 214: + case 215: + case 216: + case 491: + num2 = 8; + break; + case 222: + num2 = 5; + break; + case 245: + num2 = 4; + break; + case 262: + case 263: + case 264: + num2 = 6; + 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) + { + num2 = 4; + break; + } + break; + case 439: + num2 = 4; + 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_88; + case 2: + flag2 = true; + goto label_88; + case 3: + flag3 = true; + goto label_88; + case 4: + flag4 = true; + goto label_88; + case 5: + flag5 = true; + goto label_88; + case 6: + flag6 = true; + goto label_88; + case 7: + flag7 = true; + goto label_88; + case 8: + flag8 = true; + goto label_88; + case 9: + flag9 = true; + goto label_88; + case 10: + flag10 = true; + goto label_88; + case 11: + flag11 = true; + goto label_88; + case 12: + flag12 = true; + goto label_88; + default: + goto label_88; + } + } + } + } + } +label_88: + int num3 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + if ((double) Main.musicVolume == 0.0) + this.newMusic = 0; + else if (Main.gameMenu) + { + this.newMusic = Main.netMode == 2 ? 0 : 6; + } + 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 = 38; + else if (flag9) + this.newMusic = 37; + else if (flag10) + this.newMusic = 34; + else if (flag6) + this.newMusic = 24; + 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 (flag8) + this.newMusic = 35; + else if (flag11) + this.newMusic = 39; + else if (flag12) + this.newMusic = 41; + else if (Main.player[Main.myPlayer].ZoneSandstorm) + this.newMusic = 40; + else if ((double) Main.player[Main.myPlayer].position.Y > (double) ((Main.maxTilesY - 200) * 16)) + this.newMusic = 36; + else if (Main.eclipse && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) + this.newMusic = 27; + else if ((double) num6 < 1.0) + this.newMusic = 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 == (byte) 87) + this.newMusic = 26; + else if (Main.bgStyle == 9 && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) || Main.ugBack == 2) + this.newMusic = 29; + else if (Main.player[Main.myPlayer].ZoneCorrupt) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 8 : 10; + 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].ZoneDungeon) + this.newMusic = 23; + else if (Main.player[Main.myPlayer].ZoneMeteor) + this.newMusic = 2; + else if (Main.player[Main.myPlayer].ZoneJungle) + this.newMusic = 7; + 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)) + { + if (Main.player[Main.myPlayer].ZoneHoly) + this.newMusic = 11; + else if (Main.sandTiles > 2200) + { + this.newMusic = 21; + } + 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].ZoneHoly) + this.newMusic = (double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? 9 : 19; + else if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && (num3 < 380 || num3 > Main.maxTilesX - 380)) + this.newMusic = 22; + else if (Main.sandTiles > 1000) + this.newMusic = 21; + else if (Main.dayTime) + { + if ((double) Main.cloudAlpha > 0.0 && !Main.gameMenu) + { + this.newMusic = 19; + } + else + { + if (Main.dayMusic == 0) + Main.dayMusic = 1; + if (!Main.music[1].IsPlaying && !Main.music[18].IsPlaying) + { + switch (Main.rand.Next(2)) + { + case 0: + Main.dayMusic = 1; + break; + case 1: + Main.dayMusic = 18; + break; + } + } + this.newMusic = Main.dayMusic; + } + } + 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) + this.newMusic = 32; + } + if (Main.gameMenu || (double) Main.musicVolume == 0.0) + { + Main.musicBox2 = -1; + Main.musicBox = -1; + } + if (Main.musicBox2 >= 0) + Main.musicBox = Main.musicBox2; + if (Main.musicBox >= 0) + { + if (Main.musicBox == 0) + this.newMusic = 1; + if (Main.musicBox == 1) + this.newMusic = 2; + if (Main.musicBox == 2) + this.newMusic = 3; + if (Main.musicBox == 4) + this.newMusic = 4; + if (Main.musicBox == 5) + this.newMusic = 5; + if (Main.musicBox == 3) + this.newMusic = 6; + if (Main.musicBox == 6) + this.newMusic = 7; + if (Main.musicBox == 7) + this.newMusic = 8; + if (Main.musicBox == 9) + this.newMusic = 9; + if (Main.musicBox == 8) + this.newMusic = 10; + if (Main.musicBox == 11) + this.newMusic = 11; + if (Main.musicBox == 10) + this.newMusic = 12; + if (Main.musicBox == 12) + this.newMusic = 13; + if (Main.musicBox == 13) + this.newMusic = 14; + if (Main.musicBox == 14) + this.newMusic = 15; + if (Main.musicBox == 15) + this.newMusic = 16; + if (Main.musicBox == 16) + this.newMusic = 17; + if (Main.musicBox == 17) + this.newMusic = 18; + if (Main.musicBox == 18) + this.newMusic = 19; + if (Main.musicBox == 19) + this.newMusic = 20; + if (Main.musicBox == 20) + this.newMusic = 21; + if (Main.musicBox == 21) + this.newMusic = 22; + if (Main.musicBox == 22) + this.newMusic = 23; + if (Main.musicBox == 23) + this.newMusic = 24; + if (Main.musicBox == 24) + this.newMusic = 25; + if (Main.musicBox == 25) + this.newMusic = 26; + if (Main.musicBox == 26) + this.newMusic = 27; + if (Main.musicBox == 27) + this.newMusic = 29; + if (Main.musicBox == 28) + this.newMusic = 30; + if (Main.musicBox == 29) + this.newMusic = 31; + if (Main.musicBox == 30) + this.newMusic = 32; + if (Main.musicBox == 31) + this.newMusic = 33; + if (Main.musicBox == 32) + this.newMusic = 38; + if (Main.musicBox == 33) + this.newMusic = 37; + if (Main.musicBox == 34) + this.newMusic = 35; + if (Main.musicBox == 35) + this.newMusic = 36; + if (Main.musicBox == 36) + this.newMusic = 34; + if (Main.musicBox == 37) + this.newMusic = 39; + if (Main.musicBox == 38) + this.newMusic = 40; + if (Main.musicBox == 39) + this.newMusic = 41; + } + Main.curMusic = this.newMusic; + float num7 = 1f; + if (NPC.MoonLordCountdown > 0) + { + float num8 = (float) NPC.MoonLordCountdown / 3600f; + float amount = num8 * num8; + if (NPC.MoonLordCountdown > 720) + { + num7 = MathHelper.Lerp(0.0f, 1f, amount); + } + else + { + num7 = 0.0f; + Main.curMusic = 0; + } + if (NPC.MoonLordCountdown == 1 && Main.curMusic >= 1 && Main.curMusic < 42) + Main.musicFade[Main.curMusic] = 0.0f; + } + for (int index = 1; index < 42; ++index) + { + if (index == 28) + { + 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) + { + 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); + } + 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); + } + } + else if (Main.music[index].IsPlaying) + { + 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].Stop(AudioStopOptions.Immediate); + } + else + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume); + } + else + Main.musicFade[index] = 0.0f; + } + else if (index == Main.curMusic) + { + 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.musicVolume * num7); + } + 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.musicVolume * num7); + } + } + else if (Main.music[index].IsPlaying) + { + 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].Stop(AudioStopOptions.Immediate); + } + else + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.musicVolume * num7); + } + 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 void snowing() + { + if (Main.gamePaused || Main.snowTiles <= 0 || (double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0) + return; + int maxValue = 800 / Main.snowTiles; + int num1 = (int) ((double) (int) (500.0 * (double) ((float) Main.screenWidth / (float) Main.maxScreenW)) * (1.0 + 2.0 * (double) Main.cloudAlpha)); + float num2 = (float) (1.0 + 50.0 * (double) Main.cloudAlpha); + for (int index1 = 0; (double) index1 < (double) num2; ++index1) + { + try + { + if ((double) Main.snowDust >= (double) num1 * ((double) Main.gfxQuality / 2.0 + 0.5) + (double) num1 * 0.100000001490116) + break; + if (Main.rand.Next(maxValue) == 0) + { + int num3 = Main.rand.Next(Main.screenWidth + 1000) - 500; + int num4 = (int) Main.screenPosition.Y - Main.rand.Next(50); + if ((double) Main.player[Main.myPlayer].velocity.Y > 0.0) + num4 -= (int) Main.player[Main.myPlayer].velocity.Y; + if (Main.rand.Next(5) == 0) + num3 = Main.rand.Next(500) - 500; + else if (Main.rand.Next(5) == 0) + num3 = Main.rand.Next(500) + Main.screenWidth; + if (num3 < 0 || num3 > Main.screenWidth) + num4 += Main.rand.Next((int) ((double) Main.screenHeight * 0.8)) + (int) ((double) Main.screenHeight * 0.1); + int num5 = num3 + (int) Main.screenPosition.X; + int index2 = num5 / 16; + int index3 = num4 / 16; + if (Main.tile[index2, index3] != null) + { + if (Main.tile[index2, index3].wall == (byte) 0) + { + int index4 = Dust.NewDust(new Vector2((float) num5, (float) num4), 10, 10, 76); + Main.dust[index4].scale += Main.cloudAlpha * 0.2f; + Main.dust[index4].velocity.Y = (float) (3.0 + (double) Main.rand.Next(30) * 0.100000001490116); + Main.dust[index4].velocity.Y *= Main.dust[index4].scale; + if (!Main.raining) + { + Main.dust[index4].velocity.X = Main.windSpeed + (float) Main.rand.Next(-10, 10) * 0.1f; + Main.dust[index4].velocity.X += (float) ((double) Main.windSpeed * (double) Main.cloudAlpha * 10.0); + } + else + { + Main.dust[index4].velocity.X = (float) (Math.Sqrt((double) Math.Abs(Main.windSpeed)) * (double) Math.Sign(Main.windSpeed) * ((double) Main.cloudAlpha + 0.5) * 25.0 + (double) Main.rand.NextFloat() * 0.200000002980232 - 0.100000001490116); + Main.dust[index4].velocity.Y *= 0.5f; + } + Main.dust[index4].velocity.Y *= (float) (1.0 + 0.300000011920929 * (double) Main.cloudAlpha); + Main.dust[index4].scale += Main.cloudAlpha * 0.2f; + Main.dust[index4].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; + if (day >= 15 && month == 12) + Main.xMas = true; + else + Main.xMas = false; + } + + public static void checkHalloween() + { + DateTime now = DateTime.Now; + int day = now.Day; + int month = now.Month; + if (day >= 20 && month == 10) + Main.halloween = true; + else if (day <= 1 && month == 11) + Main.halloween = true; + else + Main.halloween = false; + } + + public void updateCloudLayer() + { + switch (Main.netMode) + { + case 0: + if (Main.gameMenu) + return; + break; + case 1: + return; + } + int num1 = 86400; + int num2 = num1 / 24; + float num3 = 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 / num3; + if ((double) Main.cloudBGActive < 1.0) + Main.cloudBGActive = 1f; + if ((double) Main.cloudBGActive != 1.0 || Main.rand.Next((int) ((double) (num2 * 2 / Math.Max(Main.dayRate, 1)) * (double) num3)) != 0) + return; + Main.cloudBGActive = (float) -Main.rand.Next(num2 * 4, num1 * 4); + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + else + { + if ((double) Main.cloudBGActive < 0.0) + { + Main.cloudBGActive += (float) Main.dayRate * num3; + if (Main.raining) + Main.cloudBGActive += (float) (2 * Main.dayRate) * num3; + } + if ((double) Main.cloudBGActive > 0.0) + Main.cloudBGActive = 0.0f; + if ((double) Main.cloudBGActive != 0.0 || Main.rand.Next((int) ((double) (num2 * 8 / (Main.dayRate == 0 ? 1 : Main.dayRate)) / (double) num3)) != 0) + return; + Main.cloudBGActive = (float) Main.rand.Next(num2 * 3, num1 * 2); + 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) + { + switch (Style) + { + case 0: + Main.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: + Main.PlaySound(SoundID.Item8, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num2 = effectRect.Width * effectRect.Height / 5; + 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: + for (int index = 0; index < 50; ++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: + Main.PlaySound(SoundID.Item6, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + for (int index5 = 0; index5 < 50; ++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: + Main.PlaySound(SoundID.Item8, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num3 = (int) ((double) (effectRect.Width * effectRect.Height / 5) * (double) dustCountMult); + for (int index = 0; index < num3; ++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; + } + } + + public static void Ambience() + { + ++Main.ambientCounter; + if (Main.ambientCounter < 15) + return; + Main.ambientCounter = 0; + Main.PlaySound(34, (int) Main.ambientWaterfallX, (int) Main.ambientWaterfallY, (int) Main.ambientWaterfallStrength); + 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; + Main.PlaySound(35, (int) num3, (int) num4, (int) num6); + } + + public static void 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) + { + 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) + { + 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 num1 = 0; + for (int index3 = 0; index3 < 3; ++index3) + { + switch (index3) + { + case 0: + num1 = 24; + break; + case 1: + num1 = 31; + break; + case 2: + num1 = 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] >= num1) + 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) + { + byte num2 = 5; + if (Main.fishBowlFrameMode[index] == (byte) 1) + { + if (Main.rand.Next(900) == 0) + Main.fishBowlFrameMode[index] = (byte) Main.rand.Next((int) num2); + ++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) num2); + ++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) num2); + ++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) num2); + ++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 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 num3 = Main.rand.Next(3, 16); + if (Main.butterflyCageMode[index5, index6] == (byte) 1 || Main.butterflyCageMode[index5, index6] == (byte) 11) + num3 = 3; + if (Main.butterflyCageMode[index5, index6] == (byte) 2 || Main.butterflyCageMode[index5, index6] == (byte) 12) + num3 = 5; + if (Main.butterflyCageMode[index5, index6] == (byte) 3 || Main.butterflyCageMode[index5, index6] == (byte) 13) + num3 = 10; + if (Main.butterflyCageMode[index5, index6] == (byte) 4 || Main.butterflyCageMode[index5, index6] == (byte) 14) + num3 = 15; + if (Main.butterflyCageMode[index5, index6] >= (byte) 10) + { + if (Main.butterflyCageFrame[index5, index6] <= 7) + { + if (Main.butterflyCageFrameCounter[index5, index6] >= num3) + { + 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] >= num3) + { + 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] >= num3) + { + 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] >= num3) + { + 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; + } + } + } + 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 num4 = 1; + if (Main.jellyfishCageMode[index7, index8] == (byte) 0) + num4 = Main.rand.Next(10, 20); + if (Main.jellyfishCageMode[index7, index8] == (byte) 1) + num4 = Main.rand.Next(15, 25); + if (Main.jellyfishCageMode[index7, index8] == (byte) 2) + num4 = Main.rand.Next(4, 9); + if (Main.jellyfishCageMode[index7, index8] == (byte) 3) + num4 = Main.rand.Next(15, 25); + if (Main.jellyfishCageMode[index7, index8] == (byte) 0 && Main.jellyfishCageFrame[index7, index8] <= 3 && Main.jellyfishCageFrameCounter[index7, index8] >= num4) + { + 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] >= num4) + { + 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] >= num4) + { + 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] >= num4) + { + 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; + } + } + } + } + } + + 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 int TextMaxLengthForScreen => Main.screenWidth - 320; + + public void CrazyTestMemoryLimit() + { + if (!this._crazyTestedMemoryLimit) + { + this._crazyTestedMemoryLimit = true; + this._crazyTestArrayMemoryLimit = new Player[50000]; + for (int index = 0; index < this._crazyTestArrayMemoryLimit.Length; ++index) + this._crazyTestArrayMemoryLimit[index] = new Player(); + } + int index1 = Main.rand.Next(this._crazyTestArrayMemoryLimit.Length); + Main.NewText("testing " + (object) index1 + " " + this._crazyTestArrayMemoryLimit[index1].name); + } + + protected override void Update(GameTime gameTime) + { + if (!Main.IsEnginePreloaded) + { + Main.IsEnginePreloaded = true; + if (Main.OnEnginePreload != null) + Main.OnEnginePreload(); + } + if (this._isDrawingOrUpdating) + return; + 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; + } + + public void UpdateViewZoomKeys() + { + 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); + } + + protected void DoUpdate(GameTime gameTime) + { + Main.ignoreErrors = true; + PartySky.MultipleSkyWorkaroundFix = true; + TimeSpan timeSpan; + if (!Main.GlobalTimerPaused) + { + timeSpan = gameTime.TotalGameTime; + Main.GlobalTime = (float) (timeSpan.TotalSeconds % 3600.0); + } + if (Player.StopMoneyTroughFromWorking > 0 && !Main.mouseRight && Main.mouseRightRelease) + --Player.StopMoneyTroughFromWorking; + PlayerInput.SetZoom_UI(); + if (!Main.gameMenu || Main.menuMode != 888) + Main.MenuUI.SetState((UIState) null); + else + Main.InGameUI.SetState((UIState) null); + if (Main.MenuUI != null) + Main.MenuUI.Update(gameTime); + if (Main.InGameUI != null) + Main.InGameUI.Update(gameTime); + PlayerInput.SetZoom_Unscaled(); + Main.MouseOversTryToClear(); + PlayerInput.ResetInputsOnActiveStateChange(); + if (Main.OnTick != null) + Main.OnTick(); + if (Main._hasPendingNetmodeChange) + { + Main.netMode = Main._targetNetMode; + Main._hasPendingNetmodeChange = false; + } + if (CaptureManager.Instance.IsCapturing) + return; + if (Main.ActivePlayerFileData != null) + Main.ActivePlayerFileData.UpdatePlayTimer(); + if (Main.expertMode) + { + Main.damageMultiplier = Main.expertDamage; + Main.knockBackMultiplier = Main.expertKnockBack; + } + else + { + Main.damageMultiplier = 1f; + Main.knockBackMultiplier = 1f; + } + Main.gameInactive = !this.IsActive; + if (Main.chTitle) + { + Main.chTitle = false; + this.SetTitle(); + } + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + 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; + } + } + if (!Main.dedServ) + { + 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.DoUpdate_AutoSave(); + ++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; + Filters.Scene.Update(gameTime); + Overlays.Scene.Update(gameTime); + SkyManager.Instance.Update(gameTime); + LiquidRenderer.Instance.Update(gameTime); + this.UpdateAudio(); + AchievementCompleteUI.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.maxLiquid = (int) (2500.0 + 2500.0 * (double) Main.gfxQuality); + Terraria.Liquid.cycles = (int) (17.0 - 10.0 * (double) Main.gfxQuality); + } + if (Main.superFast) + { + Main.graphics.SynchronizeWithVerticalRetrace = false; + Main.drawSkip = false; + } + Lighting.maxRenderCount = (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.maxLiquid = Terraria.Liquid.resLiquid; + Terraria.Liquid.cycles = 1; + } + Main.hasFocus = this.IsActive; + Main.hasFocus = Form.ActiveForm == Control.FromHandle(this.Window.Handle) as Form; + if (!Main.gameMenu || Main.netMode == 2) + { + WorldFile.tempRaining = Main.raining; + WorldFile.tempRainTime = Main.rainTime; + WorldFile.tempMaxRain = Main.maxRaining; + } + 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; + 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.DoUpdate_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(); + } + if (Main.netMode == 2) + Main.cloudAlpha = Main.maxRaining; + if (this.IsActive && (double) Main.cloudAlpha > 0.0) + Rain.MakeRain(); + if (Main.netMode != 1) + this.updateCloudLayer(); + this.UpdateWeather(gameTime); + Main.Ambience(); + if (Main.netMode != 2) + { + if (Main.ignoreErrors) + { + try + { + Main.snowing(); + } + catch + { + } + } + else + Main.snowing(); + Sandstorm.EmitDust(); + } + if (Main.netMode == 1) + { + for (int index = 0; index < 59; ++index) + { + if (Main.player[Main.myPlayer].inventory[index].IsNotTheSameAs(Main.clientPlayer.inventory[index])) + 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(Main.clientPlayer.armor[index])) + 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(Main.clientPlayer.miscEquips[index])) + 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(Main.clientPlayer.miscDyes[index])) + 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(Main.clientPlayer.bank.item[index])) + 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(Main.clientPlayer.bank2.item[index])) + 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(Main.clientPlayer.trashItem)) + 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(Main.clientPlayer.bank3.item[index])) + 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].dye.Length; ++index) + { + if (Main.player[Main.myPlayer].dye[index].IsNotTheSameAs(Main.clientPlayer.dye[index])) + 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 != Main.clientPlayer.chest && Main.player[Main.myPlayer].chest < 0) + { + if (Main.player[Main.myPlayer].editedChestName) + { + if (Main.chest[Main.clientPlayer.chest] != null) + NetMessage.SendData(33, text: NetworkText.FromLiteral(Main.chest[Main.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 != Main.clientPlayer.talkNPC) + NetMessage.SendData(40, number: Main.myPlayer); + bool flag1 = false; + if ((int) (byte) Main.player[Main.myPlayer].zone1 != (int) (byte) Main.clientPlayer.zone1) + flag1 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone2 != (int) (byte) Main.clientPlayer.zone2) + flag1 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone3 != (int) (byte) Main.clientPlayer.zone3) + flag1 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone4 != (int) (byte) Main.clientPlayer.zone4) + flag1 = true; + if (flag1) + NetMessage.SendData(36, number: Main.myPlayer); + if (Main.player[Main.myPlayer].statLife != Main.clientPlayer.statLife || Main.player[Main.myPlayer].statLifeMax != Main.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 != Main.clientPlayer.statMana || Main.player[Main.myPlayer].statManaMax != Main.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 flag2 = false; + for (int index = 0; index < 22; ++index) + { + if (Main.player[Main.myPlayer].buffType[index] != Main.clientPlayer.buffType[index]) + flag2 = true; + } + if (flag2) + { + NetMessage.SendData(50, number: Main.myPlayer); + NetMessage.SendData(13, number: Main.myPlayer); + } + bool flag3 = false; + if (Main.player[Main.myPlayer].MinionRestTargetPoint != Main.clientPlayer.MinionRestTargetPoint) + flag3 = true; + if (flag3) + NetMessage.SendData(99, number: Main.myPlayer); + bool flag4 = false; + if (Main.player[Main.myPlayer].MinionAttackTargetNPC != Main.clientPlayer.MinionAttackTargetNPC) + flag4 = true; + if (flag4) + NetMessage.SendData(115, number: Main.myPlayer); + } + if (Main.netMode == 1) + Main.clientPlayer = (Player) Main.player[Main.myPlayer].clientClone(); + if (Main.netMode == 0 && (Main.playerInventory || Main.npcChatText != "" || Main.player[Main.myPlayer].sign >= 0 || Main.ingameOptionsWindow || Main.inFancyUI) && Main.autoPause) + { + 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) + { + 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; + Main.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; + Main.player[Main.myPlayer].lastChest = Main.player[Main.myPlayer].chest; + if (Main.playerInventory) + Main.player[Main.myPlayer].AdjTiles(); + Main.gamePaused = true; + } + else + { + Main.gamePaused = false; + if (!Main.dedServ && (double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0 && Main.netMode != 2) + { + Star.UpdateStars(); + Cloud.UpdateClouds(); + } + PortalHelper.UpdatePortalPoints(); + Main.tileSolid[379] = false; + Main.ActivePlayersCount = 0; + for (int i = 0; i < (int) byte.MaxValue; ++i) + { + if (Main.ignoreErrors) + { + try + { + Main.player[i].Update(i); + } + catch + { + } + } + else + Main.player[i].Update(i); + } + ++Main._gameUpdateCount; + 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].activeNPCs = 0.0f; + Main.player[index].townNPCs = 0.0f; + } + if (Main.wof >= 0 && !Main.npc[Main.wof].active) + Main.wof = -1; + if (NPC.golemBoss >= 0 && !Main.npc[NPC.golemBoss].active) + NPC.golemBoss = -1; + if (NPC.plantBoss >= 0 && !Main.npc[NPC.plantBoss].active) + NPC.plantBoss = -1; + if (NPC.crimsonBoss >= 0 && !Main.npc[NPC.crimsonBoss].active) + NPC.crimsonBoss = -1; + NPC.taxCollector = false; + NPC.ClearFoundActiveNPCs(); + NPC.UpdateFoundActiveNPCs(); + FixExploitManEaters.Update(); + for (int i = 0; i < 200; ++i) + { + if (Main.ignoreErrors) + { + try + { + Main.npc[i].UpdateNPC(i); + } + catch (Exception ex) + { + Main.npc[i] = new NPC(); + } + } + else + Main.npc[i].UpdateNPC(i); + } + for (int index = 0; index < 500; ++index) + { + if (Main.ignoreErrors) + { + try + { + Main.gore[index].Update(); + } + catch + { + Main.gore[index] = new Gore(); + } + } + else + Main.gore[index].Update(); + } + LockOnHelper.SetUP(); + 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; + LockOnHelper.SetDOWN(); + 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(); + ItemText.UpdateItemText(); + } + if (Main.ignoreErrors) + { + try + { + Main.UpdateTime(); + } + catch + { + Main.checkForSpawns = 0; + } + } + else + Main.UpdateTime(); + Main.tileSolid[379] = true; + 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(); + } + if (Main.ignoreErrors) + { + try + { + for (int index = 0; index < Main.numChatLines; ++index) + { + if (Main.chatLine[index].showTime > 0) + --Main.chatLine[index].showTime; + } + } + catch + { + for (int index = 0; index < Main.numChatLines; ++index) + Main.chatLine[index] = new ChatLine(); + } + } + else + { + for (int index = 0; index < Main.numChatLines; ++index) + { + if (Main.chatLine[index].showTime > 0) + --Main.chatLine[index].showTime; + } + } + timeSpan = stopwatch.Elapsed; + Main.upTimer = (float) timeSpan.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(); + if ((double) Main.cameraLerp > 0.0) + { + ++Main.cameraLerpTimer; + if (Main.cameraLerpTimer >= Main.cameraLerpTimeToggle) + Main.cameraLerp += (float) ((Main.cameraLerpTimer - Main.cameraLerpTimeToggle) / 3 + 1) * (1f / 1000f); + if ((double) Main.cameraLerp > 1.0) + Main.cameraLerp = 1f; + } + base.Update(gameTime); + } + } + + private static void DoUpdate_AnimateCursorColors() + { + Main.CursorColor(); + Main.mouseTextColor += (byte) Main.mouseTextColorChange; + if (Main.mouseTextColor >= (byte) 250) + Main.mouseTextColorChange = -4; + if (Main.mouseTextColor > (byte) 175) + return; + Main.mouseTextColorChange = 4; + } + + 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) && Main.netMode == 1 && !Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftAlt) && !Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.RightAlt) && Main.hasFocus) + { + if (Main.chatRelease && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.gameMenu && !Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) + { + Main.PlaySound(10); + Main.drawingPlayerChat = true; + Main.clrInput(); + Main.chatText = ""; + } + Main.chatRelease = false; + } + else + Main.chatRelease = true; + } + + private static void DoUpdate_HandleChat() + { + if (Main.editSign) + Main.drawingPlayerChat = false; + if (!Main.drawingPlayerChat) + { + Main.startChatLine = 0; + } + else + { + Main.showCount = (int) ((double) (Main.screenHeight / 3) / (double) Main.fontMouseText.MeasureString("1").Y) - 1; + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Up)) + { + ++Main.startChatLine; + if (Main.startChatLine + Main.showCount >= Main.numChatLines - 1) + Main.startChatLine = Main.numChatLines - Main.showCount - 1; + if (Main.chatLine[Main.startChatLine + Main.showCount].text == "") + --Main.startChatLine; + } + else if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Down)) + { + --Main.startChatLine; + if (Main.startChatLine < 0) + Main.startChatLine = 0; + } + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) + Main.drawingPlayerChat = false; + string chatText1 = Main.chatText; + Main.chatText = Main.GetInputText(Main.chatText); + int num = (int) ((double) Main.screenWidth * (1.0 / (double) Main.UIScale)) - 330; + if (chatText1 != Main.chatText) + { + while ((double) ChatManager.GetStringSize(Main.fontMouseText, Main.chatText, Vector2.One).X > (double) num) + Main.chatText = Main.chatText.Substring(0, Main.chatText.Length - 1); + } + if (chatText1 != Main.chatText) + Main.PlaySound(12); + if (!Main.inputTextEnter || !Main.chatRelease) + return; + if (Main.chatText != "") + { + ChatMessage chatMessage = new ChatMessage(Main.chatText); + ChatManager.Commands.ProcessOutgoingMessage(chatMessage); + NetMessage.SendChatMessageFromClient(chatMessage); + if (Main.netMode == 0) + { + Microsoft.Xna.Framework.Color color = Main.player[Main.myPlayer].ChatColor(); + string chatText2 = Main.chatText; + string text = NameTagHandler.GenerateTag(Main.player[Main.myPlayer].name) + " " + Main.chatText; + Main.player[Main.myPlayer].chatOverhead.NewMessage(Main.chatText, Main.chatLength / 2); + Microsoft.Xna.Framework.Color c = color; + int maxLengthForScreen = Main.TextMaxLengthForScreen; + Main.NewTextMultiline(text, c: c, WidthLimit: maxLengthForScreen); + } + } + Main.chatText = ""; + Main.drawingPlayerChat = false; + Main.chatRelease = false; + PlayerInput.WritingText = true; + Main.player[Main.myPlayer].releaseHook = false; + Main.player[Main.myPlayer].releaseThrow = false; + Main.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; + 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) + { + Main.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) + { + Main.PlaySound(12); + Main.netDiag = !Main.netDiag; + } + Main.netRelease = false; + } + else + Main.netRelease = true; + } + + private static void DoUpdate_F9_ToggleLighting() + { + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F9) && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest) + { + if (Main.RGBRelease) + { + Main.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) + { + Main.PlaySound(12); + Main.showFrameRate = !Main.showFrameRate; + } + Main.frameRelease = false; + } + else + Main.frameRelease = true; + } + + private static void DoUpdate_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[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.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; + } + 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[454] >= 10 && (Main.tileFrame[454] != 0 || Main.tileFrameCounter[454] >= 90)) + { + Main.tileFrameCounter[454] = 0; + if (--Main.tileFrame[454] < 0) + Main.tileFrame[454] = 4; + } + 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[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; + } + Main.CritterCages(); + } + + 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; + } + ++Main.wallFrameCounter[144]; + int num1 = 5; + int num2 = 10; + if ((int) Main.wallFrameCounter[144] < num1) + Main.wallFrame[144] = (byte) 0; + else if ((int) Main.wallFrameCounter[144] < num1) + Main.wallFrame[144] = (byte) 1; + else if ((int) Main.wallFrameCounter[144] < num1 * 2) + Main.wallFrame[144] = (byte) 2; + else if ((int) Main.wallFrameCounter[144] < num1 * 3) + Main.wallFrame[144] = (byte) 3; + else if ((int) Main.wallFrameCounter[144] < num1 * 4) + Main.wallFrame[144] = (byte) 4; + else if ((int) Main.wallFrameCounter[144] < num1 * 5) + Main.wallFrame[144] = (byte) 5; + else if ((int) Main.wallFrameCounter[144] < num1 * 6) + Main.wallFrame[144] = (byte) 6; + else if ((int) Main.wallFrameCounter[144] < num1 * 7) + Main.wallFrame[144] = (byte) 7; + else if ((int) Main.wallFrameCounter[144] < num1 * (8 + num2)) + Main.wallFrame[144] = (byte) 8; + else if ((int) Main.wallFrameCounter[144] < num1 * (9 + num2)) + Main.wallFrame[144] = (byte) 7; + else if ((int) Main.wallFrameCounter[144] < num1 * (10 + num2)) + Main.wallFrame[144] = (byte) 6; + else if ((int) Main.wallFrameCounter[144] < num1 * (11 + num2)) + Main.wallFrame[144] = (byte) 5; + else if ((int) Main.wallFrameCounter[144] < num1 * (12 + num2)) + Main.wallFrame[144] = (byte) 4; + else if ((int) Main.wallFrameCounter[144] < num1 * (13 + num2)) + Main.wallFrame[144] = (byte) 3; + else if ((int) Main.wallFrameCounter[144] < num1 * (14 + num2)) + Main.wallFrame[144] = (byte) 2; + else if ((int) Main.wallFrameCounter[144] < num1 * (15 + num2)) + { + Main.wallFrame[144] = (byte) 1; + } + else + { + Main.wallFrame[144] = (byte) 0; + if ((int) Main.wallFrameCounter[144] <= num1 * (16 + num2 * 2)) + return; + Main.wallFrameCounter[144] = (byte) 0; + } + } + + private void DoUpdate_AnimateWaterfalls() + { + Main.wFrCounter += Main.windSpeed * 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() + { + if (Main.treeMntBG[1] == 94 || Main.treeMntBG[1] >= 114 && Main.treeMntBG[1] <= 116) + { + ++Main.bgFrameCounter[0]; + if (Main.bgFrameCounter[0] >= 6) + { + Main.bgFrameCounter[0] = 0; + ++Main.bgFrame[0]; + if (Main.bgFrame[0] >= 4) + Main.bgFrame[0] = 0; + } + Main.treeMntBG[1] = Main.bgFrame[0] != 0 ? (Main.bgFrame[0] != 1 ? (Main.bgFrame[0] != 2 ? 116 : 115) : 114) : 94; + Main.treeMntBG[0] = Main.bgFrame[0] != 0 ? (Main.bgFrame[0] != 1 ? (Main.bgFrame[0] != 2 ? 170 : 169) : 168) : 93; + } + if (Main.treeMntBG[1] < 180 || Main.treeMntBG[1] > 183) + return; + ++Main.bgFrameCounter[0]; + if (Main.bgFrameCounter[0] >= 6) + { + Main.bgFrameCounter[0] = 0; + ++Main.bgFrame[0]; + if (Main.bgFrame[0] >= 4) + Main.bgFrame[0] = 0; + } + if (Main.bgFrame[0] == 0) + Main.treeMntBG[1] = 180; + else if (Main.bgFrame[0] == 1) + Main.treeMntBG[1] = 181; + else if (Main.bgFrame[0] == 2) + Main.treeMntBG[1] = 182; + else + Main.treeMntBG[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) + { + if (!Main.saveTime.IsRunning) + Main.saveTime.Start(); + if (Main.saveTime.ElapsedMilliseconds <= 600000L) + return; + Main.saveTime.Reset(); + 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); + 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() + { + Main.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() + { + AchievementCompleteUI.Clear(); + Main.playerInventory = false; + Main.exitScale = 0.8f; + switch (Main.netMode) + { + case 0: + Main.maxRaining = 0.0f; + Main.raining = false; + if (Main.grabSky) + break; + Main.time += 86.4; + if (!Main.dayTime) + { + if (Main.time <= 32400.0) + break; + Main.bloodMoon = false; + Main.time = 0.0; + Main.dayTime = true; + ++Main.moonPhase; + if (Main.moonPhase < 8) + 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) + { + if (!Main.hasFocus) + return oldString; + Main.inputTextEnter = false; + Main.inputTextEscape = false; + string str1 = oldString; + string str2 = ""; + 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) Platform.Current).Clipboard = 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) Platform.Current).Clipboard = oldString; + else if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.V) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.V)) + str2 += ((Platform) Platform.Current).Clipboard; + } + 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) Platform.Current).Clipboard = oldString; + str1 = ""; + } + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert)) + { + string str3 = ((Platform) Platform.Current).Clipboard; + for (int index = 0; index < str3.Length; ++index) + { + if (str3[index] < ' ' || str3[index] == '\u007F') + str3 = str3.Replace(str3[index--].ToString() ?? "", ""); + } + str2 += str3; + } + } + for (int index = 0; index < Main.keyCount; ++index) + { + int num = Main.keyInt[index]; + string str4 = 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) + { + str2 += str4; + break; + } + break; + } + } + } + Main.keyCount = 0; + string text = str1 + str2; + 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)) + { + if (Main.backSpaceCount == 0) + { + Main.backSpaceCount = 7; + flag1 = true; + } + --Main.backSpaceCount; + } + else + 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; + } + + public void MouseTextHackZoom(string text) => this.MouseTextHackZoom(text, 0); + + public void MouseTextHackZoom(string text, int itemRarity, byte diff = 0) + { + 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(); + this.MouseText(text, itemRarity, hackedMouseX: mouseX, hackedMouseY: mouseY, hackedScreenWidth: screenWidth, hackedScreenHeight: screenHeight); + } + + public void MouseText( + string cursorText, + int rare = 0, + byte diff = 0, + int hackedMouseX = -1, + int hackedMouseY = -1, + int hackedScreenWidth = -1, + int hackedScreenHeight = -1) + { + if (this.mouseNPC > -1 || cursorText == null) + return; + int X = Main.mouseX + 10; + int Y = Main.mouseY + 10; + if (hackedMouseX != -1 && hackedMouseY != -1) + { + X = hackedMouseX + 10; + Y = hackedMouseY + 10; + } + if (Main.ThickMouse) + { + X += 6; + Y += 6; + } + 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(rare, diff, X, Y); + } + else + { + if (Main.buffString != "" && Main.buffString != null) + this.MouseText_DrawBuffString(ref X, ref Y); + Vector2 vector2 = Main.fontMouseText.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 == -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, Main.fontMouseText, cursorText, new Vector2((float) X, (float) Y), baseColor, 0.0f, Vector2.Zero, Vector2.One); + } + } + + private void MouseText_DrawItemTooltip(int rare, byte diff, int X, int Y) + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + int num1 = -1; + rare = Main.HoverItem.rare; + float knockBack = Main.HoverItem.knockBack; + float num2 = 1f; + if (Main.HoverItem.melee && Main.player[Main.myPlayer].kbGlove) + ++num2; + if (Main.player[Main.myPlayer].kbBuff) + num2 += 0.5f; + if ((double) num2 != 1.0) + Main.HoverItem.knockBack *= num2; + if (Main.HoverItem.ranged && Main.player[Main.myPlayer].shroomiteStealth) + Main.HoverItem.knockBack *= (float) (1.0 + (1.0 - (double) Main.player[Main.myPlayer].stealth) * 0.5); + int length = 20; + int currentLine = 1; + string[] lines = new string[length]; + bool[] flagArray1 = new bool[length]; + bool[] flagArray2 = new bool[length]; + for (int index = 0; index < length; ++index) + { + flagArray1[index] = false; + flagArray2[index] = false; + } + lines[0] = Main.HoverItem.HoverName; + if (Main.HoverItem.favorited) + { + string[] strArray1 = lines; + int index1 = currentLine; + int num3 = index1 + 1; + string str1 = Lang.tip[56].Value; + strArray1[index1] = str1; + string[] strArray2 = lines; + int index2 = num3; + currentLine = index2 + 1; + string str2 = Lang.tip[57].Value; + strArray2[index2] = str2; + } + if (Main.HoverItem.social) + { + lines[currentLine] = Lang.tip[0].Value; + int index = currentLine + 1; + lines[index] = Lang.tip[1].Value; + currentLine = index + 1; + } + else + { + if (Main.HoverItem.damage > 0 && (!Main.HoverItem.notAmmo || Main.HoverItem.useStyle > 0) && (Main.HoverItem.type < 71 || Main.HoverItem.type > 74 || Main.player[Main.myPlayer].HasItem(905))) + { + float num4 = 5E-06f; + int damage = Main.HoverItem.damage; + if (Main.HoverItem.melee) + { + lines[currentLine] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].meleeDamage * (double) damage + (double) num4)); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[2].Value; + } + else if (Main.HoverItem.ranged) + { + float num5 = (float) damage * Main.player[Main.myPlayer].rangedDamage; + if (Main.HoverItem.useAmmo == AmmoID.Arrow || Main.HoverItem.useAmmo == AmmoID.Stake) + num5 *= Main.player[Main.myPlayer].arrowDamage; + if (Main.HoverItem.useAmmo == AmmoID.Arrow && Main.player[Main.myPlayer].archery) + num5 *= 1.2f; + if (Main.HoverItem.useAmmo == AmmoID.Bullet || Main.HoverItem.useAmmo == AmmoID.CandyCorn) + num5 *= Main.player[Main.myPlayer].bulletDamage; + if (Main.HoverItem.useAmmo == AmmoID.Rocket || Main.HoverItem.useAmmo == AmmoID.StyngerBolt || Main.HoverItem.useAmmo == AmmoID.JackOLantern || Main.HoverItem.useAmmo == AmmoID.NailFriendly) + num5 *= Main.player[Main.myPlayer].rocketDamage; + lines[currentLine] = string.Concat((object) (int) ((double) num5 + (double) num4)); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[3].Value; + } + else if (Main.HoverItem.magic) + { + lines[currentLine] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].magicDamage * (double) damage + (double) num4)); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[4].Value; + } + else if (Main.HoverItem.thrown) + { + lines[currentLine] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].thrownDamage * (double) damage + (double) num4)); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[58].Value; + } + else if (Main.HoverItem.summon) + { + lines[currentLine] = Main.HoverItem.type == 3829 || Main.HoverItem.type == 3830 || Main.HoverItem.type == 3831 ? string.Concat((object) (int) (((double) Main.player[Main.myPlayer].minionDamage * (double) damage + (double) num4) * 3.0)) : string.Concat((object) (int) ((double) Main.player[Main.myPlayer].minionDamage * (double) damage + (double) num4)); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[53].Value; + } + else + { + lines[currentLine] = string.Concat((object) damage); + // ISSUE: explicit reference operation + ^ref lines[currentLine] += Lang.tip[55].Value; + } + int index = currentLine + 1; + if (Main.HoverItem.melee) + { + int num6 = Main.player[Main.myPlayer].meleeCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + Main.HoverItem.crit; + lines[index] = num6.ToString() + Lang.tip[5].Value; + ++index; + } + else if (Main.HoverItem.ranged) + { + int num7 = Main.player[Main.myPlayer].rangedCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + Main.HoverItem.crit; + lines[index] = num7.ToString() + Lang.tip[5].Value; + ++index; + } + else if (Main.HoverItem.magic) + { + int num8 = Main.player[Main.myPlayer].magicCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + Main.HoverItem.crit; + lines[index] = num8.ToString() + Lang.tip[5].Value; + ++index; + } + else if (Main.HoverItem.thrown) + { + int num9 = Main.player[Main.myPlayer].thrownCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + Main.HoverItem.crit; + lines[index] = num9.ToString() + Lang.tip[5].Value; + ++index; + } + if (Main.HoverItem.useStyle > 0 && !Main.HoverItem.summon) + { + lines[index] = Main.HoverItem.useAnimation > 8 ? (Main.HoverItem.useAnimation > 20 ? (Main.HoverItem.useAnimation > 25 ? (Main.HoverItem.useAnimation > 30 ? (Main.HoverItem.useAnimation > 35 ? (Main.HoverItem.useAnimation > 45 ? (Main.HoverItem.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; + ++index; + } + float num10 = Main.HoverItem.knockBack; + if (Main.HoverItem.summon) + num10 += Main.player[Main.myPlayer].minionKB; + if (Main.player[Main.myPlayer].magicQuiver && Main.HoverItem.useAmmo == AmmoID.Arrow || Main.HoverItem.useAmmo == AmmoID.Stake) + num10 = (float) (int) ((double) num10 * 1.10000002384186); + if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 3106 && Main.HoverItem.type == 3106) + num10 += num10 * (1f - Main.player[Main.myPlayer].stealth); + lines[index] = (double) num10 != 0.0 ? ((double) num10 > 1.5 ? ((double) num10 > 3.0 ? ((double) num10 > 4.0 ? ((double) num10 > 6.0 ? ((double) num10 > 7.0 ? ((double) num10 > 9.0 ? ((double) num10 > 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; + currentLine = index + 1; + } + if (Main.HoverItem.fishingPole > 0) + { + lines[currentLine] = Language.GetTextValue("GameUI.PrecentFishingPower", (object) Main.HoverItem.fishingPole); + int index = currentLine + 1; + lines[index] = Language.GetTextValue("GameUI.BaitRequired"); + currentLine = index + 1; + } + if (Main.HoverItem.bait > 0) + { + lines[currentLine] = Language.GetTextValue("GameUI.BaitPower", (object) Main.HoverItem.bait); + ++currentLine; + } + if (Main.HoverItem.headSlot > 0 || Main.HoverItem.bodySlot > 0 || Main.HoverItem.legSlot > 0 || Main.HoverItem.accessory || Main.projHook[Main.HoverItem.shoot] || Main.HoverItem.mountType != -1 || Main.HoverItem.buffType > 0 && (Main.lightPet[Main.HoverItem.buffType] || Main.vanityPet[Main.HoverItem.buffType])) + { + lines[currentLine] = Lang.tip[23].Value; + ++currentLine; + } + if (Main.HoverItem.tileWand > 0) + { + lines[currentLine] = Lang.tip[52].Value + Lang.GetItemNameValue(Main.HoverItem.tileWand); + ++currentLine; + } + if (Main.HoverItem.questItem) + { + lines[currentLine] = Lang.inter[65].Value; + ++currentLine; + } + if (Main.HoverItem.vanity) + { + lines[currentLine] = Lang.tip[24].Value; + ++currentLine; + } + if (Main.HoverItem.defense > 0) + { + lines[currentLine] = Main.HoverItem.defense.ToString() + Lang.tip[25].Value; + ++currentLine; + } + if (Main.HoverItem.pick > 0) + { + lines[currentLine] = Main.HoverItem.pick.ToString() + Lang.tip[26].Value; + ++currentLine; + } + if (Main.HoverItem.axe > 0) + { + lines[currentLine] = (Main.HoverItem.axe * 5).ToString() + Lang.tip[27].Value; + ++currentLine; + } + if (Main.HoverItem.hammer > 0) + { + lines[currentLine] = Main.HoverItem.hammer.ToString() + Lang.tip[28].Value; + ++currentLine; + } + if (Main.HoverItem.tileBoost != 0) + { + int tileBoost = Main.HoverItem.tileBoost; + lines[currentLine] = tileBoost <= 0 ? tileBoost.ToString() + Lang.tip[54].Value : "+" + (object) tileBoost + Lang.tip[54].Value; + ++currentLine; + } + if (Main.HoverItem.healLife > 0) + { + lines[currentLine] = Language.GetTextValue("CommonItemTooltip.RestoresLife", (object) Main.HoverItem.healLife); + ++currentLine; + } + if (Main.HoverItem.healMana > 0) + { + lines[currentLine] = Language.GetTextValue("CommonItemTooltip.RestoresMana", (object) Main.HoverItem.healMana); + ++currentLine; + } + if (Main.HoverItem.mana > 0 && (Main.HoverItem.type != (int) sbyte.MaxValue || !Main.player[Main.myPlayer].spaceGun)) + { + lines[currentLine] = Language.GetTextValue("CommonItemTooltip.UsesMana", (object) (int) ((double) Main.HoverItem.mana * (double) Main.player[Main.myPlayer].manaCost)); + ++currentLine; + } + if (Main.HoverItem.createWall > 0 || Main.HoverItem.createTile > -1) + { + if (Main.HoverItem.type != 213 && Main.HoverItem.tileWand < 1) + { + lines[currentLine] = Lang.tip[33].Value; + ++currentLine; + } + } + else if (Main.HoverItem.ammo > 0 && !Main.HoverItem.notAmmo) + { + lines[currentLine] = Lang.tip[34].Value; + ++currentLine; + } + else if (Main.HoverItem.consumable) + { + lines[currentLine] = Lang.tip[35].Value; + ++currentLine; + } + if (Main.HoverItem.material) + { + lines[currentLine] = Lang.tip[36].Value; + ++currentLine; + } + if (Main.HoverItem.ToolTip != null) + { + for (int line = 0; line < Main.HoverItem.ToolTip.Lines; ++line) + { + if (line == 0 && Main.HoverItem.type >= 1533 && Main.HoverItem.type <= 1537 && !NPC.downedPlantBoss) + { + lines[currentLine] = Lang.tip[59].Value; + ++currentLine; + } + else + { + lines[currentLine] = Main.HoverItem.ToolTip.GetLine(line); + ++currentLine; + } + } + } + if ((Main.HoverItem.type == 3818 || Main.HoverItem.type == 3819 || Main.HoverItem.type == 3820 || Main.HoverItem.type == 3824 || Main.HoverItem.type == 3825 || Main.HoverItem.type == 3826 || Main.HoverItem.type == 3829 || Main.HoverItem.type == 3830 || Main.HoverItem.type == 3831 || Main.HoverItem.type == 3832 || Main.HoverItem.type == 3833 || Main.HoverItem.type == 3834) && !Main.player[Main.myPlayer].downedDD2EventAnyDifficulty) + { + lines[currentLine] = Lang.misc[104].Value; + ++currentLine; + } + if (Main.HoverItem.buffType == 26 && Main.expertMode) + { + lines[currentLine] = Lang.misc[40].Value; + ++currentLine; + } + if (Main.HoverItem.buffTime > 0) + { + string str = Main.HoverItem.buffTime / 60 < 60 ? Language.GetTextValue("CommonItemTooltip.SecondDuration", (object) Math.Round((double) Main.HoverItem.buffTime / 60.0)) : Language.GetTextValue("CommonItemTooltip.MinuteDuration", (object) Math.Round((double) (Main.HoverItem.buffTime / 60) / 60.0)); + lines[currentLine] = str; + ++currentLine; + } + if (Main.HoverItem.type == 3262 || Main.HoverItem.type == 3282 || Main.HoverItem.type == 3283 || Main.HoverItem.type == 3284 || Main.HoverItem.type == 3285 || Main.HoverItem.type == 3286 || Main.HoverItem.type == 3316 || Main.HoverItem.type == 3315 || Main.HoverItem.type == 3317 || Main.HoverItem.type == 3291 || Main.HoverItem.type == 3389) + { + lines[currentLine] = " "; + num1 = currentLine; + ++currentLine; + } + if (Main.HoverItem.prefix > (byte) 0) + { + if (Main.cpItem == null || Main.cpItem.netID != Main.HoverItem.netID) + { + Main.cpItem = new Item(); + Main.cpItem.netDefaults(Main.HoverItem.netID); + } + if (Main.cpItem.damage != Main.HoverItem.damage) + { + double num11 = Math.Round(((double) Main.HoverItem.damage - (double) Main.cpItem.damage) / (double) Main.cpItem.damage * 100.0); + lines[currentLine] = num11 <= 0.0 ? num11.ToString() + Lang.tip[39].Value : "+" + (object) num11 + Lang.tip[39].Value; + if (num11 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.cpItem.useAnimation != Main.HoverItem.useAnimation) + { + double num12 = Math.Round(((double) Main.HoverItem.useAnimation - (double) Main.cpItem.useAnimation) / (double) Main.cpItem.useAnimation * 100.0) * -1.0; + lines[currentLine] = num12 <= 0.0 ? num12.ToString() + Lang.tip[40].Value : "+" + (object) num12 + Lang.tip[40].Value; + if (num12 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.cpItem.crit != Main.HoverItem.crit) + { + double num13 = (double) Main.HoverItem.crit - (double) Main.cpItem.crit; + lines[currentLine] = num13 <= 0.0 ? num13.ToString() + Lang.tip[41].Value : "+" + (object) num13 + Lang.tip[41].Value; + if (num13 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.cpItem.mana != Main.HoverItem.mana) + { + double num14 = Math.Round(((double) Main.HoverItem.mana - (double) Main.cpItem.mana) / (double) Main.cpItem.mana * 100.0); + lines[currentLine] = num14 <= 0.0 ? num14.ToString() + Lang.tip[42].Value : "+" + (object) num14 + Lang.tip[42].Value; + if (num14 > 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if ((double) Main.cpItem.scale != (double) Main.HoverItem.scale) + { + double num15 = Math.Round(((double) Main.HoverItem.scale - (double) Main.cpItem.scale) / (double) Main.cpItem.scale * 100.0); + lines[currentLine] = num15 <= 0.0 ? num15.ToString() + Lang.tip[43].Value : "+" + (object) num15 + Lang.tip[43].Value; + if (num15 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if ((double) Main.cpItem.shootSpeed != (double) Main.HoverItem.shootSpeed) + { + double num16 = Math.Round(((double) Main.HoverItem.shootSpeed - (double) Main.cpItem.shootSpeed) / (double) Main.cpItem.shootSpeed * 100.0); + lines[currentLine] = num16 <= 0.0 ? num16.ToString() + Lang.tip[44].Value : "+" + (object) num16 + Lang.tip[44].Value; + if (num16 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if ((double) Main.cpItem.knockBack != (double) knockBack) + { + double num17 = Math.Round(((double) knockBack - (double) Main.cpItem.knockBack) / (double) Main.cpItem.knockBack * 100.0); + lines[currentLine] = num17 <= 0.0 ? num17.ToString() + Lang.tip[45].Value : "+" + (object) num17 + Lang.tip[45].Value; + if (num17 < 0.0) + flagArray2[currentLine] = true; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 62) + { + lines[currentLine] = "+1" + Lang.tip[25].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 63) + { + lines[currentLine] = "+2" + Lang.tip[25].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 64) + { + lines[currentLine] = "+3" + Lang.tip[25].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 65) + { + lines[currentLine] = "+4" + Lang.tip[25].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 66) + { + lines[currentLine] = "+20 " + Lang.tip[31].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 67) + { + lines[currentLine] = "+2" + Lang.tip[5].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 68) + { + lines[currentLine] = "+4" + Lang.tip[5].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 69) + { + lines[currentLine] = "+1" + Lang.tip[39].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 70) + { + lines[currentLine] = "+2" + Lang.tip[39].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 71) + { + lines[currentLine] = "+3" + Lang.tip[39].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 72) + { + lines[currentLine] = "+4" + Lang.tip[39].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 73) + { + lines[currentLine] = "+1" + Lang.tip[46].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 74) + { + lines[currentLine] = "+2" + Lang.tip[46].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 75) + { + lines[currentLine] = "+3" + Lang.tip[46].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 76) + { + lines[currentLine] = "+4" + Lang.tip[46].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 77) + { + lines[currentLine] = "+1" + Lang.tip[47].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 78) + { + lines[currentLine] = "+2" + Lang.tip[47].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 79) + { + lines[currentLine] = "+3" + Lang.tip[47].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + if (Main.HoverItem.prefix == (byte) 80) + { + lines[currentLine] = "+4" + Lang.tip[47].Value; + flagArray1[currentLine] = true; + ++currentLine; + } + } + if (Main.HoverItem.wornArmor && Main.player[Main.myPlayer].setBonus != "") + { + lines[currentLine] = Lang.tip[48].Value + " " + Main.player[Main.myPlayer].setBonus; + ++currentLine; + } + } + if (Main.HoverItem.expert) + { + lines[currentLine] = Language.GetTextValue("GameUI.Expert"); + ++currentLine; + } + float num18 = (float) Main.mouseTextColor / (float) byte.MaxValue; + int mouseTextColor = (int) Main.mouseTextColor; + if (Main.npcShop > 0) + { + int storeValue = Main.HoverItem.GetStoreValue(); + if (Main.HoverItem.shopSpecialCurrency != -1) + { + CustomCurrencyManager.GetPriceText(Main.HoverItem.shopSpecialCurrency, lines, ref currentLine, storeValue); + color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + } + else if (Main.HoverItem.GetStoreValue() > 0) + { + string str = ""; + int num19 = 0; + int num20 = 0; + int num21 = 0; + int num22 = 0; + int num23 = storeValue * Main.HoverItem.stack; + if (!Main.HoverItem.buy) + { + int num24 = storeValue / 5; + if (num24 < 1) + num24 = 1; + num23 = num24 * Main.HoverItem.stack; + } + if (num23 < 1) + num23 = 1; + if (num23 >= 1000000) + { + num19 = num23 / 1000000; + num23 -= num19 * 1000000; + } + if (num23 >= 10000) + { + num20 = num23 / 10000; + num23 -= num20 * 10000; + } + if (num23 >= 100) + { + num21 = num23 / 100; + num23 -= num21 * 100; + } + if (num23 >= 1) + num22 = num23; + if (num19 > 0) + str = str + (object) num19 + " " + Lang.inter[15].Value + " "; + if (num20 > 0) + str = str + (object) num20 + " " + Lang.inter[16].Value + " "; + if (num21 > 0) + str = str + (object) num21 + " " + Lang.inter[17].Value + " "; + if (num22 > 0) + str = str + (object) num22 + " " + Lang.inter[18].Value + " "; + lines[currentLine] = Main.HoverItem.buy ? Lang.tip[50].Value + " " + str : Lang.tip[49].Value + " " + str; + ++currentLine; + if (num19 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num18), (int) (byte) (220.0 * (double) num18), (int) (byte) (198.0 * (double) num18), mouseTextColor); + else if (num20 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num18), (int) (byte) (201.0 * (double) num18), (int) (byte) (92.0 * (double) num18), mouseTextColor); + else if (num21 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num18), (int) (byte) (192.0 * (double) num18), (int) (byte) (193.0 * (double) num18), mouseTextColor); + else if (num22 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num18), (int) (byte) (138.0 * (double) num18), (int) (byte) (96.0 * (double) num18), mouseTextColor); + } + else if (Main.HoverItem.type != 3817) + { + lines[currentLine] = Lang.tip[51].Value; + ++currentLine; + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (120.0 * (double) num18), (int) (byte) (120.0 * (double) num18), (int) (byte) (120.0 * (double) num18), mouseTextColor); + } + } + Vector2 zero = Vector2.Zero; + int num25 = 0; + for (int index = 0; index < currentLine; ++index) + { + Vector2 vector2 = Main.fontMouseText.MeasureString(lines[index]); + if ((double) vector2.X > (double) zero.X) + zero.X = vector2.X; + zero.Y += vector2.Y + (float) num25; + } + X += Main.toolTipDistance; + Y += Main.toolTipDistance; + if ((double) X + (double) zero.X + 4.0 > (double) Main.screenWidth) + X = (int) ((double) Main.screenWidth - (double) zero.X - 4.0); + if ((double) Y + (double) zero.Y + 4.0 > (double) Main.screenHeight) + Y = (int) ((double) Main.screenHeight - (double) zero.Y - 4.0); + int num26 = 0; + double num27 = (double) Main.mouseTextColor / (double) byte.MaxValue; + for (int index3 = 0; index3 < currentLine; ++index3) + { + if (index3 == num1) + { + float num28 = 1f; + int num29 = (int) ((double) Main.mouseTextColor * (double) num28); + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + for (int index4 = 0; index4 < 5; ++index4) + { + int num30 = X; + int num31 = Y + num26; + if (index4 == 4) + color2 = new Microsoft.Xna.Framework.Color(num29, num29, num29, num29); + if (index4 == 0) + --num30; + else if (index4 == 1) + ++num30; + else if (index4 == 2) + --num31; + else if (index4 == 3) + ++num31; + Main.spriteBatch.Draw(Main.oneDropLogo, new Vector2((float) num30, (float) num31), 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(num18, num18, num18, num18); + if (index3 == 0) + { + if (rare == -11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (175.0 * (double) num18), (int) (byte) (0.0 * (double) num18), mouseTextColor); + if (rare == -1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (130.0 * (double) num18), (int) (byte) (130.0 * (double) num18), (int) (byte) (130.0 * (double) num18), mouseTextColor); + if (rare == 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num18), (int) (byte) (150.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + if (rare == 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (150.0 * (double) num18), mouseTextColor); + if (rare == 3) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (200.0 * (double) num18), (int) (byte) (150.0 * (double) num18), mouseTextColor); + if (rare == 4) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (150.0 * (double) num18), (int) (byte) (150.0 * (double) num18), mouseTextColor); + if (rare == 5) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (150.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + if (rare == 6) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (210.0 * (double) num18), (int) (byte) (160.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + if (rare == 7) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (10.0 * (double) num18), mouseTextColor); + if (rare == 8) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (10.0 * (double) num18), mouseTextColor); + if (rare == 9) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (5.0 * (double) num18), (int) (byte) (200.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + if (rare == 10) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (40.0 * (double) num18), (int) (byte) (100.0 * (double) num18), mouseTextColor); + if (rare >= 11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (180.0 * (double) num18), (int) (byte) (40.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), mouseTextColor); + if (diff == (byte) 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mcColor.R * (double) num18), (int) (byte) ((double) Main.mcColor.G * (double) num18), (int) (byte) ((double) Main.mcColor.B * (double) num18), mouseTextColor); + if (diff == (byte) 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.hcColor.R * (double) num18), (int) (byte) ((double) Main.hcColor.G * (double) num18), (int) (byte) ((double) Main.hcColor.B * (double) num18), mouseTextColor); + if (Main.HoverItem.expert || rare == -12) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.DiscoR * (double) num18), (int) (byte) ((double) Main.DiscoG * (double) num18), (int) (byte) ((double) Main.DiscoB * (double) num18), mouseTextColor); + } + else if (flagArray1[index3]) + baseColor = !flagArray2[index3] ? new Microsoft.Xna.Framework.Color((int) (byte) (120.0 * (double) num18), (int) (byte) (190.0 * (double) num18), (int) (byte) (120.0 * (double) num18), mouseTextColor) : new Microsoft.Xna.Framework.Color((int) (byte) (190.0 * (double) num18), (int) (byte) (120.0 * (double) num18), (int) (byte) (120.0 * (double) num18), mouseTextColor); + else if (index3 == currentLine - 1) + baseColor = color1; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, lines[index3], new Vector2((float) X, (float) (Y + num26)), baseColor, 0.0f, Vector2.Zero, Vector2.One); + } + num26 += (int) ((double) Main.fontMouseText.MeasureString(lines[index3]).Y + (double) num25); + } + } + + private void MouseText_DrawBuffString(ref int X, ref int Y) + { + Microsoft.Xna.Framework.Point p = new Microsoft.Xna.Framework.Point(X, Y); + int num1 = 220; + int num2 = -1; + float num3 = 1f / Main.UIScale; + List vector2List = new List(); + Vector2 vector2_1 = Main.fontMouseText.MeasureString(Main.buffString); + vector2List.Add(vector2_1); + int num4 = (int) ((double) (Main.screenHeight - 250) * (double) num3) / 20; + if (num4 < 1) + num4 = 1; + if (Main.bannerMouseOver) + { + int num5 = 0; + for (int i = 0; i < 267; ++i) + { + if (Item.BannerToNPC(i) != 0 && Main.player[Main.myPlayer].NPCBannerBuff[i]) + { + ++num5; + string npcNameValue = Lang.GetNPCNameValue(Item.BannerToNPC(i)); + Vector2 vector2_2 = Main.fontMouseText.MeasureString(npcNameValue); + int num6 = X; + int num7 = Y + (int) vector2_2.Y + num5 * 20 + 10; + int num8 = 0; + int num9 = (num5 - 1) / num4; + for (int index = 0; index < num9; ++index) + { + ++num8; + num6 += num1; + num7 -= num4 * 20; + } + if ((double) num6 + (double) vector2_2.X > (double) Main.screenWidth * (double) num3 && num2 == -1) + num2 = num5; + vector2List.Add(new Vector2((float) (num6 - num1 * num8), (float) num7) + 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) num3) + X = (int) ((double) Main.screenWidth * (double) num3 - (double) zero.X - 24.0); + if ((double) Y + (double) zero.Y + 4.0 > (double) Main.screenHeight * (double) num3) + Y = (int) ((double) Main.screenHeight * (double) num3 - (double) zero.Y - 4.0); + if (num2 != -1) + --num2; + for (int index = 0; index < 5; ++index) + { + int num10 = X; + int num11 = Y + (int) Main.fontMouseText.MeasureString(Main.buffString).Y; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num10 -= 2; + else if (index == 1) + num10 += 2; + else if (index == 2) + num11 -= 2; + else if (index == 3) + num11 += 2; + else + color = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Main.buffString, new Vector2((float) num10, (float) num11), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (!Main.bannerMouseOver) + return; + int num12 = 0; + for (int i = 0; i < 267; ++i) + { + if (Item.BannerToNPC(i) != 0 && Main.player[Main.myPlayer].NPCBannerBuff[i]) + { + ++num12; + bool flag = false; + for (int index = 0; index < 5; ++index) + { + int num13 = X; + int num14 = Y + (int) vector2_1.Y + num12 * 20 + 10; + int num15 = (num12 - 1) / num4; + int num16 = num13 + num1 * num15; + int num17 = num14 - num4 * 20 * num15; + string str = Lang.GetNPCNameValue(Item.BannerToNPC(i)); + if (num2 == num12) + { + str = Language.GetTextValue("UI.Ellipsis"); + flag = true; + } + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + switch (index) + { + case 0: + num16 -= 2; + break; + case 1: + num16 += 2; + break; + case 2: + num17 -= 2; + break; + case 3: + num17 += 2; + break; + default: + float num18 = (float) Main.mouseTextColor / (float) byte.MaxValue; + color = new Microsoft.Xna.Framework.Color((int) (byte) (80.0 * (double) num18), (int) (byte) ((double) byte.MaxValue * (double) num18), (int) (byte) (120.0 * (double) num18), (int) Main.mouseTextColor); + break; + } + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2((float) num16, (float) num17), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (flag) + break; + } + } + } + + protected void DrawFPS() + { + Main.DrawGamepadInstructions(); + 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 = Main.fontMouseText.MeasureString(str); + if (PlayerInput.UsingGamepad && !Main.gameMenu) + vector2_1.X = (float) (Main.screenWidth - 4) - vector2_3.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, 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(Main.fontMouseText, text, new Vector2(1f)); + float t2 = num2; + Utils.Swap(ref GlyphTagHandler.GlyphsScale, ref t2); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, 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 bool canDrawColorTree(int i, int j, int treeColor) => Main.tile[i, j] != null && Main.tile[i, j].color() > (byte) 0 && (int) Main.tile[i, j].color() < Main.numTileColors && Main.woodAltTexture[treeColor, (int) Main.tile[i, j].color()] != null && !Main.woodAltTexture[treeColor, (int) Main.tile[i, j].color()].IsContentLost; + + public static bool canDrawColorTile(int i, int j) => Main.tile[i, j] != null && Main.tile[i, j].color() > (byte) 0 && (int) Main.tile[i, j].color() < Main.numTileColors && Main.tileAltTextureDrawn[(int) Main.tile[i, j].type, (int) Main.tile[i, j].color()] && Main.tileAltTextureInit[(int) Main.tile[i, j].type, (int) Main.tile[i, j].color()]; + + public static bool canDrawColorTile(ushort type, int color) => color > 0 && color < Main.numTileColors && Main.tileAltTextureDrawn[(int) type, color] && Main.tileAltTextureInit[(int) type, color]; + + public static bool canDrawColorWall(int i, int j) => Main.tile[i, j] != null && Main.tile[i, j].wallColor() > (byte) 0 && Main.wallAltTextureDrawn[(int) Main.tile[i, j].wall, (int) Main.tile[i, j].wallColor()] && Main.wallAltTextureInit[(int) Main.tile[i, j].wall, (int) Main.tile[i, j].wallColor()]; + + protected void DrawTiles(bool solidOnly = true, int waterStyleOverride = -1) + { + if (!solidOnly) + Main.critterCage = false; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num1 = (int) ((double) byte.MaxValue * (1.0 - (double) Main.gfxQuality) + 30.0 * (double) Main.gfxQuality); + int num2 = (int) (50.0 * (1.0 - (double) Main.gfxQuality) + 2.0 * (double) Main.gfxQuality); + Vector2 vector2_1 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2_1 = Vector2.Zero; + int index1 = 0; + int length = Main.specX.Length; + int startX = (int) (((double) Main.screenPosition.X - (double) vector2_1.X) / 16.0 - 1.0); + int endX = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2_1.X) / 16.0) + 2; + int startY = (int) (((double) Main.screenPosition.Y - (double) vector2_1.Y) / 16.0 - 1.0); + int endY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2_1.Y) / 16.0) + 5; + if (startX < 4) + startX = 4; + if (endX > Main.maxTilesX - 4) + endX = Main.maxTilesX - 4; + if (startY < 4) + startY = 4; + if (endY > Main.maxTilesY - 4) + endY = Main.maxTilesY - 4; + if (Main.sectionManager.FrameSectionsLeft > 0) + { + TimeLogger.DetailedDrawReset(); + WorldGen.SectionTileFrameWithCheck(startX, startY, endX, endY); + TimeLogger.DetailedDrawTime(5); + } + Dictionary dictionary1 = new Dictionary(); + Dictionary dictionary2 = new Dictionary(); + Dictionary dictionary3 = new Dictionary(); + int team = Main.player[Main.myPlayer].team; + if (Main.player[Main.myPlayer].active) + { + int netMode = Main.netMode; + } + int width1 = 16; + Microsoft.Xna.Framework.Color[] slices = new Microsoft.Xna.Framework.Color[9]; + for (int index2 = startY; index2 < endY + 4; ++index2) + { + for (int index3 = startX - 2; index3 < endX + 2; ++index3) + { + Tile trackTile = Main.tile[index3, index2]; + if (trackTile == null) + { + trackTile = new Tile(); + Main.tile[index3, index2] = trackTile; + Main.mapTime += 60; + } + ushort type = trackTile.type; + short num3 = trackTile.frameX; + short num4 = trackTile.frameY; + bool flag1 = Main.tileSolid[(int) type]; + if (type == (ushort) 11) + flag1 = true; + if (trackTile.active() && flag1 == solidOnly) + { + if (!Main.tileSetsLoaded[(int) type]) + this.LoadTiles((int) type); + SpriteEffects effects = SpriteEffects.None; + switch (type) + { + case 3: + case 13: + case 20: + case 24: + case 49: + case 50: + case 52: + case 61: + case 62: + case 71: + case 73: + case 74: + case 81: + case 82: + case 83: + case 84: + case 91: + case 92: + case 93: + case 110: + case 113: + case 115: + case 135: + case 141: + case 165: + case 174: + case 201: + case 205: + case 227: + case 270: + case 271: + case 372: + case 382: + if (index3 % 2 == 1) + { + effects = SpriteEffects.FlipHorizontally; + break; + } + break; + case 184: + if (num4 < (short) 108) + { + if (index3 % 2 == 1) + { + effects = SpriteEffects.FlipHorizontally; + break; + } + break; + } + if (index2 % 2 == 1) + { + effects = SpriteEffects.FlipVertically; + break; + } + break; + case 185: + if (num4 == (short) 0 && index3 % 2 == 1) + { + effects = SpriteEffects.FlipHorizontally; + break; + } + break; + } + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor(index3, index2); + int num5 = 0; + int height1 = 16; + if (type >= (ushort) 330 && type <= (ushort) 333) + num5 += 2; + if (type == (ushort) 4 && WorldGen.SolidTile(index3, index2 - 1)) + { + num5 = 2; + if (WorldGen.SolidTile(index3 - 1, index2 + 1) || WorldGen.SolidTile(index3 + 1, index2 + 1)) + num5 = 4; + } + if (type == (ushort) 336) + num5 = 2; + if (type == (ushort) 457) + num5 = 2; + if (type == (ushort) 466) + num5 = 2; + if (type >= (ushort) 275 && type <= (ushort) 282 || type == (ushort) 414 || type == (ushort) 413) + num5 = 2; + if (type == (ushort) 285 || type == (ushort) 286 || type == (ushort) 298 || type == (ushort) 299 || type == (ushort) 309 || type == (ushort) 358 || type == (ushort) 359 || type == (ushort) 360 || type == (ushort) 361 || type == (ushort) 362 || type == (ushort) 363 || type == (ushort) 364 || type == (ushort) 391 || type == (ushort) 392 || type == (ushort) 393 || type == (ushort) 394 || type == (ushort) 310) + num5 = 2; + if (type == (ushort) 100 || type == (ushort) 173 || type == (ushort) 283) + num5 = 2; + if (type == (ushort) 78 || type == (ushort) 85 || type == (ushort) 210 || type == (ushort) 133 || type == (ushort) 134 || type == (ushort) 233) + num5 = 2; + if (type == (ushort) 33 || type == (ushort) 49 || type == (ushort) 174 || type == (ushort) 372) + num5 = -4; + if (type == (ushort) 3 || type == (ushort) 4 || type == (ushort) 5 || type == (ushort) 24 || type == (ushort) 33 || type == (ushort) 49 || type == (ushort) 372 || type == (ushort) 61 || type == (ushort) 71 || type == (ushort) 110 || type == (ushort) 174 || type == (ushort) 201 || type == (ushort) 323 || type == (ushort) 324) + height1 = 20; + else if (type == (ushort) 16 || type == (ushort) 17 || type == (ushort) 18 || type == (ushort) 20 || type == (ushort) 26 || type == (ushort) 32 || type == (ushort) 352 || type == (ushort) 69 || type == (ushort) 72 || type == (ushort) 77 || type == (ushort) 79 || type == (ushort) 80) + height1 = 18; + else if (type == (ushort) 14 || type == (ushort) 469 || type == (ushort) 15 || type == (ushort) 21 || type == (ushort) 467 || type == (ushort) 411 || type == (ushort) 441 || type == (ushort) 468) + { + if (num4 == (short) 18) + height1 = 18; + } + else if (type == (ushort) 172 || type == (ushort) 376) + { + if ((int) num4 % 38 == 18) + height1 = 18; + } + else + { + switch (type) + { + case 27: + if ((int) num4 % 74 == 54) + { + height1 = 18; + break; + } + break; + case 132: + num5 = 2; + height1 = 18; + break; + case 135: + num5 = 2; + height1 = 18; + break; + case 137: + height1 = 18; + break; + case 254: + num5 = 2; + break; + case 378: + num5 = 2; + break; + case 405: + height1 = 16; + if (num4 > (short) 0) + { + height1 = 18; + break; + } + break; + case 406: + height1 = 16; + if ((int) num4 % 54 >= 36) + { + height1 = 18; + break; + } + break; + case 462: + height1 = 18; + break; + default: + height1 = 16; + break; + } + } + if (type == (ushort) 52) + num5 -= 2; + if (type == (ushort) 324) + num5 = -2; + if (type == (ushort) 231 || type == (ushort) 238) + num5 += 2; + if (type == (ushort) 207) + num5 = 2; + width1 = type == (ushort) 4 || type == (ushort) 5 || type == (ushort) 323 || type == (ushort) 324 ? 20 : 16; + if (type == (ushort) 73 || type == (ushort) 74 || type == (ushort) 113) + { + num5 -= 12; + height1 = 32; + } + if (type == (ushort) 388 || type == (ushort) 389) + { + int num6 = TileObjectData.GetTileData((int) type, (int) num3 / 18).Height * 18 + 4; + num5 = -2; + if ((int) num4 == num6 - 20 || (int) num4 == num6 * 2 - 20 || num4 == (short) 0 || (int) num4 == num6) + height1 = 18; + } + if (type == (ushort) 410 && num4 == (short) 36) + height1 = 18; + if (type == (ushort) 227) + { + width1 = 32; + height1 = 38; + if (num3 == (short) 238) + num5 -= 6; + else + num5 -= 20; + } + if (type == (ushort) 185 || type == (ushort) 186 || type == (ushort) 187) + { + num5 = 2; + switch (type) + { + case 185: + Main.tileShine2[185] = num4 == (short) 18 && num3 >= (short) 576 && num3 <= (short) 882; + break; + case 186: + Main.tileShine2[186] = num3 >= (short) 864 && num3 <= (short) 1170; + break; + } + } + if (type == (ushort) 178 && num4 <= (short) 36) + num5 = 2; + if (type == (ushort) 184) + { + width1 = 20; + if (num4 <= (short) 36) + num5 = 2; + else if (num4 <= (short) 108) + num5 = -2; + } + if (type == (ushort) 28) + num5 += 2; + if (type == (ushort) 81) + { + num5 -= 8; + height1 = 26; + width1 = 24; + } + if (type == (ushort) 105) + num5 = 2; + if (type == (ushort) 124) + height1 = 18; + if (type == (ushort) 137) + height1 = 18; + if (type == (ushort) 138) + height1 = 18; + if (type == (ushort) 139 || type == (ushort) 142 || type == (ushort) 143) + num5 = 2; + int num7 = 0; + if (trackTile.halfBrick()) + num7 = 8; + int y1 = Main.tileFrame[(int) type] * 38; + int num8 = 0; + if (type == (ushort) 272) + y1 = 0; + if (type == (ushort) 106) + y1 = Main.tileFrame[(int) type] * 54; + if (type >= (ushort) 300 && type <= (ushort) 308) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 354) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 355) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 377) + { + y1 = Main.tileFrame[(int) type] * 38; + num5 = 2; + } + if (type == (ushort) 463) + { + y1 = Main.tileFrame[(int) type] * 72; + num5 = 2; + } + if (type == (ushort) 464) + { + y1 = Main.tileFrame[(int) type] * 72; + num5 = 2; + } + if (type == (ushort) 379) + y1 = Main.tileFrame[(int) type] * 90; + if (type == (ushort) 349) + { + int num9 = (int) num3 % 36; + int num10 = (int) num4 % 54; + int frameData; + if (Animation.GetTemporaryFrame(index3 - num9 / 18, index2 - num10 / 18, out frameData)) + num3 = (short) (36 * frameData + num9); + } + if (type == (ushort) 441 || type == (ushort) 468) + { + int num11 = (int) num3 % 36; + int num12 = (int) num4 % 38; + int frameData; + if (Animation.GetTemporaryFrame(index3 - num11 / 18, index2 - num12 / 18, out frameData)) + num4 = (short) (38 * frameData + num12); + } + if (type == (ushort) 390) + y1 = Main.tileFrame[(int) type] * 36; + if (type == (ushort) 412) + { + y1 = 0; + num5 = 2; + } + if (type == (ushort) 455) + { + y1 = 0; + num5 = 2; + } + if (type == (ushort) 406) + { + int num13 = Main.tileFrame[(int) type]; + if (num4 >= (short) 108) + num13 = 6 - (int) num4 / 54; + else if (num4 >= (short) 54) + num13 = Main.tileFrame[(int) type] - 1; + y1 = num13 * 56 + (int) num4 / 54 * 2; + } + if (type == (ushort) 452) + { + int num14 = Main.tileFrame[(int) type]; + if (num3 >= (short) 54) + num14 = 0; + y1 = num14 * 54; + } + if (type == (ushort) 455) + { + int num15 = 1 + Main.tileFrame[(int) type]; + if (!BirthdayParty.PartyIsUp) + num15 = 0; + y1 = num15 * 54; + } + if (type == (ushort) 454) + y1 = Main.tileFrame[(int) type] * 54; + if (type == (ushort) 453) + y1 = (Main.tileFrameCounter[(int) type] / 20 + (index2 - (int) trackTile.frameY / 18 + index3)) % 3 * 54; + if (type == (ushort) 456) + y1 = (Main.tileFrameCounter[(int) type] / 20 + (index2 - (int) trackTile.frameY / 18 + (index3 - (int) trackTile.frameX / 18))) % 4 * 54; + if (type == (ushort) 405) + { + int num16 = Main.tileFrame[(int) type]; + if (num3 >= (short) 54) + num16 = 0; + y1 = num16 * 38; + } + if (type == (ushort) 12) + y1 = Main.tileFrame[(int) type] * 36; + if (type == (ushort) 96) + y1 = Main.tileFrame[(int) type] * 36; + if (type == (ushort) 238) + y1 = Main.tileFrame[(int) type] * 36; + if (type == (ushort) 31) + y1 = Main.tileFrame[(int) type] * 36; + if (type == (ushort) 215) + { + y1 = num4 >= (short) 36 ? 252 : Main.tileFrame[(int) type] * 36; + num5 = 2; + } + if (type == (ushort) 231) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 243) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 247) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 228) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 244) + { + num5 = 2; + y1 = num3 >= (short) 54 ? 0 : Main.tileFrame[(int) type] * 36; + } + if (type == (ushort) 235) + y1 = Main.tileFrame[(int) type] * 18; + if (type == (ushort) 217 || type == (ushort) 218) + { + y1 = Main.tileFrame[(int) type] * 36; + num5 = 2; + } + if (type == (ushort) 219 || type == (ushort) 220) + { + y1 = Main.tileFrame[(int) type] * 54; + num5 = 2; + } + if (type == (ushort) 270 || type == (ushort) 271) + { + int num17 = Main.tileFrame[(int) type] + index3 % 6; + if (index3 % 2 == 0) + num17 += 3; + if (index3 % 3 == 0) + num17 += 3; + if (index3 % 4 == 0) + num17 += 3; + while (num17 > 5) + num17 -= 6; + num8 = num17 * 18; + y1 = 0; + } + switch (type) + { + case 428: + num5 += 4; + if (PressurePlateHelper.PressurePlatesPressed.ContainsKey(new Microsoft.Xna.Framework.Point(index3, index2))) + { + num8 += 18; + break; + } + break; + case 442: + width1 = 20; + height1 = 20; + switch ((int) num3 / 22) + { + case 1: + num5 = -4; + break; + case 2: + num5 = -2; + width1 = 24; + break; + case 3: + num5 = -2; + width1 = 16; + break; + } + break; + } + if (TileID.Sets.TeamTiles[(int) type]) + { + if (TileID.Sets.Platforms[(int) type]) + y1 = y1; + else + y1 += 90; + } + if (type == (ushort) 373 || type == (ushort) 374 || type == (ushort) 375 || type == (ushort) 461) + { + int num18 = 60; + switch (type) + { + case 374: + num18 = 120; + break; + case 375: + num18 = 180; + break; + } + if (Main.rand.Next(num18 * 2) == 0 && trackTile.liquid == (byte) 0) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(index3 * 16, index2 * 16, 16, 16); + rectangle1.X -= 34; + rectangle1.Width += 68; + rectangle1.Y -= 100; + rectangle1.Height = 400; + bool flag2 = true; + for (int index4 = 0; index4 < 500; ++index4) + { + if (Main.gore[index4].active && (Main.gore[index4].type >= 706 && Main.gore[index4].type <= 717 || Main.gore[index4].type == 943)) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) Main.gore[index4].position.X, (int) Main.gore[index4].position.Y, 16, 16); + if (rectangle1.Intersects(rectangle2)) + flag2 = false; + } + } + if (flag2) + { + Vector2 Position = new Vector2((float) (index3 * 16), (float) (index2 * 16)); + int Type = 706; + if (Main.waterStyle > 1) + Type = 706 + Main.waterStyle - 1; + if (type == (ushort) 374) + Type = 716; + if (type == (ushort) 375) + Type = 717; + if (type == (ushort) 461) + Type = 943; + if (Type != 943 || Main.rand.Next(3) == 0) + { + int index5 = Gore.NewGore(Position, new Vector2(), Type); + Main.gore[index5].velocity *= 0.0f; + } + } + } + } + else + { + if (type >= (ushort) 275 && type <= (ushort) 281 || type == (ushort) 296 || type == (ushort) 297 || type == (ushort) 309 || type == (ushort) 358 || type == (ushort) 359 || type == (ushort) 414 || type == (ushort) 413) + { + Main.critterCage = true; + int index6 = (index3 - (int) num3 / 18) / 6 * ((index2 - (int) num4 / 18) / 4) % Main.cageFrames; + if (type == (ushort) 275 || type == (ushort) 359) + y1 = Main.bunnyCageFrame[index6] * 54; + if (type == (ushort) 276 || type == (ushort) 414) + y1 = Main.squirrelCageFrame[index6] * 54; + if (type == (ushort) 413) + y1 = Main.squirrelCageFrameOrange[index6] * 54; + if (type == (ushort) 277) + y1 = Main.mallardCageFrame[index6] * 54; + if (type == (ushort) 278) + y1 = Main.duckCageFrame[index6] * 54; + if (type == (ushort) 279 || type == (ushort) 358) + y1 = Main.birdCageFrame[index6] * 54; + if (type == (ushort) 280) + y1 = Main.blueBirdCageFrame[index6] * 54; + if (type == (ushort) 281) + y1 = Main.redBirdCageFrame[index6] * 54; + if (type == (ushort) 296) + y1 = Main.scorpionCageFrame[0, index6] * 54; + if (type == (ushort) 297) + y1 = Main.scorpionCageFrame[0, index6] * 54; + if (type == (ushort) 309) + y1 = Main.penguinCageFrame[index6] * 54; + } + else if (type == (ushort) 285 || type == (ushort) 286 || type == (ushort) 298 || type == (ushort) 299 || type == (ushort) 310 || type == (ushort) 339 || type >= (ushort) 361 && type <= (ushort) 364 || type >= (ushort) 391 && type <= (ushort) 394) + { + Main.critterCage = true; + int index7 = (index3 - (int) num3 / 18) / 3 * ((index2 - (int) num4 / 18) / 3) % Main.cageFrames; + if (type == (ushort) 285) + y1 = Main.snailCageFrame[index7] * 36; + if (type == (ushort) 286) + y1 = Main.snail2CageFrame[index7] * 36; + if (type == (ushort) 298 || type == (ushort) 361) + y1 = Main.frogCageFrame[index7] * 36; + if (type == (ushort) 299 || type == (ushort) 363) + y1 = Main.mouseCageFrame[index7] * 36; + if (type == (ushort) 310 || type == (ushort) 364 || type == (ushort) 391) + y1 = Main.wormCageFrame[index7] * 36; + if (type == (ushort) 339 || type == (ushort) 362) + y1 = Main.grasshopperCageFrame[index7] * 36; + if (type == (ushort) 392 || type == (ushort) 393 || type == (ushort) 394) + y1 = Main.slugCageFrame[(int) type - 392, index7] * 36; + } + else if (type == (ushort) 282 || type >= (ushort) 288 && type <= (ushort) 295 || type >= (ushort) 316 && type <= (ushort) 318 || type == (ushort) 360) + { + Main.critterCage = true; + int index8 = (index3 - (int) num3 / 18) / 2 * ((index2 - (int) num4 / 18) / 3) % Main.cageFrames; + if (type == (ushort) 282) + y1 = Main.fishBowlFrame[index8] * 36; + else if (type >= (ushort) 288 && type <= (ushort) 295 || type == (ushort) 360) + { + int index9 = (int) type - 288; + if (type == (ushort) 360) + index9 = 8; + y1 = Main.butterflyCageFrame[index9, index8] * 36; + } + else if (type >= (ushort) 316 && type <= (ushort) 318) + { + int index10 = (int) type - 316; + y1 = Main.jellyfishCageFrame[index10, index8] * 36; + } + } + else + { + switch (type) + { + case 207: + if (num4 >= (short) 72) + { + int num19 = Main.tileFrame[(int) type]; + int num20 = index3; + if ((int) num3 % 36 != 0) + --num20; + int num21 = num19 + num20 % 6; + if (num21 >= 6) + num21 -= 6; + y1 = num21 * 72; + break; + } + y1 = 0; + break; + case 410: + y1 = num4 < (short) 56 ? 0 : Main.tileFrame[(int) type] * 56; + break; + default: + if (type == (ushort) 326 || type == (ushort) 327 || type == (ushort) 328 || type == (ushort) 329 || type == (ushort) 336 || type == (ushort) 340 || type == (ushort) 341 || type == (ushort) 342 || type == (ushort) 343 || type == (ushort) 344 || type == (ushort) 345 || type == (ushort) 351 || type == (ushort) 421 || type == (ushort) 422 || type == (ushort) 458 || type == (ushort) 459) + { + y1 = Main.tileFrame[(int) type] * 90; + break; + } + break; + } + } + Texture2D texture1 = (Texture2D) null; + Microsoft.Xna.Framework.Rectangle rectangle3 = Microsoft.Xna.Framework.Rectangle.Empty; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Transparent; + byte num22 = (byte) (100.0 + 150.0 * (double) Main.martianLight); + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color((int) num22, (int) num22, (int) num22, 0); + Microsoft.Xna.Framework.Color color4 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + Microsoft.Xna.Framework.Color color5 = new Microsoft.Xna.Framework.Color(150, 100, 50, 0); + if (type <= (ushort) 93) + { + if (type <= (ushort) 34) + { + switch ((int) type - 10) + { + case 0: + if ((int) num4 / 54 == 32) + { + texture1 = Main.glowMaskTexture[57]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 54, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + case 1: + int num23 = (int) num4 / 54; + if (num23 == 32) + { + texture1 = Main.glowMaskTexture[58]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 54, width1, height1); + color2 = color3; + } + if (num23 == 33) + { + texture1 = Main.glowMaskTexture[119]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 54, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 2: + case 3: + case 6: + case 7: + case 10: + goto label_397; + case 4: + int num24 = (int) num3 / 54; + if (num24 == 31) + { + texture1 = Main.glowMaskTexture[67]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color3; + } + if (num24 == 32) + { + texture1 = Main.glowMaskTexture[124]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 5: + int num25 = (int) num4 / 40; + if (num25 == 32) + { + texture1 = Main.glowMaskTexture[54]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 40, width1, height1); + color2 = color3; + } + if (num25 == 33) + { + texture1 = Main.glowMaskTexture[116]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 40, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 8: + int num26 = (int) num3 / 36; + if (num26 == 27) + { + texture1 = Main.glowMaskTexture[69]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color3; + } + if (num26 == 28) + { + texture1 = Main.glowMaskTexture[125]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 9: + int num27 = (int) num4 / 18; + if (num27 == 26) + { + texture1 = Main.glowMaskTexture[65]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 18, width1, height1); + color2 = color3; + } + if (num27 == 27) + { + texture1 = Main.glowMaskTexture[112]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 18, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 11: + break; + default: + if (type != (ushort) 33) + { + if (type == (ushort) 34 && (int) num3 / 54 == 0 && (int) num4 / 54 == 33) + { + texture1 = Main.glowMaskTexture[55]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 54, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + } + else if ((int) num3 / 18 == 0 && (int) num4 / 22 == 26) + { + texture1 = Main.glowMaskTexture[61]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 22, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + } + } + else if (type != (ushort) 42) + { + if (type != (ushort) 79) + { + switch ((int) type - 87) + { + case 0: + int num28 = (int) num3 / 54; + if (num28 == 26) + { + texture1 = Main.glowMaskTexture[64]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color3; + } + if (num28 == 27) + { + texture1 = Main.glowMaskTexture[121]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 1: + int num29 = (int) num3 / 54; + if (num29 == 24) + { + texture1 = Main.glowMaskTexture[59]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color3; + } + if (num29 == 25) + { + texture1 = Main.glowMaskTexture[120]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 2: + int num30 = (int) num3 / 54; + if (num30 == 29) + { + texture1 = Main.glowMaskTexture[66]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color3; + } + if (num30 == 30) + { + texture1 = Main.glowMaskTexture[123]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 3: + int num31 = (int) num4 / 36; + if (num31 == 27) + { + texture1 = Main.glowMaskTexture[52]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color3; + } + if (num31 == 28) + { + texture1 = Main.glowMaskTexture[113]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 6: + if ((int) num3 / 54 == 27) + { + texture1 = Main.glowMaskTexture[62]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 54, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + default: + goto label_397; + } + } + else + { + int num32 = (int) num4 / 36; + if (num32 == 27) + { + texture1 = Main.glowMaskTexture[53]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color3; + } + if (num32 == 28) + { + texture1 = Main.glowMaskTexture[114]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + } + } + else if ((int) num4 / 36 == 33) + { + texture1 = Main.glowMaskTexture[63]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + } + else if (type <= (ushort) 184) + { + switch ((int) type - 100) + { + case 0: + if ((int) num3 / 36 == 0 && (int) num4 / 36 == 27) + { + texture1 = Main.glowMaskTexture[68]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 36, width1, height1); + color2 = color3; + goto label_397; + } + else + goto label_397; + case 1: + int num33 = (int) num3 / 54; + if (num33 == 28) + { + texture1 = Main.glowMaskTexture[60]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color3; + } + if (num33 == 29) + { + texture1 = Main.glowMaskTexture[115]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 54, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + case 2: + case 3: + goto label_397; + case 4: + int num34 = (int) num3 / 36; + if (num34 == 24) + { + texture1 = Main.glowMaskTexture[51]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color3; + } + if (num34 == 25) + { + texture1 = Main.glowMaskTexture[118]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + default: + if (type != (ushort) 172) + { + if (type == (ushort) 184 && trackTile.frameX == (short) 110) + { + texture1 = Main.glowMaskTexture[(int) sbyte.MaxValue]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1); + color2 = color5; + goto label_397; + } + else + goto label_397; + } + else + { + int num35 = (int) num4 / 38; + if (num35 == 28) + { + texture1 = Main.glowMaskTexture[88]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 38, width1, height1); + color2 = color3; + } + if (num35 == 29) + { + texture1 = Main.glowMaskTexture[122]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 % 38, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + } + } + } + else + { + if (type <= (ushort) 463) + { + if (type != (ushort) 441) + { + if (type == (ushort) 463) + { + texture1 = Main.glowMaskTexture[243]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + y1, width1, height1); + color2 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0); + goto label_397; + } + else + goto label_397; + } + } + else if (type != (ushort) 467) + { + if (type != (ushort) 468) + goto label_397; + } + else + goto label_351; + int num36 = (int) num3 / 36; + if (num36 == 48) + { + texture1 = Main.glowMaskTexture[56]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color3; + } + if (num36 == 49) + { + texture1 = Main.glowMaskTexture[117]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color4; + goto label_397; + } + else + goto label_397; + } +label_351: + int num37 = (int) num3 / 36; + if (num37 == 48) + { + texture1 = Main.glowMaskTexture[56]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color3; + } + if (num37 == 49) + { + texture1 = Main.glowMaskTexture[117]; + rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) num3 % 36, (int) num4, width1, height1); + color2 = color4; + } +label_397: + Texture2D texture2 = (Texture2D) null; + Microsoft.Xna.Framework.Rectangle rectangle4 = Microsoft.Xna.Framework.Rectangle.Empty; + Microsoft.Xna.Framework.Color color6 = Microsoft.Xna.Framework.Color.Transparent; + if (TileID.Sets.HasOutlines[(int) type] && Collision.InTileBounds(index3, index2, Main.TileInteractionLX, Main.TileInteractionLY, Main.TileInteractionHX, Main.TileInteractionHY) && Main.SmartInteractTileCoords.Contains(new Microsoft.Xna.Framework.Point(index3, index2))) + { + int num38 = ((int) color1.R + (int) color1.G + (int) color1.B) / 3; + bool flag3 = false; + if (Main.SmartInteractTileCoordsSelected.Contains(new Microsoft.Xna.Framework.Point(index3, index2))) + flag3 = true; + if (num38 > 10) + { + texture2 = Main.highlightMaskTexture[(int) type]; + color6 = !flag3 ? new Microsoft.Xna.Framework.Color(num38 / 2, num38 / 2, num38 / 2, num38) : new Microsoft.Xna.Framework.Color(num38, num38, num38 / 3, num38); + } + } + if (Main.player[Main.myPlayer].dangerSense) + { + bool flag4 = type == (ushort) 135 || type == (ushort) 137 || type == (ushort) 138 || type == (ushort) 141 || type == (ushort) 210 || type == (ushort) 442 || type == (ushort) 443 || type == (ushort) 444; + if (trackTile.slope() == (byte) 0 && !trackTile.inActive()) + { + flag4 = flag4 || type == (ushort) 32 || type == (ushort) 69 || type == (ushort) 48 || type == (ushort) 232 || type == (ushort) 352 || type == (ushort) 51 || type == (ushort) 229; + if (!Main.player[Main.myPlayer].fireWalk) + flag4 = flag4 || type == (ushort) 37 || type == (ushort) 58 || type == (ushort) 76; + if (!Main.player[Main.myPlayer].iceSkate) + flag4 = flag4 || type == (ushort) 162; + } + if (flag4) + { + if (color1.R < byte.MaxValue) + color1.R = byte.MaxValue; + if (color1.G < (byte) 50) + color1.G = (byte) 50; + if (color1.B < (byte) 50) + color1.B = (byte) 50; + color1.A = Main.mouseTextColor; + if (!Main.gamePaused && this.IsActive && Main.rand.Next(30) == 0) + { + int index11 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 60, Alpha: 100, Scale: 0.3f); + Main.dust[index11].fadeIn = 1f; + Main.dust[index11].velocity *= 0.1f; + Main.dust[index11].noLight = true; + Main.dust[index11].noGravity = true; + } + } + } + if (Main.player[Main.myPlayer].findTreasure) + { + bool flag5 = false; + if (type == (ushort) 185 && num4 == (short) 18 && num3 >= (short) 576 && num3 <= (short) 882) + flag5 = true; + if (type == (ushort) 186 && num3 >= (short) 864 && num3 <= (short) 1170) + flag5 = true; + if (flag5 || Main.tileSpelunker[(int) type] || Main.tileAlch[(int) type] && type != (ushort) 82) + { + byte num39 = 200; + byte num40 = 170; + if ((int) color1.R < (int) num39) + color1.R = num39; + if ((int) color1.G < (int) num40) + color1.G = num40; + color1.A = Main.mouseTextColor; + if (!Main.gamePaused && this.IsActive && Main.rand.Next(60) == 0) + { + int index12 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index12].fadeIn = 1f; + Main.dust[index12].velocity *= 0.1f; + Main.dust[index12].noLight = true; + } + } + } + if (!Main.gamePaused && this.IsActive && (!Lighting.UpdateEveryFrame || Main.rand.Next(4) == 0)) + { + switch (type) + { + case 238: + if (Main.rand.Next(10) == 0) + { + int index13 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 168); + Main.dust[index13].noGravity = true; + Main.dust[index13].alpha = 200; + break; + } + break; + case 463: + if (num4 == (short) 54 && num3 == (short) 0) + { + for (int index14 = 0; index14 < 4; ++index14) + { + if (Main.rand.Next(2) != 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16)), 36, 8, 16); + dust.noGravity = true; + dust.alpha = 140; + dust.fadeIn = 1.2f; + dust.velocity = Vector2.Zero; + } + } + } + if (num4 == (short) 18 && (num3 == (short) 0 || num3 == (short) 36)) + { + for (int index15 = 0; index15 < 1; ++index15) + { + if (Main.rand.Next(13) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 8, 8, 274); + dust.position = new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)); + dust.position.X += num3 == (short) 36 ? 4f : -4f; + dust.noGravity = true; + dust.alpha = 128; + dust.fadeIn = 1.2f; + dust.noLight = true; + dust.velocity = new Vector2(0.0f, Main.rand.NextFloatDirection() * 1.2f); + } + } + break; + } + break; + } + if (type == (ushort) 139 && trackTile.frameX == (short) 36 && (int) trackTile.frameY % 36 == 0 && (int) Main.time % 7 == 0 && Main.rand.Next(3) == 0) + { + int Type = Main.rand.Next(570, 573); + Vector2 Position = new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 - 8)); + Vector2 Velocity = new Vector2(Main.windSpeed * 2f, -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); + } + if (type == (ushort) 244 && num3 == (short) 18 && num4 == (short) 18 && Main.rand.Next(2) == 0) + { + if (Main.rand.Next(500) == 0) + Gore.NewGore(new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)), new Vector2(), 415, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(250) == 0) + Gore.NewGore(new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)), new Vector2(), 414, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(80) == 0) + Gore.NewGore(new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)), new Vector2(), 413, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(10) == 0) + Gore.NewGore(new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)), new Vector2(), 412, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(3) == 0) + Gore.NewGore(new Vector2((float) (index3 * 16 + 8), (float) (index2 * 16 + 8)), new Vector2(), 411, (float) Main.rand.Next(51, 101) * 0.01f); + } + if (type == (ushort) 165 && num3 >= (short) 162 && num3 <= (short) 214 && num4 == (short) 72 && Main.rand.Next(60) == 0) + { + int index16 = Dust.NewDust(new Vector2((float) (index3 * 16 + 2), (float) (index2 * 16 + 6)), 8, 4, 153); + Main.dust[index16].scale -= (float) Main.rand.Next(3) * 0.1f; + Main.dust[index16].velocity.Y = 0.0f; + Main.dust[index16].velocity.X *= 0.05f; + Main.dust[index16].alpha = 100; + } + if (type == (ushort) 42 && num3 == (short) 0) + { + int num41 = (int) num4 / 36; + int num42 = (int) num4 / 18 % 2; + if (num41 == 7 && num42 == 1) + { + if (Main.rand.Next(50) == 0) + { + int index17 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16 + 4)), 8, 8, 58, Alpha: 150); + Main.dust[index17].velocity *= 0.5f; + } + if (Main.rand.Next(100) == 0) + { + int index18 = Gore.NewGore(new Vector2((float) (index3 * 16 - 2), (float) (index2 * 16 - 4)), new Vector2(), Main.rand.Next(16, 18)); + Main.gore[index18].scale *= 0.7f; + Main.gore[index18].velocity *= 0.25f; + } + } + else if (num41 == 29 && num42 == 1 && Main.rand.Next(40) == 0) + { + int index19 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16)), 8, 8, 59, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index19].noGravity = true; + Main.dust[index19].velocity *= 0.3f; + Main.dust[index19].velocity.Y -= 1.5f; + } + } + if (type == (ushort) 215 && num4 < (short) 36 && Main.rand.Next(3) == 0 && (Main.drawToScreen && Main.rand.Next(4) == 0 || !Main.drawToScreen) && num4 == (short) 0) + { + int index20 = Dust.NewDust(new Vector2((float) (index3 * 16 + 2), (float) (index2 * 16 - 4)), 4, 8, 31, Alpha: 100); + if (num3 == (short) 0) + Main.dust[index20].position.X += (float) Main.rand.Next(8); + if (num3 == (short) 36) + Main.dust[index20].position.X -= (float) Main.rand.Next(8); + Main.dust[index20].alpha += Main.rand.Next(100); + Main.dust[index20].velocity *= 0.2f; + Main.dust[index20].velocity.Y -= (float) (0.5 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index20].fadeIn = (float) (0.5 + (double) Main.rand.Next(10) * 0.100000001490116); + } + if (type == (ushort) 4 && Main.rand.Next(40) == 0 && num3 < (short) 66) + { + int num43 = (int) num4 / 22; + int Type; + switch (num43) + { + 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; + default: + Type = 58 + num43; + break; + } + int index21; + switch (num3) + { + case 22: + index21 = Dust.NewDust(new Vector2((float) (index3 * 16 + 6), (float) (index2 * 16)), 4, 4, Type, Alpha: 100); + break; + case 44: + index21 = Dust.NewDust(new Vector2((float) (index3 * 16 + 2), (float) (index2 * 16)), 4, 4, Type, Alpha: 100); + break; + default: + index21 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16)), 4, 4, Type, Alpha: 100); + break; + } + if (Main.rand.Next(3) != 0) + Main.dust[index21].noGravity = true; + Main.dust[index21].velocity *= 0.3f; + Main.dust[index21].velocity.Y -= 1.5f; + if (Type == 66) + { + Main.dust[index21].color = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + Main.dust[index21].noGravity = true; + } + } + if (type == (ushort) 93 && Main.rand.Next(40) == 0 && num3 == (short) 0) + { + int num44 = (int) num4 / 54; + if ((int) num4 / 18 % 3 == 0) + { + int Type; + switch (num44) + { + 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 index22 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16 + 2)), 4, 4, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index22].noGravity = true; + Main.dust[index22].velocity *= 0.3f; + Main.dust[index22].velocity.Y -= 1.5f; + } + } + } + if (type == (ushort) 100 && Main.rand.Next(40) == 0 && num3 < (short) 36) + { + int num45 = (int) num4 / 36; + if ((int) num4 / 18 % 2 == 0) + { + int Type; + switch (num45) + { + case 0: + case 2: + 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 index23 = Dust.NewDust(num3 != (short) 0 ? (Main.rand.Next(3) != 0 ? new Vector2((float) (index3 * 16), (float) (index2 * 16 + 2)) : new Vector2((float) (index3 * 16 + 6), (float) (index2 * 16 + 2))) : (Main.rand.Next(3) != 0 ? new Vector2((float) (index3 * 16 + 14), (float) (index2 * 16 + 2)) : new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16 + 2))), 4, 4, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index23].noGravity = true; + Main.dust[index23].velocity *= 0.3f; + Main.dust[index23].velocity.Y -= 1.5f; + } + } + } + if (type == (ushort) 98 && Main.rand.Next(40) == 0 && num4 == (short) 0 && num3 == (short) 0) + { + int index24 = Dust.NewDust(new Vector2((float) (index3 * 16 + 12), (float) (index2 * 16 + 2)), 4, 4, 6, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index24].noGravity = true; + Main.dust[index24].velocity *= 0.3f; + Main.dust[index24].velocity.Y -= 1.5f; + } + if (type == (ushort) 49 && Main.rand.Next(2) == 0) + { + int index25 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16 - 4)), 4, 4, 172, Alpha: 100); + if (Main.rand.Next(3) == 0) + { + Main.dust[index25].scale = 0.5f; + } + else + { + Main.dust[index25].scale = 0.9f; + Main.dust[index25].noGravity = true; + } + Main.dust[index25].velocity *= 0.3f; + Main.dust[index25].velocity.Y -= 1.5f; + } + if (type == (ushort) 372 && Main.rand.Next(2) == 0) + { + int index26 = Dust.NewDust(new Vector2((float) (index3 * 16 + 4), (float) (index2 * 16 - 4)), 4, 4, 242, Alpha: 100); + if (Main.rand.Next(3) == 0) + { + Main.dust[index26].scale = 0.5f; + } + else + { + Main.dust[index26].scale = 0.9f; + Main.dust[index26].noGravity = true; + } + Main.dust[index26].velocity *= 0.3f; + Main.dust[index26].velocity.Y -= 1.5f; + } + if (type == (ushort) 34 && Main.rand.Next(40) == 0 && num3 < (short) 54) + { + int num46 = (int) num4 / 54; + int num47 = (int) num3 / 18 % 3; + if ((int) num4 / 18 % 3 == 1 && num47 != 1) + { + int Type; + switch (num46) + { + 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 index27 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16 + 2)), 14, 6, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index27].noGravity = true; + Main.dust[index27].velocity *= 0.3f; + Main.dust[index27].velocity.Y -= 1.5f; + } + } + } + if (type == (ushort) 22 && Main.rand.Next(400) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14); + else if ((type == (ushort) 23 || type == (ushort) 24 || type == (ushort) 32) && Main.rand.Next(500) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14); + else if (type == (ushort) 25 && Main.rand.Next(700) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14); + else if (type == (ushort) 112 && Main.rand.Next(700) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14); + else if (type == (ushort) 31 && Main.rand.Next(20) == 0) + { + if (num3 >= (short) 36) + { + int index28 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 5, Alpha: 100); + Main.dust[index28].velocity.Y = 0.0f; + Main.dust[index28].velocity.X *= 0.3f; + } + else + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14, Alpha: 100); + } + else if (type == (ushort) 26 && Main.rand.Next(20) == 0) + { + if (num3 >= (short) 54) + { + int index29 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 5, Alpha: 100); + Main.dust[index29].scale = 1.5f; + Main.dust[index29].noGravity = true; + Main.dust[index29].velocity *= 0.75f; + } + else + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14, Alpha: 100); + } + else if ((type == (ushort) 71 || type == (ushort) 72) && Main.rand.Next(500) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 41, Alpha: 250, Scale: 0.8f); + else if ((type == (ushort) 17 || type == (ushort) 77 || type == (ushort) 133) && Main.rand.Next(40) == 0) + { + if (num3 == (short) 18 & num4 == (short) 18) + { + int index30 = Dust.NewDust(new Vector2((float) (index3 * 16 - 4), (float) (index2 * 16 - 6)), 8, 6, 6, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index30].noGravity = true; + } + } + else if (type == (ushort) 405 && Main.rand.Next(20) == 0) + { + if (num3 == (short) 18 & num4 == (short) 18) + { + int index31 = Dust.NewDust(new Vector2((float) (index3 * 16 - 4), (float) (index2 * 16 - 6)), 24, 10, 6, Alpha: 100); + if (Main.rand.Next(5) != 0) + Main.dust[index31].noGravity = true; + } + } + else if (type == (ushort) 452 && num4 == (short) 0 && num3 == (short) 0 && Main.rand.Next(3) == 0) + { + Vector2 Position = new Vector2((float) (index3 * 16 + 16), (float) (index2 * 16 + 8)); + Vector2 Velocity = new Vector2(0.0f, 0.0f); + if ((double) Main.windSpeed < 0.0) + Velocity.X = -Main.windSpeed; + int Type = 907 + Main.tileFrame[(int) type] / 5; + if (Main.rand.Next(2) == 0) + Gore.NewGore(Position, Velocity, Type, (float) ((double) Main.rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + } + else if (type == (ushort) 406 && num4 == (short) 54 && num3 == (short) 0 && Main.rand.Next(3) == 0) + { + Vector2 Position = new Vector2((float) (index3 * 16 + 16), (float) (index2 * 16 + 8)); + Vector2 Velocity = new Vector2(0.0f, 0.0f); + if ((double) Main.windSpeed < 0.0) + Velocity.X = -Main.windSpeed; + int Type = Main.rand.Next(825, 828); + if (Main.rand.Next(4) == 0) + Gore.NewGore(Position, Velocity, Type, (float) ((double) Main.rand.NextFloat() * 0.200000002980232 + 0.200000002980232)); + else if (Main.rand.Next(2) == 0) + Gore.NewGore(Position, Velocity, Type, (float) ((double) Main.rand.NextFloat() * 0.300000011920929 + 0.300000011920929)); + else + Gore.NewGore(Position, Velocity, Type, (float) ((double) Main.rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + } + else if (type == (ushort) 37 && Main.rand.Next(250) == 0) + { + int index32 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 6, Scale: ((float) Main.rand.Next(3))); + if ((double) Main.dust[index32].scale > 1.0) + Main.dust[index32].noGravity = true; + } + else if ((type == (ushort) 58 || type == (ushort) 76) && Main.rand.Next(250) == 0) + { + int index33 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 6, Scale: ((float) Main.rand.Next(3))); + if ((double) Main.dust[index33].scale > 1.0) + Main.dust[index33].noGravity = true; + Main.dust[index33].noLight = true; + } + else if (type == (ushort) 61) + { + if (num3 == (short) 144) + { + if (Main.rand.Next(60) == 0) + { + int index34 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 44, Alpha: 250, Scale: 0.4f); + Main.dust[index34].fadeIn = 0.7f; + } + color1.A = (byte) (245.0 - (double) Main.mouseTextColor * 1.5); + color1.R = (byte) (245.0 - (double) Main.mouseTextColor * 1.5); + color1.B = (byte) (245.0 - (double) Main.mouseTextColor * 1.5); + color1.G = (byte) (245.0 - (double) Main.mouseTextColor * 1.5); + } + } + else if (Main.tileShine[(int) type] > 0) + { + Main.tileShine[211] = 500; + if (color1.R > (byte) 20 || color1.B > (byte) 20 || color1.G > (byte) 20) + { + int num48 = (int) color1.R; + if ((int) color1.G > num48) + num48 = (int) color1.G; + if ((int) color1.B > num48) + num48 = (int) color1.B; + int num49 = num48 / 30; + if (Main.rand.Next(Main.tileShine[(int) type]) < num49 && (type != (ushort) 21 || num3 >= (short) 36 && num3 < (short) 180 || num3 >= (short) 396 && num3 <= (short) 409) && type != (ushort) 467) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.White; + if (type == (ushort) 178) + { + switch ((int) num3 / 18) + { + case 0: + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 1: + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + case 2: + newColor = new Microsoft.Xna.Framework.Color(0, 0, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 3: + newColor = new Microsoft.Xna.Framework.Color(0, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + case 4: + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + break; + case 5: + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 6: + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + } + int index35 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f); + Main.dust[index35].velocity *= 0.0f; + } + else + { + if (type == (ushort) 63) + newColor = new Microsoft.Xna.Framework.Color(0, 0, (int) byte.MaxValue, (int) byte.MaxValue); + if (type == (ushort) 64) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (type == (ushort) 65) + newColor = new Microsoft.Xna.Framework.Color(0, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (type == (ushort) 66) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (type == (ushort) 67) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, (int) byte.MaxValue, (int) byte.MaxValue); + if (type == (ushort) 68) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (type == (ushort) 12) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (type == (ushort) 204) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (type == (ushort) 211) + newColor = new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 100, (int) byte.MaxValue); + int index36 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f); + Main.dust[index36].velocity *= 0.0f; + } + } + } + } + } + if (TileID.Sets.BasicChest[(int) type]) + { + Microsoft.Xna.Framework.Point key = new Microsoft.Xna.Framework.Point(index3, index2); + if ((int) num3 % 36 != 0) + --key.X; + if ((int) num4 % 36 != 0) + --key.Y; + if (!dictionary1.ContainsKey(key)) + dictionary1[key] = Chest.FindChest(key.X, key.Y); + int num50 = (int) num3 / 18; + int num51 = (int) num4 / 18; + int num52 = (int) num3 / 36; + num8 = num50 * 18 - (int) num3; + int num53 = num51 * 18; + if (dictionary1[key] != -1) + { + int frame = Main.chest[dictionary1[key]].frame; + if (frame == 1) + num53 += 38; + if (frame == 2) + num53 += 76; + } + y1 = num53 - (int) num4; + if (num51 != 0) + height1 = 18; + if (type == (ushort) 21 && (num52 == 48 || num52 == 49)) + rectangle3 = new Microsoft.Xna.Framework.Rectangle(16 * (num50 % 2), (int) num4 + y1, width1, height1); + } + if (type == (ushort) 378) + { + Microsoft.Xna.Framework.Point key = new Microsoft.Xna.Framework.Point(index3, index2); + if ((int) num3 % 36 != 0) + --key.X; + if ((int) num4 % 54 != 0) + key.Y -= (int) num4 / 18; + if (!dictionary2.ContainsKey(key)) + dictionary2[key] = TETrainingDummy.Find(key.X, key.Y); + if (dictionary2[key] != -1) + { + int npc = ((TETrainingDummy) TileEntity.ByID[dictionary2[key]]).npc; + if (npc != -1) + y1 = Main.npc[npc].frame.Y / 55 * 54 + (int) num4 - (int) num4; + } + } + if (type == (ushort) 395) + { + Microsoft.Xna.Framework.Point key = new Microsoft.Xna.Framework.Point(index3, index2); + if ((int) num3 % 36 != 0) + --key.X; + if ((int) num4 % 36 != 0) + --key.Y; + if (!dictionary3.ContainsKey(key)) + { + dictionary3[key] = TEItemFrame.Find(key.X, key.Y); + if (dictionary3[key] != -1) + { + Main.specX[index1] = key.X; + Main.specY[index1] = key.Y; + ++index1; + } + } + } + if ((type == (ushort) 269 || type == (ushort) 128) && (int) num4 / 18 == 2) + { + if (num3 >= (short) 100) + { + bool flag6 = false; + int frameX = (int) Main.tile[index3, index2 - 1].frameX; + if (frameX >= 100) + { + int num54 = 0; + for (; frameX >= 100; frameX -= 100) + ++num54; + switch (num54) + { + case 15: + case 36: + case 41: + case 42: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + flag6 = true; + break; + } + } + if (!flag6) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + } + if (Main.tile[index3, index2 - 1].frameX >= (short) 100) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2 - 1; + ++index1; + } + if (Main.tile[index3, index2 - 2].frameX >= (short) 100) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2 - 2; + ++index1; + } + } + if (type == (ushort) 5 && num4 >= (short) 198 && num3 >= (short) 22) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 323 && num3 <= (short) 132 && num3 >= (short) 88) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 412 && num3 == (short) 0 && num4 == (short) 0) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 237 && num3 == (short) 18 && num4 == (short) 0) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 334 && (int) num4 / 18 == 1 && num3 >= (short) 5000) + { + int frameX = (int) Main.tile[index3, index2].frameX; + int num55 = 0; + for (; frameX >= 5000; frameX -= 5000) + ++num55; + if (num55 == 1 || num55 == 4) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + } + if (type == (ushort) 5 && num4 >= (short) 198 && num3 >= (short) 22) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 323 && num3 <= (short) 132 && num3 >= (short) 88) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 412 && num3 == (short) 0 && num4 == (short) 0) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 237 && num3 == (short) 18 && num4 == (short) 0) + { + Main.specX[index1] = index3; + Main.specY[index1] = index2; + ++index1; + } + if (type == (ushort) 72 && num3 >= (short) 36) + { + int num56 = 0; + switch (num4) + { + case 18: + num56 = 1; + break; + case 36: + num56 = 2; + break; + } + Main.spriteBatch.Draw(Main.shroomCapTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X - 22), (float) (index2 * 16 - (int) Main.screenPosition.Y - 26)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num56 * 62, 0, 60, 42)), Lighting.GetColor(index3, index2), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (color1.R >= (byte) 1 || color1.G >= (byte) 1 || color1.B >= (byte) 1) + { + Tile tile1 = Main.tile[index3 + 1, index2]; + Tile tile2 = Main.tile[index3 - 1, index2]; + Tile tile3 = Main.tile[index3, index2 - 1]; + Tile tile4 = Main.tile[index3, index2 + 1]; + if (tile1 == null) + { + tile1 = new Tile(); + Main.tile[index3 + 1, index2] = tile1; + } + if (tile2 == null) + { + tile2 = new Tile(); + Main.tile[index3 - 1, index2] = tile2; + } + if (tile3 == null) + { + tile3 = new Tile(); + Main.tile[index3, index2 - 1] = tile3; + } + if (tile4 == null) + { + tile4 = new Tile(); + Main.tile[index3, index2 + 1] = tile4; + } + if (solidOnly & flag1 && !trackTile.inActive() && !Main.tileSolidTop[(int) type]) + { + bool flag7 = false; + if (trackTile.halfBrick()) + { + int num57 = 160; + if (((int) tile2.liquid > num57 || (int) tile1.liquid > num57) && this.waterfallManager.CheckForWaterfall(index3, index2)) + flag7 = true; + } + if (!flag7) + { + int num58 = 0; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + int index37 = 0; + bool flag12 = false; + int num59 = (int) trackTile.slope(); + if (tile2.liquid > (byte) 0 && num59 != 1 && num59 != 3) + { + flag8 = true; + switch (tile2.liquidType()) + { + case 0: + flag12 = true; + break; + case 1: + index37 = 1; + break; + case 2: + index37 = 11; + break; + } + if ((int) tile2.liquid > num58) + num58 = (int) tile2.liquid; + } + if (tile1.liquid > (byte) 0 && num59 != 2 && num59 != 4) + { + flag9 = true; + switch (tile1.liquidType()) + { + case 0: + flag12 = true; + break; + case 1: + index37 = 1; + break; + case 2: + index37 = 11; + break; + } + if ((int) tile1.liquid > num58) + num58 = (int) tile1.liquid; + } + if (tile3.liquid > (byte) 0 && num59 != 3 && num59 != 4) + { + flag10 = true; + switch (tile3.liquidType()) + { + case 0: + flag12 = true; + break; + case 1: + index37 = 1; + break; + case 2: + index37 = 11; + break; + } + } + if (tile4.liquid > (byte) 0 && num59 != 1 && num59 != 2) + { + if (tile4.liquid > (byte) 240) + flag11 = true; + switch (tile4.liquidType()) + { + case 0: + flag12 = true; + break; + case 1: + index37 = 1; + break; + case 2: + index37 = 11; + break; + } + } + if (waterStyleOverride != -1) + Main.waterStyle = waterStyleOverride; + if (index37 == 0) + index37 = Main.waterStyle; + if (flag10 | flag11 | flag8 | flag9 && (!flag12 || index37 != 1)) + { + Microsoft.Xna.Framework.Color color7 = Lighting.GetColor(index3, index2); + Vector2 vector2_2 = new Vector2((float) (index3 * 16), (float) (index2 * 16)); + Microsoft.Xna.Framework.Rectangle rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16); + if (flag11 && flag8 | flag9) + { + flag8 = true; + flag9 = true; + } + if ((!flag10 || !(flag8 | flag9)) && !(flag11 & flag10)) + { + if (flag10) + { + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 4); + if (trackTile.halfBrick() || trackTile.slope() != (byte) 0) + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 12); + } + else if (flag11 && !flag8 && !flag9) + { + vector2_2 = new Vector2((float) (index3 * 16), (float) (index2 * 16 + 12)); + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 4); + } + else + { + float num60 = (float) (256 - num58) / 32f; + int y2 = 4; + if (tile3.liquid == (byte) 0 && !WorldGen.SolidTile(index3, index2 - 1)) + y2 = 0; + if (flag8 & flag9 || trackTile.halfBrick() || trackTile.slope() != (byte) 0) + { + vector2_2 = new Vector2((float) (index3 * 16), (float) (index2 * 16 + (int) num60 * 2)); + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, y2, 16, 16 - (int) num60 * 2); + } + else if (flag8) + { + vector2_2 = new Vector2((float) (index3 * 16), (float) (index2 * 16 + (int) num60 * 2)); + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, y2, 4, 16 - (int) num60 * 2); + } + else + { + vector2_2 = new Vector2((float) (index3 * 16 + 12), (float) (index2 * 16 + (int) num60 * 2)); + rectangle5 = new Microsoft.Xna.Framework.Rectangle(0, y2, 4, 16 - (int) num60 * 2); + } + } + } + float num61 = 0.5f; + switch (index37) + { + case 1: + num61 = 1f; + break; + case 11: + num61 *= 1.7f; + if ((double) num61 > 1.0) + { + num61 = 1f; + break; + } + break; + } + if ((double) index2 < Main.worldSurface || (double) num61 > 1.0) + { + num61 = 1f; + if (tile3.wall > (byte) 0 || tile2.wall > (byte) 0 || tile1.wall > (byte) 0 || tile4.wall > (byte) 0) + num61 = 0.65f; + if (trackTile.wall > (byte) 0) + num61 = 0.5f; + } + if (trackTile.halfBrick() && tile3.liquid > (byte) 0 && trackTile.wall > (byte) 0) + num61 = 0.0f; + color7 = new Microsoft.Xna.Framework.Color((int) (byte) ((float) color7.R * num61), (int) (byte) ((float) color7.G * num61), (int) (byte) ((float) color7.B * num61), (int) (byte) ((float) color7.A * num61)); + Main.spriteBatch.Draw(Main.liquidTexture[index37], vector2_2 - Main.screenPosition + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle5), color7, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + switch (type) + { + case 51: + Microsoft.Xna.Framework.Color color8 = Lighting.GetColor(index3, index2); + float num62 = 0.5f; + color8 = new Microsoft.Xna.Framework.Color((int) (byte) ((float) color8.R * num62), (int) (byte) ((float) color8.G * num62), (int) (byte) ((float) color8.B * num62), (int) (byte) ((float) color8.A * num62)); + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color8, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color8, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + case 160: + if (!trackTile.halfBrick()) + { + Microsoft.Xna.Framework.Color color9 = new Microsoft.Xna.Framework.Color(); + color9 = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, (int) byte.MaxValue); + if (trackTile.inActive()) + color9 = trackTile.actColor(color9); + if (trackTile.slope() == (byte) 0) + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else if (trackTile.slope() > (byte) 2) + { + if (trackTile.slope() == (byte) 3) + { + for (int index38 = 0; index38 < 8; ++index38) + { + int width2 = 2; + int num63 = index38 * 2; + int num64 = index38 * -2; + int height2 = 16 - index38 * 2; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num63, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index38 * width2 + num64)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num63, (int) num4 + 16 - height2, width2, height2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num63, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index38 * width2 + num64)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num63, (int) num4 + 16 - height2, width2, height2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else + { + for (int index39 = 0; index39 < 8; ++index39) + { + int width3 = 2; + int num65 = 16 - index39 * width3 - width3; + int height3 = 16 - index39 * width3; + int num66 = index39 * -2; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num65, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index39 * width3 + num66)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num65, (int) num4 + 16 - height3, width3, height3)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num65, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index39 * width3 + num66)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num65, (int) num4 + 16 - height3, width3, height3)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, 16, 2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, 16, 2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + } + else + { + if (trackTile.slope() == (byte) 1) + { + for (int index40 = 0; index40 < 8; ++index40) + { + int width4 = 2; + int num67 = index40 * 2; + int height4 = 14 - index40 * width4; + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num67, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index40 * width4)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num67, (int) num4, width4, height4)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (trackTile.slope() == (byte) 2) + { + for (int index41 = 0; index41 < 8; ++index41) + { + int width5 = 2; + int num68 = 16 - index41 * width5 - width5; + int height5 = 14 - index41 * width5; + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num68, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index41 * width5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num68, (int) num4, width5, height5)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 14)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + 14, 16, 2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 14)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + 14, 16, 2)), color9, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + } + } + else + break; + case 171: + if (startY > index2 - (int) num4 && num4 == (short) 7) + { + num5 -= 16 * (int) num4; + num3 = Main.tile[index3, index2 - (int) num4].frameX; + num4 = Main.tile[index3, index2 - (int) num4].frameY; + } + if (num3 >= (short) 10) + { + int num69 = 0; + if (((int) num4 & 1) == 1) + ++num69; + if (((int) num4 & 2) == 2) + num69 += 2; + if (((int) num4 & 4) == 4) + num69 += 4; + int num70 = 0; + if (((int) num4 & 8) == 8) + ++num70; + if (((int) num4 & 16) == 16) + num70 += 2; + if (((int) num4 & 32) == 32) + num70 += 4; + int num71 = 0; + if (((int) num4 & 64) == 64) + ++num71; + if (((int) num4 & 128) == 128) + num71 += 2; + if (((int) num4 & 256) == 256) + num71 += 4; + if (((int) num4 & 512) == 512) + num71 += 8; + int num72 = 0; + if (((int) num4 & 1024) == 1024) + ++num72; + if (((int) num4 & 2048) == 2048) + num72 += 2; + if (((int) num4 & 4096) == 4096) + num72 += 4; + if (((int) num4 & 8192) == 8192) + num72 += 8; + Microsoft.Xna.Framework.Color color10 = Lighting.GetColor(index3 + 1, index2 + 4); + Main.spriteBatch.Draw(Main.xmasTree[0], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 64, 128)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (num69 > 0) + { + int num73 = num69 - 1; + Microsoft.Xna.Framework.Color color11 = color10; + if (num73 != 3) + color11 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Main.spriteBatch.Draw(Main.xmasTree[3], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(66 * num73, 0, 64, 128)), color11, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (num70 > 0) + { + int num74 = num70 - 1; + Main.spriteBatch.Draw(Main.xmasTree[1], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(66 * num74, 0, 64, 128)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (num71 > 0) + { + int num75 = num71 - 1; + Main.spriteBatch.Draw(Main.xmasTree[2], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(66 * num75, 0, 64, 128)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (num72 > 0) + { + int num76 = num72 - 1; + Main.spriteBatch.Draw(Main.xmasTree[4], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(66 * num76, 130 * Main.tileFrame[171], 64, 128)), 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); + goto label_1285; + } + else + goto label_1285; + } + else + goto label_1285; + case 314: + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + else if (Main.tileShine2[(int) type]) + color1 = Main.shine(color1, (int) type); + int frontColor; + int backColor; + Minecart.TrackColors(index3, index2, trackTile, out frontColor, out backColor); + Texture2D texture3 = !Main.canDrawColorTile(type, frontColor) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, frontColor]; + Texture2D texture4 = !Main.canDrawColorTile(type, backColor) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, backColor]; + int num77 = (int) trackTile.frameNumber(); + if (num4 != (short) -1) + Main.spriteBatch.Draw(texture4, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) (index2 * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect((int) num4, Main.tileFrame[314])), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture3, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) (index2 * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect((int) num3, Main.tileFrame[314])), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (Minecart.DrawLeftDecoration((int) num4)) + Main.spriteBatch.Draw(texture4, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 + 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(36)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (Minecart.DrawLeftDecoration((int) num3)) + Main.spriteBatch.Draw(texture3, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 + 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(36)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (Minecart.DrawRightDecoration((int) num4)) + Main.spriteBatch.Draw(texture4, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 + 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(37, Main.tileFrame[314])), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (Minecart.DrawRightDecoration((int) num3)) + Main.spriteBatch.Draw(texture3, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 + 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(37)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (Minecart.DrawBumper((int) num3)) + { + Main.spriteBatch.Draw(texture3, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 - 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(39)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else if (Minecart.DrawBouncyBumper((int) num3)) + { + Main.spriteBatch.Draw(texture3, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X), (float) ((index2 - 1) * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(Minecart.GetSourceRect(38)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + goto label_1285; + } + else + goto label_1285; + } + if (trackTile.slope() > (byte) 0) + { + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + else if (Main.tileShine2[(int) type]) + color1 = Main.shine(color1, (int) type); + if (TileID.Sets.Platforms[(int) trackTile.type]) + { + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (trackTile.slope() == (byte) 1 && Main.tile[index3 + 1, index2 + 1].active() && Main.tile[index3 + 1, index2 + 1].slope() != (byte) 2 && !Main.tile[index3 + 1, index2 + 1].halfBrick() && !TileID.Sets.BlocksStairs[(int) Main.tile[index3 + 1, index2 + 1].type] && !TileID.Sets.BlocksStairsAbove[(int) Main.tile[index3, index2 + 1].type]) + { + if (TileID.Sets.Platforms[(int) Main.tile[index3 + 1, index2 + 1].type] && Main.tile[index3 + 1, index2 + 1].slope() == (byte) 0) + { + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(324, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(324, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(198, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(198, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (trackTile.slope() == (byte) 2 && Main.tile[index3 - 1, index2 + 1].active() && Main.tile[index3 - 1, index2 + 1].slope() != (byte) 1 && !Main.tile[index3 - 1, index2 + 1].halfBrick() && !TileID.Sets.BlocksStairs[(int) Main.tile[index3 - 1, index2 + 1].type] && !TileID.Sets.BlocksStairsAbove[(int) Main.tile[index3, index2 + 1].type]) + { + if (TileID.Sets.Platforms[(int) Main.tile[index3 - 1, index2 + 1].type] && Main.tile[index3 - 1, index2 + 1].slope() == (byte) 0) + { + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(306, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(306, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(162, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(162, (int) num4, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (TileID.Sets.HasSlopeFrames[(int) trackTile.type]) + { + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, 16, 16)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (trackTile.slope() > (byte) 2) + { + if (trackTile.slope() == (byte) 3) + { + for (int index42 = 0; index42 < 8; ++index42) + { + int width6 = 2; + int num78 = index42 * 2; + int num79 = index42 * -2; + int height6 = 16 - index42 * 2; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num78, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index42 * width6 + num79)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num78 + num8, (int) num4 + 16 - height6 + y1, width6, height6)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num78, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index42 * width6 + num79)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num78 + num8, (int) num4 + 16 - height6 + y1, width6, height6)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else + { + for (int index43 = 0; index43 < 8; ++index43) + { + int width7 = 2; + int num80 = 16 - index43 * width7 - width7; + int height7 = 16 - index43 * width7; + int num81 = index43 * -2; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num80, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index43 * width7 + num81)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num80 + num8, (int) num4 + 16 - height7 + y1, width7, height7)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num80, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index43 * width7 + num81)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num80 + num8, (int) num4 + 16 - height7 + y1, width7, height7)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, 16, 2)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, 16, 2)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + if (trackTile.slope() == (byte) 1) + { + for (int index44 = 0; index44 < 8; ++index44) + { + int width8 = 2; + int num82 = index44 * 2; + int height8 = 14 - index44 * width8; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num82, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index44 * width8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num82 + num8, (int) num4 + y1, width8, height8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num82, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index44 * width8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num82 + num8, (int) num4 + y1, width8, height8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (trackTile.slope() == (byte) 2) + { + for (int index45 = 0; index45 < 8; ++index45) + { + int width9 = 2; + int num83 = 16 - index45 * width9 - width9; + int height9 = 14 - index45 * width9; + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num83, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index45 * width9)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num83 + num8, (int) num4 + y1, width9, height9)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num83, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + index45 * width9)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num83 + num8, (int) num4 + y1, width9, height9)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 14)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + 14 + y1, 16, 2)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 14)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + 14 + y1, 16, 2)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (type == (ushort) 129) + { + Vector2 vector2_3 = new Vector2(0.0f, 0.0f); + if (num4 < (short) 36) + vector2_3.Y += (float) (2 * (num4 == (short) 0).ToDirectionInt()); + else + vector2_3.X += (float) (2 * (num4 == (short) 36).ToDirectionInt()); + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1 + vector2_3, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (Main.tileAlch[(int) type]) + { + height1 = 20; + num5 = -2; + int i = (int) type; + int num84 = (int) num3 / 18; + if (i > 82) + { + if (num84 == 0 && Main.dayTime) + i = 84; + if (num84 == 1 && !Main.dayTime) + i = 84; + if (num84 == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0)) + i = 84; + if (num84 == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0)) + i = 84; + if (num84 == 5 && !Main.raining && Main.time > 40500.0) + i = 84; + } + if (i == 84) + { + if (num84 == 0 && Main.rand.Next(100) == 0) + { + int index46 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16 - 4)), 16, 16, 19, Alpha: 160, Scale: 0.1f); + Main.dust[index46].velocity.X /= 2f; + Main.dust[index46].velocity.Y /= 2f; + Main.dust[index46].noGravity = true; + Main.dust[index46].fadeIn = 1f; + } + if (num84 == 1 && Main.rand.Next(100) == 0) + Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 41, Alpha: 250, Scale: 0.8f); + if (num84 == 3) + { + if (Main.rand.Next(200) == 0) + { + int index47 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 14, Alpha: 100, Scale: 0.2f); + Main.dust[index47].fadeIn = 1.2f; + } + if (Main.rand.Next(75) == 0) + { + int index48 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 27, Alpha: 100); + Main.dust[index48].velocity.X /= 2f; + Main.dust[index48].velocity.Y /= 2f; + } + } + if (num84 == 4 && Main.rand.Next(150) == 0) + { + int index49 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 8, 16); + Main.dust[index49].velocity.X /= 3f; + Main.dust[index49].velocity.Y /= 3f; + Main.dust[index49].velocity.Y -= 0.7f; + Main.dust[index49].alpha = 50; + Main.dust[index49].scale *= 0.1f; + Main.dust[index49].fadeIn = 0.9f; + Main.dust[index49].noGravity = true; + } + if (num84 == 5) + { + if (Main.rand.Next(40) == 0) + { + int index50 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16 - 6)), 16, 16, 6, Scale: 1.5f); + Main.dust[index50].velocity.Y -= 2f; + Main.dust[index50].noGravity = true; + } + color1.A = (byte) ((uint) Main.mouseTextColor / 2U); + color1.G = Main.mouseTextColor; + color1.B = Main.mouseTextColor; + } + if (num84 == 6) + { + if (Main.rand.Next(30) == 0) + { + Microsoft.Xna.Framework.Color newColor = new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + int index51 = Dust.NewDust(new Vector2((float) (index3 * 16), (float) (index2 * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f); + Main.dust[index51].velocity *= 0.0f; + } + byte num85 = (byte) (((int) Main.mouseTextColor + (int) color1.G * 2) / 3); + byte num86 = (byte) (((int) Main.mouseTextColor + (int) color1.B * 2) / 3); + if ((int) num85 > (int) color1.G) + color1.G = num85; + if ((int) num86 > (int) color1.B) + color1.B = num86; + } + } + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + this.LoadTiles(i); + Main.spriteBatch.Draw(Main.tileTexture[i], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (type == (ushort) 80) + { + bool flag13 = false; + bool flag14 = false; + bool flag15 = false; + if (!Main.canDrawColorTile(index3, index2)) + { + int index52 = index3; + if (num3 == (short) 36) + --index52; + if (num3 == (short) 54) + ++index52; + if (num3 == (short) 108) + { + if (num4 == (short) 18) + --index52; + else + ++index52; + } + int index53 = index2; + bool flag16 = false; + if (Main.tile[index52, index53].type == (ushort) 80 && Main.tile[index52, index53].active()) + flag16 = true; + while (!Main.tile[index52, index53].active() || !Main.tileSolid[(int) Main.tile[index52, index53].type] || !flag16) + { + if (Main.tile[index52, index53].type == (ushort) 80 && Main.tile[index52, index53].active()) + flag16 = true; + ++index53; + if (index53 > index2 + 20) + break; + } + if (Main.tile[index52, index53].type == (ushort) 112) + flag13 = true; + if (Main.tile[index52, index53].type == (ushort) 116) + flag14 = true; + if (Main.tile[index52, index53].type == (ushort) 234) + flag15 = true; + } + if (flag13) + Main.spriteBatch.Draw(Main.evilCactusTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else if (flag15) + Main.spriteBatch.Draw(Main.crimsonCactusTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else if (flag14) + Main.spriteBatch.Draw(Main.goodCactusTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (type == (ushort) 272 && !trackTile.halfBrick() && !Main.tile[index3 - 1, index2].halfBrick() && !Main.tile[index3 + 1, index2].halfBrick()) + { + int num87 = Main.tileFrame[(int) type] + index3 % 2 + index2 % 2 + index3 % 3 + index2 % 3; + while (num87 > 1) + num87 -= 2; + int num88 = num87 * 90; + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + else if (Main.tileShine2[(int) type]) + color1 = Main.shine(color1, (int) type); + if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + num88, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + num88, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + if (type == (ushort) 160) + color1 = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, (int) byte.MaxValue); + if (type != (ushort) 19 && type != (ushort) 380 && Main.tileSolid[(int) type] && !TileID.Sets.NotReallySolid[(int) type] && !trackTile.halfBrick() && (Main.tile[index3 - 1, index2].halfBrick() || Main.tile[index3 + 1, index2].halfBrick())) + { + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + else if (Main.tileShine2[(int) type]) + color1 = Main.shine(color1, (int) type); + if (Main.tile[index3 - 1, index2].halfBrick() && Main.tile[index3 + 1, index2].halfBrick()) + { + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(126 + num8, y1, 16, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + if (!Main.tile[index3, index2 - 1].bottomSlope() && (int) Main.tile[index3, index2 - 1].type == (int) type) + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(90 + num8, y1, 16, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(126 + num8, y1, 16, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (Main.tile[index3 - 1, index2].halfBrick()) + { + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) ((double) (index3 * 16 - (int) Main.screenPosition.X) - ((double) width1 - 16.0) / 2.0 + 4.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + 4 + num8, y1 + (int) num4, width1 - 4, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(126 + num8, y1, 4, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) ((double) (index3 * 16 - (int) Main.screenPosition.X) - ((double) width1 - 16.0) / 2.0 + 4.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + 4 + num8, y1 + (int) num4, width1 - 4, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(126 + num8, y1, 4, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (Main.tile[index3 + 1, index2].halfBrick()) + { + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4, width1 - 4, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) ((double) (index3 * 16 - (int) Main.screenPosition.X) - ((double) width1 - 16.0) / 2.0 + 12.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(138 + num8, y1, 4, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4 + 8, width1, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4, width1 - 4, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) ((double) (index3 * 16 - (int) Main.screenPosition.X) - ((double) width1 - 16.0) / 2.0 + 12.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(138, 0, 4, 8)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if (Main.canDrawColorTile(index3, index2)) + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, y1 + (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (Lighting.NotRetro && Main.tileSolid[(int) type] && type != (ushort) 137 && type != (ushort) 235 && type != (ushort) 388 && !trackTile.halfBrick() && !trackTile.inActive()) + { + if ((int) color1.R > num1 || (double) color1.G > (double) num1 * 1.1 || (double) color1.B > (double) num1 * 1.2) + { + Lighting.GetColor9Slice(index3, index2, ref slices); + bool flag17 = trackTile.inActive(); + bool flag18 = Main.tileShine2[(int) type]; + Texture2D texture5 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + for (int index54 = 0; index54 < 9; ++index54) + { + int num89 = 0; + int num90 = 0; + int width10 = 4; + int height10 = 4; + switch (index54) + { + case 1: + width10 = 8; + num89 = 4; + break; + case 2: + num89 = 12; + break; + case 3: + height10 = 8; + num90 = 4; + break; + case 4: + width10 = 8; + height10 = 8; + num89 = 4; + num90 = 4; + break; + case 5: + num89 = 12; + num90 = 4; + height10 = 8; + break; + case 6: + num90 = 12; + break; + case 7: + width10 = 8; + height10 = 4; + num89 = 4; + num90 = 12; + break; + case 8: + num89 = 12; + num90 = 12; + break; + } + Microsoft.Xna.Framework.Color color12 = color1; + Microsoft.Xna.Framework.Color color13 = slices[index54]; + color12.R = (byte) (((int) color1.R + (int) color13.R) / 2); + color12.G = (byte) (((int) color1.G + (int) color13.G) / 2); + color12.B = (byte) (((int) color1.B + (int) color13.B) / 2); + if (flag17) + color12 = trackTile.actColor(color12); + else if (flag18) + color12 = Main.shine(color12, (int) type); + Main.spriteBatch.Draw(texture5, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num89, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num90)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num89 + num8, (int) num4 + num90 + y1, width10, height10)), color12, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else if ((int) color1.R > num2 || (double) color1.G > (double) num2 * 1.1 || (double) color1.B > (double) num2 * 1.2) + { + Lighting.GetColor4Slice(index3, index2, ref slices); + bool flag19 = trackTile.inActive(); + bool flag20 = Main.tileShine2[(int) type]; + Texture2D texture6 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + for (int index55 = 0; index55 < 4; ++index55) + { + int num91 = 0; + int num92 = 0; + switch (index55) + { + case 1: + num91 = 8; + break; + case 2: + num92 = 8; + break; + case 3: + num91 = 8; + num92 = 8; + break; + } + Microsoft.Xna.Framework.Color color14 = color1; + Microsoft.Xna.Framework.Color color15 = slices[index55]; + color14.R = (byte) (((int) color1.R + (int) color15.R) / 2); + color14.G = (byte) (((int) color1.G + (int) color15.G) / 2); + color14.B = (byte) (((int) color1.B + (int) color15.B) / 2); + if (flag19) + color14 = trackTile.actColor(color14); + else if (flag20) + color14 = Main.shine(color14, (int) type); + Main.spriteBatch.Draw(texture6, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num91, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num92)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num91 + num8, (int) num4 + num92 + y1, 8, 8)), color14, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else + { + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + else if (Main.tileShine2[(int) type]) + color1 = Main.shine(color1, (int) type); + Texture2D texture7 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + Main.spriteBatch.Draw(texture7, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else + { + if (Lighting.NotRetro && Main.tileShine2[(int) type]) + { + if (type == (ushort) 21) + { + if (num3 >= (short) 36 && num3 < (short) 178) + color1 = Main.shine(color1, (int) type); + } + else if (!trackTile.inActive()) + color1 = Main.shine(color1, (int) type); + } + if (trackTile.inActive()) + color1 = trackTile.actColor(color1); + switch (type) + { + case 5: + int x1 = index3; + int y3 = index2; + if (num3 == (short) 66 && num4 <= (short) 45) + ++x1; + if (num3 == (short) 88 && num4 >= (short) 66 && num4 <= (short) 110) + --x1; + if (num3 == (short) 22 && num4 >= (short) 132) + --x1; + if (num3 == (short) 44 && num4 >= (short) 132) + ++x1; + while (Main.tile[x1, y3].active() && Main.tile[x1, y3].type == (ushort) 5) + ++y3; + int treeVariant = Main.GetTreeVariant(x1, y3); + if (treeVariant == -1) + { + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + if (Main.canDrawColorTree(index3, index2, treeVariant)) + { + Main.spriteBatch.Draw((Texture2D) Main.woodAltTexture[treeVariant, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.woodTexture[treeVariant], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + case 128: + case 269: + int x2 = (int) num3; + while (x2 >= 100) + x2 -= 100; + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(x2, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + case 323: + int num93 = -1; + int index56 = index3; + int index57 = index2; + while (Main.tile[index56, index57].active() && Main.tile[index56, index57].type == (ushort) 323) + ++index57; + if (Main.tile[index56, index57].active() && Main.tile[index56, index57].type == (ushort) 53) + num93 = 0; + if (Main.tile[index56, index57].active() && Main.tile[index56, index57].type == (ushort) 234) + num93 = 1; + if (Main.tile[index56, index57].active() && Main.tile[index56, index57].type == (ushort) 116) + num93 = 2; + if (Main.tile[index56, index57].active() && Main.tile[index56, index57].type == (ushort) 112) + num93 = 3; + int y4 = 22 * num93; + int num94 = (int) num4; + if (Main.canDrawColorTile(index3, index2)) + { + Main.spriteBatch.Draw((Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num94, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, y4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num94, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, y4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + case 334: + int x3 = (int) num3; + int num95 = 0; + while (x3 >= 5000) + { + x3 -= 5000; + ++num95; + } + if (num95 != 0) + x3 = (num95 - 1) * 18; + Main.spriteBatch.Draw(Main.tileTexture[(int) type], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(x3, (int) num4, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + default: + if (num7 == 8 && (!Main.tile[index3, index2 + 1].active() || !Main.tileSolid[(int) Main.tile[index3, index2 + 1].type] || Main.tile[index3, index2 + 1].halfBrick())) + { + Texture2D texture8 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + if (TileID.Sets.Platforms[(int) type]) + { + Main.spriteBatch.Draw(texture8, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num7)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else + { + Main.spriteBatch.Draw(texture8, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num7)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1 - num7 - 4)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture8, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(144 + num8, 66 + y1, width1, 4)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + else + { + Texture2D texture9 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + Main.spriteBatch.Draw(texture9, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num7)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1 - num7)), color1, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (type == (ushort) 27) + { + int index58 = 14; + Main.spriteBatch.Draw(Main.FlameTexture[index58], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + y1, width1, height1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (type == (ushort) 215 && num4 < (short) 36) + { + int index59 = 15; + Microsoft.Xna.Framework.Color color16 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if ((int) num3 / 54 == 5) + color16 = new Microsoft.Xna.Framework.Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue, 0.0f); + Main.spriteBatch.Draw(Main.FlameTexture[index59], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + y1, width1, height1)), color16, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (type == (ushort) 286) + Main.spriteBatch.Draw(Main.glowSnailTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1)), new Microsoft.Xna.Framework.Color(75, 100, (int) byte.MaxValue, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (type == (ushort) 270) + Main.spriteBatch.Draw(Main.fireflyJarTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (type == (ushort) 271) + Main.spriteBatch.Draw(Main.lightningbugJarTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (type == (ushort) 316 || type == (ushort) 317 || type == (ushort) 318) + { + int index60 = (index3 - (int) num3 / 18) / 2 * ((index2 - (int) num4 / 18) / 3) % Main.cageFrames; + Main.spriteBatch.Draw(Main.jellyfishBowlTexture[(int) type - 316], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + Main.jellyfishCageFrame[(int) type - 316, index60] * 36, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (type == (ushort) 149 && num3 < (short) 54) + Main.spriteBatch.Draw(Main.xmasLightTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (type == (ushort) 300 || type == (ushort) 302 || type == (ushort) 303 || type == (ushort) 306) + { + int index61 = 9; + if (type == (ushort) 302) + index61 = 10; + if (type == (ushort) 303) + index61 = 11; + if (type == (ushort) 306) + index61 = 12; + Main.spriteBatch.Draw(Main.FlameTexture[index61], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4 + y1, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + else if (Main.tileFlame[(int) type]) + { + ulong seed = Main._tileFrameSeed ^ ((ulong) index3 << 32 | (ulong) (uint) index2); + int num96 = (int) type; + int index62 = 0; + switch (num96) + { + case 4: + index62 = 0; + break; + case 33: + case 174: + index62 = 1; + break; + case 34: + index62 = 3; + break; + case 35: + index62 = 7; + break; + case 42: + index62 = 13; + break; + case 49: + index62 = 5; + break; + case 93: + index62 = 4; + break; + case 98: + index62 = 6; + break; + case 100: + case 173: + index62 = 2; + break; + case 372: + index62 = 16; + break; + } + switch (index62) + { + case 1: + switch ((int) Main.tile[index3, index2].frameY / 22) + { + case 5: + case 6: + case 7: + case 10: + for (int index63 = 0; index63 < 7; ++index63) + { + float num97 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num98 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num97, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num98) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 8: + for (int index64 = 0; index64 < 7; ++index64) + { + float num99 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num100 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num99, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num100) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 12: + for (int index65 = 0; index65 < 7; ++index65) + { + float num101 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num102 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num101, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num102) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 14: + for (int index66 = 0; index66 < 8; ++index66) + { + float num103 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num104 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num103, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num104) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 16: + for (int index67 = 0; index67 < 4; ++index67) + { + float num105 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num106 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num105, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num106) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 27: + case 28: + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + default: + for (int index68 = 0; index68 < 7; ++index68) + { + float num107 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num108 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num107, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num108) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + break; + case 2: + switch ((int) Main.tile[index3, index2].frameY / 36) + { + case 3: + for (int index69 = 0; index69 < 3; ++index69) + { + float num109 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.05f; + float num110 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num109, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num110) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 6: + for (int index70 = 0; index70 < 5; ++index70) + { + float num111 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num112 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num111, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num112) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 9: + for (int index71 = 0; index71 < 7; ++index71) + { + float num113 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num114 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num113, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num114) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 11: + for (int index72 = 0; index72 < 7; ++index72) + { + float num115 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num116 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num115, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num116) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 13: + for (int index73 = 0; index73 < 8; ++index73) + { + float num117 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num118 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num117, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num118) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 28: + case 29: + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + default: + for (int index74 = 0; index74 < 7; ++index74) + { + float num119 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num120 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num119, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num120) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + break; + case 3: + switch ((int) Main.tile[index3, index2].frameY / 54) + { + case 8: + for (int index75 = 0; index75 < 7; ++index75) + { + float num121 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num122 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num121, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num122) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 9: + for (int index76 = 0; index76 < 3; ++index76) + { + float num123 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.05f; + float num124 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num123, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num124) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 11: + for (int index77 = 0; index77 < 7; ++index77) + { + float num125 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num126 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num125, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num126) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 15: + for (int index78 = 0; index78 < 7; ++index78) + { + float num127 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num128 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num127, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num128) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 17: + case 20: + for (int index79 = 0; index79 < 7; ++index79) + { + float num129 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num130 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num129, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num130) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 18: + for (int index80 = 0; index80 < 8; ++index80) + { + float num131 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num132 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num131, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num132) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 34: + case 35: + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + default: + for (int index81 = 0; index81 < 7; ++index81) + { + float num133 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num134 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num133, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num134) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + break; + case 4: + switch ((int) Main.tile[index3, index2].frameY / 54) + { + case 1: + for (int index82 = 0; index82 < 3; ++index82) + { + float num135 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num136 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num135, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num136) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 2: + case 4: + for (int index83 = 0; index83 < 7; ++index83) + { + float num137 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num138 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num137, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num138) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 3: + for (int index84 = 0; index84 < 7; ++index84) + { + float num139 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float num140 = (float) Utils.RandomInt(ref seed, -20, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num139, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num140) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 5: + for (int index85 = 0; index85 < 7; ++index85) + { + float num141 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num142 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num141, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num142) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 9: + for (int index86 = 0; index86 < 7; ++index86) + { + float num143 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num144 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num143, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num144) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 12: + float num145 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.01f; + float num146 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.01f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num145, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num146) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(Utils.RandomInt(ref seed, 90, 111), Utils.RandomInt(ref seed, 90, 111), Utils.RandomInt(ref seed, 90, 111), 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + case 13: + for (int index87 = 0; index87 < 8; ++index87) + { + float num147 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num148 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num147, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num148) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 28: + case 29: + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + default: + for (int index88 = 0; index88 < 7; ++index88) + { + float num149 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num150 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num149, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num150) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + break; + case 7: + for (int index89 = 0; index89 < 4; ++index89) + { + float num151 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num152 = (float) Utils.RandomInt(ref seed, -10, 10) * 0.15f; + float num153 = 0.0f; + float num154 = 0.0f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num153, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num154) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + case 13: + int num155 = (int) num4 / 36; + if (num155 == 1 || num155 == 3 || num155 == 6 || num155 == 8 || num155 == 19 || num155 == 27 || num155 == 29 || num155 == 30 || num155 == 31 || num155 == 32 || num155 == 36) + { + for (int index90 = 0; index90 < 7; ++index90) + { + float num156 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num157 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num156, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num157) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + if (num155 == 25 || num155 == 16 || num155 == 2) + { + for (int index91 = 0; index91 < 7; ++index91) + { + float num158 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num159 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.1f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num158, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num159) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(50, 50, 50, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + if (num155 == 29) + { + for (int index92 = 0; index92 < 7; ++index92) + { + float num160 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num161 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num160, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num161) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(25, 25, 25, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + if (num155 == 34 || num155 == 35) + { + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(75, 75, 75, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + break; + default: + for (int index93 = 0; index93 < 7; ++index93) + { + Microsoft.Xna.Framework.Color color17 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + if ((int) num4 / 22 == 14) + color17 = new Microsoft.Xna.Framework.Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue, 0.0f); + float num162 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num163 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(Main.FlameTexture[index62], new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + num162, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5) + num163) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), color17, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + break; + } + } + if (type == (ushort) 144) + Main.spriteBatch.Draw(Main.timerTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (type == (ushort) 237) + { + Main.spriteBatch.Draw(Main.sunAltarTexture, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + num5)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3, (int) num4, width1, height1)), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor / 2, (int) Main.mouseTextColor / 2, (int) Main.mouseTextColor / 2, 0), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + break; + } + } + } + } +label_1285: + if (Main.tileGlowMask[(int) trackTile.type] != (short) 0) + { + Texture2D texture10 = Main.glowMaskTexture[(int) Main.tileGlowMask[(int) trackTile.type]]; + double num164 = Main.time * 0.08; + Microsoft.Xna.Framework.Color color18 = Microsoft.Xna.Framework.Color.White; + if (trackTile.type == (ushort) 350) + color18 = new Microsoft.Xna.Framework.Color(new Vector4((float) (-Math.Cos((int) (num164 / 6.283) % 3 == 1 ? num164 : 0.0) * 0.2 + 0.2))); + if (trackTile.type == (ushort) 381) + color18 = color5; + if (trackTile.type == (ushort) 370) + color18 = color4; + if (trackTile.type == (ushort) 390) + color18 = color4; + if (trackTile.type == (ushort) 391) + color18 = new Microsoft.Xna.Framework.Color(250, 250, 250, 200); + if (trackTile.type == (ushort) 209) + color18 = PortalHelper.GetPortalColor(Main.myPlayer, trackTile.frameX >= (short) 288 ? 1 : 0); + if (trackTile.type == (ushort) 429 || trackTile.type == (ushort) 445) + { + texture10 = !Main.canDrawColorTile(index3, index2) ? Main.tileTexture[(int) type] : (Texture2D) Main.tileAltTexture[(int) type, (int) trackTile.color()]; + y1 = 18; + } + if (trackTile.slope() == (byte) 0 && !trackTile.halfBrick()) + Main.spriteBatch.Draw(texture10, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1)), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (trackTile.halfBrick()) + { + Main.spriteBatch.Draw(texture10, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0), (float) (index2 * 16 - (int) Main.screenPosition.Y + 10)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1 + 10, width1, 6)), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else + { + byte num165 = trackTile.slope(); + for (int index94 = 0; index94 < 8; ++index94) + { + int width11 = index94 << 1; + Microsoft.Xna.Framework.Rectangle rectangle6 = new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1 + index94 * 2, width11, 2); + int num166 = 0; + switch (num165) + { + case 2: + rectangle6.X = 16 - width11; + num166 = 16 - width11; + break; + case 3: + rectangle6.Width = 16 - width11; + break; + case 4: + rectangle6.Width = 14 - width11; + rectangle6.X = width11 + 2; + num166 = width11 + 2; + break; + } + Main.spriteBatch.Draw(texture10, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num166, (float) (index2 * 16 - (int) Main.screenPosition.Y + index94 * 2)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle6), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + if (texture1 != null) + { + int num167 = 0; + int num168 = 0; + Main.spriteBatch.Draw(texture1, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num167, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num168)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle3), color2, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + if (texture2 != null) + { + rectangle4 = new Microsoft.Xna.Framework.Rectangle((int) num3 + num8, (int) num4 + y1, width1, height1); + int num169 = 0; + int num170 = 0; + Main.spriteBatch.Draw(texture2, new Vector2((float) (index3 * 16 - (int) Main.screenPosition.X) - (float) (((double) width1 - 16.0) / 2.0) + (float) num169, (float) (index2 * 16 - (int) Main.screenPosition.Y + num5 + num170)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle4), color6, 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + } + } + } + if (solidOnly) + this.DrawTileCracks(1); + for (int index95 = 0; index95 < index1; ++index95) + { + int index96 = Main.specX[index95]; + int index97 = Main.specY[index95]; + Tile tile = Main.tile[index96, index97]; + ushort type1 = tile.type; + short frameX1 = tile.frameX; + short frameY1 = tile.frameY; + if (type1 == (ushort) 237) + Main.spriteBatch.Draw(Main.sunOrbTexture, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X) + (float) width1 / 2f, (float) (index97 * 16 - (int) Main.screenPosition.Y - 36)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sunOrbTexture.Width, Main.sunOrbTexture.Height)), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0), Main.sunCircle, new Vector2((float) (Main.sunOrbTexture.Width / 2), (float) (Main.sunOrbTexture.Height / 2)), 1f, SpriteEffects.None, 0.0f); + if ((type1 == (ushort) 128 || type1 == (ushort) 269) && frameX1 >= (short) 100) + { + int num171 = (int) frameY1 / 18; + int num172 = (int) frameX1; + int index98 = 0; + for (; num172 >= 100; num172 -= 100) + ++index98; + int num173 = -4; + SpriteEffects effects = SpriteEffects.FlipHorizontally; + if (num172 >= 36) + { + effects = SpriteEffects.None; + num173 = -4; + } + switch (num171) + { + case 0: + bool somethingSpecial1 = false; + int i1 = Player.SetMatch(0, index98, type1 == (ushort) 128, ref somethingSpecial1); + if (i1 == -1) + i1 = index98; + this.LoadArmorHead(i1); + Main.spriteBatch.Draw(Main.armorHeadTexture[i1], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + case 1: + bool somethingSpecial2 = false; + int i2 = Player.SetMatch(1, index98, type1 == (ushort) 128, ref somethingSpecial2); + if (i2 != -1) + { + this.LoadArmorLegs(i2); + Main.spriteBatch.Draw(Main.armorLegTexture[i2], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 28)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + this.LoadArmorBody(index98); + if (type1 == (ushort) 269) + Main.spriteBatch.Draw(Main.femaleBodyTexture[index98], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 28)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + else + Main.spriteBatch.Draw(Main.armorBodyTexture[index98], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 28)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + if (index98 >= 0 && index98 < 210 && ArmorIDs.Body.Sets.NeedsToDrawArm[index98]) + { + Main.spriteBatch.Draw(Main.armorArmTexture[index98], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 28)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + break; + case 2: + bool somethingSpecial3 = false; + int i3 = Player.SetMatch(2, index98, type1 == (ushort) 128, ref somethingSpecial3); + if (i3 == -1) + i3 = index98; + this.LoadArmorLegs(i3); + Main.spriteBatch.Draw(Main.armorLegTexture[i3], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + num173), (float) (index97 * 16 - (int) Main.screenPosition.Y - 44)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, effects, 0.0f); + break; + } + } + if (type1 == (ushort) 334 && frameX1 >= (short) 5000) + { + int num174 = (int) frameY1 / 18; + int num175 = (int) frameX1; + int num176 = 0; + int type2 = num175 % 5000 - 100; + for (; num175 >= 5000; num175 -= 5000) + ++num176; + int frameX2 = (int) Main.tile[index96 + 1, index97].frameX; + int pre = frameX2 < 25000 ? frameX2 - 10000 : frameX2 - 25000; + Item obj = new Item(); + obj.netDefaults(type2); + obj.Prefix(pre); + Texture2D texture2D = Main.itemTexture[obj.type]; + Microsoft.Xna.Framework.Rectangle rectangle = Main.itemAnimations[obj.type] == null ? texture2D.Frame() : Main.itemAnimations[obj.type].GetFrame(texture2D); + int width12 = rectangle.Width; + int height = rectangle.Height; + float num177 = 1f; + if (width12 > 40 || height > 40) + num177 = width12 <= height ? 40f / (float) height : 40f / (float) width12; + float scale = num177 * obj.scale; + SpriteEffects effects = SpriteEffects.None; + if (num176 >= 3) + effects = SpriteEffects.FlipHorizontally; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(index96, index97); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + 24), (float) (index97 * 16 - (int) Main.screenPosition.Y + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), Lighting.GetColor(index96, index97), 0.0f, new Vector2((float) (width12 / 2), (float) (height / 2)), scale, effects, 0.0f); + if (obj.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + 24), (float) (index97 * 16 - (int) Main.screenPosition.Y + 8)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), obj.GetColor(color), 0.0f, new Vector2((float) (width12 / 2), (float) (height / 2)), scale, effects, 0.0f); + } + if (type1 == (ushort) 395) + { + Item obj = ((TEItemFrame) TileEntity.ByPosition[new Point16(index96, index97)]).item; + Texture2D texture2D = Main.itemTexture[obj.type]; + Microsoft.Xna.Framework.Rectangle rectangle = Main.itemAnimations[obj.type] == null ? texture2D.Frame() : Main.itemAnimations[obj.type].GetFrame(texture2D); + int width13 = rectangle.Width; + int height = rectangle.Height; + float num178 = 1f; + if (width13 > 20 || height > 20) + num178 = width13 <= height ? 20f / (float) height : 20f / (float) width13; + float num179 = num178 * obj.scale; + SpriteEffects effects = SpriteEffects.None; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(index96, index97); + Microsoft.Xna.Framework.Color currentColor = color; + float scale1 = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale1, obj); + float scale2 = num179 * scale1; + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + 16), (float) (index97 * 16 - (int) Main.screenPosition.Y + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), currentColor, 0.0f, new Vector2((float) (width13 / 2), (float) (height / 2)), scale2, effects, 0.0f); + if (obj.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X + 16), (float) (index97 * 16 - (int) Main.screenPosition.Y + 16)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), obj.GetColor(color), 0.0f, new Vector2((float) (width13 / 2), (float) (height / 2)), scale2, effects, 0.0f); + } + if (type1 == (ushort) 412) + { + Texture2D texture2D = Main.glowMaskTexture[202]; + int frameY2 = Main.tileFrame[(int) type1] / 60; + int frameY3 = (frameY2 + 1) % 4; + float num180 = (float) (Main.tileFrame[(int) type1] % 60) / 60f; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X), (float) (index97 * 16 - (int) Main.screenPosition.Y + 2)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(verticalFrames: 4, frameY: frameY2)), color * (1f - num180), 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X), (float) (index97 * 16 - (int) Main.screenPosition.Y + 2)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(verticalFrames: 4, frameY: frameY3)), color * num180, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + try + { + if (type1 == (ushort) 5 && frameY1 >= (short) 198 && frameX1 >= (short) 22) + { + int num181 = 0; + switch (frameX1) + { + case 22: + switch (frameY1) + { + case 220: + num181 = 1; + break; + case 242: + num181 = 2; + break; + } + int index99 = 0; + int width14 = 80; + int height = 80; + int num182 = 32; + int num183 = 0; + for (int index100 = index97; index100 < index97 + 100; ++index100) + { + if (Main.tile[index96, index100].type == (ushort) 2) + { + index99 = Main.GetTreeStyle(index96); + break; + } + if (Main.tile[index96, index100].type == (ushort) 23) + { + index99 = 1; + break; + } + if (Main.tile[index96, index100].type == (ushort) 70) + { + index99 = 14; + break; + } + if (Main.tile[index96, index100].type == (ushort) 60) + { + index99 = 2; + if (WorldGen.jungleBG == 1) + index99 = 11; + if ((double) index100 > Main.worldSurface) + index99 = 13; + width14 = 114; + height = 96; + num182 = 48; + break; + } + if (Main.tile[index96, index100].type == (ushort) 147) + { + index99 = 4; + if (WorldGen.snowBG == 0) + { + index99 = 12; + if (index96 % 10 == 0) + index99 = 18; + } + if (WorldGen.snowBG == 2 || WorldGen.snowBG == 3 || WorldGen.snowBG == 32 || WorldGen.snowBG == 4 || WorldGen.snowBG == 42) + { + index99 = WorldGen.snowBG % 2 != 0 ? (index96 <= Main.maxTilesX / 2 ? 17 : 16) : (index96 >= Main.maxTilesX / 2 ? 17 : 16); + break; + } + break; + } + if (Main.tile[index96, index100].type == (ushort) 199) + { + index99 = 5; + break; + } + if (Main.tile[index96, index100].type == (ushort) 109) + { + index99 = 3; + height = 140; + if (index96 % 3 == 1) + { + num181 += 3; + break; + } + if (index96 % 3 == 2) + { + num181 += 6; + break; + } + break; + } + } + if (index99 == 14) + { + float num184 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(index96, index97, 0.1f, (float) (0.200000002980232 + (double) num184 / 2.0), 0.7f + num184); + } + if (tile.color() > (byte) 0) + Main.checkTreeAlt[index99, (int) tile.color()] = true; + if (tile.color() > (byte) 0 && Main.treeAltTextureDrawn[index99, (int) tile.color()]) + { + Main.spriteBatch.Draw((Texture2D) Main.treeTopAltTexture[index99, (int) tile.color()], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - num182), (float) (index97 * 16 - (int) Main.screenPosition.Y - height + 16 + num183)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num181 * (width14 + 2), 0, width14, height)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.treeTopTexture[index99], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - num182), (float) (index97 * 16 - (int) Main.screenPosition.Y - height + 16 + num183)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num181 * (width14 + 2), 0, width14, height)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + case 44: + switch (frameY1) + { + case 220: + num181 = 1; + break; + case 242: + num181 = 2; + break; + } + int index101 = 0; + for (int index102 = index97; index102 < index97 + 100; ++index102) + { + if (Main.tile[index96 + 1, index102].type == (ushort) 2) + { + index101 = Main.GetTreeStyle(index96 + 1); + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 23) + { + index101 = 1; + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 70) + { + index101 = 14; + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 60) + { + index101 = 2; + if ((double) index102 > Main.worldSurface) + { + index101 = 13; + break; + } + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 147) + { + index101 = 4; + if (WorldGen.snowBG == 0) + { + index101 = 12; + break; + } + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 199) + { + index101 = 5; + break; + } + if (Main.tile[index96 + 1, index102].type == (ushort) 109) + { + index101 = 3; + if (index96 % 3 == 1) + { + num181 += 3; + break; + } + if (index96 % 3 == 2) + { + num181 += 6; + break; + } + break; + } + } + if (index101 == 14) + { + float num185 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(index96, index97, 0.1f, (float) (0.200000002980232 + (double) num185 / 2.0), 0.7f + num185); + } + if (tile.color() > (byte) 0) + Main.checkTreeAlt[index101, (int) tile.color()] = true; + if (tile.color() > (byte) 0 && Main.treeAltTextureDrawn[index101, (int) tile.color()]) + { + Main.spriteBatch.Draw((Texture2D) Main.treeBranchAltTexture[index101, (int) tile.color()], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - 24), (float) (index97 * 16 - (int) Main.screenPosition.Y - 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num181 * 42, 40, 40)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.treeBranchTexture[index101], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - 24), (float) (index97 * 16 - (int) Main.screenPosition.Y - 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num181 * 42, 40, 40)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + case 66: + switch (frameY1) + { + case 220: + num181 = 1; + break; + case 242: + num181 = 2; + break; + } + int index103 = 0; + for (int index104 = index97; index104 < index97 + 100; ++index104) + { + if (Main.tile[index96 - 1, index104].type == (ushort) 2) + { + index103 = Main.GetTreeStyle(index96 - 1); + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 23) + { + index103 = 1; + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 70) + { + index103 = 14; + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 60) + { + index103 = 2; + if ((double) index104 > Main.worldSurface) + { + index103 = 13; + break; + } + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 147) + { + index103 = 4; + if (WorldGen.snowBG == 0) + { + index103 = 12; + break; + } + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 199) + { + index103 = 5; + break; + } + if (Main.tile[index96 - 1, index104].type == (ushort) 109) + { + index103 = 3; + if (index96 % 3 == 1) + { + num181 += 3; + break; + } + if (index96 % 3 == 2) + { + num181 += 6; + break; + } + break; + } + } + if (index103 == 14) + { + float num186 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(index96, index97, 0.1f, (float) (0.200000002980232 + (double) num186 / 2.0), 0.7f + num186); + } + if (tile.color() > (byte) 0) + Main.checkTreeAlt[index103, (int) tile.color()] = true; + if (tile.color() > (byte) 0 && Main.treeAltTextureDrawn[index103, (int) tile.color()]) + { + Main.spriteBatch.Draw((Texture2D) Main.treeBranchAltTexture[index103, (int) tile.color()], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X), (float) (index97 * 16 - (int) Main.screenPosition.Y - 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(42, num181 * 42, 40, 40)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.treeBranchTexture[index103], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X), (float) (index97 * 16 - (int) Main.screenPosition.Y - 12)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(42, num181 * 42, 40, 40)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + } + if (type1 == (ushort) 323) + { + if (frameX1 >= (short) 88) + { + if (frameX1 <= (short) 132) + { + int num187 = 0; + if (frameX1 == (short) 110) + num187 = 1; + else if (frameX1 == (short) 132) + num187 = 2; + int index105 = 15; + int num188 = 0; + int width15 = 80; + int height = 80; + int num189 = 32; + int num190 = 0; + for (int index106 = index97; index106 < index97 + 100; ++index106) + { + if (Main.tile[index96, index106].type == (ushort) 53) + { + num188 = 0; + break; + } + if (Main.tile[index96, index106].type == (ushort) 234) + { + num188 = 1; + break; + } + if (Main.tile[index96, index106].type == (ushort) 116) + { + num188 = 2; + break; + } + if (Main.tile[index96, index106].type == (ushort) 112) + { + num188 = 3; + break; + } + } + int frameY4 = (int) Main.tile[index96, index97].frameY; + int y = num188 * 82; + if (tile.color() > (byte) 0) + Main.checkTreeAlt[index105, (int) tile.color()] = true; + if (tile.color() > (byte) 0 && Main.treeAltTextureDrawn[index105, (int) tile.color()]) + Main.spriteBatch.Draw((Texture2D) Main.treeTopAltTexture[index105, (int) tile.color()], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - num189 + frameY4), (float) (index97 * 16 - (int) Main.screenPosition.Y - height + 16 + num190)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num187 * (width15 + 2), y, width15, height)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.treeTopTexture[index105], new Vector2((float) (index96 * 16 - (int) Main.screenPosition.X - num189 + frameY4), (float) (index97 * 16 - (int) Main.screenPosition.Y - height + 16 + num190)) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num187 * (width15 + 2), y, width15, height)), Lighting.GetColor(index96, index97), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + catch + { + } + } + if (TileObject.objectPreview.Active && Main.player[Main.myPlayer].showItemIcon && Main.placementPreview && !CaptureManager.Instance.Active) + { + this.LoadTiles((int) TileObject.objectPreview.Type); + TileObject.DrawPreview(Main.spriteBatch, TileObject.objectPreview, Main.screenPosition - vector2_1); + } + if (solidOnly) + TimeLogger.DrawTime(0, stopwatch.Elapsed.TotalMilliseconds); + else + TimeLogger.DrawTime(1, stopwatch.Elapsed.TotalMilliseconds); + } + + private void DrawSpecialTilesDeprecated(Vector2 offSet, int specTop) + { + for (int index1 = Main.specX.Length - 1; index1 > specTop; --index1) + { + int x = Main.specX[index1]; + int y = Main.specY[index1]; + Tile tile = Main.tile[x, y]; + ushort type = tile.type; + short frameX = tile.frameX; + short frameY = tile.frameY; + if ((type == (ushort) 128 || type == (ushort) 269) && frameX >= (short) 100) + { + int num1 = (int) frameY / 18; + int num2 = (int) frameX; + int index2 = 0; + for (; num2 >= 100; num2 -= 100) + ++index2; + int num3 = -4; + SpriteEffects effects = SpriteEffects.FlipHorizontally; + if (num2 >= 36) + { + effects = SpriteEffects.None; + num3 = -4; + } + switch (num1) + { + case 0: + this.LoadArmorHead(index2); + Main.spriteBatch.Draw(Main.armorHeadTexture[index2], new Vector2((float) (x * 16 - (int) Main.screenPosition.X + num3), (float) (y * 16 - (int) Main.screenPosition.Y - 12)) + offSet, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 36)), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + continue; + case 1: + bool somethingSpecial = false; + int i1 = Player.SetMatch(1, index2, type != (ushort) 128, ref somethingSpecial); + if (i1 != -1) + { + this.LoadArmorLegs(i1); + Main.spriteBatch.Draw(Main.armorLegTexture[i1], new Vector2((float) (x * 16 - (int) Main.screenPosition.X + num3), (float) (y * 16 - (int) Main.screenPosition.Y - 28)) + offSet, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + this.LoadArmorBody(index2); + if (type == (ushort) 269) + { + Main.spriteBatch.Draw(Main.femaleBodyTexture[index2], new Vector2((float) (x * 16 - (int) Main.screenPosition.X + num3), (float) (y * 16 - (int) Main.screenPosition.Y - 28)) + offSet, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + continue; + } + Main.spriteBatch.Draw(Main.armorBodyTexture[index2], new Vector2((float) (x * 16 - (int) Main.screenPosition.X + num3), (float) (y * 16 - (int) Main.screenPosition.Y - 28)) + offSet, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + continue; + case 2: + int i2 = index2; + switch (i2) + { + case 83: + if (type == (ushort) 128) + { + i2 = 117; + break; + } + break; + case 84: + if (type == (ushort) 128) + { + i2 = 120; + break; + } + break; + } + this.LoadArmorLegs(i2); + Main.spriteBatch.Draw(Main.armorLegTexture[i2], new Vector2((float) (x * 16 - (int) Main.screenPosition.X + num3), (float) (y * 16 - (int) Main.screenPosition.Y - 44)) + offSet, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 40, 54)), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + continue; + default: + continue; + } + } + } + } + + protected void DrawGoreBehind() + { + for (int index = 0; index < 500; ++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].frame < (byte) 7 || Main.gore[index].frame > (byte) 9)) + flag = true; + if (flag) + { + this.LoadGore(Main.gore[index].type); + if (Main.gore[index].numFrames > (byte) 1) + { + int height = Main.goreTexture[Main.gore[index].type].Height / (int) Main.gore[index].numFrames; + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) Main.goreTexture[Main.gore[index].type].Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) height * 0.5) / 16.0))); + Main.spriteBatch.Draw(Main.goreTexture[Main.gore[index].type], new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) ((double) Main.gore[index].position.Y - (double) Main.screenPosition.Y + (double) (height / 2) - 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, height * (int) Main.gore[index].frame, Main.goreTexture[Main.gore[index].type].Width, height)), alpha, Main.gore[index].rotation, new Vector2((float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) (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) Main.goreTexture[Main.gore[index].type].Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) Main.goreTexture[Main.gore[index].type].Height * 0.5) / 16.0))); + Main.spriteBatch.Draw(Main.goreTexture[Main.gore[index].type], new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (Main.goreTexture[Main.gore[index].type].Width / 2), Main.gore[index].position.Y - Main.screenPosition.Y + (float) (Main.goreTexture[Main.gore[index].type].Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.goreTexture[Main.gore[index].type].Width, Main.goreTexture[Main.gore[index].type].Height)), alpha, Main.gore[index].rotation, new Vector2((float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) (Main.goreTexture[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 < 500; ++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].frame < (byte) 7 || Main.gore[index].frame > (byte) 9)) + { + Main.drawBackGore = true; + } + else + { + this.LoadGore(Main.gore[index].type); + if (Main.gore[index].numFrames > (byte) 1) + { + int height = Main.goreTexture[Main.gore[index].type].Height / (int) Main.gore[index].numFrames; + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) Main.goreTexture[Main.gore[index].type].Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) height * 0.5) / 16.0))); + Main.spriteBatch.Draw(Main.goreTexture[Main.gore[index].type], new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) ((double) Main.gore[index].position.Y - (double) Main.screenPosition.Y + (double) (height / 2) - 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, height * (int) Main.gore[index].frame, Main.goreTexture[Main.gore[index].type].Width, height)), alpha, Main.gore[index].rotation, new Vector2((float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) (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) Main.goreTexture[Main.gore[index].type].Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) Main.goreTexture[Main.gore[index].type].Height * 0.5) / 16.0))); + Main.spriteBatch.Draw(Main.goreTexture[Main.gore[index].type], new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (Main.goreTexture[Main.gore[index].type].Width / 2), Main.gore[index].position.Y - Main.screenPosition.Y + (float) (Main.goreTexture[Main.gore[index].type].Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.goreTexture[Main.gore[index].type].Width, Main.goreTexture[Main.gore[index].type].Height)), alpha, Main.gore[index].rotation, new Vector2((float) (Main.goreTexture[Main.gore[index].type].Width / 2), (float) (Main.goreTexture[Main.gore[index].type].Height / 2)), Main.gore[index].scale, SpriteEffects.None, 0.0f); + } + } + } + } + TimeLogger.DetailedDrawTime(24); + } + + protected void DrawHealthBar( + float X, + float Y, + int Health, + int MaxHealth, + float alpha, + float scale = 1f) + { + 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) + { + 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(Main.hbTexture2, 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, Main.hbTexture2.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + if (num2 < 34) + Main.spriteBatch.Draw(Main.hbTexture2, 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, Main.hbTexture2.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + if (num2 > 2) + Main.spriteBatch.Draw(Main.hbTexture1, new Vector2(num3 - Main.screenPosition.X, num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, num2 - 2, Main.hbTexture1.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.hbTexture1, 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, Main.hbTexture1.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + } + else + { + if (num2 < 36) + Main.spriteBatch.Draw(Main.hbTexture2, 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, Main.hbTexture2.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.hbTexture1, new Vector2(num3 - Main.screenPosition.X, num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, num2, Main.hbTexture1.Height)), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + } + } + + public static float NPCAddHeight(int i) + { + float num = 0.0f; + if (Main.npc[i].type == 125) + num = 30f; + else if (Main.npc[i].type == 54) + num = 2f; + else if (Main.npc[i].type == 205) + num = 8f; + else if (Main.npc[i].type == 182) + num = 24f; + else if (Main.npc[i].type == 178) + num = 2f; + else if (Main.npc[i].type == 126) + num = 30f; + else if (Main.npc[i].type == 6 || Main.npc[i].type == 173) + num = 26f; + else if (Main.npc[i].type == 94) + num = 14f; + else if (Main.npc[i].type == 7 || Main.npc[i].type == 8 || Main.npc[i].type == 9) + num = 13f; + else if (Main.npc[i].type == 98 || Main.npc[i].type == 99 || Main.npc[i].type == 100) + num = 13f; + else if (Main.npc[i].type == 95 || Main.npc[i].type == 96 || Main.npc[i].type == 97) + num = 13f; + else if (Main.npc[i].type == 10 || Main.npc[i].type == 11 || Main.npc[i].type == 12) + num = 8f; + else if (Main.npc[i].type == 13 || Main.npc[i].type == 14 || Main.npc[i].type == 15) + num = 26f; + else if (Main.npc[i].type == 175) + num = 4f; + else if (Main.npc[i].type == 520) + num = 2f; + else if (Main.npc[i].type >= 412 && Main.npc[i].type <= 414) + num = 18f; + else if (Main.npc[i].type == 48) + num = 32f; + else if (Main.npc[i].type == 49 || Main.npc[i].type == 51) + num = 4f; + else if (Main.npc[i].type == 60) + num = 10f; + else if (Main.npc[i].type == 62 || Main.npc[i].type == 66 || Main.npc[i].type == 156) + num = 14f; + else if (Main.npc[i].type == 63 || Main.npc[i].type == 64 || Main.npc[i].type == 103) + num = 4f; + else if (Main.npc[i].type == 65) + num = 14f; + else if (Main.npc[i].type == 69) + num = 4f; + else if (Main.npc[i].type == 70) + num = -4f; + else if (Main.npc[i].type == 72) + num = -2f; + else if (Main.npc[i].type == 83 || Main.npc[i].type == 84) + num = 20f; + else if (Main.npc[i].type == 150 || Main.npc[i].type == 151 || Main.npc[i].type == 158) + num = 10f; + else if (Main.npc[i].type == 152) + num = 6f; + else if (Main.npc[i].type == 153 || Main.npc[i].type == 154) + num = 4f; + else if (Main.npc[i].type == 165 || Main.npc[i].type == 237 || Main.npc[i].type == 238 || Main.npc[i].type == 240 || Main.npc[i].type == 531) + num = 10f; + else if (Main.npc[i].type == 39 || Main.npc[i].type == 40 || Main.npc[i].type == 41) + num = 26f; + else if (Main.npc[i].type >= 87 && Main.npc[i].type <= 92) + num = 56f; + else if (Main.npc[i].type >= 134 && Main.npc[i].type <= 136) + num = 30f; + else if (Main.npc[i].type == 169) + num = 8f; + else if (Main.npc[i].type == 174) + num = 6f; + else if (Main.npc[i].type == 369) + num = 2f; + else if (Main.npc[i].type == 376) + num = 6f; + else if (Main.npc[i].type == 579) + num = -2f; + if (Main.npc[i].townNPC && (double) Main.npc[i].ai[0] == 5.0) + num -= 4f; + return num * Main.npc[i].scale; + } + + protected void DrawProjectiles() + { + PlayerInput.SetZoom_MouseInWorld(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + int num1 = 0; + int num2 = 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) + { + ++num1; + try + { + int shaderId = 0; + if (Main.projHook[Main.projectile[i].type] && Main.projectile[i].owner != (int) byte.MaxValue) + shaderId = 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]) + shaderId = 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]) + shaderId = Main.player[Main.projectile[i].owner].cLight; + if (Main.projectile[i].type == 623 && Main.projectile[i].owner != (int) byte.MaxValue) + shaderId = Main.player[Main.projectile[i].owner].cPet; + if (shaderId != 0) + { + if (num2 == 0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + GameShaders.Armor.ApplySecondary(shaderId, (Entity) Main.player[Main.projectile[i].owner]); + } + else if (num2 != 0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + num2 = shaderId; + 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) + { + int shaderId = 0; + if (Main.projHook[Main.projectile[i].type] && Main.projectile[i].owner != (int) byte.MaxValue) + shaderId = 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]) + shaderId = 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]) + shaderId = Main.player[Main.projectile[i].owner].cLight; + if (Main.projectile[i].type == 623 && Main.projectile[i].owner != (int) byte.MaxValue) + shaderId = Main.player[Main.projectile[i].owner].cPet; + if (shaderId != 0) + { + if (num2 == 0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + GameShaders.Armor.ApplySecondary(shaderId, (Entity) Main.player[Main.projectile[i].owner]); + } + else if (num2 != 0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + num2 = shaderId; + this.DrawProj(i); + } + } + } + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(20); + } + + protected void DrawPlayers() + { + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + Player drawPlayer = Main.player[index1]; + if (drawPlayer.active && !drawPlayer.outOfRange) + { + SamplerState samplerState = Main.DefaultSamplerState; + if (drawPlayer.mount.Active) + samplerState = Main.MountedSamplerState; + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, samplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + if (Main.gamePaused) + drawPlayer.PlayerFrame(); + if (drawPlayer.ghost) + { + for (int index2 = 0; index2 < 3; ++index2) + this.DrawGhost(drawPlayer, drawPlayer.shadowPos[index2], (float) (0.5 + 0.200000002980232 * (double) index2)); + this.DrawGhost(drawPlayer, drawPlayer.position); + Main.spriteBatch.End(); + } + else + { + if (drawPlayer.inventory[drawPlayer.selectedItem].flame || drawPlayer.head == 137 || drawPlayer.wings == 22) + { + --drawPlayer.itemFlameCount; + if (drawPlayer.itemFlameCount <= 0) + { + drawPlayer.itemFlameCount = 5; + for (int index3 = 0; index3 < 7; ++index3) + { + drawPlayer.itemFlamePos[index3].X = (float) Main.rand.Next(-10, 11) * 0.15f; + drawPlayer.itemFlamePos[index3].Y = (float) Main.rand.Next(-10, 1) * 0.35f; + } + } + } + if (drawPlayer.armorEffectDrawShadowEOCShield) + { + int num = drawPlayer.eocDash / 4; + if (num > 3) + num = 3; + for (int index4 = 0; index4 < num; ++index4) + this.DrawPlayer(drawPlayer, drawPlayer.shadowPos[index4], drawPlayer.shadowRotation[index4], drawPlayer.shadowOrigin[index4], (float) (0.5 + 0.200000002980232 * (double) index4)); + } + Vector2 Position; + if (drawPlayer.invis) + { + drawPlayer.armorEffectDrawOutlines = false; + drawPlayer.armorEffectDrawShadow = false; + drawPlayer.armorEffectDrawShadowSubtle = false; + Position = drawPlayer.position; + if (drawPlayer.aggro <= -750) + { + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 1f); + } + else + { + drawPlayer.invis = false; + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin); + drawPlayer.invis = true; + } + } + if (drawPlayer.armorEffectDrawOutlines) + { + Vector2 position = 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 index5 = 0; index5 < 4; ++index5) + { + float num2; + float num3; + switch (index5) + { + 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; + } + Position = new Vector2(drawPlayer.position.X + num2, drawPlayer.position.Y + drawPlayer.gfxOffY + num3); + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, drawPlayer.ghostFade); + } + } + if (drawPlayer.armorEffectDrawOutlinesForbidden) + { + Vector2 position = 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 index6 = 0; index6 < 4; ++index6) + { + float num5; + float num6; + switch (index6) + { + 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; + } + Position = new Vector2(drawPlayer.position.X + num5, drawPlayer.position.Y + drawPlayer.gfxOffY + num6); + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, drawPlayer.ghostFade); + } + } + if (drawPlayer.armorEffectDrawShadowBasilisk) + { + int num = (int) ((double) drawPlayer.basiliskCharge * 3.0); + for (int index7 = 0; index7 < num; ++index7) + this.DrawPlayer(drawPlayer, drawPlayer.shadowPos[index7], drawPlayer.shadowRotation[index7], drawPlayer.shadowOrigin[index7], (float) (0.5 + 0.200000002980232 * (double) index7)); + } + else if (drawPlayer.armorEffectDrawShadow) + { + for (int index8 = 0; index8 < 3; ++index8) + this.DrawPlayer(drawPlayer, drawPlayer.shadowPos[index8], drawPlayer.shadowRotation[index8], drawPlayer.shadowOrigin[index8], (float) (0.5 + 0.200000002980232 * (double) index8)); + } + if (drawPlayer.armorEffectDrawShadowLokis) + { + for (int index9 = 0; index9 < 3; ++index9) + this.DrawPlayer(drawPlayer, Vector2.Lerp(drawPlayer.shadowPos[index9], drawPlayer.position + new Vector2(0.0f, drawPlayer.gfxOffY), 0.5f), drawPlayer.shadowRotation[index9], drawPlayer.shadowOrigin[index9], MathHelper.Lerp(1f, (float) (0.5 + 0.200000002980232 * (double) index9), 0.5f)); + } + if (drawPlayer.armorEffectDrawShadowSubtle) + { + for (int index10 = 0; index10 < 4; ++index10) + { + Position.X = drawPlayer.position.X + (float) Main.rand.Next(-20, 21) * 0.1f; + Position.Y = drawPlayer.position.Y + (float) Main.rand.Next(-20, 21) * 0.1f + drawPlayer.gfxOffY; + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 0.9f); + } + } + 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 position = drawPlayer.position; + Position.X = drawPlayer.position.X + drawPlayer.shadowDodgeCount; + Position.Y = drawPlayer.position.Y + drawPlayer.gfxOffY; + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, (float) (0.5 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129)); + Position.X = drawPlayer.position.X - drawPlayer.shadowDodgeCount; + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, (float) (0.5 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129)); + } + Position = drawPlayer.position; + Position.Y += drawPlayer.gfxOffY; + if (drawPlayer.stoned) + this.DrawPlayerStoned(drawPlayer, Position); + else if (!drawPlayer.invis) + this.DrawPlayer(drawPlayer, Position, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin); + Main.spriteBatch.End(); + } + } + } + TimeLogger.DetailedDrawTime(21); + } + + private static void DrawPlayers_SetArmorEffectsOld( + Player drawPlayer, + ref bool armorEffectDrawShadow, + ref bool armorEffectDrawShadowSubtle, + ref bool armorEffectDrawOutlines, + ref bool armorEffectDrawShadowLokis, + ref bool armorEffectDrawShadowBasilisk, + ref bool armorEffectDrawOutlinesForbidden, + ref bool armorEffectEOCShield) + { + if (drawPlayer.head == 111 && drawPlayer.body == 73 && drawPlayer.legs == 62) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 134 && drawPlayer.body == 95 && drawPlayer.legs == 79) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 107 && drawPlayer.body == 69 && drawPlayer.legs == 58) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawShadow = true; + } + if (drawPlayer.head == 108 && drawPlayer.body == 70 && drawPlayer.legs == 59) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawShadow = true; + } + if (drawPlayer.head == 109 && drawPlayer.body == 71 && drawPlayer.legs == 60) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawShadow = true; + } + if (drawPlayer.head == 110 && drawPlayer.body == 72 && drawPlayer.legs == 61) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawShadow = true; + } + if (drawPlayer.head == 193 && drawPlayer.body == 194 && drawPlayer.legs == 134) + { + armorEffectDrawShadowSubtle = true; + armorEffectDrawShadowLokis = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 3 && (double) drawPlayer.velocity.Y != 0.0 && !drawPlayer.SlimeDontHyperJump) + 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) + armorEffectDrawShadow = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 14 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.RunSpeed / 2.0) + armorEffectDrawShadowBasilisk = true; + if (drawPlayer.body == 67 && drawPlayer.legs == 56 && drawPlayer.head >= 103 && drawPlayer.head <= 105) + armorEffectDrawShadow = true; + if ((drawPlayer.head == 78 || drawPlayer.head == 79 || drawPlayer.head == 80) && drawPlayer.body == 51 && drawPlayer.legs == 47) + armorEffectDrawShadowSubtle = true; + if (drawPlayer.head == 200 && drawPlayer.body == 198 && drawPlayer.legs == 142) + { + armorEffectDrawShadowLokis = true; + armorEffectDrawOutlinesForbidden = true; + } + if (drawPlayer.head == 171 && drawPlayer.body == 177 && drawPlayer.legs == 112) + { + armorEffectDrawShadow = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 169 && drawPlayer.body == 175 && drawPlayer.legs == 110) + armorEffectDrawShadow = true; + if (drawPlayer.head == 170 && drawPlayer.body == 176 && drawPlayer.legs == 111) + { + armorEffectDrawShadowLokis = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.eocDash > 0) + armorEffectEOCShield = true; + else if (drawPlayer.dashDelay < 0) + armorEffectDrawShadow = true; + if (drawPlayer.head == 5 && drawPlayer.body == 5 && drawPlayer.legs == 5) + armorEffectDrawShadow = true; + if (drawPlayer.head == 74 && drawPlayer.body == 48 && drawPlayer.legs == 44) + armorEffectDrawShadow = true; + if (drawPlayer.head == 76 && drawPlayer.body == 49 && drawPlayer.legs == 45) + armorEffectDrawShadow = true; + if (drawPlayer.head == 7 && drawPlayer.body == 7 && drawPlayer.legs == 7) + armorEffectDrawShadow = true; + if (drawPlayer.head == 22 && drawPlayer.body == 14 && drawPlayer.legs == 14) + 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) + { + armorEffectDrawShadow = true; + armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 189 && drawPlayer.body == 190 && drawPlayer.legs == 130) + armorEffectDrawOutlines = true; + if (drawPlayer.body == 17 && drawPlayer.legs == 16 && (drawPlayer.head == 29 || drawPlayer.head == 30 || drawPlayer.head == 31)) + armorEffectDrawShadow = true; + if (drawPlayer.body == 19 && drawPlayer.legs == 18 && (drawPlayer.head == 35 || drawPlayer.head == 36 || drawPlayer.head == 37)) + armorEffectDrawOutlines = true; + if (drawPlayer.body == 24 && drawPlayer.legs == 23 && (drawPlayer.head == 41 || drawPlayer.head == 42 || drawPlayer.head == 43)) + { + armorEffectDrawOutlines = true; + armorEffectDrawShadow = true; + } + if (drawPlayer.head == 157 && drawPlayer.legs == 98 && drawPlayer.body != 105) + { + int body = drawPlayer.body; + } + if (drawPlayer.body == 36 && drawPlayer.head == 56) + armorEffectDrawOutlines = true; + if (!drawPlayer.stoned && (double) drawPlayer.stealth == 1.0) + return; + armorEffectDrawOutlines = false; + armorEffectDrawShadow = false; + armorEffectDrawShadowSubtle = false; + } + + protected void DrawElderEye( + SpriteBatch spriteBatch, + Vector2 worldPosition, + float opacity, + float scale, + int frameNumber, + Microsoft.Xna.Framework.Color passedColor) + { + Texture2D texture2D = Main.extraTexture[78]; + 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 < 580) + { + if (!Main.npc[iNPCIndex].hide) + { + Main.npc[iNPCIndex].visualOffset *= 0.95f; + NPC npc1 = Main.npc[iNPCIndex]; + npc1.position = npc1.position + Main.npc[iNPCIndex].visualOffset; + 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) Main.chain12Texture.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(Main.chain12Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain12Texture.Width, Main.chain12Texture.Height)), color, rotation, new Vector2((float) Main.chain12Texture.Width * 0.5f, (float) Main.chain12Texture.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; + num10 = Main.npc[NPC.plantBoss].Center.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain26Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain26Texture.Width, height)), color, rotation, new Vector2((float) Main.chain26Texture.Width * 0.5f, (float) Main.chain26Texture.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; + num17 = Main.npc[index].Center.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain27Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain27Texture.Width, height)), color, rotation, new Vector2((float) Main.chain27Texture.Width * 0.5f, (float) Main.chain27Texture.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].visualOffset; + } + } + } + } + } + catch + { + Main.npc[iNPCIndex].active = false; + } + } + } + + protected void DrawNPCCheckAlt(NPC n) + { + if (NPCID.Sets.ExtraTextureCount[n.type] == 0 || !Main.NPCLoaded[n.type]) + return; + Main.npcTexture[n.type] = Main.npcAltTextures[n.type][n.altTexture]; + } + + protected void DrawNPC(int iNPCIndex, bool behindTiles) + { + NPC n = Main.npc[iNPCIndex]; + int type = n.type; + this.LoadNPC(type); + if (n.setFrameSize) + { + n.frame = new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcTexture[type].Width, Main.npcTexture[type].Height / Main.npcFrameCount[type]); + n.setFrameSize = false; + } + if (n.realLife == -1 && n.life >= n.lifeMax && !n.boss) + { + bool flag1 = (double) Lighting.GetColor((int) ((double) n.position.X + (double) n.width * 0.5) / 16, (int) (((double) n.position.Y + (double) n.height * 0.5) / 16.0)).ToVector3().Length() > 0.432500004768372; + bool flag2 = false; + if (LockOnHelper.AimedTarget == n) + flag2 = true; + else if ((double) n.Distance(Main.player[Main.myPlayer].Center) < 400.0 & flag1) + flag2 = true; + if (flag2 && n.lifeMax < 5) + flag2 = false; + if (flag2 && n.aiStyle == 25 && (double) n.ai[0] == 0.0) + flag2 = false; + n.nameOver = !flag2 ? MathHelper.Clamp(n.nameOver - 0.025f, 0.0f, 1f) : MathHelper.Clamp(n.nameOver + 0.025f, 0.0f, 1f); + } + else + n.nameOver = MathHelper.Clamp(n.nameOver - 0.025f, 0.0f, 1f); + if (type == 101) + { + bool flag3 = true; + Vector2 vector2 = new Vector2(n.position.X + (float) (n.width / 2), n.position.Y + (float) (n.height / 2)); + float num1 = (float) ((double) n.ai[0] * 16.0 + 8.0) - vector2.X; + float num2 = (float) ((double) n.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) n.ai[0] * 16.0 + 8.0) - vector2.X; + num2 = (float) ((double) n.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 (!flag3) + { + flag3 = true; + Main.spriteBatch.Draw(Main.chain10Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain10Texture.Width, height)), color, rotation, new Vector2((float) Main.chain10Texture.Width * 0.5f, (float) Main.chain10Texture.Height * 0.5f), scale, SpriteEffects.None, 0.0f); + } + else + { + flag3 = false; + Main.spriteBatch.Draw(Main.chain11Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain10Texture.Width, height)), color, rotation, new Vector2((float) Main.chain10Texture.Width * 0.5f, (float) Main.chain10Texture.Height * 0.5f), scale, SpriteEffects.None, 0.0f); + } + } + } + else if (n.aiStyle == 13) + { + Vector2 vector2 = new Vector2(n.position.X + (float) (n.width / 2), n.position.Y + (float) (n.height / 2)); + float num7 = (float) ((double) n.ai[0] * 16.0 + 8.0) - vector2.X; + float num8 = (float) ((double) n.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) n.ai[0] * 16.0 + 8.0) - vector2.X; + num8 = (float) ((double) n.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 (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: + Main.spriteBatch.Draw(Main.chain5Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain4Texture.Width, height)), color, rotation, new Vector2((float) Main.chain4Texture.Width * 0.5f, (float) Main.chain4Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 175: + Main.spriteBatch.Draw(Main.chain14Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain14Texture.Width, height)), color, rotation, new Vector2((float) Main.chain14Texture.Width * 0.5f, (float) Main.chain14Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 259: + Main.spriteBatch.Draw(Main.chain24Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain24Texture.Width, height)), color, rotation, new Vector2((float) Main.chain24Texture.Width * 0.5f, (float) Main.chain24Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 260: + Main.spriteBatch.Draw(Main.chain25Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain25Texture.Width, height)), color, rotation, new Vector2((float) Main.chain25Texture.Width * 0.5f, (float) Main.chain25Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + default: + Main.spriteBatch.Draw(Main.chain4Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain4Texture.Width, height)), color, rotation, new Vector2((float) Main.chain4Texture.Width * 0.5f, (float) Main.chain4Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + } + } + } + if (type == 327) + { + float rotation = 0.0f; + Vector2 vector2 = new Vector2(n.Center.X, n.Center.Y + 80f); + int num = (int) n.localAI[1]; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.pumpkingCloakTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.pumpkingCloakTexture.Height / 5 * num, Main.pumpkingCloakTexture.Width, Main.pumpkingCloakTexture.Height / 5)), color, rotation, new Vector2((float) Main.pumpkingCloakTexture.Width * 0.5f, (float) ((double) Main.pumpkingCloakTexture.Height * 0.5 / 5.0)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 328) + { + Vector2 vector2 = new Vector2((float) ((double) n.position.X + (double) n.width * 0.5 - 5.0 * (double) n.ai[0]), n.position.Y + 20f); + for (int index = 0; index < 2; ++index) + { + float num14 = Main.npc[(int) n.ai[1]].position.X + (float) (Main.npc[(int) n.ai[1]].width / 2) - vector2.X; + float num15 = (float) ((double) Main.npc[(int) n.ai[1]].position.Y + (double) (Main.npc[(int) n.ai[1]].height / 2) - 30.0) - vector2.Y; + float num16; + float num17; + float num18; + if (index == 0) + { + num16 = num14 - 200f * n.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 * n.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)); + Main.spriteBatch.Draw(Main.pumpkingArmTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.pumpkingArmTexture.Width, Main.pumpkingArmTexture.Height)), color, rotation, new Vector2((float) Main.pumpkingArmTexture.Width * 0.5f, (float) Main.pumpkingArmTexture.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) n.position.X + (double) n.width * 0.5 - 5.0 * (double) n.ai[0]), n.position.Y + 20f); + for (int index1 = 0; index1 < 2; ++index1) + { + float num19 = Main.npc[(int) n.ai[1]].position.X + (float) (Main.npc[(int) n.ai[1]].width / 2) - vector2.X; + float num20 = Main.npc[(int) n.ai[1]].position.Y + (float) (Main.npc[(int) n.ai[1]].height / 2) - vector2.Y; + float num21; + float num22; + float num23; + if (index1 == 0) + { + num21 = num19 - 200f * n.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 * n.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)); + Main.spriteBatch.Draw(Main.boneArmTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.boneArmTexture.Width, Main.boneArmTexture.Height)), color, rotation, new Vector2((float) Main.boneArmTexture.Width * 0.5f, (float) Main.boneArmTexture.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 (n.aiStyle == 47) + { + Vector2 vector2 = new Vector2(n.Center.X, n.Center.Y); + float num24 = Main.npc[NPC.golemBoss].Center.X - vector2.X; + float num25 = Main.npc[NPC.golemBoss].Center.Y - vector2.Y - 7f; + float num26 = type != 247 ? num24 + 66f : num24 - 70f; + 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 / num27; + float num29 = num26 * num28; + float num30 = num25 * num28; + vector2.X += num29; + vector2.Y += num30; + float num31 = Main.npc[NPC.golemBoss].Center.X - vector2.X; + num25 = Main.npc[NPC.golemBoss].Center.Y - vector2.Y - 7f; + num26 = type != 247 ? num31 + 66f : num31 - 70f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain21Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain21Texture.Width, Main.chain21Texture.Height)), color, rotation, new Vector2((float) Main.chain21Texture.Width * 0.5f, (float) Main.chain21Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + if (n.aiStyle >= 33 && n.aiStyle <= 36) + { + Vector2 vector2 = new Vector2((float) ((double) n.position.X + (double) n.width * 0.5 - 5.0 * (double) n.ai[0]), n.position.Y + 20f); + for (int index3 = 0; index3 < 2; ++index3) + { + float num32 = Main.npc[(int) n.ai[1]].position.X + (float) (Main.npc[(int) n.ai[1]].width / 2) - vector2.X; + float num33 = Main.npc[(int) n.ai[1]].position.Y + (float) (Main.npc[(int) n.ai[1]].height / 2) - vector2.Y; + float num34; + float num35; + float num36; + if (index3 == 0) + { + num34 = num32 - 200f * n.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 * n.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)); + Main.spriteBatch.Draw(Main.boneArm2Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.boneArmTexture.Width, Main.boneArmTexture.Height)), color, rotation, new Vector2((float) Main.boneArmTexture.Width * 0.5f, (float) Main.boneArmTexture.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 (n.aiStyle == 20) + { + Vector2 vector2 = new Vector2(n.position.X + (float) (n.width / 2), n.position.Y + (float) (n.height / 2)); + float num37 = n.ai[1] - vector2.X; + float num38 = n.ai[2] - vector2.Y; + float rotation = (float) Math.Atan2((double) num38, (double) num37) - 1.57f; + n.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 = n.ai[1] - vector2.X; + num38 = n.ai[2] - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chainTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chainTexture.Width, height)), color, rotation, new Vector2((float) Main.chainTexture.Width * 0.5f, (float) Main.chainTexture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(Main.spikeBaseTexture, new Vector2(n.ai[1] - Main.screenPosition.X, n.ai[2] - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.spikeBaseTexture.Width, Main.spikeBaseTexture.Height)), Lighting.GetColor((int) n.ai[1] / 16, (int) ((double) n.ai[2] / 16.0)), rotation - 0.75f, new Vector2((float) Main.spikeBaseTexture.Width * 0.5f, (float) Main.spikeBaseTexture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((double) n.position.X + (double) n.width * 0.5) / 16, (int) (((double) n.position.Y + (double) n.height * 0.5) / 16.0)); + if (type >= 277 && type <= 280) + { + if (color1.R < byte.MaxValue) + color1.R = byte.MaxValue; + if (color1.G < (byte) 175) + color1.G = (byte) 175; + } + if (type == -4) + { + int r1 = (int) color1.R; + int g1 = (int) color1.G; + int b1 = (int) color1.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; + color1 = new Microsoft.Xna.Framework.Color(r2, g2, b2); + } + if (behindTiles && type != 113 && type != 114) + { + int num43 = (int) (((double) n.position.X - 8.0) / 16.0); + int num44 = (int) (((double) n.position.X + (double) n.width + 8.0) / 16.0); + int num45 = (int) (((double) n.position.Y - 8.0) / 16.0); + int num46 = (int) (((double) n.position.Y + (double) n.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) + color1 = Microsoft.Xna.Framework.Color.Black; + } + } + } + float R1 = 1f; + float G1 = 1f; + float B = 1f; + float A = 1f; + if (n.poisoned) + { + if (Main.rand.Next(30) == 0) + { + int index = Dust.NewDust(n.position, n.width, n.height, 46, Alpha: 120, Scale: 0.2f); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.9f; + } + R1 *= 0.65f; + B *= 0.75f; + color1 = Main.buffColor(color1, R1, G1, B, A); + } + if (n.venom) + { + if (Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(n.position, n.width, n.height, 171, Alpha: 100, Scale: 0.5f); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + } + G1 *= 0.45f; + R1 *= 0.75f; + color1 = Main.buffColor(color1, R1, G1, B, A); + } + if (n.midas) + { + B *= 0.3f; + R1 *= 0.85f; + color1 = Main.buffColor(color1, R1, G1, B, A); + } + if (n.shadowFlame && Main.rand.Next(5) < 4) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 27, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 180, Scale: 1.95f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.75f; + Main.dust[index].velocity.X *= 0.75f; + --Main.dust[index].velocity.Y; + if (Main.rand.Next(4) == 0) + { + Main.dust[index].noGravity = false; + Main.dust[index].scale *= 0.5f; + } + } + if (n.onFire) + { + if (Main.rand.Next(4) < 3) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 6, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 3.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.8f; + Main.dust[index].velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + Main.dust[index].noGravity = false; + Main.dust[index].scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) n.position.X / 16.0), (int) ((double) n.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + if (n.daybreak) + { + if (Main.rand.Next(4) < 3) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 158, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 3.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 2.8f; + Main.dust[index].velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + Main.dust[index].noGravity = false; + Main.dust[index].scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) n.position.X / 16.0), (int) ((double) n.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + if (n.betsysCurse) + { + R1 *= 0.8f; + G1 *= 0.6f; + color1 = Main.buffColor(color1, R1, G1, B, A); + if (Main.rand.Next(4) < 3) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 55, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 3.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 2.8f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].noGravity = false; + Main.dust[index].scale = 0.9f; + Main.dust[index].color = new Microsoft.Xna.Framework.Color(0, 0, 180, (int) byte.MaxValue); + Main.dust[index].velocity *= 0.2f; + } + Lighting.AddLight((int) ((double) n.position.X / 16.0), (int) ((double) n.position.Y / 16.0 + 1.0), 0.6f, 0.1f, 0.9f); + } + if (n.oiled) + { + R1 *= 0.7f; + G1 *= 0.7f; + B *= 0.7f; + color1 = Main.buffColor(color1, R1, G1, B, A); + if (Main.rand.Next(3) != 0) + { + int Alpha = 175; + Microsoft.Xna.Framework.Color newColor = new Microsoft.Xna.Framework.Color(0, 0, 0, 140); + Vector2 position = n.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(position, n.width + 4, n.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.2f; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].velocity += n.velocity; + } + } + } + if (n.dryadWard && (double) n.velocity.X != 0.0 && Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, (float) ((double) n.position.Y + (double) n.height - 2.0)), n.width + 4, 4, 163, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.0f; + } + if (n.dryadBane && Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y), n.width + 4, n.height, 163, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= new Vector2((float) ((double) Main.rand.NextFloat() * 4.0 - 2.0), 0.0f); + Main.dust[index].noLight = true; + } + if (n.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(n.position + new Vector2((float) Main.rand.Next(n.width + 1), (float) Main.rand.Next(n.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 (n.stinky) + { + R1 *= 0.7f; + B *= 0.55f; + color1 = Main.buffColor(color1, R1, G1, B, A); + if (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; + int index = Dust.NewDust(n.position, n.width, n.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; + } + } + if (n.dripping && Main.rand.Next(4) != 0) + { + Vector2 position = n.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(position, n.width + 4, n.height + 2, 211, Alpha: 50, Scale: 0.8f); + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.2f; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].velocity += n.velocity; + } + else + { + int index = Dust.NewDust(position, n.width + 8, n.height + 8, 211, Alpha: 50, Scale: 1.1f); + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + Main.dust[index].noLight = true; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.2f; + ++Main.dust[index].velocity.Y; + Main.dust[index].velocity += n.velocity; + } + } + if (n.drippingSlime) + { + if (Main.rand.Next(4) != 0) + { + int Alpha = 175; + Microsoft.Xna.Framework.Color newColor = new Microsoft.Xna.Framework.Color(0, 80, (int) byte.MaxValue, 100); + Vector2 position = n.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(position, n.width + 4, n.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index].alpha += 25; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.2f; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].velocity += n.velocity; + } + } + float R2 = R1 * 0.8f; + float G2 = G1 * 0.8f; + color1 = Main.buffColor(color1, R2, G2, B, A); + } + if (n.ichor) + color1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (n.onFrostBurn) + { + if (Main.rand.Next(4) < 3) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 135, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 3.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.8f; + Main.dust[index].velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + Main.dust[index].noGravity = false; + Main.dust[index].scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) n.position.X / 16.0), (int) ((double) n.position.Y / 16.0 + 1.0), 0.1f, 0.6f, 1f); + } + if (n.onFire2) + { + if (Main.rand.Next(4) < 3) + { + int index = Dust.NewDust(new Vector2(n.position.X - 2f, n.position.Y - 2f), n.width + 4, n.height + 4, 75, n.velocity.X * 0.4f, n.velocity.Y * 0.4f, 100, Scale: 3.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.8f; + Main.dust[index].velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + Main.dust[index].noGravity = false; + Main.dust[index].scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) n.position.X / 16.0), (int) ((double) n.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + if (Main.player[Main.myPlayer].detectCreature && n.lifeMax > 1) + { + byte num47; + byte num48; + byte num49; + if (n.friendly || n.catchItem > (short) 0 || n.damage == 0 && n.lifeMax == 5) + { + num47 = (byte) 50; + num48 = byte.MaxValue; + num49 = (byte) 50; + } + else + { + num47 = byte.MaxValue; + num48 = (byte) 50; + num49 = (byte) 50; + } + if ((int) color1.R < (int) num47) + color1.R = num47; + if ((int) color1.G < (int) num48) + color1.G = num48; + if ((int) color1.B < (int) num49) + color1.B = num49; + } + if (type == 50) + { + Vector2 zero = Vector2.Zero; + float num = 0.0f; + zero.Y -= n.velocity.Y; + zero.X -= n.velocity.X * 2f; + float rotation = num + n.velocity.X * 0.05f; + if (n.frame.Y == 120) + zero.Y += 2f; + if (n.frame.Y == 360) + zero.Y -= 2f; + if (n.frame.Y == 480) + zero.Y -= 6f; + Main.spriteBatch.Draw(Main.ninjaTexture, new Vector2(n.position.X - Main.screenPosition.X + (float) (n.width / 2) + zero.X, n.position.Y - Main.screenPosition.Y + (float) (n.height / 2) + zero.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.ninjaTexture.Width, Main.ninjaTexture.Height)), color1, rotation, new Vector2((float) (Main.ninjaTexture.Width / 2), (float) (Main.ninjaTexture.Height / 2)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 71) + { + Vector2 zero = Vector2.Zero; + float num = 0.0f; + zero.Y -= n.velocity.Y * 0.3f; + zero.X -= n.velocity.X * 0.6f; + float rotation = num + n.velocity.X * 0.09f; + if (n.frame.Y == 120) + zero.Y += 2f; + if (n.frame.Y == 360) + zero.Y -= 2f; + if (n.frame.Y == 480) + zero.Y -= 6f; + Main.spriteBatch.Draw(Main.itemTexture[327], new Vector2(n.position.X - Main.screenPosition.X + (float) (n.width / 2) + zero.X, n.position.Y - Main.screenPosition.Y + (float) (n.height / 2) + zero.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[327].Width, Main.itemTexture[327].Height)), color1, rotation, new Vector2((float) (Main.itemTexture[327].Width / 2), (float) (Main.itemTexture[327].Height / 2)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 69) + Main.spriteBatch.Draw(Main.antLionTexture, new Vector2(n.position.X - Main.screenPosition.X + (float) (n.width / 2), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height + 14.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.antLionTexture.Width, Main.antLionTexture.Height)), color1, (float) (-(double) n.rotation * 0.300000011920929), new Vector2((float) (Main.antLionTexture.Width / 2), (float) (Main.antLionTexture.Height / 2)), 1f, SpriteEffects.None, 0.0f); + if (type == 1 && (double) n.ai[1] > 0.0) + { + int index = (int) n.ai[1]; + float scale = 1f; + float num50 = 22f * n.scale; + float num51 = 18f * n.scale; + float width = (float) Main.itemTexture[index].Width; + float height = (float) Main.itemTexture[index].Height; + if ((double) width > (double) num50) + { + scale *= num50 / width; + width *= scale; + height *= scale; + } + if ((double) height > (double) num51) + { + scale *= num51 / height; + float num52 = width * scale; + float num53 = height * scale; + } + float num54 = -1f; + float num55 = 1f; + int num56 = n.frame.Y / (Main.npcTexture[type].Height / Main.npcFrameCount[type]); + float num57 = num55 - (float) num56; + float num58 = num54 + (float) (num56 * 2); + float rotation = 0.2f - 0.3f * (float) num56; + Main.spriteBatch.Draw(Main.itemTexture[index], new Vector2(n.Center.X - Main.screenPosition.X + num58, n.Center.Y - Main.screenPosition.Y + n.gfxOffY + num57), new Microsoft.Xna.Framework.Rectangle?(), color1, rotation, new Vector2((float) (Main.itemTexture[index].Width / 2), (float) (Main.itemTexture[index].Height / 2)), scale, SpriteEffects.None, 0.0f); + } + float addY = 0.0f; + float addHeight = Main.NPCAddHeight(iNPCIndex); + Vector2 vector2_3 = new Vector2((float) (Main.npcTexture[type].Width / 2), (float) (Main.npcTexture[type].Height / Main.npcFrameCount[type] / 2)); + if (type == 108 || type == 124) + { + addY = 2f; + } + else + { + switch (type) + { + case 357: + addY = n.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 509: + addY = -6f; + break; + case 537: + addY = 2f; + break; + default: + if (type == 469 && (double) n.ai[2] == 1.0) + { + addY = 14f; + break; + } + switch (type) + { + case 4: + vector2_3 = new Vector2(55f, 107f); + break; + case 125: + vector2_3 = new Vector2(55f, 107f); + break; + case 126: + vector2_3 = new Vector2(55f, 107f); + break; + default: + if (type == 63 || type == 64 || type == 103) + { + vector2_3.Y += 4f; + break; + } + switch (type) + { + case 69: + vector2_3.Y += 8f; + break; + case 262: + vector2_3.Y = 77f; + addHeight += 26f; + break; + case 264: + vector2_3.Y = 21f; + addHeight += 2f; + break; + case 266: + addHeight += 50f; + break; + case 268: + addHeight += 16f; + break; + case 288: + addHeight += 6f; + break; + } + break; + } + break; + } + } + if (n.aiStyle == 10 || type == 72) + color1 = Microsoft.Xna.Framework.Color.White; + SpriteEffects spriteEffects = SpriteEffects.None; + if (n.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + if (type == 124 && (double) n.localAI[0] == 0.0) + { + int num = 0; + if (n.frame.Y > 56) + num += 4; + int index = num + n.frame.Y / 56; + if (index >= Main.OffsetsPlayerHeadgear.Length) + index = 0; + float y = Main.OffsetsPlayerHeadgear[index].Y; + this.LoadProjectile(582); + Texture2D texture2D = Main.projectileTexture[582]; + Vector2 position = n.Center - Main.screenPosition - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * n.scale / 2f + new Vector2(0.0f, addY + addHeight + n.gfxOffY + y) + new Vector2((float) (-n.spriteDirection * 2), -2f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), n.GetAlpha(color1), n.rotation, texture2D.Size() * new Vector2(0.0f, 0.5f), n.scale, spriteEffects, 0.0f); + } + if (type == 427 || type == 426 || type == 428 || type == 509 || 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) + { + Texture2D texture = Main.npcTexture[type]; + Microsoft.Xna.Framework.Color secondColor = Microsoft.Xna.Framework.Color.White; + float amount1 = 0.0f; + float amount2 = 0.0f; + int num59 = 0; + int num60 = 0; + int num61 = 1; + int num62 = 15; + int num63 = 0; + float scale1 = n.scale; + float num64 = n.scale; + int num65 = 0; + float num66 = 0.0f; + float num67 = 0.0f; + float num68 = 0.0f; + Microsoft.Xna.Framework.Color newColor1 = color1; + switch (type) + { + case 426: + num65 = 4; + num67 = 4f; + num66 = (float) (Math.Cos((double) Main.GlobalTime % 1.20000004768372 / 1.20000004768372 * 6.28318548202515) / 2.0 + 0.5); + secondColor = Microsoft.Xna.Framework.Color.Turquoise; + amount1 = 0.5f; + num59 = 6; + num60 = 2; + num62 = num59; + break; + case 427: + num59 = 8; + num60 = 2; + num62 = num59 * 3; + break; + case 509: + num59 = 6; + num60 = 2; + num62 = num59 * 3; + break; + case 521: + num59 = 10; + num60 = 2; + num62 = num59; + num63 = 1; + num64 = 0.3f; + break; + case 523: + num65 = 3; + num67 = 10f * n.scale; + amount1 = 0.5f; + amount2 = 0.8f; + secondColor = Microsoft.Xna.Framework.Color.HotPink; + secondColor.A = (byte) 128; + num68 = n.localAI[0]; + num66 = n.localAI[1]; + break; + case 541: + num65 = 4; + num67 = 6f; + num66 = (float) (Math.Cos((double) Main.GlobalTime % 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: + num59 = 6; + num60 = 3; + num62 = num59 * 2; + break; + case 546: + num59 = 8; + num60 = 2; + num62 = num59 * 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: + num59 = 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; + num65 = 4; + num67 = 4f; + num66 = (float) (Math.Cos((double) Main.GlobalTime % 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) n.localAI[3] < 60.0) + { + float num69 = n.localAI[3] / 60f; + num65 = 3; + num66 = (float) (1.0 - (double) num69 * (double) num69); + num67 = 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, num69 * num69); + break; + } + break; + case 558: + case 559: + case 560: + case 574: + case 575: + if ((double) n.ai[0] != 2.0) + { + num59 = 0; + break; + } + num59 = 6; + num60 = 2; + num62 = num59 * 3; + num63 = 1; + break; + case 566: + case 567: + case 578: + num59 = 0; + addHeight = -2f; + break; + } + for (int index = num61; index < num59; index += num60) + { + ref Vector2 local = ref n.oldPos[index]; + Microsoft.Xna.Framework.Color newColor2 = Microsoft.Xna.Framework.Color.Lerp(newColor1, secondColor, amount1); + Microsoft.Xna.Framework.Color color2 = n.GetAlpha(newColor2) * ((float) (num59 - index) / (float) num62); + double rotation = (double) n.rotation; + if (num63 == 1) + { + double num70 = (double) n.oldRot[index]; + } + float scale2 = MathHelper.Lerp(scale1, num64, (float) (1.0 - (double) (num59 - index) / (double) num62)); + Vector2 position = n.oldPos[index] + new Vector2((float) n.width, (float) n.height) / 2f - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(n.frame), color2, n.rotation, vector2_3, scale2, spriteEffects, 0.0f); + } + for (int index = 0; index < num65; ++index) + { + Microsoft.Xna.Framework.Color newColor3 = Microsoft.Xna.Framework.Color.Lerp(color1, secondColor, amount1); + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Lerp(n.GetAlpha(newColor3), secondColor, amount2) * (1f - num66); + Vector2 position = n.Center + ((float) ((double) index / (double) num65 * 6.28318548202515) + n.rotation + num68).ToRotationVector2() * num67 * num66 - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(n.frame), color3, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Vector2 position1 = n.Center - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture, position1, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(newColor1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if (type == 427) + Main.spriteBatch.Draw(Main.glowMaskTexture[152], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + else if (type == 426) + Main.spriteBatch.Draw(Main.glowMaskTexture[153], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if (type == 541) + { + Microsoft.Xna.Framework.Color color4 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - n.alpha, (int) sbyte.MaxValue - n.alpha, (int) sbyte.MaxValue - n.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold); + for (int index = 0; index < num65; ++index) + { + Microsoft.Xna.Framework.Color newColor4 = color4; + Microsoft.Xna.Framework.Color color5 = n.GetAlpha(newColor4) * (1f - num66); + Vector2 position2 = n.Center + ((float) ((double) index / (double) num65 * 6.28318548202515) + n.rotation + num68).ToRotationVector2() * (float) (4.0 * (double) num66 + 2.0) - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(Main.glowMaskTexture[216], position2, new Microsoft.Xna.Framework.Rectangle?(n.frame), color5, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Main.spriteBatch.Draw(Main.glowMaskTexture[216], position1, new Microsoft.Xna.Framework.Rectangle?(n.frame), color4, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + if ((type == 568 || type == 569) && (double) n.localAI[3] >= 60.0) + { + Microsoft.Xna.Framework.Color color6 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - n.alpha, (int) sbyte.MaxValue - n.alpha, (int) sbyte.MaxValue - n.alpha, 0).MultiplyRGBA(secondColor); + for (int index = 0; index < num65; ++index) + { + Microsoft.Xna.Framework.Color newColor5 = color6; + Microsoft.Xna.Framework.Color color7 = n.GetAlpha(newColor5) * (1f - num66); + Vector2 position3 = n.Center + ((float) ((double) index / (double) num65 * 6.28318548202515) + n.rotation + num68).ToRotationVector2() * (float) (4.0 * (double) num66 + 2.0) - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(Main.glowMaskTexture[224], position3, new Microsoft.Xna.Framework.Rectangle?(n.frame), color7, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Main.spriteBatch.Draw(Main.glowMaskTexture[224], position1, new Microsoft.Xna.Framework.Rectangle?(n.frame), color6, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float t = n.localAI[0]; + if ((double) t > 0.0) + { + Microsoft.Xna.Framework.Color color8 = new Microsoft.Xna.Framework.Color(180, 90, (int) byte.MaxValue, (int) (byte) ((Math.Cos((double) t * 6.28318548202515 / 60.0) * 0.5 + 0.5) * 32.0 + 0.0)) * 0.75f; + float num71 = 1f; + if ((double) t < 60.0) + { + float num72 = Utils.InverseLerp(0.0f, 60f, t); + color8 *= num72; + num71 = MathHelper.Lerp(1f, 0.5f, (float) (1.0 - (double) num72 * (double) num72)); + } + Texture2D texture2D = Main.extraTexture[89]; + Vector2 origin = texture2D.Size() / 2f; + Vector2 scale3 = new Vector2(num71); + float num73 = t * ((float) Math.PI / 750f); + float num74 = 1.570796f; + scale3.Y *= 1f; + scale3.X *= 1f; + for (float num75 = 0.0f; (double) num75 < 16.0; ++num75) + { + float f = num73 + (float) (6.28318548202515 * ((double) num75 / 16.0)); + Vector2 position4 = n.Center - Main.screenPosition + f.ToRotationVector2() * 400f * num71; + Main.spriteBatch.Draw(texture2D, position4, new Microsoft.Xna.Framework.Rectangle?(), color8, f + 1.570796f + num74, origin, scale3, SpriteEffects.None, 0.0f); + } + } + } + if (type == 546) + Main.spriteBatch.Draw(Main.extraTexture[76], position1, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200), MathHelper.Clamp(n.velocity.X * 0.1f, -0.3926991f, 0.3926991f), vector2_3, n.scale, spriteEffects, 0.0f); + if (type != 566 && type != 567 || (double) n.localAI[3] < 115.0) + return; + int frameY = (int) ((double) Main.GlobalTime % 0.5 / 0.5 * 4.0); + Texture2D texture2D1 = Main.extraTexture[80]; + Microsoft.Xna.Framework.Rectangle r = texture2D1.Frame(verticalFrames: 4, frameY: frameY); + Vector2 vector2_4 = new Vector2((float) (n.spriteDirection * 8), -26f) * n.scale; + int num76 = n.frame.Y / n.frame.Height; + int num77 = 0; + switch (num76) + { + case 0: + num77 = 6; + break; + case 1: + num77 = 4; + break; + case 2: + num77 = 2; + break; + case 3: + num77 = 6; + break; + case 4: + num77 = 8; + break; + case 5: + num77 = 6; + break; + case 6: + num77 = 4; + break; + case 7: + num77 = 6; + break; + case 8: + num77 = 2; + break; + } + Microsoft.Xna.Framework.Color color9 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 130); + vector2_4.Y += (float) num77; + Main.spriteBatch.Draw(texture2D1, position1 + vector2_4 * n.scale, new Microsoft.Xna.Framework.Rectangle?(r), color9, MathHelper.Clamp(n.velocity.X * 0.1f, -0.3926991f, 0.3926991f), r.Size() / 2f, n.scale * 0.7f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + else if (type == 551) + { + Texture2D texture = Main.npcTexture[type]; + Vector2 position5 = n.Center - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle frame = n.frame; + Vector2 vector2_5 = frame.Size() / 2f; + SpriteEffects effects = spriteEffects ^ SpriteEffects.FlipHorizontally; + float rotation1 = n.rotation; + Microsoft.Xna.Framework.Color color10 = color1; + Microsoft.Xna.Framework.Color color11 = Microsoft.Xna.Framework.Color.Lerp(color10, Microsoft.Xna.Framework.Color.White, 0.6f); + color11.A = (byte) 66; + Vector2 vector2_6 = new Vector2(171f, 44f); + Vector2 vector2_7 = new Vector2(230f, 52f); + Vector2 origin1 = Vector2.Lerp(vector2_6, vector2_7, 0.5f) + new Vector2(-50f, 30f); + int num78 = (int) n.localAI[0] / 4; + Vector2 spinningpoint1 = vector2_6 - origin1; + Vector2 spinningpoint2 = vector2_7 - origin1; + Texture2D texture2D2 = Main.extraTexture[82]; + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + spinningpoint2.X *= -1f; + Microsoft.Xna.Framework.Rectangle rectangle1 = texture2D2.Frame(2, 5, num78 / 5, num78 % 5); + Vector2 origin2 = new Vector2(16f, 176f); + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin2.X = (float) rectangle1.Width - origin2.X; + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin1.X = (float) frame.Width - origin1.X; + Texture2D texture2D3 = Main.extraTexture[81]; + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + spinningpoint1.X *= -1f; + Microsoft.Xna.Framework.Rectangle rectangle2 = texture2D3.Frame(2, 5, num78 / 5, num78 % 5); + Vector2 origin3 = new Vector2(215f, 170f); + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin3.X = (float) rectangle2.Width - origin3.X; + if ((double) Utils.InverseLerp(0.0f, 30f, n.localAI[1], true) == 1.0) + Utils.InverseLerp(60f, 30f, n.localAI[1], true); + float num79 = 2f; + Vector2 vector2_8 = n.Size / 2f - Main.screenPosition; + int num80 = -3; + int num81 = 0; + byte num82 = 2; + for (int index = 9; index > num81; index += num80) + { + Vector2 position6 = n.oldPos[index] + vector2_8; + float rotation2 = n.oldRot[index]; + Microsoft.Xna.Framework.Color color12 = color10 * (float) (1.0 - (double) index / 10.0) * 0.35f; + color12.A /= num82; + Main.spriteBatch.Draw(texture2D2, position6 + spinningpoint2.RotatedBy((double) rotation2), new Microsoft.Xna.Framework.Rectangle?(rectangle1), color12, rotation2, origin2, 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture, position6, new Microsoft.Xna.Framework.Rectangle?(frame), color12, rotation2, origin1, 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture2D3, position6 + spinningpoint1.RotatedBy((double) rotation2), new Microsoft.Xna.Framework.Rectangle?(rectangle2), color12, rotation2, origin3, 1f, effects, 0.0f); + } + Main.spriteBatch.Draw(texture2D2, position5 + spinningpoint2.RotatedBy((double) rotation1), new Microsoft.Xna.Framework.Rectangle?(rectangle1), color10, rotation1, origin2, 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture, position5, new Microsoft.Xna.Framework.Rectangle?(frame), color10, rotation1, origin1, 1f, effects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[226], position5, new Microsoft.Xna.Framework.Rectangle?(frame), color11 * (float) (0.699999988079071 + 0.300000011920929 * (double) num79), rotation1, origin1, 1f, effects, 0.0f); + Main.spriteBatch.Draw(texture2D3, position5 + spinningpoint1.RotatedBy((double) rotation1), new Microsoft.Xna.Framework.Rectangle?(rectangle2), color10, rotation1, origin3, 1f, effects, 0.0f); + } + else if (type == 576 || type == 577) + { + Texture2D texture2D = Main.npcTexture[type]; + Vector2 position7 = n.Bottom - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(5, 10, n.frame.Y / 10, n.frame.Y % 10); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + origin.Y -= 4f; + int num83 = 94; + origin.X = n.spriteDirection != 1 ? (float) (r.Width - num83) : (float) num83; + Microsoft.Xna.Framework.Color color13 = Microsoft.Xna.Framework.Color.White; + float amount3 = 0.0f; + float amount4 = 0.0f; + int num84 = 0; + float num85 = 0.0f; + Microsoft.Xna.Framework.Color newColor6 = color1; + if ((double) n.localAI[3] < 60.0) + { + float num86 = n.localAI[3] / 60f; + num84 = 3; + num85 = (float) (1.0 - (double) num86 * (double) num86); + color13 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 0, (int) byte.MaxValue, 0); + amount4 = 1f; + newColor6 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, newColor6, num86 * num86); + } + for (int index = 0; index < num84; ++index) + { + Microsoft.Xna.Framework.Color newColor7 = Microsoft.Xna.Framework.Color.Lerp(color1, color13, amount3); + Microsoft.Xna.Framework.Color color14 = Microsoft.Xna.Framework.Color.Lerp(n.GetAlpha(newColor7), color13, amount4) * (1f - num85); + Vector2 position8 = position7 - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture2D, position8, new Microsoft.Xna.Framework.Rectangle?(r), color14, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Main.spriteBatch.Draw(texture2D, position7, new Microsoft.Xna.Framework.Rectangle?(r), n.GetAlpha(newColor6), n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + else if (type == 564 || type == 565) + { + Texture2D texture2D = Main.npcTexture[type]; + Vector2 position9 = n.Bottom - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(5, 9, n.frame.Y / 9, n.frame.Y % 9); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + origin.Y -= 10f; + int num87 = 52; + origin.X = n.spriteDirection != 1 ? (float) (r.Width - num87) : (float) num87; + Microsoft.Xna.Framework.Color color15 = Microsoft.Xna.Framework.Color.White; + float amount5 = 0.0f; + float amount6 = 0.0f; + int num88 = 0; + float num89 = 0.0f; + float num90 = 0.0f; + Microsoft.Xna.Framework.Color newColor8 = color1; + if ((double) n.localAI[3] < 60.0) + { + float num91 = n.localAI[3] / 60f; + num88 = 3; + num89 = (float) (1.0 - (double) num91 * (double) num91); + num90 = 8f; + color15 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 0, (int) byte.MaxValue, 0); + amount6 = 1f; + newColor8 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, newColor8, num91 * num91); + } + for (int index = 0; index < num88; ++index) + { + Microsoft.Xna.Framework.Color newColor9 = Microsoft.Xna.Framework.Color.Lerp(color1, color15, amount5); + Microsoft.Xna.Framework.Color color16 = Microsoft.Xna.Framework.Color.Lerp(n.GetAlpha(newColor9), color15, amount6) * (1f - num89); + Vector2 position10 = position9 - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num88 * 6.28318548202515)).ToRotationVector2() * num90 * num89; + Main.spriteBatch.Draw(texture2D, position10, new Microsoft.Xna.Framework.Rectangle?(r), color16, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Microsoft.Xna.Framework.Color alpha = n.GetAlpha(newColor8); + int num92 = 4; + float num93 = 4f; + float num94 = (float) (0.625 + Math.Sin((double) Main.GlobalTime * 6.28318548202515 * 0.75 + 3.14159274101257) * 0.125); + for (int index = 0; index < num92; ++index) + { + Microsoft.Xna.Framework.Color color17 = alpha * (1f - num94); + Vector2 position11 = position9 - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num92 * 6.28318548202515)).ToRotationVector2() * num93 * num94; + Main.spriteBatch.Draw(texture2D, position11, new Microsoft.Xna.Framework.Rectangle?(r), color17, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Main.spriteBatch.Draw(texture2D, position9, new Microsoft.Xna.Framework.Rectangle?(r), alpha, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + if ((double) n.Opacity <= 0.0) + return; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A /= (byte) 2; + Microsoft.Xna.Framework.Color color18 = white * n.Opacity; + Main.spriteBatch.Draw(Main.glowMaskTexture[225], position9, new Microsoft.Xna.Framework.Rectangle?(r), color18, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + int num95 = 4; + float num96 = 4f; + float num97 = (float) (0.5 + Math.Sin((double) Main.GlobalTime * 6.28318548202515 * 0.75) * 0.5); + for (int index = 0; index < num95; ++index) + { + Microsoft.Xna.Framework.Color color19 = color18 * 0.35f * (1f - num97); + Vector2 position12 = position9 - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num95 * 6.28318548202515)).ToRotationVector2() * num96 * num97; + Main.spriteBatch.Draw(Main.glowMaskTexture[225], position12, new Microsoft.Xna.Framework.Rectangle?(r), color19, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + } + else if (type == 548) + { + Texture2D texture2D4 = Main.npcTexture[type]; + Vector2 position13 = n.Bottom - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r3 = texture2D4.Frame(); + Vector2 origin = r3.Size() / 2f; + origin.Y += 30f; + origin.Y += 8f; + --origin.X; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + float amount7 = 0.0f; + float amount8 = 0.0f; + int num98 = 0; + float num99 = 0.0f; + float num100 = 0.0f; + Microsoft.Xna.Framework.Color newColor10 = color1; + for (int index = 0; index < num98; ++index) + { + Microsoft.Xna.Framework.Color newColor11 = Microsoft.Xna.Framework.Color.Lerp(color1, white, amount7); + Microsoft.Xna.Framework.Color color20 = Microsoft.Xna.Framework.Color.Lerp(n.GetAlpha(newColor11), white, amount8) * (1f - num99); + Vector2 position14 = position13 - new Vector2((float) texture2D4.Width, (float) (texture2D4.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num98 * 6.28318548202515)).ToRotationVector2() * num100 * num99; + Main.spriteBatch.Draw(texture2D4, position14, new Microsoft.Xna.Framework.Rectangle?(r3), color20, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Microsoft.Xna.Framework.Color alpha = n.GetAlpha(newColor10); + int num101 = 4; + float num102 = 4f; + float num103 = (float) (0.625 + Math.Sin((double) Main.GlobalTime * 6.28318548202515 * 0.75 + 3.14159274101257) * 0.125); + for (int index = 0; index < num101; ++index) + { + Microsoft.Xna.Framework.Color color21 = alpha; + color21.A = (byte) 0; + color21 *= 1f - num103; + Vector2 position15 = position13 - new Vector2((float) texture2D4.Width, (float) (texture2D4.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num101 * 6.28318548202515)).ToRotationVector2() * num102 * num103; + Main.spriteBatch.Draw(texture2D4, position15, new Microsoft.Xna.Framework.Rectangle?(r3), color21, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Main.spriteBatch.Draw(texture2D4, position13, new Microsoft.Xna.Framework.Rectangle?(r3), alpha, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + if ((double) n.ai[1] == 2.0) + { + float num104 = Math.Min(1f, n.ai[0] / 120f); + Main.spriteBatch.Draw(texture2D4, position13, new Microsoft.Xna.Framework.Rectangle?(r3), new Microsoft.Xna.Framework.Color(1f, 1f, 1f, 0.0f) * num104, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float progress = MathHelper.Clamp(n.ai[0] / 450f, 0.0f, 1f); + if (!Filters.Scene["CrystalWin"].IsActive()) + Filters.Scene.Activate("CrystalWin", n.Center); + else + Filters.Scene["CrystalWin"].GetShader().UseProgress(progress); + Filters.Scene["CrystalWin"].GetShader().UseTargetPosition(n.Center); + } + int num105 = 4; + float num106 = 4f; + float num107 = (float) (0.625 + Math.Sin((double) Main.GlobalTime * 6.28318548202515 * 0.75) * 0.125); + for (int index = 0; index < num105; ++index) + { + Microsoft.Xna.Framework.Color color22 = alpha; + color22.A = (byte) 0; + color22 *= 0.3f; + color22 *= 1f - num107; + Vector2 position16 = position13 - new Vector2((float) texture2D4.Width, (float) (texture2D4.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)) + ((float) ((double) index / (double) num105 * 6.28318548202515)).ToRotationVector2() * num106 * num107; + Main.spriteBatch.Draw(texture2D4, position16, new Microsoft.Xna.Framework.Rectangle?(r3), color22, n.rotation, origin, n.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + if (n.alpha >= (int) byte.MaxValue) + return; + float num108 = (float) ((double) Main.GlobalTime % 3.0 / 3.0); + float num109 = num108; + if ((double) num109 > 0.5) + num109 = 1f - num108; + if ((double) num109 < 0.0) + num109 = 0.0f; + float num110 = (float) (((double) num108 + 0.5) % 1.0); + float num111 = num110; + if ((double) num111 > 0.5) + num111 = 1f - num110; + if ((double) num111 < 0.0) + num111 = 0.0f; + Texture2D texture2D5 = Main.glowMaskTexture[239]; + Microsoft.Xna.Framework.Rectangle r4 = texture2D5.Frame(); + origin = r4.Size() / 2f; + Vector2 position17 = position13 + new Vector2(0.0f, -40f); + Microsoft.Xna.Framework.Color color23 = new Microsoft.Xna.Framework.Color(140, 50, (int) byte.MaxValue, 0) * 0.6f; + Main.spriteBatch.Draw(texture2D5, position17, new Microsoft.Xna.Framework.Rectangle?(r4), color23, n.rotation, origin, n.scale * 0.75f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float num112 = 1f + num108 * 0.75f; + Main.spriteBatch.Draw(texture2D5, position17, new Microsoft.Xna.Framework.Rectangle?(r4), color23 * num109, n.rotation, origin, n.scale * 0.75f * num112, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float num113 = 1f + num110 * 0.75f; + Main.spriteBatch.Draw(texture2D5, position17, new Microsoft.Xna.Framework.Rectangle?(r4), color23 * num111, n.rotation, origin, n.scale * 0.75f * num113, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + Texture2D texture2D6 = Main.extraTexture[89]; + Microsoft.Xna.Framework.Rectangle r5 = texture2D6.Frame(); + origin = r5.Size() / 2f; + Vector2 scale = new Vector2(0.75f, 1f + num113) * 1.5f; + float num114 = 1f + num110 * 0.75f; + if (n.dontTakeDamageFromHostiles) + scale.Y *= 0.6f; + position17.Y -= 6f; + Main.spriteBatch.Draw(texture2D6, position17, new Microsoft.Xna.Framework.Rectangle?(r5), color23 * num111, n.rotation + 1.570796f, origin, scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(texture2D6, position17, new Microsoft.Xna.Framework.Rectangle?(r5), Microsoft.Xna.Framework.Color.Lerp(color23, Microsoft.Xna.Framework.Color.White, 0.5f), n.rotation + 1.570796f, origin, 1.5f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + else if (type == 371 || type >= 454 && type <= 459) + { + Texture2D texture = Main.npcTexture[type]; + Vector2 position = n.Center - Main.screenPosition - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + else if (type == 549) + { + Texture2D texture = Main.npcTexture[type]; + Vector2 position = n.Center - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle frame = n.frame; + Vector2 origin = new Vector2(70f, (float) sbyte.MaxValue); + origin.Y += 8f; + Vector2 scale4 = new Vector2(n.scale); + float t1 = n.localAI[0]; + if ((double) t1 < 120.0) + scale4 *= (float) ((double) t1 / 240.0 + 0.5); + Microsoft.Xna.Framework.Color alpha = n.GetAlpha(color1); + float amount9 = Utils.InverseLerp(0.0f, 120f, t1, true); + float num115 = MathHelper.Lerp(32f, 0.0f, amount9); + Microsoft.Xna.Framework.Color color24 = alpha; + color24.A = (byte) MathHelper.Lerp((float) color24.A, 0.0f, amount9); + Microsoft.Xna.Framework.Color color25 = color24 * amount9; + if ((double) t1 >= 120.0) + color25 = alpha; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(frame), color25, n.rotation, origin, scale4, spriteEffects, 0.0f); + float y = ((float) ((((double) n.ai[0] + 54.0) % 180.0 - 120.0) / 180.0 * 2.0 * 6.28318548202515)).ToRotationVector2().Y; + if ((double) t1 >= 120.0) + { + num115 = y * 0.0f; + color25.A = (byte) ((double) color25.A * 0.5); + color25 *= (float) ((double) y / 2.0 + 0.5); + float num116 = 1f; + for (float num117 = 0.0f; (double) num117 < (double) num116; ++num117) + Main.spriteBatch.Draw(texture, position + (6.283185f / num116 * num117).ToRotationVector2() * num115, new Microsoft.Xna.Framework.Rectangle?(frame), color25, n.rotation, origin, scale4, spriteEffects, 0.0f); + } + float t2 = (float) ((double) n.ai[0] / 180.0 - 0.759999990463257); + if ((double) t2 < 0.0) + ++t2; + float amount10 = 0.0f; + float scale5 = 0.0f; + float from1 = 0.6f; + float to1 = 0.8f; + if ((double) t2 >= (double) from1 && (double) t2 <= (double) to1) + { + amount10 = Utils.InverseLerp(from1, to1, t2); + scale5 = MathHelper.Lerp(0.75f, 0.85f, amount10); + } + float from2 = to1; + float to2 = from2 + 0.13f; + if ((double) t2 >= (double) from2 && (double) t2 <= (double) to2) + { + amount10 = 1f - Utils.InverseLerp(from2, to2, t2); + scale5 = MathHelper.Lerp(1.3f, 0.85f, amount10); + } + Vector2 vector2_9 = new Vector2(0.0f, -150f); + int frameNumber = frame.Y / frame.Height; + float num118 = MathHelper.Clamp((float) (((double) t1 - 100.0) / 40.0), 0.0f, 1f); + this.DrawElderEye(Main.spriteBatch, n.Center + vector2_9, 0.75f * num118, 0.75f, frameNumber, Microsoft.Xna.Framework.Color.White); + this.DrawElderEye(Main.spriteBatch, n.Center + vector2_9, 0.75f * num118, 0.75f, frameNumber, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * (float) ((double) y / 2.0 + 0.5)); + if ((double) amount10 > 0.0 && (double) scale5 > 0.0) + this.DrawElderEye(Main.spriteBatch, n.Center + vector2_9, amount10 * 0.5f, scale5, frameNumber, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue)); + if ((double) t1 >= 120.0) + return; + float num119 = (float) (6.28318548202515 * (double) amount9 * Math.Pow((double) amount9, 2.0) * 2.0) + amount9; + color25.A = (byte) ((double) alpha.A * Math.Pow((double) amount9, 2.0) * 0.5); + float num120 = 3f; + for (float num121 = 0.0f; (double) num121 < (double) num120; ++num121) + Main.spriteBatch.Draw(texture, position + (num119 + 6.283185f / num120 * num121).ToRotationVector2() * num115, new Microsoft.Xna.Framework.Rectangle?(frame), color25, n.rotation, origin, scale4, spriteEffects, 0.0f); + } + else if (type == 493 || type == 507 || type == 422 || type == 517) + { + Texture2D texture1 = Main.npcTexture[type]; + Vector2 vector2_10 = n.Center - Main.screenPosition; + Vector2 vector2_11 = vector2_10 - new Vector2(300f, 310f); + Vector2 position = vector2_10 - new Vector2((float) texture1.Width, (float) (texture1.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture1, position, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + switch (type) + { + case 422: + Texture2D texture2 = Main.glowMaskTexture[149]; + float num122 = (float) (4.0 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 4.0); + for (int index = 0; index < 4; ++index) + Main.spriteBatch.Draw(texture2, position + n.velocity.RotatedBy((double) index * 1.57079637050629) * num122, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * n.Opacity, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 493: + Texture2D texture3 = Main.glowMaskTexture[132]; + float num123 = (float) (4.0 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 4.0); + for (int index = 0; index < 4; ++index) + Main.spriteBatch.Draw(texture3, position + n.velocity.RotatedBy((double) index * 1.57079637050629) * num123, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * n.Opacity, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 507: + Texture2D texture4 = Main.glowMaskTexture[143]; + float num124 = (float) (4.0 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 4.0); + for (int index = 0; index < 4; ++index) + Main.spriteBatch.Draw(texture4, position + n.velocity.RotatedBy((double) index * 1.57079637050629) * num124, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * n.Opacity, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 517: + Texture2D texture5 = Main.glowMaskTexture[162]; + float num125 = (float) (2.0 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 9.0); + for (int index = 0; index < 4; ++index) + Main.spriteBatch.Draw(texture5, position + n.velocity.RotatedBy((double) index * 1.57079637050629) * num125 + Vector2.UnitX * 2f, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * n.Opacity, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + int num126 = 0; + string key = ""; + if (type <= 493) + { + if (type != 422) + { + if (type == 493) + { + num126 = NPC.ShieldStrengthTowerStardust; + key = "Stardust"; + } + } + else + { + num126 = NPC.ShieldStrengthTowerVortex; + key = "Vortex"; + } + } + else if (type != 507) + { + if (type == 517) + { + num126 = NPC.ShieldStrengthTowerSolar; + key = "Solar"; + } + } + else + { + num126 = NPC.ShieldStrengthTowerNebula; + key = "Nebula"; + } + float num127 = (float) num126 / (float) NPC.ShieldStrengthTowerMax; + if (num126 > 0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + float num128 = 0.0f; + if ((double) n.ai[3] > 0.0 && (double) n.ai[3] <= 30.0) + num128 = (float) (1.0 - (double) n.ai[3] / 30.0); + Filters.Scene[key].GetShader().UseIntensity(1f + num128).UseProgress(0.0f); + DrawData drawData = new DrawData(TextureManager.Load("Images/Misc/Perlin"), vector2_11 + 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) num127 * 0.800000011920929 + 0.200000002980232), n.rotation, new Vector2(300f, 300f), n.scale * (float) (1.0 + (double) num128 * 0.0500000007450581), spriteEffects, 0); + GameShaders.Misc["ForceField"].UseColor(new Vector3((float) (1.0 + (double) num128 * 0.5))); + GameShaders.Misc["ForceField"].Apply(new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + else if ((double) n.ai[3] > 0.0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + float progress = n.ai[3] / 120f; + float num129 = Math.Min(n.ai[3] / 30f, 1f); + Filters.Scene[key].GetShader().UseIntensity(Math.Min(5f, 15f * progress) + 1f).UseProgress(progress); + DrawData drawData = new DrawData(TextureManager.Load("Images/Misc/Perlin"), vector2_11 + 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) num129))), n.rotation, new Vector2(300f, 300f), n.scale * (1f + num129), spriteEffects, 0); + GameShaders.Misc["ForceField"].UseColor(new Vector3(2f)); + GameShaders.Misc["ForceField"].Apply(new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + } + else + Filters.Scene[key].GetShader().UseIntensity(0.0f).UseProgress(0.0f); + } + else + { + switch (type) + { + case 402: + this.LoadNPC(403); + this.LoadNPC(404); + NPC npc1 = n; + Texture2D texture2D7 = Main.npcTexture[npc1.type]; + Vector2 position18 = npc1.Center - Main.screenPosition - new Vector2((float) texture2D7.Width, (float) (texture2D7.Height / Main.npcFrameCount[npc1.type])) * npc1.scale / 2f + (vector2_3 * npc1.scale + new Vector2(0.0f, addY + addHeight + npc1.gfxOffY)); + int num130 = 0; + float num131 = (float) (2.0 / (double) npc1.oldPos.Length * 0.699999988079071); + for (int index = npc1.oldPos.Length - 1; (double) index >= 1.0; index -= 2) + { + Texture2D texture6 = num130 != 0 ? Main.npcTexture[403] : Main.npcTexture[404]; + Main.spriteBatch.Draw(texture6, position18 + npc1.oldPos[index] - npc1.position, new Microsoft.Xna.Framework.Rectangle?(), npc1.GetAlpha(color1) * (float) (0.800000011920929 - (double) num131 * (double) index / 2.0), npc1.oldRot[index], vector2_3, npc1.scale, spriteEffects, 0.0f); + Texture2D texture7 = num130 != 0 ? Main.glowMaskTexture[133] : Main.glowMaskTexture[134]; + Main.spriteBatch.Draw(texture7, position18 + 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) num131 * (double) index / 2.0), npc1.oldRot[index], vector2_3, npc1.scale, spriteEffects, 0.0f); + ++num130; + } + Texture2D texture8 = Main.npcTexture[npc1.type]; + Main.spriteBatch.Draw(texture8, position18, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Texture2D texture9 = Main.glowMaskTexture[135]; + Main.spriteBatch.Draw(texture9, position18, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 488: + break; + case 519: + NPC npc2 = n; + Texture2D texture2D8 = Main.npcTexture[npc2.type]; + Vector2 position19 = npc2.Center - Main.screenPosition - new Vector2((float) texture2D8.Width, (float) (texture2D8.Height / Main.npcFrameCount[npc2.type])) * npc2.scale / 2f + (vector2_3 * npc2.scale + new Vector2(0.0f, addY + addHeight + npc2.gfxOffY)); + Texture2D texture10 = Main.npcTexture[npc2.type]; + Main.spriteBatch.Draw(texture10, position19, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + int num132 = 0; + float num133 = (float) (1.0 / (double) npc2.oldPos.Length * 0.699999988079071); + for (int index = npc2.oldPos.Length - 1; (double) index >= 0.0; --index) + { + float amount = (float) (npc2.oldPos.Length - index) / (float) npc2.oldPos.Length; + Microsoft.Xna.Framework.Color color26 = Microsoft.Xna.Framework.Color.Pink * (float) (1.0 - (double) num133 * (double) index / 1.0); + color26.A = (byte) ((double) color26.A * (1.0 - (double) amount)); + Main.spriteBatch.Draw(texture10, position19 + npc2.oldPos[index] - npc2.position, new Microsoft.Xna.Framework.Rectangle?(), color26, npc2.oldRot[index], vector2_3, npc2.scale * MathHelper.Lerp(0.3f, 1.1f, amount), spriteEffects, 0.0f); + ++num132; + } + break; + case 522: + NPC npc3 = n; + Texture2D texture11 = Main.npcTexture[npc3.type]; + Vector2 position20 = npc3.Center - Main.screenPosition - new Vector2((float) texture11.Width, (float) (texture11.Height / Main.npcFrameCount[npc3.type])) * npc3.scale / 2f + (vector2_3 * npc3.scale + new Vector2(0.0f, addY + addHeight + npc3.gfxOffY)); + int num134 = 0; + float num135 = (float) (1.0 / (double) npc3.oldPos.Length * 1.10000002384186); + for (int index = npc3.oldPos.Length - 1; (double) index >= 0.0; --index) + { + float amount = (float) (npc3.oldPos.Length - index) / (float) npc3.oldPos.Length; + Microsoft.Xna.Framework.Color color27 = Microsoft.Xna.Framework.Color.White * (float) (1.0 - (double) num135 * (double) index / 1.0); + color27.A = (byte) ((double) color27.A * (1.0 - (double) amount)); + Main.spriteBatch.Draw(texture11, position20 + npc3.oldPos[index] - npc3.position, new Microsoft.Xna.Framework.Rectangle?(), color27, npc3.oldRot[index], vector2_3, npc3.scale * MathHelper.Lerp(0.8f, 0.3f, amount), spriteEffects, 0.0f); + ++num134; + } + Texture2D texture2D9 = Main.extraTexture[57]; + Main.spriteBatch.Draw(texture2D9, position20, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), 0.0f, texture2D9.Size() / 2f, n.scale, spriteEffects, 0.0f); + break; + default: + if (type == 370 || type == 372 || type == 373) + { + Texture2D texture12 = Main.npcTexture[type]; + Microsoft.Xna.Framework.Color color28 = Microsoft.Xna.Framework.Color.White; + float amount11 = 0.0f; + bool flag = type == 370 && (double) n.ai[0] > 4.0; + int num136 = type != 370 ? 0 : ((double) n.ai[0] > 9.0 ? 1 : 0); + int num137 = 120; + int num138 = 60; + Microsoft.Xna.Framework.Color color29 = color1; + if (num136 != 0) + color1 = Main.buffColor(color1, 0.4f, 0.8f, 0.4f, 1f); + else if (flag) + color1 = Main.buffColor(color1, 0.5f, 0.7f, 0.5f, 1f); + else if (type == 370 && (double) n.ai[0] == 4.0 && (double) n.ai[2] > (double) num137) + { + float num139 = (n.ai[2] - (float) num137) / (float) num138; + color1 = Main.buffColor(color1, (float) (1.0 - 0.5 * (double) num139), (float) (1.0 - 0.300000011920929 * (double) num139), (float) (1.0 - 0.5 * (double) num139), 1f); + } + int num140 = 10; + int num141 = 2; + if (type == 370) + { + if ((double) n.ai[0] == -1.0) + num140 = 0; + if ((double) n.ai[0] == 0.0 || (double) n.ai[0] == 5.0 || (double) n.ai[0] == 10.0) + num140 = 7; + if ((double) n.ai[0] == 1.0) + { + color28 = Microsoft.Xna.Framework.Color.Blue; + amount11 = 0.5f; + } + else + color29 = color1; + } + else if ((type == 372 || type == 373) && (double) n.ai[0] == 1.0) + { + color28 = Microsoft.Xna.Framework.Color.Blue; + amount11 = 0.5f; + } + for (int index = 1; index < num140; index += num141) + { + ref Vector2 local = ref n.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color29, color28, amount11); + Microsoft.Xna.Framework.Color color30 = n.GetAlpha(newColor) * ((float) (num140 - index) / 15f); + Vector2 position21 = n.oldPos[index] + new Vector2((float) n.width, (float) n.height) / 2f - Main.screenPosition - new Vector2((float) texture12.Width, (float) (texture12.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture12, position21, new Microsoft.Xna.Framework.Rectangle?(n.frame), color30, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + int num142 = 0; + float num143 = 0.0f; + float num144 = 0.0f; + if (type == 370) + { + if ((double) n.ai[0] == -1.0) + num142 = 0; + if ((double) n.ai[0] == 3.0 || (double) n.ai[0] == 8.0) + { + int num145 = 60; + int num146 = 30; + if ((double) n.ai[2] > (double) num145) + { + num142 = 6; + num143 = (1f - (float) Math.Cos(((double) n.ai[2] - (double) num145) / (double) num146 * 6.28318548202515)) / 3f; + num144 = 40f; + } + } + if ((double) n.ai[0] == 4.0 && (double) n.ai[2] > (double) num137) + { + num142 = 6; + num143 = (1f - (float) Math.Cos(((double) n.ai[2] - (double) num137) / (double) num138 * 6.28318548202515)) / 3f; + num144 = 60f; + } + if ((double) n.ai[0] == 9.0 && (double) n.ai[2] > (double) num137) + { + num142 = 6; + num143 = (1f - (float) Math.Cos(((double) n.ai[2] - (double) num137) / (double) num138 * 6.28318548202515)) / 3f; + num144 = 60f; + } + if ((double) n.ai[0] == 12.0) + { + num142 = 6; + num143 = (1f - (float) Math.Cos((double) n.ai[2] / 30.0 * 6.28318548202515)) / 3f; + num144 = 20f; + } + } + for (int index = 0; index < num142; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color1, color28, amount11); + Microsoft.Xna.Framework.Color color31 = n.GetAlpha(newColor) * (1f - num143); + Vector2 position22 = n.Center + ((float) ((double) index / (double) num142 * 6.28318548202515) + n.rotation).ToRotationVector2() * num144 * num143 - Main.screenPosition - new Vector2((float) texture12.Width, (float) (texture12.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture12, position22, new Microsoft.Xna.Framework.Rectangle?(n.frame), color31, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Vector2 position23 = n.Center - Main.screenPosition - new Vector2((float) texture12.Width, (float) (texture12.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture12, position23, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if (type != 370 || (double) n.ai[0] < 4.0) + break; + Texture2D dukeFishronTexture = Main.dukeFishronTexture; + 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 amount12 = 1f; + float num147 = 0.5f; + float num148 = 10f; + int num149 = 1; + if ((double) n.ai[0] == 4.0) + { + float num150 = (n.ai[2] - (float) num137) / (float) num138; + yellow *= num150; + color32 *= num150; + } + if ((double) n.ai[0] == 12.0) + { + float num151 = n.ai[2] / 30f; + if ((double) num151 > 0.5) + num151 = 1f - num151; + float num152 = 1f - num151 * 2f; + yellow *= num152; + color32 *= num152; + } + for (int index = 1; index < num140; index += num149) + { + ref Vector2 local = ref n.oldPos[index]; + Microsoft.Xna.Framework.Color color33 = Microsoft.Xna.Framework.Color.Lerp(color32, yellow, amount12) * ((float) (num140 - index) / 15f); + Vector2 position24 = n.oldPos[index] + new Vector2((float) n.width, (float) n.height) / 2f - Main.screenPosition - new Vector2((float) dukeFishronTexture.Width, (float) (dukeFishronTexture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(dukeFishronTexture, position24, new Microsoft.Xna.Framework.Rectangle?(n.frame), color33, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + for (int index = 1; index < num142; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color32, yellow, amount12); + Microsoft.Xna.Framework.Color color34 = n.GetAlpha(newColor) * (1f - num147); + Vector2 position25 = n.Center + ((float) ((double) index / (double) num142 * 6.28318548202515) + n.rotation).ToRotationVector2() * num148 * num147 - Main.screenPosition - new Vector2((float) dukeFishronTexture.Width, (float) (dukeFishronTexture.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(dukeFishronTexture, position25, new Microsoft.Xna.Framework.Rectangle?(n.frame), color34, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Main.spriteBatch.Draw(dukeFishronTexture, position23, new Microsoft.Xna.Framework.Rectangle?(n.frame), color32, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 439 || type == 440) + { + int num153 = n.frame.Y / (Main.npcTexture[type].Height / Main.npcFrameCount[type]); + Texture2D texture13 = Main.npcTexture[type]; + Texture2D texture2D10 = Main.extraTexture[30]; + Microsoft.Xna.Framework.Rectangle r = texture2D10.Frame(); + r.Height /= 2; + if (num153 >= 4) + r.Y += r.Height; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + float amount = 0.0f; + Microsoft.Xna.Framework.Color color35 = color1; + int num154 = 0; + int num155 = 0; + int num156 = 0; + if ((double) n.ai[0] == -1.0) + { + if ((double) n.ai[1] >= 320.0 && (double) n.ai[1] < 960.0) + { + white = Microsoft.Xna.Framework.Color.White; + amount = 0.5f; + num154 = 6; + num155 = 2; + num156 = 1; + } + } + else if ((double) n.ai[0] == 1.0) + { + white = Microsoft.Xna.Framework.Color.White; + amount = 0.5f; + num154 = 4; + num155 = 2; + num156 = 1; + } + else + color35 = color1; + for (int index = num156; index < num154; index += num155) + { + ref Vector2 local = ref n.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color35, white, amount); + Microsoft.Xna.Framework.Color color36 = n.GetAlpha(newColor) * ((float) (num154 - index) / (float) num154); + color36.A = (byte) 100; + Vector2 position26 = n.oldPos[index] + new Vector2((float) n.width, (float) n.height) / 2f - Main.screenPosition - r.Size() * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture2D10, position26, new Microsoft.Xna.Framework.Rectangle?(r), color36, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + int num157 = 0; + float num158 = 0.0f; + float num159 = 0.0f; + if ((double) n.ai[0] == 5.0 && (double) n.ai[1] >= 0.0 && (double) n.ai[1] < 30.0) + { + num157 = 4; + num158 = (1f - (float) Math.Cos(((double) n.ai[1] - 0.0) / 30.0 * 3.14159274101257)) / 2f; + num159 = 70f; + } + for (int index = 0; index < num157; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color1, white, amount); + Microsoft.Xna.Framework.Color color37 = n.GetAlpha(newColor) * (1f - num158); + Vector2 position27 = n.Center + ((float) ((double) index / (double) num157 * 6.28318548202515) + n.rotation).ToRotationVector2() * num159 * num158 - Main.screenPosition - new Vector2((float) texture13.Width, (float) (texture13.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture2D10, position27, new Microsoft.Xna.Framework.Rectangle?(r), color37, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Vector2 position28 = n.Center - Main.screenPosition - new Vector2((float) texture13.Width, (float) (texture13.Height / Main.npcFrameCount[type])) * n.scale / 2f + (vector2_3 * n.scale + new Vector2(0.0f, addY + addHeight + n.gfxOffY)); + Main.spriteBatch.Draw(texture13, position28, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 392 || type == 393 || type == 394 || type == 395) + { + Texture2D texture14 = Main.npcTexture[type]; + Vector2 position29 = (n.Center - Main.screenPosition + Vector2.UnitY * n.gfxOffY).Floor(); + float num160 = 0.0f; + if (type == 393) + num160 = -8f; + Main.spriteBatch.Draw(texture14, position29, new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3 + Vector2.UnitY * num160, n.scale, spriteEffects, 0.0f); + if (type == 392) + Main.spriteBatch.Draw(Main.glowMaskTexture[48], position29, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), n.rotation, vector2_3 + Vector2.UnitY * num160, n.scale, spriteEffects, 0.0f); + if (type == 395) + Main.spriteBatch.Draw(Main.glowMaskTexture[49], position29, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), n.rotation, vector2_3 + Vector2.UnitY * num160, n.scale, spriteEffects, 0.0f); + if (type != 394) + break; + Main.spriteBatch.Draw(Main.glowMaskTexture[50], position29, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), n.rotation, vector2_3 + Vector2.UnitY * num160, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 83 || type == 84 || type == 179) + { + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + if (type >= 87 && type <= 92) + { + Microsoft.Xna.Framework.Color alpha = n.GetAlpha(color1); + byte num161 = (byte) (((int) Main.tileColor.R + (int) Main.tileColor.G + (int) Main.tileColor.B) / 3); + if ((int) alpha.R < (int) num161) + alpha.R = num161; + if ((int) alpha.G < (int) num161) + alpha.G = num161; + if ((int) alpha.B < (int) num161) + alpha.B = num161; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 94: + for (int index = 1; index < 6; index += 2) + { + ref Vector2 local = ref n.oldPos[index]; + Microsoft.Xna.Framework.Color alpha = n.GetAlpha(color1); + alpha.R = (byte) ((int) alpha.R * (10 - index) / 15); + alpha.G = (byte) ((int) alpha.G * (10 - index) / 15); + alpha.B = (byte) ((int) alpha.B * (10 - index) / 15); + alpha.A = (byte) ((int) alpha.A * (10 - index) / 15); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 384: + return; + case 396: + Texture2D texture15 = Main.npcTexture[type]; + Vector2 origin4 = new Vector2(191f, 130f); + Texture2D texture16 = Main.extraTexture[18]; + Texture2D texture17 = Main.extraTexture[19]; + Vector2 origin5 = new Vector2(19f, 34f); + Vector2 vector2_12 = new Vector2(27f, 59f); + Vector2 vector2_13 = new Vector2(0.0f, 0.0f); + Texture2D texture2D11 = Main.extraTexture[25]; + Vector2 vector2_14 = new Vector2(0.0f, 214f).RotatedBy((double) n.rotation); + Microsoft.Xna.Framework.Rectangle r6 = texture2D11.Frame(); + r6.Height /= 3; + r6.Y += r6.Height * (int) ((double) n.localAI[2] / 7.0); + Texture2D texture2D12 = Main.extraTexture[29]; + Vector2 vector2_15 = new Vector2(0.0f, 4f).RotatedBy((double) n.rotation); + Microsoft.Xna.Framework.Rectangle r7 = texture2D12.Frame(); + r7.Height /= 4; + r7.Y += r7.Height * (int) ((double) n.localAI[3] / 5.0); + Texture2D texture2D13 = Main.extraTexture[26]; + Microsoft.Xna.Framework.Rectangle rectangle3 = texture2D13.Frame(); + rectangle3.Height /= 4; + Vector2 center1 = Main.npc[(int) n.ai[3]].Center; + Microsoft.Xna.Framework.Point tileCoordinates1 = n.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha1 = n.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates1.X, tileCoordinates1.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + if ((double) n.ai[0] < 0.0) + { + int num162 = (int) n.ai[1] / 8; + rectangle3.Y += rectangle3.Height * num162; + Main.spriteBatch.Draw(texture2D13, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle3), alpha1, n.rotation, origin5 + new Vector2(4f, 4f), 1f, spriteEffects, 0.0f); + } + else + { + Main.spriteBatch.Draw(texture16, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha1, n.rotation, origin5, 1f, spriteEffects, 0.0f); + Vector2 vector2_16 = Utils.Vector2FromElipse(n.localAI[0].ToRotationVector2(), vector2_12 * n.localAI[1]); + Main.spriteBatch.Draw(texture17, n.Center - Main.screenPosition + vector2_16 + vector2_13, new Microsoft.Xna.Framework.Rectangle?(), alpha1, n.rotation, new Vector2((float) texture17.Width, (float) texture17.Height) / 2f, 1f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture15, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha1, n.rotation, origin4, 1f, spriteEffects, 0.0f); + Main.spriteBatch.Draw(texture2D12, (n.Center - Main.screenPosition + vector2_15).Floor(), new Microsoft.Xna.Framework.Rectangle?(r7), alpha1, n.rotation, r7.Size() / 2f, 1f, spriteEffects, 0.0f); + Main.spriteBatch.Draw(texture2D11, (n.Center - Main.screenPosition + vector2_14).Floor(), new Microsoft.Xna.Framework.Rectangle?(r6), alpha1, n.rotation, r6.Size() / 2f, 1f, spriteEffects, 0.0f); + return; + case 397: + Texture2D texture18 = Main.npcTexture[type]; + float num163 = 0.5f; + Vector2 vector2_17 = new Vector2(220f, -60f); + Vector2 vector2_18 = new Vector2(0.0f, 76f); + Texture2D texture19 = Main.extraTexture[15]; + Vector2 vector2_19 = new Vector2(60f, 30f); + float num164 = 340f; + Vector2 center2 = Main.npc[(int) n.ai[3]].Center; + Microsoft.Xna.Framework.Point tileCoordinates2 = n.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha2 = n.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates2.X, tileCoordinates2.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + bool flag5 = (double) n.ai[2] == 0.0; + Vector2 vector2_20 = new Vector2(flag5 ? -1f : 1f, 1f); + Vector2 origin6 = new Vector2(120f, 180f); + if (!flag5) + origin6.X = (float) texture18.Width - origin6.X; + Texture2D texture20 = Main.extraTexture[17]; + Texture2D texture21 = Main.extraTexture[19]; + Vector2 origin7 = new Vector2(26f, 42f); + if (!flag5) + origin7.X = (float) texture20.Width - origin7.X; + Vector2 vector2_21 = new Vector2(30f, 66f); + Vector2 vector2_22 = new Vector2((float) (1.0 * -(double) vector2_20.X), 3f); + Texture2D texture2D14 = Main.extraTexture[26]; + Microsoft.Xna.Framework.Rectangle rectangle4 = texture2D14.Frame(); + rectangle4.Height /= 4; + Vector2 vector2_23 = vector2_17 * vector2_20; + Vector2 vector2_24 = center2 + vector2_23; + Vector2 vector2_25 = n.Center + vector2_18; + Vector2 vector2_26 = vector2_25; + Vector2 v1 = (vector2_24 - vector2_26) * (1f - num163); + Vector2 origin8 = vector2_19; + if (!flag5) + origin8.X = (float) texture19.Width - origin8.X; + float num165 = (float) Math.Acos((double) v1.Length() / (double) num164) * -vector2_20.X; + Main.spriteBatch.Draw(texture19, vector2_25 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha2, (float) ((double) v1.ToRotation() + (double) num165 - 1.57079637050629), origin8, 1f, spriteEffects, 0.0f); + if ((double) n.ai[0] == -2.0) + { + int num166 = (int) n.ai[1] / 8; + rectangle4.Y += rectangle4.Height * num166; + Main.spriteBatch.Draw(texture2D14, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle4), alpha2, 0.0f, origin7 - new Vector2(4f, 4f), 1f, spriteEffects, 0.0f); + } + else + { + Main.spriteBatch.Draw(texture20, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha2, 0.0f, origin7, 1f, spriteEffects, 0.0f); + Vector2 vector2_27 = Utils.Vector2FromElipse(n.localAI[0].ToRotationVector2(), vector2_21 * n.localAI[1]); + Main.spriteBatch.Draw(texture21, n.Center - Main.screenPosition + vector2_27 + vector2_22, new Microsoft.Xna.Framework.Rectangle?(), alpha2, 0.0f, new Vector2((float) texture21.Width, (float) texture21.Height) / 2f, 1f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture18, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha2, 0.0f, origin6, 1f, spriteEffects, 0.0f); + return; + case 398: + bool flag6 = false; + Texture2D texture22 = Main.npcTexture[type]; + Texture2D texture23 = Main.extraTexture[16]; + Texture2D texture24 = Main.extraTexture[14]; + float y1 = 340f; + float num167 = 0.5f; + Vector2 vector2_28 = new Vector2(220f, -60f); + Vector2 vector2_29 = new Vector2(76f, 66f); + Texture2D texture25 = Main.extraTexture[13]; + Vector2 origin9 = new Vector2((float) texture25.Width, 278f); + Vector2 origin10 = new Vector2(0.0f, 278f); + Vector2 vector2_30 = new Vector2(0.0f, 76f); + Vector2 center3 = n.Center; + Microsoft.Xna.Framework.Point tileCoordinates3 = (n.Center + new Vector2(0.0f, -150f)).ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha3 = n.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_31 = 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) iNPCIndex) + { + index6 = index7; + break; + } + } + if (index6 != -1) + { + Vector2 Position = center3 + vector2_28 * vector2_31; + Vector2 v2 = (Main.npc[index6].Center + vector2_30 - Position) * num167; + if (flag6) + Main.dust[Dust.NewDust(Position + v2, 0, 0, 6)].noGravity = true; + float num168 = (float) Math.Acos((double) v2.Length() / (double) y1) * -vector2_31.X; + SpriteEffects effects = flag7 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 origin11 = vector2_29; + if (!flag7) + origin11.X = (float) texture24.Width - origin11.X; + Main.spriteBatch.Draw(texture24, Position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha3, (float) ((double) v2.ToRotation() - (double) num168 - 1.57079637050629), origin11, 1f, effects, 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, y1).RotatedBy((double) v2.ToRotation() - (double) num168 - 1.57079637050629), 0, 0, 6)].noGravity = true; + } + } + Main.spriteBatch.Draw(texture25, center3 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha3, 0.0f, origin9, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture25, center3 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha3, 0.0f, origin10, 1f, SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(texture23, center3 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), alpha3, 0.0f, new Vector2(112f, 101f), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture22, center3 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha3, 0.0f, n.frame.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + return; + case 399: + Texture2D texture26 = Main.npcTexture[type]; + (n.position - Main.screenPosition + Vector2.UnitY * n.gfxOffY).Floor(); + float num169 = 5f; + for (int index8 = 0; (double) index8 < (double) num169; ++index8) + { + float num170 = (float) (1.0 - ((double) Main.GlobalTime + (double) index8) % (double) num169 / (double) num169); + Microsoft.Xna.Framework.Color color38 = Microsoft.Xna.Framework.Color.LimeGreen; + if ((double) n.ai[0] == 1.0) + color38 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.LimeGreen, Microsoft.Xna.Framework.Color.Red, MathHelper.Clamp(n.ai[1] / 20f, 0.0f, 1f)); + if ((double) n.ai[0] == 2.0) + color38 = Microsoft.Xna.Framework.Color.Red; + color38 *= 1f - num170; + color38.A = (byte) 0; + for (int index9 = 0; index9 < 2; ++index9) + Main.spriteBatch.Draw(Main.extraTexture[27], n.Center - Main.screenPosition + Vector2.UnitY * (float) ((double) n.gfxOffY - 4.0 + 6.0), new Microsoft.Xna.Framework.Rectangle?(), color38, 1.570796f, new Vector2(10f, 48f), num170 * 4f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture26, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Texture2D texture27 = Main.glowMaskTexture[100]; + Main.spriteBatch.Draw(texture27, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - n.alpha / 2, (int) sbyte.MaxValue - n.alpha / 2, (int) sbyte.MaxValue - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Texture2D texture2D15 = Main.extraTexture[20]; + Microsoft.Xna.Framework.Rectangle rectangle5 = texture2D15.Frame(verticalFrames: 4, frameY: ((int) n.ai[0] + 1)); + Vector2 position30 = new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) texture2D15.Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale + (double) addHeight + (double) addY + (double) n.gfxOffY + 18.0 + 6.0)); + Main.spriteBatch.Draw(texture2D15, position30, new Microsoft.Xna.Framework.Rectangle?(rectangle5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Texture2D texture28 = Main.glowMaskTexture[101]; + Main.spriteBatch.Draw(texture28, position30, new Microsoft.Xna.Framework.Rectangle?(rectangle5), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - n.alpha / 2, (int) sbyte.MaxValue - n.alpha / 2, (int) sbyte.MaxValue - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + return; + case 400: + Texture2D texture29 = Main.npcTexture[type]; + Texture2D texture2D16 = Main.extraTexture[19]; + Vector2 origin12 = new Vector2(40f, 40f); + Vector2 vector2_32 = new Vector2(30f, 30f); + Vector2 center4 = n.Center; + Microsoft.Xna.Framework.Point tileCoordinates4 = n.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha4 = n.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates4.X, tileCoordinates4.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + Main.spriteBatch.Draw(texture29, n.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha4, n.rotation, origin12, 1f, spriteEffects, 0.0f); + Vector2 vector2_33 = Utils.Vector2FromElipse(n.localAI[0].ToRotationVector2(), vector2_32 * n.localAI[1]); + Main.spriteBatch.Draw(texture2D16, n.Center - Main.screenPosition + vector2_33, new Microsoft.Xna.Framework.Rectangle?(), alpha4, n.rotation, texture2D16.Size() / 2f, n.localAI[2], SpriteEffects.None, 0.0f); + return; + case 416: + int index10 = -1; + int index11 = (int) n.ai[0]; + Vector2 position31 = n.position; + Vector2 spinningpoint = Vector2.Zero; + if (Main.npc[index11].active && Main.npc[index11].type == 415) + index10 = index11; + if (index10 != -1) + { + Vector2 position32 = n.position; + n.Bottom = Main.npc[index10].Bottom; + position31 = n.position; + n.position = position32; + n.gfxOffY = Main.npc[index10].gfxOffY; + spinningpoint = Main.npc[index10].velocity; + } + Microsoft.Xna.Framework.Rectangle frame1 = n.frame; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) position31.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) position31.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame1), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if (n.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) position31.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) position31.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame1), n.GetColor(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[156], position31 + n.Size * new Vector2(0.5f, 1f) - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float num171 = (float) (0.5 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.5); + for (int index12 = 0; index12 < 4; ++index12) + Main.spriteBatch.Draw(Main.glowMaskTexture[156], position31 + n.Size * new Vector2(0.5f, 1f) - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + spinningpoint.RotatedBy((double) index12 * 1.57079637050629) * num171, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + return; + case 491: + NPC npc4 = n; + Texture2D texture30 = Main.npcTexture[npc4.type]; + Microsoft.Xna.Framework.Rectangle frame2 = npc4.frame; + Vector2 origin13 = frame2.OriginFlip(new Vector2(208f, 460f), spriteEffects); + Vector2 position33 = npc4.Center - Main.screenPosition; + Vector2 vector2_34 = new Vector2(spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1f : 1f, 1f); + Microsoft.Xna.Framework.Color alpha5 = npc4.GetAlpha(color1); + Main.spriteBatch.Draw(texture30, position33, new Microsoft.Xna.Framework.Rectangle?(frame2), alpha5, npc4.rotation, origin13, npc4.scale, spriteEffects, 0.0f); + int num172 = (int) npc4.localAI[3] / 8; + Texture2D texture2D17 = Main.extraTexture[40]; + Microsoft.Xna.Framework.Rectangle r8 = texture2D17.Frame(verticalFrames: 4, frameY: (num172 % 4)); + Vector2 origin14 = r8.Size() * new Vector2(0.5f, 1f); + Main.spriteBatch.Draw(texture2D17, position33 + (new Vector2(102f, -384f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r8), alpha5, npc4.rotation, origin14, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D18 = Main.extraTexture[41]; + Microsoft.Xna.Framework.Rectangle r9 = texture2D18.Frame(verticalFrames: 8, frameY: (num172 % 8)); + Vector2 origin15 = r9.Size() * new Vector2(0.5f, 0.0f) + new Vector2(0.0f, 10f); + for (int index13 = 0; index13 < 5; ++index13) + Main.spriteBatch.Draw(texture2D18, position33 + (new Vector2((float) (34 * index13 - 96), 40f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r9), alpha5, npc4.rotation, origin15, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D19 = Main.extraTexture[42]; + Microsoft.Xna.Framework.Rectangle r10 = texture2D19.Frame(verticalFrames: 4, frameY: (num172 % 4)); + Vector2 origin16 = r10.Size() * new Vector2(0.5f, 0.0f); + for (int index14 = 0; index14 < 2; ++index14) + Main.spriteBatch.Draw(texture2D19, position33 + (new Vector2((float) (158 - 106 * index14), -302f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r10), alpha5, npc4.rotation, origin16, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D20 = Main.extraTexture[43]; + Microsoft.Xna.Framework.Rectangle r11 = texture2D20.Frame(verticalFrames: 4, frameY: (num172 % 4)); + Vector2 origin17 = r11.Size() * new Vector2(0.5f, 0.0f); + for (int index15 = 0; index15 < 2; ++index15) + Main.spriteBatch.Draw(texture2D20, position33 + (new Vector2((float) (42 - 178 * index15), -444f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r11), alpha5, npc4.rotation, origin17, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D21 = Main.extraTexture[44]; + Microsoft.Xna.Framework.Rectangle r12 = texture2D21.Frame(verticalFrames: 4, frameY: (num172 % 4)); + Vector2 origin18 = r12.Size() * new Vector2(0.5f, 0.0f); + Main.spriteBatch.Draw(texture2D21, position33 + (new Vector2(-134f, -302f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r12), alpha5, npc4.rotation, origin18, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D22 = Main.extraTexture[45]; + Microsoft.Xna.Framework.Rectangle r13 = texture2D22.Frame(verticalFrames: 4, frameY: ((2 + num172) % 4)); + Vector2 origin19 = r13.Size() * new Vector2(0.5f, 0.0f); + Main.spriteBatch.Draw(texture2D22, position33 + (new Vector2(-60f, -330f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r13), alpha5, npc4.rotation, origin19, npc4.scale, spriteEffects, 0.0f); + this.LoadNPC(492); + if (!Main.NPCLoaded[492]) + return; + Texture2D texture2D23 = Main.npcTexture[492]; + Microsoft.Xna.Framework.Rectangle r14 = texture2D23.Frame(verticalFrames: 9); + Vector2 origin20 = r14.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) + { + r14.Y = Main.npc[index17].frame.Y; + Main.spriteBatch.Draw(texture2D23, position33 + (new Vector2((float) (68 * index16 - 122), -20f) * vector2_34).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r14), alpha5, npc4.rotation, origin20, 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 n.oldPos[index18]; + Microsoft.Xna.Framework.Color alpha6 = n.GetAlpha(color1); + alpha6.R = (byte) ((int) alpha6.R * (10 - index18) / 20); + alpha6.G = (byte) ((int) alpha6.G * (10 - index18) / 20); + alpha6.B = (byte) ((int) alpha6.B * (10 - index18) / 20); + alpha6.A = (byte) ((int) alpha6.A * (10 - index18) / 20); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index18].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index18].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha6, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + } + if (type == 417 && (double) n.ai[0] >= 6.0 && (double) n.ai[0] <= 6.0) + { + for (int index19 = 5; index19 >= 0; --index19) + { + ref Vector2 local = ref n.oldPos[index19]; + Microsoft.Xna.Framework.Color alpha7 = n.GetAlpha(color1); + alpha7.R = (byte) ((int) alpha7.R * (10 - index19) / 20); + alpha7.G = (byte) ((int) alpha7.G * (10 - index19) / 20); + alpha7.B = (byte) ((int) alpha7.B * (10 - index19) / 20); + alpha7.A = (byte) ((int) alpha7.A * (10 - index19) / 20); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index19].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index19].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), alpha7, n.oldRot[index19], vector2_3, MathHelper.Lerp(0.5f, 1f, (float) ((5.0 - (double) index19) / 6.0)), spriteEffects, 0.0f); + } + } + if (type == 419 && (double) n.ai[2] <= -9.0) + { + int num173 = Main.glowMaskTexture[154].Height / Main.npcFrameCount[type]; + int num174 = n.frame.Y / num173; + for (int index20 = 6; index20 >= 0; --index20) + { + ref Vector2 local = ref n.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 frame3 = n.frame; + int num175 = (num174 - 3 - index20) % 3; + if (num175 < 0) + num175 += 3; + int num176 = num175 + 5; + frame3.Y = num173 * num176; + Main.spriteBatch.Draw(Main.glowMaskTexture[154], new Vector2((float) ((double) n.oldPos[index20].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index20].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame3), white, n.oldRot[index20], vector2_3, MathHelper.Lerp(0.75f, 1.2f, (float) ((10.0 - (double) index20) / 10.0)), spriteEffects, 0.0f); + } + } + if (type == 418 && ((double) n.ai[0] == 2.0 || (double) n.ai[0] == 4.0)) + { + Texture2D texture2D24 = Main.extraTexture[55]; + Vector2 origin21 = new Vector2((float) (texture2D24.Width / 2), (float) (texture2D24.Height / 8 + 14)); + int num177 = (int) n.ai[1] / 2; + float num178 = -1.570796f * (float) n.spriteDirection; + float amount = n.ai[1] / 45f; + if ((double) amount > 1.0) + amount = 1f; + int num179 = num177 % 4; + for (int index21 = 6; index21 >= 0; --index21) + { + ref Vector2 local = ref n.oldPos[index21]; + Microsoft.Xna.Framework.Color color39 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Gold, Microsoft.Xna.Framework.Color.OrangeRed, amount), Microsoft.Xna.Framework.Color.Blue, (float) index21 / 12f); + color39.A = (byte) (64.0 * (double) amount); + color39.R = (byte) ((int) color39.R * (10 - index21) / 20); + color39.G = (byte) ((int) color39.G * (10 - index21) / 20); + color39.B = (byte) ((int) color39.B * (10 - index21) / 20); + color39.A = (byte) ((int) color39.A * (10 - index21) / 20); + Microsoft.Xna.Framework.Color color40 = color39 * amount; + int frameY = (num179 - index21) % 4; + if (frameY < 0) + frameY += 4; + Microsoft.Xna.Framework.Rectangle rectangle6 = texture2D24.Frame(verticalFrames: 4, frameY: frameY); + Main.spriteBatch.Draw(texture2D24, new Vector2((float) ((double) n.oldPos[index21].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index21].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rectangle6), color40, n.oldRot[index21] + num178, origin21, MathHelper.Lerp(0.1f, 1.2f, (float) ((10.0 - (double) index21) / 10.0)), spriteEffects, 0.0f); + } + } + if (type == 516) + { + int num180 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + int num181 = n.frame.Y / num180; + for (int index22 = 6; index22 >= 0; --index22) + { + ref Vector2 local = ref n.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 frame4 = n.frame; + int num182 = (num181 - 4 - index22) % 4; + if (num182 < 0) + num182 += 4; + frame4.Y = num180 * num182; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index22].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index22].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame4), color41, n.rotation, vector2_3, MathHelper.Lerp(0.35f, 1.2f, (float) ((10.0 - (double) index22) / 10.0)), spriteEffects, 0.0f); + } + } + Microsoft.Xna.Framework.Rectangle frame5 = n.frame; + if (type == 182 || type == 289) + frame5.Height -= 2; + if (n.aiStyle == 7) + this.DrawNPCExtras(n, true, addHeight, addY, color1, vector2_3, spriteEffects); + if (type == 346 && (double) n.life < (double) n.lifeMax * 0.5) + { + Main.spriteBatch.Draw(Main.santaTankTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + else + { + switch (type) + { + case 356: + --frame5.Height; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 360: + float num183 = 0.0f; + if ((double) n.ai[2] == 0.0) + { + if ((double) n.rotation == 3.14000010490417 || (double) n.rotation == -3.14000010490417) + addHeight = 2f; + if (n.direction < 0 && ((double) n.rotation == 1.57000005245209 || (double) n.rotation == 4.71000003814697)) + num183 = 1f; + if (n.direction > 0 && ((double) n.rotation == 1.57000005245209 || (double) n.rotation == 4.71000003814697)) + num183 = -1f; + } + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale) + num183, (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + default: + if (type == 266 && n.life < n.lifeMax && Main.expertMode) + { + Microsoft.Xna.Framework.Color alpha8 = n.GetAlpha(color1); + float num184 = (float) (1.0 - (double) n.life / (double) n.lifeMax); + float num185 = num184 * num184; + alpha8.R = (byte) ((double) alpha8.R * (double) num185); + alpha8.G = (byte) ((double) alpha8.G * (double) num185); + alpha8.B = (byte) ((double) alpha8.B * (double) num185); + alpha8.A = (byte) ((double) alpha8.A * (double) num185); + for (int index23 = 0; index23 < 4; ++index23) + { + Vector2 position34 = n.position; + float num186 = Math.Abs(n.Center.X - Main.player[Main.myPlayer].Center.X); + float num187 = Math.Abs(n.Center.Y - Main.player[Main.myPlayer].Center.Y); + position34.X = index23 == 0 || index23 == 2 ? Main.player[Main.myPlayer].Center.X + num186 : Main.player[Main.myPlayer].Center.X - num186; + position34.X -= (float) (n.width / 2); + position34.Y = index23 == 0 || index23 == 1 ? Main.player[Main.myPlayer].Center.Y + num187 : Main.player[Main.myPlayer].Center.Y - num187; + position34.Y -= (float) (n.height / 2); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) position34.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) position34.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), alpha8, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 421 && (double) n.ai[0] == 5.0) + { + Player player = Main.player[n.target]; + if ((double) player.gravDir == -1.0) + spriteEffects |= SpriteEffects.FlipVertically; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) (player.direction * 4), player.gfxOffY) + ((double) player.gravDir == 1.0 ? player.Top : player.Bottom) - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, frame5.Size() / 2f, n.scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[146], new Vector2((float) (player.direction * 4), player.gfxOffY) + ((double) player.gravDir == 1.0 ? player.Top : player.Bottom) - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, frame5.Size() / 2f, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 518) + { + Vector2 vector2_35 = new Vector2(-10f, 0.0f); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3 + vector2_35, n.scale, spriteEffects, 0.0f); + if (n.color != new Microsoft.Xna.Framework.Color()) + { + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetColor(color1), n.rotation, vector2_3 + vector2_35, n.scale, spriteEffects, 0.0f); + break; + } + break; + } + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetAlpha(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if (n.color != new Microsoft.Xna.Framework.Color()) + { + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), n.GetColor(color1), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + break; + } + } + if (n.confused) + Main.spriteBatch.Draw(Main.confuseTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale + (double) addHeight + (double) addY - (double) Main.confuseTexture.Height - 20.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.confuseTexture.Width, Main.confuseTexture.Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, 70), n.velocity.X * -0.05f, new Vector2((float) (Main.confuseTexture.Width / 2), (float) (Main.confuseTexture.Height / 2)), Main.essScale + 0.2f, SpriteEffects.None, 0.0f); + if (type >= 134 && type <= 136 && color1 != Microsoft.Xna.Framework.Color.Black) + { + Main.spriteBatch.Draw(Main.destTexture[type - 134], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) n.alpha / (double) byte.MaxValue), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + else + { + switch (type) + { + case 120: + for (int index24 = 1; index24 < n.oldPos.Length; ++index24) + { + ref Vector2 local = ref n.oldPos[index24]; + Main.spriteBatch.Draw(Main.chaosTexture, new Vector2((float) ((double) n.oldPos[index24].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index24].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.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) + }, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 125: + Main.spriteBatch.Draw(Main.EyeLaserTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case (int) sbyte.MaxValue: + Main.spriteBatch.Draw(Main.BoneEyesTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 131: + Main.spriteBatch.Draw(Main.BoneLaserTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 139: + Main.spriteBatch.Draw(Main.probeTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + default: + if (type == 137 || type == 138) + { + for (int index25 = 1; index25 < n.oldPos.Length; ++index25) + { + ref Vector2 local = ref n.oldPos[index25]; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index25].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index25].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.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) + }, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + } + switch (type) + { + case 82: + Main.spriteBatch.Draw(Main.wraithEyeTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + for (int index26 = 1; index26 < 10; ++index26) + { + Microsoft.Xna.Framework.Color color42 = new Microsoft.Xna.Framework.Color(110 - index26 * 10, 110 - index26 * 10, 110 - index26 * 10, 110 - index26 * 10); + Main.spriteBatch.Draw(Main.wraithEyeTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight) - n.velocity * (float) index26 * 0.5f, new Microsoft.Xna.Framework.Rectangle?(n.frame), color42, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 253: + Main.spriteBatch.Draw(Main.reaperEyeTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 3.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + for (int index27 = 1; index27 < 20; ++index27) + { + Microsoft.Xna.Framework.Color color43 = new Microsoft.Xna.Framework.Color(210 - index27 * 20, 210 - index27 * 20, 210 - index27 * 20, 210 - index27 * 20); + Main.spriteBatch.Draw(Main.reaperEyeTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 3.0 + (double) vector2_3.Y * (double) n.scale) + addHeight) - n.velocity * (float) index27 * 0.5f, new Microsoft.Xna.Framework.Rectangle?(n.frame), color43, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 325: + Main.spriteBatch.Draw(Main.treeFaceTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + for (int index28 = 1; index28 < 10; ++index28) + { + Microsoft.Xna.Framework.Color color44 = new Microsoft.Xna.Framework.Color(110 - index28 * 10, 110 - index28 * 10, 110 - index28 * 10, 110 - index28 * 10); + Vector2 vector2_36 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + Main.spriteBatch.Draw(Main.treeFaceTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight) + vector2_36, new Microsoft.Xna.Framework.Rectangle?(n.frame), color44, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 327: + Main.spriteBatch.Draw(Main.pumpkingFaceTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + for (int index29 = 1; index29 < 10; ++index29) + { + Microsoft.Xna.Framework.Color color45 = new Microsoft.Xna.Framework.Color(110 - index29 * 10, 110 - index29 * 10, 110 - index29 * 10, 110 - index29 * 10); + Vector2 vector2_37 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + Main.spriteBatch.Draw(Main.pumpkingFaceTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight) + vector2_37, new Microsoft.Xna.Framework.Rectangle?(n.frame), color45, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 345: + Main.spriteBatch.Draw(Main.iceQueenTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), Microsoft.Xna.Framework.Color.White, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + for (int index30 = 1; index30 < 5; ++index30) + { + Microsoft.Xna.Framework.Color color46 = new Microsoft.Xna.Framework.Color(100 - index30 * 10, 100 - index30 * 10, 100 - index30 * 10, 100 - index30 * 10); + Main.spriteBatch.Draw(Main.iceQueenTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight) - n.velocity * (float) index30 * 0.2f, new Microsoft.Xna.Framework.Rectangle?(n.frame), color46, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + case 355: + Main.spriteBatch.Draw(Main.fireflyTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 358: + Main.spriteBatch.Draw(Main.lightningbugTexture, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + default: + if (type == 245 && n.alpha == 0) + { + Microsoft.Xna.Framework.Color color47 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + Main.spriteBatch.Draw(Main.golemTexture[3], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), color47, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 246: + Microsoft.Xna.Framework.Color color48 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + if (n.frame.Y < 222) + { + Main.spriteBatch.Draw(Main.golemTexture[1], new Vector2((float) ((double) n.Center.X - (double) Main.screenPosition.X - 20.0), (float) ((double) n.Center.Y - (double) Main.screenPosition.Y - 27.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.golemTexture[1].Width, Main.golemTexture[1].Height / 2)), color48, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + if (n.frame.Y < 444) + { + Main.spriteBatch.Draw(Main.golemTexture[2], new Vector2((float) ((double) n.Center.X - (double) Main.screenPosition.X + 26.0), (float) ((double) n.Center.Y - (double) Main.screenPosition.Y - 28.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.golemTexture[2].Width, Main.golemTexture[2].Height / 4)), color48, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + Main.spriteBatch.Draw(Main.golemTexture[2], new Vector2((float) ((double) n.Center.X - (double) Main.screenPosition.X - 38.0), (float) ((double) n.Center.Y - (double) Main.screenPosition.Y - 28.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.golemTexture[2].Height / 2, Main.golemTexture[2].Width, Main.golemTexture[2].Height / 4)), color48, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + case 249: + Microsoft.Xna.Framework.Color color49 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + Main.spriteBatch.Draw(Main.golemTexture[1], new Vector2((float) ((double) n.Center.X - (double) Main.screenPosition.X - 20.0), (float) ((double) n.Center.Y - (double) Main.screenPosition.Y - 47.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.golemTexture[1].Width, Main.golemTexture[1].Height / 2)), color49, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + case 381: + Vector2 zero1 = Vector2.Zero; + Vector2 origin22 = Vector2.Zero; + int num188 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + int num189 = n.frame.Y / num188; + Microsoft.Xna.Framework.Rectangle rectangle7 = new Microsoft.Xna.Framework.Rectangle(0, 0, 32, 42); + switch (num189) + { + 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) (num188 * num189); + Vector2 vector2_38 = zero1 - vector2_3; + int num190 = 2; + if ((double) n.ai[2] > 0.0) + num190 = (int) n.ai[2] - 1; + if ((double) n.velocity.Y != 0.0) + num190 = 3; + rectangle7.Y += 44 * num190; + switch (num190) + { + case 0: + origin22 = new Vector2(10f, 18f); + break; + case 1: + origin22 = new Vector2(8f, 20f); + break; + case 2: + origin22 = new Vector2(8f, 20f); + break; + case 3: + origin22 = new Vector2(8f, 20f); + break; + case 4: + origin22 = new Vector2(6f, 18f); + break; + } + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + vector2_38.X *= -1f; + origin22.X = (float) rectangle7.Width - origin22.X; + } + Vector2 position35 = vector2_38 + n.Center - Main.screenPosition; + position35.Y += n.gfxOffY; + Main.spriteBatch.Draw(Main.extraTexture[0], position35, new Microsoft.Xna.Framework.Rectangle?(rectangle7), color1, n.rotation, origin22, n.scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[24], position35, new Microsoft.Xna.Framework.Rectangle?(rectangle7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, origin22, n.scale, spriteEffects, 0.0f); + break; + case 382: + Vector2 zero2 = Vector2.Zero; + Vector2 origin23 = Vector2.Zero; + int num191 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + int num192 = n.frame.Y / num191; + Microsoft.Xna.Framework.Rectangle rectangle8 = new Microsoft.Xna.Framework.Rectangle(0, 0, 30, 42); + switch (num192) + { + 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) (num191 * num192); + Vector2 vector2_39 = zero2 - vector2_3; + int num193 = 2; + if ((double) n.ai[2] > 0.0) + num193 = (int) n.ai[2] - 1; + if ((double) n.velocity.Y != 0.0) + num193 = 3; + rectangle8.Y += 44 * num193; + switch (num193) + { + case 0: + origin23 = new Vector2(10f, 18f); + break; + case 1: + origin23 = new Vector2(8f, 20f); + break; + case 2: + origin23 = new Vector2(8f, 20f); + break; + case 3: + origin23 = new Vector2(8f, 20f); + break; + case 4: + origin23 = new Vector2(6f, 18f); + break; + } + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + vector2_39.X *= -1f; + origin23.X = (float) rectangle8.Width - origin23.X; + } + Vector2 position36 = vector2_39 + n.Center - Main.screenPosition; + position36.Y += n.gfxOffY; + Main.spriteBatch.Draw(Main.extraTexture[1], position36, new Microsoft.Xna.Framework.Rectangle?(rectangle8), color1, n.rotation, origin23, n.scale, spriteEffects, 0.0f); + break; + case 383: + Main.spriteBatch.Draw(Main.glowMaskTexture[11], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if ((double) n.ai[2] != 0.0 && Main.npc[(int) n.ai[2] - 1].active && Main.npc[(int) n.ai[2] - 1].type == 384) + { + double num194 = (double) n.ai[2]; + Main.spriteBatch.Draw(Main.npcTexture[384], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), n.rotation, new Vector2((float) Main.npcTexture[384].Width, (float) Main.npcTexture[384].Height) / 2f, n.scale, spriteEffects, 0.0f); + break; + } + break; + case 386: + Main.spriteBatch.Draw(Main.glowMaskTexture[31], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 387: + Microsoft.Xna.Framework.Color color50 = new Microsoft.Xna.Framework.Color(1f, 1f, 1f, 1f) * 0.75f; + if ((double) n.ai[0] > 0.0) + { + float amount = (float) (((double) n.ai[0] + 1.0) / 60.0); + color50 = Microsoft.Xna.Framework.Color.Lerp(color50, Microsoft.Xna.Framework.Color.White, amount); + color50.A = (byte) MathHelper.Lerp((float) color50.A, 0.0f, amount); + } + Microsoft.Xna.Framework.Color color51 = color50 * (float) (((double) byte.MaxValue - (double) n.alpha) / (double) byte.MaxValue); + Main.spriteBatch.Draw(Main.glowMaskTexture[32], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), color51, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 388: + Main.spriteBatch.Draw(Main.glowMaskTexture[33], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 389: + Main.spriteBatch.Draw(Main.glowMaskTexture[34], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 520: + Main.spriteBatch.Draw(Main.glowMaskTexture[164], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Vector2 zero3 = Vector2.Zero; + Vector2 origin24 = new Vector2(4f, 4f); + int num195 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + int num196 = n.frame.Y / num195; + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + zero3.X *= -1f; + origin24.X = (float) Main.extraTexture[56].Width - origin24.X; + } + Vector2 position37 = zero3 + (n.Top + new Vector2(0.0f, 20f)) - Main.screenPosition; + position37.Y += n.gfxOffY; + float rotation3 = n.localAI[3]; + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + rotation3 += 3.141593f; + Main.spriteBatch.Draw(Main.extraTexture[56], position37, new Microsoft.Xna.Framework.Rectangle?(), color1, rotation3, origin24, n.scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[165], position37, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rotation3, origin24, n.scale, spriteEffects, 0.0f); + break; + default: + if (type == 4 && (double) n.ai[1] >= 4.0 && (double) n.ai[0] == 3.0) + { + for (int index31 = 1; index31 < n.oldPos.Length; ++index31) + { + ref Vector2 local = ref n.oldPos[index31]; + Microsoft.Xna.Framework.Color color52 = color1; + color52.R = (byte) (0.5 * (double) color52.R * (double) (10 - index31) / 20.0); + color52.G = (byte) (0.5 * (double) color52.G * (double) (10 - index31) / 20.0); + color52.B = (byte) (0.5 * (double) color52.B * (double) (10 - index31) / 20.0); + color52.A = (byte) (0.5 * (double) color52.A * (double) (10 - index31) / 20.0); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index31].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index31].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), color52, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + } + if (type == 437) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 200; + Main.spriteBatch.Draw(Main.glowMaskTexture[109], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame5), white, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[108], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(), white, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + if (type == 471 && (double) n.ai[3] < 0.0) + { + for (int index32 = 1; index32 < n.oldPos.Length; ++index32) + { + ref Vector2 local = ref n.oldPos[index32]; + Microsoft.Xna.Framework.Color color53 = color1; + color53.R = (byte) (0.5 * (double) color53.R * (double) (10 - index32) / 20.0); + color53.G = (byte) (0.5 * (double) color53.G * (double) (10 - index32) / 20.0); + color53.B = (byte) (0.5 * (double) color53.B * (double) (10 - index32) / 20.0); + color53.A = (byte) (0.5 * (double) color53.A * (double) (10 - index32) / 20.0); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index32].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index32].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), color53, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + } + if (type == 477 && (double) n.velocity.Length() > 9.0) + { + for (int index33 = 1; index33 < n.oldPos.Length; ++index33) + { + ref Vector2 local = ref n.oldPos[index33]; + Microsoft.Xna.Framework.Color color54 = color1; + color54.R = (byte) (0.5 * (double) color54.R * (double) (10 - index33) / 20.0); + color54.G = (byte) (0.5 * (double) color54.G * (double) (10 - index33) / 20.0); + color54.B = (byte) (0.5 * (double) color54.B * (double) (10 - index33) / 20.0); + color54.A = (byte) (0.5 * (double) color54.A * (double) (10 - index33) / 20.0); + Microsoft.Xna.Framework.Rectangle frame6 = n.frame; + int num197 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + frame6.Y -= num197 * index33; + while (frame6.Y < 0) + frame6.Y += num197 * Main.npcFrameCount[type]; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index33].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index33].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame6), color54, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + break; + } + break; + } + break; + } + break; + } + } + if (type == 479 && (double) n.velocity.Length() > 6.5) + { + for (int index34 = 1; index34 < n.oldPos.Length; ++index34) + { + ref Vector2 local = ref n.oldPos[index34]; + Microsoft.Xna.Framework.Color color55 = color1; + color55.R = (byte) (0.5 * (double) color55.R * (double) (10 - index34) / 20.0); + color55.G = (byte) (0.5 * (double) color55.G * (double) (10 - index34) / 20.0); + color55.B = (byte) (0.5 * (double) color55.B * (double) (10 - index34) / 20.0); + color55.A = (byte) (0.5 * (double) color55.A * (double) (10 - index34) / 20.0); + Microsoft.Xna.Framework.Rectangle frame7 = n.frame; + int num198 = Main.npcTexture[type].Height / Main.npcFrameCount[type]; + frame7.Y -= num198 * index34; + while (frame7.Y < 0) + frame7.Y += num198 * Main.npcFrameCount[type]; + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index34].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index34].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame7), color55, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + } + else if (type == 472) + Main.spriteBatch.Draw(Main.glowMaskTexture[110], new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + else if (n.aiStyle == 87) + { + if ((int) n.ai[0] == 4 || (double) n.ai[0] == 5.0 || (double) n.ai[0] == 6.0) + { + for (int index35 = 1; index35 < n.oldPos.Length; ++index35) + { + ref Vector2 local = ref n.oldPos[index35]; + Microsoft.Xna.Framework.Color color56 = color1; + color56.R = (byte) (0.5 * (double) color56.R * (double) (10 - index35) / 20.0); + color56.G = (byte) (0.5 * (double) color56.G * (double) (10 - index35) / 20.0); + color56.B = (byte) (0.5 * (double) color56.B * (double) (10 - index35) / 20.0); + color56.A = (byte) (0.5 * (double) color56.A * (double) (10 - index35) / 20.0); + Main.spriteBatch.Draw(Main.npcTexture[type], new Vector2((float) ((double) n.oldPos[index35].X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) n.oldPos[index35].Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(n.frame), color56, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + } + } + } + else + { + switch (type) + { + case 50: + Texture2D texture2D25 = Main.extraTexture[39]; + Vector2 center5 = n.Center; + float num199 = 0.0f; + switch (n.frame.Y / (Main.npcTexture[type].Height / Main.npcFrameCount[type])) + { + case 0: + num199 = 2f; + break; + case 1: + num199 = -6f; + break; + case 2: + num199 = 2f; + break; + case 3: + num199 = 10f; + break; + case 4: + num199 = 2f; + break; + case 5: + num199 = 0.0f; + break; + } + center5.Y += n.gfxOffY - (70f - num199) * n.scale; + Main.spriteBatch.Draw(texture2D25, center5 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color1, 0.0f, texture2D25.Size() / 2f, 1f, spriteEffects, 0.0f); + break; + case 405: + Main.spriteBatch.Draw(Main.glowMaskTexture[141], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 406: + Main.spriteBatch.Draw(Main.glowMaskTexture[142], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 407: + Main.spriteBatch.Draw(Main.glowMaskTexture[139], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 409: + Main.spriteBatch.Draw(Main.glowMaskTexture[138], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 410: + Main.spriteBatch.Draw(Main.glowMaskTexture[137], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 411: + Main.spriteBatch.Draw(Main.glowMaskTexture[136], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 418: + Main.spriteBatch.Draw(Main.glowMaskTexture[161], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float num200 = (float) (0.25 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.25); + for (int index36 = 0; index36 < 4; ++index36) + Main.spriteBatch.Draw(Main.glowMaskTexture[161], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index36 * 1.57079637050629) * num200, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 420: + Main.spriteBatch.Draw(Main.glowMaskTexture[147], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 421: + Main.spriteBatch.Draw(Main.glowMaskTexture[146], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 423: + Main.spriteBatch.Draw(Main.glowMaskTexture[145], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 424: + Main.spriteBatch.Draw(Main.glowMaskTexture[144], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 425: + Main.spriteBatch.Draw(Main.glowMaskTexture[150], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 429: + Main.spriteBatch.Draw(Main.glowMaskTexture[151], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + default: + if (type >= 412 && type <= 414) + { + Microsoft.Xna.Framework.Color color57 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, 0); + int index37 = 157 + type - 412; + if (type == 414 && (double) n.localAI[2] != 0.0) + { + int num201 = (int) n.localAI[2]; + if ((double) n.localAI[2] < 0.0) + num201 = 128 + (int) n.localAI[2]; + int num202 = (int) byte.MaxValue - num201; + color57 = new Microsoft.Xna.Framework.Color(num202, num201, num201, num202); + } + Main.spriteBatch.Draw(Main.glowMaskTexture[index37], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), color57, n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 160: + Main.spriteBatch.Draw(Main.glowMaskTexture[166], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 209: + Main.spriteBatch.Draw(Main.glowMaskTexture[167], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(128 - n.alpha / 2, 128 - n.alpha / 2, 128 - n.alpha / 2, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 415: + Main.spriteBatch.Draw(Main.glowMaskTexture[155], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float num203 = (float) (0.5 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.5); + for (int index38 = 0; index38 < 4; ++index38) + Main.spriteBatch.Draw(Main.glowMaskTexture[155], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index38 * 1.57079637050629) * num203, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 417: + Main.spriteBatch.Draw(Main.glowMaskTexture[160], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float num204 = (float) (0.25 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.25); + for (int index39 = 0; index39 < 4; ++index39) + Main.spriteBatch.Draw(Main.glowMaskTexture[160], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index39 * 1.57079637050629) * num204, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 419: + Main.spriteBatch.Draw(Main.glowMaskTexture[154], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + if ((double) n.ai[2] >= -6.0) + { + float num205 = (float) (0.5 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.5); + for (int index40 = 0; index40 < 4; ++index40) + Main.spriteBatch.Draw(Main.glowMaskTexture[154], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index40 * 1.57079637050629) * num205, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + float num206 = 4f; + for (int index41 = 0; index41 < 4; ++index41) + Main.spriteBatch.Draw(Main.glowMaskTexture[154], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + Vector2.UnitX.RotatedBy((double) index41 * 1.57079637050629) * num206, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 516: + Main.spriteBatch.Draw(Main.npcTexture[type], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + float num207 = (float) (0.5 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.5); + for (int index42 = 0; index42 < 4; ++index42) + Main.spriteBatch.Draw(Main.npcTexture[type], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index42 * 1.57079637050629) * num207, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 518: + Vector2 vector2_40 = new Vector2(-10f, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[163], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha, (int) byte.MaxValue - n.alpha), n.rotation, vector2_3 + vector2_40, n.scale, spriteEffects, 0.0f); + float num208 = (float) (0.5 + (double) (n.GetAlpha(color1).ToVector3() - new Vector3(0.5f)).Length() * 0.5); + for (int index43 = 0; index43 < 4; ++index43) + Main.spriteBatch.Draw(Main.glowMaskTexture[163], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY) + n.velocity.RotatedBy((double) index43 * 1.57079637050629) * num208, new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), n.rotation, vector2_3 + vector2_40, n.scale, spriteEffects, 0.0f); + break; + case 525: + Main.spriteBatch.Draw(Main.glowMaskTexture[169], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 526: + Main.spriteBatch.Draw(Main.glowMaskTexture[170], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 527: + Main.spriteBatch.Draw(Main.glowMaskTexture[171], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + case 533: + Main.spriteBatch.Draw(Main.glowMaskTexture[172], n.Bottom - Main.screenPosition + new Vector2((float) ((double) -Main.npcTexture[type].Width * (double) n.scale / 2.0 + (double) vector2_3.X * (double) n.scale), (float) ((double) -Main.npcTexture[type].Height * (double) n.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) vector2_3.Y * (double) n.scale) + addHeight + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(n.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100), n.rotation, vector2_3, n.scale, spriteEffects, 0.0f); + break; + } + break; + } + } + if (n.aiStyle != 7) + break; + this.DrawNPCExtras(n, false, addHeight, addY, color1, vector2_3, spriteEffects); + break; + } + } + } + + protected void DrawNPCExtras( + NPC n, + bool beforeDraw, + float addHeight, + float addY, + Microsoft.Xna.Framework.Color npcColor, + Vector2 halfSize, + SpriteEffects npcSpriteEffect) + { + 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 = Main.extraTexture[72]; + 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; + Vector2 vector2 = n.Top + new Vector2((float) (-2 * n.spriteDirection), n.gfxOffY); + vector2.Y += (float) npCsFramingGroup[index]; + vector2.Y += (float) NPCID.Sets.HatOffsetY[n.type]; + int num2 = 0; + if ((double) n.ai[0] == 5.0) + { + num2 = -4; + if (n.type == 38) + num2 = -8; + if (n.type == 124) + num2 = -2; + if (n.type == 550) + num2 = -4; + if (n.type == 108 || n.type == 178) + num2 = -6; + } + vector2.Y += (float) num2; + 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 num3 = 0; + switch (n.type) + { + case 17: + case 18: + case 19: + case 20: + case 22: + case 124: + case 229: + case 353: + num3 = -1; + break; + case 37: + case 38: + case 54: + case 107: + case 108: + case 160: + case 207: + case 209: + num3 = -3; + break; + case 178: + case 208: + case 369: + num3 = 1; + break; + case 227: + num3 = -4; + break; + case 228: + num3 = -2; + break; + case 550: + num3 = -4; + break; + } + vector2.X += (float) (num3 * n.spriteDirection); + vector2.X += (float) (4 * n.spriteDirection); + Main.spriteBatch.Draw(texture2D, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(r), npcColor, 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 num4 = (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) (num4 * 1.57079637050629) * (float) n.spriteDirection; + float num5 = 1f; + int itemtype = 0; + int num6 = 4; + if (n.type == 19) + { + itemtype = Main.hardMode ? 98 : 95; + if (Main.hardMode) + { + vector2_2.X -= (float) (10 * n.direction); + vector2_2.Y += 4f; + } + } + else if (n.type == 22) + { + itemtype = 39; + num6 = 18; + } + else if (n.type == 178) + itemtype = 434; + else if (n.type == 227) + { + itemtype = 3350; + num6 = 16; + num5 = 0.85f; + } + else if (n.type == 368) + { + itemtype = Main.hardMode ? 2223 : 2269; + if (Main.hardMode) + { + num6 = 18; + } + else + { + if ((double) n.ai[2] < -0.100000001490116) + num6 = 28; + num5 = 0.75f; + } + } + Texture2D texture = Main.itemTexture[itemtype]; + int num7 = (int) this.DrawPlayerItemPos(1f, itemtype).X - num6; + Vector2 origin = new Vector2((float) -num7, (float) (texture.Height / 2)); + if (n.spriteDirection == -1) + origin = new Vector2((float) (texture.Width + num7), (float) (texture.Height / 2)); + Main.spriteBatch.Draw(texture, new Vector2((float) (int) ((double) vector2_2.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_2.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(), npcColor, rotation, origin, n.scale * num5, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + if (n.type == 22 && n.frame.Y / (Main.npcTexture[n.type].Height / Main.npcFrameCount[n.type]) >= 21) + { + Texture2D texture2D = Main.extraTexture[52]; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 5, frameY: (n.frame.Y / (Main.npcTexture[n.type].Height / Main.npcFrameCount[n.type]) - 21)); + Main.spriteBatch.Draw(texture2D, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[n.type].Width * (double) n.scale / 2.0 + (double) halfSize.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[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 / (Main.npcTexture[n.type].Height / Main.npcFrameCount[n.type]) >= 21) + { + Texture2D texture2D = Main.extraTexture[53]; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 5, frameY: (n.frame.Y / (Main.npcTexture[n.type].Height / Main.npcFrameCount[n.type]) - 21)); + Main.spriteBatch.Draw(texture2D, new Vector2((float) ((double) n.position.X - (double) Main.screenPosition.X + (double) (n.width / 2) - (double) Main.npcTexture[n.type].Width * (double) n.scale / 2.0 + (double) halfSize.X * (double) n.scale), (float) ((double) n.position.Y - (double) Main.screenPosition.Y + (double) n.height - (double) Main.npcTexture[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 = Main.extraTexture[51]; + 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) Main.screenPosition.X), (float) (int) ((double) vector2.Y - (double) Main.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) + { + Texture2D texture2D = Main.itemTexture[4]; + int num8 = 32; + float num9 = 0.0f; + Vector2 zero = Vector2.Zero; + if (n.type == 207) + { + texture2D = Main.itemTexture[3349]; + num9 = 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) + { + texture2D = Main.itemTexture[3352]; + num9 = 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) + { + texture2D = Main.itemTexture[3351]; + num8 = 28; + num9 = 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, num8, num8); + Vector2 vector2 = swingStats.Item1 + (swingStats.Item1 - n.Center) * num9 + 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) Main.screenPosition.X), (float) (int) ((double) vector2.Y - (double) Main.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) + return; + Texture2D texture2D1 = Main.itemTexture[353]; + int num10 = 32; + float num11 = 0.0f; + Vector2 zero1 = Vector2.Zero; + if (n.type == 550) + { + texture2D1 = Main.itemTexture[353]; + num11 = 0.15f; + if (beforeDraw) + return; + } + 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 num12 = (double) player.Hitbox.Distance(n.Center); + float num13 = n.localAI[3]; + if (num12 < 46.0 & flag) + { + n.localAI[3] = 1f; + if ((double) n.localAI[3] != (double) num13) + { + 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, num10, num10); + Vector2 vector2_5 = swingStats1.Item1 + (swingStats1.Item1 - n.Center) * num11 + zero1; + Vector2 origin1 = texture2D1.Size() * new Vector2(n.spriteDirection == 1 ? 0.0f : 1f, 1f); + Main.spriteBatch.Draw(texture2D1, new Vector2((float) (int) ((double) vector2_5.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_5.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(), n.GetAlpha(npcColor), swingStats1.Item2, origin1, n.scale, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + } + + public void DrawProj(int i) + { + float x1 = 0.0f; + float y1 = 0.0f; + Projectile projectile = Main.projectile[i]; + this.LoadProjectile(projectile.type); + Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter; + if (projectile.aiStyle == 99) + { + Vector2 vector2 = mountedCenter; + vector2.Y += Main.player[projectile.owner].gfxOffY; + float num1 = projectile.Center.X - vector2.X; + float num2 = projectile.Center.Y - vector2.Y; + Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float num3 = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + if (!projectile.counterweight) + { + int num4 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) Main.player[projectile.owner].position.X + (double) (Main.player[projectile.owner].width / 2)) + num4 = 1; + int num5 = num4 * -1; + Main.player[projectile.owner].itemRotation = (float) Math.Atan2((double) num2 * (double) num5, (double) num1 * (double) num5); + } + bool flag = true; + if ((double) num1 == 0.0 && (double) num2 == 0.0) + { + flag = false; + } + else + { + float num6 = 12f / (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float num7 = num1 * num6; + float num8 = num2 * num6; + vector2.X -= num7 * 0.1f; + vector2.Y -= num8 * 0.1f; + num1 = projectile.position.X + (float) projectile.width * 0.5f - vector2.X; + num2 = projectile.position.Y + (float) projectile.height * 0.5f - vector2.Y; + } + while (flag) + { + float num9 = 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) + { + num9 = f1 - 8f; + flag = false; + } + float num10 = 12f / f1; + float num11 = num1 * num10; + float num12 = num2 * num10; + vector2.X += num11; + vector2.Y += num12; + num1 = projectile.position.X + (float) projectile.width * 0.5f - vector2.X; + num2 = projectile.position.Y + (float) projectile.height * 0.1f - vector2.Y; + if ((double) f2 > 12.0) + { + float num13 = 0.3f; + float num14 = Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y); + if ((double) num14 > 16.0) + num14 = 16f; + float num15 = (float) (1.0 - (double) num14 / 16.0); + float num16 = num13 * num15; + float num17 = f2 / 80f; + if ((double) num17 > 1.0) + num17 = 1f; + float num18 = num16 * num17; + if ((double) num18 < 0.0) + num18 = 0.0f; + float num19 = num18 * num17 * 0.5f; + if ((double) num2 > 0.0) + { + num2 *= 1f + num19; + num1 *= 1f - num19; + } + else + { + float num20 = Math.Abs(projectile.velocity.X) / 3f; + if ((double) num20 > 1.0) + num20 = 1f; + float num21 = num20 - 0.5f; + float num22 = num19 * num21; + if ((double) num22 > 0.0) + num22 *= 2f; + num2 *= 1f + num22; + num1 *= 1f - num22; + } + } + float rotation = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + int stringColor = Main.player[projectile.owner].stringColor; + Microsoft.Xna.Framework.Color color = WorldGen.paintColor(stringColor); + if (color.R < (byte) 75) + color.R = (byte) 75; + if (color.G < (byte) 75) + color.G = (byte) 75; + if (color.B < (byte) 75) + color.B = (byte) 75; + switch (stringColor) + { + case 0: + case 14: + color = new Microsoft.Xna.Framework.Color(200, 200, 200); + break; + case 13: + color = new Microsoft.Xna.Framework.Color(20, 20, 20); + break; + case 27: + color = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + break; + case 28: + color = new Microsoft.Xna.Framework.Color(163, 116, 91); + break; + } + color.A = (byte) ((double) color.A * 0.400000005960464); + float num23 = 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) num23), (int) (byte) ((double) color.G * (double) num23), (int) (byte) ((double) color.B * (double) num23), (int) (byte) ((double) color.A * (double) num23)); + Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2((float) ((double) vector2.X - (double) Main.screenPosition.X + (double) Main.fishingLineTexture.Width * 0.5), (float) ((double) vector2.Y - (double) Main.screenPosition.Y + (double) Main.fishingLineTexture.Height * 0.5)) - new Vector2(6f, 0.0f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.fishingLineTexture.Width, (int) num9)), color, rotation, new Vector2((float) Main.fishingLineTexture.Width * 0.5f, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + } + } + if (projectile.bobber && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].holdStyle > 0) + { + x1 = mountedCenter.X; + y1 = mountedCenter.Y + Main.player[projectile.owner].gfxOffY; + int type = Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type; + float gravDir = Main.player[projectile.owner].gravDir; + switch (type) + { + case 2289: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 36f * gravDir; + break; + case 2291: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 34f * gravDir; + break; + case 2292: + x1 += (float) (46 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 34f * gravDir; + break; + case 2293: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 34f * gravDir; + break; + case 2294: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 30f * gravDir; + break; + case 2295: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 30f * gravDir; + break; + case 2296: + x1 += (float) (43 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 30f * gravDir; + break; + case 2421: + x1 += (float) (47 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 36f * gravDir; + break; + case 2422: + x1 += (float) (47 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + x1 -= 13f; + y1 -= 32f * gravDir; + break; + } + if ((double) gravDir == -1.0) + y1 -= 12f; + Vector2 vector2_1 = new Vector2(x1, y1); + Vector2 vector2_2 = Main.player[projectile.owner].RotatedRelativePoint(vector2_1 + new Vector2(8f)) - new Vector2(8f); + float num24 = projectile.position.X + (float) projectile.width * 0.5f - vector2_2.X; + float num25 = projectile.position.Y + (float) projectile.height * 0.5f - vector2_2.Y; + Math.Sqrt((double) num24 * (double) num24 + (double) num25 * (double) num25); + float num26 = (float) Math.Atan2((double) num25, (double) num24) - 1.57f; + bool flag = true; + if ((double) num24 == 0.0 && (double) num25 == 0.0) + { + flag = false; + } + else + { + float num27 = 12f / (float) Math.Sqrt((double) num24 * (double) num24 + (double) num25 * (double) num25); + float num28 = num24 * num27; + float num29 = num25 * num27; + vector2_2.X -= num28; + vector2_2.Y -= num29; + num24 = projectile.position.X + (float) projectile.width * 0.5f - vector2_2.X; + num25 = projectile.position.Y + (float) projectile.height * 0.5f - vector2_2.Y; + } + while (flag) + { + float num30 = 12f; + float f3 = (float) Math.Sqrt((double) num24 * (double) num24 + (double) num25 * (double) num25); + float f4 = f3; + if (float.IsNaN(f3) || float.IsNaN(f4)) + { + flag = false; + } + else + { + if ((double) f3 < 20.0) + { + num30 = f3 - 8f; + flag = false; + } + float num31 = 12f / f3; + float num32 = num24 * num31; + float num33 = num25 * num31; + vector2_2.X += num32; + vector2_2.Y += num33; + num24 = projectile.position.X + (float) projectile.width * 0.5f - vector2_2.X; + num25 = projectile.position.Y + (float) projectile.height * 0.1f - vector2_2.Y; + if ((double) f4 > 12.0) + { + float num34 = 0.3f; + float num35 = Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y); + if ((double) num35 > 16.0) + num35 = 16f; + float num36 = (float) (1.0 - (double) num35 / 16.0); + float num37 = num34 * num36; + float num38 = f4 / 80f; + if ((double) num38 > 1.0) + num38 = 1f; + float num39 = num37 * num38; + if ((double) num39 < 0.0) + num39 = 0.0f; + float num40 = (float) (1.0 - (double) projectile.localAI[0] / 100.0); + float num41 = num39 * num40; + if ((double) num25 > 0.0) + { + num25 *= 1f + num41; + num24 *= 1f - num41; + } + else + { + float num42 = Math.Abs(projectile.velocity.X) / 3f; + if ((double) num42 > 1.0) + num42 = 1f; + float num43 = num42 - 0.5f; + float num44 = num41 * num43; + if ((double) num44 > 0.0) + num44 *= 2f; + num25 *= 1f + num44; + num24 *= 1f - num44; + } + } + float rotation = (float) Math.Atan2((double) num25, (double) num24) - 1.57f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color(200, 200, 200, 100)); + if (type == 2294) + color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color(100, 180, 230, 100)); + if (type == 2295) + color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color(250, 90, 70, 100)); + if (type == 2293) + color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color(203, 190, 210, 100)); + if (type == 2421) + color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color(183, 77, 112, 100)); + if (type == 2422) + color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 226, 116, 100)); + Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2((float) ((double) vector2_2.X - (double) Main.screenPosition.X + (double) Main.fishingLineTexture.Width * 0.5), (float) ((double) vector2_2.Y - (double) Main.screenPosition.Y + (double) Main.fishingLineTexture.Height * 0.5)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.fishingLineTexture.Width, (int) num30)), color, rotation, new Vector2((float) Main.fishingLineTexture.Width * 0.5f, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 32) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num45 = mountedCenter.X - vector2.X; + float num46 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num46, (double) num45) - 1.57f; + bool flag = true; + if ((double) num45 == 0.0 && (double) num46 == 0.0) + { + flag = false; + } + else + { + float num47 = 8f / (float) Math.Sqrt((double) num45 * (double) num45 + (double) num46 * (double) num46); + float num48 = num45 * num47; + float num49 = num46 * num47; + vector2.X -= num48; + vector2.Y -= num49; + num45 = mountedCenter.X - vector2.X; + num46 = mountedCenter.Y - vector2.Y; + } + while (flag) + { + float f = (float) Math.Sqrt((double) num45 * (double) num45 + (double) num46 * (double) num46); + if ((double) f < 28.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num50 = 28f / f; + float num51 = num45 * num50; + float num52 = num46 * num50; + vector2.X += num51; + vector2.Y += num52; + num45 = mountedCenter.X - vector2.X; + num46 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain5Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain5Texture.Width, Main.chain5Texture.Height)), color, rotation, new Vector2((float) Main.chain5Texture.Width * 0.5f, (float) Main.chain5Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 73) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num53 = mountedCenter.X - vector2.X; + float num54 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num54, (double) num53) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num53 * (double) num53 + (double) num54 * (double) num54); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num55 = 12f / f; + float num56 = num53 * num55; + float num57 = num54 * num55; + vector2.X += num56; + vector2.Y += num57; + num53 = mountedCenter.X - vector2.X; + num54 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain8Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain8Texture.Width, Main.chain8Texture.Height)), color, rotation, new Vector2((float) Main.chain8Texture.Width * 0.5f, (float) Main.chain8Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 186) + { + Vector2 vector2 = new Vector2(projectile.localAI[0], projectile.localAI[1]); + float num58 = Vector2.Distance(projectile.Center, vector2) - projectile.velocity.Length(); + float num59 = (float) Main.chain17Texture.Height - num58; + if ((double) num58 > 0.0 && (double) projectile.ai[1] > 0.0) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) projectile.position.X / 16, (int) projectile.position.Y / 16); + Main.spriteBatch.Draw(Main.chain17Texture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, (int) num59, Main.chain17Texture.Width, (int) num58)), color, projectile.rotation, new Vector2((float) (Main.chain17Texture.Width / 2), 0.0f), 1f, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 74) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num60 = mountedCenter.X - vector2.X; + float num61 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num61, (double) num60) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num60 * (double) num60 + (double) num61 * (double) num61); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num62 = 12f / f; + float num63 = num60 * num62; + float num64 = num61 * num62; + vector2.X += num63; + vector2.Y += num64; + num60 = mountedCenter.X - vector2.X; + num61 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain9Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain8Texture.Width, Main.chain8Texture.Height)), color, rotation, new Vector2((float) Main.chain8Texture.Width * 0.5f, (float) Main.chain8Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 171) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num65 = -projectile.velocity.X; + float num66 = -projectile.velocity.Y; + float num67 = 1f; + if ((double) projectile.ai[0] <= 17.0) + num67 = projectile.ai[0] / 17f; + int length = (int) (30.0 * (double) num67); + float num68 = 1f; + if ((double) projectile.ai[0] <= 30.0) + num68 = projectile.ai[0] / 30f; + float num69 = 0.4f * num68; + float num70 = num69; + float num71 = num66 + num70; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num72 = (float) Math.Sqrt((double) num65 * (double) num65 + (double) num71 * (double) num71); + float num73 = 5.6f; + if ((double) Math.Abs(num65) + (double) Math.Abs(num71) < 1.0) + num73 *= Math.Abs(num65) + Math.Abs(num71) / 1f; + float num74 = num73 / num72; + float num75 = num65 * num74; + float num76 = num71 * num74; + float num77 = (float) Math.Atan2((double) num76, (double) num75) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num77; + vector2.X += num75; + vector2.Y += num76; + num65 = -projectile.velocity.X; + float num78 = -projectile.velocity.Y; + num70 += num69; + num71 = num78 + num70; + } + int num79; + for (int index = num79 = 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.spriteBatch.Draw(Main.chain16Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain16Texture.Width, Main.chain16Texture.Height)), color, rotation, new Vector2((float) Main.chain16Texture.Width * 0.5f, (float) Main.chain16Texture.Height * 0.5f), 0.8f, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 475) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num80 = -projectile.velocity.X; + float num81 = -projectile.velocity.Y; + float num82 = 1f; + if ((double) projectile.ai[0] <= 17.0) + num82 = projectile.ai[0] / 17f; + int length = (int) (30.0 * (double) num82); + float num83 = 1f; + if ((double) projectile.ai[0] <= 30.0) + num83 = projectile.ai[0] / 30f; + float num84 = 0.4f * num83; + float num85 = num84; + float num86 = num81 + num85; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num87 = (float) Math.Sqrt((double) num80 * (double) num80 + (double) num86 * (double) num86); + float num88 = 5.6f; + if ((double) Math.Abs(num80) + (double) Math.Abs(num86) < 1.0) + num88 *= Math.Abs(num80) + Math.Abs(num86) / 1f; + float num89 = num88 / num87; + float num90 = num80 * num89; + float num91 = num86 * num89; + float num92 = (float) Math.Atan2((double) num91, (double) num90) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num92; + vector2.X += num90; + vector2.Y += num91; + num80 = -projectile.velocity.X; + float num93 = -projectile.velocity.Y; + num85 += num84; + num86 = num93 + num85; + } + int num94 = 0; + int num95; + for (int index = num95 = 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 (num94 % 2 == 0) + Main.spriteBatch.Draw(Main.chain38Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain38Texture.Width, Main.chain38Texture.Height)), color, rotation, new Vector2((float) Main.chain38Texture.Width * 0.5f, (float) Main.chain38Texture.Height * 0.5f), 0.8f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.chain39Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain39Texture.Width, Main.chain39Texture.Height)), color, rotation, new Vector2((float) Main.chain39Texture.Width * 0.5f, (float) Main.chain39Texture.Height * 0.5f), 0.8f, SpriteEffects.None, 0.0f); + ++num94; + } + } + else if (projectile.type == 505 || projectile.type == 506) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num96 = -projectile.velocity.X; + float num97 = -projectile.velocity.Y; + float num98 = 1f; + if ((double) projectile.ai[0] <= 17.0) + num98 = projectile.ai[0] / 17f; + int length = (int) (30.0 * (double) num98); + float num99 = 1f; + if ((double) projectile.ai[0] <= 30.0) + num99 = projectile.ai[0] / 30f; + float num100 = 0.4f * num99; + float num101 = num100; + float num102 = num97 + num101; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num103 = (float) Math.Sqrt((double) num96 * (double) num96 + (double) num102 * (double) num102); + float num104 = 5.6f; + if ((double) Math.Abs(num96) + (double) Math.Abs(num102) < 1.0) + num104 *= Math.Abs(num96) + Math.Abs(num102) / 1f; + float num105 = num104 / num103; + float num106 = num96 * num105; + float num107 = num102 * num105; + float num108 = (float) Math.Atan2((double) num107, (double) num106) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num108; + vector2.X += num106; + vector2.Y += num107; + num96 = -projectile.velocity.X; + float num109 = -projectile.velocity.Y; + num101 += num100; + num102 = num109 + num101; + } + int num110 = 0; + int num111; + for (int index1 = num111 = 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 num112 = 4; + if (projectile.type == 506) + num112 = 6; + int index2 = num112 + num110 % 2; + Main.spriteBatch.Draw(Main.chainsTexture[index2], new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chainsTexture[index2].Width, Main.chainsTexture[index2].Height)), color, rotation, new Vector2((float) Main.chainsTexture[index2].Width * 0.5f, (float) Main.chainsTexture[index2].Height * 0.5f), 0.8f, SpriteEffects.None, 0.0f); + ++num110; + } + } + else if (projectile.type == 165) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num113 = mountedCenter.X - vector2.X; + float num114 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num114, (double) num113) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num113 * (double) num113 + (double) num114 * (double) num114); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num115 = 24f / f; + float num116 = num113 * num115; + float num117 = num114 * num115; + vector2.X += num116; + vector2.Y += num117; + num113 = mountedCenter.X - vector2.X; + num114 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain15Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain15Texture.Width, Main.chain15Texture.Height)), color, rotation, new Vector2((float) Main.chain15Texture.Width * 0.5f, (float) Main.chain15Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type >= 230 && projectile.type <= 235) + { + int index = projectile.type - 229; + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num118 = mountedCenter.X - vector2.X; + float num119 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num119, (double) num118) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num118 * (double) num118 + (double) num119 * (double) num119); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num120 = (float) Main.gemChainTexture[index].Height / f; + float num121 = num118 * num120; + float num122 = num119 * num120; + vector2.X += num121; + vector2.Y += num122; + num118 = mountedCenter.X - vector2.X; + num119 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.gemChainTexture[index], new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.gemChainTexture[index].Width, Main.gemChainTexture[index].Height)), color, rotation, new Vector2((float) Main.gemChainTexture[index].Width * 0.5f, (float) Main.gemChainTexture[index].Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 256) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num123 = mountedCenter.X - vector2.X; + float num124 = mountedCenter.Y - vector2.Y; + float num125 = (float) Math.Atan2((double) num124, (double) num123) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num123 * (double) num123 + (double) num124 * (double) num124); + if ((double) f < 26.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num126 = 26f / f; + float num127 = num123 * num126; + float num128 = num124 * num126; + vector2.X += num127; + vector2.Y += num128; + num123 = Main.player[projectile.owner].position.X + (float) (Main.player[projectile.owner].width / 2) - vector2.X; + num124 = Main.player[projectile.owner].position.Y + (float) (Main.player[projectile.owner].height / 2) - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain20Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain20Texture.Width, Main.chain20Texture.Height)), color, num125 - 0.785f, new Vector2((float) Main.chain20Texture.Width * 0.5f, (float) Main.chain20Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 322) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num129 = mountedCenter.X - vector2.X; + float num130 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num130, (double) num129) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num129 * (double) num129 + (double) num130 * (double) num130); + if ((double) f < 22.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num131 = 22f / f; + float num132 = num129 * num131; + float num133 = num130 * num131; + vector2.X += num132; + vector2.Y += num133; + num129 = mountedCenter.X - vector2.X; + num130 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain29Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain29Texture.Width, Main.chain29Texture.Height)), color, rotation, new Vector2((float) Main.chain29Texture.Width * 0.5f, (float) Main.chain29Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 315) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num134 = mountedCenter.X - vector2.X; + float num135 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num135, (double) num134) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num134 * (double) num134 + (double) num135 * (double) num135); + if ((double) f < 50.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num136 = 40f / f; + float num137 = num134 * num136; + float num138 = num135 * num136; + vector2.X += num137; + vector2.Y += num138; + num134 = mountedCenter.X - vector2.X; + num135 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain28Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain28Texture.Width, Main.chain28Texture.Height)), color, rotation, new Vector2((float) Main.chain28Texture.Width * 0.5f, (float) Main.chain28Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 331) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num139 = mountedCenter.X - vector2.X; + float num140 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num140, (double) num139) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num139 * (double) num139 + (double) num140 * (double) num140); + if ((double) f < 30.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num141 = 24f / f; + float num142 = num139 * num141; + float num143 = num140 * num141; + vector2.X += num142; + vector2.Y += num143; + num139 = mountedCenter.X - vector2.X; + num140 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain30Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain30Texture.Width, Main.chain30Texture.Height)), color, rotation, new Vector2((float) Main.chain30Texture.Width * 0.5f, (float) Main.chain30Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 332) + { + int num144 = 0; + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num145 = mountedCenter.X - vector2.X; + float num146 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num146, (double) num145) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num145 * (double) num145 + (double) num146 * (double) num146); + 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 (num144 == 0) + Lighting.AddLight(i1, j, 0.0f, 0.2f, 0.2f); + if (num144 == 1) + Lighting.AddLight(i1, j, 0.1f, 0.2f, 0.0f); + if (num144 == 2) + Lighting.AddLight(i1, j, 0.2f, 0.1f, 0.0f); + if (num144 == 3) + Lighting.AddLight(i1, j, 0.2f, 0.0f, 0.2f); + float num147 = 16f / f; + float num148 = num145 * num147; + float num149 = num146 * num147; + vector2.X += num148; + vector2.Y += num149; + num145 = mountedCenter.X - vector2.X; + num146 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain31Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.chain31Texture.Height / 4 * num144, Main.chain31Texture.Width, Main.chain31Texture.Height / 4)), color, rotation, new Vector2((float) Main.chain30Texture.Width * 0.5f, (float) (Main.chain30Texture.Height / 8)), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.chain32Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.chain31Texture.Height / 4 * num144, Main.chain31Texture.Width, Main.chain31Texture.Height / 4)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rotation, new Vector2((float) Main.chain30Texture.Width * 0.5f, (float) (Main.chain30Texture.Height / 8)), 1f, SpriteEffects.None, 0.0f); + ++num144; + if (num144 > 3) + num144 = 0; + } + } + } + else if (projectile.type == 372 || projectile.type == 383 || projectile.type == 396 || projectile.type == 403 || projectile.type == 404 || projectile.type == 446 || projectile.type >= 486 && projectile.type <= 489 || projectile.type >= 646 && projectile.type <= 649 || projectile.type == 652) + { + Texture2D texture1 = (Texture2D) null; + Microsoft.Xna.Framework.Color color1 = Microsoft.Xna.Framework.Color.Transparent; + Texture2D texture2 = Main.chain33Texture; + if (projectile.type == 383) + texture2 = Main.chain34Texture; + if (projectile.type == 396) + texture2 = Main.chain35Texture; + if (projectile.type == 403) + texture2 = Main.chain36Texture; + if (projectile.type == 404) + texture2 = Main.chain37Texture; + if (projectile.type == 446) + texture2 = Main.extraTexture[3]; + if (projectile.type >= 486 && projectile.type <= 489) + texture2 = Main.chainsTexture[projectile.type - 486]; + if (projectile.type >= 646 && projectile.type <= 649) + { + texture2 = Main.chainsTexture[projectile.type - 646 + 8]; + texture1 = Main.chainsTexture[projectile.type - 646 + 12]; + color1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + if (projectile.type == 652) + texture2 = Main.chainsTexture[16]; + Vector2 position = projectile.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 num150 = 0.0f; + if (projectile.type == 446) + { + int num151 = 7; + int num152 = (int) projectile.localAI[0] / num151; + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, texture2.Height / 4 * num152, texture2.Width, texture2.Height / 4)); + origin.Y /= 4f; + height /= 4f; + } + switch (projectile.type) + { + case 383: + num150 = 14f; + break; + case 446: + num150 = 20f; + break; + case 487: + num150 = 8f; + break; + case 489: + num150 = 10f; + break; + } + if ((double) num150 != 0.0) + { + float num153 = -1.57f; + Vector2 vector2_3 = new Vector2((float) Math.Cos((double) projectile.rotation + (double) num153), (float) Math.Sin((double) projectile.rotation + (double) num153)); + Vector2 vector2_4 = position - vector2_3 * num150; + Vector2 vector2_5 = mountedCenter - vector2_4; + vector2_5.Normalize(); + position = vector2_4 - vector2_5 * height / 2f; + } + Vector2 vector2_6 = mountedCenter - position; + float rotation = (float) Math.Atan2((double) vector2_6.Y, (double) vector2_6.X) - 1.57f; + bool flag = true; + if (float.IsNaN(position.X) && float.IsNaN(position.Y)) + flag = false; + if (float.IsNaN(vector2_6.X) && float.IsNaN(vector2_6.Y)) + flag = false; + while (flag) + { + if ((double) vector2_6.Length() < (double) height + 1.0) + { + flag = false; + } + else + { + Vector2 vector2_7 = vector2_6; + vector2_7.Normalize(); + position += vector2_7 * height; + vector2_6 = mountedCenter - position; + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int) position.X / 16, (int) ((double) position.Y / 16.0)); + if (projectile.type == 396) + color2 *= (float) ((int) byte.MaxValue - projectile.alpha) / (float) byte.MaxValue; + if (projectile.type == 446) + color2 = projectile.GetAlpha(color2); + if (projectile.type == 488) + { + Lighting.AddLight(position, 0.2f, 0.0f, 0.175f); + color2 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + if (projectile.type >= 646 && projectile.type <= 649) + color2 = projectile.GetAlpha(color2); + Main.spriteBatch.Draw(texture2, position - Main.screenPosition, sourceRectangle, color2, rotation, origin, 1f, SpriteEffects.None, 0.0f); + if (texture1 != null) + Main.spriteBatch.Draw(texture1, position - Main.screenPosition, sourceRectangle, color1, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.aiStyle == 7) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num154 = mountedCenter.X - vector2.X; + float num155 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num155, (double) num154) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num154 * (double) num154 + (double) num155 * (double) num155); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num156 = 12f / f; + float num157 = num154 * num156; + float num158 = num155 * num156; + vector2.X += num157; + vector2.Y += num158; + num154 = mountedCenter.X - vector2.X; + num155 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chainTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chainTexture.Width, Main.chainTexture.Height)), color, rotation, new Vector2((float) Main.chainTexture.Width * 0.5f, (float) Main.chainTexture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 262) + { + float x2 = projectile.Center.X; + float y2 = projectile.Center.Y; + float x3 = projectile.velocity.X; + float y3 = projectile.velocity.Y; + float num159 = 4f / (float) Math.Sqrt((double) x3 * (double) x3 + (double) y3 * (double) y3); + float x4; + float y4; + if ((double) projectile.ai[0] == 0.0) + { + x4 = x2 - projectile.velocity.X * num159; + y4 = y2 - projectile.velocity.Y * num159; + } + else + { + x4 = x2 + projectile.velocity.X * num159; + y4 = y2 + projectile.velocity.Y * num159; + } + Vector2 vector2 = new Vector2(x4, y4); + float num160 = mountedCenter.X - vector2.X; + float num161 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num161, (double) num160) - 1.57f; + if (projectile.alpha == 0) + { + int num162 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num162 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num161 * (double) num162, (double) num160 * (double) num162) : (float) Math.Atan2((double) num161 * (double) num162, (double) num160 * (double) num162); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num160 * (double) num160 + (double) num161 * (double) num161); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num163 = 12f / f; + float num164 = num160 * num163; + float num165 = num161 * num163; + vector2.X += num164; + vector2.Y += num165; + num160 = mountedCenter.X - vector2.X; + num161 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain22Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain22Texture.Width, Main.chain22Texture.Height)), color, rotation, new Vector2((float) Main.chain22Texture.Width * 0.5f, (float) Main.chain22Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 273) + { + float x5 = projectile.Center.X; + float y5 = projectile.Center.Y; + float x6 = projectile.velocity.X; + float y6 = projectile.velocity.Y; + float num166 = 4f / (float) Math.Sqrt((double) x6 * (double) x6 + (double) y6 * (double) y6); + float x7; + float y7; + if ((double) projectile.ai[0] == 0.0) + { + x7 = x5 - projectile.velocity.X * num166; + y7 = y5 - projectile.velocity.Y * num166; + } + else + { + x7 = x5 + projectile.velocity.X * num166; + y7 = y5 + projectile.velocity.Y * num166; + } + Vector2 vector2 = new Vector2(x7, y7); + float num167 = mountedCenter.X - vector2.X; + float num168 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num168, (double) num167) - 1.57f; + if (projectile.alpha == 0) + { + int num169 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num169 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num168 * (double) num169, (double) num167 * (double) num169) : (float) Math.Atan2((double) num168 * (double) num169, (double) num167 * (double) num169); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num167 * (double) num167 + (double) num168 * (double) num168); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num170 = 12f / f; + float num171 = num167 * num170; + float num172 = num168 * num170; + vector2.X += num171; + vector2.Y += num172; + num167 = mountedCenter.X - vector2.X; + num168 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain23Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain23Texture.Width, Main.chain23Texture.Height)), color, rotation, new Vector2((float) Main.chain23Texture.Width * 0.5f, (float) Main.chain23Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 481) + { + float x8 = projectile.Center.X; + float y8 = projectile.Center.Y; + float x9 = projectile.velocity.X; + float y9 = projectile.velocity.Y; + float num173 = 4f / (float) Math.Sqrt((double) x9 * (double) x9 + (double) y9 * (double) y9); + float x10; + float y10; + if ((double) projectile.ai[0] == 0.0) + { + x10 = x8 - projectile.velocity.X * num173; + y10 = y8 - projectile.velocity.Y * num173; + } + else + { + x10 = x8 + projectile.velocity.X * num173; + y10 = y8 + projectile.velocity.Y * num173; + } + Vector2 vector2 = new Vector2(x10, y10); + float num174 = mountedCenter.X - vector2.X; + float num175 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num175, (double) num174) - 1.57f; + if (projectile.alpha == 0) + { + int num176 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num176 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num175 * (double) num176, (double) num174 * (double) num176) : (float) Math.Atan2((double) num175 * (double) num176, (double) num174 * (double) num176); + } + bool flag = true; + while (flag) + { + float scale = 0.85f; + float f5 = (float) Math.Sqrt((double) num174 * (double) num174 + (double) num175 * (double) num175); + float num177 = f5; + if ((double) f5 < (double) Main.chain40Texture.Height * 1.5) + flag = false; + else if (float.IsNaN(f5)) + { + flag = false; + } + else + { + float num178 = (float) Main.chain40Texture.Height * scale / f5; + float num179 = num174 * num178; + float num180 = num175 * num178; + vector2.X += num179; + vector2.Y += num180; + num174 = mountedCenter.X - vector2.X; + num175 = mountedCenter.Y - vector2.Y; + if ((double) num177 > (double) (Main.chain40Texture.Height * 2)) + { + for (int index = 0; index < 2; ++index) + { + float num181 = 0.75f; + float num182 = index != 0 ? Math.Abs(Main.player[projectile.owner].velocity.Y) : Math.Abs(Main.player[projectile.owner].velocity.X); + if ((double) num182 > 10.0) + num182 = 10f; + float num183 = num182 / 10f; + float num184 = num181 * num183; + float num185 = num177 / 80f; + if ((double) num185 > 1.0) + num185 = 1f; + float f6 = num184 * num185; + if ((double) f6 < 0.0) + f6 = 0.0f; + if (!float.IsNaN(f6)) + { + if (index == 0) + { + if ((double) Main.player[projectile.owner].velocity.X < 0.0 && (double) projectile.Center.X < (double) mountedCenter.X) + num175 *= 1f - f6; + if ((double) Main.player[projectile.owner].velocity.X > 0.0 && (double) projectile.Center.X > (double) mountedCenter.X) + num175 *= 1f - f6; + } + else + { + if ((double) Main.player[projectile.owner].velocity.Y < 0.0 && (double) projectile.Center.Y < (double) mountedCenter.Y) + num174 *= 1f - f6; + if ((double) Main.player[projectile.owner].velocity.Y > 0.0 && (double) projectile.Center.Y > (double) mountedCenter.Y) + num174 *= 1f - f6; + } + } + } + } + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain40Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain40Texture.Width, Main.chain40Texture.Height)), color, rotation, new Vector2((float) Main.chain40Texture.Width * 0.5f, (float) Main.chain40Texture.Height * 0.5f), scale, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 271) + { + float x11 = projectile.Center.X; + float y11 = projectile.Center.Y; + float x12 = projectile.velocity.X; + float y12 = projectile.velocity.Y; + float num186 = 4f / (float) Math.Sqrt((double) x12 * (double) x12 + (double) y12 * (double) y12); + float x13; + float y13; + if ((double) projectile.ai[0] == 0.0) + { + x13 = x11 - projectile.velocity.X * num186; + y13 = y11 - projectile.velocity.Y * num186; + } + else + { + x13 = x11 + projectile.velocity.X * num186; + y13 = y11 + projectile.velocity.Y * num186; + } + Vector2 vector2 = new Vector2(x13, y13); + float num187 = mountedCenter.X - vector2.X; + float num188 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num188, (double) num187) - 1.57f; + if (projectile.alpha == 0) + { + int num189 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num189 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num188 * (double) num189, (double) num187 * (double) num189) : (float) Math.Atan2((double) num188 * (double) num189, (double) num187 * (double) num189); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num187 * (double) num187 + (double) num188 * (double) num188); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num190 = 12f / f; + float num191 = num187 * num190; + float num192 = num188 * num190; + vector2.X += num191; + vector2.Y += num192; + num187 = mountedCenter.X - vector2.X; + num188 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain18Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain18Texture.Width, Main.chain18Texture.Height)), color, rotation, new Vector2((float) Main.chain18Texture.Width * 0.5f, (float) Main.chain18Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.aiStyle == 13) + { + float num193 = projectile.position.X + 8f; + float num194 = projectile.position.Y + 2f; + float x14 = projectile.velocity.X; + float num195 = projectile.velocity.Y; + if ((double) x14 == 0.0 && (double) num195 == 0.0) + num195 = 0.0001f; + float num196 = 20f / (float) Math.Sqrt((double) x14 * (double) x14 + (double) num195 * (double) num195); + float x15; + float y14; + if ((double) projectile.ai[0] == 0.0) + { + x15 = num193 - projectile.velocity.X * num196; + y14 = num194 - projectile.velocity.Y * num196; + } + else + { + x15 = num193 + projectile.velocity.X * num196; + y14 = num194 + projectile.velocity.Y * num196; + } + Vector2 vector2 = new Vector2(x15, y14); + float num197 = mountedCenter.X - vector2.X; + float num198 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num198, (double) num197) - 1.57f; + if (projectile.alpha == 0) + { + int num199 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num199 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num198 * (double) num199, (double) num197 * (double) num199) : (float) Math.Atan2((double) num198 * (double) num199, (double) num197 * (double) num199); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num197 * (double) num197 + (double) num198 * (double) num198); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num200 = 12f / f; + float num201 = num197 * num200; + float num202 = num198 * num200; + vector2.X += num201; + vector2.Y += num202; + num197 = mountedCenter.X - vector2.X; + num198 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chainTexture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chainTexture.Width, Main.chainTexture.Height)), color, rotation, new Vector2((float) Main.chainTexture.Width * 0.5f, (float) Main.chainTexture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 190) + { + float x16 = projectile.position.X + (float) (projectile.width / 2); + float y15 = projectile.position.Y + (float) (projectile.height / 2); + float x17 = projectile.velocity.X; + float y16 = projectile.velocity.Y; + Math.Sqrt((double) x17 * (double) x17 + (double) y16 * (double) y16); + Vector2 vector2 = new Vector2(x16, y15); + float num203 = mountedCenter.X - vector2.X; + float num204 = mountedCenter.Y + Main.player[projectile.owner].gfxOffY - vector2.Y; + Math.Atan2((double) num204, (double) num203); + if (projectile.alpha == 0) + { + int num205 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num205 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num204 * (double) num205, (double) num203 * (double) num205) : (float) Math.Atan2((double) num204 * (double) num205, (double) num203 * (double) num205); + } + } + else if (projectile.aiStyle == 15) + { + Vector2 vector2 = new Vector2(projectile.position.X + (float) projectile.width * 0.5f, projectile.position.Y + (float) projectile.height * 0.5f); + float num206 = mountedCenter.X - vector2.X; + float num207 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num207, (double) num206) - 1.57f; + if (projectile.alpha == 0) + { + int num208 = -1; + if ((double) projectile.position.X + (double) (projectile.width / 2) < (double) mountedCenter.X) + num208 = 1; + Main.player[projectile.owner].itemRotation = Main.player[projectile.owner].direction != 1 ? (float) Math.Atan2((double) num207 * (double) num208, (double) num206 * (double) num208) : (float) Math.Atan2((double) num207 * (double) num208, (double) num206 * (double) num208); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num206 * (double) num206 + (double) num207 * (double) num207); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num209 = projectile.type == 154 || projectile.type == 247 ? 18f / f : 12f / f; + float num210 = num206 * num209; + float num211 = num207 * num209; + vector2.X += num210; + vector2.Y += num211; + num206 = mountedCenter.X - vector2.X; + num207 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + if (projectile.type == 25) + Main.spriteBatch.Draw(Main.chain2Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain2Texture.Width, Main.chain2Texture.Height)), color, rotation, new Vector2((float) Main.chain2Texture.Width * 0.5f, (float) Main.chain2Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + else if (projectile.type == 35) + Main.spriteBatch.Draw(Main.chain6Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain6Texture.Width, Main.chain6Texture.Height)), color, rotation, new Vector2((float) Main.chain6Texture.Width * 0.5f, (float) Main.chain6Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + else if (projectile.type == 247) + Main.spriteBatch.Draw(Main.chain19Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain19Texture.Width, Main.chain19Texture.Height)), color, rotation, new Vector2((float) Main.chain19Texture.Width * 0.5f, (float) Main.chain19Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + else if (projectile.type == 63) + Main.spriteBatch.Draw(Main.chain7Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain7Texture.Width, Main.chain7Texture.Height)), color, rotation, new Vector2((float) Main.chain7Texture.Width * 0.5f, (float) Main.chain7Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + else if (projectile.type == 154) + Main.spriteBatch.Draw(Main.chain13Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain13Texture.Width, Main.chain13Texture.Height)), color, rotation, new Vector2((float) Main.chain13Texture.Width * 0.5f, (float) Main.chain13Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.chain3Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain3Texture.Width, Main.chain3Texture.Height)), color, rotation, new Vector2((float) Main.chain3Texture.Width * 0.5f, (float) Main.chain3Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + Microsoft.Xna.Framework.Color color3 = Lighting.GetColor((int) ((double) projectile.position.X + (double) projectile.width * 0.5) / 16, (int) (((double) projectile.position.Y + (double) projectile.height * 0.5) / 16.0)); + if (projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[projectile.type]) + color3 = Lighting.GetColor((int) mountedCenter.X / 16, (int) ((double) mountedCenter.Y / 16.0)); + if (projectile.type == 14) + color3 = Microsoft.Xna.Framework.Color.White; + int num212 = 0; + int num213 = 0; + if (projectile.type == 175) + num212 = 10; + if (projectile.type == 392) + num212 = -2; + if (projectile.type == 499) + num212 = 12; + if (projectile.bobber) + num212 = 8; + if (projectile.type == 519) + { + num212 = 6; + num213 -= 6; + } + if (projectile.type == 520) + num212 = 12; + if (projectile.type == 492) + { + num213 -= 4; + num212 += 5; + } + if (projectile.type == 498) + num212 = 6; + if (projectile.type == 489) + num212 = -2; + if (projectile.type == 486) + num212 = -6; + if (projectile.type == 525) + num212 = 5; + if (projectile.type == 488) + num213 -= 8; + if (projectile.type == 373) + { + num213 = -10; + num212 = 6; + } + if (projectile.type == 375) + { + num213 = -11; + num212 = 12; + } + if (projectile.type == 423) + num213 = -5; + if (projectile.type == 346) + num212 = 4; + if (projectile.type == 331) + num213 = -4; + if (projectile.type == 254) + num212 = 3; + if (projectile.type == 273) + num213 = 2; + if (projectile.type == 335) + num212 = 6; + if (projectile.type == 162) + { + num212 = 1; + num213 = 1; + } + if (projectile.type == 377) + num212 = -6; + if (projectile.type == 353) + { + num212 = 36; + num213 = -12; + } + if (projectile.type == 324) + { + num212 = 22; + num213 = -6; + } + if (projectile.type == 266) + { + num212 = 10; + num213 = -10; + } + if (projectile.type == 319) + { + num212 = 10; + num213 = -12; + } + if (projectile.type == 315) + { + num212 = -13; + num213 = -6; + } + if (projectile.type == 313 && projectile.height != 54) + { + num213 = -12; + num212 = 20; + } + if (projectile.type == 314) + { + num213 = -8; + num212 = 0; + } + if (projectile.type == 269) + { + num212 = 18; + num213 = -14; + } + if (projectile.type == 268) + { + num212 = 22; + num213 = -2; + } + if (projectile.type == 18) + { + num212 = 3; + num213 = 3; + } + if (projectile.type == 16) + num212 = 6; + if (projectile.type == 17 || projectile.type == 31) + num212 = 2; + if (projectile.type == 25 || projectile.type == 26 || projectile.type == 35 || projectile.type == 63 || projectile.type == 154) + { + num212 = 6; + num213 -= 6; + } + if (projectile.type == 28 || projectile.type == 37 || projectile.type == 75) + num212 = 8; + if (projectile.type == 29 || projectile.type == 470 || projectile.type == 637) + num212 = 11; + if (projectile.type == 43) + num212 = 4; + if (projectile.type == 208) + { + num212 = 2; + num213 -= 12; + } + if (projectile.type == 209) + { + num212 = 4; + num213 -= 8; + } + if (projectile.type == 210) + { + num212 = 2; + num213 -= 22; + } + if (projectile.type == 251) + { + num212 = 18; + num213 -= 10; + } + if (projectile.type == 163 || projectile.type == 310) + num212 = 10; + if (projectile.type == 69 || projectile.type == 70) + { + num212 = 4; + num213 = 4; + } + float x18 = (float) ((double) (Main.projectileTexture[projectile.type].Width - projectile.width) * 0.5 + (double) projectile.width * 0.5); + if (projectile.type == 50 || projectile.type == 53 || projectile.type == 515) + num213 = -8; + if (projectile.type == 473) + { + num213 = -6; + num212 = 2; + } + if (projectile.type == 72 || projectile.type == 86 || projectile.type == 87) + { + num213 = -16; + num212 = 8; + } + if (projectile.type == 74) + num213 = -6; + if (projectile.type == 99) + num212 = 1; + if (projectile.type == 655) + num212 = 1; + if (projectile.type == 111) + { + num212 = 18; + num213 = -16; + } + if (projectile.type == 334) + { + num213 = -18; + num212 = 8; + } + if (projectile.type == 200) + { + num212 = 12; + num213 = -12; + } + if (projectile.type == 211) + { + num212 = 14; + num213 = 0; + } + if (projectile.type == 236) + { + num212 = 30; + num213 = -14; + } + if (projectile.type >= 191 && projectile.type <= 194) + { + num212 = 26; + num213 = projectile.direction != 1 ? -22 : -10; + } + if (projectile.type >= 390 && projectile.type <= 392) + num213 = 4 * projectile.direction; + if (projectile.type == 112) + num212 = 12; + int type1 = projectile.type; + if (projectile.type == 517 || projectile.type == 681) + num212 = 6; + if (projectile.type == 516) + num212 = 6; + if (projectile.type == (int) sbyte.MaxValue) + num212 = 8; + if (projectile.type == 155) + { + num212 = 3; + num213 = 3; + } + if (projectile.type == 397) + { + --x18; + num212 = -2; + num213 = -2; + } + if (projectile.type == 398) + num212 = 8; + SpriteEffects effects1 = SpriteEffects.None; + if (projectile.spriteDirection == -1) + effects1 = SpriteEffects.FlipHorizontally; + if (projectile.type == 681 && (double) projectile.velocity.X > 0.0) + effects1 ^= SpriteEffects.FlipHorizontally; + if (projectile.type == 221) + { + for (int index = 1; index < 10; ++index) + { + float num214 = (float) ((double) projectile.velocity.X * (double) index * 0.5); + float num215 = (float) ((double) projectile.velocity.Y * (double) index * 0.5); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num216 = 0.0f; + if (index == 1) + num216 = 0.9f; + if (index == 2) + num216 = 0.8f; + if (index == 3) + num216 = 0.7f; + if (index == 4) + num216 = 0.6f; + if (index == 5) + num216 = 0.5f; + if (index == 6) + num216 = 0.4f; + if (index == 7) + num216 = 0.3f; + if (index == 8) + num216 = 0.2f; + if (index == 9) + num216 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num216); + alpha.G = (byte) ((double) alpha.G * (double) num216); + alpha.B = (byte) ((double) alpha.B * (double) num216); + alpha.A = (byte) ((double) alpha.A * (double) num216); + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y17 = height * projectile.frame; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num214, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num215), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y17, Main.projectileTexture[projectile.type].Width, height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + if (projectile.type == 408 || projectile.type == 435 || projectile.type == 436 || projectile.type == 438 || projectile.type == 452 || projectile.type == 454 || projectile.type == 459 || projectile.type == 462 || projectile.type == 503 || projectile.type == 532 || projectile.type == 533 || projectile.type == 573 || projectile.type == 582 || projectile.type == 585 || projectile.type == 592 || projectile.type == 601 || projectile.type == 636 || projectile.type == 638 || projectile.type == 640 || projectile.type == 639 || projectile.type == 424 || projectile.type == 425 || projectile.type == 426 || projectile.type == 660 || projectile.type == 661 || projectile.type == 671 || projectile.type == 664 || projectile.type == 666 || projectile.type == 668 || projectile.type == 675 || projectile.type == 680 || projectile.type == 682 || projectile.type == 684 || projectile.type == 686 || projectile.type == 700 || projectile.type == 706 || projectile.type == 709 || projectile.type == 710 || projectile.type == 711) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, height * projectile.frame, texture.Width, height); + Vector2 origin = r.Size() / 2f; + if (projectile.type == 503) + origin.Y = 70f; + if (projectile.type == 686 || projectile.type == 711) + origin.Y = (float) (r.Height - 70); + int num217; + if (projectile.type == 438) + num217 = 0; + if (projectile.type == 452) + num217 = 0; + if (projectile.type == 408) + num217 = height; + if (projectile.type == 636) + origin.Y = 10f; + if (projectile.type == 638) + origin.Y = 2f; + if (projectile.type == 640 || projectile.type == 639 || projectile.type == 710) + origin.Y = 5f; + if (projectile.type == 700) + origin.X = projectile.spriteDirection == 1 ? (float) (r.Width - 20) : 20f; + int num218 = 8; + int num219 = 2; + int num220 = 1; + float num221 = 1f; + float num222 = 0.0f; + if (projectile.type == 503) + { + num218 = 9; + num219 = 3; + num221 = 0.5f; + } + else if (projectile.type == 686 || projectile.type == 711) + { + num220 = 19; + num218 = 0; + num219 = -3; + num221 = 0.5f; + } + else if (projectile.type == 671) + { + num220 = 5; + num218 = 0; + num219 = -1; + num221 = 2.6f; + } + else if (projectile.type == 700) + { + num218 = 5; + num219 = 1; + num221 = 2.6f; + } + else if (projectile.type == 664 || projectile.type == 666 || projectile.type == 668) + { + num218 = 8; + num219 = 2; + num221 = 0.4f; + } + else if (projectile.type == 582) + { + num218 = 10; + num219 = 2; + num221 = 0.7f; + num222 = 0.2f; + } + else if (projectile.type == 675) + { + num218 = 5; + num219 = 1; + num221 = 0.4f; + } + else if (projectile.type == 638) + { + num218 = 5; + num219 = 1; + num221 = 1f; + } + else if (projectile.type == 660) + { + num218 = 3; + num219 = 1; + num221 = 8f; + r = new Microsoft.Xna.Framework.Rectangle(38 * projectile.frame, 0, 38, 38); + origin = r.Size() / 2f; + } + else if (projectile.type == 684) + { + num218 = 8; + num219 = 1; + num221 = 0.75f; + } + else if (projectile.type == 639) + { + num218 = 10; + num219 = 1; + num221 = 1f; + } + else if (projectile.type == 710) + { + num220 = 9; + num218 = 0; + num219 = -2; + num221 = 0.5f; + } + else if (projectile.type == 640) + { + num218 = 20; + num219 = 1; + num221 = 1f; + } + else if (projectile.type == 436) + { + num219 = 2; + num221 = 0.5f; + } + else if (projectile.type == 424 || projectile.type == 425 || projectile.type == 426) + { + num218 = 10; + num219 = 2; + num221 = 0.6f; + } + else if (projectile.type == 438) + { + num218 = 10; + num219 = 2; + num221 = 1f; + } + else if (projectile.type == 452) + { + num218 = 10; + num219 = 3; + num221 = 0.5f; + } + else if (projectile.type == 454) + { + num218 = 5; + num219 = 1; + num221 = 0.2f; + } + else if (projectile.type == 462) + { + num218 = 7; + num219 = 1; + num221 = 0.2f; + } + else if (projectile.type == 661) + { + num218 = 0; + num219 = 1; + num221 = 0.5f; + } + else if (projectile.type == 706) + { + num220 = 9; + num218 = 0; + num219 = -2; + num221 = 0.5f; + } + else if (projectile.type == 585) + { + num218 = 7; + num219 = 1; + num221 = 0.2f; + } + else if (projectile.type == 459) + { + num218 = (int) ((double) projectile.scale * 8.0); + num219 = num218 / 4; + if (num219 < 1) + num219 = 1; + num221 = 0.3f; + } + else if (projectile.type == 709) + { + num218 = 8; + num219 = num218 / 4; + if (num219 < 1) + num219 = 1; + num221 = 0.5f; + } + else if (projectile.type == 532) + { + num218 = 10; + num219 = 1; + num221 = 0.7f; + num222 = 0.2f; + } + else if (projectile.type == 592) + { + num218 = 10; + num219 = 2; + num221 = 1f; + } + else if (projectile.type == 601) + { + num218 = 8; + num219 = 1; + num221 = 0.3f; + } + else if (projectile.type == 636) + { + num218 = 20; + num219 = 3; + num221 = 0.5f; + } + else if (projectile.type == 680) + { + num218 = 9; + num219 = 3; + num221 = 0.5f; + } + else if (projectile.type == 533) + { + if ((double) projectile.ai[0] >= 6.0 && (double) projectile.ai[0] <= 8.0) + { + num218 = (double) projectile.ai[0] == 6.0 ? 8 : 4; + num219 = 1; + if ((double) projectile.ai[0] != 7.0) + num222 = 0.2f; + } + else + num218 = num219 = 0; + } + for (int index = num220; num219 > 0 && index < num218 || num219 < 0 && index > num218; index += num219) + { + Microsoft.Xna.Framework.Color newColor = color3; + if (projectile.type == 408 || projectile.type == 435 || projectile.type == 682) + newColor = Microsoft.Xna.Framework.Color.Lerp(newColor, Microsoft.Xna.Framework.Color.Blue, 0.5f); + else if (projectile.type == 436) + newColor = Microsoft.Xna.Framework.Color.Lerp(newColor, Microsoft.Xna.Framework.Color.LimeGreen, 0.5f); + else if (projectile.type >= 424 && projectile.type <= 426) + newColor = Microsoft.Xna.Framework.Color.Lerp(newColor, Microsoft.Xna.Framework.Color.Red, 0.5f); + else if (projectile.type == 640 || projectile.type == 639) + newColor.A = (byte) 127; + else if (projectile.type == 671) + newColor = Microsoft.Xna.Framework.Color.Lerp(newColor, Microsoft.Xna.Framework.Color.Purple, (float) index / (float) num218); + Microsoft.Xna.Framework.Color color4 = projectile.GetAlpha(newColor); + if (projectile.type == 438) + { + color4.G /= (byte) index; + color4.B /= (byte) index; + } + else if (projectile.type == 682) + color4.G /= (byte) index; + else if (projectile.type == 686) + { + if (!(projectile.oldPos[index] == Vector2.Zero)) + { + float t = (float) index / (float) num220; + color4 = (double) t >= 0.5 ? Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Purple, Microsoft.Xna.Framework.Color.Black, Utils.InverseLerp(0.5f, 1f, t)) : Microsoft.Xna.Framework.Color.Lerp(color4, Microsoft.Xna.Framework.Color.Purple, Utils.InverseLerp(0.0f, 0.5f, t)); + } + else + continue; + } + else if (projectile.type == 711) + { + if (!(projectile.oldPos[index] == Vector2.Zero)) + { + float t = (float) index / (float) num220; + color4 = (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.InverseLerp(0.5f, 1f, t)) : Microsoft.Xna.Framework.Color.Lerp(color4, new Microsoft.Xna.Framework.Color(128, 0, (int) byte.MaxValue, 180), Utils.InverseLerp(0.0f, 0.5f, t)); + } + else + continue; + } + else if (projectile.type == 684) + { + if (index == 1) + { + color4.B /= (byte) 2; + color4.G /= (byte) 2; + color4.A /= (byte) 2; + } + color4.B /= (byte) index; + color4.G /= (byte) index; + color4.A /= (byte) index; + } + else if (projectile.type == 706 || projectile.type == 710) + { + color4.B /= (byte) index; + color4.G /= (byte) index; + color4.A /= (byte) index; + } + else if (projectile.type == 592) + { + color4.R /= (byte) index; + color4.G /= (byte) index; + } + else if (projectile.type == 640) + { + color4.R /= (byte) index; + color4.A /= (byte) index; + } + else if (projectile.type >= 424 && projectile.type <= 426) + { + color4.B /= (byte) index; + color4.G /= (byte) index; + color4.A /= (byte) index; + } + float num223 = (float) (num218 - index); + if (num219 < 0) + num223 = (float) (num220 - index); + Microsoft.Xna.Framework.Color color5 = color4 * (num223 / ((float) ProjectileID.Sets.TrailCacheLength[projectile.type] * 1.5f)); + Vector2 oldPo = projectile.oldPos[index]; + float rotation = projectile.rotation; + SpriteEffects effects2 = effects1; + if (ProjectileID.Sets.TrailingMode[projectile.type] == 2) + { + rotation = projectile.oldRot[index]; + effects2 = projectile.oldSpriteDirection[index] == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + } + Main.spriteBatch.Draw(texture, oldPo + projectile.Size / 2f - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color5, rotation + projectile.rotation * num222 * (float) (index - 1) * (float) -effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt(), origin, MathHelper.Lerp(projectile.scale, num221, (float) index / 15f), effects2, 0.0f); + } + if (projectile.type == 661) + { + Microsoft.Xna.Framework.Color color6 = new Microsoft.Xna.Framework.Color(120, 40, 222, 120); + for (int index = 0; index < 4; ++index) + Main.spriteBatch.Draw(Main.extraTexture[75], projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY) + projectile.rotation.ToRotationVector2().RotatedBy(1.57079637050629 * (double) index) * 4f, new Microsoft.Xna.Framework.Rectangle?(r), color6, projectile.rotation, origin, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 684) + { + float x19 = ((float) ((double) projectile.localAI[0] * 6.28318548202515 / 30.0)).ToRotationVector2().X; + Microsoft.Xna.Framework.Color color7 = new Microsoft.Xna.Framework.Color(220, 40, 30, 40) * (float) (0.75 + 0.25 * (double) x19); + for (int index = 0; index < 8; ++index) + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY) + projectile.rotation.ToRotationVector2().RotatedBy(0.785398185253143 * (double) index) * (float) (4.0 + 1.0 * (double) x19), new Microsoft.Xna.Framework.Rectangle?(r), color7, projectile.rotation, origin, projectile.scale, effects1, 0.0f); + } + Microsoft.Xna.Framework.Color color8 = projectile.GetAlpha(color3); + if (projectile.type == 640) + color8 = Microsoft.Xna.Framework.Color.Transparent; + if (projectile.type == 684) + color8.A = (byte) 127; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color8, projectile.rotation, origin, projectile.scale, effects1, 0.0f); + if (projectile.type == 503) + Main.spriteBatch.Draw(Main.extraTexture[36], projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, projectile.localAI[0], origin, projectile.scale, effects1, 0.0f); + else if (projectile.type == 533) + Main.spriteBatch.Draw(Main.glowMaskTexture[128], projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White * 0.3f, projectile.rotation, origin, projectile.scale, effects1, 0.0f); + else if (projectile.type == 601) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 0; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), white, projectile.rotation, origin, projectile.scale * 0.7f, effects1, 0.0f); + } + } + else if (projectile.type == 672) + { + Vector2 position = projectile.Center - Main.screenPosition; + if ((double) projectile.localAI[1] == 0.0) + { + position.Y += 60f; + float num224 = projectile.localAI[0] / 120f; + for (int index = 0; index < 4; ++index) + { + float num225 = MathHelper.Clamp((float) ((double) num224 * 2.0 - (double) index / 3.0), 0.0f, 1f); + float num226 = 1f - MathHelper.Clamp((float) (((double) num224 - 0.800000011920929) / 0.200000002980232), 0.0f, 1f); + Main.spriteBatch.Draw(Main.magicPixel, position, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color(0.4f, 0.17f, 0.4f, 0.0f) * (num225 * num226) * 1.3f, 0.0f, new Vector2((float) Main.magicPixel.Width / 2f, (float) Main.magicPixel.Height), new Vector2((float) Math.Sqrt((double) num225) * 100f, num225 * 2f), SpriteEffects.None, 0.0f); + } + } + else if ((double) projectile.localAI[1] == 1.0) + { + double num227 = (double) projectile.localAI[0] / 300.0; + float num228 = Math.Min(1f, projectile.localAI[0] / 30f); + int frameNumber = (int) ((double) Main.GlobalTime * 10.0) % 8; + this.DrawElderEye(Main.spriteBatch, projectile.Center, 1f, 1f, frameNumber, Microsoft.Xna.Framework.Color.White * num228); + this.DrawElderEye(Main.spriteBatch, projectile.Center, 1f, 1f, (frameNumber + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0.0f) * num228); + } + else if ((double) projectile.localAI[1] == 2.0) + { + int frameNumber = (int) ((double) Main.GlobalTime * 10.0) % 8; + this.DrawElderEye(Main.spriteBatch, projectile.Center, 1f, 1f, frameNumber, Microsoft.Xna.Framework.Color.White); + this.DrawElderEye(Main.spriteBatch, projectile.Center, 1f, 1f, (frameNumber + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0.0f)); + } + } + else if (projectile.type != 713) + { + if (projectile.type == 674) + { + Texture2D texture = Main.extraTexture[60]; + Vector2 origin = new Vector2(66f, 86f); + Vector2 position = projectile.Center - Main.screenPosition; + Vector2 one = Vector2.One; + Vector2 vector2_8 = new Vector2(4f, 1f) * 1.4f; + Microsoft.Xna.Framework.Color color9 = new Microsoft.Xna.Framework.Color(115, 0, 155, 0); + Microsoft.Xna.Framework.Color color10 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 180, (int) byte.MaxValue, 0); + float t = 0.0f; + if ((double) projectile.ai[0] < 30.0) + t = Utils.InverseLerp(0.0f, 30f, projectile.ai[0], true); + else if ((double) projectile.ai[0] < 40.0) + t = 1f + Utils.InverseLerp(30f, 40f, projectile.ai[0], true); + Vector2 vector2_9 = new Vector2(1f, 1f); + Vector2 vector2_10 = new Vector2(0.8f, 2f); + if ((double) t < 1.0) + vector2_9.X *= t; + Vector2 vector2_11 = vector2_8 * t; + if ((double) t < 1.0) + { + color9 *= t; + color10 *= t; + } + if ((double) t > 1.5) + { + float num229 = Utils.InverseLerp(2f, 1.5f, t, true); + color9 *= num229; + color10 *= num229; + } + float num230 = 0.42f; + Microsoft.Xna.Framework.Color color11 = color9 * num230; + Microsoft.Xna.Framework.Color color12 = color10 * num230; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), color11, 0.0f, origin, vector2_11 * vector2_9, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), color12, 0.0f, origin, vector2_11 * vector2_10, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[59], position, new Microsoft.Xna.Framework.Rectangle?(), color11, 0.0f, origin, vector2_11 * vector2_9 * new Vector2(1f, 0.3f), SpriteEffects.None, 0.0f); + } + else if (projectile.type == 440 || projectile.type == 449 || projectile.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 (projectile.getRect().Intersects(rectangle)) + { + Vector2 vector2_12 = new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY); + float num231 = 100f; + float num232 = 3f; + if (projectile.type == 606) + { + num231 = 150f; + num232 = 3f; + } + if ((double) projectile.ai[1] == 1.0) + num231 = (float) (int) projectile.localAI[0]; + for (int index = 1; index <= (int) projectile.localAI[0]; ++index) + { + Vector2 vector2_13 = Vector2.Normalize(projectile.velocity) * (float) index * num232; + Microsoft.Xna.Framework.Color color13 = projectile.GetAlpha(color3) * ((num231 - (float) index) / num231); + color13.A = (byte) 0; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], vector2_12 - vector2_13, new Microsoft.Xna.Framework.Rectangle?(), color13, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + } + else if (projectile.type == 687) + { + Vector2 vector2_14 = projectile.Center - Main.screenPosition; + float num233 = 40f; + float num234 = num233 * 2f; + float num235 = (float) projectile.frameCounter / num233; + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Color transparent = Microsoft.Xna.Framework.Color.Transparent; + Microsoft.Xna.Framework.Color color14 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color color15 = new Microsoft.Xna.Framework.Color(180, 30, 30, 200); + Microsoft.Xna.Framework.Color color16 = new Microsoft.Xna.Framework.Color(0, 0, 0, 30); + ulong seed = 1; + for (float num236 = 0.0f; (double) num236 < 15.0; ++num236) + { + float num237 = (float) ((double) Utils.RandomFloat(ref seed) * 0.25 - 0.125); + Vector2 rotationVector2 = (projectile.rotation + num237).ToRotationVector2(); + Vector2 vector2_15 = vector2_14 + rotationVector2 * 400f; + float num238 = num235 + num236 * 0.06666667f; + int num239 = (int) ((double) num238 / 0.0666666701436043); + float num240 = num238 % 1f; + if (((double) num240 <= (double) num235 % 1.0 || (double) projectile.frameCounter >= (double) num233) && ((double) num240 >= (double) num235 % 1.0 || (double) projectile.frameCounter < (double) num234 - (double) num233)) + { + Microsoft.Xna.Framework.Color color17 = (double) num240 >= 0.100000001490116 ? ((double) num240 >= 0.349999994039536 ? ((double) num240 >= 0.699999988079071 ? ((double) num240 >= 0.899999976158142 ? ((double) num240 >= 1.0 ? Microsoft.Xna.Framework.Color.Transparent : Microsoft.Xna.Framework.Color.Lerp(color16, Microsoft.Xna.Framework.Color.Transparent, Utils.InverseLerp(0.9f, 1f, num240, true))) : Microsoft.Xna.Framework.Color.Lerp(color15, color16, Utils.InverseLerp(0.7f, 0.9f, num240, true))) : Microsoft.Xna.Framework.Color.Lerp(color14, color15, Utils.InverseLerp(0.35f, 0.7f, num240, true))) : color14) : Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color14, Utils.InverseLerp(0.0f, 0.1f, num240, true)); + float num241 = (float) (0.899999976158142 + (double) num240 * 0.800000011920929); + float scale = num241 * num241 * 0.8f; + Vector2 position = Vector2.SmoothStep(vector2_14, vector2_15, num240); + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 7, frameY: ((int) ((double) num240 * 7.0))); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color17, (float) ((double) projectile.rotation + 6.28318548202515 * ((double) num240 + (double) Main.GlobalTime * 1.20000004768372) * 0.200000002980232 + (double) num239 * 1.25663709640503), r.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + } + } + else if (projectile.type == 651) + { + Player player = Main.player[projectile.owner]; + Microsoft.Xna.Framework.Point point = new Vector2(projectile.ai[0], projectile.ai[1]).ToPoint(); + Microsoft.Xna.Framework.Point tileCoordinates = projectile.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color color18 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color color19 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0); + int num242 = 1; + float num243 = 0.0f; + WiresUI.Settings.MultiToolMode toolMode = WiresUI.Settings.ToolMode; + bool flag1 = toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator); + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red)) + { + ++num243; + color19 = Microsoft.Xna.Framework.Color.Lerp(color19, Microsoft.Xna.Framework.Color.Red, 1f / num243); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue)) + { + ++num243; + color19 = Microsoft.Xna.Framework.Color.Lerp(color19, Microsoft.Xna.Framework.Color.Blue, 1f / num243); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green)) + { + ++num243; + color19 = Microsoft.Xna.Framework.Color.Lerp(color19, new Microsoft.Xna.Framework.Color(0, (int) byte.MaxValue, 0), 1f / num243); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow)) + { + float num244 = num243 + 1f; + color19 = Microsoft.Xna.Framework.Color.Lerp(color19, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0), 1f / num244); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter)) + color18 = new Microsoft.Xna.Framework.Color(50, 50, 50, (int) byte.MaxValue); + color19.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 (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else if (point.X == tileCoordinates.X) + { + int num245 = tileCoordinates.Y - point.Y; + int num246 = Math.Sign(num245); + Vector2 position1 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num245 * num242 > 0 ? 72 : 18, 0, 16, 16); + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position1, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position1, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position1, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + for (int index = point.Y + num246; index != tileCoordinates.Y; index += num246) + { + Vector2 position2 = new Vector2((float) (point.X * 16), (float) (index * 16)) - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = 90; + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position2, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + Vector2 position3 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(num245 * num242 > 0 ? 18 : 72, 0, 16, 16); + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position3, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position3, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position3, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else if (point.Y == tileCoordinates.Y) + { + int num247 = tileCoordinates.X - point.X; + int num248 = Math.Sign(num247); + Vector2 position4 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num247 > 0 ? 36 : 144, 0, 16, 16); + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position4, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position4, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position4, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + for (int index = point.X + num248; index != tileCoordinates.X; index += num248) + { + Vector2 position5 = new Vector2((float) (index * 16), (float) (point.Y * 16)) - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = 180; + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position5, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position5, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position5, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + Vector2 position6 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(num247 > 0 ? 144 : 36, 0, 16, 16); + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position6, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position6, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position6, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else + { + Math.Abs(point.X - tileCoordinates.X); + Math.Abs(point.Y - tileCoordinates.Y); + int num249 = Math.Sign(tileCoordinates.X - point.X); + int num250 = Math.Sign(tileCoordinates.Y - point.Y); + Microsoft.Xna.Framework.Point p = new Microsoft.Xna.Framework.Point(); + bool flag2 = false; + bool flag3 = player.direction == 1; + int num251; + int num252; + int num253; + if (flag3) + { + p.X = point.X; + num251 = point.Y; + num252 = tileCoordinates.Y; + num253 = num250; + } + else + { + p.Y = point.Y; + num251 = point.X; + num252 = tileCoordinates.X; + num253 = num249; + } + Vector2 position7 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + rectangle.X = flag3 ? (num253 > 0 ? 72 : 18) : (num253 > 0 ? 36 : 144); + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position7, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position7, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position7, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + for (int index = num251 + num253; index != num252 && !flag2; index += num253) + { + if (flag3) + p.Y = index; + else + p.X = index; + if (WorldGen.InWorld(p.X, p.Y, 1) && Main.tile[p.X, p.Y] != null) + { + Vector2 position8 = p.ToVector2() * 16f - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = flag3 ? 90 : 180; + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position8, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position8, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position8, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + int num254; + int num255; + int num256; + if (flag3) + { + p.Y = tileCoordinates.Y; + num254 = point.X; + num255 = tileCoordinates.X; + num256 = num249; + } + else + { + p.X = tileCoordinates.X; + num254 = point.Y; + num255 = tileCoordinates.Y; + num256 = num250; + } + Vector2 position9 = p.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + if (!flag3) + { + rectangle.X += num249 > 0 ? 144 : 36; + rectangle.X += num250 * num242 > 0 ? 72 : 18; + } + else + { + rectangle.X += num249 > 0 ? 36 : 144; + rectangle.X += num250 * num242 > 0 ? 18 : 72; + } + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position9, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position9, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position9, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + for (int index = num254 + num256; index != num255 && !flag2; index += num256) + { + if (!flag3) + 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 = flag3 ? 180 : 90; + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position10, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position10, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position10, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + Vector2 position11 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + if (!flag3) + rectangle.X += num250 * num242 > 0 ? 18 : 72; + else + rectangle.X += num249 > 0 ? 144 : 36; + if (flag1) + Main.spriteBatch.Draw(Main.wireUITexture[11], position11, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position11, new Microsoft.Xna.Framework.Rectangle?(rectangle), color19, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + rectangle.Y = 18; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], position11, new Microsoft.Xna.Framework.Rectangle?(rectangle), color18, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 586) + { + float num257 = 300f; + if ((double) projectile.ai[0] >= 100.0) + num257 = MathHelper.Lerp(300f, 600f, (float) (((double) projectile.ai[0] - 100.0) / 200.0)); + if ((double) num257 > 600.0) + num257 = 600f; + if ((double) projectile.ai[0] >= 500.0) + num257 = MathHelper.Lerp(600f, 1200f, (float) (((double) projectile.ai[0] - 500.0) / 100.0)); + float rotation1 = projectile.rotation; + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + alpha.A /= (byte) 2; + int num258 = (int) ((double) projectile.ai[0] / 6.0); + Vector2 spinningpoint = new Vector2(0.0f, -num257); + for (int index = 0; (double) index < 10.0; ++index) + { + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5, frameY: ((num258 + index) % 5)); + float rotation2 = rotation1 + 0.6283185f * (float) index; + Vector2 position = spinningpoint.RotatedBy((double) rotation2) / 3f + projectile.Center - Main.screenPosition; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation2, r.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + } + for (int index = 0; (double) index < 20.0; ++index) + { + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5, frameY: ((num258 + index) % 5)); + float rotation3 = (float) (-(double) rotation1 + 0.314159274101257 * (double) index) * 2f; + Vector2 position = spinningpoint.RotatedBy((double) rotation3) + projectile.Center - Main.screenPosition; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation3, r.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 536 || projectile.type == 591 || projectile.type == 607) + { + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Vector2 position = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Vector2 scale = new Vector2(1f, projectile.velocity.Length() / (float) texture2D.Height); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), projectile.GetAlpha(color3), projectile.rotation, texture2D.Frame().Bottom(), scale, effects1, 0.0f); + } + else if (projectile.type == 688 || projectile.type == 689 || projectile.type == 690) + { + Texture2D texture2D1 = Main.projectileTexture[projectile.type]; + Vector2 position12 = projectile.Top + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r1 = texture2D1.Frame(verticalFrames: Main.projFrames[projectile.type], frameY: projectile.frame); + Vector2 origin1 = r1.Size() * new Vector2(0.5f, 0.0f); + Microsoft.Xna.Framework.Color color20 = Microsoft.Xna.Framework.Color.Lerp(projectile.GetAlpha(color3), Microsoft.Xna.Framework.Color.White, 0.5f); + Microsoft.Xna.Framework.Color color21 = color20; + color21.A = (byte) 127; + Texture2D texture = (Texture2D) null; + Texture2D texture2D2 = (Texture2D) null; + switch (projectile.type) + { + case 688: + texture = Main.glowMaskTexture[228]; + texture2D2 = Main.extraTexture[86]; + break; + case 689: + texture = Main.glowMaskTexture[229]; + texture2D2 = Main.extraTexture[87]; + break; + case 690: + texture = Main.glowMaskTexture[230]; + texture2D2 = Main.extraTexture[88]; + break; + } + Main.spriteBatch.Draw(texture2D1, position12, new Microsoft.Xna.Framework.Rectangle?(r1), color20, projectile.rotation, origin1, projectile.scale, effects1, 0.0f); + if (texture != null) + Main.spriteBatch.Draw(texture, position12, new Microsoft.Xna.Framework.Rectangle?(r1), color21, projectile.rotation, origin1, projectile.scale, effects1, 0.0f); + if (texture2D2 != null) + { + Vector2 position13 = projectile.Center + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r2 = texture2D2.Frame(); + Vector2 origin2 = r2.Size() * new Vector2(0.5f, 1f); + origin2.Y -= 2f; + Main.spriteBatch.Draw(texture2D2, position13, new Microsoft.Xna.Framework.Rectangle?(r2), color20, projectile.rotation, origin2, projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 694 || projectile.type == 695 || projectile.type == 696) + { + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Vector2 position = projectile.Bottom + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: Main.projFrames[projectile.type], frameY: projectile.frame); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + origin.Y -= 8f; + switch (projectile.type) + { + case 694: + case 695: + origin.X += 3f; + break; + } + Microsoft.Xna.Framework.Color color22 = Microsoft.Xna.Framework.Color.Lerp(projectile.GetAlpha(color3), Microsoft.Xna.Framework.Color.White, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color22, projectile.rotation, origin, projectile.scale, effects1, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color22 * 0.3f, projectile.rotation, origin, projectile.scale * 1.1f, effects1, 0.0f); + } + else if (projectile.type == 409) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y18 = height * projectile.frame; + int num259 = 10; + int num260 = 2; + float num261 = 0.5f; + for (int index = 1; index < num259; index += num260) + { + ref Vector2 local = ref projectile.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color3; + Microsoft.Xna.Framework.Color color23 = projectile.GetAlpha(newColor) * ((float) (num259 - index) / 15f); + Vector2 vector2 = projectile.oldPos[index] - Main.screenPosition + new Vector2(x18 + (float) num213, (float) (projectile.height / 2) + projectile.gfxOffY); + Main.spriteBatch.Draw(texture, projectile.oldPos[index] + new Vector2((float) projectile.width, (float) projectile.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y18, texture.Width, height)), color23, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile.scale, num261, (float) index / 15f), effects1, 0.0f); + } + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y18, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 437) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y19 = height * projectile.frame; + int num262 = 10; + int num263 = 2; + float num264 = 0.2f; + for (int index = 1; index < num262; index += num263) + { + ref Vector2 local = ref Main.npc[i].oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color3; + Microsoft.Xna.Framework.Color color24 = projectile.GetAlpha(newColor) * ((float) (num262 - index) / 15f); + Vector2 vector2 = projectile.oldPos[index] - Main.screenPosition + new Vector2(x18 + (float) num213, (float) (projectile.height / 2) + projectile.gfxOffY); + Main.spriteBatch.Draw(texture, projectile.oldPos[index] + new Vector2((float) projectile.width, (float) projectile.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y19, texture.Width, height)), color24, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile.scale, num264, (float) index / 15f), effects1, 0.0f); + } + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y19, texture.Width, height)), Microsoft.Xna.Framework.Color.White, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale + 0.2f, effects1, 0.0f); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y19, texture.Width, height)), projectile.GetAlpha(Microsoft.Xna.Framework.Color.White), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale + 0.2f, effects1, 0.0f); + } + else if (projectile.type == 384 || projectile.type == 386) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y20 = height * projectile.frame; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y20, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 439 || projectile.type == 460 || projectile.type == 600 || projectile.type == 615 || projectile.type == 630 || projectile.type == 633 || projectile.type == 705) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y21 = height * projectile.frame; + Vector2 position = (projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition).Floor(); + float num265 = 1f; + if (Main.player[projectile.owner].shroomiteStealth && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].ranged) + { + float num266 = Main.player[projectile.owner].stealth; + if ((double) num266 < 0.03) + num266 = 0.03f; + double num267 = (1.0 + (double) num266 * 10.0) / 11.0; + color3 *= num266; + num265 = num266; + } + if (Main.player[projectile.owner].setVortex && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].ranged) + { + float num268 = Main.player[projectile.owner].stealth; + if ((double) num268 < 0.03) + num268 = 0.03f; + double num269 = (1.0 + (double) num268 * 10.0) / 11.0; + color3 = color3.MultiplyRGBA(new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num268))); + num265 = num268; + } + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + if (projectile.type == 439) + Main.spriteBatch.Draw(Main.glowMaskTexture[35], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * num265, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + else if (projectile.type == 615) + Main.spriteBatch.Draw(Main.glowMaskTexture[192], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num265, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + else if (projectile.type == 630) + { + Main.spriteBatch.Draw(Main.glowMaskTexture[200], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num265, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + if ((double) projectile.localAI[0] > 0.0) + { + int frameY = 6 - (int) ((double) projectile.localAI[0] / 1.0); + Texture2D texture2D = Main.extraTexture[65]; + Main.spriteBatch.Draw(texture2D, position + Vector2.Normalize(projectile.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) * num265, projectile.rotation, new Vector2(effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? (float) texture2D.Width : 0.0f, (float) ((double) height / 2.0 - 2.0)), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 600) + { + Microsoft.Xna.Framework.Color portalColor = PortalHelper.GetPortalColor(projectile.owner, (int) projectile.ai[1]); + portalColor.A = (byte) 70; + Main.spriteBatch.Draw(Main.glowMaskTexture[173], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), portalColor, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 460) + { + if ((double) Math.Abs(projectile.rotation - 1.570796f) > 1.57079637050629) + effects1 |= SpriteEffects.FlipVertically; + Main.spriteBatch.Draw(Main.glowMaskTexture[102], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile.rotation - 1.570796f, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + if ((double) projectile.ai[0] > 180.0 && Main.projectile[(int) projectile.ai[1]].type == 461) + this.DrawProj((int) projectile.ai[1]); + } + else if (projectile.type == 633) + { + float num270 = (float) (Math.Cos(6.28318548202515 * ((double) projectile.ai[0] / 30.0)) * 2.0 + 2.0); + if ((double) projectile.ai[0] > 120.0) + num270 = 4f; + for (float num271 = 0.0f; (double) num271 < 4.0; ++num271) + Main.spriteBatch.Draw(texture, position + Vector2.UnitY.RotatedBy((double) num271 * 6.28318548202515 / 4.0) * num270, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y21, texture.Width, height)), projectile.GetAlpha(color3).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)) * 0.03f, projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 442) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y22 = height * projectile.frame; + Vector2 position = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y22, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[37], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y22, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) projectile.alpha / (double) byte.MaxValue), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 447) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + Texture2D texture2D = Main.extraTexture[4]; + int num272 = texture.Height / Main.projFrames[projectile.type]; + int num273 = num272 * projectile.frame; + int height = texture2D.Height / Main.projFrames[projectile.type]; + int y23 = height * projectile.frame; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, y23, texture2D.Width, height); + Vector2 position = projectile.position + new Vector2((float) projectile.width, 0.0f) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Main.spriteBatch.Draw(Main.extraTexture[4], position, new Microsoft.Xna.Framework.Rectangle?(rectangle), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) (texture2D.Width / 2), 0.0f), projectile.scale, effects1, 0.0f); + int num274 = projectile.height - num272 - 14; + if (num274 < 0) + num274 = 0; + if (num274 > 0) + { + if (y23 == height * 3) + y23 = height * 2; + Main.spriteBatch.Draw(Main.extraTexture[4], position + Vector2.UnitY * (float) (height - 1), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y23 + height - 1, texture2D.Width, 1)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) (texture2D.Width / 2), 0.0f), new Vector2(1f, (float) num274), effects1, 0.0f); + } + rectangle.Width = texture.Width; + rectangle.Y = num273; + Main.spriteBatch.Draw(texture, position + Vector2.UnitY * (float) (height - 1 + num274), new Microsoft.Xna.Framework.Rectangle?(rectangle), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, 0.0f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 455) + { + if (projectile.velocity == Vector2.Zero) + return; + Texture2D texture2D3 = Main.projectileTexture[projectile.type]; + Texture2D texture = Main.extraTexture[21]; + Texture2D texture2D4 = Main.extraTexture[22]; + float num275 = projectile.localAI[1]; + Microsoft.Xna.Framework.Color color25 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.9f; + Main.spriteBatch.Draw(texture2D3, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color25, projectile.rotation, texture2D3.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + float num276 = num275 - (float) (texture2D3.Height / 2 + texture2D4.Height) * projectile.scale; + Vector2 vector2 = projectile.Center + projectile.velocity * projectile.scale * (float) texture2D3.Height / 2f; + if ((double) num276 > 0.0) + { + float num277 = 0.0f; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 16 * (projectile.timeLeft / 3 % 5), texture.Width, 16); + while ((double) num277 + 1.0 < (double) num276) + { + if ((double) num276 - (double) num277 < (double) rectangle.Height) + rectangle.Height = (int) ((double) num276 - (double) num277); + Main.spriteBatch.Draw(texture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color25, projectile.rotation, new Vector2((float) (rectangle.Width / 2), 0.0f), projectile.scale, SpriteEffects.None, 0.0f); + num277 += (float) rectangle.Height * projectile.scale; + vector2 += projectile.velocity * (float) rectangle.Height * projectile.scale; + rectangle.Y += 16; + if (rectangle.Y + rectangle.Height > texture.Height) + rectangle.Y = 0; + } + } + Main.spriteBatch.Draw(texture2D4, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color25, projectile.rotation, texture2D4.Frame().Top(), projectile.scale, SpriteEffects.None, 0.0f); + } + else if (projectile.type == 461) + { + if (projectile.velocity == Vector2.Zero) + return; + Texture2D texture2D = Main.projectileTexture[projectile.type]; + float num278 = projectile.localAI[1]; + Microsoft.Xna.Framework.Color color26 = 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_16 = new Vector2(0.0f, Main.player[projectile.owner].gfxOffY); + Main.spriteBatch.Draw(texture2D, projectile.Center.Floor() - Main.screenPosition + vector2_16, new Microsoft.Xna.Framework.Rectangle?(r), color26, projectile.rotation, r.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + float num279 = num278 - 33f * projectile.scale; + Vector2 vector2_17 = projectile.Center.Floor() + projectile.velocity * projectile.scale * 10.5f; + r = new Microsoft.Xna.Framework.Rectangle(0, 25, texture2D.Width, 28); + if ((double) num279 > 0.0) + { + float num280 = 0.0f; + while ((double) num280 + 1.0 < (double) num279) + { + if ((double) num279 - (double) num280 < (double) r.Height) + r.Height = (int) ((double) num279 - (double) num280); + Main.spriteBatch.Draw(texture2D, vector2_17 - Main.screenPosition + vector2_16, new Microsoft.Xna.Framework.Rectangle?(r), color26, projectile.rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile.scale, SpriteEffects.None, 0.0f); + num280 += (float) r.Height * projectile.scale; + vector2_17 += projectile.velocity * (float) r.Height * projectile.scale; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 56, texture2D.Width, 22); + Main.spriteBatch.Draw(texture2D, vector2_17 - Main.screenPosition + vector2_16, new Microsoft.Xna.Framework.Rectangle?(r), color26, projectile.rotation, texture2D.Frame().Top(), projectile.scale, SpriteEffects.None, 0.0f); + } + else if (projectile.type == 632) + { + if (projectile.velocity == Vector2.Zero) + return; + Texture2D tex = Main.projectileTexture[projectile.type]; + float num281 = projectile.localAI[1]; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(projectile.GetPrismHue(projectile.ai[0]), 1f, 0.5f); + rgb.A = (byte) 0; + Vector2 vector2_18 = projectile.Center.Floor() + projectile.velocity * projectile.scale * 10.5f; + float num282 = num281 - projectile.scale * 14.5f * projectile.scale; + Vector2 scale = new Vector2(projectile.scale); + DelegateMethods.f_1 = 1f; + DelegateMethods.c_1 = rgb * 0.75f * projectile.Opacity; + Vector2 vector2_19 = projectile.oldPos[0] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_18 - Main.screenPosition, vector2_18 + projectile.velocity * num282 - 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 * projectile.Opacity; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_18 - Main.screenPosition, vector2_18 + projectile.velocity * num282 - Main.screenPosition, scale / 2f, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); + } + else if (projectile.type == 642) + { + if (projectile.velocity == Vector2.Zero) + return; + Texture2D tex = Main.projectileTexture[projectile.type]; + float num283 = projectile.localAI[1]; + Microsoft.Xna.Framework.Color color27 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + Vector2 vector2_20 = projectile.Center.Floor(); + float num284 = num283 - projectile.scale * 10.5f; + Vector2 scale = new Vector2(projectile.scale); + DelegateMethods.f_1 = 1f; + DelegateMethods.c_1 = color27; + DelegateMethods.i_1 = 54000 - (int) Main.time / 2; + Vector2 vector2_21 = projectile.oldPos[0] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_20 - Main.screenPosition, vector2_20 + projectile.velocity * num284 - 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 * projectile.Opacity; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_20 - Main.screenPosition, vector2_20 + projectile.velocity * num284 - Main.screenPosition, scale / 2f, new Utils.LaserLineFraming(DelegateMethods.TurretLaserDraw)); + } + else if (projectile.type == 611) + { + Vector2 vector2_22 = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + if (projectile.velocity == Vector2.Zero) + return; + float num285 = projectile.velocity.Length() + 16f; + bool flag = (double) num285 < 100.0; + Vector2 vector2_23 = Vector2.Normalize(projectile.velocity); + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 2, texture2D.Width, 40); + Vector2 vector2_24 = new Vector2(0.0f, Main.player[projectile.owner].gfxOffY); + float rotation = projectile.rotation + 3.141593f; + Main.spriteBatch.Draw(texture2D, projectile.Center.Floor() - Main.screenPosition + vector2_24, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, r.Size() / 2f - Vector2.UnitY * 4f, projectile.scale, SpriteEffects.None, 0.0f); + float num286 = num285 - 40f * projectile.scale; + Vector2 vector2_25 = projectile.Center.Floor() + vector2_23 * projectile.scale * 24f; + r = new Microsoft.Xna.Framework.Rectangle(0, 68, texture2D.Width, 18); + if ((double) num286 > 0.0) + { + float num287 = 0.0f; + while ((double) num287 + 1.0 < (double) num286) + { + if ((double) num286 - (double) num287 < (double) r.Height) + r.Height = (int) ((double) num286 - (double) num287); + Main.spriteBatch.Draw(texture2D, vector2_25 - Main.screenPosition + vector2_24, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile.scale, SpriteEffects.None, 0.0f); + num287 += (float) r.Height * projectile.scale; + vector2_25 += vector2_23 * (float) r.Height * projectile.scale; + } + } + Vector2 vector2_26 = vector2_25; + Vector2 vector2_27 = projectile.Center.Floor() + vector2_23 * projectile.scale * 24f; + r = new Microsoft.Xna.Framework.Rectangle(0, 46, texture2D.Width, 18); + int num288 = 18; + if (flag) + num288 = 9; + float num289 = num286; + if ((double) num286 > 0.0) + { + float num290 = 0.0f; + float num291 = num289 / (float) num288; + float num292 = num290 + num291 * 0.25f; + Vector2 vector2_28 = vector2_27 + vector2_23 * num291 * 0.25f; + for (int index = 0; index < num288; ++index) + { + float num293 = num291; + if (index == 0) + num293 *= 0.75f; + Main.spriteBatch.Draw(texture2D, vector2_28 - Main.screenPosition + vector2_24, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile.scale, SpriteEffects.None, 0.0f); + num292 += num293; + vector2_28 += vector2_23 * num293; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 90, texture2D.Width, 48); + Main.spriteBatch.Draw(texture2D, vector2_26 - Main.screenPosition + vector2_24, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, texture2D.Frame().Top(), projectile.scale, SpriteEffects.None, 0.0f); + } + else if (projectile.type == 537) + { + if (projectile.velocity == Vector2.Zero) + return; + Texture2D texture2D = Main.projectileTexture[projectile.type]; + float num294 = projectile.localAI[1]; + Microsoft.Xna.Framework.Color color28 = 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_29 = new Vector2(0.0f, Main.npc[(int) projectile.ai[1]].gfxOffY); + Main.spriteBatch.Draw(texture2D, projectile.Center.Floor() - Main.screenPosition + vector2_29, new Microsoft.Xna.Framework.Rectangle?(r), color28, projectile.rotation, r.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + float num295 = num294 - 33f * projectile.scale; + Vector2 vector2_30 = projectile.Center.Floor() + projectile.velocity * projectile.scale * 10.5f; + r = new Microsoft.Xna.Framework.Rectangle(0, 25, texture2D.Width, 28); + if ((double) num295 > 0.0) + { + float num296 = 0.0f; + while ((double) num296 + 1.0 < (double) num295) + { + if ((double) num295 - (double) num296 < (double) r.Height) + r.Height = (int) ((double) num295 - (double) num296); + Main.spriteBatch.Draw(texture2D, vector2_30 - Main.screenPosition + vector2_29, new Microsoft.Xna.Framework.Rectangle?(r), color28, projectile.rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile.scale, SpriteEffects.None, 0.0f); + num296 += (float) r.Height * projectile.scale; + vector2_30 += projectile.velocity * (float) r.Height * projectile.scale; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 56, texture2D.Width, 22); + Main.spriteBatch.Draw(texture2D, vector2_30 - Main.screenPosition + vector2_29, new Microsoft.Xna.Framework.Rectangle?(r), color28, projectile.rotation, texture2D.Frame().Top(), projectile.scale, SpriteEffects.None, 0.0f); + } + else if (projectile.type == 456) + { + Texture2D texture2D5 = Main.projectileTexture[projectile.type]; + Texture2D texture = Main.extraTexture[23]; + Texture2D texture2D6 = Main.extraTexture[24]; + Vector2 vector2_31 = new Vector2(0.0f, 216f); + Vector2 vector2_32 = Main.npc[(int) Math.Abs(projectile.ai[0]) - 1].Center - projectile.Center + vector2_31; + float num297 = vector2_32.Length(); + Vector2 vector2_33 = Vector2.Normalize(vector2_32); + Microsoft.Xna.Framework.Rectangle r3 = texture2D5.Frame(); + r3.Height /= 4; + r3.Y += projectile.frame * r3.Height; + Microsoft.Xna.Framework.Color newColor1 = Microsoft.Xna.Framework.Color.Lerp(color3, Microsoft.Xna.Framework.Color.White, 0.3f); + Main.spriteBatch.Draw(texture2D5, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r3), projectile.GetAlpha(newColor1), projectile.rotation, r3.Size() / 2f, projectile.scale, SpriteEffects.None, 0.0f); + float num298 = num297 - (float) (r3.Height / 2 + texture2D6.Height) * projectile.scale; + Vector2 vec = projectile.Center + vector2_33 * projectile.scale * (float) r3.Height / 2f; + if ((double) num298 > 0.0) + { + float num299 = 0.0f; + Microsoft.Xna.Framework.Rectangle r4 = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + while ((double) num299 + 1.0 < (double) num298) + { + if ((double) num298 - (double) num299 < (double) r4.Height) + r4.Height = (int) ((double) num298 - (double) num299); + 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.spriteBatch.Draw(texture, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r4), projectile.GetAlpha(newColor2), projectile.rotation, r4.Bottom(), projectile.scale, SpriteEffects.None, 0.0f); + num299 += (float) r4.Height * projectile.scale; + vec += vector2_33 * (float) r4.Height * projectile.scale; + } + } + Microsoft.Xna.Framework.Point tileCoordinates1 = vec.ToTileCoordinates(); + Microsoft.Xna.Framework.Color color29 = Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates1.X, tileCoordinates1.Y), Microsoft.Xna.Framework.Color.White, 0.3f); + Microsoft.Xna.Framework.Rectangle rectangle = texture2D6.Frame(); + if ((double) num298 < 0.0) + rectangle.Height += (int) num298; + Main.spriteBatch.Draw(texture2D6, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color29, projectile.rotation, new Vector2((float) rectangle.Width / 2f, (float) rectangle.Height), projectile.scale, SpriteEffects.None, 0.0f); + } + else if (projectile.type == 443) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + float num300 = 30f; + float num301 = num300 * 4f; + float num302 = 6.283185f * projectile.ai[0] / num300; + float num303 = 6.283185f * projectile.ai[0] / num301; + Vector2 vector2 = -Vector2.UnitY.RotatedBy((double) num302); + float scale1 = (float) (0.75 + (double) vector2.Y * 0.25); + float scale2 = (float) (0.800000011920929 - (double) vector2.Y * 0.200000002980232); + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y24 = height * projectile.frame; + Vector2 position = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y24, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation + num303, new Vector2((float) texture.Width / 2f, (float) height / 2f), scale1, effects1, 0.0f); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y24, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation + (6.283185f - num303), new Vector2((float) texture.Width / 2f, (float) height / 2f), scale2, effects1, 0.0f); + } + else if (projectile.type == 656 || projectile.type == 657) + { + float num304 = 900f; + if (projectile.type == 657) + num304 = 300f; + float num305 = 15f; + float num306 = 15f; + float num307 = projectile.ai[0]; + float num308 = MathHelper.Clamp(num307 / 30f, 0.0f, 1f); + if ((double) num307 > (double) num304 - 60.0) + num308 = MathHelper.Lerp(1f, 0.0f, (float) (((double) num307 - ((double) num304 - 60.0)) / 60.0)); + Microsoft.Xna.Framework.Point tileCoordinates = projectile.Center.ToTileCoordinates(); + int topY; + int bottomY; + Collision.ExpandVertically(tileCoordinates.X, tileCoordinates.Y, out topY, out bottomY, (int) num305, (int) num306); + int num309 = topY + 1; + --bottomY; + float num310 = 0.2f; + Vector2 vector2_34 = new Vector2((float) tileCoordinates.X, (float) num309) * 16f + new Vector2(8f); + Vector2 vector2_35 = new Vector2((float) tileCoordinates.X, (float) bottomY) * 16f + new Vector2(8f); + Vector2.Lerp(vector2_34, vector2_35, 0.5f); + Vector2 vector2_36 = new Vector2(0.0f, vector2_35.Y - vector2_34.Y); + vector2_36.X = vector2_36.Y * num310; + Vector2 vector2_37 = new Vector2(vector2_34.X - vector2_36.X / 2f, vector2_34.Y); + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 origin = r.Size() / 2f; + float num311 = -0.06283186f * num307; + Vector2 spinningpoint = Vector2.UnitY.RotatedBy((double) num307 * 0.100000001490116); + float num312 = 0.0f; + float num313 = 5.1f; + Microsoft.Xna.Framework.Color color30 = new Microsoft.Xna.Framework.Color(212, 192, 100); + for (float y25 = (float) (int) vector2_35.Y; (double) y25 > (double) (int) vector2_34.Y; y25 -= num313) + { + num312 += num313; + float num314 = num312 / vector2_36.Y; + float num315 = (float) ((double) num312 * 6.28318548202515 / -20.0); + float num316 = num314 - 0.15f; + Vector2 position = spinningpoint.RotatedBy((double) num315); + Vector2 vector2_38 = new Vector2(0.0f, num314 + 1f); + vector2_38.X = vector2_38.Y * num310; + Microsoft.Xna.Framework.Color color31 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color30, num314 * 2f); + if ((double) num314 > 0.5) + color31 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color30, (float) (2.0 - (double) num314 * 2.0)); + color31.A = (byte) ((double) color31.A * 0.5); + color31 *= num308; + position *= vector2_38 * 100f; + position.Y = 0.0f; + position.X = 0.0f; + position += new Vector2(vector2_35.X, y25) - Main.screenPosition; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color31, num311 + num315, origin, 1f + num316, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 704) + { + float num317 = 300f; + float num318 = projectile.ai[0]; + float num319 = MathHelper.Clamp(num318 / 30f, 0.0f, 1f); + if ((double) num318 > (double) num317 - 60.0) + num319 = MathHelper.Lerp(1f, 0.0f, (float) (((double) num318 - ((double) num317 - 60.0)) / 60.0)); + float num320 = 0.2f; + Vector2 top = projectile.Top; + Vector2 bottom = projectile.Bottom; + Vector2.Lerp(top, bottom, 0.5f); + Vector2 vector2_39 = new Vector2(0.0f, bottom.Y - top.Y); + vector2_39.X = vector2_39.Y * num320; + Vector2 vector2_40 = new Vector2(top.X - vector2_39.X / 2f, top.Y); + Texture2D texture2D = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 origin = r.Size() / 2f; + float num321 = (float) (-0.157079637050629 * (double) num318 * ((double) projectile.velocity.X > 0.0 ? -1.0 : 1.0)); + SpriteEffects effects3 = (double) projectile.velocity.X > 0.0 ? SpriteEffects.FlipVertically : SpriteEffects.None; + bool flag4 = (double) projectile.velocity.X > 0.0; + Vector2 spinningpoint = Vector2.UnitY.RotatedBy((double) num318 * 0.140000000596046); + float num322 = 0.0f; + float num323 = (float) (5.01000022888184 + (double) num318 / 150.0 * -0.899999976158142); + if ((double) num323 < 4.1100001335144) + num323 = 4.11f; + Microsoft.Xna.Framework.Color color32 = new Microsoft.Xna.Framework.Color(160, 140, 100, (int) sbyte.MaxValue); + Microsoft.Xna.Framework.Color color33 = new Microsoft.Xna.Framework.Color(140, 160, (int) byte.MaxValue, (int) sbyte.MaxValue); + float t = num318 % 60f; + Microsoft.Xna.Framework.Color color34 = (double) t >= 30.0 ? color33 * Utils.InverseLerp(38f, 30f, t, true) : color33 * Utils.InverseLerp(22f, 30f, t, true); + bool flag5 = color34 != Microsoft.Xna.Framework.Color.Transparent; + for (float y26 = (float) (int) bottom.Y; (double) y26 > (double) (int) top.Y; y26 -= num323) + { + num322 += num323; + float num324 = num322 / vector2_39.Y; + float num325 = (float) ((double) num322 * 6.28318548202515 / -20.0); + if (flag4) + num325 *= -1f; + float num326 = num324 - 0.35f; + Vector2 position = spinningpoint.RotatedBy((double) num325); + Vector2 vector2_41 = new Vector2(0.0f, num324 + 1f); + vector2_41.X = vector2_41.Y * num320; + Microsoft.Xna.Framework.Color color35 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color32, num324 * 2f); + if ((double) num324 > 0.5) + color35 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color32, (float) (2.0 - (double) num324 * 2.0)); + color35.A = (byte) ((double) color35.A * 0.5); + color35 *= num319; + position *= vector2_41 * 100f; + position.Y = 0.0f; + position.X = 0.0f; + position += new Vector2(bottom.X, y26) - Main.screenPosition; + if (flag5) + { + Microsoft.Xna.Framework.Color color36 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color34, num324 * 2f); + if ((double) num324 > 0.5) + color36 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color34, (float) (2.0 - (double) num324 * 2.0)); + color36.A = (byte) ((double) color36.A * 0.5); + color36 *= num319; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color36, num321 + num325, origin, (float) ((1.0 + (double) num326) * 0.800000011920929), effects3, 0.0f); + } + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color35, num321 + num325, origin, 1f + num326, effects3, 0.0f); + } + } + else if (projectile.type == 444 || projectile.type == 446 || projectile.type == 490 || projectile.type == 464 || projectile.type == 502 || projectile.type == 538 || projectile.type == 540 || projectile.type == 579 || projectile.type == 578 || projectile.type == 583 || projectile.type == 584 || projectile.type == 616 || projectile.type == 617 || projectile.type == 618 || projectile.type == 641 || projectile.type >= 646 && projectile.type <= 649 || projectile.type == 653 || projectile.type == 186 || projectile.type == 662 || projectile.type == 685 || projectile.type == 673 || projectile.type == 676 || projectile.type == 697 || projectile.type == 699 || projectile.type == 707 || projectile.type == 708) + { + Vector2 position14 = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture3 = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + Vector2 origin3 = new Vector2((float) texture3.Width, (float) texture3.Height) / 2f; + if (projectile.type == 446) + origin3.Y = 4f; + if (projectile.type == 662 || projectile.type == 685) + origin3 = new Vector2(6f, 6f); + if (projectile.type == 699 || projectile.type == 708) + origin3 = new Vector2(projectile.spriteDirection == 1 ? (float) texture3.Width - -8f : -8f, -8f); + if (projectile.type == 502) + { + this.LoadProjectile(250); + Texture2D texture4 = Main.projectileTexture[250]; + Vector2 origin4 = new Vector2((float) (texture4.Width / 2), 0.0f); + Vector2 vector2_42 = new Vector2((float) projectile.width, (float) projectile.height) / 2f; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 127; + for (int index = projectile.oldPos.Length - 1; index > 0; --index) + { + Vector2 vector2_43 = projectile.oldPos[index] + vector2_42; + if (!(vector2_43 == vector2_42)) + { + Vector2 vector2_44 = projectile.oldPos[index - 1] + vector2_42; + float rotation = (vector2_44 - vector2_43).ToRotation() - 1.570796f; + Vector2 scale = new Vector2(1f, Vector2.Distance(vector2_43, vector2_44) / (float) texture4.Height); + Microsoft.Xna.Framework.Color color37 = white * (float) (1.0 - (double) index / (double) projectile.oldPos.Length); + Main.spriteBatch.Draw(texture4, vector2_43 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color37, rotation, origin4, scale, effects1, 0.0f); + } + } + } + else if (projectile.type == 540 && projectile.velocity != Vector2.Zero) + { + float num327 = 0.0f; + if ((double) projectile.ai[0] >= 10.0) + num327 = (float) (((double) projectile.ai[0] - 10.0) / 10.0); + if ((double) projectile.ai[0] >= 20.0) + num327 = (float) ((20.0 - (double) projectile.ai[0]) / 10.0); + if ((double) num327 > 1.0) + num327 = 1f; + if ((double) num327 < 0.0) + num327 = 0.0f; + if ((double) num327 != 0.0) + { + Texture2D texture5 = Main.extraTexture[47]; + Vector2 origin5 = new Vector2((float) (texture5.Width / 2), 0.0f); + Microsoft.Xna.Framework.Color color38 = alpha * num327 * 0.7f; + Vector2 vector2_45 = projectile.Center - Main.screenPosition; + Vector2 vector2_46 = projectile.velocity.ToRotation().ToRotationVector2() * (float) texture3.Width / 3f; + Vector2 zero = Vector2.Zero; + Vector2 position15 = vector2_45 + zero; + float rotation = projectile.velocity.ToRotation() - 1.570796f; + Vector2 scale = new Vector2(1f, (projectile.velocity.Length() - zero.Length() * 2f) / (float) texture5.Height); + Main.spriteBatch.Draw(texture5, position15, new Microsoft.Xna.Framework.Rectangle?(), color38, rotation, origin5, scale, SpriteEffects.None, 0.0f); + } + } + if (projectile.type == 578 || projectile.type == 579 || projectile.type == 641) + { + Microsoft.Xna.Framework.Color color39 = alpha * 0.8f; + color39.A /= (byte) 2; + Microsoft.Xna.Framework.Color color40 = Microsoft.Xna.Framework.Color.Lerp(alpha, Microsoft.Xna.Framework.Color.Black, 0.5f); + color40.A = alpha.A; + float num328 = (float) (0.949999988079071 + (double) (projectile.rotation * 0.75f).ToRotationVector2().Y * 0.100000001490116); + Microsoft.Xna.Framework.Color color41 = color40 * num328; + float scale = (float) (0.600000023841858 + (double) projectile.scale * 0.600000023841858 * (double) num328); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), color41, (float) (-(double) projectile.rotation + 0.349999994039536), origin3, scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, -projectile.rotation, origin3, projectile.scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(texture3, position14, new Microsoft.Xna.Framework.Rectangle?(), color39, (float) (-(double) projectile.rotation * 0.699999988079071), origin3, projectile.scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha * 0.8f, projectile.rotation * 0.5f, origin3, projectile.scale * 0.9f, effects1, 0.0f); + alpha.A = (byte) 0; + } + if (projectile.type == 617) + { + Microsoft.Xna.Framework.Color color42 = alpha * 0.8f; + color42.A /= (byte) 2; + Microsoft.Xna.Framework.Color color43 = Microsoft.Xna.Framework.Color.Lerp(alpha, Microsoft.Xna.Framework.Color.Black, 0.5f); + color43.A = alpha.A; + float num329 = (float) (0.949999988079071 + (double) (projectile.rotation * 0.75f).ToRotationVector2().Y * 0.100000001490116); + Microsoft.Xna.Framework.Color color44 = color43 * num329; + float scale = (float) (0.600000023841858 + (double) projectile.scale * 0.600000023841858 * (double) num329); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), color44, (float) (-(double) projectile.rotation + 0.349999994039536), origin3, scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, -projectile.rotation, origin3, projectile.scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(texture3, position14, new Microsoft.Xna.Framework.Rectangle?(), color42, (float) (-(double) projectile.rotation * 0.699999988079071), origin3, projectile.scale, effects1 ^ SpriteEffects.FlipHorizontally, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[50], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha * 0.8f, projectile.rotation * 0.5f, origin3, projectile.scale * 0.9f, effects1, 0.0f); + alpha.A = (byte) 0; + } + if ((0 | (projectile.type != 464 ? 0 : ((double) projectile.ai[1] != 1.0 ? 1 : 0))) == 0) + Main.spriteBatch.Draw(texture3, position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + if (projectile.type == 464 && (double) projectile.ai[1] != 1.0) + { + Texture2D texture2D = Main.extraTexture[35]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 3); + Vector2 origin6 = r.Size() / 2f; + Vector2 spinningpoint = new Vector2(0.0f, -720f).RotatedBy((double) projectile.velocity.ToRotation()) * (float) ((double) projectile.ai[0] % 45.0 / 45.0); + for (int index = 0; index < 6; ++index) + { + float num330 = (float) ((double) index * 6.28318548202515 / 6.0); + Vector2 vector2 = projectile.Center + spinningpoint.RotatedBy((double) num330); + Main.spriteBatch.Draw(texture2D, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), alpha, (float) ((double) num330 + (double) projectile.velocity.ToRotation() + 3.14159274101257), origin6, projectile.scale, effects1, 0.0f); + r.Y += r.Height; + if (r.Y >= texture2D.Height) + r.Y = 0; + } + } + else if (projectile.type == 490) + { + Main.spriteBatch.Draw(Main.extraTexture[34], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, -projectile.rotation, Main.extraTexture[34].Size() / 2f, projectile.scale, effects1, 0.0f); + Main.spriteBatch.Draw(texture3, position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, projectile.rotation, origin3, projectile.scale * 0.42f, effects1, 0.0f); + Main.spriteBatch.Draw(Main.extraTexture[34], position14, new Microsoft.Xna.Framework.Rectangle?(), alpha, -projectile.rotation, Main.extraTexture[34].Size() / 2f, projectile.scale * 0.42f, effects1, 0.0f); + } + else if (projectile.type == 616) + { + Texture2D texture6 = Main.glowMaskTexture[193]; + Main.spriteBatch.Draw(texture6, position14, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0), projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + } + else if (projectile.type >= 646 && projectile.type <= 649) + { + Texture2D texture7 = Main.glowMaskTexture[203 + projectile.type - 646]; + Main.spriteBatch.Draw(texture7, position14, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 699) + { + Texture2D texture8 = Main.glowMaskTexture[231]; + Main.spriteBatch.Draw(texture8, position14, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 707 || projectile.type == 708) + { + float num331 = 0.5f; + Texture2D texture2D = Main.glowMaskTexture[232]; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 3, frameY: ((int) ((double) projectile.ai[0] % 9.0) / 3)); + if (projectile.type == 708) + { + rectangle = texture2D.Frame(verticalFrames: 3, frameY: (Main.player[projectile.owner].itemAnimation % 9 / 3)); + num331 = 0.75f; + } + Microsoft.Xna.Framework.Color color45 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num331; + Vector2 spinningpoint = new Vector2(2f, 0.0f).RotatedBy((double) projectile.rotation); + for (float num332 = 0.0f; (double) num332 < 4.0; ++num332) + Main.spriteBatch.Draw(texture2D, position14 + spinningpoint.RotatedBy((double) num332 * 1.57079637050629), new Microsoft.Xna.Framework.Rectangle?(rectangle), color45 * 0.5f, projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + Main.spriteBatch.Draw(texture2D, position14, new Microsoft.Xna.Framework.Rectangle?(rectangle), color45, projectile.rotation, origin3, projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 465 || projectile.type == 467 || projectile.type == 468 || projectile.type == 500 || projectile.type == 518 || projectile.type == 535 || projectile.type == 539 || projectile.type == 575 || projectile.type == 574 || projectile.type == 589 || projectile.type == 590 || projectile.type == 593 || projectile.type == 602 || projectile.type == 596 || projectile.type == 612 || projectile.type == 613 || projectile.type == 614 || projectile.type == 623 || projectile.type == 625 || projectile.type == 626 || projectile.type == 627 || projectile.type == 628 || projectile.type == 634 || projectile.type == 635 || projectile.type == 643 || projectile.type == 644 || projectile.type == 645 || projectile.type == 650 || projectile.type == 652 || projectile.type == 658 || projectile.type == 659 || projectile.type == 663 || projectile.type == 665 || projectile.type == 667 || projectile.type == 677 || projectile.type == 678 || projectile.type == 679 || projectile.type == 691 || projectile.type == 692 || projectile.type == 693 || projectile.type == 702 || projectile.type == 703 || projectile.type == 701 || projectile.type == 712) + { + Vector2 position16 = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture2D7 = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Rectangle r = texture2D7.Frame(verticalFrames: Main.projFrames[projectile.type], frameY: projectile.frame); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + Vector2 origin7 = r.Size() / 2f; + if (projectile.type == 539) + { + if ((double) projectile.ai[0] >= 210.0) + { + float num333 = (projectile.ai[0] - 210f) / 20f; + if ((double) num333 > 1.0) + num333 = 1f; + Main.spriteBatch.Draw(Main.extraTexture[46], position16, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * num333, projectile.rotation, new Vector2(17f, 22f), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 663 || projectile.type == 665 || projectile.type == 667) + { + position16 = projectile.Bottom + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + origin7 = r.Size() * new Vector2(0.5f, 1f); + origin7.Y -= 2f; + origin7.Y -= 2f; + } + else if (projectile.type == 691 || projectile.type == 692 || projectile.type == 693) + { + position16 = projectile.Bottom + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + origin7 = r.Size() * new Vector2(0.5f, 1f); + origin7.Y -= 2f; + origin7.Y -= 2f; + } + else if (projectile.type == 677 || projectile.type == 678 || projectile.type == 679) + { + if (projectile.spriteDirection == -1) + effects1 ^= SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + Texture2D texture2D8 = Main.extraTexture[83]; + if (projectile.type == 678) + texture2D8 = Main.extraTexture[84]; + if (projectile.type == 679) + texture2D8 = Main.extraTexture[85]; + Vector2 position17 = projectile.Bottom + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Vector2 origin8 = texture2D8.Size() * new Vector2(0.5f, 1f); + origin8.Y -= 2f; + Main.spriteBatch.Draw(texture2D8, position17, new Microsoft.Xna.Framework.Rectangle?(), alpha, 0.0f, origin8, 1f, effects1 & SpriteEffects.FlipHorizontally, 0.0f); + origin7.X += (float) effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt(); + ++position16.Y; + position16.Y += 2f; + if (projectile.type == 678) + position16.Y += -4f; + if (projectile.type == 679) + { + position16.Y -= 2f; + if (!effects1.HasFlag((Enum) SpriteEffects.FlipVertically)) + origin7.Y += 4f; + else + origin7.Y -= 4f; + origin7.X += (float) (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt() * 4); + } + } + else if (projectile.type == 602) + { + origin7.X = (float) (r.Width - 6); + --origin7.Y; + r.Height -= 2; + } + else if (projectile.type == 589) + { + r = texture2D7.Frame(5, frameX: ((int) projectile.ai[1])); + origin7 = r.Size() / 2f; + } + else if (projectile.type == 590) + { + r = texture2D7.Frame(3, frameX: projectile.frame); + origin7 = r.Size() / 2f; + } + else if (projectile.type == 650) + origin7.Y -= 4f; + else if (projectile.type == 623) + alpha.A /= (byte) 2; + else if (projectile.type >= 625 && projectile.type <= 628) + alpha.A /= (byte) 2; + else if (projectile.type == 644) + { + Microsoft.Xna.Framework.Color color46 = Main.hslToRgb(projectile.ai[0], 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), color46, projectile.rotation, origin7, projectile.scale * 2f, effects1, 0.0f); + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), color46, 0.0f, origin7, projectile.scale * 2f, effects1, 0.0f); + if ((double) projectile.ai[1] != -1.0 && (double) projectile.Opacity > 0.300000011920929) + { + Vector2 v = Main.projectile[(int) projectile.ai[1]].Center - projectile.Center; + Vector2 scale = new Vector2(1f, v.Length() / (float) texture2D7.Height); + float rotation = v.ToRotation() + 1.570796f; + float num334 = MathHelper.Clamp(MathHelper.Distance(30f, projectile.localAI[1]) / 20f, 0.0f, 1f); + if ((double) num334 > 0.0) + { + Main.spriteBatch.Draw(texture2D7, position16 + v / 2f, new Microsoft.Xna.Framework.Rectangle?(r), color46 * num334, rotation, origin7, scale, effects1, 0.0f); + Main.spriteBatch.Draw(texture2D7, position16 + v / 2f, new Microsoft.Xna.Framework.Rectangle?(r), alpha * num334, rotation, origin7, scale / 2f, effects1, 0.0f); + } + } + } + else if (projectile.type == 658) + { + Microsoft.Xna.Framework.Color color47 = Main.hslToRgb(0.136f, 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), color47, 0.0f, origin7, new Vector2(1f, 5f) * projectile.scale * 2f, effects1, 0.0f); + } + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), alpha, projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + if (projectile.type == 535) + { + for (int i2 = 0; i2 < 1000; ++i2) + { + if (Main.projectile[i2].active && Main.projectile[i2].owner == projectile.owner && Main.projectile[i2].type == 536) + this.DrawProj(i2); + } + } + else if (projectile.type == 702) + { + Texture2D texture2D9 = Main.FlameTexture[5]; + Vector2 origin9 = texture2D9.Size() / 2f; + Vector2 vector2 = new Vector2((float) (5 * projectile.spriteDirection), -10f).RotatedBy((double) projectile.rotation); + ulong seed = (ulong) ((double) projectile.localAI[0] / 4.0); + for (int index = 0; index < 5; ++index) + { + Microsoft.Xna.Framework.Color color48 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + float x20 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float y27 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(texture2D9, position16 + vector2 + new Vector2(x20, y27), new Microsoft.Xna.Framework.Rectangle?(), color48, projectile.rotation, origin9, 1f, effects1, 0.0f); + } + } + else if (projectile.type == 663 || projectile.type == 665 || projectile.type == 667) + { + Texture2D texture = Main.glowMaskTexture[221]; + switch (projectile.type) + { + case 665: + texture = Main.glowMaskTexture[222]; + break; + case 667: + texture = Main.glowMaskTexture[223]; + break; + } + float num335 = (float) ((double) ((float) ((double) projectile.localAI[0] / 100.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 1.0); + Microsoft.Xna.Framework.Color color49 = new Microsoft.Xna.Framework.Color(140, 100, 40, 0) * (float) ((double) num335 / 4.0 + 0.5) * 1f; + for (float num336 = 0.0f; (double) num336 < 4.0; ++num336) + Main.spriteBatch.Draw(texture, position16 + (num336 * 1.570796f).ToRotationVector2() * num335, new Microsoft.Xna.Framework.Rectangle?(r), color49, projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 644) + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), alpha, 0.0f, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 658) + Main.spriteBatch.Draw(texture2D7, position16, new Microsoft.Xna.Framework.Rectangle?(r), alpha, 0.0f, origin7, new Vector2(1f, 8f) * projectile.scale, effects1, 0.0f); + else if (projectile.type == 602) + { + Texture2D texture2D10 = Main.extraTexture[60]; + Microsoft.Xna.Framework.Color color50 = alpha; + color50.A = (byte) 0; + Microsoft.Xna.Framework.Color color51 = color50 * 0.3f; + origin7 = texture2D10.Size() / 2f; + Main.spriteBatch.Draw(texture2D10, position16, new Microsoft.Xna.Framework.Rectangle?(), color51, projectile.rotation - 1.570796f, origin7, projectile.scale, effects1, 0.0f); + Texture2D texture2D11 = Main.extraTexture[59]; + Microsoft.Xna.Framework.Color color52 = alpha; + color52.A = (byte) 0; + color52 *= 0.13f; + origin7 = texture2D11.Size() / 2f; + Main.spriteBatch.Draw(texture2D11, position16, new Microsoft.Xna.Framework.Rectangle?(), color52, projectile.rotation - 1.570796f, origin7, projectile.scale * 0.9f, effects1, 0.0f); + } + else if (projectile.type == 539) + Main.spriteBatch.Draw(Main.glowMaskTexture[140], position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 613) + Main.spriteBatch.Draw(Main.glowMaskTexture[189], position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color(128 - projectile.alpha / 2, 128 - projectile.alpha / 2, 128 - projectile.alpha / 2, 0), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 614) + Main.spriteBatch.Draw(Main.glowMaskTexture[190], position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color(128 - projectile.alpha / 2, 128 - projectile.alpha / 2, 128 - projectile.alpha / 2, 0), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 574) + Main.spriteBatch.Draw(Main.glowMaskTexture[148], position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 691 || projectile.type == 692 || projectile.type == 693) + { + Texture2D texture = Main.glowMaskTexture[235]; + switch (projectile.type) + { + case 692: + texture = Main.glowMaskTexture[236]; + break; + case 693: + texture = Main.glowMaskTexture[237]; + break; + } + Main.spriteBatch.Draw(texture, position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 590) + Main.spriteBatch.Draw(Main.glowMaskTexture[168], position16, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - projectile.alpha / 2, (int) sbyte.MaxValue - projectile.alpha / 2, (int) sbyte.MaxValue - projectile.alpha / 2, 0), projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + else if (projectile.type == 623 || projectile.type >= 625 && projectile.type <= 628) + { + if ((double) Main.player[projectile.owner].ghostFade != 0.0) + { + float num337 = Main.player[projectile.owner].ghostFade * 5f; + for (float num338 = 0.0f; (double) num338 < 4.0; ++num338) + Main.spriteBatch.Draw(texture2D7, position16 + Vector2.UnitY.RotatedBy((double) num338 * 6.28318548202515 / 4.0) * num337, new Microsoft.Xna.Framework.Rectangle?(r), alpha * 0.1f, projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 643) + { + float num339 = (float) (Math.Cos(6.28318548202515 * ((double) projectile.localAI[0] / 60.0)) + 3.0 + 3.0); + for (float num340 = 0.0f; (double) num340 < 4.0; ++num340) + Main.spriteBatch.Draw(texture2D7, position16 + Vector2.UnitY.RotatedBy((double) num340 * 1.57079637050629) * num339, new Microsoft.Xna.Framework.Rectangle?(r), alpha * 0.2f, projectile.rotation, origin7, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 650) + { + int num341 = (int) ((double) projectile.localAI[0] / 6.28318548202515); + float f = (float) ((double) projectile.localAI[0] % 6.28318548202515 - 3.14159274101257); + float num342 = (float) Math.IEEERemainder((double) projectile.localAI[1], 1.0); + if ((double) num342 < 0.0) + ++num342; + int num343 = (int) Math.Floor((double) projectile.localAI[1]); + float num344 = 5f; + float scale = (float) (1.0 + (double) num343 * 0.0199999995529652); + if ((double) num341 == 1.0) + num344 = 7f; + Vector2 vector2 = f.ToRotationVector2() * num342 * num344 * projectile.scale; + Texture2D texture2D12 = Main.extraTexture[66]; + Main.spriteBatch.Draw(texture2D12, position16 + vector2, new Microsoft.Xna.Framework.Rectangle?(), alpha, projectile.rotation, texture2D12.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + } + else if (projectile.type == 466) + { + Vector2 end1 = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D tex = Main.extraTexture[33]; + projectile.GetAlpha(color3); + Vector2 vector2 = new Vector2(projectile.scale) / 2f; + for (int index3 = 0; index3 < 3; ++index3) + { + Vector2 scale; + if (index3 == 0) + { + scale = new Vector2(projectile.scale) * 0.6f; + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 204, 219, 0) * 0.5f; + } + else if (index3 == 1) + { + scale = new Vector2(projectile.scale) * 0.4f; + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(113, 251, (int) byte.MaxValue, 0) * 0.5f; + } + else + { + scale = new Vector2(projectile.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 = projectile.oldPos.Length - 1; index4 > 0; --index4) + { + if (!(projectile.oldPos[index4] == Vector2.Zero)) + { + Vector2 start = projectile.oldPos[index4] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Vector2 end2 = projectile.oldPos[index4 - 1] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end2, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + if (projectile.oldPos[0] != Vector2.Zero) + { + DelegateMethods.f_1 = 1f; + Vector2 start = projectile.oldPos[0] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end1, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + } + else if (projectile.type == 580) + { + Vector2 end3 = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D tex = Main.extraTexture[33]; + projectile.GetAlpha(color3); + Vector2 vector2 = new Vector2(projectile.scale) / 2f; + for (int index5 = 0; index5 < 2; ++index5) + { + float num345 = (double) projectile.localAI[1] == -1.0 || (double) projectile.localAI[1] == 1.0 ? -0.2f : 0.0f; + Vector2 scale; + if (index5 == 0) + { + scale = new Vector2(projectile.scale) * (0.5f + num345); + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 244, 219, 0) * 0.5f; + } + else + { + scale = new Vector2(projectile.scale) * (0.3f + num345); + 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 = projectile.oldPos.Length - 1; index6 > 0; --index6) + { + if (!(projectile.oldPos[index6] == Vector2.Zero)) + { + Vector2 start = projectile.oldPos[index6] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Vector2 end4 = projectile.oldPos[index6 - 1] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end4, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + if (projectile.oldPos[0] != Vector2.Zero) + { + DelegateMethods.f_1 = 1f; + Vector2 start = projectile.oldPos[0] + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end3, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + } + else if (projectile.type == 445) + { + Vector2 position = projectile.position + new Vector2((float) projectile.width, (float) projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture9 = Main.projectileTexture[projectile.type]; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + Vector2 vector2_47 = Main.player[projectile.owner].RotatedRelativePoint(mountedCenter) + Vector2.UnitY * Main.player[projectile.owner].gfxOffY; + Vector2 v = position + Main.screenPosition - vector2_47; + Vector2 vector2_48 = Vector2.Normalize(v); + float num346 = v.Length(); + float rotation = v.ToRotation() + 1.570796f; + float num347 = -5f; + float num348 = num347 + 30f; + Vector2 vector2_49 = new Vector2(2f, num346 - num348); + Vector2 vector2_50 = Vector2.Lerp(position + Main.screenPosition, vector2_47 + vector2_48 * num348, 0.5f); + Vector2 spinningpoint = -Vector2.UnitY.RotatedBy((double) projectile.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) num346 > (double) num348) + { + for (int index = 0; index < 2; ++index) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color color53; + if (index % 2 == 0) + { + Microsoft.Xna.Framework.Color limeGreen = Microsoft.Xna.Framework.Color.LimeGreen; + limeGreen.A = (byte) 128; + color53 = limeGreen * 0.5f; + } + else + { + Microsoft.Xna.Framework.Color cornflowerBlue = Microsoft.Xna.Framework.Color.CornflowerBlue; + cornflowerBlue.A = (byte) 128; + color53 = cornflowerBlue * 0.5f; + } + Vector2 vector2_51 = new Vector2(vector2Array[index].X, 0.0f).RotatedBy((double) rotation) * 4f; + Main.spriteBatch.Draw(Main.magicPixel, vector2_50 - Main.screenPosition + vector2_51, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color53, rotation, Vector2.One / 2f, new Vector2(2f, num346 - num348), effects1, 0.0f); + } + } + Texture2D texture10 = Main.itemTexture[Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type]; + Microsoft.Xna.Framework.Color color54 = Lighting.GetColor((int) vector2_47.X / 16, (int) vector2_47.Y / 16); + Main.spriteBatch.Draw(texture10, vector2_47 - Main.screenPosition + vector2_48 * num347, new Microsoft.Xna.Framework.Rectangle?(), color54, (float) ((double) projectile.rotation + 1.57079637050629 + (effects1 == SpriteEffects.None ? 3.14159274101257 : 0.0)), new Vector2(effects1 == SpriteEffects.None ? 0.0f : (float) texture10.Width, (float) texture10.Height / 2f) + Vector2.UnitY * 1f, Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].scale, effects1, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[39], vector2_47 - Main.screenPosition + vector2_48 * num347, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), (float) ((double) projectile.rotation + 1.57079637050629 + (effects1 == SpriteEffects.None ? 3.14159274101257 : 0.0)), new Vector2(effects1 == SpriteEffects.None ? 0.0f : (float) texture10.Width, (float) texture10.Height / 2f) + Vector2.UnitY * 1f, Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].scale, effects1, 0.0f); + if ((double) num346 > (double) num348) + { + for (int index = 2; index < 4; ++index) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color color55; + if (index % 2 == 0) + { + Microsoft.Xna.Framework.Color limeGreen = Microsoft.Xna.Framework.Color.LimeGreen; + limeGreen.A = (byte) 128; + color55 = limeGreen * 0.5f; + } + else + { + Microsoft.Xna.Framework.Color cornflowerBlue = Microsoft.Xna.Framework.Color.CornflowerBlue; + cornflowerBlue.A = (byte) 128; + color55 = cornflowerBlue * 0.5f; + } + Vector2 vector2_52 = new Vector2(vector2Array[index].X, 0.0f).RotatedBy((double) rotation) * 4f; + Main.spriteBatch.Draw(Main.magicPixel, vector2_50 - Main.screenPosition + vector2_52, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color55, rotation, Vector2.One / 2f, new Vector2(2f, num346 - num348), effects1, 0.0f); + } + } + float num349 = projectile.localAI[0] / 60f; + if ((double) num349 > 0.5) + num349 = 1f - num349; + Main.spriteBatch.Draw(texture9, position, new Microsoft.Xna.Framework.Rectangle?(), alpha * num349 * 2f, projectile.rotation, new Vector2((float) texture9.Width, (float) texture9.Height) / 2f, projectile.scale, effects1, 0.0f); + Main.spriteBatch.Draw(Main.glowMaskTexture[40], position, new Microsoft.Xna.Framework.Rectangle?(), alpha * (0.5f - num349) * 2f, projectile.rotation, new Vector2((float) texture9.Width, (float) texture9.Height) / 2f, projectile.scale, effects1, 0.0f); + } + else if (projectile.type >= 393 && projectile.type <= 395 || projectile.type == 398 || projectile.type == 423 || projectile.type == 450) + { + Texture2D texture11 = Main.projectileTexture[projectile.type]; + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y28 = height * projectile.frame; + Main.spriteBatch.Draw(texture11, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y28, texture11.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture11.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + if (projectile.type == 398) + { + Texture2D miniMinotaurTexture = Main.miniMinotaurTexture; + Main.spriteBatch.Draw(miniMinotaurTexture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y28, miniMinotaurTexture.Width, height)), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile.alpha), projectile.rotation, new Vector2((float) miniMinotaurTexture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + if (projectile.type == 423) + { + Texture2D texture12 = Main.glowMaskTexture[0]; + Main.spriteBatch.Draw(texture12, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y28, texture12.Width, height)), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile.alpha), projectile.rotation, new Vector2((float) texture12.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 385) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = texture.Height / Main.projFrames[projectile.type]; + int y29 = height * projectile.frame; + int num350 = 8; + int num351 = 2; + float num352 = 0.4f; + for (int index = 1; index < num350; index += num351) + { + ref Vector2 local = ref projectile.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color3; + Microsoft.Xna.Framework.Color color56 = projectile.GetAlpha(newColor) * ((float) (num350 - index) / 15f); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + Vector2 vector2 = projectile.oldPos[index] - Main.screenPosition + new Vector2(x18 + (float) num213, (float) (projectile.height / 2) + projectile.gfxOffY); + Main.spriteBatch.Draw(texture, projectile.oldPos[index] + new Vector2((float) projectile.width, (float) projectile.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y29, texture.Width, height)), Microsoft.Xna.Framework.Color.Lerp(alpha, color56, 0.3f), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile.scale, num352, (float) index / 15f), effects1, 0.0f); + } + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0.0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y29, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 388) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = texture.Height / Main.projFrames[projectile.type]; + int y30 = height * projectile.frame; + int num353; + int num354; + if ((double) projectile.ai[0] == 2.0) + { + num353 = 10; + num354 = 1; + } + else + { + num354 = 2; + num353 = 5; + } + for (int index = 1; index < num353; index += num354) + { + ref Vector2 local = ref Main.npc[i].oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color3; + Microsoft.Xna.Framework.Color color57 = projectile.GetAlpha(newColor) * ((float) (num353 - index) / 15f); + Vector2 position = projectile.oldPos[index] - Main.screenPosition + new Vector2(x18 + (float) num213, (float) (projectile.height / 2) + projectile.gfxOffY); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y30, texture.Width, height)), color57, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + Main.spriteBatch.Draw(texture, projectile.position - Main.screenPosition + new Vector2(x18 + (float) num213, (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y30, texture.Width, height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + else if (Main.projFrames[projectile.type] > 1) + { + int height = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y31 = height * projectile.frame; + if (projectile.type == 111) + { + Microsoft.Xna.Framework.Color oldColor = new Microsoft.Xna.Framework.Color((int) Main.player[projectile.owner].shirtColor.R, (int) Main.player[projectile.owner].shirtColor.G, (int) Main.player[projectile.owner].shirtColor.B); + Microsoft.Xna.Framework.Color color58 = Lighting.GetColor((int) ((double) projectile.position.X + (double) projectile.width * 0.5) / 16, (int) (((double) projectile.position.Y + (double) projectile.height * 0.5) / 16.0), oldColor); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y31, Main.projectileTexture[projectile.type].Width, height)), projectile.GetAlpha(color58), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y31, Main.projectileTexture[projectile.type].Width, height - 1)), projectile.GetAlpha(color3), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + if (projectile.type == 387) + Main.spriteBatch.Draw(Main.eyeLaserSmallTexture, new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y31, Main.projectileTexture[projectile.type].Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 383 || projectile.type == 399) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) texture.Width, (float) texture.Height) / 2f, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 157 || projectile.type == 378) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + (float) (projectile.width / 2), projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) (Main.projectileTexture[projectile.type].Width / 2), (float) (Main.projectileTexture[projectile.type].Height / 2)), projectile.scale, effects1, 0.0f); + else if (projectile.type == 306) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + (float) (projectile.width / 2), projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) (Main.projectileTexture[projectile.type].Width / 2), (float) (Main.projectileTexture[projectile.type].Height / 2)), projectile.scale, effects1, 0.0f); + else if (projectile.type == 256) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + (float) (projectile.width / 2), projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) (Main.projectileTexture[projectile.type].Width / 2), (float) (Main.projectileTexture[projectile.type].Height / 2)), projectile.scale, effects1, 0.0f); + else if (projectile.aiStyle == 27) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + (float) (projectile.width / 2), projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) Main.projectileTexture[projectile.type].Width, 0.0f), projectile.scale, effects1, 0.0f); + else if (projectile.aiStyle == 19) + { + Vector2 zero = Vector2.Zero; + if (projectile.spriteDirection == -1) + zero.X = (float) Main.projectileTexture[projectile.type].Width; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + (float) (projectile.width / 2), projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, zero, projectile.scale, effects1, 0.0f); + } + else if (projectile.type == 451) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), projectile.GetAlpha(color3), projectile.rotation, new Vector2((float) Main.projectileTexture[projectile.type].Width, 0.0f), projectile.scale, effects1, 0.0f); + else if (projectile.type == 434) + { + Vector2 vector2_53 = new Vector2(projectile.ai[0], projectile.ai[1]); + Vector2 v = projectile.position - vector2_53; + float y32 = (float) Math.Sqrt((double) v.X * (double) v.X + (double) v.Y * (double) v.Y); + Vector2 vector2_54 = new Vector2(4f, y32); + float rotation = v.ToRotation() + 1.570796f; + Vector2 vector2_55 = Vector2.Lerp(projectile.position, vector2_53, 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; + red *= projectile.localAI[0]; + Microsoft.Xna.Framework.Color color59 = white * projectile.localAI[0]; + float num355 = (float) Math.Sqrt((double) (projectile.damage / 50)); + Main.spriteBatch.Draw(Main.magicPixel, vector2_55 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), red, rotation, Vector2.One / 2f, new Vector2(2f * num355, y32 + 8f), effects1, 0.0f); + Main.spriteBatch.Draw(Main.magicPixel, vector2_55 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), red, rotation, Vector2.One / 2f, new Vector2(4f * num355, y32), effects1, 0.0f); + Main.spriteBatch.Draw(Main.magicPixel, vector2_55 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color59, rotation, Vector2.One / 2f, new Vector2(2f * num355, y32), effects1, 0.0f); + } + else + { + if (projectile.type == 94 && (double) projectile.ai[1] > 6.0) + { + for (int index = 0; index < 10; ++index) + { + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num356 = (float) (9 - index) / 9f; + alpha.R = (byte) ((double) alpha.R * (double) num356); + alpha.G = (byte) ((double) alpha.G * (double) num356); + alpha.B = (byte) ((double) alpha.B * (double) num356); + alpha.A = (byte) ((double) alpha.A * (double) num356); + float num357 = (float) (9 - index) / 9f; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.oldPos[index].X - Main.screenPosition.X + x18 + (float) num213, projectile.oldPos[index].Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), num357 * projectile.scale, effects1, 0.0f); + } + } + if (projectile.type == 301) + { + for (int index = 0; index < 10; ++index) + { + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num358 = (float) (9 - index) / 9f; + alpha.R = (byte) ((double) alpha.R * (double) num358); + alpha.G = (byte) ((double) alpha.G * (double) num358); + alpha.B = (byte) ((double) alpha.B * (double) num358); + alpha.A = (byte) ((double) alpha.A * (double) num358); + float num359 = (float) (9 - index) / 9f; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.oldPos[index].X - Main.screenPosition.X + x18 + (float) num213, projectile.oldPos[index].Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), num359 * projectile.scale, effects1, 0.0f); + } + } + if (projectile.type == 323 && projectile.alpha == 0) + { + for (int index = 1; index < 8; ++index) + { + float num360 = projectile.velocity.X * (float) index; + float num361 = projectile.velocity.Y * (float) index; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num362 = 0.0f; + if (index == 1) + num362 = 0.7f; + if (index == 2) + num362 = 0.6f; + if (index == 3) + num362 = 0.5f; + if (index == 4) + num362 = 0.4f; + if (index == 5) + num362 = 0.3f; + if (index == 6) + num362 = 0.2f; + if (index == 7) + num362 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num362); + alpha.G = (byte) ((double) alpha.G * (double) num362); + alpha.B = (byte) ((double) alpha.B * (double) num362); + alpha.A = (byte) ((double) alpha.A * (double) num362); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num360, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num361), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), num362 + 0.2f, effects1, 0.0f); + } + } + if (projectile.type == 117 && (double) projectile.ai[0] > 3.0) + { + for (int index = 1; index < 5; ++index) + { + float num363 = projectile.velocity.X * (float) index; + float num364 = projectile.velocity.Y * (float) index; + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num365 = 0.0f; + if (index == 1) + num365 = 0.4f; + if (index == 2) + num365 = 0.3f; + if (index == 3) + num365 = 0.2f; + if (index == 4) + num365 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num365); + alpha.G = (byte) ((double) alpha.G * (double) num365); + alpha.B = (byte) ((double) alpha.B * (double) num365); + alpha.A = (byte) ((double) alpha.A * (double) num365); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num363, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num364), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + if (projectile.bobber) + { + if ((double) projectile.ai[1] > 0.0 && (double) projectile.ai[1] < 3930.0 && (double) projectile.ai[0] == 1.0) + { + int index = (int) projectile.ai[1]; + Vector2 center = projectile.Center; + float num366 = projectile.rotation; + Vector2 vector2 = center; + float num367 = x1 - vector2.X; + float num368 = y1 - vector2.Y; + num366 = (float) Math.Atan2((double) num368, (double) num367); + float rotation; + if ((double) projectile.velocity.X > 0.0) + { + effects1 = SpriteEffects.None; + rotation = (float) Math.Atan2((double) num368, (double) num367) + 0.785f; + if ((double) projectile.ai[1] == 2342.0) + rotation -= 0.785f; + } + else + { + effects1 = SpriteEffects.FlipHorizontally; + rotation = (float) Math.Atan2(-(double) num368, -(double) num367) - 0.785f; + if ((double) projectile.ai[1] == 2342.0) + rotation += 0.785f; + } + Main.spriteBatch.Draw(Main.itemTexture[index], new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[index].Width, Main.itemTexture[index].Height)), color3, rotation, new Vector2((float) (Main.itemTexture[index].Width / 2), (float) (Main.itemTexture[index].Height / 2)), projectile.scale, effects1, 0.0f); + } + else if ((double) projectile.ai[0] <= 1.0) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(color3), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + if (projectile.glowMask != (short) -1) + Main.spriteBatch.Draw(Main.glowMaskTexture[(int) projectile.glowMask], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile.alpha), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + if (projectile.type == 473) + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, 0), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + if (projectile.type == 106) + Main.spriteBatch.Draw(Main.lightDiscTexture, new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + if (projectile.type == 554 || projectile.type == 603) + { + for (int index = 1; index < 5; ++index) + { + float num369 = (float) ((double) projectile.velocity.X * (double) index * 0.5); + float num370 = (float) ((double) projectile.velocity.Y * (double) index * 0.5); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num371 = 0.0f; + if (index == 1) + num371 = 0.4f; + if (index == 2) + num371 = 0.3f; + if (index == 3) + num371 = 0.2f; + if (index == 4) + num371 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num371); + alpha.G = (byte) ((double) alpha.G * (double) num371); + alpha.B = (byte) ((double) alpha.B * (double) num371); + alpha.A = (byte) ((double) alpha.A * (double) num371); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num369, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num370), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + else if (projectile.type == 604) + { + int num372 = (int) projectile.ai[1] + 1; + if (num372 > 7) + num372 = 7; + for (int index = 1; index < num372; ++index) + { + float num373 = (float) ((double) projectile.velocity.X * (double) index * 1.5); + float num374 = (float) ((double) projectile.velocity.Y * (double) index * 1.5); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num375 = 0.0f; + if (index == 1) + num375 = 0.4f; + if (index == 2) + num375 = 0.3f; + if (index == 3) + num375 = 0.2f; + if (index == 4) + num375 = 0.1f; + float num376 = (float) (0.400000005960464 - (double) index * 0.0599999986588955) * (float) (1.0 - (double) projectile.alpha / (double) byte.MaxValue); + alpha.R = (byte) ((double) alpha.R * (double) num376); + alpha.G = (byte) ((double) alpha.G * (double) num376); + alpha.B = (byte) ((double) alpha.B * (double) num376); + alpha.A = (byte) ((double) alpha.A * (double) num376 / 2.0); + float scale = projectile.scale - (float) index * 0.1f; + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num373, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num374), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), scale, effects1, 0.0f); + } + } + else if (projectile.type == 553) + { + for (int index = 1; index < 5; ++index) + { + float num377 = (float) ((double) projectile.velocity.X * (double) index * 0.400000005960464); + float num378 = (float) ((double) projectile.velocity.Y * (double) index * 0.400000005960464); + Microsoft.Xna.Framework.Color alpha = projectile.GetAlpha(color3); + float num379 = 0.0f; + if (index == 1) + num379 = 0.4f; + if (index == 2) + num379 = 0.3f; + if (index == 3) + num379 = 0.2f; + if (index == 4) + num379 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num379); + alpha.G = (byte) ((double) alpha.G * (double) num379); + alpha.B = (byte) ((double) alpha.B * (double) num379); + alpha.A = (byte) ((double) alpha.A * (double) num379); + Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], new Vector2(projectile.position.X - Main.screenPosition.X + x18 + (float) num213 - num377, projectile.position.Y - Main.screenPosition.Y + (float) (projectile.height / 2) + projectile.gfxOffY - num378), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), alpha, projectile.rotation, new Vector2(x18, (float) (projectile.height / 2 + num212)), projectile.scale, effects1, 0.0f); + } + } + } + } + if (projectile.type != 525 || Main.gamePaused && !Main.gameMenu) + return; + Vector2 vector2_56 = projectile.position - Main.screenPosition; + if ((double) Main.mouseX <= (double) vector2_56.X || (double) Main.mouseX >= (double) vector2_56.X + (double) projectile.width || (double) Main.mouseY <= (double) vector2_56.Y || (double) Main.mouseY >= (double) vector2_56.Y + (double) projectile.height) + return; + int num380 = (int) ((double) Main.player[Main.myPlayer].Center.X / 16.0); + int num381 = (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0); + int num382 = (int) projectile.Center.X / 16; + int num383 = (int) projectile.Center.Y / 16; + int lastTileRangeX = Main.player[Main.myPlayer].lastTileRangeX; + int lastTileRangeY = Main.player[Main.myPlayer].lastTileRangeY; + if (num380 < num382 - lastTileRangeX || num380 > num382 + lastTileRangeX + 1 || num381 < num383 - lastTileRangeY || num381 > num383 + lastTileRangeY + 1) + return; + Main.player[Main.myPlayer].noThrow = 2; + Main.player[Main.myPlayer].showItemIcon = true; + Main.player[Main.myPlayer].showItemIcon2 = 3213; + if (PlayerInput.UsingGamepad) + Main.player[Main.myPlayer].GamepadEnableGrappleCooldown(); + if (!Main.mouseRight || !Main.mouseRightRelease || Player.StopMoneyTroughFromWorking != 0) + return; + Main.mouseRightRelease = false; + if (Main.player[Main.myPlayer].chest == -2) + { + Main.PlaySound(SoundID.Item59); + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + } + else + { + Main.player[Main.myPlayer].flyingPigChest = i; + Main.player[Main.myPlayer].chest = -2; + Main.player[Main.myPlayer].chestX = (int) ((double) projectile.Center.X / 16.0); + Main.player[Main.myPlayer].chestY = (int) ((double) projectile.Center.Y / 16.0); + Main.player[Main.myPlayer].talkNPC = -1; + Main.npcShop = 0; + Main.playerInventory = true; + Main.PlaySound(SoundID.Item59); + Recipe.FindRecipes(); + } + } + + private 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(); + for (int index1 = 0; index1 < 1000; ++index1) + { + if (Main.projectile[index1].active) + { + if (Main.projectile[index1].type == 578 || Main.projectile[index1].type == 579 || Main.projectile[index1].type == 641 || Main.projectile[index1].type == 617) + 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) + this.DrawCacheProjsBehindProjectiles.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) + 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) + { + 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, this.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 SortDrawCacheWorms() + { + List behindProjectiles = this.DrawCacheProjsBehindProjectiles; + if (behindProjectiles.Count == 0) + return; + List> intListList = new List>(); + for (int index1 = 0; index1 < behindProjectiles.Count; ++index1) + { + int index2 = behindProjectiles[index1]; + if (Main.projectile[index2].type == 628) + { + behindProjectiles.Remove(index2); + List intList = new List(); + intList.Insert(0, index2); + for (int byUuid = Projectile.GetByUUID(Main.projectile[index2].owner, Main.projectile[index2].ai[0]); byUuid >= 0 && !intList.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])) + { + intList.Insert(0, byUuid); + behindProjectiles.Remove(byUuid); + } + intListList.Add(intList); + index1 = -1; + } + } + List intList1 = new List((IEnumerable) this.DrawCacheProjsBehindProjectiles); + intListList.Add(intList1); + this.DrawCacheProjsBehindProjectiles.Clear(); + for (int index3 = 0; index3 < intListList.Count; ++index3) + { + for (int index4 = 0; index4 < intListList[index3].Count; ++index4) + this.DrawCacheProjsBehindProjectiles.Add(intListList[index3][index4]); + } + for (int index = 0; index < this.DrawCacheProjsBehindProjectiles.Count; ++index) + { + Projectile projectile1 = Main.projectile[this.DrawCacheProjsBehindProjectiles[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.wof < 0 || !Main.player[Main.myPlayer].gross) + return; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].tongued && !Main.player[index].dead) + { + float num1 = Main.npc[Main.wof].position.X + (float) (Main.npc[Main.wof].width / 2); + float num2 = Main.npc[Main.wof].position.Y + (float) (Main.npc[Main.wof].height / 2); + Vector2 vector2 = new Vector2(Main.player[index].position.X + (float) Main.player[index].width * 0.5f, Main.player[index].position.Y + (float) Main.player[index].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) Main.chain12Texture.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(Main.chain12Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain12Texture.Width, Main.chain12Texture.Height)), color, rotation, new Vector2((float) Main.chain12Texture.Width * 0.5f, (float) Main.chain12Texture.Height * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].aiStyle == 29) + { + float num9 = Main.npc[Main.wof].position.X + (float) (Main.npc[Main.wof].width / 2); + float y = Main.npc[Main.wof].position.Y; + float num10 = (float) (Main.wofB - Main.wofT); + bool flag1 = false; + if (Main.npc[index].frameCounter > 7.0) + flag1 = true; + float num11 = (float) Main.wofT + num10 * Main.npc[index].ai[0]; + Vector2 vector2 = new Vector2(Main.npc[index].position.X + (float) (Main.npc[index].width / 2), Main.npc[index].position.Y + (float) (Main.npc[index].height / 2)); + float num12 = num9 - vector2.X; + float num13 = num11 - vector2.Y; + float rotation = (float) Math.Atan2((double) num13, (double) num12) - 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 num14 = (float) Math.Sqrt((double) num12 * (double) num12 + (double) num13 * (double) num13); + if ((double) num14 < 40.0) + { + height = (int) num14 - 40 + 28; + flag2 = false; + } + float num15 = 28f / num14; + float num16 = num12 * num15; + float num17 = num13 * num15; + vector2.X += num16; + vector2.Y += num17; + num12 = num9 - vector2.X; + num13 = num11 - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(Main.chain12Texture, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chain4Texture.Width, height)), color, rotation, new Vector2((float) Main.chain4Texture.Width * 0.5f, (float) Main.chain4Texture.Height * 0.5f), 1f, effects, 0.0f); + } + } + } + int num18 = 140; + float wofT = (float) Main.wofT; + float wofB = (float) Main.wofB; + float num19 = Main.screenPosition.Y + (float) Main.screenHeight; + float num20 = (float) ((int) (((double) wofT - (double) Main.screenPosition.Y) / (double) num18) + 1) * (float) num18; + if ((double) num20 > 0.0) + wofT -= num20; + float num21 = wofT; + float x1 = Main.npc[Main.wof].position.X; + float num22 = num19 - wofT; + bool flag3 = true; + SpriteEffects effects1 = SpriteEffects.None; + if (Main.npc[Main.wof].spriteDirection == 1) + effects1 = SpriteEffects.FlipHorizontally; + if (Main.npc[Main.wof].direction > 0) + x1 -= 80f; + int num23 = 0; + if (!Main.gamePaused) + ++Main.wofF; + if (Main.wofF > 12) + { + num23 = 280; + if (Main.wofF > 17) + Main.wofF = 0; + } + else if (Main.wofF > 6) + num23 = 140; + while (flag3) + { + float num24 = num19 - num21; + if ((double) num24 > (double) num18) + num24 = (float) num18; + bool flag4 = true; + int num25 = 0; + while (flag4) + { + int x2 = (int) ((double) x1 + (double) (Main.wofTexture.Width / 2)) / 16; + int y = (int) ((double) num21 + (double) num25) / 16; + Main.spriteBatch.Draw(Main.wofTexture, new Vector2(x1 - Main.screenPosition.X, num21 + (float) num25 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num23 + num25, Main.wofTexture.Width, 16)), Lighting.GetColor(x2, y), 0.0f, new Vector2(), 1f, effects1, 0.0f); + num25 += 16; + if ((double) num25 >= (double) num24) + flag4 = false; + } + num21 += (float) num18; + if ((double) num21 >= (double) num19) + flag3 = false; + } + } + + protected void DrawGhost(Player drawPlayer, Vector2 Position, float shadow = 0.0f) + { + SpriteEffects effects = drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Microsoft.Xna.Framework.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 Microsoft.Xna.Framework.Color((int) Main.mouseTextColor / 2 + 100, (int) Main.mouseTextColor / 2 + 100, (int) Main.mouseTextColor / 2 + 100, (int) Main.mouseTextColor / 2 + 100)), shadow); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, Main.ghostTexture.Height / 4 * drawPlayer.ghostFrame, Main.ghostTexture.Width, Main.ghostTexture.Height / 4); + Vector2 origin = new Vector2((float) rectangle.Width * 0.5f, (float) rectangle.Height * 0.5f); + Main.spriteBatch.Draw(Main.ghostTexture, new Vector2((float) (int) ((double) drawPlayer.position.X - (double) Main.screenPosition.X + (double) (rectangle.Width / 2)), (float) (int) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) (rectangle.Height / 2))), new Microsoft.Xna.Framework.Rectangle?(rectangle), immuneAlpha, 0.0f, origin, 1f, effects, 0.0f); + } + + protected Vector2 DrawPlayerItemPos(float gravdir, int itemtype) + { + float num = 10f; + Vector2 vector2 = new Vector2((float) (Main.itemTexture[itemtype].Width / 2), (float) (Main.itemTexture[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 += 4f * gravdir; + } + else if (itemtype == 3107) + { + num = 4f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 3008) + { + num = -12f; + 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 == 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 == 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; + 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; + } + break; + } + break; + } + } + vector2.X = num; + return vector2; + } + + protected 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; + } + + protected void DrawPlayerHead(Player drawPlayer, float X, float Y, float Alpha = 1f, float Scale = 1f) + { + int shaderId1 = 0; + int skinVariant = drawPlayer.skinVariant; + short shaderId2 = (short) drawPlayer.hairDye; + if (drawPlayer.head == 0 && shaderId2 == (short) 0) + shaderId2 = (short) 1; + for (int index1 = 0; index1 < 16 + drawPlayer.extraAccessorySlots * 2; ++index1) + { + int index2 = index1 % 10; + if (drawPlayer.dye[index2] != null && drawPlayer.armor[index1].type > 0 && drawPlayer.armor[index1].stack > 0 && drawPlayer.armor[index1].faceSlot > (sbyte) 0 && drawPlayer.armor[index1].faceSlot < (sbyte) 9) + { + int dye = (int) drawPlayer.dye[index2].dye; + } + } + if (drawPlayer.face > (sbyte) 0 && drawPlayer.face < (sbyte) 9) + this.LoadAccFace((int) drawPlayer.face); + if (drawPlayer.dye[0] != null) + shaderId1 = (int) drawPlayer.dye[0].dye; + this.LoadHair(drawPlayer.hair); + float scale = Scale; + Microsoft.Xna.Framework.Color color1 = this.quickAlpha(Microsoft.Xna.Framework.Color.White, Alpha); + Microsoft.Xna.Framework.Color color2 = this.quickAlpha(drawPlayer.eyeColor, Alpha); + Microsoft.Xna.Framework.Color color3 = this.quickAlpha(drawPlayer.GetHairColor(false), Alpha); + Microsoft.Xna.Framework.Color color4 = this.quickAlpha(drawPlayer.skinColor, Alpha); + Microsoft.Xna.Framework.Color color5 = this.quickAlpha(Microsoft.Xna.Framework.Color.White, Alpha); + SpriteEffects spriteEffects = SpriteEffects.None; + if (drawPlayer.direction < 0) + spriteEffects = SpriteEffects.FlipHorizontally; + Vector2 origin = new Vector2((float) drawPlayer.legFrame.Width * 0.5f, (float) drawPlayer.legFrame.Height * 0.4f); + Vector2 position = drawPlayer.position; + Microsoft.Xna.Framework.Rectangle bodyFrame1 = drawPlayer.bodyFrame; + drawPlayer.bodyFrame.Y = 0; + drawPlayer.position = Main.screenPosition; + drawPlayer.position.X += X; + drawPlayer.position.Y += Y; + drawPlayer.position.X -= 6f; + drawPlayer.position.Y -= 4f; + float playerHeadOffset = (float) drawPlayer.mount.PlayerHeadOffset; + drawPlayer.position.Y -= playerHeadOffset; + if (drawPlayer.head > 0 && drawPlayer.head < 216) + this.LoadArmorHead(drawPlayer.head); + if (drawPlayer.face > (sbyte) 0 && drawPlayer.face < (sbyte) 9) + this.LoadAccFace((int) drawPlayer.face); + bool flag1 = false; + if (drawPlayer.head == 10 || drawPlayer.head == 12 || drawPlayer.head == 28 || drawPlayer.head == 62 || drawPlayer.head == 97 || drawPlayer.head == 106 || drawPlayer.head == 113 || drawPlayer.head == 116 || drawPlayer.head == 119 || drawPlayer.head == 133 || drawPlayer.head == 138 || drawPlayer.head == 139 || drawPlayer.head == 163 || drawPlayer.head == 178 || drawPlayer.head == 181 || drawPlayer.head == 191 || drawPlayer.head == 198) + flag1 = true; + bool flag2 = false; + if (drawPlayer.head == 161 || drawPlayer.head == 14 || drawPlayer.head == 15 || drawPlayer.head == 16 || drawPlayer.head == 18 || drawPlayer.head == 21 || drawPlayer.head == 24 || drawPlayer.head == 25 || drawPlayer.head == 26 || drawPlayer.head == 40 || drawPlayer.head == 44 || drawPlayer.head == 51 || drawPlayer.head == 56 || drawPlayer.head == 59 || drawPlayer.head == 60 || drawPlayer.head == 67 || drawPlayer.head == 68 || drawPlayer.head == 69 || drawPlayer.head == 114 || drawPlayer.head == 121 || drawPlayer.head == 126 || drawPlayer.head == 130 || drawPlayer.head == 136 || drawPlayer.head == 140 || drawPlayer.head == 145 || drawPlayer.head == 158 || drawPlayer.head == 159 || drawPlayer.head == 184 || drawPlayer.head == 190 || (double) drawPlayer.head == 92.0 || drawPlayer.head == 195) + flag2 = true; + if (drawPlayer.head != 38 && drawPlayer.head != 135) + { + Main.spriteBatch.Draw(Main.playerTextures[skinVariant, 0], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color4, drawPlayer.headRotation, origin, scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.playerTextures[skinVariant, 1], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color1, drawPlayer.headRotation, origin, scale, spriteEffects, 0.0f); + Main.spriteBatch.Draw(Main.playerTextures[skinVariant, 2], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color2, drawPlayer.headRotation, origin, scale, spriteEffects, 0.0f); + } + if (flag1) + { + DrawData drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Armor.Apply(shaderId1, (Entity) drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + if (!drawPlayer.invis) + { + Microsoft.Xna.Framework.Rectangle bodyFrame2 = drawPlayer.bodyFrame; + bodyFrame2.Y -= 336; + if (bodyFrame2.Y < 0) + bodyFrame2.Y = 0; + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(bodyFrame2), color3, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Hair.Apply(shaderId2, drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + } + if (flag2) + { + Microsoft.Xna.Framework.Rectangle bodyFrame3 = drawPlayer.bodyFrame; + bodyFrame3.Y -= 336; + if (bodyFrame3.Y < 0) + bodyFrame3.Y = 0; + if (!drawPlayer.invis) + { + DrawData drawData = new DrawData(Main.playerHairAltTexture[drawPlayer.hair], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(bodyFrame3), color3, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Hair.Apply(shaderId2, drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + } + if (drawPlayer.head == 23) + { + Microsoft.Xna.Framework.Rectangle bodyFrame4 = drawPlayer.bodyFrame; + bodyFrame4.Y -= 336; + if (bodyFrame4.Y < 0) + bodyFrame4.Y = 0; + DrawData drawData; + if (!drawPlayer.invis) + { + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(bodyFrame4), color3, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Hair.Apply(shaderId2, drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Armor.Apply(shaderId1, (Entity) drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + else if (drawPlayer.head == 14 || drawPlayer.head == 56 || drawPlayer.head == 158) + { + Microsoft.Xna.Framework.Rectangle bodyFrame5 = drawPlayer.bodyFrame; + if (drawPlayer.head == 158) + bodyFrame5.Height -= 2; + int num = 0; + if (bodyFrame5.Y == bodyFrame5.Height * 6) + bodyFrame5.Height -= 2; + else if (bodyFrame5.Y == bodyFrame5.Height * 7) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 8) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 9) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 10) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 13) + bodyFrame5.Height -= 2; + else if (bodyFrame5.Y == bodyFrame5.Height * 14) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 15) + num = -2; + else if (bodyFrame5.Y == bodyFrame5.Height * 16) + num = -2; + bodyFrame5.Y += num; + DrawData drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0) + (float) num) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(bodyFrame5), color5, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Armor.Apply(shaderId1, (Entity) drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + else if (drawPlayer.head > 0 && drawPlayer.head < 216 && drawPlayer.head != 28) + { + DrawData drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Armor.Apply(shaderId1, (Entity) drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + else + { + Microsoft.Xna.Framework.Rectangle bodyFrame6 = drawPlayer.bodyFrame; + bodyFrame6.Y -= 336; + if (bodyFrame6.Y < 0) + bodyFrame6.Y = 0; + DrawData drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2(drawPlayer.position.X - Main.screenPosition.X - (float) (drawPlayer.bodyFrame.Width / 2) + (float) (drawPlayer.width / 2), (float) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(bodyFrame6), color3, drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Hair.Apply(shaderId2, drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + if (drawPlayer.face > (sbyte) 0 && drawPlayer.face < (sbyte) 9) + { + DrawData drawData = drawPlayer.face != (sbyte) 7 ? new DrawData(Main.accFaceTexture[(int) drawPlayer.face], new Vector2((float) (int) ((double) drawPlayer.position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.headRotation, origin, scale, spriteEffects, 0) : new DrawData(Main.accFaceTexture[(int) drawPlayer.face], new Vector2((float) (int) ((double) drawPlayer.position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), new Microsoft.Xna.Framework.Color(200, 200, 200, 150), drawPlayer.headRotation, origin, scale, spriteEffects, 0); + GameShaders.Armor.Apply(shaderId1, (Entity) drawPlayer, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + drawPlayer.position = position; + drawPlayer.bodyFrame.Y = bodyFrame1.Y; + } + + protected void DrawPlayerStoned(Player drawPlayer, Vector2 Position) + { + if (drawPlayer.dead) + return; + SpriteEffects effects = drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Main.spriteBatch.Draw(Main.extraTexture[37], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.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 Microsoft.Xna.Framework.Rectangle?(), Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) Position.Y + (double) drawPlayer.height * 0.5) / 16, Microsoft.Xna.Framework.Color.White), 0.0f, new Vector2((float) (Main.extraTexture[37].Width / 2), (float) (Main.extraTexture[37].Height / 2)), 1f, effects, 0.0f); + } + + public void DrawPlayer( + Player drawPlayer, + Vector2 Position, + float rotation, + Vector2 rotationOrigin, + float shadow = 0.0f) + { + int num1 = drawPlayer.controlDown ? 1 : 0; + float num2 = 0.0f; + DrawData drawData = new DrawData(); + int projectileDrawPosition = -1; + Main.playerDrawData.Clear(); + Main.playerDrawDust.Clear(); + Main.playerDrawGore.Clear(); + Vector2 vector2_1 = Position + (drawPlayer.itemLocation - drawPlayer.position); + int num3 = 0; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + int skinVariant = drawPlayer.skinVariant; + if (drawPlayer.body == 77 || drawPlayer.body == 103 || drawPlayer.body == 41 || drawPlayer.body == 100 || drawPlayer.body == 10 || drawPlayer.body == 11 || drawPlayer.body == 12 || drawPlayer.body == 13 || drawPlayer.body == 14 || drawPlayer.body == 43 || drawPlayer.body == 15 || drawPlayer.body == 16 || drawPlayer.body == 20 || drawPlayer.body == 39 || drawPlayer.body == 50 || drawPlayer.body == 38 || drawPlayer.body == 40 || drawPlayer.body == 57 || drawPlayer.body == 44 || drawPlayer.body == 52 || drawPlayer.body == 53 || drawPlayer.body == 68 || drawPlayer.body == 81 || drawPlayer.body == 85 || drawPlayer.body == 88 || drawPlayer.body == 98 || drawPlayer.body == 86 || drawPlayer.body == 87 || drawPlayer.body == 99 || drawPlayer.body == 165 || drawPlayer.body == 166 || drawPlayer.body == 167 || drawPlayer.body == 171 || drawPlayer.body == 45 || drawPlayer.body == 168 || drawPlayer.body == 169 || drawPlayer.body == 42 || drawPlayer.body == 180 || drawPlayer.body == 181 || drawPlayer.body == 183 || drawPlayer.body == 186 || drawPlayer.body == 187 || drawPlayer.body == 188 || drawPlayer.body == 64 || drawPlayer.body == 189 || drawPlayer.body == 191 || drawPlayer.body == 192 || drawPlayer.body == 198 || drawPlayer.body == 199 || drawPlayer.body == 202 || drawPlayer.body == 203 || drawPlayer.body == 58 || drawPlayer.body == 59 || drawPlayer.body == 60 || drawPlayer.body == 61 || drawPlayer.body == 62 || drawPlayer.body == 63 || drawPlayer.body == 36 || drawPlayer.body == 104 || drawPlayer.body == 184 || drawPlayer.body == 74 || drawPlayer.body == 78 || drawPlayer.body == 185 || drawPlayer.body == 196 || drawPlayer.body == 197 || drawPlayer.body == 182 || drawPlayer.body == 87 || drawPlayer.body == 76 || drawPlayer.body == 209) + flag1 = true; + if (drawPlayer.body == 99 || drawPlayer.body == 98 || drawPlayer.body == 100 || drawPlayer.body == 167 || drawPlayer.body == 171 || drawPlayer.body == 183 || drawPlayer.body == 191 || drawPlayer.body == 192 || drawPlayer.body == 198 || drawPlayer.body == 199 || drawPlayer.body == 202 || drawPlayer.body == 201 || drawPlayer.body == 203 || drawPlayer.body == 197 || drawPlayer.body == 182 || drawPlayer.body == 87) + flag2 = true; + if (drawPlayer.heldProj >= 0 && (double) shadow == 0.0) + { + switch (Main.projectile[drawPlayer.heldProj].type) + { + case 460: + case 535: + case 600: + flag3 = true; + break; + } + } + bool flag4 = false; + if (drawPlayer.head == 10 || drawPlayer.head == 12 || drawPlayer.head == 28 || drawPlayer.head == 62 || drawPlayer.head == 97 || drawPlayer.head == 106 || drawPlayer.head == 113 || drawPlayer.head == 116 || drawPlayer.head == 119 || drawPlayer.head == 133 || drawPlayer.head == 138 || drawPlayer.head == 139 || drawPlayer.head == 163 || drawPlayer.head == 178 || drawPlayer.head == 181 || drawPlayer.head == 191 || drawPlayer.head == 198) + flag4 = true; + bool flag5 = false; + if (drawPlayer.head == 161 || drawPlayer.head == 14 || drawPlayer.head == 15 || drawPlayer.head == 16 || drawPlayer.head == 18 || drawPlayer.head == 21 || drawPlayer.head == 24 || drawPlayer.head == 25 || drawPlayer.head == 26 || drawPlayer.head == 40 || drawPlayer.head == 44 || drawPlayer.head == 51 || drawPlayer.head == 56 || drawPlayer.head == 59 || drawPlayer.head == 60 || drawPlayer.head == 67 || drawPlayer.head == 68 || drawPlayer.head == 69 || drawPlayer.head == 114 || drawPlayer.head == 121 || drawPlayer.head == 126 || drawPlayer.head == 130 || drawPlayer.head == 136 || drawPlayer.head == 140 || drawPlayer.head == 145 || drawPlayer.head == 158 || drawPlayer.head == 159 || drawPlayer.head == 184 || drawPlayer.head == 190 || drawPlayer.head == 92 || drawPlayer.head == 195 || drawPlayer.head == 215) + flag5 = true; + bool flag6 = false; + if (drawPlayer.face == (sbyte) 4 || drawPlayer.face == (sbyte) 3 || drawPlayer.face == (sbyte) 2) + flag6 = true; + int num4 = (int) drawPlayer.hairDye; + if (drawPlayer.head == 0 && num4 == 0) + num4 = 1; + float playerOffset = (float) drawPlayer.mount.PlayerOffset; + Position.Y -= playerOffset; + int cHead = 0; + if (drawPlayer.dye[0] != null) + cHead = (int) drawPlayer.dye[0].dye; + int num5 = 0; + if (drawPlayer.dye[1] != null) + num5 = (int) drawPlayer.dye[1].dye; + int num6 = 0; + if (drawPlayer.dye[2] != null) + num6 = (int) drawPlayer.dye[2].dye; + if (drawPlayer.wearsRobe) + num6 = num5; + 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; + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = index1 % 10; + if (drawPlayer.dye[index2] != null && drawPlayer.armor[index1].type > 0 && drawPlayer.armor[index1].stack > 0 && (index1 / 10 >= 1 || !drawPlayer.hideVisual[index2] || drawPlayer.armor[index1].wingSlot > (sbyte) 0 || drawPlayer.armor[index1].type == 934)) + { + if (drawPlayer.armor[index1].handOnSlot > (sbyte) 0 && drawPlayer.armor[index1].handOnSlot < (sbyte) 20) + num7 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].handOffSlot > (sbyte) 0 && drawPlayer.armor[index1].handOffSlot < (sbyte) 12) + num8 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].backSlot > (sbyte) 0 && drawPlayer.armor[index1].backSlot < (sbyte) 14) + num9 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].frontSlot > (sbyte) 0 && drawPlayer.armor[index1].frontSlot < (sbyte) 5) + num10 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].shoeSlot > (sbyte) 0 && drawPlayer.armor[index1].shoeSlot < (sbyte) 18) + num11 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].waistSlot > (sbyte) 0 && drawPlayer.armor[index1].waistSlot < (sbyte) 13) + num12 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].shieldSlot > (sbyte) 0 && drawPlayer.armor[index1].shieldSlot < (sbyte) 7) + num13 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].neckSlot > (sbyte) 0 && drawPlayer.armor[index1].neckSlot < (sbyte) 10) + num14 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].faceSlot > (sbyte) 0 && drawPlayer.armor[index1].faceSlot < (sbyte) 9) + num15 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].balloonSlot > (sbyte) 0 && drawPlayer.armor[index1].balloonSlot < (sbyte) 18) + num16 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].wingSlot > (sbyte) 0 && drawPlayer.armor[index1].wingSlot < (sbyte) 40) + num17 = (int) drawPlayer.dye[index2].dye; + if (drawPlayer.armor[index1].type == 934) + num18 = (int) drawPlayer.dye[index2].dye; + } + } + Mount.currentShader = !drawPlayer.mount.Active ? 0 : (drawPlayer.mount.Cart ? drawPlayer.cMinecart : drawPlayer.cMount); + Microsoft.Xna.Framework.Color color1 = drawPlayer.GetImmuneAlpha(drawPlayer.GetHairColor(), shadow); + Microsoft.Xna.Framework.Color color2 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.25) / 16.0), Microsoft.Xna.Framework.Color.White), shadow); + Microsoft.Xna.Framework.Color color3 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.25) / 16.0), drawPlayer.eyeColor), shadow); + Microsoft.Xna.Framework.Color color4 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.25) / 16.0), drawPlayer.skinColor), shadow); + Microsoft.Xna.Framework.Color color5 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.5) / 16.0), drawPlayer.skinColor), shadow); + Microsoft.Xna.Framework.Color color6 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.75) / 16.0), drawPlayer.skinColor), shadow); + Microsoft.Xna.Framework.Color color7 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.5) / 16.0), drawPlayer.shirtColor), shadow); + Microsoft.Xna.Framework.Color color8 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.5) / 16.0), drawPlayer.underShirtColor), shadow); + Microsoft.Xna.Framework.Color color9 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.75) / 16.0), drawPlayer.pantsColor), shadow); + Microsoft.Xna.Framework.Color color10 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.75) / 16.0), drawPlayer.shoeColor), shadow); + Microsoft.Xna.Framework.Color color11 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) Position.Y + (double) drawPlayer.height * 0.25) / 16, Microsoft.Xna.Framework.Color.White), shadow); + Microsoft.Xna.Framework.Color color12 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) Position.Y + (double) drawPlayer.height * 0.5) / 16, Microsoft.Xna.Framework.Color.White), shadow); + Microsoft.Xna.Framework.Color drawColor = color12; + Microsoft.Xna.Framework.Color color13 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) Position.Y + (double) drawPlayer.height * 0.75) / 16, Microsoft.Xna.Framework.Color.White), shadow); + Microsoft.Xna.Framework.Color color14 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100); + int num19 = 0; + int num20 = 0; + int num21 = 0; + int num22 = 0; + int index3 = -1; + int index4 = -1; + int index5 = -1; + int index6 = -1; + Microsoft.Xna.Framework.Color color15 = Microsoft.Xna.Framework.Color.Transparent; + Microsoft.Xna.Framework.Color color16 = Microsoft.Xna.Framework.Color.Transparent; + Microsoft.Xna.Framework.Color color17 = Microsoft.Xna.Framework.Color.Transparent; + Microsoft.Xna.Framework.Color color18 = Microsoft.Xna.Framework.Color.Transparent; + switch (drawPlayer.head) + { + case 169: + ++num19; + break; + case 170: + ++num20; + break; + case 171: + ++num21; + break; + case 189: + ++num22; + break; + } + switch (drawPlayer.body) + { + case 175: + ++num19; + break; + case 176: + ++num20; + break; + case 177: + ++num21; + break; + case 190: + ++num22; + break; + } + switch (drawPlayer.legs) + { + case 110: + ++num19; + break; + case 111: + ++num20; + break; + case 112: + ++num21; + break; + case 130: + ++num22; + break; + } + Microsoft.Xna.Framework.Color underShirtColor = drawPlayer.underShirtColor; + underShirtColor.A = (byte) 180; + if (drawPlayer.head == 169) + { + index3 = 15; + byte num23 = (byte) (62.5 * (double) (1 + num19)); + color15 = new Microsoft.Xna.Framework.Color((int) num23, (int) num23, (int) num23, 0); + } + else if (drawPlayer.head == 210) + { + index3 = 242; + byte num24 = 127; + color15 = new Microsoft.Xna.Framework.Color((int) num24, (int) num24, (int) num24, 0); + } + else if (drawPlayer.head == 214) + { + index3 = 245; + color15 = underShirtColor; + } + else if (drawPlayer.head == 170) + { + index3 = 16; + byte num25 = (byte) (62.5 * (double) (1 + num20)); + color15 = new Microsoft.Xna.Framework.Color((int) num25, (int) num25, (int) num25, 0); + } + else if (drawPlayer.head == 189) + { + index3 = 184; + byte num26 = (byte) (62.5 * (double) (1 + num22)); + color15 = new Microsoft.Xna.Framework.Color((int) num26, (int) num26, (int) num26, 0); + color11 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num26, (int) num26, (int) num26, (int) byte.MaxValue), shadow); + } + else if (drawPlayer.head == 171) + { + byte num27 = (byte) (62.5 * (double) (1 + num21)); + color11 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num27, (int) num27, (int) num27, (int) byte.MaxValue), shadow); + } + else if (drawPlayer.head == 175) + { + index3 = 41; + color15 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + else if (drawPlayer.head == 193) + { + index3 = 209; + color15 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (drawPlayer.head == 109) + { + index3 = 208; + color15 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + else if (drawPlayer.head == 178) + { + index3 = 96; + color15 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + if (drawPlayer.body == 175) + { + index4 = !drawPlayer.Male ? 18 : 13; + byte num28 = (byte) (62.5 * (double) (1 + num19)); + color16 = new Microsoft.Xna.Framework.Color((int) num28, (int) num28, (int) num28, 0); + } + else if (drawPlayer.body == 208) + { + index4 = !drawPlayer.Male ? 247 : 246; + index5 = 248; + color16 = underShirtColor; + color17 = underShirtColor; + } + else if (drawPlayer.body == 190) + { + index4 = !drawPlayer.Male ? 186 : 185; + index5 = 188; + byte num29 = (byte) (62.5 * (double) (1 + num22)); + color16 = new Microsoft.Xna.Framework.Color((int) num29, (int) num29, (int) num29, 0); + color17 = new Microsoft.Xna.Framework.Color((int) num29, (int) num29, (int) num29, 0); + color12 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num29, (int) num29, (int) num29, (int) byte.MaxValue), shadow); + } + else if (drawPlayer.body == 176) + { + index4 = !drawPlayer.Male ? 19 : 14; + index5 = 12; + byte num30 = (byte) (62.5 * (double) (1 + num20)); + color16 = new Microsoft.Xna.Framework.Color((int) num30, (int) num30, (int) num30, 0); + color17 = new Microsoft.Xna.Framework.Color((int) num30, (int) num30, (int) num30, 0); + } + else if (drawPlayer.body == 194) + { + index4 = 210; + index5 = 211; + color16 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + color17 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (drawPlayer.body == 177) + { + byte num31 = (byte) (62.5 * (double) (1 + num21)); + color12 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num31, (int) num31, (int) num31, (int) byte.MaxValue), shadow); + } + else if (drawPlayer.body == 179) + { + index4 = !drawPlayer.Male ? 43 : 42; + index5 = 44; + color16 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + color17 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + if (drawPlayer.legs == 111) + { + index6 = 17; + byte num32 = (byte) (62.5 * (double) (1 + num20)); + color18 = new Microsoft.Xna.Framework.Color((int) num32, (int) num32, (int) num32, 0); + } + else if (drawPlayer.legs == 157) + { + index6 = 249; + color18 = underShirtColor; + } + else if (drawPlayer.legs == 158) + { + index6 = 250; + color18 = underShirtColor; + } + else if (drawPlayer.legs == 110) + { + index6 = 199; + byte num33 = (byte) (62.5 * (double) (1 + num19)); + color18 = new Microsoft.Xna.Framework.Color((int) num33, (int) num33, (int) num33, 0); + } + else if (drawPlayer.legs == 112) + { + byte num34 = (byte) (62.5 * (double) (1 + num21)); + color13 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num34, (int) num34, (int) num34, (int) byte.MaxValue), shadow); + } + else if (drawPlayer.legs == 134) + { + index6 = 212; + color18 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (drawPlayer.legs == 130) + { + byte num35 = (byte) ((int) sbyte.MaxValue * (1 + num22)); + index6 = 187; + color18 = new Microsoft.Xna.Framework.Color((int) num35, (int) num35, (int) num35, 0); + color13 = drawPlayer.GetImmuneAlphaPure(new Microsoft.Xna.Framework.Color((int) num35, (int) num35, (int) num35, (int) byte.MaxValue), shadow); + } + float alphaReduction = shadow; + color15 = drawPlayer.GetImmuneAlphaPure(color15, alphaReduction); + color16 = drawPlayer.GetImmuneAlphaPure(color16, alphaReduction); + color17 = drawPlayer.GetImmuneAlphaPure(color17, alphaReduction); + color18 = drawPlayer.GetImmuneAlphaPure(color18, alphaReduction); + if (drawPlayer.head > 0 && drawPlayer.head < 216) + this.LoadArmorHead(drawPlayer.head); + if (drawPlayer.body > 0 && drawPlayer.body < 210) + this.LoadArmorBody(drawPlayer.body); + if (drawPlayer.legs > 0 && drawPlayer.legs < 161) + this.LoadArmorLegs(drawPlayer.legs); + if (drawPlayer.handon > (sbyte) 0 && drawPlayer.handon < (sbyte) 20) + this.LoadAccHandsOn((int) drawPlayer.handon); + if (drawPlayer.handoff > (sbyte) 0 && drawPlayer.handoff < (sbyte) 12) + this.LoadAccHandsOff((int) drawPlayer.handoff); + if (drawPlayer.back > (sbyte) 0 && drawPlayer.back < (sbyte) 14) + this.LoadAccBack((int) drawPlayer.back); + if (drawPlayer.front > (sbyte) 0 && drawPlayer.front < (sbyte) 5) + this.LoadAccFront((int) drawPlayer.front); + if (drawPlayer.shoe > (sbyte) 0 && drawPlayer.shoe < (sbyte) 18) + this.LoadAccShoes((int) drawPlayer.shoe); + if (drawPlayer.waist > (sbyte) 0 && drawPlayer.waist < (sbyte) 13) + this.LoadAccWaist((int) drawPlayer.waist); + if (drawPlayer.shield > (sbyte) 0 && drawPlayer.shield < (sbyte) 7) + this.LoadAccShield((int) drawPlayer.shield); + if (drawPlayer.neck > (sbyte) 0 && drawPlayer.neck < (sbyte) 10) + this.LoadAccNeck((int) drawPlayer.neck); + if (drawPlayer.face > (sbyte) 0 && drawPlayer.face < (sbyte) 9) + this.LoadAccFace((int) drawPlayer.face); + if (drawPlayer.balloon > (sbyte) 0 && drawPlayer.balloon < (sbyte) 18) + this.LoadAccBalloon((int) drawPlayer.balloon); + this.LoadHair(drawPlayer.hair); + if ((drawPlayer.head == 78 || drawPlayer.head == 79 || drawPlayer.head == 80) && drawPlayer.body == 51 && drawPlayer.legs == 47) + { + float num36 = (float) ((double) Main.mouseTextColor / 200.0 - 0.300000011920929); + if ((double) shadow != 0.0) + num36 = 0.0f; + color11.R = (byte) ((double) color11.R * (double) num36); + color11.G = (byte) ((double) color11.G * (double) num36); + color11.B = (byte) ((double) color11.B * (double) num36); + color12.R = (byte) ((double) color12.R * (double) num36); + color12.G = (byte) ((double) color12.G * (double) num36); + color12.B = (byte) ((double) color12.B * (double) num36); + color13.R = (byte) ((double) color13.R * (double) num36); + color13.G = (byte) ((double) color13.G * (double) num36); + color13.B = (byte) ((double) color13.B * (double) num36); + } + if (drawPlayer.head == 193 && drawPlayer.body == 194 && drawPlayer.legs == 134) + { + float num37 = (float) (0.600000023841858 - (double) drawPlayer.ghostFade * 0.300000011920929); + if ((double) shadow != 0.0) + num37 = 0.0f; + color11.R = (byte) ((double) color11.R * (double) num37); + color11.G = (byte) ((double) color11.G * (double) num37); + color11.B = (byte) ((double) color11.B * (double) num37); + color12.R = (byte) ((double) color12.R * (double) num37); + color12.G = (byte) ((double) color12.G * (double) num37); + color12.B = (byte) ((double) color12.B * (double) num37); + color13.R = (byte) ((double) color13.R * (double) num37); + color13.G = (byte) ((double) color13.G * (double) num37); + color13.B = (byte) ((double) color13.B * (double) num37); + } + if ((double) shadow > 0.0) + { + color6 = Microsoft.Xna.Framework.Color.Transparent; + color5 = Microsoft.Xna.Framework.Color.Transparent; + color4 = Microsoft.Xna.Framework.Color.Transparent; + color1 = Microsoft.Xna.Framework.Color.Transparent; + color3 = Microsoft.Xna.Framework.Color.Transparent; + color2 = Microsoft.Xna.Framework.Color.Transparent; + } + float R = 1f; + float G = 1f; + float B = 1f; + float A = 1f; + if (drawPlayer.honey && Main.rand.Next(30) == 0 && (double) shadow == 0.0) + { + int index7 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 152, Alpha: 150); + Main.dust[index7].velocity.Y = 0.3f; + Main.dust[index7].velocity.X *= 0.1f; + Main.dust[index7].scale += (float) Main.rand.Next(3, 4) * 0.1f; + Main.dust[index7].alpha = 100; + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity += drawPlayer.velocity * 0.1f; + Main.playerDrawDust.Add(index7); + } + if (drawPlayer.dryadWard && (double) drawPlayer.velocity.X != 0.0 && Main.rand.Next(4) == 0) + { + int index8 = Dust.NewDust(new Vector2(drawPlayer.position.X - 2f, (float) ((double) drawPlayer.position.Y + (double) drawPlayer.height - 2.0)), drawPlayer.width + 4, 4, 163, Alpha: 100, Scale: 1.5f); + Main.dust[index8].noGravity = true; + Main.dust[index8].noLight = true; + Main.dust[index8].velocity *= 0.0f; + } + if (drawPlayer.poisoned) + { + if (Main.rand.Next(50) == 0 && (double) shadow == 0.0) + { + int index9 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 46, Alpha: 150, Scale: 0.2f); + Main.dust[index9].noGravity = true; + Main.dust[index9].fadeIn = 1.9f; + Main.playerDrawDust.Add(index9); + } + R *= 0.65f; + B *= 0.75f; + } + if (drawPlayer.venom) + { + if (Main.rand.Next(10) == 0 && (double) shadow == 0.0) + { + int index10 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 171, Alpha: 100, Scale: 0.5f); + Main.dust[index10].noGravity = true; + Main.dust[index10].fadeIn = 1.5f; + Main.playerDrawDust.Add(index10); + } + G *= 0.45f; + R *= 0.75f; + } + if (drawPlayer.onFire) + { + if (Main.rand.Next(4) == 0 && (double) shadow == 0.0) + { + int index11 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + Main.dust[index11].noGravity = true; + Main.dust[index11].velocity *= 1.8f; + Main.dust[index11].velocity.Y -= 0.5f; + Main.playerDrawDust.Add(index11); + } + B *= 0.6f; + G *= 0.7f; + } + if (drawPlayer.dripping && (double) shadow == 0.0 && Main.rand.Next(4) != 0) + { + Vector2 Position1 = Position; + Position1.X -= 2f; + Position1.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + int index12 = Dust.NewDust(Position1, drawPlayer.width + 4, drawPlayer.height + 2, 211, Alpha: 50, Scale: 0.8f); + if (Main.rand.Next(2) == 0) + Main.dust[index12].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index12].alpha += 25; + Main.dust[index12].noLight = true; + Main.dust[index12].velocity *= 0.2f; + Main.dust[index12].velocity.Y += 0.2f; + Main.dust[index12].velocity += drawPlayer.velocity; + Main.playerDrawDust.Add(index12); + } + else + { + int index13 = Dust.NewDust(Position1, drawPlayer.width + 8, drawPlayer.height + 8, 211, Alpha: 50, Scale: 1.1f); + if (Main.rand.Next(2) == 0) + Main.dust[index13].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index13].alpha += 25; + Main.dust[index13].noLight = true; + Main.dust[index13].noGravity = true; + Main.dust[index13].velocity *= 0.2f; + ++Main.dust[index13].velocity.Y; + Main.dust[index13].velocity += drawPlayer.velocity; + Main.playerDrawDust.Add(index13); + } + } + if (drawPlayer.drippingSlime) + { + int Alpha = 175; + Microsoft.Xna.Framework.Color newColor = new Microsoft.Xna.Framework.Color(0, 80, (int) byte.MaxValue, 100); + if (Main.rand.Next(4) != 0 && (double) shadow == 0.0) + { + Vector2 Position2 = Position; + Position2.X -= 2f; + Position2.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + int index14 = Dust.NewDust(Position2, drawPlayer.width + 4, drawPlayer.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + Main.dust[index14].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index14].alpha += 25; + Main.dust[index14].noLight = true; + Main.dust[index14].velocity *= 0.2f; + Main.dust[index14].velocity.Y += 0.2f; + Main.dust[index14].velocity += drawPlayer.velocity; + Main.playerDrawDust.Add(index14); + } + } + R *= 0.8f; + G *= 0.8f; + } + if (drawPlayer.ichor) + B = 0.0f; + if (drawPlayer.electrified && (double) shadow == 0.0 && Main.rand.Next(3) == 0) + { + int index15 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 226, Alpha: 100, Scale: 0.5f); + Main.dust[index15].velocity *= 1.6f; + --Main.dust[index15].velocity.Y; + Main.dust[index15].position = Vector2.Lerp(Main.dust[index15].position, drawPlayer.Center, 0.5f); + Main.playerDrawDust.Add(index15); + } + if (drawPlayer.burned) + { + if ((double) shadow == 0.0) + { + int index16 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, Scale: 2f); + Main.dust[index16].noGravity = true; + Main.dust[index16].velocity *= 1.8f; + Main.dust[index16].velocity.Y -= 0.75f; + Main.playerDrawDust.Add(index16); + } + R = 1f; + B *= 0.6f; + G *= 0.7f; + } + if (drawPlayer.onFrostBurn) + { + if (Main.rand.Next(4) == 0 && (double) shadow == 0.0) + { + int index17 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 135, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + Main.dust[index17].noGravity = true; + Main.dust[index17].velocity *= 1.8f; + Main.dust[index17].velocity.Y -= 0.5f; + Main.playerDrawDust.Add(index17); + } + R *= 0.5f; + G *= 0.7f; + } + if (drawPlayer.onFire2) + { + if (Main.rand.Next(4) == 0 && (double) shadow == 0.0) + { + int index18 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 75, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + Main.dust[index18].noGravity = true; + Main.dust[index18].velocity *= 1.8f; + Main.dust[index18].velocity.Y -= 0.5f; + Main.playerDrawDust.Add(index18); + } + B *= 0.6f; + G *= 0.7f; + } + if (drawPlayer.noItems) + { + G *= 0.8f; + R *= 0.65f; + } + if (drawPlayer.blind) + { + G *= 0.65f; + R *= 0.7f; + } + if (drawPlayer.bleed) + { + G *= 0.9f; + B *= 0.9f; + if (!drawPlayer.dead && Main.rand.Next(30) == 0 && (double) shadow == 0.0) + { + int index19 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 5); + Main.dust[index19].velocity.Y += 0.5f; + Main.dust[index19].velocity *= 0.25f; + Main.playerDrawDust.Add(index19); + } + } + if ((double) shadow == 0.0 && drawPlayer.palladiumRegen && drawPlayer.statLife < drawPlayer.statLifeMax2 && this.IsActive && !Main.gamePaused && drawPlayer.miscCounter % 10 == 0 && (double) shadow == 0.0) + { + Vector2 Position3; + Position3.X = Position.X + (float) Main.rand.Next(drawPlayer.width); + Position3.Y = Position.Y + (float) Main.rand.Next(drawPlayer.height); + Position3.X = (float) ((double) Position.X + (double) (drawPlayer.width / 2) - 6.0); + Position3.Y = (float) ((double) Position.Y + (double) (drawPlayer.height / 2) - 6.0); + Position3.X -= (float) Main.rand.Next(-10, 11); + Position3.Y -= (float) Main.rand.Next(-20, 21); + int num38 = Gore.NewGore(Position3, 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); + Main.playerDrawGore.Add(num38); + } + if ((double) shadow == 0.0 && drawPlayer.loveStruck && this.IsActive && !Main.gamePaused && Main.rand.Next(5) == 0) + { + Vector2 vector2_2 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2_2.Normalize(); + vector2_2.X *= 0.66f; + int index20 = Gore.NewGore(Position + new Vector2((float) Main.rand.Next(drawPlayer.width + 1), (float) Main.rand.Next(drawPlayer.height + 1)), vector2_2 * (float) Main.rand.Next(3, 6) * 0.33f, 331, (float) Main.rand.Next(40, 121) * 0.01f); + Main.gore[index20].sticky = false; + Main.gore[index20].velocity *= 0.4f; + Main.gore[index20].velocity.Y -= 0.6f; + Main.playerDrawGore.Add(index20); + } + if (drawPlayer.stinky && this.IsActive && !Main.gamePaused) + { + R *= 0.7f; + B *= 0.55f; + if (Main.rand.Next(5) == 0 && (double) shadow == 0.0) + { + Vector2 vector2_3 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2_3.Normalize(); + vector2_3.X *= 0.66f; + vector2_3.Y = Math.Abs(vector2_3.Y); + Vector2 vector2_4 = vector2_3 * (float) Main.rand.Next(3, 5) * 0.25f; + int index21 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 188, vector2_4.X, vector2_4.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index21].velocity *= 0.1f; + Main.dust[index21].velocity.Y -= 0.5f; + Main.playerDrawDust.Add(index21); + } + } + if (drawPlayer.slowOgreSpit && this.IsActive && !Main.gamePaused) + { + R *= 0.6f; + B *= 0.45f; + if (Main.rand.Next(5) == 0 && (double) shadow == 0.0) + { + int Type = Utils.SelectRandom(Main.rand, 4, 256); + Dust dust = Main.dust[Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, Type, Alpha: 100)]; + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust.fadeIn = 0.5f; + dust.velocity *= 0.05f; + dust.noLight = true; + if (dust.type == 4) + dust.color = new Microsoft.Xna.Framework.Color(80, 170, 40, 120); + Main.playerDrawDust.Add(dust.dustIndex); + } + if (Main.rand.Next(5) == 0 && (double) shadow == 0.0) + { + int index22 = Gore.NewGore(Position + new Vector2(Main.rand.NextFloat(), Main.rand.NextFloat()) * drawPlayer.Size, Vector2.Zero, Utils.SelectRandom(Main.rand, 1024, 1025, 1026), 0.65f); + Main.gore[index22].velocity *= 0.05f; + Main.playerDrawGore.Add(index22); + } + } + if (this.IsActive && !Main.gamePaused && (double) shadow == 0.0) + { + float num39 = (float) drawPlayer.miscCounter / 180f; + float num40 = 0.0f; + float num41 = 10f; + int Type = 90; + int num42 = 0; + for (int index23 = 0; index23 < 3; ++index23) + { + switch (index23) + { + case 0: + if (drawPlayer.nebulaLevelLife >= 1) + { + num40 = 6.283185f / (float) drawPlayer.nebulaLevelLife; + num42 = drawPlayer.nebulaLevelLife; + goto default; + } + else + break; + case 1: + if (drawPlayer.nebulaLevelMana >= 1) + { + num40 = -6.283185f / (float) drawPlayer.nebulaLevelMana; + num42 = drawPlayer.nebulaLevelMana; + num39 = (float) -drawPlayer.miscCounter / 180f; + num41 = 20f; + Type = 88; + goto default; + } + else + break; + case 2: + if (drawPlayer.nebulaLevelDamage >= 1) + { + num40 = 6.283185f / (float) drawPlayer.nebulaLevelDamage; + num42 = drawPlayer.nebulaLevelDamage; + num39 = (float) drawPlayer.miscCounter / 180f; + num41 = 30f; + Type = 86; + goto default; + } + else + break; + default: + for (int index24 = 0; index24 < num42; ++index24) + { + int index25 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, Type, Alpha: 100, Scale: 1.5f); + Main.dust[index25].noGravity = true; + Main.dust[index25].velocity = Vector2.Zero; + Main.dust[index25].position = drawPlayer.Center + Vector2.UnitY * drawPlayer.gfxOffY + ((float) ((double) num39 * 6.28318548202515 + (double) num40 * (double) index24)).ToRotationVector2() * num41; + Main.dust[index25].customData = (object) drawPlayer; + Main.playerDrawDust.Add(index25); + } + break; + } + } + } + if (drawPlayer.witheredArmor && this.IsActive && !Main.gamePaused) + { + G *= 0.5f; + R *= 0.75f; + } + if (drawPlayer.witheredWeapon && drawPlayer.itemAnimation > 0 && drawPlayer.inventory[drawPlayer.selectedItem].damage > 0 && this.IsActive && !Main.gamePaused && Main.rand.Next(3) == 0) + { + int index26 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 272, Alpha: 50, Scale: 0.5f); + Main.dust[index26].velocity *= 1.6f; + --Main.dust[index26].velocity.Y; + Main.dust[index26].position = Vector2.Lerp(Main.dust[index26].position, drawPlayer.Center, 0.5f); + Main.playerDrawDust.Add(index26); + } + if ((double) R != 1.0 || (double) G != 1.0 || (double) B != 1.0 || (double) A != 1.0) + { + if (drawPlayer.onFire || drawPlayer.onFire2 || drawPlayer.onFrostBurn) + { + color2 = drawPlayer.GetImmuneAlpha(Microsoft.Xna.Framework.Color.White, shadow); + color3 = drawPlayer.GetImmuneAlpha(drawPlayer.eyeColor, shadow); + color1 = drawPlayer.GetImmuneAlpha(drawPlayer.GetHairColor(), shadow); + color4 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor, shadow); + color5 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor, shadow); + color7 = drawPlayer.GetImmuneAlpha(drawPlayer.shirtColor, shadow); + color8 = drawPlayer.GetImmuneAlpha(drawPlayer.underShirtColor, shadow); + color9 = drawPlayer.GetImmuneAlpha(drawPlayer.pantsColor, shadow); + color6 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor, shadow); + color10 = drawPlayer.GetImmuneAlpha(drawPlayer.shoeColor, shadow); + color11 = drawPlayer.GetImmuneAlpha(Microsoft.Xna.Framework.Color.White, shadow); + color12 = drawPlayer.GetImmuneAlpha(Microsoft.Xna.Framework.Color.White, shadow); + color13 = drawPlayer.GetImmuneAlpha(Microsoft.Xna.Framework.Color.White, shadow); + } + else + { + color2 = Main.buffColor(color2, R, G, B, A); + color3 = Main.buffColor(color3, R, G, B, A); + color1 = Main.buffColor(color1, R, G, B, A); + color4 = Main.buffColor(color4, R, G, B, A); + color5 = Main.buffColor(color5, R, G, B, A); + color7 = Main.buffColor(color7, R, G, B, A); + color8 = Main.buffColor(color8, R, G, B, A); + color9 = Main.buffColor(color9, R, G, B, A); + color6 = Main.buffColor(color6, R, G, B, A); + color10 = Main.buffColor(color10, R, G, B, A); + color11 = Main.buffColor(color11, R, G, B, A); + color12 = Main.buffColor(color12, R, G, B, A); + color13 = Main.buffColor(color13, R, G, B, A); + } + } + if (drawPlayer.socialGhost) + { + color2 = Microsoft.Xna.Framework.Color.Transparent; + color3 = Microsoft.Xna.Framework.Color.Transparent; + color1 = Microsoft.Xna.Framework.Color.Transparent; + color4 = Microsoft.Xna.Framework.Color.Transparent; + color5 = Microsoft.Xna.Framework.Color.Transparent; + color7 = Microsoft.Xna.Framework.Color.Transparent; + color8 = Microsoft.Xna.Framework.Color.Transparent; + color9 = Microsoft.Xna.Framework.Color.Transparent; + color10 = Microsoft.Xna.Framework.Color.Transparent; + color6 = Microsoft.Xna.Framework.Color.Transparent; + if ((int) color11.A > (int) Main.gFade) + color11.A = Main.gFade; + if ((int) color12.A > (int) Main.gFade) + color12.A = Main.gFade; + if ((int) color13.A > (int) Main.gFade) + color13.A = Main.gFade; + } + if (drawPlayer.socialIgnoreLight) + { + float num43 = 1.2f; + color2 = Microsoft.Xna.Framework.Color.White * num43; + color3 = drawPlayer.eyeColor * num43; + color1 = GameShaders.Hair.GetColor((short) drawPlayer.hairDye, drawPlayer, Microsoft.Xna.Framework.Color.White); + color4 = drawPlayer.skinColor * num43; + color5 = drawPlayer.skinColor * num43; + color7 = drawPlayer.shirtColor * num43; + color8 = drawPlayer.underShirtColor * num43; + color9 = drawPlayer.pantsColor * num43; + color10 = drawPlayer.shoeColor * num43; + color6 = drawPlayer.skinColor * num43; + } + float num44 = 1f; + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3106) + { + float num45 = drawPlayer.stealth; + if ((double) num45 < 0.03) + num45 = 0.03f; + float num46 = (float) ((1.0 + (double) num45 * 10.0) / 11.0); + if ((double) num45 < 0.0) + num45 = 0.0f; + if ((double) num45 >= 1.0 - (double) shadow && (double) shadow > 0.0) + num45 = shadow * 0.5f; + num44 = num46; + color11 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color11.R * (double) num45), (int) (byte) ((double) color11.G * (double) num45), (int) (byte) ((double) color11.B * (double) num46), (int) (byte) ((double) color11.A * (double) num45)); + color12 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color12.R * (double) num45), (int) (byte) ((double) color12.G * (double) num45), (int) (byte) ((double) color12.B * (double) num46), (int) (byte) ((double) color12.A * (double) num45)); + color13 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color13.R * (double) num45), (int) (byte) ((double) color13.G * (double) num45), (int) (byte) ((double) color13.B * (double) num46), (int) (byte) ((double) color13.A * (double) num45)); + float scale = num45 * num45; + color2 = Microsoft.Xna.Framework.Color.Multiply(color2, scale); + color3 = Microsoft.Xna.Framework.Color.Multiply(color3, scale); + color1 = Microsoft.Xna.Framework.Color.Multiply(color1, scale); + color4 = Microsoft.Xna.Framework.Color.Multiply(color4, scale); + color5 = Microsoft.Xna.Framework.Color.Multiply(color5, scale); + color7 = Microsoft.Xna.Framework.Color.Multiply(color7, scale); + color8 = Microsoft.Xna.Framework.Color.Multiply(color8, scale); + color9 = Microsoft.Xna.Framework.Color.Multiply(color9, scale); + color10 = Microsoft.Xna.Framework.Color.Multiply(color10, scale); + color6 = Microsoft.Xna.Framework.Color.Multiply(color6, scale); + drawColor = Microsoft.Xna.Framework.Color.Multiply(drawColor, scale); + color15 = Microsoft.Xna.Framework.Color.Multiply(color15, scale); + color16 = Microsoft.Xna.Framework.Color.Multiply(color16, scale); + color17 = Microsoft.Xna.Framework.Color.Multiply(color17, scale); + color18 = Microsoft.Xna.Framework.Color.Multiply(color18, scale); + } + else if (drawPlayer.shroomiteStealth) + { + float num47 = drawPlayer.stealth; + if ((double) num47 < 0.03) + num47 = 0.03f; + float num48 = (float) ((1.0 + (double) num47 * 10.0) / 11.0); + if ((double) num47 < 0.0) + num47 = 0.0f; + if ((double) num47 >= 1.0 - (double) shadow && (double) shadow > 0.0) + num47 = shadow * 0.5f; + num44 = num48; + color11 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color11.R * (double) num47), (int) (byte) ((double) color11.G * (double) num47), (int) (byte) ((double) color11.B * (double) num48), (int) (byte) ((double) color11.A * (double) num47)); + color12 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color12.R * (double) num47), (int) (byte) ((double) color12.G * (double) num47), (int) (byte) ((double) color12.B * (double) num48), (int) (byte) ((double) color12.A * (double) num47)); + color13 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color13.R * (double) num47), (int) (byte) ((double) color13.G * (double) num47), (int) (byte) ((double) color13.B * (double) num48), (int) (byte) ((double) color13.A * (double) num47)); + float scale = num47 * num47; + color2 = Microsoft.Xna.Framework.Color.Multiply(color2, scale); + color3 = Microsoft.Xna.Framework.Color.Multiply(color3, scale); + color1 = Microsoft.Xna.Framework.Color.Multiply(color1, scale); + color4 = Microsoft.Xna.Framework.Color.Multiply(color4, scale); + color5 = Microsoft.Xna.Framework.Color.Multiply(color5, scale); + color7 = Microsoft.Xna.Framework.Color.Multiply(color7, scale); + color8 = Microsoft.Xna.Framework.Color.Multiply(color8, scale); + color9 = Microsoft.Xna.Framework.Color.Multiply(color9, scale); + color10 = Microsoft.Xna.Framework.Color.Multiply(color10, scale); + color6 = Microsoft.Xna.Framework.Color.Multiply(color6, scale); + drawColor = Microsoft.Xna.Framework.Color.Multiply(drawColor, scale); + color15 = Microsoft.Xna.Framework.Color.Multiply(color15, scale); + color16 = Microsoft.Xna.Framework.Color.Multiply(color16, scale); + color17 = Microsoft.Xna.Framework.Color.Multiply(color17, scale); + color18 = Microsoft.Xna.Framework.Color.Multiply(color18, scale); + } + else if (drawPlayer.setVortex) + { + float num49 = drawPlayer.stealth; + if ((double) num49 < 0.03) + num49 = 0.03f; + if ((double) num49 < 0.0) + num49 = 0.0f; + if ((double) num49 >= 1.0 - (double) shadow && (double) shadow > 0.0) + num49 = shadow * 0.5f; + num44 = num49; + Microsoft.Xna.Framework.Color secondColor = new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num49)); + color11 = color11.MultiplyRGBA(secondColor); + color12 = color12.MultiplyRGBA(secondColor); + color13 = color13.MultiplyRGBA(secondColor); + float scale = num49 * num49; + color2 = Microsoft.Xna.Framework.Color.Multiply(color2, scale); + color3 = Microsoft.Xna.Framework.Color.Multiply(color3, scale); + color1 = Microsoft.Xna.Framework.Color.Multiply(color1, scale); + color4 = Microsoft.Xna.Framework.Color.Multiply(color4, scale); + color5 = Microsoft.Xna.Framework.Color.Multiply(color5, scale); + color7 = Microsoft.Xna.Framework.Color.Multiply(color7, scale); + color8 = Microsoft.Xna.Framework.Color.Multiply(color8, scale); + color9 = Microsoft.Xna.Framework.Color.Multiply(color9, scale); + color10 = Microsoft.Xna.Framework.Color.Multiply(color10, scale); + color6 = Microsoft.Xna.Framework.Color.Multiply(color6, scale); + drawColor = Microsoft.Xna.Framework.Color.Multiply(drawColor, scale); + color15 = Microsoft.Xna.Framework.Color.Multiply(color15, scale); + color16 = Microsoft.Xna.Framework.Color.Multiply(color16, scale); + color17 = Microsoft.Xna.Framework.Color.Multiply(color17, scale); + color18 = Microsoft.Xna.Framework.Color.Multiply(color18, scale); + } + SpriteEffects spriteEffects; + SpriteEffects effect; + if ((double) drawPlayer.gravDir == 1.0) + { + if (drawPlayer.direction == 1) + { + spriteEffects = SpriteEffects.None; + effect = SpriteEffects.None; + } + else + { + spriteEffects = SpriteEffects.FlipHorizontally; + effect = SpriteEffects.FlipHorizontally; + } + if (!drawPlayer.dead) + { + drawPlayer.legPosition.Y = 0.0f; + drawPlayer.headPosition.Y = 0.0f; + drawPlayer.bodyPosition.Y = 0.0f; + } + } + else + { + if (drawPlayer.direction == 1) + { + spriteEffects = SpriteEffects.FlipVertically; + effect = SpriteEffects.FlipVertically; + } + else + { + spriteEffects = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + effect = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + } + if (!drawPlayer.dead) + { + drawPlayer.legPosition.Y = 6f; + drawPlayer.headPosition.Y = 6f; + drawPlayer.bodyPosition.Y = 6f; + } + } + Vector2 origin1 = new Vector2((float) drawPlayer.legFrame.Width * 0.5f, (float) drawPlayer.legFrame.Height * 0.75f); + Vector2 origin2 = new Vector2((float) drawPlayer.legFrame.Width * 0.5f, (float) drawPlayer.legFrame.Height * 0.5f); + Vector2 origin3 = new Vector2((float) drawPlayer.legFrame.Width * 0.5f, (float) drawPlayer.legFrame.Height * 0.4f); + if ((drawPlayer.merman || drawPlayer.forceMerman) && !drawPlayer.hideMerman) + { + drawPlayer.headRotation = (float) ((double) drawPlayer.velocity.Y * (double) drawPlayer.direction * 0.100000001490116); + if ((double) drawPlayer.headRotation < -0.3) + drawPlayer.headRotation = -0.3f; + if ((double) drawPlayer.headRotation > 0.3) + drawPlayer.headRotation = 0.3f; + } + else if (!drawPlayer.dead) + drawPlayer.headRotation = 0.0f; + Microsoft.Xna.Framework.Rectangle bodyFrame1 = drawPlayer.bodyFrame; + bodyFrame1.Y -= 336; + if (bodyFrame1.Y < 0) + bodyFrame1.Y = 0; + int num50 = 26; + int hair = drawPlayer.hair; + bool flag7 = 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) + flag7 = true; + if (flag6) + bodyFrame1.Height = 0; + else if (flag7) + { + if (drawPlayer.head == -1 | flag4 || drawPlayer.head == 23 || drawPlayer.head == 0) + { + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + else if (flag5) + { + drawData = new DrawData(Main.playerHairAltTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + if ((double) drawPlayer.gravDir == 1.0) + bodyFrame1.Height = num50; + } + if (drawPlayer.mount.Active) + { + drawPlayer.mount.Draw(Main.playerDrawData, 0, drawPlayer, Position, drawColor, spriteEffects, shadow); + drawPlayer.mount.Draw(Main.playerDrawData, 1, drawPlayer, Position, drawColor, spriteEffects, shadow); + } + if (drawPlayer.carpetFrame >= 0) + { + Microsoft.Xna.Framework.Color color19 = color13; + float num51 = 0.0f; + if ((double) drawPlayer.gravDir == -1.0) + num51 = 10f; + drawData = new DrawData(Main.flyingCarpetTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 28.0 * (double) drawPlayer.gravDir + (double) num51)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.flyingCarpetTexture.Height / 6 * drawPlayer.carpetFrame, Main.flyingCarpetTexture.Width, Main.flyingCarpetTexture.Height / 6)), color19, drawPlayer.bodyRotation, new Vector2((float) (Main.flyingCarpetTexture.Width / 2), (float) (Main.flyingCarpetTexture.Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num18; + Main.playerDrawData.Add(drawData); + } + Position.Y += num2; + if (drawPlayer.electrified && (double) shadow == 0.0) + { + Texture2D texture = Main.glowMaskTexture[25]; + int num52 = drawPlayer.miscCounter / 5; + for (int index27 = 0; index27 < 2; ++index27) + { + int num53 = num52 % 7; + if (num53 <= 1 || num53 >= 5) + { + drawData = new DrawData(texture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num53 * texture.Height / 7, texture.Width, texture.Height / 7)), color14, drawPlayer.bodyRotation, new Vector2((float) (texture.Width / 2), (float) (texture.Height / 14)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + num52 = num53 + 3; + } + } + if (drawPlayer.setForbidden && (double) shadow == 0.0) + { + Microsoft.Xna.Framework.Color color20 = Microsoft.Xna.Framework.Color.Lerp(color12, Microsoft.Xna.Framework.Color.White, 0.7f); + Texture2D texture2D = Main.extraTexture[74]; + Texture2D texture = Main.glowMaskTexture[217]; + int num54 = !drawPlayer.setForbiddenCooldownLocked ? 1 : 0; + int num55 = (int) ((double) ((float) ((double) drawPlayer.miscCounter / 300.0 * 6.28318548202515)).ToRotationVector2().Y * 6.0); + float num56 = ((float) ((double) drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 4f; + Microsoft.Xna.Framework.Color color21 = new Microsoft.Xna.Framework.Color(80, 70, 40, 0) * (float) ((double) num56 / 8.0 + 0.5) * 0.8f; + if (num54 == 0) + { + num55 = 0; + num56 = 2f; + color21 = new Microsoft.Xna.Framework.Color(80, 70, 40, 0) * 0.3f; + color20 = color20.MultiplyRGB(new Microsoft.Xna.Framework.Color(0.5f, 0.5f, 1f)); + } + Vector2 position = new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)) + new Vector2((float) (-drawPlayer.direction * 10), (float) (num55 - 20)); + drawData = new DrawData(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color20, drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + for (float num57 = 0.0f; (double) num57 < 4.0; ++num57) + { + drawData = new DrawData(texture, position + (num57 * 1.570796f).ToRotationVector2() * num56, new Microsoft.Xna.Framework.Rectangle?(), color21, drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.webbed && (double) shadow == 0.0 && (double) drawPlayer.velocity.Y != 0.0) + { + Microsoft.Xna.Framework.Color color22 = color12 * 0.75f; + Texture2D texture2D = Main.extraTexture[32]; + drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(), color22, drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.leinforsHair && (flag4 | flag5 || drawPlayer.head == -1 || drawPlayer.head == 0) && drawPlayer.hair != 12 && (double) shadow == 0.0 && (double) Main.rgbToHsl(color4).Z > 0.200000002980232) + { + if (Main.rand.Next(20) == 0 && !flag5) + { + Microsoft.Xna.Framework.Rectangle r = Utils.CenteredRectangle(Position + drawPlayer.Size / 2f + new Vector2(0.0f, drawPlayer.gravDir * -20f), new Vector2(20f, 14f)); + int index28 = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index28].fadeIn = 1f; + Main.dust[index28].velocity *= 0.1f; + Main.dust[index28].noLight = true; + Main.playerDrawDust.Add(index28); + } + if (Main.rand.Next(40) == 0 & flag5) + { + Microsoft.Xna.Framework.Rectangle r = Utils.CenteredRectangle(Position + drawPlayer.Size / 2f + new Vector2((float) (drawPlayer.direction * -10), drawPlayer.gravDir * -10f), new Vector2(5f, 5f)); + int index29 = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index29].fadeIn = 1f; + Main.dust[index29].velocity *= 0.1f; + Main.dust[index29].noLight = true; + Main.playerDrawDust.Add(index29); + } + if ((double) drawPlayer.velocity.X != 0.0 & flag7 && Main.rand.Next(15) == 0) + { + Microsoft.Xna.Framework.Rectangle r = Utils.CenteredRectangle(Position + drawPlayer.Size / 2f + new Vector2((float) (drawPlayer.direction * -14), 0.0f), new Vector2(4f, 30f)); + int index30 = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index30].fadeIn = 1f; + Main.dust[index30].velocity *= 0.1f; + Main.dust[index30].noLight = true; + Main.playerDrawDust.Add(index30); + } + } + Position.Y -= num2; + bool flag8 = false; + if ((drawPlayer.wings == 0 || (double) drawPlayer.velocity.Y == 0.0) && (drawPlayer.inventory[drawPlayer.selectedItem].type == 1178 || drawPlayer.inventory[drawPlayer.selectedItem].type == 779 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1295 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1910 || drawPlayer.turtleArmor || drawPlayer.body == 106 || drawPlayer.body == 170)) + { + flag8 = true; + int type = drawPlayer.inventory[drawPlayer.selectedItem].type; + int index31 = 1; + float num58 = -4f; + float num59 = -8f; + int num60 = 0; + if (drawPlayer.turtleArmor) + { + index31 = 4; + num60 = num5; + } + else if (drawPlayer.body == 106) + { + index31 = 6; + num60 = num5; + } + else if (drawPlayer.body == 170) + { + index31 = 7; + num60 = num5; + } + else + { + switch (type) + { + case 779: + index31 = 2; + break; + case 1178: + index31 = 1; + break; + case 1295: + index31 = 3; + break; + case 1910: + index31 = 5; + break; + } + } + switch (index31) + { + case 4: + case 6: + drawData = new DrawData(Main.BackPackTexture[index31], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num60; + Main.playerDrawData.Add(drawData); + break; + case 7: + drawData = new DrawData(Main.BackPackTexture[index31], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, drawPlayer.bodyFrame.Y, Main.BackPackTexture[index31].Width, drawPlayer.bodyFrame.Height)), color12, drawPlayer.bodyRotation, new Vector2((float) Main.BackPackTexture[index31].Width * 0.5f, origin2.Y), 1f, spriteEffects, 0); + drawData.shader = num60; + Main.playerDrawData.Add(drawData); + break; + default: + drawData = new DrawData(Main.BackPackTexture[index31], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num58 * (float) drawPlayer.direction, (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num59 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.BackPackTexture[index31].Width, Main.BackPackTexture[index31].Height)), color12, drawPlayer.bodyRotation, new Vector2((float) (Main.BackPackTexture[index31].Width / 2), (float) (Main.BackPackTexture[index31].Height / 2)), 1f, spriteEffects, 0); + drawData.shader = num60; + Main.playerDrawData.Add(drawData); + break; + } + } + if (!flag8 && drawPlayer.back > (sbyte) 0 && drawPlayer.back < (sbyte) 14 && !drawPlayer.mount.Active) + { + if (drawPlayer.front >= (sbyte) 1 && drawPlayer.front <= (sbyte) 4) + { + int num61 = drawPlayer.bodyFrame.Y / 56; + if (num61 < 1 || num61 > 5) + { + num3 = 10; + } + else + { + if (drawPlayer.front == (sbyte) 1) + num3 = 0; + if (drawPlayer.front == (sbyte) 2) + num3 = 8; + if (drawPlayer.front == (sbyte) 3) + num3 = 0; + if (drawPlayer.front == (sbyte) 4) + num3 = 8; + } + } + drawData = new DrawData(Main.accBackTexture[(int) drawPlayer.back], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num9; + Main.playerDrawData.Add(drawData); + } + Position.Y += (float) ((int) playerOffset / 2); + if (!flag8 && drawPlayer.wings > 0) + { + this.LoadWings(drawPlayer.wings); + if (drawPlayer.wings == 22) + { + if (((double) drawPlayer.velocity.Y != 0.0 || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active) + { + this.LoadItemFlames(1866); + Microsoft.Xna.Framework.Color color23 = color12; + int num62 = 24; + int num63 = 0; + if ((double) shadow == 0.0 && drawPlayer.grappling[0] == -1) + { + for (int index32 = 0; index32 < 7; ++index32) + { + Microsoft.Xna.Framework.Color color24 = new Microsoft.Xna.Framework.Color(250 - index32 * 10, 250 - index32 * 10, 250 - index32 * 10, 150 - index32 * 10); + Vector2 vector2_5 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + num44 = num44 * num44 * (1f - shadow); + color24 = new Microsoft.Xna.Framework.Color((int) ((double) color24.R * (double) num44), (int) ((double) color24.G * (double) num44), (int) ((double) color24.B * (double) num44), (int) ((double) color24.A * (double) num44)); + vector2_5.X = drawPlayer.itemFlamePos[index32].X; + vector2_5.Y = -drawPlayer.itemFlamePos[index32].Y; + vector2_5 *= 0.5f; + drawData = new DrawData(Main.itemFlameTexture[1866], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num63 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num62 * (double) drawPlayer.gravDir)) + vector2_5, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 7 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 7 - 2)), color24, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 14)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + drawData = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num63 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num62 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 7 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 7)), color23, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 14)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.wings == 28) + { + if (((double) drawPlayer.velocity.Y != 0.0 || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active) + { + Microsoft.Xna.Framework.Color color25 = color12; + Vector2 vector2_6 = new Vector2(0.0f, 0.0f); + Texture2D texture2D = Main.wingsTexture[drawPlayer.wings]; + Vector2 vec = Position + drawPlayer.Size * new Vector2(0.5f, 1f) - Main.screenPosition + vector2_6 * drawPlayer.Directions; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: (drawPlayer.miscCounter / 5 % 4)); + r.Width -= 2; + r.Height -= 2; + drawData = new DrawData(texture2D, vec.Floor(), new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.Lerp(color25, Microsoft.Xna.Framework.Color.White, 1f), drawPlayer.bodyRotation, r.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.extraTexture[38], vec.Floor(), new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.Lerp(color25, Microsoft.Xna.Framework.Color.White, 0.5f), drawPlayer.bodyRotation, r.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.wings == 34) + { + if (((double) drawPlayer.velocity.Y != 0.0 || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active) + { + num44 = num44 * num44 * (1f - shadow); + Microsoft.Xna.Framework.Color color26 = new Microsoft.Xna.Framework.Color((int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (100.0 * (double) num44)); + Vector2 vector2_7 = new Vector2(0.0f, 0.0f); + Texture2D texture2D = Main.wingsTexture[drawPlayer.wings]; + Vector2 vec = Position + drawPlayer.Size / 2f - Main.screenPosition + vector2_7 * drawPlayer.Directions - Vector2.UnitX * (float) drawPlayer.direction * 4f; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 6, frameY: drawPlayer.wingFrame); + r.Width -= 2; + r.Height -= 2; + drawData = new DrawData(texture2D, vec.Floor(), new Microsoft.Xna.Framework.Rectangle?(r), color26, drawPlayer.bodyRotation, r.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.wings == 39) + { + if (((double) drawPlayer.velocity.Y != 0.0 || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active) + { + num44 = num44 * num44 * (1f - shadow); + Microsoft.Xna.Framework.Color color27 = color12; + Vector2 vector2_8 = new Vector2(0.0f, 0.0f); + Texture2D texture2D = Main.wingsTexture[drawPlayer.wings]; + Vector2 vec = Position + drawPlayer.Size / 2f - Main.screenPosition + vector2_8 * drawPlayer.Directions - Vector2.UnitX * (float) drawPlayer.direction * 6f - Vector2.UnitY * 7f * drawPlayer.gravDir; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 6, frameY: drawPlayer.wingFrame); + r.Width -= 2; + r.Height -= 2; + drawData = new DrawData(texture2D, vec.Floor(), new Microsoft.Xna.Framework.Rectangle?(r), color27, drawPlayer.bodyRotation, r.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + else + { + int num64 = 0; + int num65 = 0; + if (drawPlayer.wings == 5) + { + num65 = 4; + num64 -= 4; + } + else if (drawPlayer.wings == 27) + num65 = 4; + Microsoft.Xna.Framework.Color color28 = color12; + if (drawPlayer.wings == 9 || drawPlayer.wings == 29) + { + num44 = num44 * num44 * (1f - shadow); + color28 = new Microsoft.Xna.Framework.Color((int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (100.0 * (double) num44)); + } + if (drawPlayer.wings == 10) + { + num44 = num44 * num44 * (1f - shadow); + color28 = new Microsoft.Xna.Framework.Color((int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (250.0 * (double) num44), (int) (175.0 * (double) num44)); + } + if (drawPlayer.wings == 11 && (int) color28.A > (int) Main.gFade) + color28.A = Main.gFade; + if (drawPlayer.wings == 31) + color28.A = (byte) (220.0 * (double) num44); + if (drawPlayer.wings == 32) + color28.A = (byte) ((double) sbyte.MaxValue * (double) num44); + drawData = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color28, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + if (drawPlayer.wings == 23) + { + num44 = num44 * num44 * (1f - shadow); + color28 = new Microsoft.Xna.Framework.Color((int) (200.0 * (double) num44), (int) (200.0 * (double) num44), (int) (200.0 * (double) num44), (int) (200.0 * (double) num44)); + drawData = new DrawData(Main.FlameTexture[8], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color28, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.wings == 27) + { + drawData = new DrawData(Main.glowMaskTexture[92], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num44 * (1f - shadow), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.wings == 30) + { + drawData = new DrawData(Main.glowMaskTexture[181], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num44 * (1f - shadow), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.wings == 38) + { + Microsoft.Xna.Framework.Color color29 = underShirtColor * num44 * (1f - shadow); + drawData = new DrawData(Main.glowMaskTexture[251], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color29, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + for (int index33 = drawPlayer.shadowPos.Length - 2; index33 >= 0; --index33) + { + Microsoft.Xna.Framework.Color color30 = color29; + color30.A = (byte) 0; + color30 *= MathHelper.Lerp(1f, 0.0f, (float) index33 / 3f); + color30 *= 0.1f; + Vector2 vector2_9 = drawPlayer.shadowPos[index33] - drawPlayer.position; + for (float num66 = 0.0f; (double) num66 < 1.0; num66 += 0.01f) + { + Vector2 vector2_10 = new Vector2(2f, 0.0f).RotatedBy((double) num66 / 0.0399999991059303 * 6.28318548202515); + drawData = new DrawData(Main.glowMaskTexture[251], vector2_10 + vector2_9 * num66 + new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color30 * (1f - num66), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + } + else if (drawPlayer.wings == 29) + { + drawData = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * num44 * (1f - shadow) * 0.5f, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1.06f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.wings == 36) + { + drawData = new DrawData(Main.glowMaskTexture[213], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * num44 * (1f - shadow), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1.06f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + Vector2 spinningpoint = new Vector2(0.0f, (float) (2.0 - (double) shadow * 2.0)); + for (int index34 = 0; index34 < 4; ++index34) + { + drawData = new DrawData(Main.glowMaskTexture[213], spinningpoint.RotatedBy(1.57079637050629 * (double) index34) + new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue) * num44 * (1f - shadow), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.wings == 31) + { + Microsoft.Xna.Framework.Color color31 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color color32 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.HotPink, Microsoft.Xna.Framework.Color.Crimson, (float) (Math.Cos(6.28318548202515 * ((double) drawPlayer.miscCounter / 100.0)) * 0.400000005960464 + 0.5)); + color32.A = (byte) 0; + for (int index35 = 0; index35 < 4; ++index35) + { + Vector2 vector2_11 = new Vector2((float) (Math.Cos(6.28318548202515 * ((double) drawPlayer.miscCounter / 60.0)) * 0.5 + 0.5), 0.0f).RotatedBy((double) index35 * 1.57079637050629) * 1f; + drawData = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)) + vector2_11, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color32 * num44 * (1f - shadow) * 0.5f, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color32 * num44 * (1f - shadow) * 1f, drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.wings == 32) + { + drawData = new DrawData(Main.glowMaskTexture[183], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num65 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num64 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * num44 * (1f - shadow), drawPlayer.bodyRotation, new Vector2((float) (Main.wingsTexture[drawPlayer.wings].Width / 2), (float) (Main.wingsTexture[drawPlayer.wings].Height / 8)), 1.06f, spriteEffects, 0); + drawData.shader = num17; + Main.playerDrawData.Add(drawData); + } + } + } + if (drawPlayer.balloon > (sbyte) 0) + { + int num67 = DateTime.Now.Millisecond % 800 / 200; + Vector2 vector2_12 = Main.OffsetsPlayerOffhand[drawPlayer.bodyFrame.Y / 56]; + if (drawPlayer.direction != 1) + vector2_12.X = (float) drawPlayer.width - vector2_12.X; + if ((double) drawPlayer.gravDir != 1.0) + vector2_12.Y -= (float) drawPlayer.height; + drawData = new DrawData(Main.accBalloonTexture[(int) drawPlayer.balloon], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) vector2_12.X), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) vector2_12.Y * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.accBalloonTexture[(int) drawPlayer.balloon].Height / 4 * num67, Main.accBalloonTexture[(int) drawPlayer.balloon].Width, Main.accBalloonTexture[(int) drawPlayer.balloon].Height / 4)), color12, drawPlayer.bodyRotation, new Vector2((float) (26 + drawPlayer.direction * 4), (float) (28.0 + (double) drawPlayer.gravDir * 6.0)), 1f, spriteEffects, 0); + drawData.shader = num16; + Main.playerDrawData.Add(drawData); + } + Position.Y -= (float) ((int) playerOffset / 2); + int num68 = drawPlayer.body == 82 || drawPlayer.body == 83 || drawPlayer.body == 93 || drawPlayer.body == 21 ? 1 : (drawPlayer.body == 22 ? 1 : 0); + bool flag9 = drawPlayer.body == 93 || drawPlayer.legs == 20 || drawPlayer.legs == 21; + if (num68 == 0) + { + Position.Y += num2; + drawData = new DrawData(Main.playerTextures[skinVariant, 3], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + Position.Y -= num2; + } + if (!flag9 && drawPlayer.legs != 67 && drawPlayer.legs != 106 && drawPlayer.legs != 140 && drawPlayer.legs != 138 && drawPlayer.shoe != (sbyte) 15 && drawPlayer.legs != 143) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 10], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color6, drawPlayer.legRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.wearsRobe) + goto label_448; +label_434: + if (drawPlayer.legs == 140) + { + if (!drawPlayer.invis && !drawPlayer.mount.Active) + { + Texture2D texture = Main.extraTexture[73]; + bool flag10 = drawPlayer.legFrame.Y == 0; + int num69 = drawPlayer.miscCounter / 3 % 8; + if (flag10) + num69 = drawPlayer.miscCounter / 4 % 8; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(18 * flag10.ToInt(), num69 * 26, 16, 24); + float num70 = 12f; + if (drawPlayer.bodyFrame.Height != 0) + num70 = 12f - Main.OffsetsPlayerHeadgear[drawPlayer.bodyFrame.Y / drawPlayer.bodyFrame.Height].Y; + Vector2 scale = new Vector2(1f, 1f); + Vector2 vector2_13 = Position + drawPlayer.Size * new Vector2(0.5f, (float) (0.5 + 0.5 * (double) drawPlayer.gravDir)); + int direction = drawPlayer.direction; + Vector2 vector2_14 = new Vector2(0.0f, -num70 * drawPlayer.gravDir); + Vector2 position = (vector2_13 + vector2_14 - Main.screenPosition + drawPlayer.legPosition).Floor(); + drawData = new DrawData(texture, position, new Microsoft.Xna.Framework.Rectangle?(r), color13, drawPlayer.legRotation, r.Size() * new Vector2(0.5f, (float) (0.5 - (double) drawPlayer.gravDir * 0.5)), scale, spriteEffects, 0); + drawData.shader = num6; + Main.playerDrawData.Add(drawData); + } + } + else if (drawPlayer.legs > 0 && drawPlayer.legs < 161 && (drawPlayer.shoe != (sbyte) 15 || drawPlayer.wearsRobe)) + { + if (!drawPlayer.invis) + { + drawData = new DrawData(Main.armorLegTexture[drawPlayer.legs], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color13, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + drawData.shader = num6; + Main.playerDrawData.Add(drawData); + if (index6 != -1) + { + drawData = new DrawData(Main.glowMaskTexture[index6], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color18, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + drawData.shader = num6; + Main.playerDrawData.Add(drawData); + } + } + } + else if (!drawPlayer.invis && drawPlayer.shoe != (sbyte) 15) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 11], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color9, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 12], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color10, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.wearsRobe) + goto label_451; +label_448: + if (drawPlayer.shoe > (sbyte) 0 && drawPlayer.shoe < (sbyte) 18) + { + drawData = new DrawData(Main.accShoesTexture[(int) drawPlayer.shoe], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color13, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + drawData.shader = num11; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.wearsRobe) + goto label_434; +label_451: + Position.Y += num2; + if ((skinVariant == 3 || skinVariant == 8 ? 1 : (skinVariant == 7 ? 1 : 0)) != 0 && (drawPlayer.body <= 0 || drawPlayer.body >= 210) && !drawPlayer.invis) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 14], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color7, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + int i1 = -1; + switch (drawPlayer.body) + { + case 200: + i1 = 149; + break; + case 201: + i1 = 150; + break; + case 202: + i1 = 151; + break; + case 209: + i1 = 160; + break; + } + if (i1 != -1) + { + this.LoadArmorLegs(i1); + drawData = new DrawData(Main.armorLegTexture[i1], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.legFrame), color12, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.body > 0 && drawPlayer.body < 210) + { + Microsoft.Xna.Framework.Rectangle bodyFrame2 = drawPlayer.bodyFrame; + int num71 = num3; + bodyFrame2.X += num71; + bodyFrame2.Width -= num71; + if (drawPlayer.direction == -1) + num71 = 0; + if (!drawPlayer.invis || drawPlayer.body != 21 && drawPlayer.body != 22) + { + drawData = new DrawData(drawPlayer.Male ? Main.armorBodyTexture[drawPlayer.body] : Main.femaleBodyTexture[drawPlayer.body], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num71), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(bodyFrame2), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + if (index4 != -1) + { + drawData = new DrawData(Main.glowMaskTexture[index4], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num71), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(bodyFrame2), color16, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + } + } + if (flag1 && !drawPlayer.invis) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 5], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + else if (!drawPlayer.invis) + { + if (!drawPlayer.Male) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 4], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 6], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + else + { + drawData = new DrawData(Main.playerTextures[skinVariant, 4], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 6], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.playerTextures[skinVariant, 5], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.handoff > (sbyte) 0 && drawPlayer.handoff < (sbyte) 12) + { + drawData = new DrawData(Main.accHandsOffTexture[(int) drawPlayer.handoff], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num8; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.waist > (sbyte) 0 && drawPlayer.waist < (sbyte) 13) + { + Microsoft.Xna.Framework.Rectangle legFrame = drawPlayer.legFrame; + if (legFrame.Y >= 1064) + legFrame.Y = 0; + drawData = new DrawData(Main.accWaistTexture[(int) drawPlayer.waist], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.legFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.legFrame.Height + 4.0)) + drawPlayer.legPosition + origin1, new Microsoft.Xna.Framework.Rectangle?(legFrame), color13, drawPlayer.legRotation, origin1, 1f, spriteEffects, 0); + drawData.shader = num12; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.neck > (sbyte) 0 && drawPlayer.neck < (sbyte) 10) + { + drawData = new DrawData(Main.accNeckTexture[(int) drawPlayer.neck], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num14; + Main.playerDrawData.Add(drawData); + } + if (!drawPlayer.invis && drawPlayer.head != 38 && drawPlayer.head != 135) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 0], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color4, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 1], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color2, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 2], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color3, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + if (drawPlayer.yoraiz0rDarkness) + { + drawData = new DrawData(Main.extraTexture[67], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color4, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + if (flag4) + { + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + if (!drawPlayer.invis) + { + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + } + if (flag5 && !drawPlayer.invis) + { + drawData = new DrawData(Main.playerHairAltTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.head == 23) + { + if (!drawPlayer.invis) + { + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.head == 14 || drawPlayer.head == 56 || drawPlayer.head == 114 || drawPlayer.head == 158 || drawPlayer.head == 69 || drawPlayer.head == 180) + { + Microsoft.Xna.Framework.Rectangle bodyFrame3 = drawPlayer.bodyFrame; + Vector2 origin4 = origin3; + if ((double) drawPlayer.gravDir == 1.0) + { + if (bodyFrame3.Y != 0) + { + bodyFrame3.Y -= 2; + bodyFrame3.Height -= 8; + origin4.Y += 2f; + } + } + else if (bodyFrame3.Y != 0) + { + bodyFrame3.Y -= 2; + origin4.Y -= 10f; + bodyFrame3.Height -= 8; + } + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame3), color11, drawPlayer.headRotation, origin4, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.head > 0 && drawPlayer.head < 216 && drawPlayer.head != 28) + { + if (!drawPlayer.invis || drawPlayer.head != 39 && drawPlayer.head != 38) + { + if (drawPlayer.head == 13) + { + int num72 = 0; + int index36 = 0; + if (drawPlayer.armor[index36] != null && drawPlayer.armor[index36].type == 205 && drawPlayer.armor[index36].stack > 0) + num72 += drawPlayer.armor[index36].stack; + int index37 = 10; + if (drawPlayer.armor[index37] != null && drawPlayer.armor[index37].type == 205 && drawPlayer.armor[index37].stack > 0) + num72 += drawPlayer.armor[index37].stack; + float num73 = (float) Math.PI / 60f; + float num74 = (float) ((double) num73 * (double) drawPlayer.position.X % 6.28318548202515); + for (int index38 = 0; index38 < num72; ++index38) + { + float num75 = (float) ((double) Vector2.UnitY.RotatedBy((double) num74 + (double) num73 * (double) index38).X * ((double) index38 / 30.0) * 2.0); + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num75, (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0 - (double) (4 * index38))) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + } + } + else + { + drawData = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + if (index3 != -1) + { + drawData = new DrawData(Main.glowMaskTexture[index3], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color15, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.head == 211) + { + Microsoft.Xna.Framework.Color color33 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + ulong seed = (ulong) (drawPlayer.miscCounter / 4 + 100); + int num76 = 4; + for (int index39 = 0; index39 < num76; ++index39) + { + 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(Main.glowMaskTexture[241], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3 + new Vector2(x, y), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color33, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = cHead; + Main.playerDrawData.Add(drawData); + } + } + } + } + } + else if (!drawPlayer.invis && drawPlayer.face != (sbyte) 3 && drawPlayer.face != (sbyte) 2 && drawPlayer.face != (sbyte) 4) + { + drawData = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(bodyFrame1), color1, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = -num4; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.head == 205) + { + drawData = new DrawData(Main.extraTexture[77], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color4, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.head == 214 && !drawPlayer.invis) + { + Microsoft.Xna.Framework.Rectangle bodyFrame4 = drawPlayer.bodyFrame; + bodyFrame4.Y = 0; + float t = (float) drawPlayer.miscCounter / 300f; + Microsoft.Xna.Framework.Color color34 = new Microsoft.Xna.Framework.Color(0, 0, 0, 0); + float from = 0.8f; + float to = 0.9f; + if ((double) t >= (double) from) + color34 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, new Microsoft.Xna.Framework.Color(200, 200, 200, 0), Utils.InverseLerp(from, to, t, true)); + if ((double) t >= (double) to) + color34 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, new Microsoft.Xna.Framework.Color(200, 200, 200, 0), Utils.InverseLerp(1f, to, t, true)); + color34 *= num44 * (1f - shadow); + drawData = new DrawData(Main.extraTexture[90], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3 - Main.OffsetsPlayerHeadgear[drawPlayer.bodyFrame.Y / drawPlayer.bodyFrame.Height], new Microsoft.Xna.Framework.Rectangle?(bodyFrame4), color34, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.head == 137) + { + drawData = new DrawData(Main.jackHatTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + for (int index40 = 0; index40 < 7; ++index40) + { + Microsoft.Xna.Framework.Color color35 = new Microsoft.Xna.Framework.Color(110 - index40 * 10, 110 - index40 * 10, 110 - index40 * 10, 110 - index40 * 10); + Vector2 vector2_15 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + vector2_15.X = drawPlayer.itemFlamePos[index40].X; + vector2_15.Y = drawPlayer.itemFlamePos[index40].Y; + vector2_15 *= 0.5f; + drawData = new DrawData(Main.jackHatTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3 + vector2_15, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color35, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + if (drawPlayer.face > (sbyte) 0 && drawPlayer.face < (sbyte) 9) + { + if (drawPlayer.face == (sbyte) 7) + { + drawData = new DrawData(Main.accFaceTexture[(int) drawPlayer.face], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), new Microsoft.Xna.Framework.Color(200, 200, 200, 150), drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = num15; + Main.playerDrawData.Add(drawData); + } + else + { + drawData = new DrawData(Main.accFaceTexture[(int) drawPlayer.face], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.headPosition + origin3, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, origin3, 1f, spriteEffects, 0); + drawData.shader = num15; + Main.playerDrawData.Add(drawData); + } + } + if (drawPlayer.mount.Active) + { + drawPlayer.mount.Draw(Main.playerDrawData, 2, drawPlayer, Position, drawColor, spriteEffects, shadow); + drawPlayer.mount.Draw(Main.playerDrawData, 3, drawPlayer, Position, drawColor, spriteEffects, shadow); + } + if (drawPlayer.pulley && drawPlayer.itemAnimation == 0) + { + if (drawPlayer.pulleyDir == (byte) 2) + { + int num77 = -25; + int num78 = 0; + float rotation1 = 0.0f; + drawData = new DrawData(Main.pulleyTexture, new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num78 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num77 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.pulleyTexture.Height / 2 * drawPlayer.pulleyFrame, Main.pulleyTexture.Width, Main.pulleyTexture.Height / 2)), color11, rotation1, new Vector2((float) (Main.pulleyTexture.Width / 2), (float) (Main.pulleyTexture.Height / 4)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + else + { + int num79 = -26; + int num80 = 10; + float rotation2 = 0.35f * (float) -drawPlayer.direction; + drawData = new DrawData(Main.pulleyTexture, new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + num80 * drawPlayer.direction), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) num79 * (double) drawPlayer.gravDir)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.pulleyTexture.Height / 2 * drawPlayer.pulleyFrame, Main.pulleyTexture.Width, Main.pulleyTexture.Height / 2)), color11, rotation2, new Vector2((float) (Main.pulleyTexture.Width / 2), (float) (Main.pulleyTexture.Height / 4)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + if (drawPlayer.shield > (sbyte) 0 && drawPlayer.shield < (sbyte) 7) + { + Vector2 zero = Vector2.Zero; + if (drawPlayer.shieldRaised) + zero.Y -= 4f; + if (drawPlayer.shieldRaised) + { + float num81 = (float) Math.Sin((double) Main.GlobalTime * 6.28318548202515); + float x = (float) (2.5 + 1.5 * (double) num81); + Microsoft.Xna.Framework.Color color36 = color12; + color36.A = (byte) 0; + Microsoft.Xna.Framework.Color color37 = color36 * (float) (0.449999988079071 - (double) num81 * 0.150000005960464); + for (float num82 = 0.0f; (double) num82 < 4.0; ++num82) + { + drawData = new DrawData(Main.accShieldTexture[(int) drawPlayer.shield], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)) + zero + new Vector2(x, 0.0f).RotatedBy((double) num82 / 4.0 * 6.28318548202515), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color37, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num13; + Main.playerDrawData.Add(drawData); + } + } + drawData = new DrawData(Main.accShieldTexture[(int) drawPlayer.shield], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)) + zero, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num13; + Main.playerDrawData.Add(drawData); + if (drawPlayer.shieldRaised) + { + Microsoft.Xna.Framework.Color color38 = color12; + float num83 = (float) Math.Sin((double) Main.GlobalTime * 3.14159274101257); + color38.A = (byte) ((double) color38.A * (0.5 + 0.5 * (double) num83)); + color38 *= (float) (0.5 + 0.5 * (double) num83); + drawData = new DrawData(Main.accShieldTexture[(int) drawPlayer.shield], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)) + zero, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color38, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num13; + } + if (drawPlayer.shieldRaised && drawPlayer.shieldParryTimeLeft > 0) + { + float num84 = (float) drawPlayer.shieldParryTimeLeft / 20f; + float num85 = 1.5f * num84; + Vector2 vector2_16 = new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)) + zero; + Microsoft.Xna.Framework.Color color39 = color12; + float num86 = 1f; + Vector2 vector2_17 = Position + drawPlayer.Size / 2f - Main.screenPosition; + Vector2 vector2_18 = vector2_16 - vector2_17; + Vector2 position = vector2_16 + vector2_18 * num85; + float scale = num86 + num85; + color39.A = (byte) ((double) color39.A * (1.0 - (double) num84)); + Microsoft.Xna.Framework.Color color40 = color39 * (1f - num84); + drawData = new DrawData(Main.accShieldTexture[(int) drawPlayer.shield], position, new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color40, drawPlayer.bodyRotation, origin2, scale, spriteEffects, 0); + drawData.shader = num13; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.mount.Cart) + Main.playerDrawData.Reverse(Main.playerDrawData.Count - 2, 2); + } + Position.Y += (float) ((int) playerOffset / 2); + if (drawPlayer.solarShields > 0 && (double) shadow == 0.0 && !drawPlayer.dead) + { + Texture2D texture2D = Main.extraTexture[61 + drawPlayer.solarShields - 1]; + Microsoft.Xna.Framework.Color color41 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + float rotation3 = (drawPlayer.solarShieldPos[0] * new Vector2(1f, 0.5f)).ToRotation(); + if (drawPlayer.direction == -1) + rotation3 += 3.141593f; + float rotation4 = rotation3 + 0.06283186f * (float) drawPlayer.direction; + drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2))) + drawPlayer.solarShieldPos[0], new Microsoft.Xna.Framework.Rectangle?(), color41, rotation4, texture2D.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + } + Position.Y -= (float) ((int) playerOffset / 2); + if (drawPlayer.heldProj >= 0 && (double) shadow == 0.0 && !flag3) + projectileDrawPosition = Main.playerDrawData.Count; + Microsoft.Xna.Framework.Color currentColor = Lighting.GetColor((int) ((double) Position.X + (double) drawPlayer.width * 0.5) / 16, (int) (((double) Position.Y + (double) drawPlayer.height * 0.5) / 16.0)); + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 678) + currentColor = Microsoft.Xna.Framework.Color.White; + if (drawPlayer.shroomiteStealth && drawPlayer.inventory[drawPlayer.selectedItem].ranged) + { + float num87 = drawPlayer.stealth; + if ((double) num87 < 0.03) + num87 = 0.03f; + float num88 = (float) ((1.0 + (double) num87 * 10.0) / 11.0); + currentColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) currentColor.R * (double) num87), (int) (byte) ((double) currentColor.G * (double) num87), (int) (byte) ((double) currentColor.B * (double) num88), (int) (byte) ((double) currentColor.A * (double) num87)); + } + if (drawPlayer.setVortex && drawPlayer.inventory[drawPlayer.selectedItem].ranged) + { + float num89 = drawPlayer.stealth; + if ((double) num89 < 0.03) + num89 = 0.03f; + double num90 = (1.0 + (double) num89 * 10.0) / 11.0; + currentColor = currentColor.MultiplyRGBA(new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num89))); + } + if ((double) shadow == 0.0 && !drawPlayer.frozen && (drawPlayer.itemAnimation > 0 && drawPlayer.inventory[drawPlayer.selectedItem].useStyle != 0 || drawPlayer.inventory[drawPlayer.selectedItem].holdStyle > 0 && !drawPlayer.pulley) && drawPlayer.inventory[drawPlayer.selectedItem].type > 0 && !drawPlayer.dead && !drawPlayer.inventory[drawPlayer.selectedItem].noUseGraphic && (!drawPlayer.wet || !drawPlayer.inventory[drawPlayer.selectedItem].noWet)) + { + string name = drawPlayer.name; + Microsoft.Xna.Framework.Color color42 = new Microsoft.Xna.Framework.Color(250, 250, 250, drawPlayer.inventory[drawPlayer.selectedItem].alpha); + Vector2 vector2_19 = Vector2.Zero; + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3823) + vector2_19 = new Vector2((float) (7 * drawPlayer.direction), -7f * drawPlayer.gravDir); + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3827) + { + vector2_19 = new Vector2((float) (13 * drawPlayer.direction), -13f * drawPlayer.gravDir); + color42 = Microsoft.Xna.Framework.Color.Lerp(drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), Microsoft.Xna.Framework.Color.White, 0.6f); + color42.A = (byte) 66; + } + ItemSlot.GetItemLight(ref currentColor, drawPlayer.inventory[drawPlayer.selectedItem]); + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3476) + { + Texture2D texture2D = Main.extraTexture[64]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 9, frameY: (drawPlayer.miscCounter % 54 / 6)); + Vector2 vector2_20 = new Vector2((float) (r.Width / 2 * drawPlayer.direction), 0.0f); + Vector2 origin5 = r.Size() / 2f; + drawData = new DrawData(texture2D, (vector2_1 - Main.screenPosition + vector2_20).Floor(), new Microsoft.Xna.Framework.Rectangle?(r), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor).MultiplyRGBA(new Microsoft.Xna.Framework.Color(new Vector4(0.5f, 0.5f, 0.5f, 0.8f))), drawPlayer.itemRotation, origin5, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.glowMaskTexture[195], (vector2_1 - Main.screenPosition + vector2_20).Floor(), new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color(250, 250, 250, drawPlayer.inventory[drawPlayer.selectedItem].alpha) * 0.5f, drawPlayer.itemRotation, origin5, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3779) + { + Texture2D texture2D = Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 vector2_21 = new Vector2((float) (r.Width / 2 * drawPlayer.direction), 0.0f); + Vector2 origin6 = r.Size() / 2f; + Microsoft.Xna.Framework.Color color43 = new Microsoft.Xna.Framework.Color(120, 40, 222, 0) * (float) (((double) ((float) ((double) drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 0.0) / 2.0 * 0.300000011920929 + 0.850000023841858) * 0.5f; + float num91 = 2f; + for (float num92 = 0.0f; (double) num92 < 4.0; ++num92) + { + drawData = new DrawData(Main.glowMaskTexture[218], (vector2_1 - Main.screenPosition + vector2_21).Floor() + (num92 * 1.570796f).ToRotationVector2() * num91, new Microsoft.Xna.Framework.Rectangle?(r), color43, drawPlayer.itemRotation, origin6, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(texture2D, (vector2_1 - Main.screenPosition + vector2_21).Floor(), new Microsoft.Xna.Framework.Rectangle?(r), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor).MultiplyRGBA(new Microsoft.Xna.Framework.Color(new Vector4(0.5f, 0.5f, 0.5f, 0.8f))), drawPlayer.itemRotation, origin6, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.inventory[drawPlayer.selectedItem].useStyle == 5) + { + if (Item.staff[drawPlayer.inventory[drawPlayer.selectedItem].type]) + { + float rotation5 = drawPlayer.itemRotation + 0.785f * (float) drawPlayer.direction; + int num93 = 0; + int num94 = 0; + Vector2 origin7 = new Vector2(0.0f, (float) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height); + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3210) + { + num93 = 8 * -drawPlayer.direction; + num94 = 2 * (int) drawPlayer.gravDir; + } + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3870) + { + num93 = 12 * -drawPlayer.direction; + num94 = 12 * (int) drawPlayer.gravDir; + } + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3787) + num94 = (int) ((double) (8 * (int) drawPlayer.gravDir) * Math.Cos((double) rotation5)); + if ((double) drawPlayer.gravDir == -1.0) + { + if (drawPlayer.direction == -1) + { + rotation5 += 1.57f; + origin7 = new Vector2((float) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, 0.0f); + num93 -= Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width; + } + else + { + rotation5 -= 1.57f; + origin7 = Vector2.Zero; + } + } + else if (drawPlayer.direction == -1) + { + origin7 = new Vector2((float) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, (float) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height); + num93 -= Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width; + } + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) origin7.X + (double) num93), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) num94)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), rotation5, origin7, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3870) + { + drawData = new DrawData(Main.glowMaskTexture[238], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) origin7.X + (double) num93), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) num94)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), rotation5, origin7, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + } + else + { + Vector2 vector2_22 = new Vector2((float) (Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width / 2), (float) (Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); + Vector2 vector2_23 = this.DrawPlayerItemPos(drawPlayer.gravDir, drawPlayer.inventory[drawPlayer.selectedItem].type); + int x = (int) vector2_23.X; + vector2_22.Y = vector2_23.Y; + Vector2 origin8 = new Vector2((float) -x, (float) (Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); + if (drawPlayer.direction == -1) + origin8 = new Vector2((float) (Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width + x), (float) (Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) vector2_22.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) vector2_22.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), drawPlayer.itemRotation, origin8, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + if (drawPlayer.inventory[drawPlayer.selectedItem].color != new Microsoft.Xna.Framework.Color()) + { + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) vector2_22.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) vector2_22.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(currentColor), drawPlayer.itemRotation, origin8, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].glowMask != (short) -1) + { + drawData = new DrawData(Main.glowMaskTexture[(int) drawPlayer.inventory[drawPlayer.selectedItem].glowMask], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) vector2_22.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) vector2_22.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, drawPlayer.inventory[drawPlayer.selectedItem].alpha), drawPlayer.itemRotation, origin8, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 3788) + { + float num95 = (float) ((double) ((float) ((double) drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 0.0); + Microsoft.Xna.Framework.Color color44 = new Microsoft.Xna.Framework.Color(80, 40, 252, 0) * (float) ((double) num95 / 2.0 * 0.300000011920929 + 0.850000023841858) * 0.5f; + for (float num96 = 0.0f; (double) num96 < 4.0; ++num96) + { + drawData = new DrawData(Main.glowMaskTexture[220], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X + (double) vector2_22.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y + (double) vector2_22.Y)) + (num96 * 1.570796f + drawPlayer.itemRotation).ToRotationVector2() * num95, new Microsoft.Xna.Framework.Rectangle?(), color44, drawPlayer.itemRotation, origin8, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + } + } + } + else if ((double) drawPlayer.gravDir == -1.0) + { + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 - (double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 * (double) drawPlayer.direction), 0.0f) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + if (drawPlayer.inventory[drawPlayer.selectedItem].color != new Microsoft.Xna.Framework.Color()) + { + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 - (double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 * (double) drawPlayer.direction), 0.0f) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].glowMask != (short) -1) + { + drawData = new DrawData(Main.glowMaskTexture[(int) drawPlayer.inventory[drawPlayer.selectedItem].glowMask], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, drawPlayer.inventory[drawPlayer.selectedItem].alpha), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 - (double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 * (double) drawPlayer.direction), 0.0f) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + } + else + { + if (drawPlayer.inventory[drawPlayer.selectedItem].type == 425 || drawPlayer.inventory[drawPlayer.selectedItem].type == 507) + effect = (double) drawPlayer.gravDir != 1.0 ? (drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None) : (drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically : SpriteEffects.FlipVertically); + int type = drawPlayer.inventory[drawPlayer.selectedItem].type; + drawData = new DrawData(Main.itemTexture[type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[type].Width * 0.5 - (double) Main.itemTexture[type].Width * 0.5 * (double) drawPlayer.direction), (float) Main.itemTexture[type].Height) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + if (drawPlayer.inventory[drawPlayer.selectedItem].color != new Microsoft.Xna.Framework.Color()) + { + drawData = new DrawData(Main.itemTexture[type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[type].Width * 0.5 - (double) Main.itemTexture[type].Width * 0.5 * (double) drawPlayer.direction), (float) Main.itemTexture[type].Height) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].glowMask != (short) -1) + { + drawData = new DrawData(Main.glowMaskTexture[(int) drawPlayer.inventory[drawPlayer.selectedItem].glowMask], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), color42, drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[type].Width * 0.5 - (double) Main.itemTexture[type].Width * 0.5 * (double) drawPlayer.direction), (float) Main.itemTexture[type].Height) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].flame) + { + if ((double) shadow == 0.0) + { + try + { + this.LoadItemFlames(type); + if (Main.itemFlameTexture[type] != null) + { + for (int index41 = 0; index41 < 7; ++index41) + { + Microsoft.Xna.Framework.Color color45 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + if (type == 3045) + color45 = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); + float x = drawPlayer.itemFlamePos[index41].X; + float y = drawPlayer.itemFlamePos[index41].Y; + drawData = new DrawData(Main.itemFlameTexture[type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X) + x, (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y) + y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), color45, drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[type].Width * 0.5 - (double) Main.itemTexture[type].Width * 0.5 * (double) drawPlayer.direction), (float) Main.itemTexture[type].Height) + vector2_19, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + } + } + catch + { + } + } + } + } + } + if (drawPlayer.body > 0 && drawPlayer.body < 210) + { + Microsoft.Xna.Framework.Rectangle bodyFrame5 = drawPlayer.bodyFrame; + int num97 = num3; + bodyFrame5.X += num97; + bodyFrame5.Width -= num97; + if (drawPlayer.direction == -1) + num97 = 0; + if (!drawPlayer.invis || drawPlayer.body != 21 && drawPlayer.body != 22) + { + if (flag1 && !drawPlayer.invis) + { + int body = drawPlayer.body; + if (flag2) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 7], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.playerTextures[skinVariant, 9], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.armorArmTexture[drawPlayer.body], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num97), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(bodyFrame5), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + if (index5 != -1) + { + drawData = new DrawData(Main.glowMaskTexture[index5], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num97), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(bodyFrame5), color17, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.body == 205) + { + Microsoft.Xna.Framework.Color color46 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + ulong seed = (ulong) (drawPlayer.miscCounter / 4); + int num98 = 4; + for (int index42 = 0; index42 < num98; ++index42) + { + float num99 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float num100 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + drawData = new DrawData(Main.glowMaskTexture[240], new Vector2((float) ((int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)) + num97), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2) + num99, (float) (drawPlayer.bodyFrame.Height / 2) + num100), new Microsoft.Xna.Framework.Rectangle?(bodyFrame5), color46, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num5; + Main.playerDrawData.Add(drawData); + } + } + } + } + else if (!drawPlayer.invis) + { + drawData = new DrawData(Main.playerTextures[skinVariant, 7], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 8], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + drawData = new DrawData(Main.playerTextures[skinVariant, 13], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.handon > (sbyte) 0 && drawPlayer.handon < (sbyte) 20) + { + drawData = new DrawData(Main.accHandsOnTexture[(int) drawPlayer.handon], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num7; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.inventory[drawPlayer.selectedItem].type > -1 && Item.claw[drawPlayer.inventory[drawPlayer.selectedItem].type] && (double) shadow == 0.0 && !drawPlayer.frozen && (drawPlayer.itemAnimation > 0 || drawPlayer.inventory[drawPlayer.selectedItem].holdStyle > 0 && !drawPlayer.pulley) && drawPlayer.inventory[drawPlayer.selectedItem].type > 0 && !drawPlayer.dead && !drawPlayer.inventory[drawPlayer.selectedItem].noUseGraphic && (!drawPlayer.wet || !drawPlayer.inventory[drawPlayer.selectedItem].noWet)) + { + if ((double) drawPlayer.gravDir == -1.0) + { + drawData = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 - (double) Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5 * (double) drawPlayer.direction), 0.0f), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + else + { + int type = drawPlayer.inventory[drawPlayer.selectedItem].type; + drawData = new DrawData(Main.itemTexture[type], new Vector2((float) (int) ((double) vector2_1.X - (double) Main.screenPosition.X), (float) (int) ((double) vector2_1.Y - (double) Main.screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(currentColor), drawPlayer.itemRotation, new Vector2((float) ((double) Main.itemTexture[type].Width * 0.5 - (double) Main.itemTexture[type].Width * 0.5 * (double) drawPlayer.direction), (float) Main.itemTexture[type].Height), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); + Main.playerDrawData.Add(drawData); + } + } + if (((drawPlayer.heldProj < 0 ? 0 : ((double) shadow == 0.0 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0) + projectileDrawPosition = Main.playerDrawData.Count; + Position.Y -= num2; + if (!flag8 && drawPlayer.front > (sbyte) 0 && drawPlayer.front < (sbyte) 5 && !drawPlayer.mount.Active) + { + drawData = new DrawData(Main.accFrontTexture[(int) drawPlayer.front], new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin2, 1f, spriteEffects, 0); + drawData.shader = num10; + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.frozen && (double) shadow == 0.0) + { + Microsoft.Xna.Framework.Color color47 = color12; + color47.R = (byte) ((double) color47.R * 0.55); + color47.G = (byte) ((double) color47.G * 0.55); + color47.B = (byte) ((double) color47.B * 0.55); + color47.A = (byte) ((double) color47.A * 0.55); + drawData = new DrawData(Main.frozenTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.frozenTexture.Width, Main.frozenTexture.Height)), color47, drawPlayer.bodyRotation, new Vector2((float) (Main.frozenTexture.Width / 2), (float) (Main.frozenTexture.Height / 2)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + else if (drawPlayer.webbed && (double) shadow == 0.0 && (double) drawPlayer.velocity.Y == 0.0) + { + Microsoft.Xna.Framework.Color color48 = color12 * 0.75f; + Texture2D texture2D = Main.extraTexture[31]; + int num101 = drawPlayer.height / 2; + drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0 + (double) num101)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(), color48, drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if (drawPlayer.electrified && (double) shadow == 0.0) + { + Texture2D texture = Main.glowMaskTexture[25]; + int num102 = drawPlayer.miscCounter / 5; + for (int index43 = 0; index43 < 2; ++index43) + { + int num103 = num102 % 7; + if (num103 > 1 && num103 < 5) + { + drawData = new DrawData(texture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num103 * texture.Height / 7, texture.Width, texture.Height / 7)), color14, drawPlayer.bodyRotation, new Vector2((float) (texture.Width / 2), (float) (texture.Height / 14)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + num102 = num103 + 3; + } + } + if (drawPlayer.iceBarrier && (double) shadow == 0.0) + { + int height = this.iceBarrierTexture.Height / 12; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + drawData = new DrawData(this.iceBarrierTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, height * (int) drawPlayer.iceBarrierFrame, this.iceBarrierTexture.Width, height)), white, 0.0f, new Vector2((float) (Main.frozenTexture.Width / 2), (float) (Main.frozenTexture.Height / 2)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + if ((double) shadow == 0.0 && (byte) drawPlayer.ownedLargeGems > (byte) 0) + { + bool flag11 = false; + BitsByte ownedLargeGems = drawPlayer.ownedLargeGems; + float num104 = 0.0f; + for (int key = 0; key < 7; ++key) + { + if (ownedLargeGems[key]) + ++num104; + } + float num105 = (float) (1.0 - (double) num104 * 0.0599999986588955); + float num106 = (float) (((double) num104 - 1.0) * 4.0); + switch (num104) + { + case 2f: + num106 += 10f; + break; + case 3f: + num106 += 8f; + break; + case 4f: + num106 += 6f; + break; + case 5f: + num106 += 6f; + break; + case 6f: + num106 += 2f; + break; + case 7f: + num106 += 0.0f; + break; + } + float num107 = (float) ((double) drawPlayer.miscCounter / 300.0 * 6.28318548202515); + if ((double) num104 > 0.0) + { + float num108 = 6.283185f / num104; + float num109 = 0.0f; + Vector2 vector2_24 = new Vector2(1.3f, 0.65f); + if (!flag11) + vector2_24 = Vector2.One; + List drawDataList = new List(); + for (int key = 0; key < 7; ++key) + { + if (!ownedLargeGems[key]) + { + ++num109; + } + else + { + Vector2 rotationVector2 = (num107 + num108 * ((float) key - num109)).ToRotationVector2(); + float num110 = num105; + if (flag11) + num110 = MathHelper.Lerp(num105 * 0.7f, 1f, (float) ((double) rotationVector2.Y / 2.0 + 0.5)); + Texture2D texture2D = Main.gemTexture[key]; + drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) drawPlayer.height - 80.0)) + rotationVector2 * vector2_24 * num106, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color(250, 250, 250, (int) Main.mouseTextColor / 2), 0.0f, texture2D.Size() / 2f, (float) ((double) Main.mouseTextColor / 1000.0 + 0.800000011920929) * num110, SpriteEffects.None, 0); + drawDataList.Add(drawData); + } + } + if (flag11) + drawDataList.Sort(new Comparison(DelegateMethods.CompareDrawSorterByYScale)); + Main.playerDrawData.AddRange((IEnumerable) drawDataList); + } + } + if ((drawPlayer.beetleOffense || drawPlayer.beetleDefense) && (double) shadow == 0.0) + { + for (int index44 = 0; index44 < drawPlayer.beetleOrbs; ++index44) + { + for (int index45 = 0; index45 < 5; ++index45) + { + Microsoft.Xna.Framework.Color color49 = color12; + float num111 = 0.5f - (float) index45 * 0.1f; + color49.R = (byte) ((double) color49.R * (double) num111); + color49.G = (byte) ((double) color49.G * (double) num111); + color49.B = (byte) ((double) color49.B * (double) num111); + color49.A = (byte) ((double) color49.A * (double) num111); + Vector2 vector2_25 = -drawPlayer.beetleVel[index44] * (float) index45; + drawData = new DrawData(Main.beetleTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2))) + drawPlayer.beetlePos[index44] + vector2_25, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.beetleTexture.Height / 3 * drawPlayer.beetleFrame + 1, Main.beetleTexture.Width, Main.beetleTexture.Height / 3 - 2)), color49, 0.0f, new Vector2((float) (Main.beetleTexture.Width / 2), (float) (Main.beetleTexture.Height / 6)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + drawData = new DrawData(Main.beetleTexture, new Vector2((float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2)), (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2))) + drawPlayer.beetlePos[index44], new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.beetleTexture.Height / 3 * drawPlayer.beetleFrame + 1, Main.beetleTexture.Width, Main.beetleTexture.Height / 3 - 2)), color12, 0.0f, new Vector2((float) (Main.beetleTexture.Width / 2), (float) (Main.beetleTexture.Height / 6)), 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + } + if ((double) rotation != 0.0) + { + Vector2 vector2_26 = Position - Main.screenPosition + rotationOrigin; + Vector2 vector2_27 = drawPlayer.position + rotationOrigin; + Matrix rotationZ = Matrix.CreateRotationZ(rotation); + for (int index46 = 0; index46 < Main.playerDrawDust.Count; ++index46) + { + Vector2 vector2_28 = Vector2.Transform(Main.dust[Main.playerDrawDust[index46]].position - vector2_27, rotationZ); + Main.dust[Main.playerDrawDust[index46]].position = vector2_28 + vector2_27; + } + for (int index47 = 0; index47 < Main.playerDrawGore.Count; ++index47) + { + Vector2 vector2_29 = Vector2.Transform(Main.gore[Main.playerDrawGore[index47]].position - vector2_27, rotationZ); + Main.gore[Main.playerDrawGore[index47]].position = vector2_29 + vector2_27; + } + for (int index48 = 0; index48 < Main.playerDrawData.Count; ++index48) + { + drawData = Main.playerDrawData[index48]; + if (!drawData.ignorePlayerRotation) + { + Vector2 vector2_30 = Vector2.Transform(drawData.position - vector2_26, rotationZ); + drawData.position = vector2_30 + vector2_26; + drawData.rotation += rotation; + Main.playerDrawData[index48] = drawData; + } + } + } + this.DrawPlayer_DrawAllLayers(drawPlayer, projectileDrawPosition, cHead); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + if (!drawPlayer.mount.Active || drawPlayer.mount.Type != 11) + return; + for (int i2 = 0; i2 < 1000; ++i2) + { + if (Main.projectile[i2].active && Main.projectile[i2].owner == drawPlayer.whoAmI && Main.projectile[i2].type == 591) + Main.instance.DrawProj(i2); + } + } + + private void DrawPlayer_DrawAllLayers(Player drawPlayer, int projectileDrawPosition, int cHead) + { + int num = -1; + for (int index = 0; index <= Main.playerDrawData.Count; ++index) + { + if (projectileDrawPosition == index) + { + if (num != 0) + { + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + num = 0; + } + Main.projectile[drawPlayer.heldProj].gfxOffY = drawPlayer.gfxOffY; + try + { + this.DrawProj(drawPlayer.heldProj); + } + catch + { + Main.projectile[drawPlayer.heldProj].active = false; + } + } + if (index != Main.playerDrawData.Count) + { + DrawData drawData = Main.playerDrawData[index]; + if (!drawData.sourceRect.HasValue) + drawData.sourceRect = new Microsoft.Xna.Framework.Rectangle?(drawData.texture.Frame()); + if (drawData.shader >= 0) + { + GameShaders.Hair.Apply((short) 0, drawPlayer, new DrawData?(drawData)); + GameShaders.Armor.Apply(drawData.shader, (Entity) drawPlayer, new DrawData?(drawData)); + } + else if (drawPlayer.head == 0) + { + GameShaders.Hair.Apply((short) 0, drawPlayer, new DrawData?(drawData)); + GameShaders.Armor.Apply(cHead, (Entity) drawPlayer, new DrawData?(drawData)); + } + else + { + GameShaders.Armor.Apply(0, (Entity) drawPlayer, new DrawData?(drawData)); + GameShaders.Hair.Apply((short) -drawData.shader, drawPlayer, new DrawData?(drawData)); + } + num = drawData.shader; + if (drawData.texture != null) + drawData.Draw(Main.spriteBatch); + } + } + } + + protected void DrawItem(Item item, int whoami) + { + int num1 = (int) ((double) item.position.X + (double) item.width * 0.5) / 16; + int firstTileX = this.firstTileX; + int offScreenTiles1 = Lighting.offScreenTiles; + int num2 = (int) ((double) item.position.Y + (double) item.height * 0.5) / 16; + int firstTileY = this.firstTileY; + int offScreenTiles2 = Lighting.offScreenTiles; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((double) item.position.X + (double) item.width * 0.5) / 16, (int) ((double) item.position.Y + (double) item.height * 0.5) / 16); + if (!Main.gamePaused && this.IsActive && item.type >= 71 && item.type <= 74 && (double) Math.Abs(item.velocity.X) + (double) Math.Abs(item.velocity.Y) > 0.2) + { + float num3 = (float) Main.rand.Next(500) - (float) (((double) Math.Abs(item.velocity.X) + (double) Math.Abs(item.velocity.Y)) * 20.0) - (float) ((item.type - 72) * 20); + int Type = 244 + item.type - 71; + if (item.isBeingGrabbed) + num3 /= 100f; + if ((double) num3 < (double) ((int) color.R / 70 + 1)) + { + int index = Dust.NewDust(item.position - new Vector2(1f, 2f), item.width, item.height, Type, Alpha: 254, Scale: 0.25f); + Main.dust[index].velocity *= 0.0f; + } + } + float rotation = item.velocity.X * 0.2f; + float scale = 1f; + Microsoft.Xna.Framework.Color alpha = item.GetAlpha(color); + ItemSlot.GetItemLight(ref alpha, ref scale, item); + float num4 = (float) (item.height - Main.itemTexture[item.type].Height); + float num5 = (float) (item.width / 2 - Main.itemTexture[item.type].Width / 2); + if (item.type >= 71 && item.type <= 74) + { + int index = item.type - 71; + ++Main.itemFrameCounter[whoami]; + if (Main.itemFrameCounter[whoami] > 5) + { + Main.itemFrameCounter[whoami] = 0; + ++Main.itemFrame[whoami]; + } + if (Main.itemFrame[whoami] > 7) + Main.itemFrame[whoami] = 0; + int width = Main.coinTexture[index].Width; + int height = Main.coinTexture[index].Height / 8; + float num6 = (float) (item.width / 2 - Main.coinTexture[index].Width / 2); + Main.spriteBatch.Draw(Main.coinTexture[index], new Vector2(item.position.X - Main.screenPosition.X + (float) (width / 2) + num6, item.position.Y - Main.screenPosition.Y + (float) (height / 2) + num4), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.itemFrame[whoami] * height + 1, Main.itemTexture[item.type].Width, height)), alpha, rotation, new Vector2((float) (width / 2), (float) (height / 2)), scale, SpriteEffects.None, 0.0f); + } + else if (ItemID.Sets.NebulaPickup[item.type]) + { + ++Main.itemFrameCounter[whoami]; + if (Main.itemFrameCounter[whoami] > 5) + { + Main.itemFrameCounter[whoami] = 0; + ++Main.itemFrame[whoami]; + } + if (Main.itemFrame[whoami] >= 4) + Main.itemFrame[whoami] = 0; + Microsoft.Xna.Framework.Rectangle r = Main.itemTexture[item.type].Frame(verticalFrames: 4, frameY: Main.itemFrame[whoami]); + float num7 = (float) (item.width / 2 - r.Width / 2); + float num8 = (float) (item.height - r.Height); + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (r.Width / 2) + num7, item.position.Y - Main.screenPosition.Y + (float) (r.Height / 2) + num8), new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, r.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + else if (ItemID.Sets.AnimatesAsSoul[item.type]) + { + ++Main.itemFrameCounter[whoami]; + if (Main.itemFrameCounter[whoami] > 5) + { + Main.itemFrameCounter[whoami] = 0; + ++Main.itemFrame[whoami]; + } + if (Main.itemFrame[whoami] >= 4) + Main.itemFrame[whoami] = 0; + Microsoft.Xna.Framework.Rectangle r = Main.itemTexture[item.type].Frame(verticalFrames: 4, frameY: Main.itemFrame[whoami]); + float num9 = (float) (item.width / 2 - r.Width / 2); + float num10 = (float) (item.height - r.Height); + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (r.Width / 2) + num9, item.position.Y - Main.screenPosition.Y + (float) (r.Height / 2) + num10), new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, r.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + else if (item.type == 3858) + { + ++Main.itemFrameCounter[whoami]; + if (Main.itemFrameCounter[whoami] >= 5) + { + Main.itemFrameCounter[whoami] = 0; + ++Main.itemFrame[whoami]; + } + if (Main.itemFrame[whoami] >= 3) + Main.itemFrame[whoami] = 0; + Texture2D texture2D = Main.glowMaskTexture[233]; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 3, frameY: Main.itemFrame[whoami]); + float num11 = (float) (item.width / 2 - r.Width / 2); + float num12 = (float) (item.height - r.Height); + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (r.Width / 2) + num11, item.position.Y - Main.screenPosition.Y + (float) (r.Height / 2) + num12), new Microsoft.Xna.Framework.Rectangle?(), alpha, rotation, r.Size() / 2f, scale, SpriteEffects.None, 0.0f); + float num13 = num11 - 2f; + float num14 = num12 - 2f; + Main.spriteBatch.Draw(texture2D, new Vector2(item.position.X - Main.screenPosition.X + (float) (r.Width / 2) + num13, item.position.Y - Main.screenPosition.Y + (float) (r.Height / 2) + num14), new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 63) * 0.75f, rotation, r.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + else if (ItemID.Sets.TrapSigned[item.type]) + { + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), alpha, rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + if (item.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), item.GetColor(color), rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + if (item.glowMask != (short) -1) + Main.spriteBatch.Draw(Main.glowMaskTexture[(int) item.glowMask], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, item.alpha), rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.wireTexture, new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)) + Main.itemTexture[item.type].Size().RotatedBy((double) rotation) * 0.45f * item.scale, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(4, 58, 8, 8)), alpha, 0.0f, new Vector2(4f), 1f, SpriteEffects.None, 0.0f); + } + else if (item.type >= 1522 && item.type <= 1527 || item.type == 3643) + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, (int) Main.mouseTextColor / 2), rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), (float) ((double) Main.mouseTextColor / 1000.0 + 0.800000011920929), SpriteEffects.None, 0.0f); + else if (item.type == 3779) + { + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), alpha, rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + } + else + { + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), alpha, rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + if (item.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(Main.itemTexture[item.type], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), item.GetColor(color), rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + if (item.glowMask == (short) -1) + return; + Main.spriteBatch.Draw(Main.glowMaskTexture[(int) item.glowMask], new Vector2(item.position.X - Main.screenPosition.X + (float) (Main.itemTexture[item.type].Width / 2) + num5, (float) ((double) item.position.Y - (double) Main.screenPosition.Y + (double) (Main.itemTexture[item.type].Height / 2) + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), new Microsoft.Xna.Framework.Color(250, 250, 250, item.alpha), rotation, new Vector2((float) (Main.itemTexture[item.type].Width / 2), (float) (Main.itemTexture[item.type].Height / 2)), scale, SpriteEffects.None, 0.0f); + } + } + + protected void DrawRain() + { + 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); + for (int index = 0; index < Main.maxRain; ++index) + { + if (Main.rain[index].active) + { + Rain rain = Main.rain[index]; + Main.spriteBatch.Draw(Main.rainTexture, rain.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangleArray[(int) rain.type]), Lighting.GetColor((int) ((double) rain.position.X + 4.0) >> 4, (int) ((double) rain.position.Y + 4.0) >> 4) * 0.85f, rain.rotation, Vector2.Zero, rain.scale, SpriteEffects.None, 0.0f); + if (isActive) + 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) + 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(Main.dustTexture, 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 >= 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 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(Main.dustTexture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, new Vector2(4f, 4f), scale3, 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 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 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(Main.dustTexture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), color2, dust.rotation, new Vector2(5f), scale4, SpriteEffects.None, 0.0f); + Microsoft.Xna.Framework.Color color3 = dust.GetColor(color2); + Main.spriteBatch.Draw(Main.dustTexture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), color3, dust.rotation, new Vector2(5f), scale4, 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 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 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(Main.dustTexture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, new Vector2(4f, 4f), scale5, 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.noLight && dust.type < 86 && dust.type > 91 || 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(Main.dustTexture, 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 != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(Main.dustTexture, dust.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), dust.GetColor(alpha1), 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 > 0) + flag2 = true; + bool flag3 = true; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = 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) + 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) + 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) + flag8 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 84) + flag9 = true; + } + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = false; + bool flag15 = false; + bool flag16 = false; + bool flag17 = false; + bool flag18 = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].type == 17) + flag10 = true; + if (Main.npc[index].type == 18) + flag11 = true; + if (Main.npc[index].type == 19) + flag13 = true; + if (Main.npc[index].type == 20) + flag12 = true; + if (Main.npc[index].type == 54) + flag18 = true; + if (Main.npc[index].type == 124) + flag15 = true; + if (Main.npc[index].type == 38) + flag14 = true; + if (Main.npc[index].type == 108) + flag16 = true; + if (Main.npc[index].type == 107) + flag17 = 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 (!flag10 && !flag11) + { + 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 (!flag10 && Main.helpText == 61) + { + Main.npcChatText = Lang.dialog(195); + return; + } + if (!flag11 && Main.helpText == 62) + { + Main.npcChatText = Lang.dialog(196); + return; + } + if (!flag13 && Main.helpText == 63) + { + Main.npcChatText = Lang.dialog(197); + return; + } + if (!flag12 && Main.helpText == 64) + { + Main.npcChatText = Lang.dialog(198); + return; + } + if (!flag15 && Main.helpText == 65 && NPC.downedBoss3) + { + Main.npcChatText = Lang.dialog(199); + return; + } + if (!flag18 && Main.helpText == 66 && NPC.downedBoss3) + { + Main.npcChatText = Lang.dialog(200); + return; + } + if (!flag14 && Main.helpText == 67) + { + Main.npcChatText = Lang.dialog(201); + return; + } + if (!flag17 && NPC.downedBoss2 && Main.helpText == 68) + { + Main.npcChatText = Lang.dialog(202); + return; + } + if (!flag16 && Main.hardMode && Main.helpText == 69) + { + Main.npcChatText = Lang.dialog(203); + return; + } + if (flag7 && Main.helpText == 71) + { + Main.npcChatText = Lang.dialog(204); + return; + } + if (flag8 && Main.helpText == 72) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 403 : 205); + return; + } + if (flag7 | flag8 && Main.helpText == 80) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 402 : 206); + return; + } + if (!flag9 && Main.helpText == 201 && !Main.hardMode && !NPC.downedBoss3 && !NPC.downedBoss2) + { + Main.npcChatText = Lang.dialog(207); + 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(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 && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Lang.dialog(215); + return; + } + if (Main.helpText == 1055 && NPC.downedBoss1 && !NPC.downedBoss2 && 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) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 401 : 222); + return; + } + if (Main.helpText == 1062 && Main.hardMode) + { + Main.npcChatText = Lang.dialog(223); + return; + } + } + while (Main.helpText <= 1100); + Main.helpText = 0; + } + } + + protected void GUIChatDrawInner() + { + if (Main.player[Main.myPlayer].talkNPC < 0 && Main.player[Main.myPlayer].sign == -1) + { + Main.npcChatText = ""; + } + else + { + if (Main.netMode == 0 && Main.autoPause && Main.player[Main.myPlayer].talkNPC >= 0) + { + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 105) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(107); + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 106) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(108); + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 123) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(124); + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 354) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(353); + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 376) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(369); + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 579) + Main.npc[Main.player[Main.myPlayer].talkNPC].Transform(550); + } + 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 flag = Main.InGameUI.CurrentState is UIVirtualKeyboard && PlayerInput.UsingGamepad; + int lineAmount; + string[] strArray = Utils.WordwrapString(Main.npcChatText, Main.fontMouseText, 460, 10, out lineAmount); + if (Main.editSign) + { + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + if (this.textBlinkerState == 1) + { + // ISSUE: explicit reference operation + ^ref strArray[lineAmount] += "|"; + } + Main.instance.DrawWindowsIMEPanel(new Vector2((float) (Main.screenWidth / 2), 90f), 0.5f); + } + ++lineAmount; + Main.spriteBatch.Draw(Main.chatBackTexture, new Vector2((float) (Main.screenWidth / 2 - Main.chatBackTexture.Width / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chatBackTexture.Width, (lineAmount + 1) * 30)), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.chatBackTexture, new Vector2((float) (Main.screenWidth / 2 - Main.chatBackTexture.Width / 2), (float) (100 + (lineAmount + 1) * 30)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.chatBackTexture.Height - 30, Main.chatBackTexture.Width, 30)), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int index = 0; index < lineAmount; ++index) + { + if (strArray[index] != null) + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, strArray[index], (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 - Main.chatBackTexture.Width / 2, 100, Main.chatBackTexture.Width, (lineAmount + 2) * 30); + int num2 = 120 + lineAmount * 30 + 30 - 235; + if (!PlayerInput.UsingGamepad) + num2 = 9999; + UIVirtualKeyboard.OffsetDown = num2; + if (Main.npcChatCornerItem != 0) + { + Vector2 position = new Vector2((float) (Main.screenWidth / 2 + Main.chatBackTexture.Width / 2), (float) (100 + (lineAmount + 1) * 30 + 30)) - Vector2.One * 8f; + Item obj = new Item(); + obj.netDefaults(Main.npcChatCornerItem); + float scale = 1f; + Texture2D texture = Main.itemTexture[obj.type]; + 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] > 5 && index2 != 28 && index2 != 34 && index2 != 87 && index2 != 89 && index2 != 21 && index2 != 86 && index2 != 199) + num3 += 1000; + } + 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 (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207) + { + focusText = Lang.inter[28].Value; + 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 == 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 == 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 == 208 || 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 str1 = ""; + int num4 = 0; + int num5 = 0; + int num6 = 0; + int num7 = 0; + int num8 = Main.player[Main.myPlayer].taxMoney; + if (num8 < 0) + num8 = 0; + num3 = num8; + if (num8 >= 1000000) + { + num4 = num8 / 1000000; + num8 -= num4 * 1000000; + } + if (num8 >= 10000) + { + num5 = num8 / 10000; + num8 -= num5 * 10000; + } + if (num8 >= 100) + { + num6 = num8 / 100; + num8 -= num6 * 100; + } + if (num8 >= 1) + num7 = num8; + if (num4 > 0) + str1 = str1 + (object) num4 + " " + Lang.inter[15].Value + " "; + if (num5 > 0) + str1 = str1 + (object) num5 + " " + Lang.inter[16].Value + " "; + if (num6 > 0) + str1 = str1 + (object) num6 + " " + Lang.inter[17].Value + " "; + if (num7 > 0) + str1 = str1 + (object) num7 + " " + Lang.inter[18].Value + " "; + float num9 = (float) Main.mouseTextColor / (float) byte.MaxValue; + if (num4 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num9), (int) (byte) (220.0 * (double) num9), (int) (byte) (198.0 * (double) num9), (int) Main.mouseTextColor); + else if (num5 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num9), (int) (byte) (201.0 * (double) num9), (int) (byte) (92.0 * (double) num9), (int) Main.mouseTextColor); + else if (num6 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num9), (int) (byte) (192.0 * (double) num9), (int) (byte) (193.0 * (double) num9), (int) Main.mouseTextColor); + else if (num7 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num9), (int) (byte) (138.0 * (double) num9), (int) (byte) (96.0 * (double) num9), (int) Main.mouseTextColor); + if (str1 == "") + { + focusText = Lang.inter[89].Value; + } + else + { + string str2 = str1.Substring(0, str1.Length - 1); + focusText = Lang.inter[89].Value + " (" + str2 + ")"; + } + } + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 18) + { + string str3 = ""; + int num10 = 0; + int num11 = 0; + int num12 = 0; + int num13 = 0; + int num14 = num3; + if (num14 > 0) + { + num14 = (int) ((double) num14 * 0.75); + if (num14 < 1) + num14 = 1; + } + if (num14 < 0) + num14 = 0; + num3 = num14; + if (num14 >= 1000000) + { + num10 = num14 / 1000000; + num14 -= num10 * 1000000; + } + if (num14 >= 10000) + { + num11 = num14 / 10000; + num14 -= num11 * 10000; + } + if (num14 >= 100) + { + num12 = num14 / 100; + num14 -= num12 * 100; + } + if (num14 >= 1) + num13 = num14; + if (num10 > 0) + str3 = str3 + (object) num10 + " " + Lang.inter[15].Value + " "; + if (num11 > 0) + str3 = str3 + (object) num11 + " " + Lang.inter[16].Value + " "; + if (num12 > 0) + str3 = str3 + (object) num12 + " " + Lang.inter[17].Value + " "; + if (num13 > 0) + str3 = str3 + (object) num13 + " " + Lang.inter[18].Value + " "; + float num15 = (float) Main.mouseTextColor / (float) byte.MaxValue; + if (num10 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num15), (int) (byte) (220.0 * (double) num15), (int) (byte) (198.0 * (double) num15), (int) Main.mouseTextColor); + else if (num11 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num15), (int) (byte) (201.0 * (double) num15), (int) (byte) (92.0 * (double) num15), (int) Main.mouseTextColor); + else if (num12 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num15), (int) (byte) (192.0 * (double) num15), (int) (byte) (193.0 * (double) num15), (int) Main.mouseTextColor); + else if (num13 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num15), (int) (byte) (138.0 * (double) num15), (int) (byte) (96.0 * (double) num15), (int) Main.mouseTextColor); + if (str3 == "") + { + focusText = Lang.inter[54].Value; + } + else + { + string str4 = str3.Substring(0, str3.Length - 1); + focusText = Lang.inter[54].Value + " (" + str4 + ")"; + } + } + if (!flag) + Main.DrawNPCChatButtons(mouseTextColor, color2, lineAmount, focusText, focusText3); + 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 (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 369) + { + Main.npcChatCornerItem = 0; + Main.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; + Main.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) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 1; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 19) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 2; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 124) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 8; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 142) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 9; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 353) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 18; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 368) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 19; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 453) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 20; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + 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) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 3; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 38) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 4; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 54) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 5; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 6; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 108) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 7; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 160) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 10; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 178) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 11; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 12; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 208) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 13; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 209) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 14; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 227) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 15; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 228) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 16; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 229) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 17; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 22) + { + Main.PlaySound(12); + Main.HelpText(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 441) + { + if (Main.player[Main.myPlayer].taxMoney > 0) + { + int taxMoney = Main.player[Main.myPlayer].taxMoney; + while (taxMoney > 0) + { + if (taxMoney > 1000000) + { + int Stack = taxMoney / 1000000; + taxMoney -= 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 (taxMoney > 10000) + { + int Stack = taxMoney / 10000; + taxMoney -= 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 (taxMoney > 100) + { + int Stack = taxMoney / 100; + taxMoney -= 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 = taxMoney; + if (Stack < 1) + Stack = 1; + taxMoney -= 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) + { + Main.PlaySound(12); + if (num3 > 0) + { + if (Main.player[Main.myPlayer].BuyItem(num3)) + { + AchievementsHelper.HandleNurseService(num3); + Main.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 num16 = Main.rand.Next(3); + if (num16 == 0) + Main.npcChatText = Lang.dialog(52); + if (num16 == 1) + Main.npcChatText = Lang.dialog(53); + if (num16 != 2) + return; + Main.npcChatText = Lang.dialog(54); + } + } + else + { + int num17 = Main.rand.Next(3); + if (!ChildSafety.Disabled) + num17 = Main.rand.Next(1, 3); + switch (num17) + { + 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.npc[Main.player[Main.myPlayer].talkNPC].type != 550) + return; + Main.playerInventory = true; + Main.npcChatText = ""; + Main.npcShop = 21; + this.shop[Main.npcShop].SetupShop(Main.npcShop); + Main.PlaySound(12); + } + } + else + { + if (!Main.npcChatFocus3 || Main.player[Main.myPlayer].talkNPC < 0) + return; + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 20) + { + Main.PlaySound(12); + Main.npcChatText = Lang.GetDryadWorldStatusDialog(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 22) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.PlaySound(12); + Main.InGuideCraftMenu = true; + UILinkPointNavigator.GoToDefaultPage(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107) + { + Main.playerInventory = true; + Main.npcChatText = ""; + Main.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; + Main.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; + Main.PlaySound(24); + Main.player[Main.myPlayer].GetDyeTraderReward(); + } + Main.npcChatText = Lang.DyeTraderQuestChat(gotDye); + } + else + { + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type != 550) + return; + Main.PlaySound(12); + Main.HelpText(); + Main.npcChatText = Lang.BartenderHelpText(Main.npc[Main.player[Main.myPlayer].talkNPC]); + } + } + } + } + + private static void DrawNPCChatButtons( + int superColor, + Microsoft.Xna.Framework.Color chatColor, + int numLines, + string focusText, + string focusText3) + { + float y = (float) (130 + numLines * 30); + int num = 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) num, y); + string text1 = focusText; + DynamicSpriteFont fontMouseText1 = Main.fontMouseText; + Vector2 minimum1 = vector2_1; + Vector2 baseScale = new Vector2(0.9f); + Vector2 stringSize1 = ChatManager.GetStringSize(fontMouseText1, text1, baseScale); + Microsoft.Xna.Framework.Color baseColor1 = chatColor; + Vector2 vector2_2 = new Vector2(1f); + 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 *= 1.1f; + if (!Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = true; + } + else + { + if (Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = false; + } + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, fontMouseText1, 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) num + (double) stringSize1.X * (double) vector2_2.X + 30.0), y); + string text2 = Lang.inter[52].Value; + DynamicSpriteFont fontMouseText2 = Main.fontMouseText; + Vector2 minimum2 = vector2_3; + baseScale = new Vector2(0.9f); + Vector2 stringSize2 = ChatManager.GetStringSize(fontMouseText2, 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 *= 1.1f; + if (!Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = true; + } + else + { + if (Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = false; + } + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, fontMouseText2, 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)) + return; + Vector2 vector2_4 = new Vector2((float) ((double) vector2_3.X + (double) stringSize2.X * (double) vector2_2.X + 30.0), y); + string text3 = focusText3; + DynamicSpriteFont fontMouseText3 = Main.fontMouseText; + Vector2 minimum3 = vector2_4; + baseScale = new Vector2(0.9f); + Vector2 stringSize3 = ChatManager.GetStringSize(fontMouseText3, text3, baseScale); + Microsoft.Xna.Framework.Color baseColor2 = chatColor; + vector2_2 = new Vector2(1f); + if (vec.Between(minimum3, minimum3 + stringSize3 * baseScale * vector2_2.X) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + player.releaseUseItem = false; + baseScale *= 1.1f; + if (!Main.npcChatFocus3) + Main.PlaySound(12); + Main.npcChatFocus3 = true; + } + else + { + if (Main.npcChatFocus3) + Main.PlaySound(12); + Main.npcChatFocus3 = false; + } + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, fontMouseText3, text3, minimum3 + stringSize3 * vector2_2 * 0.5f, baseColor2, 0.0f, stringSize3 * 0.5f, baseScale * vector2_2); + UILinkPointNavigator.SetPosition(2502, minimum3 + stringSize3 * 0.5f); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight = true; + } + + private static void DrawNPCChatButtonsOld( + int superColor, + Microsoft.Xna.Framework.Color chatColor, + int numLines, + string focusText, + string focusText3) + { + int num1 = 180 + (Main.screenWidth - 800) / 2; + int num2 = 130 + numLines * 30; + float num3 = 0.9f; + Vector2 vector2_1 = new Vector2(0.9f); + Vector2 vector2_2 = new Vector2((float) num1, (float) num2); + Vector2 vector2_3 = Main.fontMouseText.MeasureString(focusText); + if (Main.mouseX > num1 && (double) Main.mouseX < (double) num1 + (double) vector2_3.X && Main.mouseY > num2 && (double) Main.mouseY < (double) num2 + (double) vector2_3.Y && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + num3 = 1.2f; + Vector2 vector2_4 = new Vector2(num3); + if (!Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = false; + } + Vector2 vector2_5 = vector2_3 * 0.5f; + float num4 = 1f; + if ((double) vector2_3.X > 300.0) + num4 *= 300f / vector2_3.X; + Vector2 origin1 = vector2_5 * num4; + origin1.X *= 0.5f; + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, focusText, (float) num1 + origin1.X, (float) num2 + origin1.Y, chatColor, Microsoft.Xna.Framework.Color.Black, origin1, num3 * num4); + if (focusText.Length > 0) + { + UILinkPointNavigator.SetPosition(2500, vector2_2 + origin1); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsLeft = true; + } + string text = Lang.inter[52].Value; + chatColor = new Microsoft.Xna.Framework.Color(superColor, (int) ((double) superColor / 1.1), superColor / 2, superColor); + int num5 = num1 + (int) ((double) Main.fontMouseText.MeasureString(focusText).X * (double) num4) + 20; + int num6 = num5 + (int) Main.fontMouseText.MeasureString(text).X; + int num7 = 130 + numLines * 30; + float scale1 = 0.9f; + vector2_2 = new Vector2((float) num5, (float) num7); + Vector2 vector2_6 = Main.fontMouseText.MeasureString(text); + if (Main.mouseX > num5 && (double) Main.mouseX < (double) num5 + (double) vector2_6.X && Main.mouseY > num7 && (double) Main.mouseY < (double) num7 + (double) vector2_6.Y) + { + scale1 = 1.1f; + if (!Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + Main.player[Main.myPlayer].controlUseItem = false; + } + else + { + if (Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = false; + } + Vector2 origin2 = vector2_6 * 0.5f; + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, text, (float) num5 + origin2.X, (float) num7 + origin2.Y, chatColor, Microsoft.Xna.Framework.Color.Black, origin2, scale1); + if (text.Length > 0) + { + UILinkPointNavigator.SetPosition(2501, vector2_2 + origin2); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsMiddle = true; + } + if (!(focusText3 != "")) + return; + Main.fontMouseText.MeasureString(focusText3); + int num8 = num6 + 20; + int num9 = 130 + numLines * 30; + float scale2 = 0.9f; + vector2_2 = new Vector2((float) num8, (float) num9); + Vector2 vector2_7 = Main.fontMouseText.MeasureString(focusText3); + if (Main.mouseX > num8 && (double) Main.mouseX < (double) num8 + (double) vector2_7.X && Main.mouseY > num9 && (double) Main.mouseY < (double) num9 + (double) vector2_7.Y && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + scale2 = 1.1f; + if (!Main.npcChatFocus3) + Main.PlaySound(12); + Main.npcChatFocus3 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus3) + Main.PlaySound(12); + Main.npcChatFocus3 = false; + } + Vector2 origin3 = vector2_7 * 0.5f; + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, focusText3, (float) num8 + origin3.X, (float) num9 + origin3.Y, chatColor, Microsoft.Xna.Framework.Color.Black, origin3, scale2); + UILinkPointNavigator.SetPosition(2502, vector2_2 + origin3); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight = true; + } + + public static void CloseNPCChatOrSign() + { + Main.player[Main.myPlayer].talkNPC = -1; + Main.player[Main.myPlayer].sign = -1; + Main.npcChatCornerItem = 0; + Main.editSign = false; + Main.npcChatText = ""; + Main.PlaySound(11); + Main.player[Main.myPlayer].releaseMount = false; + } + + public static void SubmitSignText() + { + Main.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); + } + + public static void MoveCoins(Item[] pInv, Item[] cInv) + { + int[] numArray1 = new int[4]; + List intList1 = new List(); + List intList2 = new List(); + bool flag = 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(); + flag = true; + } + } + } + if (!flag) + return; + Main.PlaySound(7); + 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) + { + 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; + for (int index6 = 3; index6 >= 0; --index6) + { + 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 (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]; + for (int index8 = 3; index8 >= 0; --index8) + { + 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 (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); + } + while (intList1.Count > 0) + { + int index9 = intList1[0]; + for (int index10 = 3; index10 >= 0; --index10) + { + if (numArray1[index10] > 0) + { + pInv[index9].SetDefaults(71 + index10); + pInv[index9].stack = numArray1[index10]; + if (pInv[index9].stack > pInv[index9].maxStack) + pInv[index9].stack = pInv[index9].maxStack; + numArray1[index10] -= pInv[index9].stack; + } + } + intList1.RemoveAt(0); + } + } + + protected void DrawNPCHouse() + { + for (int n = 0; n < 200; ++n) + { + if (Main.npc[n].active && Main.npc[n].townNPC && !Main.npc[n].homeless && Main.npc[n].homeTileX > 0 && Main.npc[n].homeTileY > 0 && Main.npc[n].type != 37) + { + int index1 = 0; + int homeTileX = Main.npc[n].homeTileX; + int index2 = Main.npc[n].homeTileY - 1; + if (WorldGen.TownManager.FindOccupation(homeTileX, index2 + 1) == Main.npc[n].type) + index1 = 1; + 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 num1 = 8; + int num2 = 18; + if (Main.tile[homeTileX, index2].type == (ushort) 19) + num2 -= 8; + int y = index2 + 1; + int num3 = 0; + float num4 = (float) (y * 16); + SpriteEffects effects = SpriteEffects.None; + Texture2D texture = Main.HouseBannerTexture[index1]; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + float num5 = num4 - Main.screenPosition.Y; + num4 = Main.screenPosition.Y + (float) Main.screenHeight - num5 - (float) texture.Height; + effects = SpriteEffects.FlipVertically; + num3 = 4; + } + Main.spriteBatch.Draw(texture, new Vector2((float) (homeTileX * 16 - (int) Main.screenPosition.X + num1), num4 - (float) (int) Main.screenPosition.Y + (float) num2 + (float) num3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height)), Lighting.GetColor(homeTileX, y), 0.0f, new Vector2((float) (texture.Width / 2), (float) (texture.Height / 2)), 1f, effects, 0.0f); + int headIndex = NPC.TypeToHeadIndex(Main.npc[n].type); + float scale = 1f; + float num6 = Main.npcHeadTexture[headIndex].Width <= Main.npcHeadTexture[headIndex].Height ? (float) Main.npcHeadTexture[headIndex].Height : (float) Main.npcHeadTexture[headIndex].Width; + if ((double) num6 > 24.0) + scale = 24f / num6; + Main.spriteBatch.Draw(Main.npcHeadTexture[headIndex], new Vector2((float) (homeTileX * 16 - (int) Main.screenPosition.X + num1), (float) ((double) num4 - (double) (int) Main.screenPosition.Y + (double) num2 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[headIndex].Width, Main.npcHeadTexture[headIndex].Height)), Lighting.GetColor(homeTileX, y), 0.0f, new Vector2((float) (Main.npcHeadTexture[headIndex].Width / 2), (float) (Main.npcHeadTexture[headIndex].Height / 2)), scale, effects, 0.0f); + int num7 = homeTileX * 16 - (int) Main.screenPosition.X + num1 - texture.Width / 2; + int num8 = y * 16 - (int) Main.screenPosition.Y + num2 - texture.Height / 2; + if (Main.mouseX >= num7 && Main.mouseX <= num7 + texture.Width && Main.mouseY >= num8 && Main.mouseY <= num8 + texture.Height) + { + this.MouseText(Main.npc[n].FullName); + if (Main.mouseRightRelease && Main.mouseRight) + { + Main.mouseRightRelease = false; + WorldGen.kickOut(n); + Main.PlaySound(12); + } + } + } + } + } + } + } + + public void DrawWindowsIMEPanel(Vector2 position, float xAnchor = 0.0f) + { + if (!((Platform) Platform.Current).Ime.IsCandidateListVisible) + return; + List stringList = new List(); + for (uint index = 0; index < ((Platform) Platform.Current).Ime.CandidateCount; ++index) + { + string candidate = ((Platform) Platform.Current).Ime.GetCandidate(index); + stringList.Add(candidate); + } + if (stringList.Count == 0) + return; + uint selectedCandidate = ((Platform) Platform.Current).Ime.SelectedCandidate; + DynamicSpriteFont fontMouseText = Main.fontMouseText; + 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 + fontMouseText.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 = fontMouseText.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) Platform.Current).Ime.Enable(); + else + ((Platform) Platform.Current).Ime.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(Main.textBackTexture, new Vector2((float) num2, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.textBackTexture.Width - 100, Main.textBackTexture.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(Main.textBackTexture, new Vector2((float) num4, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(100, 0, Main.textBackTexture.Width - 200, Main.textBackTexture.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(Main.textBackTexture, new Vector2((float) num4, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(Main.textBackTexture.Width - num3, 0, Main.textBackTexture.Width - (Main.textBackTexture.Width - num3), Main.textBackTexture.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(Main.textBackTexture, new Vector2(78f, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.textBackTexture.Width, Main.textBackTexture.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) Platform.Current).Ime.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, Main.fontMouseText, 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(); + } + } + int num5 = Main.startChatLine; + int num6 = Main.startChatLine + Main.showCount; + if (num6 >= Main.numChatLines) + { + num6 = --Main.numChatLines; + num5 = num6 - Main.showCount; + } + int num7 = 0; + int index1 = -1; + int index2 = -1; + for (int index3 = num5; index3 < num6; ++index3) + { + if (Main.drawingPlayerChat || Main.chatLine[index3].showTime > 0 && Main.chatLine[index3].text.Length > 0) + { + int hoveredSnippet = -1; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, Main.chatLine[index3].parsedText, new Vector2(88f, (float) (Main.screenHeight - 30 - 28 - num7 * 21)), 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + if (hoveredSnippet >= 0 && Main.chatLine[index3].parsedText[hoveredSnippet].CheckForHover) + { + index1 = index3; + index2 = hoveredSnippet; + } + } + ++num7; + } + if (index1 > -1) + { + Main.chatLine[index1].parsedText[index2].OnHover(); + if (Main.mouseLeft && Main.mouseLeftRelease) + Main.chatLine[index1].parsedText[index2].OnClick(); + } + if (Main.drawingPlayerChat && snippets != null) + { + Vector2 stringSize = ChatManager.GetStringSize(Main.fontMouseText, 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() + { + if (Main.ShouldPVPDraw) + Main.DrawPVPIcons(); + Main.inventoryScale = 0.85f; + int num1 = 448; + int num2 = 258; + if ((Main.player[Main.myPlayer].chest != -1 || Main.npcShop > 0) && !Main.recBigList) + { + num2 += 168; + Main.inventoryScale = 0.755f; + num1 += 5; + } + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(150, 150, 150, 150); + if (Main.mouseX >= num1 && (double) Main.mouseX <= (double) num1 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num2 && (double) Main.mouseY <= (double) num2 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(ref Main.player[Main.myPlayer].trashItem, 6); + 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)); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[4].Value, new Vector2(40f, 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); + 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); + int num4 = (int) (20.0 + (double) (index2 * 56) * (double) Main.inventoryScale); + int slot = index1 + index2 * 10; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num3 && (double) Main.mouseX <= (double) num3 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num4 && (double) Main.mouseY <= (double) num4 + (double) Main.inventoryBackTexture.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]) + { + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, slot: slot); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, slot: slot); + } + 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)); + } + } + if (!PlayerInput.UsingGamepad) + { + int index = 0; + int num5 = 2; + int num6 = 32; + Player player = Main.player[Main.myPlayer]; + if (player.InfoAccMechShowWires.ToInt() * 6 + player.rulerLine.ToInt() + player.rulerGrid.ToInt() + player.autoActuator.ToInt() + player.autoPaint.ToInt() >= 8) + num6 = 2; + if (!Main.player[Main.myPlayer].hbLocked) + index = 1; + Main.spriteBatch.Draw(Main.HBLockTexture[index], new Vector2((float) num5, (float) num6), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.HBLockTexture[index].Width, Main.HBLockTexture[index].Height)), Main.inventoryBack, 0.0f, new Vector2(), 0.9f, SpriteEffects.None, 0.0f); + if (Main.mouseX > num5 && (double) Main.mouseX < (double) num5 + (double) Main.HBLockTexture[index].Width * 0.899999976158142 && Main.mouseY > num6 && (double) Main.mouseY < (double) num6 + (double) Main.HBLockTexture[index].Height * 0.899999976158142) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.player[Main.myPlayer].hbLocked) + { + this.MouseText(Lang.inter[5].Value); + Main.mouseText = true; + } + else + { + this.MouseText(Lang.inter[6].Value); + Main.mouseText = true; + } + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.PlaySound(22); + Main.player[Main.myPlayer].hbLocked = !Main.player[Main.myPlayer].hbLocked; + } + } + } + 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)); + if (Main.mapEnabled) + { + bool flag = false; + int num7 = Main.screenWidth - 440; + int num8 = 40; + if (Main.screenWidth < 940) + flag = true; + if (flag) + { + num7 = Main.screenWidth - 40; + num8 = Main.screenHeight - 200; + } + for (int index3 = 0; index3 < 4; ++index3) + { + int num9 = num7 + index3 * 32; + int num10 = num8; + if (flag) + { + num9 = num7; + num10 = num8 + index3 * 32; + } + int index4 = index3; + int num11 = 120; + if (index3 > 0 && Main.mapStyle == index3 - 1) + num11 = 200; + if (Main.mouseX >= num9 && Main.mouseX <= num9 + 32 && Main.mouseY >= num10 && Main.mouseY <= num10 + 30 && !PlayerInput.IgnoreMouseInterface) + { + num11 = (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].talkNPC = -1; + Main.npcChatCornerItem = 0; + Main.PlaySound(10); + Main.mapFullscreenScale = 2.5f; + Main.mapFullscreen = true; + Main.resetMapFull = true; + } + if (index3 == 1) + { + Main.mapStyle = 0; + Main.PlaySound(12); + } + if (index3 == 2) + { + Main.mapStyle = 1; + Main.PlaySound(12); + } + if (index3 == 3) + { + Main.mapStyle = 2; + Main.PlaySound(12); + } + } + } + Main.spriteBatch.Draw(Main.mapIconTexture[index4], new Vector2((float) num9, (float) num10), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.mapIconTexture[index4].Width, Main.mapIconTexture[index4].Height)), new Microsoft.Xna.Framework.Color(num11, num11, num11, num11), 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 color3 = 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 num12 = Main.DrawPageIcons(); + if (num12 > -1) + { + Main.HoverItem = new Item(); + switch (num12) + { + 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: + UILinkPointNavigator.Shortcuts.NPCS_LastHovered = -1; + 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 num13 = 0; + string cursorText = ""; + int num14 = 0; + int num15 = 0; + for (int index5 = 0; index5 < Main.npcHeadTexture.Length; ++index5) + { + bool flag = false; + int index6 = 0; + switch (index5) + { + case 0: + flag = true; + break; + case 21: + flag = false; + break; + default: + for (int index7 = 0; index7 < 200; ++index7) + { + if (Main.npc[index7].active && NPC.TypeToHeadIndex(Main.npc[index7].type) == index5) + { + flag = true; + index6 = index7; + break; + } + } + break; + } + if (flag) + { + int num16 = Main.screenWidth - 64 - 28 + num15; + int num17 = (int) ((double) (174 + Main.mH) + (double) (num13 * 56) * (double) Main.inventoryScale) + num14; + Microsoft.Xna.Framework.Color color4 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (num17 > Main.screenHeight - 80) + { + num15 -= 48; + num14 -= num17 - (174 + Main.mH); + num16 = Main.screenWidth - 64 - 28 + num15; + num17 = (int) ((double) (174 + Main.mH) + (double) (num13 * 56) * (double) Main.inventoryScale) + num14; + if (UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn == 100) + UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn = num13; + } + if (Main.mouseX >= num16 && (double) Main.mouseX <= (double) num16 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num17 && (double) Main.mouseY <= (double) num17 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale) + { + UILinkPointNavigator.Shortcuts.NPCS_LastHovered = index6; + Main.mouseText = true; + cursorText = index5 != 0 ? Main.npc[index6].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) + { + Main.PlaySound(12); + this.mouseNPC = index5; + Main.mouseLeftRelease = false; + } + } + } + UILinkPointNavigator.SetPosition(600 + num13, new Vector2((float) num16, (float) num17) + Main.inventoryBackTexture.Size() * 0.75f); + Texture2D texture = Main.inventoryBack11Texture; + Microsoft.Xna.Framework.Color color5 = Main.inventoryBack; + if (UILinkPointNavigator.CurrentPoint - 600 == num13) + { + texture = Main.inventoryBack14Texture; + color5 = Microsoft.Xna.Framework.Color.White; + } + Main.spriteBatch.Draw(texture, new Vector2((float) num16, (float) num17), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.inventoryBackTexture.Width, Main.inventoryBackTexture.Height)), color5, 0.0f, new Vector2(), Main.inventoryScale, SpriteEffects.None, 0.0f); + color4 = Microsoft.Xna.Framework.Color.White; + int index8 = index5; + float scale = 1f; + float num18 = Main.npcHeadTexture[index8].Width <= Main.npcHeadTexture[index8].Height ? (float) Main.npcHeadTexture[index8].Height : (float) Main.npcHeadTexture[index8].Width; + if ((double) num18 > 36.0) + scale = 36f / num18; + Main.spriteBatch.Draw(Main.npcHeadTexture[index8], new Vector2((float) num16 + 26f * Main.inventoryScale, (float) num17 + 26f * Main.inventoryScale), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[index8].Width, Main.npcHeadTexture[index8].Height)), color4, 0.0f, new Vector2((float) (Main.npcHeadTexture[index8].Width / 2), (float) (Main.npcHeadTexture[index8].Height / 2)), scale, SpriteEffects.None, 0.0f); + ++num13; + } + UILinkPointNavigator.Shortcuts.NPCS_IconsTotal = num13; + } + if (cursorText != "" && Main.mouseItem.type == 0) + { + this.MouseText(cursorText); + break; + } + 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) Main.inventoryBackTexture.Width * (double) Main.inventoryScale), (int) ((double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale)); + Item[] inv = Main.player[Main.myPlayer].miscEquips; + int num19 = Main.screenWidth - 92; + int num20 = 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 = num19 + 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 = num20 + slot * 47; + Texture2D texture = Main.inventoryTickOnTexture; + if (Main.player[Main.myPlayer].hideMisc[key]) + texture = Main.inventoryTickOffTexture; + Microsoft.Xna.Framework.Rectangle r2 = new Microsoft.Xna.Framework.Rectangle(r1.Left + 34, r1.Top - 2, texture.Width, texture.Height); + int num21 = 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; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + num21 = !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 (num21 > 0) + { + Main.HoverItem = new Item(); + Main.hoverItemName = Lang.inter[58 + num21].Value; + } + } + } + } + int num22 = num20 + 247; + int num23 = num19 + 8; + int drawBuffText = -1; + int num24 = 0; + int num25 = 3; + int num26 = 260; + if (Main.screenHeight > 630 + num26 * (Main.mapStyle == 1).ToInt()) + ++num25; + if (Main.screenHeight > 680 + num26 * (Main.mapStyle == 1).ToInt()) + ++num25; + if (Main.screenHeight > 730 + num26 * (Main.mapStyle == 1).ToInt()) + ++num25; + int num27 = 46; + for (int i = 0; i < 22; ++i) + { + int b = Main.player[Main.myPlayer].buffType[i]; + if (b != 0) + { + int num28 = num24 / num25; + int num29 = num24 % num25; + Microsoft.Xna.Framework.Point point2 = new Microsoft.Xna.Framework.Point(num23 + num28 * -num27, num22 + num29 * num27); + drawBuffText = Main.DrawBuffIcon(drawBuffText, i, b, point2.X, point2.Y); + UILinkPointNavigator.SetPosition(9000 + num24, new Vector2((float) (point2.X + 30), (float) (point2.Y + 30))); + ++num24; + if ((double) Main.buffAlpha[i] < 0.649999976158142) + Main.buffAlpha[i] = 0.65f; + } + } + UILinkPointNavigator.Shortcuts.BUFFS_DRAWN = num24; + UILinkPointNavigator.Shortcuts.BUFFS_PER_COLUMN = num25; + if (drawBuffText >= 0) + { + int id = Main.player[Main.myPlayer].buffType[drawBuffText]; + if (id > 0) + { + Main.buffString = Lang.GetBuffDescription(id); + if (id == 26 && Main.expertMode) + Main.buffString = Language.GetTextValue("BuffDescription.WellFed_Expert"); + if (id == 147) + Main.bannerMouseOver = true; + if (id == 94) + { + int num30 = (int) ((double) Main.player[Main.myPlayer].manaSickReduction * 100.0) + 1; + Main.buffString = Main.buffString + (object) num30 + "%"; + } + if (Main.meleeBuff[id]) + { + this.MouseTextHackZoom(Lang.GetBuffName(id), -10); + break; + } + this.MouseTextHackZoom(Lang.GetBuffName(id)); + break; + } + break; + } + break; + default: + int num31 = 4; + 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; + float inventoryScale = Main.inventoryScale; + int num32 = 8 + Main.player[Main.myPlayer].extraAccessorySlots; + bool flag1 = false; + int num33 = num32 - 1; + if (num32 == 8 && (Main.player[Main.myPlayer].armor[8].type > 0 || Main.player[Main.myPlayer].armor[18].type > 0 || Main.player[Main.myPlayer].dye[8].type > 0)) + { + num32 = 9; + flag1 = true; + num33 = 7; + } + if (Main.screenHeight < 900 && num33 == 8) + --num33; + Microsoft.Xna.Framework.Color inventoryBack1 = Main.inventoryBack; + Microsoft.Xna.Framework.Color color6 = new Microsoft.Xna.Framework.Color(80, 80, 80, 80); + for (int slot = 0; slot < num32; ++slot) + { + bool flag2 = false; + if (flag1 && slot == num32 - 1 && Main.mouseItem.type > 0) + flag2 = true; + int num34 = Main.screenWidth - 64 - 28; + int num35 = (int) ((double) (174 + Main.mH) + (double) (slot * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color7 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (slot > 2) + num35 += num31; + if (slot == num33) + { + Vector2 vector2_1 = new Vector2((float) (num34 - 10 - 47 - 47 - 14), (float) num35 + (float) Main.inventoryBackTexture.Height * 0.5f); + Main.spriteBatch.Draw(Main.extraTexture[58], vector2_1, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, Main.extraTexture[58].Size() / 2f, Main.inventoryScale, SpriteEffects.None, 0.0f); + Vector2 vector2_2 = Main.fontMouseText.MeasureString(Main.player[Main.myPlayer].statDefense.ToString()); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, 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, Main.extraTexture[58].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 + Main.extraTexture[58].Size() * Main.inventoryScale / 4f); + } + int context = 8; + if (slot > 2) + context = 10; + Texture2D texture = Main.inventoryTickOnTexture; + if (Main.player[Main.myPlayer].hideVisual[slot]) + texture = Main.inventoryTickOffTexture; + int x = Main.screenWidth - 58; + int y = (int) ((double) (172 + Main.mH) + (double) (slot * 56) * (double) Main.inventoryScale); + if (slot > 2) + y += num31; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, texture.Width, texture.Height); + int num36 = 0; + if (slot >= 3 && slot < num32 && 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].hideVisual[slot] = !Main.player[Main.myPlayer].hideVisual[slot]; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + num36 = !Main.player[Main.myPlayer].hideVisual[slot] ? 1 : 2; + } + else if (Main.mouseX >= num34 && (double) Main.mouseX <= (double) num34 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num35 && (double) Main.mouseY <= (double) num35 + (double) Main.inventoryBackTexture.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 (!flag2 && Main.mouseLeftRelease && Main.mouseLeft) + ItemSlot.LeftClick(Main.player[Main.myPlayer].armor, context, slot); + ItemSlot.MouseHover(Main.player[Main.myPlayer].armor, context, slot); + } + if (flag1 && slot == num32 - 1) + Main.inventoryBack = color6; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].armor, context, slot, new Vector2((float) num34, (float) num35)); + if (slot > 2 && slot < num32) + { + Main.spriteBatch.Draw(texture, new Vector2((float) x, (float) y), Microsoft.Xna.Framework.Color.White * 0.7f); + if (num36 > 0) + { + Main.HoverItem = new Item(); + Main.hoverItemName = Lang.inter[58 + num36].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 > 174 + Main.mH && Main.mouseY < (int) ((double) (174 + Main.mH) + 168.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + for (int slot = 10; slot < 10 + num32; ++slot) + { + bool flag3 = false; + if (flag1 && slot == 10 + num32 - 1 && Main.mouseItem.type > 0) + flag3 = true; + int num37 = Main.screenWidth - 64 - 28 - 47; + int num38 = (int) ((double) (174 + Main.mH) + (double) ((slot - 10) * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color8 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (slot > 12) + num38 += num31; + int context = 9; + if (slot > 12) + context = 11; + if (Main.mouseX >= num37 && (double) Main.mouseX <= (double) num37 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num38 && (double) Main.mouseY <= (double) num38 + (double) Main.inventoryBackTexture.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 (!flag3) + { + if (Main.mouseLeftRelease && Main.mouseLeft) + ItemSlot.LeftClick(Main.player[Main.myPlayer].armor, context, slot); + else + ItemSlot.RightClick(Main.player[Main.myPlayer].armor, context, slot); + } + ItemSlot.MouseHover(Main.player[Main.myPlayer].armor, context, slot); + } + if (flag1 && slot == num32 + 10 - 1) + Main.inventoryBack = color6; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].armor, context, slot, new Vector2((float) num37, (float) num38)); + } + 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 > 174 + Main.mH && Main.mouseY < (int) ((double) (174 + Main.mH) + 168.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + for (int slot = 0; slot < num32; ++slot) + { + bool flag4 = false; + if (flag1 && slot == num32 - 1 && Main.mouseItem.type > 0) + flag4 = true; + int num39 = Main.screenWidth - 64 - 28 - 47 - 47; + int num40 = (int) ((double) (174 + Main.mH) + (double) (slot * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color9 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (slot > 2) + num40 += num31; + if (Main.mouseX >= num39 && (double) Main.mouseX <= (double) num39 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num40 && (double) Main.mouseY <= (double) num40 + (double) Main.inventoryBackTexture.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 (!flag4) + { + if (Main.mouseRightRelease && Main.mouseRight) + ItemSlot.RightClick(Main.player[Main.myPlayer].dye, 12, slot); + else if (Main.mouseLeftRelease && Main.mouseLeft) + ItemSlot.LeftClick(Main.player[Main.myPlayer].dye, 12, slot); + } + ItemSlot.MouseHover(Main.player[Main.myPlayer].dye, 12, slot); + } + if (flag1 && slot == num32 - 1) + Main.inventoryBack = color6; + 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 num41 = (Main.screenHeight - 600) / 2; + int num42 = (int) ((double) Main.screenHeight / 600.0 * 250.0); + if (Main.screenHeight < 700) + { + num41 = (Main.screenHeight - 508) / 2; + num42 = (int) ((double) Main.screenHeight / 600.0 * 200.0); + } + else if (Main.screenHeight < 850) + num42 = (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 color10 = 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 num43 = 50; + int num44 = 270; + string text1 = Lang.inter[46].Value + ": "; + if (Main.reforgeItem.type > 0) + { + int num45 = Main.reforgeItem.value; + if (Main.player[Main.myPlayer].discount) + num45 = (int) ((double) num45 * 0.8); + int price = num45 / 3; + string text2 = ""; + int num46 = 0; + int num47 = 0; + int num48 = 0; + int num49 = 0; + int num50 = price; + if (num50 < 1) + num50 = 1; + if (num50 >= 1000000) + { + num46 = num50 / 1000000; + num50 -= num46 * 1000000; + } + if (num50 >= 10000) + { + num47 = num50 / 10000; + num50 -= num47 * 10000; + } + if (num50 >= 100) + { + num48 = num50 / 100; + num50 -= num48 * 100; + } + if (num50 >= 1) + num49 = num50; + if (num46 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinPlatinum).Hex3() + ":" + (object) num46 + " " + Lang.inter[15].Value + "] "; + if (num47 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinGold).Hex3() + ":" + (object) num47 + " " + Lang.inter[16].Value + "] "; + if (num48 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinSilver).Hex3() + ":" + (object) num48 + " " + Lang.inter[17].Value + "] "; + if (num49 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinCopper).Hex3() + ":" + (object) num49 + " " + Lang.inter[18].Value + "] "; + ItemSlot.DrawSavings(Main.spriteBatch, (float) (num43 + 130), (float) this.invBottom, true); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, text2, new Vector2((float) (num43 + 50) + Main.fontMouseText.MeasureString(text1).X, (float) num44), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, Vector2.One); + int num51 = num43 + 70; + int num52 = num44 + 40; + int num53 = Main.mouseX <= num51 - 15 || Main.mouseX >= num51 + 15 || Main.mouseY <= num52 - 15 || Main.mouseY >= num52 + 15 ? 0 : (!PlayerInput.IgnoreMouseInterface ? 1 : 0); + Texture2D texture2D = Main.reforgeTexture[0]; + if (num53 != 0) + texture2D = Main.reforgeTexture[1]; + Main.spriteBatch.Draw(texture2D, new Vector2((float) num51, (float) num52), 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) num51, (float) num52) + texture2D.Size() / 4f); + if (num53 != 0) + { + Main.hoverItemName = Lang.inter[19].Value; + if (!Main.mouseReforge) + Main.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; + ItemText.NewText(Main.reforgeItem, Main.reforgeItem.stack, true); + Main.PlaySound(SoundID.Item37); + } + } + else + Main.mouseReforge = false; + } + else + text1 = Lang.inter[20].Value; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, text1, new Vector2((float) (num43 + 50), (float) num44), 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 >= num43 && (double) Main.mouseX <= (double) num43 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num44 && (double) Main.mouseY <= (double) num44 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.craftingHide = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(ref Main.reforgeItem, 5); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(ref Main.reforgeItem, 5); + ItemSlot.MouseHover(ref Main.reforgeItem, 5); + } + ItemSlot.Draw(Main.spriteBatch, ref Main.reforgeItem, 5, new Vector2((float) num43, (float) num44)); + } + } + 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 num54 = 73; + int num55 = 331 + num41; + string str; + if (Main.guideItem.type > 0) + { + str = Lang.inter[21].Value + " " + Main.guideItem.Name; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[22].Value, new Vector2((float) num54, (float) (num55 + 118)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int focusRecipe = Main.focusRecipe; + int num56 = 0; + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + int num57 = (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) + { + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[23].Value, new Vector2((float) num54, (float) (num55 + 118 + num57)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + break; + } + ++num56; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.GetMapObjectName(MapHelper.TileToLookup(Main.recipe[Main.availableRecipe[focusRecipe]].requiredTile[index], 0)), new Vector2((float) num54, (float) (num55 + 118 + num57)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needWater) + { + int num58 = (num56 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[53].Value, new Vector2((float) num54, (float) (num55 + 118 + num58)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needHoney) + { + int num59 = (num56 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[58].Value, new Vector2((float) num54, (float) (num55 + 118 + num59)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needLava) + { + int num60 = (num56 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[56].Value, new Vector2((float) num54, (float) (num55 + 118 + num60)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needSnowBiome) + { + int num61 = (num56 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[123].Value, new Vector2((float) num54, (float) (num55 + 118 + num61)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + str = Lang.inter[24].Value; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2((float) (num54 + 50), (float) (num55 + 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); + Microsoft.Xna.Framework.Color color11 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num54 && (double) Main.mouseX <= (double) num54 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num55 && (double) Main.mouseY <= (double) num55 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.craftingHide = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(ref Main.guideItem, 7); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(ref Main.guideItem, 7); + ItemSlot.MouseHover(ref Main.guideItem, 7); + } + ItemSlot.Draw(Main.spriteBatch, ref Main.guideItem, 7, new Vector2((float) num54, (float) num55)); + } + } + if (!Main.InReforgeMenu) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + if (Main.numAvailableRecipes > 0) + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[25].Value, new Vector2(76f, (float) (414 + num41)), color10, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int index = 0; index < Recipe.maxRecipes; ++index) + { + Main.inventoryScale = (float) (100.0 / ((double) Math.Abs(Main.availableRecipeY[index]) + 100.0)); + if ((double) Main.inventoryScale < 0.75) + Main.inventoryScale = 0.75f; + if (Main.recFastScroll) + Main.inventoryScale = 0.75f; + if ((double) Main.availableRecipeY[index] < (double) ((index - Main.focusRecipe) * 65)) + { + if ((double) Main.availableRecipeY[index] == 0.0 && !Main.recFastScroll) + Main.PlaySound(12); + Main.availableRecipeY[index] += 6.5f; + if (Main.recFastScroll) + Main.availableRecipeY[index] += 130000f; + if ((double) Main.availableRecipeY[index] > (double) ((index - Main.focusRecipe) * 65)) + Main.availableRecipeY[index] = (float) ((index - Main.focusRecipe) * 65); + } + else if ((double) Main.availableRecipeY[index] > (double) ((index - Main.focusRecipe) * 65)) + { + if ((double) Main.availableRecipeY[index] == 0.0 && !Main.recFastScroll) + Main.PlaySound(12); + Main.availableRecipeY[index] -= 6.5f; + if (Main.recFastScroll) + Main.availableRecipeY[index] -= 130000f; + if ((double) Main.availableRecipeY[index] < (double) ((index - Main.focusRecipe) * 65)) + Main.availableRecipeY[index] = (float) ((index - Main.focusRecipe) * 65); + } + else + Main.recFastScroll = false; + if (index < Main.numAvailableRecipes && (double) Math.Abs(Main.availableRecipeY[index]) <= (double) num42) + { + int num62 = (int) (46.0 - 26.0 * (double) Main.inventoryScale); + int num63 = (int) (410.0 + (double) Main.availableRecipeY[index] * (double) Main.inventoryScale - 30.0 * (double) Main.inventoryScale + (double) num41); + double num64 = (double) ((int) Main.inventoryBack.A + 50); + double num65 = (double) byte.MaxValue; + if ((double) Math.Abs(Main.availableRecipeY[index]) > (double) num42 - 100.0) + { + num64 = 150.0 * (100.0 - ((double) Math.Abs(Main.availableRecipeY[index]) - ((double) num42 - 100.0))) * 0.01; + num65 = (double) byte.MaxValue * (100.0 - ((double) Math.Abs(Main.availableRecipeY[index]) - ((double) num42 - 100.0))) * 0.01; + } + Microsoft.Xna.Framework.Color color12 = new Microsoft.Xna.Framework.Color((int) (byte) num64, (int) (byte) num64, (int) (byte) num64, (int) (byte) num64); + Microsoft.Xna.Framework.Color lightColor = new Microsoft.Xna.Framework.Color((int) (byte) num65, (int) (byte) num65, (int) (byte) num65, (int) (byte) num65); + if (Main.mouseX >= num62 && (double) Main.mouseX <= (double) num62 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num63 && (double) Main.mouseY <= (double) num63 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.focusRecipe == index && Main.guideItem.type == 0 && Main.LocalPlayer.itemTime == 0 && Main.LocalPlayer.itemAnimation == 0) + { + if ((Main.mouseItem.type == 0 || Main.mouseItem.IsTheSameAs(Main.recipe[Main.availableRecipe[index]].createItem) && Main.mouseItem.stack + Main.recipe[Main.availableRecipe[index]].createItem.stack <= Main.mouseItem.maxStack) && !Main.player[Main.myPlayer].IsStackingItems()) + { + if (Main.mouseLeftRelease && Main.mouseLeft) + Main.CraftItem(Main.recipe[Main.availableRecipe[index]]); + else if (Main.stackSplit <= 1 && Main.mouseRight && (Main.mouseItem.stack < Main.mouseItem.maxStack || Main.mouseItem.type == 0)) + { + Main.stackSplit = Main.stackSplit != 0 ? Main.stackDelay : 15; + Main.CraftItem(Main.recipe[Main.availableRecipe[index]]); + } + } + } + else if (Main.mouseLeftRelease && Main.mouseLeft) + Main.focusRecipe = index; + Main.craftingHide = true; + Main.hoverItemName = Main.recipe[Main.availableRecipe[index]].createItem.Name; + Main.HoverItem = Main.recipe[Main.availableRecipe[index]].createItem.Clone(); + if (Main.recipe[Main.availableRecipe[index]].createItem.stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) Main.recipe[Main.availableRecipe[index]].createItem.stack + ")"; + } + if (Main.numAvailableRecipes > 0) + { + double num66 = num64 - 50.0; + if (num66 < 0.0) + num66 = 0.0; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = index != Main.focusRecipe ? -1 : 0; + Microsoft.Xna.Framework.Color inventoryBack2 = Main.inventoryBack; + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) num66, (int) (byte) num66, (int) (byte) num66, (int) (byte) num66); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[index]].createItem, 22, new Vector2((float) num62, (float) num63), lightColor); + Main.inventoryBack = inventoryBack2; + } + } + } + if (Main.numAvailableRecipes > 0) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].type == 0) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentIngridientsCount = index + 1; + break; + } + int num67 = 80 + index * 40; + int num68 = 380 + num41; + double num69 = (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 num70 = (double) ((int) Main.inventoryBack.A + 50) - (double) Math.Abs(Main.availableRecipeY[Main.focusRecipe]) * 2.0; + double num71 = (double) byte.MaxValue - (double) Math.Abs(Main.availableRecipeY[Main.focusRecipe]) * 2.0; + if (num70 < 0.0) + num70 = 0.0; + if (num71 < 0.0) + num71 = 0.0; + white1.R = (byte) num70; + white1.G = (byte) num70; + white1.B = (byte) num70; + white1.A = (byte) num70; + white2.R = (byte) num71; + white2.G = (byte) num71; + white2.B = (byte) num71; + white2.A = (byte) num71; + Main.inventoryScale = 0.6f; + if (num70 != 0.0) + { + if (Main.mouseX >= num67 && (double) Main.mouseX <= (double) num67 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num68 && (double) Main.mouseY <= (double) num68 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.craftingHide = true; + Main.player[Main.myPlayer].mouseInterface = true; + Main.hoverItemName = Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].Name; + Main.HoverItem = Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].Clone(); + string theText; + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].ProcessGroupsForText(Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].type, out theText)) + Main.HoverItem.SetNameOverride(theText); + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anyIronBar && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].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[index].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[index].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[index].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[index].type == 542) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.misc[38].Value); + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index].stack + ")"; + } + double num72 = num70 - 50.0; + if (num72 < 0.0) + num72 = 0.0; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = 1 + index; + Microsoft.Xna.Framework.Color inventoryBack3 = Main.inventoryBack; + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) num72, (int) (byte) num72, (int) (byte) num72, (int) (byte) num72); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[index], 22, new Vector2((float) num67, (float) num68)); + Main.inventoryBack = inventoryBack3; + } + else + break; + } + } + if (Main.numAvailableRecipes == 0) + { + Main.recBigList = false; + } + else + { + int num73 = 94; + int num74 = 450 + num41; + if (Main.InGuideCraftMenu) + num74 -= 150; + bool flag5 = Main.mouseX > num73 - 15 && Main.mouseX < num73 + 15 && Main.mouseY > num74 - 15 && Main.mouseY < num74 + 15 && !PlayerInput.IgnoreMouseInterface; + int index = Main.recBigList.ToInt() * 2 + flag5.ToInt(); + Main.spriteBatch.Draw(Main.craftToggleTexture[index], new Vector2((float) num73, (float) num74), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, Main.craftToggleTexture[index].Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (flag5) + { + this.MouseText(Language.GetTextValue("GameUI.CraftingWindow")); + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (!Main.recBigList) + { + Main.recBigList = true; + Main.PlaySound(12); + } + else + { + Main.recBigList = false; + Main.PlaySound(12); + } + } + } + } + } + if (Main.recBigList) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + int num75 = 42; + if ((double) Main.inventoryScale < 0.75) + Main.inventoryScale = 0.75f; + int num76 = 340; + int num77 = 310; + int num78 = (Main.screenWidth - num77 - 280) / num75; + int num79 = (Main.screenHeight - num76 - 20) / num75; + UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow = num78; + UILinkPointNavigator.Shortcuts.CRAFT_IconsPerColumn = num79; + int num80 = 0; + int num81 = 0; + int num82 = num77; + int num83 = num76; + int num84 = num77 - 20; + int num85 = num76 + 2; + if (Main.recStart > Main.numAvailableRecipes - num78 * num79) + { + Main.recStart = Main.numAvailableRecipes - num78 * num79; + if (Main.recStart < 0) + Main.recStart = 0; + } + if (Main.recStart > 0) + { + if (Main.mouseX >= num84 && Main.mouseX <= num84 + Main.craftUpButtonTexture.Width && Main.mouseY >= num85 && Main.mouseY <= num85 + Main.craftUpButtonTexture.Height && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.recStart -= num78; + if (Main.recStart < 0) + Main.recStart = 0; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + } + } + Main.spriteBatch.Draw(Main.craftUpButtonTexture, new Vector2((float) num84, (float) num85), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.craftUpButtonTexture.Width, Main.craftUpButtonTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recStart < Main.numAvailableRecipes - num78 * num79) + { + int num86 = num85 + 20; + if (Main.mouseX >= num84 && Main.mouseX <= num84 + Main.craftUpButtonTexture.Width && Main.mouseY >= num86 && Main.mouseY <= num86 + Main.craftUpButtonTexture.Height && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.recStart += num78; + Main.PlaySound(12); + if (Main.recStart > Main.numAvailableRecipes - num78) + Main.recStart = Main.numAvailableRecipes - num78; + Main.mouseLeftRelease = false; + } + } + Main.spriteBatch.Draw(Main.craftDownButtonTexture, new Vector2((float) num84, (float) num86), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.craftUpButtonTexture.Width, Main.craftUpButtonTexture.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 num87 = num82; + int num88 = num83; + double num89 = (double) ((int) Main.inventoryBack.A + 50); + double maxValue = (double) byte.MaxValue; + Microsoft.Xna.Framework.Color color13 = new Microsoft.Xna.Framework.Color((int) (byte) num89, (int) (byte) num89, (int) (byte) num89, (int) (byte) num89); + Microsoft.Xna.Framework.Color color14 = new Microsoft.Xna.Framework.Color((int) (byte) maxValue, (int) (byte) maxValue, (int) (byte) maxValue, (int) (byte) maxValue); + if (Main.mouseX >= num87 && (double) Main.mouseX <= (double) num87 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num88 && (double) Main.mouseY <= (double) num88 + (double) Main.inventoryBackTexture.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + if (PlayerInput.UsingGamepadUI) + UILinkPointNavigator.ChangePage(9); + } + 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 num90 = num89 - 50.0; + if (num90 < 0.0) + num90 = 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) num90, (int) (byte) num90, (int) (byte) num90, (int) (byte) num90); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[recStart]].createItem, 22, new Vector2((float) num87, (float) num88)); + Main.inventoryBack = inventoryBack4; + } + num82 += num75; + ++num80; + if (num80 >= num78) + { + num82 = num77; + num83 += num75; + num80 = 0; + ++num81; + if (num81 >= num79) + break; + } + } + } + Vector2 vector2_3 = Main.fontMouseText.MeasureString("Coins"); + Vector2 vector2_4 = Main.fontMouseText.MeasureString(Lang.inter[26].Value); + float num91 = vector2_3.X / vector2_4.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[26].Value, new Vector2(496f, (float) (84.0 + ((double) vector2_3.Y - (double) vector2_3.Y * (double) num91) / 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 * num91, SpriteEffects.None, 0.0f); + Main.inventoryScale = 0.6f; + for (int index = 0; index < 4; ++index) + { + int num92 = 497; + int num93 = (int) (85.0 + (double) (index * 56) * (double) Main.inventoryScale + 20.0); + int slot = index + 50; + Microsoft.Xna.Framework.Color color15 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num92 && (double) Main.mouseX <= (double) num92 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num93 && (double) Main.mouseY <= (double) num93 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].inventory, 1, slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, 1, slot); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, 1, slot); + ItemSlot.MouseHover(Main.player[Main.myPlayer].inventory, 1, slot); + } + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 1, slot, new Vector2((float) num92, (float) num93)); + } + Vector2 vector2_5 = Main.fontMouseText.MeasureString("Ammo"); + Vector2 vector2_6 = Main.fontMouseText.MeasureString(Lang.inter[27].Value); + float num94 = vector2_5.X / vector2_6.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[27].Value, new Vector2(532f, (float) (84.0 + ((double) vector2_5.Y - (double) vector2_5.Y * (double) num94) / 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 * num94, SpriteEffects.None, 0.0f); + Main.inventoryScale = 0.6f; + for (int index = 0; index < 4; ++index) + { + int num95 = 534; + int num96 = (int) (85.0 + (double) (index * 56) * (double) Main.inventoryScale + 20.0); + int slot = 54 + index; + Microsoft.Xna.Framework.Color color16 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num95 && (double) Main.mouseX <= (double) num95 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num96 && (double) Main.mouseY <= (double) num96 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].inventory, 2, slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, 2, slot); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, 2, slot); + ItemSlot.MouseHover(Main.player[Main.myPlayer].inventory, 2, slot); + } + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 2, slot, new Vector2((float) num95, (float) num96)); + } + if (Main.npcShop > 0 && (!Main.playerInventory || Main.player[Main.myPlayer].talkNPC == -1)) + Main.npcShop = 0; + if (Main.npcShop > 0 && !Main.recBigList) + { + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, 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 index9 = 0; index9 < 10; ++index9) + { + for (int index10 = 0; index10 < 4; ++index10) + { + int num97 = (int) (73.0 + (double) (index9 * 56) * (double) Main.inventoryScale); + int num98 = (int) ((double) this.invBottom + (double) (index10 * 56) * (double) Main.inventoryScale); + int slot = index9 + index10 * 10; + Microsoft.Xna.Framework.Color color17 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num97 && (double) Main.mouseX <= (double) num97 + (double) Main.inventoryBackTexture.Width * (double) Main.inventoryScale && Main.mouseY >= num98 && (double) Main.mouseY <= (double) num98 + (double) Main.inventoryBackTexture.Height * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + ItemSlot.LeftClick(this.shop[Main.npcShop].item, 15, slot); + else + 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) num97, (float) num98)); + } + } + } + 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 num99 = 0; + if (!PlayerInput.UsingGamepad) + num99 = 9999; + UIVirtualKeyboard.OffsetDown = num99; + ChestUI.Draw(Main.spriteBatch); + if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0) + { + int index = 0; + int num100 = 498; + int num101 = 244; + int width = Main.chestStackTexture[index].Width; + int height = Main.chestStackTexture[index].Height; + UILinkPointNavigator.SetPosition(301, new Vector2((float) num100 + (float) width * 0.75f, (float) num101 + (float) height * 0.75f)); + if (Main.mouseX >= num100 && Main.mouseX <= num100 + width && Main.mouseY >= num101 && Main.mouseY <= num101 + height && !PlayerInput.IgnoreMouseInterface) + { + index = 1; + if (!Main.allChestStackHover) + { + Main.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) + { + Main.PlaySound(12); + Main.allChestStackHover = false; + } + Main.spriteBatch.Draw(Main.chestStackTexture[index], new Vector2((float) num100, (float) num101), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chestStackTexture[index].Width, Main.chestStackTexture[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 num102 = 0; + int num103 = 534; + int num104 = 244; + int num105 = 30; + int num106 = 30; + UILinkPointNavigator.SetPosition(302, new Vector2((float) num103 + (float) num105 * 0.75f, (float) num104 + (float) num106 * 0.75f)); + bool flag6 = false; + if (Main.mouseX >= num103 && Main.mouseX <= num103 + num105 && Main.mouseY >= num104 && Main.mouseY <= num104 + num106 && !PlayerInput.IgnoreMouseInterface) + { + num102 = 1; + flag6 = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + ItemSorting.SortInventory(); + Recipe.FindRecipes(); + } + } + if (flag6 != Main.inventorySortMouseOver) + { + Main.PlaySound(12); + Main.inventorySortMouseOver = flag6; + } + Texture2D texture1 = Main.inventorySortTexture[Main.inventorySortMouseOver ? 1 : 0]; + Main.spriteBatch.Draw(texture1, new Vector2((float) num103, (float) num104), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.mouseText || num102 != 1) + return; + this.MouseText(Language.GetTextValue("GameUI.SortInventory")); + } + + 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); + ItemText.NewText(Main.mouseItem, r.createItem.stack); + r.Create(); + if (Main.mouseItem.type <= 0 && r.createItem.type <= 0) + return; + Main.PlaySound(7); + } + + private static void DrawPVPIcons() + { + 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 && Main.mouseX < num2 + 34 && Main.mouseY > num3 - 2 && Main.mouseY < num3 + 34 && !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; + Main.PlaySound(12); + Main.player[Main.myPlayer].hostile = !Main.player[Main.myPlayer].hostile; + NetMessage.SendData(30, number: Main.myPlayer); + } + } + Microsoft.Xna.Framework.Rectangle r1 = Main.PVPTexture[0].Frame(4, 6); + r1.Location = new Microsoft.Xna.Framework.Point(r1.Width * num4, r1.Height * Main.player[Main.myPlayer].team); + r1.Width -= 2; + Main.spriteBatch.Draw(Main.PVPTexture[0], 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 = Main.PVPTexture[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; + Main.PlaySound(12); + Main.player[Main.myPlayer].team = index; + NetMessage.SendData(45, number: Main.myPlayer); + } + } + } + r2.Width = rectangle1.Width - 2; + if (flag) + Main.spriteBatch.Draw(Main.PVPTexture[2], r2.Location.ToVector2() + new Vector2(-2f), Microsoft.Xna.Framework.Color.White); + Microsoft.Xna.Framework.Rectangle rectangle2 = rectangle1; + rectangle2.Width -= 2; + Main.spriteBatch.Draw(Main.PVPTexture[1], 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 num = -1; + Vector2 vector2 = new Vector2((float) (Main.screenWidth - 162), (float) (142 + Main.mH)); + vector2.X += 82f; + Texture2D texture2D1 = Main.EquipPageTexture[Main.EquipPage == 2 ? 3 : 2]; + 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(Main.EquipPageTexture[6], 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 = Main.EquipPageTexture[Main.EquipPage == 1 ? 5 : 4]; + 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(Main.EquipPageTexture[7], 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 = Main.EquipPageTexture[Main.EquipPage == 3 ? 10 : 8]; + 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(Main.EquipPageTexture[9], 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) + Main.PlaySound(12); + } + } + ItemSlot.EquipPage(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) + { + this.GUIBarsMouseOverLife(); + this.GUIBarsMouseOverMana(); + } + IngameOptions.MouseOver(); + IngameFancyUI.MouseOver(); + if (!Main.mouseText) + { + for (int index = 0; index < 400; ++index) + { + if (Main.item[index].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.item[index].position.X + (double) Main.item[index].width * 0.5 - (double) Main.itemTexture[Main.item[index].type].Width * 0.5), (int) ((double) Main.item[index].position.Y + (double) Main.item[index].height - (double) Main.itemTexture[Main.item[index].type].Height), Main.itemTexture[Main.item[index].type].Width, Main.itemTexture[Main.item[index].type].Height); + if (rectangle1.Intersects(rectangle2)) + { + Main.player[Main.myPlayer].showItemIcon = false; + string text = Main.item[index].AffixName(); + if (Main.item[index].stack > 1) + text = text + " (" + (object) Main.item[index].stack + ")"; + if (Main.item[index].owner < (int) byte.MaxValue && Main.showItemOwner) + text = text + " <" + Main.player[Main.item[index].owner].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) + { + 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].showItemIcon = 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 index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active) + { + this.LoadNPC(Main.npc[index1].type); + Microsoft.Xna.Framework.Rectangle rectangle4 = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index1].Bottom.X - Main.npc[index1].frame.Width / 2, (int) Main.npc[index1].Bottom.Y - Main.npc[index1].frame.Height, Main.npc[index1].frame.Width, Main.npc[index1].frame.Height); + if (Main.npc[index1].type >= 87 && Main.npc[index1].type <= 92) + rectangle4 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.npc[index1].position.X + (double) Main.npc[index1].width * 0.5 - 32.0), (int) ((double) Main.npc[index1].position.Y + (double) Main.npc[index1].height * 0.5 - 32.0), 64, 64); + bool flag1 = rectangle1.Intersects(rectangle4); + bool flag2 = flag1 || Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == index1; + if (flag2 && (Main.npc[index1].type != 85 && Main.npc[index1].type != 341 && Main.npc[index1].aiStyle != 87 || (double) Main.npc[index1].ai[0] != 0.0) && Main.npc[index1].type != 488) + { + bool flag3 = Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == index1; + if ((Main.npc[index1].townNPC || Main.npc[index1].type == 105 || Main.npc[index1].type == 106 || Main.npc[index1].type == 123 || Main.npc[index1].type == 354 || Main.npc[index1].type == 376 || Main.npc[index1].type == 579 || Main.npc[index1].type == 453) && 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[index1].position.X, (int) Main.npc[index1].position.Y, Main.npc[index1].width, Main.npc[index1].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 = index1; + if (Main.mouseRight && Main.npcChatRelease) + { + Main.npcChatRelease = false; + if (PlayerInput.UsingGamepad) + Main.player[Main.myPlayer].releaseInventory = false; + if (Main.player[Main.myPlayer].talkNPC != index1) + { + Main.CancelHairWindow(); + Main.npcShop = 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].talkNPC = index1; + Main.playerInventory = false; + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + Main.npcChatText = Main.npc[index1].GetChat(); + Main.PlaySound(24); + } + } + } + if (flag1) + { + Main.player[Main.myPlayer].showItemIcon = false; + string text = Main.npc[index1].GivenOrTypeName; + int index2 = index1; + if (Main.npc[index1].realLife >= 0) + index2 = Main.npc[index1].realLife; + if (Main.npc[index2].lifeMax > 1 && !Main.npc[index2].dontTakeDamage) + text = text + ": " + (object) Main.npc[index2].life + "/" + (object) Main.npc[index2].lifeMax; + this.MouseTextHackZoom(text); + Main.mouseText = true; + break; + } + if (flag2) + break; + } + } + } + } + if (!Main.mouseText && Main.signHover != -1 && Main.sign[Main.signHover] != null && !Main.player[Main.myPlayer].mouseInterface) + { + int lineAmount; + string[] strArray = Utils.WordwrapString(Main.sign[Main.signHover].text, Main.fontMouseText, 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 num = 0.0f; + for (int index = 0; index < lineAmount; ++index) + { + float x = Main.fontMouseText.MeasureString(strArray[index]).X; + if ((double) num < (double) x) + num = x; + } + if ((double) num > 460.0) + num = 460f; + Vector2 vector2 = new Vector2((float) mouseX, (float) mouseY) + new Vector2(16f); + if ((double) vector2.Y > (double) (screenHeight - 30 * lineAmount)) + vector2.Y = (float) (screenHeight - 30 * lineAmount); + if ((double) vector2.X > (double) screenWidth - (double) num) + vector2.X = (float) screenWidth - num; + for (int index = 0; index < lineAmount; ++index) + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, strArray[index], vector2.X, vector2.Y + (float) (index * 30), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 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) Main.chatTexture.Height - (float) (int) Main.screenPosition.Y; + 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) Main.chatTexture.Height; + } + Vector2 position = new Vector2(Main.npc[i].position.X + (float) (Main.npc[i].width / 2) - Main.screenPosition.X - (float) (Main.chatTexture.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(Main.chatTexture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chatTexture.Width, Main.chatTexture.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); + } + + private void GUIBarsMouseOverLife() + { + if (Main.mouseText) + return; + int num1 = 26 * Main.player[Main.myPlayer].statLifeMax2 / (int) Main.UIDisplay_LifePerHeart; + int num2 = 0; + if (Main.player[Main.myPlayer].statLifeMax2 > 200) + { + num1 = 260; + num2 += 26; + } + if (Main.mouseX <= 500 + Main.UI_ScreenAnchorX || Main.mouseX >= 500 + num1 + Main.UI_ScreenAnchorX || Main.mouseY <= 32 || Main.mouseY >= 32 + Main.heartTexture.Height + num2) + return; + Main.player[Main.myPlayer].showItemIcon = false; + this.MouseTextHackZoom(Main.player[Main.myPlayer].statLife.ToString() + "/" + (object) Main.player[Main.myPlayer].statLifeMax2); + Main.mouseText = true; + } + + private void GUIBarsMouseOverMana() + { + if (Main.mouseText) + return; + int num1 = 24; + int num2 = 28 * Main.player[Main.myPlayer].statManaMax2 / Main.UIDisplay_ManaPerStar; + if (Main.mouseX <= 762 + Main.UI_ScreenAnchorX || Main.mouseX >= 762 + num1 + Main.UI_ScreenAnchorX || Main.mouseY <= 30 || Main.mouseY >= 30 + num2) + return; + Main.player[Main.myPlayer].showItemIcon = false; + this.MouseTextHackZoom(Main.player[Main.myPlayer].statMana.ToString() + "/" + (object) Main.player[Main.myPlayer].statManaMax2); + Main.mouseText = true; + } + + public void GUIBarsDraw() + { + if (Main.ignoreErrors) + { + try + { + this.GUIBarsDrawInner(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.GUIBarsDrawInner(); + } + + protected void GUIBarsDrawInner() + { + Main.UI_ScreenAnchorX = Main.screenWidth - 800; + Main.DrawInterface_Resources_Life(); + Main.DrawInterface_Resources_Mana(); + 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.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + 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 static void DrawInterface_Resources_Life() + { + Main.UIDisplay_LifePerHeart = 20f; + if (Main.LocalPlayer.ghost) + return; + int num1 = Main.player[Main.myPlayer].statLifeMax / 20; + int num2 = (Main.player[Main.myPlayer].statLifeMax - 400) / 5; + if (num2 < 0) + num2 = 0; + if (num2 > 0) + { + num1 = Main.player[Main.myPlayer].statLifeMax / (20 + num2 / 4); + Main.UIDisplay_LifePerHeart = (float) Main.player[Main.myPlayer].statLifeMax / 20f; + } + int num3 = Main.player[Main.myPlayer].statLifeMax2 - Main.player[Main.myPlayer].statLifeMax; + Main.UIDisplay_LifePerHeart += (float) (num3 / num1); + int num4 = (int) ((double) Main.player[Main.myPlayer].statLifeMax2 / (double) Main.UIDisplay_LifePerHeart); + if (num4 >= 10) + num4 = 10; + string str = Lang.inter[0].Value + " " + (object) Main.player[Main.myPlayer].statLifeMax2 + "/" + (object) Main.player[Main.myPlayer].statLifeMax2; + Vector2 vector2 = Main.fontMouseText.MeasureString(str); + if (!Main.player[Main.myPlayer].ghost) + { + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[0].Value, new Vector2((float) (500 + 13 * num4) - vector2.X * 0.5f + (float) Main.UI_ScreenAnchorX, 6f), 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); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Main.player[Main.myPlayer].statLife.ToString() + "/" + (object) Main.player[Main.myPlayer].statLifeMax2, new Vector2((float) (500 + 13 * num4) + vector2.X * 0.5f + (float) Main.UI_ScreenAnchorX, 6f), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(Main.fontMouseText.MeasureString(Main.player[Main.myPlayer].statLife.ToString() + "/" + (object) Main.player[Main.myPlayer].statLifeMax2).X, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + for (int index = 1; index < (int) ((double) Main.player[Main.myPlayer].statLifeMax2 / (double) Main.UIDisplay_LifePerHeart) + 1; ++index) + { + float scale = 1f; + bool flag = false; + int num5; + if ((double) Main.player[Main.myPlayer].statLife >= (double) index * (double) Main.UIDisplay_LifePerHeart) + { + num5 = (int) byte.MaxValue; + if ((double) Main.player[Main.myPlayer].statLife == (double) index * (double) Main.UIDisplay_LifePerHeart) + flag = true; + } + else + { + float num6 = ((float) Main.player[Main.myPlayer].statLife - (float) (index - 1) * Main.UIDisplay_LifePerHeart) / Main.UIDisplay_LifePerHeart; + num5 = (int) (30.0 + 225.0 * (double) num6); + if (num5 < 30) + num5 = 30; + scale = (float) ((double) num6 / 4.0 + 0.75); + if ((double) scale < 0.75) + scale = 0.75f; + if ((double) num6 > 0.0) + flag = true; + } + if (flag) + scale += Main.cursorScale - 1f; + int num7 = 0; + int num8 = 0; + if (index > 10) + { + num7 -= 260; + num8 += 26; + } + int a = (int) ((double) num5 * 0.9); + if (!Main.player[Main.myPlayer].ghost) + { + if (num2 > 0) + { + --num2; + Main.spriteBatch.Draw(Main.heart2Texture, new Vector2((float) (500 + 26 * (index - 1) + num7 + Main.UI_ScreenAnchorX + Main.heartTexture.Width / 2), (float) (32.0 + ((double) Main.heartTexture.Height - (double) Main.heartTexture.Height * (double) scale) / 2.0) + (float) num8 + (float) (Main.heartTexture.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.heartTexture.Width, Main.heartTexture.Height)), new Microsoft.Xna.Framework.Color(num5, num5, num5, a), 0.0f, new Vector2((float) (Main.heartTexture.Width / 2), (float) (Main.heartTexture.Height / 2)), scale, SpriteEffects.None, 0.0f); + } + else + Main.spriteBatch.Draw(Main.heartTexture, new Vector2((float) (500 + 26 * (index - 1) + num7 + Main.UI_ScreenAnchorX + Main.heartTexture.Width / 2), (float) (32.0 + ((double) Main.heartTexture.Height - (double) Main.heartTexture.Height * (double) scale) / 2.0) + (float) num8 + (float) (Main.heartTexture.Height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.heartTexture.Width, Main.heartTexture.Height)), new Microsoft.Xna.Framework.Color(num5, num5, num5, a), 0.0f, new Vector2((float) (Main.heartTexture.Width / 2), (float) (Main.heartTexture.Height / 2)), scale, SpriteEffects.None, 0.0f); + } + } + } + + private static void DrawInterface_Resources_Mana() + { + Main.UIDisplay_ManaPerStar = 20; + if (Main.LocalPlayer.ghost || Main.player[Main.myPlayer].statManaMax2 <= 0) + return; + int num1 = Main.player[Main.myPlayer].statManaMax2 / 20; + Vector2 vector2 = Main.fontMouseText.MeasureString(Lang.inter[2].Value); + int num2 = 50; + if ((double) vector2.X >= 45.0) + num2 = (int) vector2.X + 5; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Lang.inter[2].Value, new Vector2((float) (800 - num2 + Main.UI_ScreenAnchorX), 6f), 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); + for (int index = 1; index < Main.player[Main.myPlayer].statManaMax2 / Main.UIDisplay_ManaPerStar + 1; ++index) + { + bool flag = false; + float scale = 1f; + int num3; + if (Main.player[Main.myPlayer].statMana >= index * Main.UIDisplay_ManaPerStar) + { + num3 = (int) byte.MaxValue; + if (Main.player[Main.myPlayer].statMana == index * Main.UIDisplay_ManaPerStar) + flag = true; + } + else + { + float num4 = (float) (Main.player[Main.myPlayer].statMana - (index - 1) * Main.UIDisplay_ManaPerStar) / (float) Main.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); + Main.spriteBatch.Draw(Main.manaTexture, new Vector2((float) (775 + Main.UI_ScreenAnchorX), (float) (30 + Main.manaTexture.Height / 2) + (float) (((double) Main.manaTexture.Height - (double) Main.manaTexture.Height * (double) scale) / 2.0) + (float) (28 * (index - 1))), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.manaTexture.Width, Main.manaTexture.Height)), new Microsoft.Xna.Framework.Color(num3, num3, num3, a), 0.0f, new Vector2((float) (Main.manaTexture.Width / 2), (float) (Main.manaTexture.Height / 2)), scale, SpriteEffects.None, 0.0f); + } + } + + private void DrawInterface_Resources_Buffs() + { + Main.recBigList = false; + int drawBuffText = -1; + int num1 = 11; + for (int i = 0; i < 22; ++i) + { + if (Main.player[Main.myPlayer].buffType[i] > 0) + { + int b = Main.player[Main.myPlayer].buffType[i]; + int x = 32 + i * 38; + int y = 76; + if (i >= num1) + { + x = 32 + (i - num1) * 38; + y += 50; + } + drawBuffText = Main.DrawBuffIcon(drawBuffText, i, b, x, y); + } + else + Main.buffAlpha[i] = 0.4f; + } + if (drawBuffText < 0) + return; + int id = Main.player[Main.myPlayer].buffType[drawBuffText]; + if (id <= 0) + return; + Main.buffString = Lang.GetBuffDescription(id); + if (id == 26 && Main.expertMode) + Main.buffString = Language.GetTextValue("BuffDescription.WellFed_Expert"); + if (id == 147) + Main.bannerMouseOver = true; + if (id == 94) + { + int num2 = (int) ((double) Main.player[Main.myPlayer].manaSickReduction * 100.0) + 1; + Main.buffString = Main.buffString + (object) num2 + "%"; + } + if (Main.meleeBuff[id]) + this.MouseTextHackZoom(Lang.GetBuffName(id), -10); + else + this.MouseTextHackZoom(Lang.GetBuffName(id)); + } + + private static int DrawBuffIcon(int drawBuffText, int i, int b, int x, int y) + { + if (b == 0) + return drawBuffText; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(Main.buffAlpha[i], Main.buffAlpha[i], Main.buffAlpha[i], Main.buffAlpha[i]); + Main.spriteBatch.Draw(Main.buffTexture[b], new Vector2((float) x, (float) y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.buffTexture[b].Width, Main.buffTexture[b].Height)), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (!Main.vanityPet[b] && !Main.lightPet[b] && !Main.buffNoTimeDisplay[b] && (!Main.player[Main.myPlayer].honeyWet || b != 48) && (!Main.player[Main.myPlayer].wet || !Main.expertMode || b != 46) && Main.player[Main.myPlayer].buffTime[i] > 2) + { + string str = Lang.LocalizedDuration(new TimeSpan(0, 0, Main.player[Main.myPlayer].buffTime[i] / 60), true, false); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontItemStack, str, new Vector2((float) x, (float) (y + Main.buffTexture[b].Height)), color, 0.0f, new Vector2(), 0.8f, SpriteEffects.None, 0.0f); + } + if (Main.mouseX < x + Main.buffTexture[b].Width && Main.mouseY < y + Main.buffTexture[b].Height && Main.mouseX > x && Main.mouseY > y) + { + drawBuffText = i; + Main.buffAlpha[i] += 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(i, b); + } + else + Main.buffAlpha[i] -= 0.05f; + if ((double) Main.buffAlpha[i] > 1.0) + Main.buffAlpha[i] = 1f; + else if ((double) Main.buffAlpha[i] < 0.4) + Main.buffAlpha[i] = 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; + } + if (Main.player[Main.myPlayer].miscEquips[0].buffType == b && !Main.player[Main.myPlayer].hideMisc[0]) + Main.player[Main.myPlayer].hideMisc[0] = true; + if (Main.player[Main.myPlayer].miscEquips[1].buffType == b && !Main.player[Main.myPlayer].hideMisc[1]) + Main.player[Main.myPlayer].hideMisc[1] = true; + Main.PlaySound(12); + if (flag) + return; + Main.player[Main.myPlayer].DelBuff(i); + } + + 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(Main.bubbleTexture, vector2_3 + new Vector2((float) (26 * (index - 1) + num5) - 125f, (float) (32.0 + ((double) Main.bubbleTexture.Height - (double) Main.bubbleTexture.Height * (double) scale) / 2.0) + (float) num6), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.bubbleTexture.Width, Main.bubbleTexture.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(Main.flameTexture, vector2_3 + new Vector2((float) (26 * (index - 1) + num11) - 125f, (float) (32.0 + ((double) Main.flameTexture.Height - (double) Main.flameTexture.Height * (double) scale) / 2.0) + (float) num12), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.bubbleTexture.Width, Main.bubbleTexture.Height)), new Microsoft.Xna.Framework.Color(num9, num9, num9, num9), 0.0f, new Vector2(), scale, 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 = Main.fontMouseText.MeasureString(str) / 2f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, 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) Main.inventoryBackTexture.Width * (double) Main.hotbarScale[slot] && Main.mouseY >= num3 && (double) Main.mouseY <= (double) num3 + (double) Main.inventoryBackTexture.Height * (double) Main.hotbarScale[slot] && !Main.player[Main.myPlayer].channel) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.player[Main.myPlayer].showItemIcon = 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) Main.inventoryBackTexture.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; + Main.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].talkNPC = -1; + Main.PlaySound(11); + } + + public static void BuyHairWindow() + { + Main.PlaySound(18); + Main.hairWindow = false; + Main.player[Main.myPlayer].talkNPC = -1; + Main.npcChatCornerItem = 0; + NetMessage.SendData(4, number: Main.myPlayer); + } + + public static int UnlockedMaxHair() + { + int num = 123; + 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 + { + int num1 = Main.UnlockedMaxHair(); + int y1 = Main.screenHeight / 2 + 60; + int x1 = Main.screenWidth / 2 - Main.hairStyleBackTexture.Width / 2; + int num2 = y1 + 42; + int num3 = x1 + 22; + int num4 = x1 + 234; + int num5 = y1 + 18; + Main.selColor = Main.player[Main.myPlayer].hairColor; + Main.spriteBatch.Draw(Main.hairStyleBackTexture, new Vector2((float) x1, (float) y1), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.hairStyleBackTexture.Width, Main.hairStyleBackTexture.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, Main.hairStyleBackTexture.Width, Main.hairStyleBackTexture.Height).Contains(Main.MouseScreen.ToPoint())) + { + int num6 = -(PlayerInput.ScrollWheelDelta / 120); + int num7 = Math.Sign(num6); + for (; num6 != 0; num6 -= num7) + { + if (num6 < 0) + { + Main.hairStart -= 5; + Main.PlaySound(12); + } + else + { + Main.hairStart += 5; + Main.PlaySound(12); + } + } + } + if (Main.mouseX > x1 && Main.mouseX < x1 + Main.hairStyleBackTexture.Width && Main.mouseY > y1 && Main.mouseY < y1 + Main.hairStyleBackTexture.Height) + Main.player[Main.myPlayer].mouseInterface = true; + int num8 = num4 - 18; + int num9 = num5 + 74; + if (Main.hairStart > 1) + { + if (Main.mouseX >= num8 && Main.mouseX <= num8 + Main.craftUpButtonTexture.Width && Main.mouseY >= num9 && Main.mouseY <= num9 + Main.craftUpButtonTexture.Height) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.hairStart -= 15; + Main.PlaySound(12); + } + } + Main.spriteBatch.Draw(Main.scrollLeftButtonTexture, new Vector2((float) num8, (float) num9), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.craftUpButtonTexture.Width, Main.craftUpButtonTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.hairStart + 15 < num1) + { + int num10 = num8 + 296; + if (Main.mouseX >= num10 && Main.mouseX <= num10 + Main.craftUpButtonTexture.Width && Main.mouseY >= num9 && Main.mouseY <= num9 + Main.craftUpButtonTexture.Height) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.hairStart += 15; + Main.PlaySound(12); + } + } + Main.spriteBatch.Draw(Main.scrollRightButtonTexture, new Vector2((float) num10, (float) num9), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.craftUpButtonTexture.Width, Main.craftUpButtonTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.hairStart + 15 >= num1) + Main.hairStart = num1 - 15; + if (Main.hairStart < 0) + Main.hairStart = 0; + int num11 = 0; + if (Main.oldHairStyle != Main.player[Main.myPlayer].hair) + { + if (Main.player[Main.myPlayer].hair > 51) + num11 += 50000; + else + num11 += 10000; + } + if (Main.oldHairColor != Main.player[Main.myPlayer].hairColor) + num11 += 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; + 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) Main.fontMouseText.MeasureString(str2).X && Main.mouseY > num20 && (double) Main.mouseY < (double) num20 + (double) Main.fontMouseText.MeasureString(str2).Y) + { + num18 = 1.1f; + if (!Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = false; + } + Vector2 vector2_1 = Main.fontMouseText.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 (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, Main.fontMouseText, 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; + if (Main.mouseX > num24 && (double) Main.mouseX < (double) num24 + (double) Main.fontMouseText.MeasureString(textValue2).X && Main.mouseY > num20 && (double) Main.mouseY < (double) num20 + (double) Main.fontMouseText.MeasureString(textValue2).Y) + { + num23 = 1.1f; + if (!Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = false; + } + Vector2 vector2_2 = Main.fontMouseText.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 (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, Main.fontMouseText, 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) num3, (float) num2) + this.hueTexture.Size() / 2f); + Main.spriteBatch.Draw(this.hueTexture, new Vector2((float) num3, (float) num2), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num2 - 4 && Main.mouseY < num2 + this.hueTexture.Height + 4 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num3, (float) num2), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num3 + (float) (this.hueTexture.Width - 2) * Main.hBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num2 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num2 - 4 && Main.mouseY < num2 + this.hueTexture.Height + 4 || this.grabColorSlider == 1) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num3) / (float) this.hueTexture.Width; + if ((double) Hue < 0.0) + Hue = 0.0f; + if ((double) Hue > 1.0) + Hue = 1f; + Main.hBar = Hue; + } + int num29 = num2 + 26; + UILinkPointNavigator.SetPosition(2601, new Vector2((float) num3, (float) num29) + Main.colorBarTexture.Size() / 2f); + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num3, (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(Main.colorBlipTexture, new Vector2((float) (num3 + index + 5), (float) (num29 + 4)), rgb); + } + if (Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num29 - 4 && Main.mouseY < num29 + this.hueTexture.Height + 4 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num3, (float) num29), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num3 + (float) (this.hueTexture.Width - 2) * Main.sBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num29 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num29 - 4 && Main.mouseY < num29 + this.hueTexture.Height + 4 || this.grabColorSlider == 2) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num3) / (float) this.hueTexture.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) num3, (float) num30) + Main.colorBarTexture.Size() / 2f); + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num3, (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(Main.colorBlipTexture, new Vector2((float) (num3 + index + 5), (float) (num30 + 4)), rgb); + } + if (Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num30 - 4 && Main.mouseY < num30 + this.hueTexture.Height + 4 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num3, (float) num30), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num3 + (float) (this.hueTexture.Width - 2) * (float) (((double) Main.lBar - (double) num31) / (1.0 - (double) num31)) - (float) (Main.colorSliderTexture.Width / 2), (float) (num30 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num3 - 4 && Main.mouseX < num3 + this.hueTexture.Width + 4 && Main.mouseY > num30 - 4 && Main.mouseY < num30 + this.hueTexture.Height + 4 || this.grabColorSlider == 3) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num32 = (float) (Main.mouseX - num3) / (float) this.hueTexture.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 num33 = num4; + int num34 = num5; + int hairStart = Main.hairStart; + int index1 = 0; + int num35 = 0; + for (int index2 = 0; index2 < 15; ++index2) + { + int i = Main.hairStart + index2; + UILinkPointNavigator.SetPosition(2605 + index2, new Vector2((float) num33, (float) num34) + Main.inventoryBackTexture.Size() * 0.75f); + if (Main.player[Main.myPlayer].hair == i) + Main.spriteBatch.Draw(Main.inventoryBack14Texture, new Vector2((float) num33, (float) num34), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.inventoryBackTexture.Width, Main.inventoryBackTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.inventoryBack8Texture, new Vector2((float) num33, (float) num34), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.inventoryBackTexture.Width, Main.inventoryBackTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.mouseX > num33 && Main.mouseX < num33 + Main.inventoryBackTexture.Width && Main.mouseY > num34 && Main.mouseY < num34 + Main.inventoryBackTexture.Height && Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.player[Main.myPlayer].hair = i; + Main.PlaySound(12); + } + this.LoadHair(i); + float x2 = (float) (num33 + Main.inventoryBackTexture.Width / 2 - Main.playerHairTexture[i].Width / 2); + float y2 = (float) (num34 + 4); + Main.spriteBatch.Draw(Main.playerTextures[index1, 0], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.playerHairTexture[i].Width, 56)), Main.player[Main.myPlayer].skinColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.playerTextures[index1, 1], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.playerHairTexture[i].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(Main.playerTextures[index1, 2], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.playerHairTexture[i].Width, 56)), Main.player[Main.myPlayer].eyeColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.playerHairTexture[i], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.playerHairTexture[i].Width, 56)), Main.selColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + ++num35; + num33 += 56; + if (num35 >= 5) + { + num35 = 0; + num33 = num4; + num34 += 56; + } + } + } + } + + public static void OpenClothesWindow() + { + Main.hBar = -1f; + Main.lBar = -1f; + Main.sBar = -1f; + Main.playerInventory = false; + Main.npcChatText = ""; + Main.clothesWindow = true; + Main.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; + if (Main.dresserDummy == null) + Main.dresserDummy = 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) + Main.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.dresserDummy.skinVariant = Main.oldClothesStyle; + Main.dresserDummy.Male = Main.player[Main.myPlayer].Male; + Main.player[Main.myPlayer].skinVariant = Main.dresserDummy.skinVariant; + } + + public static void SaveClothesWindow() + { + Main.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 + { + int num1 = (int) (((double) Main.player[Main.myPlayer].position.X + (double) Main.player[Main.myPlayer].width * 0.5) / 16.0); + int num2 = (int) (((double) Main.player[Main.myPlayer].position.Y + (double) Main.player[Main.myPlayer].height * 0.5) / 16.0); + if (num1 < Main.dresserX - 5 || num1 > Main.dresserX + 6 || num2 < Main.dresserY - 4 || num2 > Main.dresserY + 5 || !Main.tile[Main.dresserX, Main.dresserY].active()) + { + Main.CancelClothesWindow(); + } + else + { + int num3 = 477 / 2; + int num4 = 124; + int num5 = 511; + int width = num5 - (num5 / 2 - num4 - 26); + int y1 = Main.screenHeight / 2 + 60; + int x1 = Main.screenWidth / 2 - width / 2; + int num6 = y1 + 32; + int num7 = x1 + 22; + int num8 = num6 - 16; + int num9 = x1 + width - num4; + int num10 = 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; + Utils.DrawInvBG(Main.spriteBatch, new Microsoft.Xna.Framework.Rectangle(x1, y1, width, 133)); + if (!PlayerInput.IgnoreMouseInterface && Main.mouseX > x1 && Main.mouseX < x1 + Main.clothesStyleBackTexture.Width && Main.mouseY > y1 && Main.mouseY < y1 + Main.clothesStyleBackTexture.Height) + Main.player[Main.myPlayer].mouseInterface = true; + Vector2 vector2_1 = new Vector2((float) (x1 + width / 2 - 16), (float) (y1 + 66 + Main.dresserDummy.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.dresserDummy.width / 2 - 15, (int) vector2_1.Y - Main.dresserDummy.height - 33, Main.dresserDummy.width + 30, Main.dresserDummy.height + 66); + bool flag1 = R.Contains(Main.MouseScreen.ToPoint()); + int selClothes = Main.selClothes; + int num11 = ((int) Main.mouseTextColor * 2 + (int) byte.MaxValue) / 3; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(num11, (int) ((double) num11 / 1.1), num11 / 2, num11); + float num12 = 0.9f; + string textValue1 = Language.GetTextValue("GameUI.Change"); + int num13 = x1 + width - num4 + 22; + int num14 = x1 + 22; + int num15 = 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.oldClothesStyle != Main.player[Main.myPlayer].skinVariant) + flag2 = true; + Vector2 vector2_2 = Main.fontMouseText.MeasureString(textValue1); + UILinkPointNavigator.SetPosition(2803, new Vector2((float) num14, (float) num15) + vector2_2 * num12 * 0.5f); + if (flag2 && Main.mouseX > num14 && (double) Main.mouseX < (double) num14 + (double) vector2_2.X && Main.mouseY > num15 && (double) Main.mouseY < (double) num15 + (double) vector2_2.Y) + { + num12 = 1.1f; + if (!Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus1) + Main.PlaySound(12); + Main.npcChatFocus1 = false; + } + for (int index = 0; index < 5; ++index) + { + int num16 = num14; + int num17 = num15; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num16 -= 2; + if (index == 1) + num16 += 2; + if (index == 2) + num17 -= 2; + if (index == 3) + num17 += 2; + if (index == 4) + color2 = flag2 ? color1 : new Microsoft.Xna.Framework.Color(100, 100, 100); + Vector2 vector2_3 = Main.fontMouseText.MeasureString(textValue1) * 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue1, new Vector2((float) num16 + vector2_3.X, (float) num17 + vector2_3.Y), color2, 0.0f, vector2_3, num12, SpriteEffects.None, 0.0f); + } + float num18 = 0.9f; + string textValue2 = Language.GetTextValue("GameUI.Cancel"); + int num19 = num14 + 130; + Vector2 vector2_4 = Main.fontMouseText.MeasureString(textValue2); + UILinkPointNavigator.SetPosition(2804, new Vector2((float) num19, (float) num15) + vector2_4 * num18 * 0.5f); + if (Main.mouseX > num19 && (double) Main.mouseX < (double) num19 + (double) vector2_4.X && Main.mouseY > num15 && (double) Main.mouseY < (double) num15 + (double) vector2_4.Y) + { + num18 = 1.1f; + if (!Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus2) + Main.PlaySound(12); + Main.npcChatFocus2 = false; + } + for (int index = 0; index < 5; ++index) + { + int num20 = num19; + int num21 = num15; + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num20 -= 2; + if (index == 1) + num20 += 2; + if (index == 2) + num21 -= 2; + if (index == 3) + num21 += 2; + if (index == 4) + color3 = color1; + Vector2 vector2_5 = Main.fontMouseText.MeasureString(textValue2) * 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue2, new Vector2((float) num20 + vector2_5.X, (float) num21 + vector2_5.Y), color3, 0.0f, vector2_5, num18, 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 num22 = 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(this.hueTexture, new Vector2((float) num7, (float) num8), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num8 - 4 && Main.mouseY < num8 + this.hueTexture.Height + 4 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num7, (float) num8), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num7 + (float) (this.hueTexture.Width - 2) * Main.hBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num8 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num8 - 4 && Main.mouseY < num8 + this.hueTexture.Height + 4 || this.grabColorSlider == 1) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num7) / (float) this.hueTexture.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) num7, (float) num8) + this.hueTexture.Size() / 2f); + int num23 = num8 + 26; + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num7, (float) num23), Microsoft.Xna.Framework.Color.White); + for (int index = 0; index <= num22; ++index) + { + float Saturation2 = (float) index / (float) num22; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation2, Luminosity1); + Main.spriteBatch.Draw(Main.colorBlipTexture, new Vector2((float) (num7 + index + 5), (float) (num23 + 4)), rgb); + } + if (Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num23 - 4 && Main.mouseY < num23 + this.hueTexture.Height + 4 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num7, (float) num23), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num7 + (float) (this.hueTexture.Width - 2) * Main.sBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num23 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num23 - 4 && Main.mouseY < num23 + this.hueTexture.Height + 4 || this.grabColorSlider == 2) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num7) / (float) this.hueTexture.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) num7, (float) num23) + this.hueTexture.Size() / 2f); + int num24 = num23 + 26; + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num7, (float) num24), Microsoft.Xna.Framework.Color.White); + float num25 = 0.15f; + for (int index = 0; index <= num22; ++index) + { + float Luminosity2 = (float) index / (float) num22; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity2); + Main.spriteBatch.Draw(Main.colorBlipTexture, new Vector2((float) (num7 + index + 5), (float) (num24 + 4)), rgb); + } + if (Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + this.hueTexture.Height + 4 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num7, (float) num24), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num7 + (float) (this.hueTexture.Width - 2) * (float) (((double) Main.lBar - (double) num25) / (1.0 - (double) num25)) - (float) (Main.colorSliderTexture.Width / 2), (float) (num24 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num7 - 4 && Main.mouseX < num7 + this.hueTexture.Width + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + this.hueTexture.Height + 4 || this.grabColorSlider == 3) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num26 = (float) (Main.mouseX - num7) / (float) this.hueTexture.Width; + if ((double) num26 < 0.0) + num26 = 0.0f; + if ((double) num26 > 1.0) + num26 = 1f; + Main.lBar = num26 * (1f - num25) + num25; + } + UILinkPointNavigator.SetPosition(2802, new Vector2((float) num7, (float) num24) + this.hueTexture.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; + int num27 = num9; + int num28 = num10 - 8; + for (int index = 0; index < 4; ++index) + { + if (selClothes == index) + Main.spriteBatch.Draw(Main.inventoryBack14Texture, new Vector2((float) num27, (float) num28), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.inventoryBackTexture.Width, Main.inventoryBackTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.inventoryBack8Texture, new Vector2((float) num27, (float) num28), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.inventoryBackTexture.Width, Main.inventoryBackTexture.Height)), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.mouseX > num27 && Main.mouseX < num27 + Main.inventoryBackTexture.Width && Main.mouseY > num28 && Main.mouseY < num28 + Main.inventoryBackTexture.Height && Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.selClothes = index; + Main.PlaySound(12); + Main.hBar = -1f; + Main.lBar = -1f; + Main.sBar = -1f; + } + float x2 = (float) (num27 + Main.inventoryBackTexture.Width / 2 - Main.clothesTexture[index].Width / 2); + float y2 = (float) (num28 + Main.inventoryBackTexture.Height / 2 - Main.clothesTexture[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; + Main.spriteBatch.Draw(Main.clothesTexture[index], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.clothesTexture[index].Width, Main.clothesTexture[index].Height)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(2806 + index, new Vector2(x2, y2) + Main.clothesTexture[index].Size() * 0.75f); + num27 += 56; + if (index == 1) + { + num27 -= 112; + num28 += 56; + } + } + Main.dresserDummy.skinVariant = Main.player[Main.myPlayer].skinVariant; + Main.dresserDummy.eyeColor = Main.player[Main.myPlayer].eyeColor; + Main.dresserDummy.hairColor = Main.player[Main.myPlayer].hairColor; + Main.dresserDummy.skinColor = Main.player[Main.myPlayer].skinColor; + Main.dresserDummy.shirtColor = Main.player[Main.myPlayer].shirtColor; + Main.dresserDummy.underShirtColor = Main.player[Main.myPlayer].underShirtColor; + Main.dresserDummy.shoeColor = Main.player[Main.myPlayer].shoeColor; + Main.dresserDummy.pantsColor = Main.player[Main.myPlayer].pantsColor; + Main.dresserDummy.Bottom = Main.screenPosition + vector2_1; + Main.dresserDummy.direction = -1; + Main.dresserDummy.gravDir = 1f; + Main.dresserDummy.PlayerFrame(); + Main.dresserDummy.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; + Main.PlaySound(12); + Main.CycleClothingStyle(Main.player[Main.myPlayer]); + } + } + UILinkPointNavigator.SetPosition(2805, R.Center.ToVector2()); + Utils.DrawInvBG(Main.spriteBatch, R, c); + this.DrawPlayer(Main.dresserDummy, Main.dresserDummy.position, Main.dresserDummy.fullRotation, Main.dresserDummy.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[42] + { + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interface Logic 1", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_0_InterfaceLogic1(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Emote Bubbles", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_1_EmoteBubbles(); + 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)), + (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: MP Player Names", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_20_MultiplayerPlayerNames(); + return true; + }), InterfaceScaleType.UI), + (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; + })), + (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; + })) + }); + } + + 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 DrawInterface_41_InterfaceLogic4() + { + Main.npcChatRelease = !Main.mouseRight; + Main.cursorOverride = -1; + Main._MouseOversCanClear = true; + } + + private void DrawInterface_40_InteractItemIcon() + { + int type = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type; + if (Main.player[Main.myPlayer].showItemIcon2 != 0) + type = Main.player[Main.myPlayer].showItemIcon2; + bool flag1 = Main.player[Main.myPlayer].showItemIcon && (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type > 0 || (uint) Main.player[Main.myPlayer].showItemIcon2 > 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].showItemIcon2); + 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].showItemIcon2 != 0) + { + currentColor = Microsoft.Xna.Framework.Color.White; + color = new Microsoft.Xna.Framework.Color(); + } + if (Main.player[Main.myPlayer].showItemIcon2 == 269) + currentColor = Main.player[Main.myPlayer].shirtColor; + float cursorScale = Main.cursorScale; + ItemSlot.GetItemLight(ref currentColor, type); + SpriteEffects effects = SpriteEffects.None; + if ((Main.player[Main.myPlayer].showItemIcon2 == 928 || Main.player[Main.myPlayer].showItemIcon2 == 1337 || Main.player[Main.myPlayer].showItemIcon2 == 3369) && Main.player[Main.myPlayer].showItemIconR) + effects = SpriteEffects.FlipHorizontally; + if (type > 0) + Main.spriteBatch.Draw(Main.itemTexture[type], new Vector2((float) (Main.mouseX + 10), (float) (Main.mouseY + 10)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[type].Width, Main.itemTexture[type].Height)), currentColor, 0.0f, new Vector2(), cursorScale, effects, 0.0f); + if (Main.player[Main.myPlayer].showItemIconText != "") + this.MouseText(Main.player[Main.myPlayer].showItemIconText); + if (Main.player[Main.myPlayer].showItemIcon2 == 0 && Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(Main.itemTexture[Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type], new Vector2((float) (Main.mouseX + 10), (float) (Main.mouseY + 10)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.itemTexture[Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type].Width, Main.itemTexture[Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type].Height)), color, 0.0f, new Vector2(), cursorScale, SpriteEffects.None, 0.0f); + if (flag1) + return; + Utils.Swap(ref cacheSelectedItemId, ref Main.player[Main.myPlayer].showItemIcon2); + } + + 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.mouseNPC = -1; + Main.player[Main.myPlayer].showItemIcon = false; + Main.player[Main.myPlayer].showItemIcon2 = 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.mouseNPC <= -1) + return; + float scale = 1f * Main.cursorScale; + Main.spriteBatch.Draw(Main.npcHeadTexture[this.mouseNPC], new Vector2((float) ((double) Main.mouseX + 26.0 * (double) scale - (double) Main.npcHeadTexture[this.mouseNPC].Width * 0.5 * (double) scale), (float) ((double) Main.mouseY + 26.0 * (double) scale - (double) Main.npcHeadTexture[this.mouseNPC].Height * 0.5 * (double) scale)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[this.mouseNPC].Width, Main.npcHeadTexture[this.mouseNPC].Height)), 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) + { + Main.PlaySound(12); + this.mouseNPC = -1; + } + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + if (this.mouseNPC == 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 n = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == NPC.HeadIndexToType(this.mouseNPC)) + { + n = index; + break; + } + } + if (n >= 0) + { + 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, n)) + return; + this.mouseNPC = -1; + WorldGen.moveRoom(x, y, n); + Main.PlaySound(12); + } + else + this.mouseNPC = 0; + } + } + } + + private static void DrawInterface_37_DebugStuff() + { + } + + private static void DrawInterface_36_Cursor() + { + 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(Main.cursorTextures[Main.cursorOverride], new Vector2((float) (Main.mouseX + 1), (float) (Main.mouseY + 1)), new Microsoft.Xna.Framework.Rectangle?(), color1, rotation, vector2 * Main.cursorTextures[Main.cursorOverride].Size(), Main.cursorScale * 1.1f * num, SpriteEffects.None, 0.0f); + if (!flag2) + return; + Main.spriteBatch.Draw(Main.cursorTextures[Main.cursorOverride], new Vector2((float) Main.mouseX, (float) Main.mouseY), new Microsoft.Xna.Framework.Rectangle?(), color2, rotation, vector2 * Main.cursorTextures[Main.cursorOverride].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; + string str = Lang.inter[38].Value; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, str, new Vector2((float) (Main.screenWidth / 2) - Main.fontDeathText.MeasureString(str).X / 2f, (float) (Main.screenHeight / 2 - 20)), 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) + return; + string textValue = Language.GetTextValue("Game.DroppedCoins", (object) Main.player[Main.myPlayer].lostCoinString); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, new Vector2((float) (Main.screenWidth / 2) - Main.fontMouseText.MeasureString(textValue).X / 2f, (float) (Main.screenHeight / 2 + 30)), Main.player[Main.myPlayer].GetDeathAlpha(Microsoft.Xna.Framework.Color.Transparent), 0.0f, new Vector2(), 1f, 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) + return; + Main.player[Main.myPlayer].showItemIcon = false; + this.MouseText(Main.hoverItemName, Main.rare); + Main.mouseText = true; + } + + 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)); + + private static void DrawInterface_29_SettingsButton() + { + if (!Main.playerInventory && !Main.player[Main.myPlayer].ghost) + return; + string str = Lang.inter[62].Value; + Vector2 vector2_1 = Main.fontMouseText.MeasureString("Settings"); + Vector2 vector2_2 = Main.fontMouseText.MeasureString(Lang.inter[62].Value); + Vector2 vector2_3 = Main.fontDeathText.MeasureString(str); + int num1 = Main.screenWidth - 110; + int num2 = Main.screenHeight - 20; + if (Main.player[Main.myPlayer].ExtraAccessorySlotsShouldShow && (Main.screenHeight < 650 || Main.screenHeight < 900 && Main.mapStyle == 1)) + { + num1 -= 140; + num2 -= PlayerInput.UsingGamepad.ToInt() * 30; + } + float num3 = vector2_1.X / vector2_2.X; + if (Main.mouseExit) + { + if ((double) Main.exitScale < 0.96) + Main.exitScale += 0.02f; + } + else if ((double) Main.exitScale > 0.8) + Main.exitScale -= 0.02f; + UILinkPointNavigator.SetPosition(308, new Vector2((float) num1, (float) num2)); + for (int index = 0; index < 5; ++index) + { + int num4 = 0; + int num5 = 0; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num4 = -2; + if (index == 1) + num4 = 2; + if (index == 2) + num5 = -2; + if (index == 3) + num5 = 2; + if (index == 4) + color = Microsoft.Xna.Framework.Color.White; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, str, new Vector2((float) (num1 + num4), (float) (num2 + num5)), color, 0.0f, new Vector2(vector2_3.X / 2f, vector2_3.Y / 2f), (Main.exitScale - 0.2f) * num3, SpriteEffects.None, 0.0f); + } + if ((double) Main.mouseX > (double) num1 - (double) vector2_3.X / 2.0 && (double) Main.mouseX < (double) num1 + (double) vector2_3.X / 2.0 && (double) Main.mouseY > (double) num2 - (double) vector2_3.Y / 2.0 && (double) Main.mouseY < (double) num2 + (double) vector2_3.Y / 2.0 - 10.0 && !Main.LocalPlayer.mouseInterface) + { + if (PlayerInput.IgnoreMouseInterface) + return; + if (!Main.mouseExit) + Main.PlaySound(12); + Main.mouseExit = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeftRelease || !Main.mouseLeft) + return; + Main.mouseExit = false; + Main.exitScale = 0.8f; + IngameOptions.Open(); + } + else + Main.mouseExit = false; + } + + private void DrawInterface_28_InfoAccs() => this.DrawInfoAccs(); + + private void DrawInterface_27_Inventory() + { + if (Main.playerInventory) + { + if (Main.ignoreErrors) + { + try + { + this.DrawInventory(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawInventory(); + } + else + { + Main.recFastScroll = true; + this.mouseNPC = -1; + Main.EquipPage = 0; + } + } + + private static void DrawInterface_26_InterfaceLogic3() + { + if (Main.player[Main.myPlayer].dead) + Main.playerInventory = false; + if (!Main.playerInventory) + { + Main.player[Main.myPlayer].chest = -1; + if (Main.InGuideCraftMenu) + Main.InGuideCraftMenu = false; + Recipe.FindRecipes(); + Main.InReforgeMenu = false; + } + 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() + { + PlayerInput.SetZoom_World(); + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + Vector2 screenPosition = Main.screenPosition; + PlayerInput.SetZoom_UI(); + float uiScale = Main.UIScale; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.myPlayer != index && !Main.player[index].dead && Main.player[Main.myPlayer].team > 0 && Main.player[Main.myPlayer].team == Main.player[index].team) + { + string str = Main.player[index].name; + if (Main.player[index].statLife < Main.player[index].statLifeMax2) + str = str + ": " + (object) Main.player[index].statLife + "/" + (object) Main.player[index].statLifeMax2; + Vector2 vector2_1 = Main.fontMouseText.MeasureString(str); + float num1 = 0.0f; + if (Main.player[index].chatOverhead.timeLeft > 0) + num1 = -vector2_1.Y; + Vector2 vector2_2 = new Vector2((float) (screenWidth / 2) + screenPosition.X, (float) (screenHeight / 2) + screenPosition.Y); + Vector2 position = Main.player[index].position; + Vector2 vector2_3 = position + (position - vector2_2) * (Main.GameViewMatrix.Zoom - Vector2.One); + float num2 = 0.0f; + float num3 = (float) Main.mouseTextColor / (float) byte.MaxValue; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.teamColor[Main.player[index].team].R * (double) num3), (int) (byte) ((double) Main.teamColor[Main.player[index].team].G * (double) num3), (int) (byte) ((double) Main.teamColor[Main.player[index].team].B * (double) num3), (int) Main.mouseTextColor); + float num4 = vector2_3.X + (float) (Main.player[index].width / 2) - vector2_2.X; + float num5 = (float) ((double) vector2_3.Y - (double) vector2_1.Y - 2.0) + num1 - vector2_2.Y; + float num6 = (float) Math.Sqrt((double) num4 * (double) num4 + (double) num5 * (double) num5); + int num7 = screenHeight; + if (screenHeight > screenWidth) + num7 = screenWidth; + int num8 = num7 / 2 - 30; + if (num8 < 100) + num8 = 100; + if ((double) num6 < (double) num8) + { + vector2_1.X = (float) ((double) vector2_3.X + (double) (Main.player[index].width / 2) - (double) vector2_1.X / 2.0) - screenPosition.X; + vector2_1.Y = (float) ((double) vector2_3.Y - (double) vector2_1.Y - 2.0) + num1 - screenPosition.Y; + } + else + { + num2 = num6; + float num9 = (float) num8 / num6; + vector2_1.X = (float) ((double) (screenWidth / 2) + (double) num4 * (double) num9 - (double) vector2_1.X / 2.0); + vector2_1.Y = (float) (screenHeight / 2) + num5 * num9; + } + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + vector2_1.Y = (float) screenHeight - vector2_1.Y; + vector2_1 *= 1f / uiScale; + Vector2 vector2_4 = Main.fontMouseText.MeasureString(str); + vector2_1 += vector2_4 * (1f - uiScale) / 4f; + if ((double) num2 > 0.0) + { + string textValue = Language.GetTextValue("GameUI.PlayerDistance", (object) (int) ((double) num2 / 16.0 * 2.0)); + Vector2 vector2_5 = Main.fontMouseText.MeasureString(textValue); + vector2_5.X = (float) ((double) vector2_1.X + (double) vector2_4.X / 2.0 - (double) vector2_5.X / 2.0); + vector2_5.Y = (float) ((double) vector2_1.Y + (double) vector2_4.Y / 2.0 - (double) vector2_5.Y / 2.0 - 20.0); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, new Vector2(vector2_5.X - 2f, vector2_5.Y), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, new Vector2(vector2_5.X + 2f, vector2_5.Y), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, new Vector2(vector2_5.X, vector2_5.Y - 2f), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, new Vector2(vector2_5.X, vector2_5.Y + 2f), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, textValue, vector2_5, color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2(vector2_1.X - 2f, vector2_1.Y), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2(vector2_1.X + 2f, vector2_1.Y), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2(vector2_1.X, vector2_1.Y - 2f), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2(vector2_1.X, vector2_1.Y + 2f), Microsoft.Xna.Framework.Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, vector2_1, color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + + 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 - Main.chat2Texture.Width); + } + else + num3 = num1 + 8; + int num4 = num2 - 22; + Main.spriteBatch.Draw(Main.chat2Texture, new Vector2((float) num3, (float) num4), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.chat2Texture.Width, Main.chat2Texture.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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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.netDiag) + return; + 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) Main.rxMsg); + num2 += index * 20; + } + else if (index == 1) + { + str = "RX Bytes: " + string.Format("{0:0,0}", (object) Main.rxData); + num2 += index * 20; + } + else if (index == 2) + { + str = "TX Msgs: " + string.Format("{0:0,0}", (object) Main.txMsg); + num2 += index * 20; + } + else if (index == 3) + { + str = "TX Bytes: " + string.Format("{0:0,0}", (object) Main.txData); + num2 += index * 20; + } + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, 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 < Main.maxMsg; ++index) + { + float num3 = 0.7f; + int num4 = 200; + int num5 = 120; + int num6 = index / 50; + int num7 = num4 + num6 * 400; + int num8 = num5 + (index - num6 * 50) * 13; + string str1 = index.ToString() + ": "; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str1, new Vector2((float) num7, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + int num9 = num7 + 30; + string str2 = "rx:" + string.Format("{0:0,0}", (object) Main.rxMsgType[index]); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str2, new Vector2((float) num9, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + int num10 = num9 + 70; + string str3 = string.Format("{0:0,0}", (object) Main.rxDataType[index]); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str3, new Vector2((float) num10, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + int num11 = num10 + 70; + string str4 = index.ToString() + ": "; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str4, new Vector2((float) num11, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + int num12 = num11 + 30; + string str5 = "tx:" + string.Format("{0:0,0}", (object) Main.txMsgType[index]); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str5, new Vector2((float) num12, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + int num13 = num12 + 70; + string str6 = string.Format("{0:0,0}", (object) Main.txDataType[index]); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str6, new Vector2((float) num13, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + } + } + + private void DrawInterface_16_MapOrMinimap() + { + Main.mH = 0; + if (!Main.mapEnabled) + return; + if (!Main.mapFullscreen && Main.mapStyle == 1) + { + Main.mH = 256; + if (Main.ignoreErrors) + { + try + { + this.DrawMap(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawMap(); + } + PlayerInput.SetZoom_UI(); + if (Main.mH + this.RecommendedEquipmentAreaPushUp <= Main.screenHeight) + return; + Main.mH = Main.screenHeight - this.RecommendedEquipmentAreaPushUp; + } + + public int RecommendedEquipmentAreaPushUp => Main.player[Main.myPlayer].ExtraAccessorySlotsShouldShow ? 610 + PlayerInput.UsingGamepad.ToInt() * 30 : 600; + + private static void DrawInterface_15_InvasionProgressBars() => Main.DrawInvasionProgress(); + + private void DrawInterface_14_EntityHealthBars() + { + if (Main.HealthBarDrawSettings == (byte) 0) + return; + 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].visualOffset; + 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) + 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 index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type >= 134 && Main.npc[index].type <= 136) + { + Vector2 vector2_2 = Main.player[Main.myPlayer].Center - Main.npc[index].Center; + if ((double) vector2_2.Length() < (double) num && Collision.CanHit(Main.player[Main.myPlayer].Center, 1, 1, Main.npc[index].Center, 1, 1)) + { + num = vector2_2.Length(); + vector2_1 = Main.npc[index].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 index = i; + if (type != 134 && Main.npc[i].realLife != -1) + index = 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[index].life, Main.npc[index].lifeMax, alpha, scale2); + } + else + Main.destroyerHB = new Vector2(0.0f, 0.0f); + } + } + else if (type == 7) + { + Vector2 position = Main.npc[i].position; + int index1 = -1; + for (int index2 = 0; index2 < 200; ++index2) + { + if (Main.npc[index2].active && Main.npc[index2].type == 9) + index1 = index2; + } + if (index1 >= 0) + { + Vector2 vector2 = (position + Main.npc[index1].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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); + } + } + else if (type != 8 && type != 9) + { + if (type == 95) + { + Vector2 position = Main.npc[i].position; + int index3 = -1; + for (int index4 = 0; index4 < 200; ++index4) + { + if (Main.npc[index4].active && Main.npc[index4].type == 97) + index3 = index4; + } + if (index3 >= 0) + { + Vector2 vector2 = (position + Main.npc[index3].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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); + } + } + else if (type != 96 && type != 97) + { + if (type == 10) + { + Vector2 position = Main.npc[i].position; + int index5 = -1; + for (int index6 = 0; index6 < 200; ++index6) + { + if (Main.npc[index6].active && Main.npc[index6].type == 12) + index5 = index6; + } + if (index5 >= 0) + { + Vector2 vector2 = (position + Main.npc[index5].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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); + } + } + else if (type != 11 && type != 12) + { + switch (type) + { + case 87: + Vector2 position1 = Main.npc[i].position; + int index7 = -1; + for (int index8 = 0; index8 < 200; ++index8) + { + if (Main.npc[index8].active && Main.npc[index8].type == 92) + index7 = index8; + } + if (index7 >= 0) + { + Vector2 vector2 = (position1 + Main.npc[index7].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + case 412: + Vector2 position2 = Main.npc[i].position; + int index9 = i; + while (index9 > 0 && index9 < 200 && (double) Main.npc[index9].ai[0] > 0.0) + index9 = (int) Main.npc[index9].ai[0]; + if (index9 >= 0) + { + Vector2 vector2 = (position2 + Main.npc[index9].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + default: + if (type != 414 && type != 413 && (type < 88 || type > 92)) + { + if (type == 39) + { + Vector2 position3 = Main.npc[i].position; + int index10 = -1; + for (int index11 = 0; index11 < 200; ++index11) + { + if (Main.npc[index11].active && Main.npc[index11].type == 41) + index10 = index11; + } + if (index10 >= 0) + { + Vector2 vector2 = (position3 + Main.npc[index10].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type != 40 && type != 41) + { + if (type == 98) + { + Vector2 position4 = Main.npc[i].position; + int index12 = -1; + for (int index13 = 0; index13 < 200; ++index13) + { + if (Main.npc[index13].active && Main.npc[index13].type == 100) + index12 = index13; + } + if (index12 >= 0) + { + Vector2 vector2 = (position4 + Main.npc[index12].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type != 99 && type != 100) + { + if (type == 454) + { + Vector2 position5 = Main.npc[i].position; + int index14 = -1; + for (int index15 = 0; index15 < 200; ++index15) + { + if (Main.npc[index15].active && Main.npc[index15].type == 459) + index14 = index15; + } + if (index14 >= 0) + { + Vector2 vector2 = (position5 + Main.npc[index14].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type < 455 || type > 459) + { + if (type == 510) + { + Vector2 position6 = Main.npc[i].position; + int index16 = -1; + for (int index17 = 0; index17 < 200; ++index17) + { + if (Main.npc[index17].active && Main.npc[index17].type == 512) + index16 = index17; + } + if (index16 >= 0) + { + Vector2 vector2 = (position6 + Main.npc[index16].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type != 511 && type != 512) + { + if (type == 513) + { + Vector2 position7 = Main.npc[i].position; + int index18 = -1; + for (int index19 = 0; index19 < 200; ++index19) + { + if (Main.npc[index19].active && Main.npc[index19].type == 515) + index18 = index19; + } + if (index18 >= 0) + { + Vector2 vector2 = (position7 + Main.npc[index18].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type != 514 && type != 515) + { + if (type == 117) + { + Vector2 position8 = Main.npc[i].position; + int index20 = -1; + for (int index21 = 0; index21 < 200; ++index21) + { + if (Main.npc[index21].active && Main.npc[index21].type == 119) + index20 = index21; + } + if (index20 >= 0) + { + Vector2 vector2 = (position8 + Main.npc[index20].position) / 2f; + this.DrawHealthBar(vector2.X + (float) (Main.npc[i].width / 2), vector2.Y + (float) (Main.npc[i].height / 2), 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; + } + break; + } + if (type != 118 && type != 119) + { + switch (Main.HealthBarDrawSettings) + { + case 1: + float num1 = 10f + Main.NPCAddHeight(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(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 + break; + } + else + break; + } + else + break; + } + else + break; + } + else + break; + } + else + break; + } + else + break; + break; + } + } + } + } + } + } + else if (!Main.npc[i].dontTakeDamage && (double) Main.npc[i].nameOver > 0.0 && PlayerInput.UsingGamepad) + { + Vector2 stringSize = ChatManager.GetStringSize(Main.fontMouseText, 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, Main.fontMouseText, 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, Main.fontMouseText, 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 fontMouseText = Main.fontMouseText; + float num = 1f; + Vector2 origin = fontMouseText.MeasureString(text) * num * new Vector2(0.5f, 0.5f); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, fontMouseText, 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].visualOffset; + } + } + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != Main.myPlayer && Main.player[index].active && !Main.player[index].ghost && !Main.player[index].dead && Main.player[index].statLife != Main.player[index].statLifeMax2) + { + switch (Main.HealthBarDrawSettings) + { + case 1: + int num3 = 10; + this.DrawHealthBar(Main.player[index].position.X + (float) (Main.player[index].width / 2), Main.player[index].position.Y + (float) Main.player[index].height + (float) num3 + Main.player[index].gfxOffY, Main.player[index].statLife, Main.player[index].statLifeMax2, Lighting.Brightness((int) (((double) Main.player[index].position.X + (double) (Main.player[index].width / 2)) / 16.0), (int) (((double) Main.player[index].position.Y + (double) (Main.player[index].height / 2) + (double) Main.player[index].gfxOffY) / 16.0))); + continue; + case 2: + int num4 = -20; + this.DrawHealthBar(Main.player[index].position.X + (float) (Main.player[index].width / 2), Main.player[index].position.Y + (float) num4 + Main.player[index].gfxOffY, Main.player[index].statLife, Main.player[index].statLifeMax2, Lighting.Brightness((int) (((double) Main.player[index].position.X + (double) (Main.player[index].width / 2)) / 16.0), (int) (((double) Main.player[index].position.Y + (double) (Main.player[index].height / 2) + (double) Main.player[index].gfxOffY) / 16.0))); + continue; + default: + continue; + } + } + } + } + + private static void DrawInterface_13_AchievementCompletePopups() => AchievementCompleteUI.Draw(Main.spriteBatch); + + private static bool DrawInterface_12_IngameFancyUI() + { + Main.InGameUI.Draw(Main.spriteBatch, Main._drawInterfaceGameTime); + bool flag = true; + if (Main.inFancyUI && !IngameFancyUI.Draw(Main.spriteBatch, Main._drawInterfaceGameTime)) + flag = false; + return flag; + } + + private bool DrawInterface_11_IngameOptionsMenu() + { + bool flag = true; + if (Main.ingameOptionsWindow) + { + IngameOptions.Draw(this, Main.spriteBatch); + 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; + } + 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; + } + return flag; + } + + private static void DrawInterface_9_WireSelection() => 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) + return; + if (Main.ignoreErrors) + { + try + { + this.DrawNPCHouse(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawNPCHouse(); + } + + private static void DrawInterface_6_TileGridOption() + { + if ((PlayerInput.UsingGamepad && !Main.SmartCursorEnabled && !PlayerInput.UsingGamepadUI || Main.MouseShowBuildingGrid && !Main.SmartCursorEnabled) && !Main.player[Main.myPlayer].dead && !PlayerInput.CursorIsBusy) + { + float num1 = 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, num1, 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 num2 = 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 cursorRadialTexture = Main.cursorRadialTexture; + Main.spriteBatch.Draw(cursorRadialTexture, position, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * 0.5f * buildingGridAlpha, 0.0f, cursorRadialTexture.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) + (double) (num5 * 4)) / 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; + int num8 = num6 + num5; + Vector2 mouseWorld = Main.MouseWorld; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + mouseWorld.Y += 16f; + Vector2 vector2_1 = mouseWorld / 16f; + Vector2 vector2_2 = new Vector2((float) num8, (float) num7); + int num9 = (int) vector2_1.X - num8; + int num10 = (int) vector2_1.Y - num7; + int num11 = Math.Abs(num9) + 1; + int num12 = Math.Abs(num10) + 1; + if (num9 == 0 && num10 == 0) + return; + Texture2D texture = Main.extraTexture[2]; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num13 = num8; + int num14 = num7; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + --num14; + float r = 0.24f; + float g = 0.8f; + float b = 0.9f; + float a = 1f; + float num15 = 0.8f; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num15 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num13, (float) num14) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (num9 != 0) + { + int num16 = Math.Sign(num9); + rectangle.Y = num16 == 1 ? 16 : 32; + while (num9 != 0) + { + num9 -= num16; + num13 += num16; + if (num9 == 0) + rectangle.Y = 0; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num15 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num13, (float) num14) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + if (num10 != 0) + { + int num17 = Math.Sign(num10); + rectangle.Y = num17 == 1 ? 48 : 64; + while (num10 != 0) + { + num10 -= num17; + num14 += num17; + if (num10 == 0) + rectangle.Y = 0; + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num15 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num13, (float) num14) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + Utils.DrawBorderString(Main.spriteBatch, num11.ToString() + "x" + num12.ToString(), new Vector2((float) (Main.mouseX + 16), (float) Main.mouseY), new Microsoft.Xna.Framework.Color(r, g, b, a), anchory: 0.8f); + } + + 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 = Main.extraTexture[68]; + 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_EmoteBubbles() + { + 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 MouseOversTryToClear() + { + if (!Main._MouseOversCanClear) + return; + Main._MouseOversCanClear = false; + Main.MouseOversClear(); + } + + private static void MouseOversClear() + { + Main.player[Main.myPlayer].showItemIcon = false; + Main.player[Main.myPlayer].showItemIcon2 = 0; + Main.player[Main.myPlayer].showItemIconText = 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.GlobalTime % (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; + Texture2D texture2D = Main.itemTexture[intList[index2]]; + 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); + } + } + } + + 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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.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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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() + { + if (Main.ignoreErrors) + { + try + { + this.GUIHotbarDrawInner(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.GUIHotbarDrawInner(); + } + + 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.mapStyle != 1 || !Main.mapEnabled || Main.screenHeight >= 820) && (Main.mapStyle == 1 || Main.screenWidth >= 855) && !PlayerInput.UsingGamepad; + + private void DrawInfoAccs() + { + if (Main.npcChatText != null && !(Main.npcChatText == "") || Main.player[Main.myPlayer].sign >= 0) + 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 num2 = 0; + string cursorText = ""; + float num3 = 215f; + int num4 = 0; + if (GameCulture.Russian.IsActive) + { + num4 = -50; + num3 += 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 str3 = "AM"; + double time = Main.time; + if (!Main.dayTime) + time += 54000.0; + double num5 = time / 86400.0 * 24.0 - 7.5 - 12.0; + if (num5 < 0.0) + num5 += 24.0; + if (num5 >= 12.0) + str3 = "PM"; + int num6 = (int) num5; + double num7 = (double) (int) ((num5 - (double) num6) * 60.0); + string str4 = string.Concat((object) num7); + if (num7 < 10.0) + str4 = "0" + str4; + if (num6 > 12) + num6 -= 12; + if (num6 == 0) + num6 = 12; + if (Main.player[Main.myPlayer].accWatch == 1) + str4 = "00"; + else if (Main.player[Main.myPlayer].accWatch == 2) + str4 = num7 >= 30.0 ? "30" : "00"; + str1 = num6.ToString() + ":" + str4 + " " + str3; + 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 = (double) Main.maxRaining <= 0.6 ? ((double) Main.maxRaining < 0.2 ? ((double) Main.maxRaining <= 0.0 ? ((double) Main.cloudBGActive <= 0.0 ? (Main.numClouds <= 120 ? (Main.numClouds <= 80 ? (Main.numClouds <= 20 ? 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"); + int num8 = (int) ((double) Main.windSpeed * 100.0); + if (num8 < 0) + str1 += Language.GetTextValue("GameUI.WestWind", (object) Math.Abs(num8)); + else if (num8 > 0) + str1 += Language.GetTextValue("GameUI.EastWind", (object) num8); + 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 + { + int num9 = Main.player[Main.myPlayer].FishingLevel(); + str1 = num9 != -1 ? (Main.player[Main.myPlayer].displayedFishingInfo = Language.GetTextValue("GameUI.FishingPower", (object) num9)) : 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; + str1 = Main.player[Main.myPlayer].bestOre > 0 ? Language.GetTextValue("GameUI.OreDetected", (object) Lang.GetMapObjectName(MapHelper.TileToLookup(Main.player[Main.myPlayer].bestOre, 0))) : Language.GetTextValue("GameUI.NoTreasureNearby"); + 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 num10 = 1300; + int num11 = 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 > num11) + { + num11 = Main.npc[index5].rarity; + if ((double) (Main.npc[index5].Center - Main.player[Main.myPlayer].Center).Length() < (double) num10) + index4 = index5; + } + } + 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 num12 = 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) + { + int type = Main.npc[index6].type; + if ((double) (Main.npc[index6].Center - Main.player[Main.myPlayer].Center).Length() < (double) num12) + ++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; + int num13 = (int) (1.0 + (double) Main.player[Main.myPlayer].velocity.Length() * 6.0); + if (num13 > Main.player[Main.myPlayer].speedSlice.Length) + num13 = Main.player[Main.myPlayer].speedSlice.Length; + float num14 = 0.0f; + for (int index7 = num13 - 1; index7 > 0; --index7) + Main.player[Main.myPlayer].speedSlice[index7] = Main.player[Main.myPlayer].speedSlice[index7 - 1]; + Main.player[Main.myPlayer].speedSlice[0] = Main.player[Main.myPlayer].velocity.Length(); + for (int index8 = 0; index8 < Main.player[Main.myPlayer].speedSlice.Length; ++index8) + { + if (index8 < num13) + num14 += Main.player[Main.myPlayer].speedSlice[index8]; + else + Main.player[Main.myPlayer].speedSlice[index8] = num14 / (float) num13; + } + float num15 = num14 / (float) num13; + int num16 = 42240; + int num17 = 216000; + float num18 = num15 * (float) num17 / (float) num16; + if (!Main.player[Main.myPlayer].merman && !Main.player[Main.myPlayer].ignoreWater) + { + if (Main.player[Main.myPlayer].honeyWet) + num18 /= 4f; + else if (Main.player[Main.myPlayer].wet) + num18 /= 2f; + } + str1 = Language.GetTextValue("GameUI.Speed", (object) Math.Round((double) num18)); + 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 num19 = (int) (((double) Main.player[Main.myPlayer].position.X + (double) (Main.player[Main.myPlayer].width / 2)) * 2.0 / 16.0 - (double) Main.maxTilesX); + str1 = num19 <= 0 ? (num19 >= 0 ? Language.GetTextValue("GameUI.CompassCenter") : Language.GetTextValue("GameUI.CompassWest", (object) -num19)) : Language.GetTextValue("GameUI.CompassEast", (object) num19); + 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 num20 = (int) (((double) Main.player[Main.myPlayer].position.Y + (double) Main.player[Main.myPlayer].height) * 2.0 / 16.0 - Main.worldSurface * 2.0); + float num21 = (float) (Main.maxTilesX / 4200); + float num22 = num21 * num21; + int num23 = 1200; + float num24 = (float) ((((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0 - (65.0 + 10.0 * (double) num22)) / (Main.worldSurface / 5.0)); + string str5 = (double) Main.player[Main.myPlayer].position.Y <= (double) ((Main.maxTilesY - 204) * 16) ? ((double) Main.player[Main.myPlayer].position.Y <= Main.rockLayer * 16.0 + (double) (num23 / 2) + 16.0 ? (num20 <= 0 ? ((double) num24 < 1.0 ? Language.GetTextValue("GameUI.LayerSpace") : Language.GetTextValue("GameUI.LayerSurface")) : Language.GetTextValue("GameUI.LayerUnderground")) : Language.GetTextValue("GameUI.LayerCaverns")) : Language.GetTextValue("GameUI.LayerUnderworld"); + int num25 = Math.Abs(num20); + str1 = (num25 != 0 ? Language.GetTextValue("GameUI.Depth", (object) num25) : Language.GetTextValue("GameUI.DepthLevel")) + " " + str5; + flag2 = true; + } + if (str1 != "") + { + int num26; + int num27; + if (!Main.playerInventory) + { + num26 = Main.screenWidth - 280; + num27 = -32; + if (Main.mapStyle == 1 && Main.mapEnabled) + num27 += 254; + } + else if (Main.ShouldDrawInfoIconsHorizontally) + { + num26 = Main.screenWidth - 280 + 20 * num2 - 10; + num27 = 94; + if (Main.mapStyle == 1 && Main.mapEnabled) + num27 += 254; + } + else + { + int num28 = (int) (52.0 * (double) Main.inventoryScale); + num26 = 697 - num28 * 4 + Main.screenWidth - 800 + 20 * (num2 % 2); + num27 = 114 + Main.mH + num28 * 7 + num28 / 2 + 20 * (num2 / 2) + 8 * (num2 / 4) - 20; + if (Main.EquipPage == 2) + { + num26 += num28 + num28 / 2; + num27 -= num28; + } + } + int num29 = num26 + num4; + if (index1 >= 0) + { + ++num2; + int num30 = 22; + if (Main.screenHeight < 650) + num30 = 20; + Vector2 position = new Vector2((float) num29, (float) (num27 + 74 + num30 * 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) num29, (float) num27); + if ((double) Main.mouseX >= (double) position.X && (double) Main.mouseY >= (double) position.Y && (double) Main.mouseX <= (double) position.X + (double) this.infoIconTexture[index1].Width && (double) Main.mouseY <= (double) position.Y + (double) this.infoIconTexture[index1].Height && !PlayerInput.IgnoreMouseInterface) + { + flag14 = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.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) this.infoIconTexture[index1].Width && (double) Main.mouseY <= (double) position.Y + (double) this.infoIconTexture[index1].Height && !Main.mouseText) + { + num1 = index2; + cursorText = str2; + Main.mouseText = true; + } + UILinkPointNavigator.SetPosition(1558 + num2 - 1, position + this.infoIconTexture[index1].Size() * 0.75f); + Main.spriteBatch.Draw(this.infoIconTexture[index1], position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, this.infoIconTexture[index1].Width, this.infoIconTexture[index1].Height)), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (flag14) + Main.spriteBatch.Draw(this.infoIconTexture[13], position - Vector2.One * 2f, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + num29 += 20; + } + UILinkPointNavigator.Shortcuts.INFOACCCOUNT = num2; + if (!Main.playerInventory) + { + Vector2 vector2_1 = new Vector2(1f); + Vector2 vector2_2 = Main.fontMouseText.MeasureString(str1); + if ((double) vector2_2.X > (double) num3) + vector2_1.X = num3 / 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 num31 = 0; + int num32 = 0; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index10 == 0) + num31 = -2; + if (index10 == 1) + num31 = 2; + if (index10 == 2) + num32 = -2; + if (index10 == 3) + num32 = 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 num33 = 22; + if (Main.screenHeight < 650) + num33 = 20; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str1, new Vector2((float) (num29 + num31), (float) (num27 + 74 + num33 * index2 + num32 + 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 void DrawBuilderAccToggles(Vector2 start) + { + if (!Main.playerInventory && !string.IsNullOrEmpty(Main.npcChatText) || Main.player[Main.myPlayer].sign >= 0) + return; + int num1 = 0; + Player player = Main.player[Main.myPlayer]; + int[] builderAccStatus = Main.player[Main.myPlayer].builderAccStatus; + int num2 = player.InfoAccMechShowWires.ToInt() * 6 + player.rulerLine.ToInt() + player.rulerGrid.ToInt() + player.autoActuator.ToInt() + player.autoPaint.ToInt(); + for (int index1 = 0; index1 < builderAccStatus.Length; ++index1) + { + int index2 = index1 - 2; + switch (index1) + { + case 0: + index2 = 8; + break; + case 1: + index2 = 9; + break; + } + Texture2D builderAccTexture = Main.builderAccTexture; + 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 (num2 > 8) + vector2.Y -= 44f; + 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 (player.rulerLine) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 1: + if (player.rulerGrid) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 2: + if (player.autoActuator) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 3: + if (player.autoPaint) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 4: + case 5: + case 6: + case 7: + case 9: + if (player.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) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 8: + if (player.InfoAccMechShowWires) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + player.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; + Main.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 11: + continue; + } + Main.spriteBatch.Draw(builderAccTexture, vector2, new Microsoft.Xna.Framework.Rectangle?(r), color, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (flag1) + Main.spriteBatch.Draw(this.infoIconTexture[13], vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, this.infoIconTexture[13].Size() / 2f, 1f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(4000 + num1, vector2 + r.Size() * 0.3f); + ++num1; + } + UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT = num1; + } + + 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 ((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 texture = Main.extraTexture[9]; + string text = ""; + Microsoft.Xna.Framework.Color c = Microsoft.Xna.Framework.Color.White; + switch (Main.invasionProgressIcon) + { + case 1: + texture = Main.extraTexture[8]; + text = Lang.inter[83].Value; + c = new Microsoft.Xna.Framework.Color(64, 109, 164) * 0.5f; + break; + case 2: + texture = Main.extraTexture[12]; + text = Lang.inter[84].Value; + c = new Microsoft.Xna.Framework.Color(112, 86, 114) * 0.5f; + break; + case 3: + texture = Main.extraTexture[79]; + text = Language.GetTextValue("DungeonDefenders2.InvasionProgressTitle"); + c = new Microsoft.Xna.Framework.Color(88, 0, 160) * 0.5f; + break; + case 4: + texture = Main.extraTexture[9]; + text = Lang.inter[88].Value; + c = new Microsoft.Xna.Framework.Color(94, 72, 131) * 0.5f; + break; + case 5: + texture = Main.extraTexture[7]; + text = Lang.inter[87].Value; + c = new Microsoft.Xna.Framework.Color(173, 135, 140) * 0.5f; + break; + case 6: + texture = Main.extraTexture[11]; + text = Lang.inter[86].Value; + c = new Microsoft.Xna.Framework.Color(148, 122, 72) * 0.5f; + break; + case 7: + texture = Main.extraTexture[10]; + 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 colorBarTexture = Main.colorBarTexture; + Texture2D colorBlipTexture = Main.colorBlipTexture; + 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(colorBarTexture, position1, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, 0.0f, new Vector2((float) (colorBarTexture.Width / 2), 0.0f), scale1, SpriteEffects.None, 0.0f); + Vector2 position2 = pos + Vector2.UnitX * (num1 - 0.5f) * num2; + Main.spriteBatch.Draw(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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 colorBarTexture = Main.colorBarTexture; + Texture2D colorBlipTexture = Main.colorBlipTexture; + if (Main.invasionProgressMax != 0) + { + Main.spriteBatch.Draw(colorBarTexture, position3, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, 0.0f, new Vector2((float) (colorBarTexture.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 = Main.fontMouseText.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(Main.magicPixel, 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(Main.magicPixel, 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(Main.magicPixel, 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 = Main.fontMouseText.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) (texture.Width + 12), 6f)) * scale1); + Utils.DrawInvBG(Main.spriteBatch, rectangle, c); + Main.spriteBatch.Draw(texture, 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) (texture.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( + 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.player[Main.myPlayer].dead) + { + Main.SmartInteractShowingGenuine = false; + Main.SmartInteractShowingFake = false; + Main.SmartInteractNPC = -1; + Main.SmartInteractNPCsNearby.Clear(); + Main.SmartInteractTileCoords.Clear(); + Main.SmartInteractTileCoordsSelected.Clear(); + int num; + Main.TileInteractionHY = num = -1; + Main.TileInteractionLY = num; + Main.TileInteractionHX = num; + Main.TileInteractionLX = num; + } + bool flag = 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; + if (smart && !flag) + { + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * Main.GamepadCursorAlpha; + int index = 13; + int frameX = 0; + Main.spriteBatch.Draw(Main.cursorTextures[index], new Vector2((float) Main.mouseX, (float) Main.mouseY) + bonus, new Microsoft.Xna.Framework.Rectangle?(Main.cursorTextures[index].Frame(2, frameX: frameX)), color, 0.0f, Main.cursorTextures[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(Main.cursorTextures[index], new Vector2((float) Main.mouseX, (float) Main.mouseY) + bonus, new Microsoft.Xna.Framework.Rectangle?(), white, 0.0f, Main.cursorTextures[index].Size() / 2f, Main.cursorScale, SpriteEffects.None, 0.0f); + } + } + else + { + int index = smart.ToInt(); + Main.spriteBatch.Draw(Main.cursorTextures[index], 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(Main.cursorTextures[index], 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 Vector2 DrawThickCursor(bool smart = false) + { + if (!Main.ThickMouse || 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?(Main.cursorTextures[index1].Frame(2, frameX: frameX)); + origin = Main.cursorTextures[index1].Frame(2, frameX: frameX).Size() / 2f; + mouseBorderColor *= Main.GamepadCursorAlpha; + } + else + { + index1 = 15; + vector2_2 = Vector2.One; + origin = Main.cursorTextures[index1].Size() / 2f; + } + } + Main.spriteBatch.Draw(Main.cursorTextures[index1], 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.expertMode); + if (Main.UseSeedUI) + Main.menuMode = 5000; + else + WorldGen.CreateNewWorld(); + } + + private static Action CreateGoToMenuEvent(int menu) => (Action) (() => + { + Main.menuMode = menu; + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 0; + }); + + protected void DrawMenu(GameTime gameTime) + { + double uiScaleWanted = (double) Main._uiScaleWanted; + Main.UIScale = 1f; + Main._uiScaleWanted = (float) uiScaleWanted; + 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; + Star.UpdateStars(); + Cloud.UpdateClouds(); + Main.holyTiles = 0; + Main.evilTiles = 0; + Main.shroomTiles = 0; + Main.bloodTiles = 0; + Main.bloodTiles = 0; + Main.jungleTiles = 0; + Main.drawingPlayerChat = false; + for (int index = 0; index < Main.numChatLines; ++index) + Main.chatLine[index] = new ChatLine(); + this.DrawFPS(); + Main.screenLastPosition = Main.screenPosition; + Main.screenPosition.Y = (float) (Main.worldSurface * 16.0) - (float) Main.screenHeight; + if (Main.grabSky) + Main.screenPosition.X += (float) (Main.mouseX - Main.screenWidth / 2) * 0.02f; + else + Main.screenPosition.X += 2f; + if ((double) Main.screenPosition.X > 2147483520.0) + Main.screenPosition.X = 0.0f; + if ((double) Main.screenPosition.X < -2147483520.0) + Main.screenPosition.X = 0.0f; + 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); + this.logoRotation += this.logoRotationSpeed * 3E-05f; + if ((double) this.logoRotation > 0.1) + this.logoRotationDirection = -1f; + else if ((double) this.logoRotation < -0.1) + 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 * 1E-05f; + if ((double) this.logoScale > 1.1) + this.logoScaleDirection = -1f; + else if ((double) this.logoScale < 0.9) + 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))); + Main.spriteBatch.Draw(Main.logoTexture, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.logoTexture.Width, Main.logoTexture.Height)), color2, this.logoRotation, new Vector2((float) (Main.logoTexture.Width / 2), (float) (Main.logoTexture.Height / 2)), this.logoScale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.logo2Texture, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.logoTexture.Width, Main.logoTexture.Height)), color3, this.logoRotation, new Vector2((float) (Main.logoTexture.Width / 2), (float) (Main.logoTexture.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; + int num9 = Program.LoadedEverything ? 1 : 0; + if (num9 != 0) + GamepadMainMenuHandler.CanRun = true; + if (num9 == 0) + { + flagArray1[0] = true; + strArray1[0] = string.Format(" {0} {1,-10}", (object) Language.GetTextValue("UI.LoadingCode"), (object) Program.LoadedPercentage.ToString("P0")); + num5 = 1; + } + else + { + 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.chTitle = true; + LanguageManager.Instance.SetLanguage(this.selectedMenu); + Main.menuMode = 0; + Main.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; + Main.PlaySound(11); + } + else if (this.selectedMenu >= 1) + { + Main.chTitle = true; + LanguageManager.Instance.SetLanguage(this.selectedMenu); + Main.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; + Main.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) + Main.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; + Main.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; + Main.PlaySound(10); + Main.menuMode = 7; + } + int index3 = index2 + 1; + strArray1[index3] = Lang.misc[102].Value; + if (this.selectedMenu == index3) + { + WorldGen.WorldGenParam_Evil = 1; + Main.PlaySound(10); + Main.menuMode = 7; + } + int index4 = index3 + 1; + strArray1[index4] = Lang.misc[103].Value; + if (this.selectedMenu == index4) + { + WorldGen.WorldGenParam_Evil = -1; + Main.PlaySound(10); + Main.menuMode = 7; + } + int index5 = index4 + 1; + strArray1[index5] = Language.GetTextValue("UI.Back"); + if (this.selectedMenu == index5 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = -7; + } + int num10 = index5 + 1; + Main.clrInput(); + goto label_627; + case -7: + num2 = 200; + num4 = 60; + numArray1[2] = 30; + numArray1[3] = 30; + numArray3[3] = (byte) 2; + numArray1[4] = 70; + if (this.focusMenu == 2) + { + strArray1[0] = Language.GetTextValue("UI.NormalDescriptionFlavor"); + strArray1[1] = Language.GetTextValue("UI.NormalDescription"); + } + else if (this.focusMenu == 3) + { + strArray1[0] = Language.GetTextValue("UI.ExpertDescriptionFlavor"); + strArray1[1] = Language.GetTextValue("UI.ExpertDescription"); + } + else + 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.Back"); + num5 = 5; + if (this.selectedMenu == 2) + { + Main.expertMode = false; + Main.PlaySound(10); + Main.menuMode = 7; + if (Main.SettingsUnlock_WorldEvil) + Main.menuMode = -71; + } + else if (this.selectedMenu == 3) + { + Main.expertMode = true; + Main.PlaySound(10); + Main.menuMode = 7; + if (Main.SettingsUnlock_WorldEvil) + Main.menuMode = -71; + } + else if (this.selectedMenu == 4 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 16; + } + Main.clrInput(); + goto label_627; + 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; + for (int index6 = 0; index6 < 12; ++index6) + { + string str = ""; + switch (index6) + { + case 0: + str = "Solar"; + break; + case 1: + str = "Vortex"; + break; + case 2: + str = "Nebula"; + break; + case 3: + str = "Stardust"; + break; + case 4: + str = "MoonLord"; + break; + case 5: + str = "MonolithSolar"; + break; + case 6: + str = "MonolithVortex"; + break; + case 7: + str = "MonolithNebula"; + break; + case 8: + str = "MonolithStardust"; + break; + case 9: + str = "Blizzard"; + break; + case 10: + str = "HeatDistortion"; + break; + case 11: + str = "Sandstorm"; + break; + } + if (SkyManager.Instance[str] != null && SkyManager.Instance[str].IsActive()) + SkyManager.Instance.Deactivate(str); + if (Filters.Scene[str].IsActive()) + Filters.Scene[str].Deactivate(); + } + if (Filters.Scene["BloodMoon"].IsActive()) + Filters.Scene["BloodMoon"].Deactivate(); + if (SkyManager.Instance["Martian"].IsActive()) + SkyManager.Instance["Martian"].Deactivate(); + if (SkyManager.Instance["Slime"].IsActive()) + SkyManager.Instance["Slime"].Deactivate(); + int index7 = 0; + num5 = 5; + num4 = 60; + strArray1[index7] = Lang.menu[12].Value; + if (this.selectedMenu == index7) + { + Main.PlaySound(10); + Main.menuMode = 1; + } + int index8 = index7 + 1; + strArray1[index8] = Lang.menu[13].Value; + if (this.selectedMenu == index8) + { + Main.PlaySound(10); + Main.menuMode = 12; + } + int index9 = index8 + 1; + strArray1[index9] = Lang.menu[131].Value; + if (this.selectedMenu == index9) + { + Main.PlaySound(10); + Main.MenuUI.SetState((UIState) Main.AchievementsMenu); + Main.menuMode = 888; + } + int index10 = index9 + 1; + strArray1[index10] = Lang.menu[14].Value; + if (this.selectedMenu == index10) + { + Main.PlaySound(10); + Main.menuMode = 11; + } + int index11 = index10 + 1; + strArray1[index11] = Lang.menu[15].Value; + if (this.selectedMenu == index11) + this.QuitGame(); + int num11 = index11 + 1; + goto label_627; + case 1: + Main.MenuUI.SetState((UIState) Main._characterSelectMenu); + Main.menuMode = 888; + goto label_627; + case 2: + flag4 = true; + if (this.selectedMenu == 0) + { + Main.menuMode = 17; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.hairColor; + } + if (this.selectedMenu == 1) + { + Main.menuMode = 18; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.eyeColor; + } + if (this.selectedMenu == 2) + { + Main.menuMode = 19; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.skinColor; + } + if (this.selectedMenu == 3) + { + Main.menuMode = 20; + Main.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) + { + Main.PlaySound(20); + Main.PendingPlayer.Male = false; + } + else + { + Main.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) + { + Main.PlaySound(10); + Main.menuMode = 222; + } + if (this.selectedMenu == 7) + { + Main.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 num12 = (float) Main.rand.Next(60, 120) * 0.01f; + if ((double) num12 > 1.0) + num12 = 1f; + Main.PendingPlayer.skinColor.R = (byte) ((double) Main.rand.Next(240, (int) byte.MaxValue) * (double) num12); + Main.PendingPlayer.skinColor.G = (byte) ((double) Main.rand.Next(110, 140) * (double) num12); + Main.PendingPlayer.skinColor.B = (byte) ((double) Main.rand.Next(75, 110) * (double) num12); + 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(10); + } + 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; + Main.PlaySound(11); + Main.menuMode = 1; + goto label_627; + } + else if (this.selectedMenu == 6) + { + Main.PlaySound(10); + Main.PendingPlayer.name = ""; + Main.menuMode = 3; + Main.clrInput(); + goto label_627; + } + else + goto label_627; + case 3: + Main.MenuUI.SetState((UIState) new UIVirtualKeyboard(Lang.menu[45].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnCharacterNamed), Main.CreateGoToMenuEvent(2))); + Main.menuMode = 888; + goto label_627; + 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); + Main.PlaySound(10); + Main.menuMode = 1; + goto label_627; + } + else if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 1; + goto label_627; + } + else + goto label_627; + case 6: + Main.MenuUI.SetState((UIState) Main._worldSelectMenu); + Main.menuMode = 888; + goto label_627; + 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_627; + 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].IsExpertMode) + 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) + { + Main.PlaySound(12); + Main.menuSkip -= 5; + if (Main.menuSkip < 0) + { + Main.menuSkip = 0; + goto label_627; + } + else + goto label_627; + } + else if (this.selectedMenu == 6 && Main.menuSkip < Main.WorldList.Count - 7) + { + Main.PlaySound(12); + Main.menuSkip += 5; + if (Main.menuSkip >= Main.PlayerList.Count - 7) + { + Main.menuSkip = Main.WorldList.Count - 7; + goto label_627; + } + else + goto label_627; + } + else if (this.selectedMenu == 7 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 6; + goto label_627; + } + else if (this.selectedMenu >= 0) + { + Main.selectedWorld = this.selectedMenu + Main.menuSkip; + Main.PlaySound(10); + Main.menuMode = 9; + goto label_627; + } + else + goto label_627; + 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); + Main.PlaySound(10); + Main.menuMode = 6; + goto label_627; + } + else if (this.selectedMenu == 2 | flag5) + { + Main.PlaySound(11); + Main.menuMode = 6; + goto label_627; + } + else + goto label_627; + case 10: + num5 = 1; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + goto label_627; + 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) + { + Main.PlaySound(10); + Main.menuMode = 112; + } + int index17 = index16 + 1; + strArray1[index17] = Lang.menu[210].Value; + if (this.selectedMenu == index17) + { + Main.PlaySound(10); + Main.menuMode = 1112; + } + int index18 = index17 + 1; + strArray1[index18] = Lang.menu[63].Value; + if (this.selectedMenu == index18) + { + Main.PlaySound(10); + Main.menuMode = 1111; + } + int index19 = index18 + 1; + strArray1[index19] = Lang.menu[65].Value; + if (this.selectedMenu == index19) + { + Main.PlaySound(11); + Main.menuMode = 26; + } + int index20 = index19 + 1; + strArray1[index20] = Lang.menu[218].Value; + if (this.selectedMenu == index20) + { + Main.PlaySound(10); + Main.menuMode = 1125; + } + int index21 = index20 + 1; + strArray1[index21] = Lang.menu[219].Value; + if (this.selectedMenu == index21) + { + Main.PlaySound(10); + Main.menuMode = 1127; + } + int index22 = index21 + 1; + strArray1[index22] = Lang.menu[103].Value; + if (this.selectedMenu == index22) + { + Main.PlaySound(10); + Main.menuMode = 1213; + } + int index23 = index22 + 1; + strArray1[index23] = Lang.menu[5].Value; + if (this.selectedMenu == index23 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 0; + Main.SaveSettings(); + goto label_627; + } + else + goto label_627; + case 12: + int num13 = 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 + num13] = Lang.menu[88].Value; + strArray1[2 + num13] = Lang.menu[5].Value; + if (this.selectedMenu == 0) + { + Main.LoadPlayers(); + Main.menuMultiplayer = true; + Main.PlaySound(10); + Main.menuMode = 1; + } + else if (this.selectedMenu == 1 + num13) + { + Main.LoadPlayers(); + Main.PlaySound(10); + Main.menuMode = 1; + Main.menuMultiplayer = true; + Main.menuServer = true; + } + else if (this.selectedMenu == 1) + { + Main.PlaySound(10); + SocialAPI.Friends.OpenJoinInterface(); + } + else if (this.selectedMenu == 2 + num13 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 0; + } + num5 = 3 + num13; + goto label_627; + 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) + Main.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]; + if (Netplay.SetRemoteIP(Main.getIP)) + { + Main.menuMode = 10; + Netplay.StartTcpClient(); + } + } + if (this.selectedMenu == 10 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 1; + } + if (this.selectedMenu == 9 || !flagArray2[2] && Main.inputTextEnter) + { + Main.PlaySound(12); + Main.menuMode = 131; + Main.clrInput(); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + 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; + Main.PlaySound(10); + WorldGen.setWorldSize(); + goto label_627; + } + else + goto label_627; + 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 num14 = 51; + if (this.focusMenu == 0) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 9; + if (this.selectedMenu == 0) + { + Main.PlaySound(12); + ++Main.PendingPlayer.hair; + if (Main.PendingPlayer.hair >= num14) + Main.PendingPlayer.hair = 0; + } + else if (this.selectedMenu2 == 0) + { + Main.PlaySound(12); + --Main.PendingPlayer.hair; + if (Main.PendingPlayer.hair < 0) + Main.PendingPlayer.hair = num14 - 1; + } + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 2; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + case 20: + flag4 = true; + if (this.selectedMenu == 0) + { + Main.menuMode = 21; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.shirtColor; + } + if (this.selectedMenu == 1) + { + Main.menuMode = 22; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.underShirtColor; + } + if (this.selectedMenu == 2) + { + Main.menuMode = 23; + Main.PlaySound(10); + Main.selColor = Main.PendingPlayer.pantsColor; + } + if (this.selectedMenu == 3) + { + Main.selColor = Main.PendingPlayer.shoeColor; + Main.menuMode = 24; + Main.PlaySound(10); + } + if (this.selectedMenu == 5 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 2; + } + if (this.selectedMenu == 4) + { + Main.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_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + } + else if (this.selectedMenu == 14) + { + Main.ResetKeyBindings(); + Main.setKey = -1; + Main.PlaySound(11); + } + else if (this.selectedMenu >= 0) + Main.setKey = this.selectedMenu; + if (Main.setKey >= 0) + { + Microsoft.Xna.Framework.Input.Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + if (pressedKeys.Length != 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_627; + } + else + goto label_627; + } + else + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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) + Main.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_627; + } + else if (this.selectedMenu == 2 || Main.inputTextEnter || Main.autoPass) + { + string str1 = "-autoshutdown -password \"" + Netplay.ServerPassword + "\" -lang " + (object) Language.ActiveCulture.LegacyId; + string str2 = !Main.ActiveWorldFileData.IsCloudSave ? str1 + " -world \"" + Main.worldPathName + "\"" : str1 + " -cloudworld \"" + Main.worldPathName + "\""; + this.tServer.StartInfo.FileName = "TerrariaServer.exe"; + this.tServer.StartInfo.Arguments = str2; + if (Main.libPath != "") + { + ProcessStartInfo startInfo = this.tServer.StartInfo; + startInfo.Arguments = startInfo.Arguments + " -loadlib " + Main.libPath; + } + this.tServer.StartInfo.UseShellExecute = false; + this.tServer.StartInfo.CreateNoWindow = true; + if (SocialAPI.Network != null) + SocialAPI.Network.LaunchLocalServer(this.tServer, Main.MenuServerMode); + else + this.tServer.Start(); + Netplay.SetRemoteIP("127.0.0.1"); + Main.autoPass = true; + Main.statusText = Lang.menu[8].Value; + Netplay.StartTcpClient(); + Main.menuMode = 10; + goto label_627; + } + else + goto label_627; + case 100: + num5 = 1; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + goto label_627; + case 111: + for (int index30 = 0; index30 < 9; ++index30) + numArray4[index30] = 0.85f; + bool flag7 = true; + System.Drawing.Rectangle bounds = Screen.FromPoint(((Form) Control.FromHandle(Main.instance.Window.Handle)).Location).Bounds; + if (bounds.Width > Main.maxScreenW || bounds.Height > Main.maxScreenH) + flag7 = false; + num2 = 210; + num4 = 55; + int index31 = 0; + strArray1[index31] = Lang.menu[73].Value + ": " + (object) Main.PendingResolutionWidth + "x" + (object) Main.PendingResolutionHeight; + if (this.selectedMenu == index31) + { + Main.PlaySound(12); + int num15 = 0; + for (int index32 = 0; index32 < Main.numDisplayModes; ++index32) + { + if (Main.displayWidth[index32] == Main.PendingResolutionWidth && Main.displayHeight[index32] == Main.PendingResolutionHeight) + { + num15 = index32; + break; + } + } + int index33 = (num15 + 1) % Main.numDisplayModes; + Main.PendingResolutionWidth = Main.displayWidth[index33]; + Main.PendingResolutionHeight = Main.displayHeight[index33]; + } + int index34 = index31 + 1; + if (flag7) + { + strArray1[index34] = Lang.menu[Main.PendingBorderlessState ? 245 : 246].Value; + if (this.selectedMenu == index34) + { + Main.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.screenBorderless = Main.PendingBorderlessState; + Main.screenBorderlessPendingResizes = Main.screenBorderless ? 6 : 0; + Main.SetResolution(Main.PendingResolutionWidth, Main.PendingResolutionHeight); + } + Main.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; + Main.PlaySound(11); + } + num5 = index35 + 1; + goto label_627; + 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) + { + Main.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) + { + Main.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) + { + Main.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) + { + Main.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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + case 131: + int num16 = 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) + Main.PlaySound(12); + strArray1[0] = Lang.menu[90].Value; + flagArray2[2] = true; + if (Main.getPort != "") + { + bool flag8 = false; + try + { + num16 = Convert.ToInt32(Main.getPort); + if (num16 > 0) + { + if (num16 <= (int) ushort.MaxValue) + flag8 = true; + } + } + catch + { + } + if (flag8) + 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; + Main.PlaySound(11); + Main.menuMode = 1; + } + if (this.selectedMenu == 2 || !flagArray2[2] && Main.inputTextEnter) + { + Netplay.ListenPort = num16; + Main.autoPass = false; + if (Netplay.SetRemoteIP(Main.getIP)) + { + Main.menuMode = 10; + Netplay.StartTcpClient(); + goto label_627; + } + else + goto label_627; + } + else + goto label_627; + 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 + ".bak", Main.worldPathName, Main.ActiveWorldFileData.IsCloudSave); + Main.PlaySound(10); + WorldGen.playWorld(); + Main.menuMode = 10; + } + else + { + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + } + } + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_627; + } + else + goto label_627; + 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_627; + } + else if (this.selectedMenu == 2) + { + Main.menuMode = 2; + Main.PendingPlayer.difficulty = (byte) 1; + goto label_627; + } + else if (this.selectedMenu == 3) + { + Main.PendingPlayer.difficulty = (byte) 2; + Main.menuMode = 2; + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + if (SocialAPI.Network != null) + { + SocialAPI.Network.CancelJoin(); + goto label_627; + } + else + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(12); + goto label_627; + case 2: + Main.MenuServerMode ^= ServerMode.FriendsCanJoin; + Main.PlaySound(12); + goto label_627; + case 3: + Main.MenuServerMode ^= ServerMode.FriendsOfFriends; + Main.PlaySound(12); + goto label_627; + case 4: + Main.clrInput(); + Netplay.ServerPassword = ""; + Main.GetInputText(""); + Main.autoPass = false; + Main.menuMode = 30; + Main.PlaySound(10); + goto label_627; + case 5: + Main.menuMode = 6; + Main.PlaySound(11); + goto label_627; + default: + goto label_627; + } + case 1111: + num2 = 186; + num4 = 32; + for (int index42 = 0; index42 < 11; ++index42) + numArray4[index42] = 0.6f; + numArray1[11] = 8; + num5 = 12; + strArray1[0] = !Main.graphics.IsFullScreen ? Lang.menu[50].Value : Lang.menu[49].Value; + Main.bgScroll = (int) Math.Round((1.0 - (double) Main.caveParallax) * 500.0); + strArray1[1] = Lang.menu[51].Value; + strArray1[2] = Lang.menu[52].Value; + strArray1[3] = Lang.menu[247 + Main.FrameSkipMode].Value; + switch (Lighting.lightMode) + { + case 0: + strArray1[4] = Lang.menu[55].Value; + break; + case 1: + strArray1[4] = Lang.menu[56].Value; + break; + case 2: + strArray1[4] = Lang.menu[57].Value; + break; + case 3: + strArray1[4] = Lang.menu[58].Value; + break; + } + strArray1[5] = Lighting.LightingThreads != 0 ? Lang.menu[116].Value + " " + (object) (Lighting.LightingThreads + 1) : Lang.menu[116].Value + " " + Lang.menu[117].Value; + switch (Main.qaStyle) + { + case 0: + strArray1[6] = Lang.menu[59].Value; + break; + case 1: + strArray1[6] = Lang.menu[60].Value; + break; + case 2: + strArray1[6] = Lang.menu[61].Value; + break; + default: + strArray1[6] = Lang.menu[62].Value; + break; + } + strArray1[7] = !Main.BackgroundEnabled ? Lang.menu[101].Value : Lang.menu[100].Value; + strArray1[10] = Language.GetTextValue("UI.Effects"); + strArray1[11] = Lang.menu[5].Value; + if (this.selectedMenu == 7) + { + Main.PlaySound(12); + Main.BackgroundEnabled = !Main.BackgroundEnabled; + } + if (this.selectedMenu == 11 | flag5) + { + flag5 = false; + Main.PlaySound(11); + Main.SaveSettings(); + Main.menuMode = 11; + } + strArray1[9] = Main.SettingsEnabled_MinersWobble ? Lang.menu[250].Value : Lang.menu[251].Value; + if (this.selectedMenu == 9) + { + Main.PlaySound(12); + Main.SettingsEnabled_MinersWobble = !Main.SettingsEnabled_MinersWobble; + } + strArray1[8] = ChildSafety.Disabled ? Lang.menu[132].Value : Lang.menu[133].Value; + if (this.selectedMenu == 8) + { + Main.PlaySound(12); + ChildSafety.Disabled = !ChildSafety.Disabled; + } + if (this.selectedMenu == 6) + { + Main.PlaySound(12); + ++Main.qaStyle; + if (Main.qaStyle > 3) + Main.qaStyle = 0; + } + if (this.selectedMenu == 5) + { + Main.PlaySound(12); + ++Lighting.LightingThreads; + if (Lighting.LightingThreads > Environment.ProcessorCount - 1) + Lighting.LightingThreads = 0; + } + if (this.selectedMenu == 4) + { + Main.PlaySound(12); + ++Lighting.lightMode; + if (Lighting.lightMode >= 4) + Lighting.lightMode = 0; + } + if (this.selectedMenu == 3) + { + Main.PlaySound(12); + ++Main.FrameSkipMode; + if (Main.FrameSkipMode < 0 || Main.FrameSkipMode > 2) + Main.FrameSkipMode = 0; + } + if (this.selectedMenu == 2) + { + Main.PlaySound(11); + Main.menuMode = 28; + } + if (this.selectedMenu == 10) + { + Main.PlaySound(11); + Main.menuMode = 2008; + } + if (this.selectedMenu == 1) + { + Main.PlaySound(10); + Main.menuMode = 111; + } + if (this.selectedMenu == 0) + { + Main.ToggleFullScreen(); + goto label_627; + } + else + goto label_627; + case 1112: + num2 = 210; + num4 = 42; + num5 = 7; + numArray1[num5 - 1] = 18; + for (int index43 = 0; index43 < num5; ++index43) + numArray4[index43] = 0.75f; + int index44 = 0; + strArray1[index44] = !Main.showItemText ? Lang.menu[72].Value : Lang.menu[71].Value; + if (this.selectedMenu == index44) + { + Main.PlaySound(12); + Main.showItemText = !Main.showItemText; + } + int index45 = index44 + 1; + strArray1[index45] = Lang.menu[123].Value + " " + Lang.menu[124 + Main.invasionProgressMode].Value; + if (this.selectedMenu == index45) + { + Main.PlaySound(12); + ++Main.invasionProgressMode; + if (Main.invasionProgressMode >= 3) + Main.invasionProgressMode = 0; + } + int index46 = index45 + 1; + strArray1[index46] = Main.placementPreview ? Lang.menu[128].Value : Lang.menu[129].Value; + if (this.selectedMenu == index46) + { + Main.PlaySound(12); + Main.placementPreview = !Main.placementPreview; + } + int index47 = index46 + 1; + strArray1[index47] = ItemSlot.Options.HighlightNewItems ? Lang.inter[117].Value : Lang.inter[116].Value; + if (this.selectedMenu == index47) + { + Main.PlaySound(12); + ItemSlot.Options.HighlightNewItems = !ItemSlot.Options.HighlightNewItems; + } + int index48 = index47 + 1; + strArray1[index48] = Main.MouseShowBuildingGrid ? Lang.menu[229].Value : Lang.menu[230].Value; + if (this.selectedMenu == index48) + { + Main.PlaySound(12); + Main.MouseShowBuildingGrid = !Main.MouseShowBuildingGrid; + } + int index49 = index48 + 1; + strArray1[index49] = Main.GamepadDisableInstructionsDisplay ? Lang.menu[241].Value : Lang.menu[242].Value; + if (this.selectedMenu == index49) + { + Main.PlaySound(12); + Main.GamepadDisableInstructionsDisplay = !Main.GamepadDisableInstructionsDisplay; + } + int index50 = index49 + 1; + strArray1[index50] = Lang.menu[5].Value; + if (this.selectedMenu == index50 | flag5) + { + flag5 = false; + Main.menuMode = 11; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + case 1125: + num2 = 232; + num4 = 38; + num5 = 7; + numArray1[num5 - 1] = 18; + for (int index51 = 0; index51 < num5; ++index51) + numArray4[index51] = 0.73f; + int index52 = 0; + strArray1[index52] = Lang.menu[64].Value; + if (this.selectedMenu == index52) + { + Main.PlaySound(10); + Main.selColor = Main.mouseColor; + Main.mouseColorSlider.SetHSL(Main.mouseColor); + Main.menuMode = 25; + } + int index53 = index52 + 1; + strArray1[index53] = Lang.menu[217].Value; + if (this.selectedMenu == index53) + { + Main.PlaySound(10); + Main.selColor = Main.MouseBorderColor; + Main.mouseBorderColorSlider.SetHSL(Main.mouseColor); + Main.menuMode = 252; + } + int index54 = index53 + 1; + strArray1[index54] = Main.cSmartCursorToggle ? Lang.menu[121].Value : Lang.menu[122].Value; + if (this.selectedMenu == index54) + { + Main.PlaySound(12); + Main.cSmartCursorToggle = !Main.cSmartCursorToggle; + } + int index55 = index54 + 1; + strArray1[index55] = Player.SmartCursorSettings.SmartAxeAfterPickaxe ? Lang.menu[214].Value : Lang.menu[213].Value; + if (this.selectedMenu == index55) + { + Main.PlaySound(12); + Player.SmartCursorSettings.SmartAxeAfterPickaxe = !Player.SmartCursorSettings.SmartAxeAfterPickaxe; + } + int index56 = index55 + 1; + strArray1[index56] = Player.SmartCursorSettings.SmartBlocksEnabled ? Lang.menu[215].Value : Lang.menu[216].Value; + if (this.selectedMenu == index56) + { + Main.PlaySound(12); + Player.SmartCursorSettings.SmartBlocksEnabled = !Player.SmartCursorSettings.SmartBlocksEnabled; + } + int index57 = index56 + 1; + switch (LockOnHelper.UseMode) + { + case LockOnHelper.LockOnMode.FocusTarget: + strArray1[index57] = Lang.menu[232].Value; + break; + case LockOnHelper.LockOnMode.TargetClosest: + strArray1[index57] = Lang.menu[233].Value; + break; + case LockOnHelper.LockOnMode.ThreeDS: + strArray1[index57] = Lang.menu[234].Value; + break; + } + if (this.selectedMenu == index57) + { + Main.PlaySound(12); + LockOnHelper.CycleUseModes(); + } + int index58 = index57 + 1; + strArray1[index58] = Lang.menu[5].Value; + if (this.selectedMenu == index58 | flag5) + { + flag5 = false; + Main.menuMode = 11; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + case 1127: + num2 = 250; + num4 = 52; + num5 = 5; + numArray1[num5 - 1] = 18; + for (int index59 = 0; index59 < num5; ++index59) + numArray4[index59] = 0.78f; + int index60 = 0; + strArray1[index60] = Main.ReversedUpDownArmorSetBonuses ? Lang.menu[220].Value : Lang.menu[221].Value; + if (this.selectedMenu == index60) + { + Main.PlaySound(12); + Main.ReversedUpDownArmorSetBonuses = !Main.ReversedUpDownArmorSetBonuses; + } + int index61 = index60 + 1; + strArray1[index61] = Player.SmartCursorSettings.SmartWallReplacement ? Lang.menu[226].Value : Lang.menu[225].Value; + if (this.selectedMenu == index61) + { + Main.PlaySound(12); + Player.SmartCursorSettings.SmartWallReplacement = !Player.SmartCursorSettings.SmartWallReplacement; + } + int index62 = index61 + 1; + strArray1[index62] = ItemSlot.Options.DisableLeftShiftTrashCan ? Lang.menu[224].Value : Lang.menu[223].Value; + if (this.selectedMenu == index62) + { + Main.PlaySound(12); + ItemSlot.Options.DisableLeftShiftTrashCan = !ItemSlot.Options.DisableLeftShiftTrashCan; + } + int index63 = index62 + 1; + strArray1[index63] = Lang.menu[222].Value; + if (this.selectedMenu == index63) + { + Main.PlaySound(10); + Main.MenuUI.SetState((UIState) Main.ManageControlsMenu); + Main.menuMode = 888; + } + int index64 = index63 + 1; + strArray1[index64] = Lang.menu[5].Value; + if (this.selectedMenu == index64 | flag5) + { + flag5 = false; + Main.menuMode = 11; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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; + Main.PlaySound(11); + goto label_627; + } + else + goto label_627; + 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_627; + 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 index65 = 0; index65 < 6; ++index65) + { + flagArray4[index65] = true; + numArray4[index65] = 0.55f; + numArray2[index65] = -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; + Main.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; + Main.PlaySound(11); + } + else if (this.selectedMenu >= 0) + Main.setKey = this.selectedMenu; + if (Main.setKey >= 0) + { + Microsoft.Xna.Framework.Input.Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + if (pressedKeys.Length != 0) + { + string str = string.Concat((object) pressedKeys[0]); + if (str != "None") + { + if (Main.setKey == 0) + Main.cMapStyle = str; + if (Main.setKey == 1) + Main.cMapFull = str; + if (Main.setKey == 2) + Main.cMapZoomIn = str; + if (Main.setKey == 3) + Main.cMapZoomOut = str; + if (Main.setKey == 4) + Main.cMapAlphaUp = str; + if (Main.setKey == 5) + Main.cMapAlphaDown = str; + Main.setKey = -1; + goto label_627; + } + else + goto label_627; + } + else + goto label_627; + } + else + goto label_627; + default: + goto label_627; + } + } + num5 = 2; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + strArray1[1] = Lang.menu[6].Value; + if (this.selectedMenu == 1 | flag5) + { + flag5 = false; + Netplay.disconnect = true; + Netplay.Connection.Socket.Close(); + Main.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + try + { + this.tServer.Kill(); + break; + } + catch + { + break; + } + } + else + break; + } + } +label_627: + 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 num17 = this.focusMenu; + if (Main.menuMode != menuMode2) + { + Main.blockMouse = true; + Main.menuSkip = 0; + num5 = 0; + if (PlayerInput.UsingGamepad && Main.InvisibleCursorForGamepad) + { + this.focusMenu = num17 = -1; + int num18; + PlayerInput.MouseY = num18 = 0; + PlayerInput.MouseX = num18; + Main.mouseY = num18; + Main.mouseX = num18; + } + for (int index66 = 0; index66 < Main.maxMenuItems; ++index66) + this.menuItemScale[index66] = 0.8f; + } + if (!Main.mouseLeft) + Main.blockMouse = true; + this.selectedMenu = -1; + this.selectedMenu2 = -1; + this.focusMenu = -1; + 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 num19 = num8; + int num20 = Main.screenWidth / 2 - this.hueTexture.Width / 2; + int num21 = 167; + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float Hue = hsl.X; + float Saturation1 = hsl.Y; + float Luminosity1 = hsl.Z; + float num22 = (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 = num22; + } + else + { + Hue = Main.hBar; + Saturation1 = Main.sBar; + Luminosity1 = Main.lBar; + float aBar = Main.aBar; + } + Main.spriteBatch.Draw(this.hueTexture, new Vector2((float) num20, (float) num19), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num19 - 4 && Main.mouseY < num19 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num20, (float) num19), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num20 + (float) (this.hueTexture.Width - 2) * Main.hBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num19 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num19 - 4 && Main.mouseY < num19 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 1) + { + Main.focusColor = 1; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5; + if (Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num20) / (float) this.hueTexture.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) num20, (float) num19) + Main.colorBarTexture.Size() / 2f); + int num23 = num19 + 26; + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num20, (float) num23), Microsoft.Xna.Framework.Color.White); + for (int index67 = 0; index67 <= num21; ++index67) + { + float Saturation2 = (float) index67 / (float) num21; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation2, Luminosity1); + Main.spriteBatch.Draw(Main.colorBlipTexture, new Vector2((float) (num20 + index67 + 5), (float) (num23 + 4)), rgb); + } + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num23 - 4 && Main.mouseY < num23 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num20, (float) num23), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num20 + (float) (this.hueTexture.Width - 2) * Main.sBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num23 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num23 - 4 && Main.mouseY < num23 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 2) + { + Main.focusColor = 2; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6; + if (Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num20) / (float) this.hueTexture.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) num20, (float) num23) + Main.colorBarTexture.Size() / 2f); + int num24 = num23 + 26; + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num20, (float) num24), Microsoft.Xna.Framework.Color.White); + float num25 = 0.15f; + if (Main.menuMode == 252) + num25 = 0.0f; + for (int index68 = 0; index68 <= num21; ++index68) + { + float Luminosity2 = (float) index68 / (float) num21; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity2); + Main.spriteBatch.Draw(Main.colorBlipTexture, new Vector2((float) (num20 + index68 + 5), (float) (num24 + 4)), rgb); + } + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num20, (float) num24), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num20 + (float) (this.hueTexture.Width - 2) * (float) (((double) Main.lBar - (double) num25) / (1.0 - (double) num25)) - (float) (Main.colorSliderTexture.Width / 2), (float) (num24 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 3) + { + Main.focusColor = 3; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7; + if (Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num26 = (float) (Main.mouseX - num20) / (float) this.hueTexture.Width; + if ((double) num26 < 0.0) + num26 = 0.0f; + if ((double) num26 > 1.0) + num26 = 1f; + Luminosity1 = num26 * (1f - num25) + num25; + Main.lBar = Luminosity1; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num20, (float) num24) + Main.colorBarTexture.Size() / 2f); + bool flag9 = false; + if (Main.menuMode == 252) + { + int num27 = num24 + 26; + flag9 = true; + Main.spriteBatch.Draw(Main.colorBarTexture, new Vector2((float) num20, (float) num27), Microsoft.Xna.Framework.Color.White); + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity1); + for (int index69 = 0; index69 <= num21; ++index69) + { + float num28 = (float) index69 / (float) num21; + Microsoft.Xna.Framework.Color color4 = rgb * num28; + Main.spriteBatch.Draw(Main.colorBlipTexture, new Vector2((float) (num20 + index69 + 5), (float) (num27 + 4)), color4); + } + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num27 - 4 && Main.mouseY < num27 + this.hueTexture.Height + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 4) + Main.spriteBatch.Draw(Main.colorHighlightTexture, new Vector2((float) num20, (float) num27), Main.OurFavoriteColor); + Main.spriteBatch.Draw(Main.colorSliderTexture, new Vector2((float) num20 + (float) (this.hueTexture.Width - 2) * Main.aBar - (float) (Main.colorSliderTexture.Width / 2), (float) (num27 - Main.colorSliderTexture.Height / 2 + this.hueTexture.Height / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num20 - 4 && Main.mouseX < num20 + this.hueTexture.Width + 4 && Main.mouseY > num27 - 4 && Main.mouseY < num27 + this.hueTexture.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 num29 = (float) (Main.mouseX - num20) / (float) this.hueTexture.Width; + if ((double) num29 < 0.0) + num29 = 0.0f; + if ((double) num29 > 1.0) + num29 = 1f; + Main.aBar = num29; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num20, (float) num27) + Main.colorBarTexture.Size() / 2f); + } + if (focusColor != Main.focusColor) + Main.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 str3 = ""; + for (int index70 = 0; index70 < 6; ++index70) + { + int num30 = num8; + int num31 = 370 + Main.screenWidth / 2 - 400; + if (index70 == 0) + str3 = Lang.menu[95].Value; + if (index70 == 1) + { + str3 = Lang.menu[96].Value; + num30 += 30; + } + if (index70 == 2) + { + str3 = Lang.menu[97].Value; + num30 += 60; + } + if (index70 == 3) + { + str3 = string.Concat((object) Main.selColor.R); + num31 += 90; + } + if (index70 == 4) + { + str3 = string.Concat((object) Main.selColor.G); + num31 += 90; + num30 += 30; + } + if (index70 == 5) + { + str3 = string.Concat((object) Main.selColor.B); + num31 += 90; + num30 += 60; + } + for (int index71 = 0; index71 < 5; ++index71) + { + Microsoft.Xna.Framework.Color color5 = Microsoft.Xna.Framework.Color.Black; + if (index71 == 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 num32 = (int) color5.R - ((int) byte.MaxValue - maxValue); + if (num32 < 0) + num32 = 0; + color5 = new Microsoft.Xna.Framework.Color((int) (byte) num32, (int) (byte) num32, (int) (byte) num32, (int) (byte) maxValue); + int num33 = 0; + int num34 = 0; + if (index71 == 0) + num33 = -2; + if (index71 == 1) + num33 = 2; + if (index71 == 2) + num34 = -2; + if (index71 == 3) + num34 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, str3, new Vector2((float) (num31 + num33), (float) (num30 + num34)), color5, 0.0f, new Vector2(), 0.5f, SpriteEffects.None, 0.0f); + } + } + bool flag10 = false; + for (int index72 = 0; index72 < 2; ++index72) + { + for (int index73 = 0; index73 < 3; ++index73) + { + int num35 = num8 + index73 * 30 - 12; + int num36 = 360 + Main.screenWidth / 2 - 400; + float num37 = 0.9f; + int num38; + if (index72 == 0) + { + num38 = num36 - 70; + num35 += 2; + } + else + num38 = num36 - 40; + string str4 = "-"; + if (index72 == 1) + str4 = "+"; + Vector2 vector2 = new Vector2(24f, 24f); + int num39 = 142; + if (Main.mouseX > num38 && (double) Main.mouseX < (double) num38 + (double) vector2.X && Main.mouseY > num35 + 13 && (double) Main.mouseY < (double) (num35 + 13) + (double) vector2.Y) + { + if (Main.focusColor != (index72 + 1) * (index73 + 10)) + Main.PlaySound(12); + Main.focusColor = (index72 + 1) * (index73 + 10); + flag10 = true; + num39 = (int) byte.MaxValue; + if (Main.mouseLeft) + { + if (Main.colorDelay <= 1) + { + Main.colorDelay = Main.colorDelay != 0 ? 3 : 40; + int num40 = index72; + if (index72 == 0) + { + num40 = -1; + if ((int) Main.selColor.R + (int) Main.selColor.G + (int) Main.selColor.B <= 150) + num40 = 0; + } + if (index73 == 0 && (int) Main.selColor.R + num40 >= 0 && (int) Main.selColor.R + num40 <= (int) byte.MaxValue) + Main.selColor.R += (byte) num40; + if (index73 == 1 && (int) Main.selColor.G + num40 >= 0 && (int) Main.selColor.G + num40 <= (int) byte.MaxValue) + Main.selColor.G += (byte) num40; + if (index73 == 2 && (int) Main.selColor.B + num40 >= 0 && (int) Main.selColor.B + num40 <= (int) byte.MaxValue) + Main.selColor.B += (byte) num40; + } + --Main.colorDelay; + } + else + Main.colorDelay = 0; + } + for (int index74 = 0; index74 < 5; ++index74) + { + Microsoft.Xna.Framework.Color color6 = Microsoft.Xna.Framework.Color.Black; + if (index74 == 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 num41 = (int) color6.R - ((int) byte.MaxValue - num39); + if (num41 < 0) + num41 = 0; + color6 = new Microsoft.Xna.Framework.Color((int) (byte) num41, (int) (byte) num41, (int) (byte) num41, (int) (byte) num39); + int num42 = 0; + int num43 = 0; + if (index74 == 0) + num42 = -2; + if (index74 == 1) + num42 = 2; + if (index74 == 2) + num43 = -2; + if (index74 == 3) + num43 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, str4, new Vector2((float) (num38 + num42), (float) (num35 + num43)), color6, 0.0f, new Vector2(), num37, SpriteEffects.None, 0.0f); + } + } + } + if (!flag10) + { + Main.focusColor = 0; + Main.colorDelay = 0; + } + } + if (flag2) + { + int num44 = 320; + string text = ""; + for (int index75 = 0; index75 < 6; ++index75) + { + int num45 = num44; + int num46 = 370 + Main.screenWidth / 2 - 400; + switch (index75) + { + case 0: + text = Lang.menu[98].Value; + num45 += 30; + break; + case 1: + text = Lang.menu[99].Value; + break; + case 2: + text = Lang.menu[119].Value; + num45 += 60; + break; + case 3: + text = Math.Round((double) Main.musicVolume * 100.0).ToString() + "%"; + num46 += 90; + break; + case 4: + text = Math.Round((double) Main.soundVolume * 100.0).ToString() + "%"; + num46 += 90; + num45 += 30; + break; + case 5: + text = Math.Round((double) Main.ambientVolume * 100.0).ToString() + "%"; + num46 += 90; + num45 += 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 num47 = (int) textColor.R - ((int) byte.MaxValue - maxValue); + if (num47 < 0) + num47 = 0; + textColor = new Microsoft.Xna.Framework.Color((int) (byte) num47, (int) (byte) num47, (int) (byte) num47, (int) (byte) maxValue); + Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontDeathText, text, (float) num46, (float) num45, 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((float) (Main.screenWidth / 2 - 40), (float) (num44 - 18 + 30)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - Main.colorBarTexture.Size() * new Vector2(0.5f, 0.0f)); + float num48 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.musicVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 3) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 2; + IngameOptions.rightHover = 3; + if (Main.mouseLeft && IngameOptions.rightLock == 3) + Main.musicVolume = num48; + } + IngameOptions.valuePosition = new Vector2((float) (Main.screenWidth / 2 - 40), (float) (num44 - 18 + 60)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - Main.colorBarTexture.Size() * new Vector2(0.5f, 0.0f)); + float num49 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.soundVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 2) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 3; + IngameOptions.rightHover = 2; + if (Main.mouseLeft && IngameOptions.rightLock == 2) + Main.soundVolume = num49; + } + IngameOptions.valuePosition = new Vector2((float) (Main.screenWidth / 2 - 40), (float) (num44 - 18 + 90)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - Main.colorBarTexture.Size() * new Vector2(0.5f, 0.0f)); + float num50 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.ambientVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 4) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 4; + IngameOptions.rightHover = 4; + if (Main.mouseLeft && IngameOptions.rightLock == 4) + Main.ambientVolume = num50; + } + if (IngameOptions.rightHover != -1) + IngameOptions.rightLock = IngameOptions.rightHover; + if (IngameOptions.rightHover != rightHover) + Main.PlaySound(12); + } + if (flag3) + { + int num51 = 400; + string str = ""; + for (int index76 = 0; index76 < 4; ++index76) + { + int num52 = num51; + int num53 = 370 + Main.screenWidth / 2 - 400; + if (index76 == 0) + str = Lang.menu[52].Value + ": " + (object) Main.bgScroll; + for (int index77 = 0; index77 < 5; ++index77) + { + Microsoft.Xna.Framework.Color color7 = Microsoft.Xna.Framework.Color.Black; + if (index77 == 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 num54 = (int) color7.R - ((int) byte.MaxValue - maxValue); + if (num54 < 0) + num54 = 0; + color7 = new Microsoft.Xna.Framework.Color((int) (byte) num54, (int) (byte) num54, (int) (byte) num54, (int) (byte) maxValue); + int num55 = 0; + int num56 = 0; + if (index77 == 0) + num55 = -2; + if (index77 == 1) + num55 = 2; + if (index77 == 2) + num56 = -2; + if (index77 == 3) + num56 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, str, new Vector2((float) (num53 + num55), (float) (num52 + num56)), 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) (num51 + 12)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - Main.colorBarTexture.Size() * new Vector2(0.5f, 0.0f)); + float num57 = 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 (Main.mouseLeft && IngameOptions.rightLock == 2) + { + Main.bgScroll = (int) ((double) num57 * 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 index78 = 0; index78 < num5; ++index78) + { + if (strArray1[index78] != null) + { + Vector2 vector2_1 = Main.fontDeathText.MeasureString(strArray1[index78]); + vector2_1.X *= 0.5f; + vector2_1.Y *= 0.5f; + for (int index79 = 0; index79 < 5; ++index79) + { + Microsoft.Xna.Framework.Color color8 = Microsoft.Xna.Framework.Color.Black; + if (index79 == 4) + { + switch (numArray3[index78]) + { + 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 num58 = (int) ((double) byte.MaxValue * ((double) this.menuItemScale[index78] * 2.0 - 1.0)); + if (flagArray1[index78]) + num58 = (int) byte.MaxValue; + int num59 = (int) color8.R - ((int) byte.MaxValue - num58); + if (num59 < 0) + num59 = 0; + int num60 = (int) color8.G - ((int) byte.MaxValue - num58); + if (num60 < 0) + num60 = 0; + int num61 = (int) color8.B - ((int) byte.MaxValue - num58); + if (num61 < 0) + num61 = 0; + if (num17 == index78 && index79 == 4) + { + float num62 = (float) num58 / (float) byte.MaxValue; + num59 = (int) ((double) num59 * (1.0 - (double) num62) + (double) byte.MaxValue * (double) num62); + num60 = (int) ((double) num60 * (1.0 - (double) num62) + 215.0 * (double) num62); + num61 = (int) ((double) num61 * (1.0 - (double) num62) + 0.0 * (double) num62); + } + color8 = new Microsoft.Xna.Framework.Color((int) (byte) num59, (int) (byte) num60, (int) (byte) num61, (int) (byte) num58); + if (flagArray3[index78]) + { + if (index79 == 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 num63 = 0; + int num64 = 0; + if (index79 == 0) + num63 = -2; + if (index79 == 1) + num63 = 2; + if (index79 == 2) + num64 = -2; + if (index79 == 3) + num64 = 2; + float num65 = this.menuItemScale[index78]; + if (Main.menuMode == 15 && index78 == 0) + num65 *= 0.35f; + else if (Main.netMode == 2) + num65 *= 0.5f; + float num66 = num65 * numArray4[index78]; + if (!flagArray4[index78]) + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, strArray1[index78], new Vector2((float) (num3 + num63 + numArray2[index78]), (float) (num2 + num4 * index78 + num64) + vector2_1.Y * numArray4[index78] + (float) numArray1[index78]), color8, 0.0f, vector2_1, num66, SpriteEffects.None, 0.0f); + else + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontDeathText, strArray1[index78], new Vector2((float) (num3 + num63 + numArray2[index78]), (float) (num2 + num4 * index78 + num64) + vector2_1.Y * numArray4[index78] + (float) numArray1[index78]), color8, 0.0f, new Vector2(0.0f, vector2_1.Y), num66, SpriteEffects.None, 0.0f); + } + if (!flagArray1[index78] && !flagArray2[index78]) + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) (num3 + numArray2[index78]), (float) (num2 + num4 * index78) + vector2_1.Y * numArray4[index78] + (float) numArray1[index78])); + if (!flagArray4[index78]) + { + int num67 = 0; + this.menuWide[index78] = false; + Vector2 vector2_2 = Main.fontDeathText.MeasureString(strArray1[index78]) * numArray4[index78]; + if ((double) Main.mouseX > (double) num3 - (double) vector2_2.X * 0.5 + (double) numArray2[index78] - (double) num67 && (double) Main.mouseX < (double) num3 + (double) vector2_2.X * 0.5 * (double) numArray4[index78] + (double) numArray2[index78] + (double) num67 && Main.mouseY > num2 + num4 * index78 + numArray1[index78] && (double) Main.mouseY < (double) (num2 + num4 * index78 + numArray1[index78]) + 50.0 * (double) numArray4[index78] && Main.hasFocus) + { + this.focusMenu = index78; + if (flagArray1[index78] || flagArray2[index78]) + { + this.focusMenu = -1; + } + else + { + if (num17 != this.focusMenu) + flag11 = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + this.selectedMenu = index78; + if (Main.mouseRightRelease && Main.mouseRight) + this.selectedMenu2 = index78; + } + } + } + else + { + Vector2 vector2_3 = Main.fontDeathText.MeasureString(strArray1[index78]) * numArray4[index78]; + if (Main.mouseX > num3 + numArray2[index78] && (double) Main.mouseX < (double) num3 + (double) vector2_3.X + (double) numArray2[index78] && Main.mouseY > num2 + num4 * index78 + numArray1[index78] && (double) Main.mouseY < (double) (num2 + num4 * index78 + numArray1[index78]) + 50.0 * (double) numArray4[index78] && Main.hasFocus) + { + this.focusMenu = index78; + if (flagArray1[index78] || flagArray2[index78]) + { + this.focusMenu = -1; + } + else + { + if (num17 != this.focusMenu) + flag11 = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + this.selectedMenu = index78; + if (Main.mouseRightRelease && Main.mouseRight) + this.selectedMenu2 = index78; + } + } + } + } + } + if (flag11 && num17 != this.focusMenu) + Main.PlaySound(12); + if (GamepadMainMenuHandler.MenuItemPositions.Count == 0) + { + Vector2 vector2 = new Vector2((float) Math.Cos((double) Main.GlobalTime * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTime * 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 index80 = 0; index80 < Main.maxMenuItems; ++index80) + { + if (index80 == this.focusMenu) + { + if ((double) this.menuItemScale[index80] < 1.0) + this.menuItemScale[index80] += 0.02f; + if ((double) this.menuItemScale[index80] > 1.0) + this.menuItemScale[index80] = 1f; + } + else if ((double) this.menuItemScale[index80] > 0.8) + this.menuItemScale[index80] -= 0.02f; + } + if (flag4) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise); + Player pendingPlayer = Main.PendingPlayer; + pendingPlayer.PlayerFrame(); + pendingPlayer.position.X = (float) num6 + Main.screenPosition.X; + pendingPlayer.position.Y = (float) num7 + Main.screenPosition.Y; + this.DrawPlayer(pendingPlayer, pendingPlayer.position, 0.0f, Vector2.Zero); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise); + } + for (int index81 = 0; index81 < 5; ++index81) + { + Microsoft.Xna.Framework.Color color9 = Microsoft.Xna.Framework.Color.Black; + if (index81 == 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 num68 = 0; + int num69 = 0; + if (index81 == 0) + num68 = -2; + if (index81 == 1) + num68 = 2; + if (index81 == 2) + num69 = -2; + if (index81 == 3) + num69 = 2; + string str = "Copyright © 2017 Re-Logic"; + Vector2 vector2 = Main.fontMouseText.MeasureString(str); + vector2.X *= 0.5f; + vector2.Y *= 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2((float) ((double) Main.screenWidth - (double) vector2.X + (double) num68 - 10.0), (float) ((double) Main.screenHeight - (double) vector2.Y + (double) num69 - 2.0)), color9, 0.0f, vector2, 1f, SpriteEffects.None, 0.0f); + } + for (int index82 = 0; index82 < 5; ++index82) + { + Microsoft.Xna.Framework.Color color10 = Microsoft.Xna.Framework.Color.Black; + if (index82 == 4) + { + color10 = color1; + color10.R = (byte) (((int) byte.MaxValue + (int) color10.R) / 2); + color10.G = (byte) (((int) byte.MaxValue + (int) color10.R) / 2); + color10.B = (byte) (((int) byte.MaxValue + (int) color10.R) / 2); + } + color10.A = (byte) ((double) color10.A * 0.300000011920929); + int num70 = 0; + int num71 = 0; + if (index82 == 0) + num70 = -2; + if (index82 == 1) + num70 = 2; + if (index82 == 2) + num71 = -2; + if (index82 == 3) + num71 = 2; + Vector2 vector2 = Main.fontMouseText.MeasureString(Main.versionNumber); + vector2.X *= 0.5f; + vector2.Y *= 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, Main.versionNumber, new Vector2((float) ((double) vector2.X + (double) num70 + 10.0), (float) ((double) Main.screenHeight - (double) vector2.Y + (double) num71 - 2.0)), color10, 0.0f, vector2, 1f, SpriteEffects.None, 0.0f); + } + Main.DrawCursor(Main.DrawThickCursor()); + if (Main.fadeCounter > 0) + { + Microsoft.Xna.Framework.Color color11 = Microsoft.Xna.Framework.Color.White; + --Main.fadeCounter; + byte num72 = (byte) ((double) Main.fadeCounter / 75.0 * (double) byte.MaxValue); + color11 = new Microsoft.Xna.Framework.Color((int) num72, (int) num72, (int) num72, (int) num72); + Main.spriteBatch.Draw(Main.fadeTexture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color11); + } + Main.spriteBatch.End(); + Main.mouseLeftRelease = !Main.mouseLeft; + Main.mouseRightRelease = !Main.mouseRight; + if (Main.menuMode != menuMode1) + return; + GamepadMainMenuHandler.LastDrew = menuMode1; + } + + private static void CycleClothingStyle(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) + { + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Black); + base.Draw(gameTime); + Main.spriteBatch.Begin(); + ++this.splashCounter; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + byte num = 0; + if (this.splashCounter <= 75) + num = (byte) ((double) this.splashCounter / 75.0 * (double) byte.MaxValue); + else if (this.splashCounter <= 125) + num = byte.MaxValue; + else if (this.splashCounter <= 200) + { + num = (byte) ((double) (125 - this.splashCounter) / 75.0 * (double) byte.MaxValue); + } + else + { + Main.showSplash = false; + Main.fadeCounter = 75; + } + color = new Microsoft.Xna.Framework.Color((int) num, (int) num, (int) num, (int) num); + Main.spriteBatch.Draw(Main.loTexture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + Main.spriteBatch.End(); + } + + protected void DrawUnderworldBackground(bool flat) + { + if ((double) Main.screenPosition.Y + (double) Main.screenHeight < (double) (Main.maxTilesY - 220) * 16.0) + return; + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + float num1 = (float) (((double) Main.GameViewMatrix.Zoom.Y - 1.0) * 0.5 * 200.0); + for (int index1 = 4; index1 >= 0; --index1) + { + Texture2D texture = Main.underworldTexture[index1]; + Vector2 vector2_2 = new Vector2((float) texture.Width, (float) texture.Height) * 0.5f; + Vector2 vector2_3 = new Vector2(1f / (flat ? 1f : (float) (index1 * 2) + 3f)); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + float scale = 1.3f; + Vector2 zero = Vector2.Zero; + switch (index1) + { + case 1: + int num2 = (int) ((double) Main.GlobalTime * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle((num2 >> 1) * (texture.Width >> 1), num2 % 2 * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_2 *= 0.5f; + zero.Y += 75f; + break; + case 2: + zero.Y += 75f; + break; + case 3: + zero.Y += 75f; + break; + case 4: + scale = 0.5f; + zero.Y -= 25f; + break; + } + if (flat) + scale *= 1.5f; + Vector2 vector2_4 = vector2_2 * scale; + if (flat) + zero.Y += (float) (Main.underworldTexture[0].Height >> 1) * 1.3f - vector2_4.Y; + zero.Y -= num1; + float num3 = scale * (float) rectangle.Width; + int num4 = (int) (((double) vector2_1.X * (double) vector2_3.X - (double) vector2_4.X + (double) zero.X - (double) (Main.screenWidth >> 1)) / (double) num3); + for (int index2 = num4 - 2; index2 < num4 + 4 + (int) ((double) Main.screenWidth / (double) num3); ++index2) + { + Vector2 position = (new Vector2((float) ((double) index2 * (double) scale * ((double) rectangle.Width / (double) vector2_3.X)), (float) (Main.maxTilesY - 200) * 16f) + vector2_4 - vector2_1) * vector2_3 + vector2_1 - Main.screenPosition - vector2_4 + zero; + 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 (index1 == 0) + { + int y = (int) ((double) position.Y + (double) rectangle.Height * (double) scale); + Main.spriteBatch.Draw(Main.blackTileTexture, 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)); + } + } + } + } + + 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); + int num5 = 128; + Vector2 vector2 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + Vector3 vector3 = new Vector3(0.9f); + float num6 = MathHelper.Clamp((float) (((double) Main.screenPosition.Y - Main.worldSurface * 16.0) / 300.0), 0.0f, 1f); + Lighting.brightness = (float) ((double) Lighting.defBrightness * (1.0 - (double) num6) + 1.0 * (double) num6); + float num7 = MathHelper.Clamp((float) ((double) Main.screenPosition.Y - (double) (Main.screenHeight / 2) + 200.0 - Main.rockLayer * 16.0) / 300f, 0.0f, 1f); + int num8 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + int num9 = (num8 > Main.caveBackX[0] ? (num8 > Main.treeX[1] ? (num8 > Main.treeX[2] ? Main.caveBackStyle[3] : Main.caveBackStyle[2]) : Main.caveBackStyle[1]) : Main.caveBackStyle[0]) + 3; + if (Main.snowTiles > 300 && ((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0 < (double) (Main.maxTilesY - 250)) + num9 = 1; + if (Main.jungleTiles > 80) + { + if (num9 == 1) + { + if (Main.jungleTiles > Main.snowTiles) + num9 = 11; + } + else + num9 = 11; + } + 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) + num9 = 15; + else if (Main.player[Main.myPlayer].ZoneCrimson) + num9 = 16; + else if (Main.player[Main.myPlayer].ZoneHoly) + num9 = 17; + } + else if (Main.player[Main.myPlayer].ZoneCorrupt) + num9 = 12; + else if (Main.player[Main.myPlayer].ZoneCrimson) + num9 = 13; + else if (Main.player[Main.myPlayer].ZoneHoly) + num9 = 14; + } + if (Main.shroomTiles > 200) + num9 = 2; + if (num9 != Main.ugBack) + { + Main.oldUgBack = Main.ugBack; + Main.ugBack = num9; + 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 num10 = Main.ugBack; + if (index1 == 1) + num10 = Main.oldUgBack; + int[] numArray3 = new int[7]; + switch (num10) + { + 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; + default: + if (num10 >= 12 && num10 <= 14) + { + numArray3[0] = 66; + numArray3[1] = 67; + numArray3[2] = 68; + numArray3[4] = 128 + Main.hellBackStyle; + switch (num10) + { + 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 (num10 >= 15 && num10 <= 17) + { + numArray3[0] = 40; + numArray3[1] = 33; + numArray3[2] = 34; + numArray3[4] = 128 + Main.hellBackStyle; + switch (num10) + { + 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 + 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]; + } + } + Lighting.defBrightness = (float) (1.20000004768372 - 0.200000002980232 * (double) num7); + float x1 = vector3.X; + float y1 = vector3.Y; + float z = vector3.Z; + this.bgParallax = (double) Main.caveParallax; + this.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = Main.screenWidth / num5 + 2; + this.bgTop = (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 < num5 / 16; ++index5) + { + int num11 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStart + (double) Main.screenPosition.X, 16.0)); + if (num11 == -8) + num11 = 8; + double num12 = (double) (this.bgStart + num5 * index4 + index5 * 16 + 8); + float bgTop = (float) this.bgTop; + double x2 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((num12 + x2) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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); + Main.spriteBatch.Draw(Main.backgroundTexture[numArray1[0]], new Vector2((float) (this.bgStart + num5 * index4 + 16 * index5 + num11), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index5 + num11 + 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(Main.backgroundTexture[numArray2[0]], new Vector2((float) (this.bgStart + num5 * index4 + 16 * index5 + num11), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index5 + num11 + 16, 0, 16, 16)), color2); + } + } + } + bool flag1 = false; + bool flag2 = false; + this.bgTop = (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.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + if (Main.worldSurface * 16.0 < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (Main.rockLayer * 16.0 < (double) Main.screenPosition.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 num13 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStart + (double) Main.screenPosition.X, 16.0)); + if (num13 == -8) + num13 = 8; + for (int index6 = 0; index6 < this.bgLoops; ++index6) + { + for (int index7 = 0; index7 < this.bgLoopsY; ++index7) + { + for (int index8 = 0; index8 < num5 / 16; ++index8) + { + for (int index9 = 0; index9 < 6; ++index9) + { + double num14 = (double) (this.bgStartY + index7 * 96 + index9 * 16 + 8); + int index10 = (int) (((double) (this.bgStart + num5 * index6 + index8 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y2 = (double) Main.screenPosition.Y; + int index11 = (int) ((num14 + y2) / 16.0); + Microsoft.Xna.Framework.Color color3 = Lighting.GetColor(index10, index11); + if (WorldGen.InWorld(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.GetColor4Slice_New(index10, index11, out vertices); + Main.tileBatch.Draw(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num13 + 16, 16 * index9, 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[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 num15 = 0; + int num16 = 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; + num15 = 4; + if (!Main.tile[index10, index11 - 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 2: + num15 = 12; + if (!Main.tile[index10 + 1, index11 - 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 3: + height = 8; + num16 = 4; + if (!Main.tile[index10 - 1, index11].active()) + { + color5 = slices[index12]; + break; + } + break; + case 4: + width = 8; + height = 8; + num15 = 4; + num16 = 4; + break; + case 5: + num15 = 12; + num16 = 4; + height = 8; + if (!Main.tile[index10 + 1, index11].active()) + { + color5 = slices[index12]; + break; + } + break; + case 6: + num16 = 12; + if (!Main.tile[index10 - 1, index11 + 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 7: + width = 8; + height = 4; + num15 = 4; + num16 = 12; + if (!Main.tile[index10, index11 + 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 8: + num15 = 12; + num16 = 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) x1); + color4.G = (byte) ((double) color4.G * (double) y1); + color4.B = (byte) ((double) color4.B * (double) z); + Main.spriteBatch.Draw(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num15 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9 + num16)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num15 + num13 + 16, 16 * index9 + num16, 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num15 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9 + num16)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num15 + num13 + 16, 16 * index9 + num16, 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num13 + 16, 16 * index9, 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(index10, index11, ref slices); + for (int index13 = 0; index13 < 4; ++index13) + { + int num17 = 0; + int num18 = 0; + Microsoft.Xna.Framework.Color color7 = color3; + Microsoft.Xna.Framework.Color color8 = slices[index13]; + switch (index13 - 1) + { + case 0: + num17 = 8; + break; + case 1: + num18 = 8; + break; + case 2: + num17 = 8; + num18 = 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num17 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9 + num18)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num17 + num13 + 16, 16 * index9 + num18, 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num17 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9 + num18)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num17 + num13 + 16, 16 * index9 + num18, 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num13 + 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num13 + 16, 16 * index9, 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + num5 * index6 + 16 * index8 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num13 + 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 < num5 / 16; ++index16) + { + for (int index17 = 0; index17 < 6; ++index17) + { + double num19 = (double) (this.bgStartY + index15 * 96 + index17 * 16 + 8); + int index18 = (int) (((double) (this.bgStart + num5 * index14 + index16 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y3 = (double) Main.screenPosition.Y; + int index19 = (int) ((num19 + y3) / 16.0); + if (WorldGen.InWorld(index18, index19)) + { + 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.GetColor4Slice_New(index18, index19, out vertices, Main.ugBackTransition); + byte num20 = (byte) ((double) byte.MaxValue * (double) Main.ugBackTransition); + vertices.BottomLeftColor.A = num20; + vertices.BottomRightColor.A = num20; + vertices.TopLeftColor.A = num20; + vertices.TopRightColor.A = num20; + Main.tileBatch.Draw(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + num5 * index14 + 16 * index16 + num13), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index15 + 16 * index17)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index16 + num13 + 16, 16 * index17, 16, 16)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + } + } + } + } + } + } + if (flag2) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + this.bgTop = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + if (this.bgTop > -32) + { + for (int index20 = 0; index20 < this.bgLoops; ++index20) + { + for (int index21 = 0; index21 < num5 / 16; ++index21) + { + double num21 = (double) (this.bgStart + num5 * index20 + index21 * 16 + 8); + float bgTop = (float) this.bgTop; + double x3 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color11 = Lighting.GetColor((int) ((num21 + x3) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[2]], new Vector2((float) (this.bgStart + num5 * index20 + 16 * index21 + num13), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index21 + num13 + 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(Main.backgroundTexture[numArray2[2]], new Vector2((float) (this.bgStart + num5 * index20 + 16 * index21 + num13), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index21 + num13 + 16, 0, 16, 16)), color12); + } + } + } + } + } + } + this.bgTop = (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.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + if (Main.rockLayer * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (num2 * 16.0 < (double) Main.screenPosition.Y + 600.0) + { + this.bgLoopsY = (int) (num2 * 16.0 - (double) Main.screenPosition.Y + 600.0 - (double) this.bgStartY) / Main.backgroundHeight[2]; + flag1 = true; + } + int num22 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStart + (double) Main.screenPosition.X, 16.0)); + if (num22 == -8) + num22 = 8; + for (int index22 = 0; index22 < this.bgLoops; ++index22) + { + for (int index23 = 0; index23 < this.bgLoopsY; ++index23) + { + for (int index24 = 0; index24 < num5 / 16; ++index24) + { + for (int index25 = 0; index25 < 6; ++index25) + { + double num23 = (double) (this.bgStartY + index23 * 96 + index25 * 16 + 8); + int index26 = (int) (((double) (this.bgStart + num5 * index22 + index24 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y4 = (double) Main.screenPosition.Y; + int index27 = (int) ((num23 + y4) / 16.0); + if (WorldGen.InWorld(index26, index27, 1)) + { + 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 > num3 || (double) color13.G > (double) num3 * 1.1 || (double) color13.B > (double) num3 * 1.2) && !Main.tile[index26, index27].active()) + { + Lighting.GetColor9Slice(index26, index27, ref slices); + for (int index28 = 0; index28 < 9; ++index28) + { + int num24 = 0; + int num25 = 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; + num24 = 4; + if (!Main.tile[index26, index27 - 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 2: + num24 = 12; + if (!Main.tile[index26 + 1, index27 - 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 3: + height = 8; + num25 = 4; + if (!Main.tile[index26 - 1, index27].active()) + { + color15 = slices[index28]; + break; + } + break; + case 4: + width = 8; + height = 8; + num24 = 4; + num25 = 4; + break; + case 5: + num24 = 12; + num25 = 4; + height = 8; + if (!Main.tile[index26 + 1, index27].active()) + { + color15 = slices[index28]; + break; + } + break; + case 6: + num25 = 12; + if (!Main.tile[index26 - 1, index27 + 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 7: + width = 8; + height = 4; + num24 = 4; + num25 = 12; + if (!Main.tile[index26, index27 + 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 8: + num24 = 12; + num25 = 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) x1); + color14.G = (byte) ((double) color14.G * (double) y1); + color14.B = (byte) ((double) color14.B * (double) z); + Main.spriteBatch.Draw(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25 + num25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num24 + num22 + 16, 16 * index25 + num25, 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25 + num25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num24 + num22 + 16, 16 * index25 + num25, 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(index26, index27, ref slices); + for (int index29 = 0; index29 < 4; ++index29) + { + int num26 = 0; + int num27 = 0; + Microsoft.Xna.Framework.Color color17 = color13; + Microsoft.Xna.Framework.Color color18 = slices[index29]; + switch (index29 - 1) + { + case 0: + num26 = 8; + break; + case 1: + num27 = 8; + break; + case 2: + num26 = 8; + num27 = 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num26 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25 + num27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num26 + num22 + 16, 16 * index25 + num27, 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num26 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25 + num27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num26 + num22 + 16, 16 * index25 + num27, 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num22 + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num22 + 16, 16 * index25, 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num22 + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + num5 * index22 + 16 * index24 + num22), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num22 + 16, 16 * index25, 16, 16)), color21); + } + } + } + } + } + } + } + } + num5 = 128; + if (flag1) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + this.bgTop = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + for (int index30 = 0; index30 < this.bgLoops; ++index30) + { + for (int index31 = 0; index31 < num5 / 16; ++index31) + { + double num28 = (double) (this.bgStart + num5 * index30 + index31 * 16 + 8); + float bgTop = (float) this.bgTop; + double x4 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color22 = Lighting.GetColor((int) ((num28 + x4) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[4]], new Vector2((float) (this.bgStart + num5 * index30 + 16 * index31 + num22), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index31 + num22 + 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(Main.backgroundTexture[numArray2[4]], new Vector2((float) (this.bgStart + num5 * index30 + 16 * index31 + num22), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index31 + num22 + 16, Main.magmaBGFrame * 16, 16, 16)), color23); + } + } + } + } + } + this.bgTop = (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 + 600.0) + { + this.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + if (num2 * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if ((double) (Main.maxTilesY - 200) * 16.0 < (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + this.bgLoopsY = (int) Math.Ceiling(((double) (Main.maxTilesY - 200) * 16.0 - (double) Main.screenPosition.Y - (double) this.bgStartY) / (double) Main.backgroundHeight[2]); + flag4 = true; + } + int num29 = (int) ((double) num3 * 1.5); + int num30 = (int) ((double) num4 * 1.5); + int num31 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStart + (double) Main.screenPosition.X, 16.0)); + if (num31 == -8) + num31 = 8; + for (int index32 = 0; index32 < this.bgLoops; ++index32) + { + for (int index33 = 0; index33 < this.bgLoopsY; ++index33) + { + for (int index34 = 0; index34 < num5 / 16; ++index34) + { + for (int index35 = 0; index35 < 6; ++index35) + { + double num32 = (double) (this.bgStartY + index33 * 96 + index35 * 16 + 8); + int index36 = (int) (((double) (this.bgStart + num5 * index32 + index34 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y5 = (double) Main.screenPosition.Y; + int index37 = (int) ((num32 + y5) / 16.0); + if (WorldGen.InWorld(index36, index37, 1)) + { + Microsoft.Xna.Framework.Color color24 = Lighting.GetColor(index36, index37); + if (Main.tile[index36, index37] == null) + Main.tile[index36, index37] = new Tile(); + bool flag5 = 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]) + flag5 = true; + } + else if (Main.wallLight[(int) Main.tile[index36, index37].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 || index37 > Main.maxTilesY - 300) && (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 > num29 || (double) color24.G > (double) num29 * 1.1 || (double) color24.B > (double) num29 * 1.2) && !Main.tile[index36, index37].active()) + { + Lighting.GetColor9Slice(index36, index37, ref slices); + for (int index38 = 0; index38 < 9; ++index38) + { + int num33 = 0; + int num34 = 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; + num33 = 4; + if (!Main.tile[index36, index37 - 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 2: + num33 = 12; + if (!Main.tile[index36 + 1, index37 - 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 3: + height = 8; + num34 = 4; + if (!Main.tile[index36 - 1, index37].active()) + { + color26 = slices[index38]; + break; + } + break; + case 4: + width = 8; + height = 8; + num33 = 4; + num34 = 4; + break; + case 5: + num33 = 12; + num34 = 4; + height = 8; + if (!Main.tile[index36 + 1, index37].active()) + { + color26 = slices[index38]; + break; + } + break; + case 6: + num34 = 12; + if (!Main.tile[index36 - 1, index37 + 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 7: + width = 8; + height = 4; + num33 = 4; + num34 = 12; + if (!Main.tile[index36, index37 + 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 8: + num33 = 12; + num34 = 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) x1); + color25.G = (byte) ((double) color25.G * (double) y1); + color25.B = (byte) ((double) color25.B * (double) z); + Main.spriteBatch.Draw(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + num5 * index32 + 16 * index34 + num33 + num31), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35 + num34)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num33 + num31 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame + num34, width, height)), color25, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else if ((int) color24.R > num30 || (double) color24.G > (double) num30 * 1.1 || (double) color24.B > (double) num30 * 1.2) + { + Lighting.GetColor4Slice(index36, index37, ref slices); + for (int index39 = 0; index39 < 4; ++index39) + { + int num35 = 0; + int num36 = 0; + Microsoft.Xna.Framework.Color color27 = color24; + Microsoft.Xna.Framework.Color color28 = slices[index39]; + switch (index39 - 1) + { + case 0: + num35 = 8; + break; + case 1: + num36 = 8; + break; + case 2: + num35 = 8; + num36 = 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + num5 * index32 + 16 * index34 + num35 + num31), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35 + num36)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num35 + num31 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame + num36, 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + num5 * index32 + 16 * index34 + num31), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num31 + 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) x1); + color24.G = (byte) ((double) color24.G * (double) y1); + color24.B = (byte) ((double) color24.B * (double) z); + Main.spriteBatch.Draw(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + num5 * index32 + 16 * index34 + num31), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num31 + 16, 16 * index35 + 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.bgStart = (int) (-Math.IEEERemainder((double) num5 + (double) Main.screenPosition.X * this.bgParallax, (double) num5) - (double) (num5 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num5 + 2; + this.bgTop = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + for (int index40 = 0; index40 < this.bgLoops; ++index40) + { + for (int index41 = 0; index41 < num5 / 16; ++index41) + { + double num37 = (double) (this.bgStart + num5 * index40 + index41 * 16 + 8); + float bgTop = (float) this.bgTop; + double x5 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color29 = Lighting.GetColor((int) ((num37 + x5) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[6]], new Vector2((float) (this.bgStart + num5 * index40 + 16 * index41 + num31), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index41 + num31 + 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(Main.backgroundTexture[numArray2[6]], new Vector2((float) (this.bgStart + num5 * index40 + 16 * index41 + num31), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index41 + num31 + 16, Main.magmaBGFrame * 16, 16, 16)), color30); + } + } + } + } + } + Lighting.brightness = Lighting.defBrightness; + TimeLogger.DrawTime(3, stopwatch.Elapsed.TotalMilliseconds); + } + } + + 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.bloodTiles > Main.evilTiles && Main.bloodTiles > Main.holyTiles) + num8 = (float) Main.bloodTiles; + else if (Main.holyTiles > Main.evilTiles) + num8 = (float) Main.holyTiles; + else if (Main.evilTiles > Main.holyTiles) + num8 = (float) Main.evilTiles; + 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.brightness = (float) ((double) Lighting.defBrightness * (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.bloodTiles > Main.evilTiles && Main.bloodTiles > Main.holyTiles) + { + 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.evilTiles > 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.holyTiles > 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.treeX[1] ? (num16 > Main.treeX[2] ? Main.caveBackStyle[3] : Main.caveBackStyle[2]) : Main.caveBackStyle[1]) : Main.caveBackStyle[0]) + 3; + if (Main.snowTiles > 300 && ((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0 < (double) (Main.maxTilesY - 250)) + num17 = 1; + if (Main.jungleTiles > 80) + { + if (num17 == 1) + { + if (Main.jungleTiles > Main.snowTiles) + num17 = 11; + } + else + num17 = 11; + } + if (Main.shroomTiles > 200) + num17 = 2; + if (num17 != Main.ugBack) + { + Main.oldUgBack = Main.ugBack; + Main.ugBack = 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 num18 = Main.ugBack; + if (index1 == 1) + num18 = Main.oldUgBack; + int[] numArray3 = new int[6]; + switch (num18) + { + 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]; + } + } + Lighting.defBrightness = (float) (1.20000004768372 * (1.0 - (double) num12) + 1.0 * (double) num12); + this.bgParallax = (double) Main.caveParallax; + this.bgStart = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = Main.screenWidth / num3 + 2; + this.bgTop = (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.bgStart + (double) Main.screenPosition.X, 16.0)); + if (num19 == -8) + num19 = 8; + double num20 = (double) (this.bgStart + num3 * index4 + index5 * 16 + 8); + float bgTop = (float) this.bgTop; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((num20 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[0]], new Vector2((float) (this.bgStart + num3 * index4 + 16 * index5 + num19), (float) this.bgTop) + 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(Main.backgroundTexture[numArray2[0]], new Vector2((float) (this.bgStart + num3 * index4 + 16 * index5 + num19), (float) this.bgTop) + 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.bgTop = (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.bgStart = (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.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (Main.rockLayer * 16.0 < (double) Main.screenPosition.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.bgStart + (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.bgStart + 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.GetColor4Slice_New(index10, index11, out vertices); + Main.tileBatch.Draw(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[1]], new Vector2((float) (this.bgStart + 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.bgStart + 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.GetColor4Slice_New(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(Main.backgroundTexture[numArray2[1]], new Vector2((float) (this.bgStart + 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.bgStart = (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.bgTop = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + if (this.bgTop > -32) + { + for (int index20 = 0; index20 < this.bgLoops; ++index20) + { + for (int index21 = 0; index21 < num3 / 16; ++index21) + { + double num31 = (double) (this.bgStart + num3 * index20 + index21 * 16 + 8); + float bgTop = (float) this.bgTop; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color11 = Lighting.GetColor((int) ((num31 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[2]], new Vector2((float) (this.bgStart + num3 * index20 + 16 * index21 + num23), (float) this.bgTop) + 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(Main.backgroundTexture[numArray2[2]], new Vector2((float) (this.bgStart + num3 * index20 + 16 * index21 + num23), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index21 + num23 + 16, 0, 16, 16)), color12); + } + } + } + } + } + } + this.bgTop = (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.bgStart = (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.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (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.bgStart + (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.bgStart + 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[3]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray2[3]], new Vector2((float) (this.bgStart + 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.bgStart = (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.bgTop = 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.bgStart + num3 * index30 + index31 * 16 + 8); + float bgTop = (float) this.bgTop; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color22 = Lighting.GetColor((int) ((num38 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTop) / 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(Main.backgroundTexture[numArray1[4]], new Vector2((float) (this.bgStart + num3 * index30 + 16 * index31 + num32), (float) this.bgTop) + 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(Main.backgroundTexture[numArray2[4]], new Vector2((float) (this.bgStart + num3 * index30 + 16 * index31 + num32), (float) this.bgTop) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index31 + num32 + 16, Main.magmaBGFrame * 16, 16, 16)), color23); + } + } + } + } + } + this.bgTop = (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.bgStart = (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.bgTop, (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.bgTop; + this.bgLoopsY = (Main.screenHeight - this.bgTop + (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.bgStart + (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.bgStart + 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + 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(Main.backgroundTexture[numArray1[5]], new Vector2((float) (this.bgStart + 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.brightness = Lighting.defBrightness; + 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; + } + 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(Main.magicPixel, 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(Main.magicPixel, 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; + } + + protected void DrawMap() + { + string cursorText = ""; + if (!Main.mapEnabled || !Main.mapReady) + return; + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = num1; + float num4 = num2; + byte num5 = byte.MaxValue; + int num6 = Main.maxTilesX / Main.textureMaxWidth; + int num7 = Main.maxTilesY / Main.textureMaxHeight; + float offScreenTiles1 = (float) Lighting.offScreenTiles; + float offScreenTiles2 = (float) Lighting.offScreenTiles; + float num8 = (float) (Main.maxTilesX - Lighting.offScreenTiles - 1); + float num9 = (float) (Main.maxTilesY - Lighting.offScreenTiles - 42); + float num10 = 0.0f; + float num11 = 0.0f; + float num12 = 10f; + float num13 = 10f; + float num14 = (float) (Main.maxTilesX - 10); + float num15 = (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 num16 = 200f; + float num17 = 300f; + float num18 = 0.0f; + float num19 = 0.0f; + float num20 = num14 - 1f; + float num21 = num15 - 1f; + float scale = !Main.mapFullscreen ? (Main.mapStyle != 1 ? Main.mapOverlayScale : Main.mapMinimapScale) : Main.mapFullscreenScale; + bool flag1 = false; + Matrix transformMatrix = Main.UIScaleMatrix; + if (Main.mapStyle != 1) + transformMatrix = Matrix.Identity; + if (Main.mapFullscreen) + transformMatrix = Matrix.Identity; + if (!Main.mapFullscreen && (double) scale > 1.0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix); + 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 num22 = (float) Main.mouseX - Main.grabMapX; + float num23 = (float) Main.mouseY - Main.grabMapY; + Main.grabMapX = (float) Main.mouseX; + Main.grabMapY = (float) Main.mouseY; + float num24 = num22 * 0.06255f; + float num25 = num23 * 0.06255f; + Main.mapFullscreenPos.X -= num24 * (16f / Main.mapFullscreenScale); + Main.mapFullscreenPos.Y -= num25 * (16f / Main.mapFullscreenScale); + } + } + Main.player[Main.myPlayer].mouseInterface = true; + float num26 = (float) ((double) Main.screenWidth / (double) Main.maxTilesX * 0.800000011920929); + if ((double) Main.mapFullscreenScale < (double) num26) + Main.mapFullscreenScale = num26; + if ((double) Main.mapFullscreenScale > 16.0) + Main.mapFullscreenScale = 16f; + scale = Main.mapFullscreenScale; + num5 = byte.MaxValue; + if ((double) Main.mapFullscreenPos.X < (double) num12) + Main.mapFullscreenPos.X = num12; + if ((double) Main.mapFullscreenPos.X > (double) num14) + Main.mapFullscreenPos.X = num14; + if ((double) Main.mapFullscreenPos.Y < (double) num13) + Main.mapFullscreenPos.Y = num13; + if ((double) Main.mapFullscreenPos.Y > (double) num15) + Main.mapFullscreenPos.Y = num15; + float num27 = Main.mapFullscreenPos.X; + float num28 = Main.mapFullscreenPos.Y; + if (Main.resetMapFull) + { + Main.resetMapFull = false; + num27 = (float) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + num28 = (float) (((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0); + Main.mapFullscreenPos.X = num27; + Main.mapFullscreenPos.Y = num28; + } + float num29 = num27 * scale; + float num30 = num28 * scale; + float num31 = -num29 + (float) (Main.screenWidth / 2); + float num32 = -num30 + (float) (Main.screenHeight / 2); + num16 = num31 + num12 * scale; + num17 = num32 + num13 * scale; + float num33 = (float) (Main.maxTilesX / 840) * Main.mapFullscreenScale; + float num34 = num16; + float num35 = num17; + float num36 = (float) Main.mapTexture.Width; + float num37 = (float) Main.mapTexture.Height; + switch (Main.maxTilesX) + { + case 4200: + float num38 = num33 * 0.998f; + num34 -= 37.3f * num38; + num35 -= 1.7f * num38; + num36 = (num36 - 16f) * num38; + num37 = (num37 - 8.31f) * num38; + break; + case 6300: + float num39 = num33 * 1.09f; + num34 -= 39.8f * num39; + num35 = num17 - 4.08f * num39; + num36 = (num36 - 26.69f) * num39; + num37 = (num37 - 6.92f) * num39; + if ((double) num39 < 1.2) + { + num37 += 2f; + break; + } + break; + case 6400: + float num40 = num33 * 1.09f; + num34 -= 38.8f * num40; + num35 = num17 - 3.85f * num40; + num36 = (num36 - 13.6f) * num40; + num37 = (num37 - 6.92f) * num40; + if ((double) num40 < 1.2) + { + num37 += 2f; + break; + } + break; + case 8400: + float num41 = num33 * 0.999f; + num34 -= 40.6f * num41; + num35 = num17 - 5f * num41; + num36 = (num36 - 8.045f) * num41; + num37 = (num37 + 0.12f) * num41; + if ((double) num41 < 1.2) + { + ++num37; + break; + } + break; + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise); + flag1 = true; + if ((double) Main.screenPosition.Y > (double) ((Main.maxTilesY - 232) * 16)) + Main.spriteBatch.Draw(this.mapBG3Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Microsoft.Xna.Framework.Color.White); + else if (Main.player[Main.myPlayer].ZoneDungeon) + Main.spriteBatch.Draw(this.mapBG5Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Microsoft.Xna.Framework.Color.White); + 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 == (byte) 87) + Main.spriteBatch.Draw(this.mapBG14Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Microsoft.Xna.Framework.Color.White); + else if ((double) Main.screenPosition.Y > Main.worldSurface * 16.0) + { + if (Main.player[Main.myPlayer].ZoneSnow) + Main.spriteBatch.Draw(this.mapBG4Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Microsoft.Xna.Framework.Color.White); + else if (Main.player[Main.myPlayer].ZoneJungle) + Main.spriteBatch.Draw(this.mapBG13Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.sandTiles > 1000) + Main.spriteBatch.Draw(this.mapBG15Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else + Main.spriteBatch.Draw(this.mapBG2Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Microsoft.Xna.Framework.Color.White); + } + else + { + int num42 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + if (Main.player[Main.myPlayer].ZoneCorrupt) + Main.spriteBatch.Draw(this.mapBG6Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.player[Main.myPlayer].ZoneCrimson) + Main.spriteBatch.Draw(this.mapBG7Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.player[Main.myPlayer].ZoneHoly) + Main.spriteBatch.Draw(this.mapBG8Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && (num42 < 380 || num42 > Main.maxTilesX - 380)) + Main.spriteBatch.Draw(this.mapBG11Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.player[Main.myPlayer].ZoneSnow) + Main.spriteBatch.Draw(this.mapBG12Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.player[Main.myPlayer].ZoneJungle) + Main.spriteBatch.Draw(this.mapBG9Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else if (Main.sandTiles > 1000) + Main.spriteBatch.Draw(this.mapBG10Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + else + Main.spriteBatch.Draw(this.mapBG1Texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.bgColor); + } + Microsoft.Xna.Framework.Rectangle destinationRectangle = new Microsoft.Xna.Framework.Rectangle((int) num34, (int) num35, (int) num36, (int) num37); + Main.spriteBatch.Draw(Main.mapTexture, destinationRectangle, Microsoft.Xna.Framework.Color.White); + if ((double) scale < 1.0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + flag1 = false; + } + } + else + { + switch (Main.mapStyle) + { + case 1: + Main.miniMapWidth = 240; + Main.miniMapHeight = 240; + Main.miniMapX = Main.screenWidth - Main.miniMapWidth - 52; + Main.miniMapY = 90; + 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; + scale = Main.mapMinimapScale; + num5 = (byte) ((double) byte.MaxValue * (double) Main.mapMinimapAlpha); + num16 = (float) Main.miniMapX; + num17 = (float) Main.miniMapY; + num3 = num16; + num4 = num17; + 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); + num10 = (float) -(num44 - (double) (int) (((double) Main.screenPosition.X + (double) (PlayerInput.RealScreenWidth / 2)) / 16.0)) * scale; + num11 = (float) -((double) num45 - (double) (int) (((double) Main.screenPosition.Y + (double) (PlayerInput.RealScreenHeight / 2)) / 16.0)) * scale; + num20 = (float) Main.miniMapWidth / scale; + num21 = (float) Main.miniMapHeight / scale; + num18 = (float) (int) num44 - num20 / 2f; + num19 = (float) (int) num45 - num21 / 2f; + double num46 = (double) Main.maxTilesY + (double) num19; + float x1 = num3 - 6f; + float y1 = num4 - 6f; + Main.spriteBatch.Draw(Main.miniMapFrame2Texture, new Vector2(x1, y1), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.miniMapFrame2Texture.Width, Main.miniMapFrame2Texture.Height)), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + case 2: + float num47 = (float) Main.screenWidth / (float) Main.maxTilesX; + if ((double) Main.mapOverlayScale < (double) num47) + Main.mapOverlayScale = num47; + if ((double) Main.mapOverlayScale > 16.0) + Main.mapOverlayScale = 16f; + if ((double) Main.mapOverlayAlpha < 0.01) + Main.mapOverlayAlpha = 0.01f; + if ((double) Main.mapOverlayAlpha > 1.0) + Main.mapOverlayAlpha = 1f; + scale = Main.mapOverlayScale; + num5 = (byte) ((double) byte.MaxValue * (double) Main.mapOverlayAlpha); + int maxTilesX = Main.maxTilesX; + int maxTilesY = Main.maxTilesY; + float num48 = (float) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + double num49 = ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0; + float num50 = num48 * scale; + double num51 = (double) scale; + double num52 = num49 * num51; + float num53 = -num50 + (float) (Main.screenWidth / 2); + float num54 = (float) -num52 + (float) (Main.screenHeight / 2); + num16 = num53 + num12 * scale; + num17 = num54 + num13 * scale; + break; + } + } + if (Main.mapStyle == 1 && !Main.mapFullscreen) + { + if ((double) num18 < (double) num12) + num16 -= (num18 - num12) * scale; + if ((double) num19 < (double) num13) + num17 -= (num19 - num13) * scale; + } + float num55 = num18 + num20; + float num56 = num19 + num21; + if ((double) num18 > (double) num12) + num12 = num18; + if ((double) num19 > (double) num13) + num13 = num19; + if ((double) num55 < (double) num14) + num14 = num55; + if ((double) num56 < (double) num15) + num15 = num56; + float num57 = (float) Main.textureMaxWidth * scale; + float num58 = (float) Main.textureMaxHeight * scale; + float num59 = num16; + float num60 = 0.0f; + for (int index3 = 0; index3 <= 4; ++index3) + { + if ((double) ((index3 + 1) * Main.textureMaxWidth) > (double) num12 && (double) (index3 * Main.textureMaxWidth) < (double) num12 + (double) num14) + { + for (int index4 = 0; index4 <= num7; ++index4) + { + if ((double) ((index4 + 1) * Main.textureMaxHeight) > (double) num13 && (double) (index4 * Main.textureMaxHeight) < (double) num13 + (double) num15) + { + float num61 = num16 + (float) (int) ((double) index3 * (double) num57); + float num62 = num17 + (float) (int) ((double) index4 * (double) num58); + float num63 = (float) (index3 * Main.textureMaxWidth); + float num64 = (float) (index4 * Main.textureMaxHeight); + float num65 = 0.0f; + float num66 = 0.0f; + float num67; + if ((double) num63 < (double) num12) + { + num65 = num12 - num63; + num67 = num16; + } + else + num67 = num61 - num12 * scale; + float num68; + if ((double) num64 < (double) num13) + { + num66 = num13 - num64; + num68 = num17; + } + else + num68 = num62 - num13 * scale; + float num69 = num59; + float textureMaxWidth = (float) Main.textureMaxWidth; + float textureMaxHeight = (float) Main.textureMaxHeight; + float num70 = (float) ((index3 + 1) * Main.textureMaxWidth); + float num71 = (float) ((index4 + 1) * Main.textureMaxHeight); + if ((double) num70 >= (double) num14) + textureMaxWidth -= num70 - num14; + if ((double) num71 >= (double) num15) + textureMaxHeight -= num71 - num15; + float x2 = num69 + num10; + float y2 = num68 + num11; + if ((double) textureMaxWidth > (double) num65) + Main.spriteBatch.Draw((Texture2D) this.mapTarget[index3, index4], new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle((int) num65, (int) num66, (int) textureMaxWidth - (int) num65, (int) textureMaxHeight - (int) num66)), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + num60 = (float) ((int) textureMaxWidth - (int) num65) * scale; + } + if (index4 == num7) + num59 += num60; + } + } + } + if (flag1) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix); + } + if (!Main.mapFullscreen) + { + if (Main.mapStyle == 2) + { + float num72 = (float) (((double) scale * 0.200000002980232 * 2.0 + 1.0) / 3.0); + if ((double) num72 > 1.0) + num72 = 1f; + float num73 = num72 * Main.UIScale; + for (int index5 = 0; index5 < 200; ++index5) + { + if (Main.npc[index5].active && Main.npc[index5].townNPC) + { + int headIndex = NPC.TypeToHeadIndex(Main.npc[index5].type); + if (headIndex > 0) + { + SpriteEffects effects = SpriteEffects.None; + if (Main.npc[index5].direction > 0) + effects = SpriteEffects.FlipHorizontally; + float num74 = (float) (((double) Main.npc[index5].position.X + (double) (Main.npc[index5].width / 2)) / 16.0) * scale; + float num75 = (float) (((double) Main.npc[index5].position.Y + (double) (Main.npc[index5].height / 2)) / 16.0) * scale; + float num76 = num74 + num16; + float num77 = num75 + num17; + float x3 = num76 - 10f * scale; + float y3 = num77 - 10f * scale; + Main.spriteBatch.Draw(Main.npcHeadTexture[headIndex], new Vector2(x3, y3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[headIndex].Width, Main.npcHeadTexture[headIndex].Height)), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), 0.0f, new Vector2((float) (Main.npcHeadTexture[headIndex].Width / 2), (float) (Main.npcHeadTexture[headIndex].Height / 2)), num73, effects, 0.0f); + } + } + if (Main.npc[index5].active && Main.npc[index5].GetBossHeadTextureIndex() != -1) + { + float bossHeadRotation = Main.npc[index5].GetBossHeadRotation(); + SpriteEffects headSpriteEffects = Main.npc[index5].GetBossHeadSpriteEffects(); + Vector2 vector2 = Main.npc[index5].Center + new Vector2(0.0f, Main.npc[index5].gfxOffY); + if (Main.npc[index5].type == 134) + { + Vector2 center = Main.npc[index5].Center; + int num78 = 1; + for (int index6 = (int) Main.npc[index5].ai[0]; num78 < 15 && Main.npc[index6].active && Main.npc[index6].type >= 134 && Main.npc[index6].type <= 136; index6 = (int) Main.npc[index6].ai[0]) + { + ++num78; + center += Main.npc[index6].Center; + } + vector2 = center / (float) num78; + } + int headTextureIndex = Main.npc[index5].GetBossHeadTextureIndex(); + float num79 = vector2.X / 16f * scale; + float num80 = vector2.Y / 16f * scale; + float num81 = num79 + num16; + float num82 = num80 + num17; + float x4 = num81 - 10f * scale; + float y4 = num82 - 10f * scale; + Main.spriteBatch.Draw(Main.npcHeadBossTexture[headTextureIndex], new Vector2(x4, y4), new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), bossHeadRotation, Main.npcHeadBossTexture[headTextureIndex].Size() / 2f, num73, headSpriteEffects, 0.0f); + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && index != Main.myPlayer && (!Main.player[Main.myPlayer].hostile && !Main.player[index].hostile || Main.player[Main.myPlayer].team == Main.player[index].team && Main.player[index].team != 0 || index == Main.myPlayer)) + { + float num83 = (float) (((double) Main.player[index].position.X + (double) (Main.player[index].width / 2)) / 16.0) * scale; + float num84 = Main.player[index].position.Y / 16f * scale; + float num85 = num83 + num16; + float num86 = num84 + num17; + float num87 = num85 - 6f; + float num88 = num86 - 2f - (float) (2.0 - (double) scale / 5.0 * 2.0); + float X = num87 - 10f * scale; + float Y = num88 - 10f * scale; + this.DrawPlayerHead(Main.player[index], X, Y, (float) num5 / (float) byte.MaxValue, num73); + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + } + if (Main.mapStyle == 1) + { + float x5 = num3 - 6f; + float y5 = num4 - 6f; + float num89 = (float) (((double) scale * 0.25 * 2.0 + 1.0) / 3.0); + if ((double) num89 > 1.0) + num89 = 1f; + for (int index7 = 0; index7 < 200; ++index7) + { + if (Main.npc[index7].active && Main.npc[index7].townNPC) + { + int headIndex = NPC.TypeToHeadIndex(Main.npc[index7].type); + if (headIndex > 0) + { + SpriteEffects effects = SpriteEffects.None; + if (Main.npc[index7].direction > 0) + effects = SpriteEffects.FlipHorizontally; + float num90 = ((float) (((double) Main.npc[index7].position.X + (double) (Main.npc[index7].width / 2)) / 16.0) - num18) * scale; + float num91 = ((float) (((double) Main.npc[index7].position.Y + (double) Main.npc[index7].gfxOffY + (double) (Main.npc[index7].height / 2)) / 16.0) - num19) * scale; + float num92 = num90 + num3; + float num93 = num91 + num4 - (float) (2.0 * (double) scale / 5.0); + if ((double) num92 > (double) (Main.miniMapX + 12) && (double) num92 < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) num93 > (double) (Main.miniMapY + 10) && (double) num93 < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + Main.spriteBatch.Draw(Main.npcHeadTexture[headIndex], new Vector2(num92 + num10, num93 + num11), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[headIndex].Width, Main.npcHeadTexture[headIndex].Height)), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), 0.0f, new Vector2((float) (Main.npcHeadTexture[headIndex].Width / 2), (float) (Main.npcHeadTexture[headIndex].Height / 2)), num89, effects, 0.0f); + float num94 = num92 - (float) (Main.npcHeadTexture[headIndex].Width / 2) * num89; + float num95 = num93 - (float) (Main.npcHeadTexture[headIndex].Height / 2) * num89; + float num96 = num94 + (float) Main.npcHeadTexture[headIndex].Width * num89; + float num97 = num95 + (float) Main.npcHeadTexture[headIndex].Height * num89; + if ((double) Main.mouseX >= (double) num94 && (double) Main.mouseX <= (double) num96 && (double) Main.mouseY >= (double) num95 && (double) Main.mouseY <= (double) num97) + cursorText = Main.npc[index7].FullName; + } + } + } + if (Main.npc[index7].active && Main.npc[index7].GetBossHeadTextureIndex() != -1) + { + float bossHeadRotation = Main.npc[index7].GetBossHeadRotation(); + SpriteEffects headSpriteEffects = Main.npc[index7].GetBossHeadSpriteEffects(); + Vector2 vector2 = Main.npc[index7].Center + new Vector2(0.0f, Main.npc[index7].gfxOffY); + if (Main.npc[index7].type == 134) + { + Vector2 center = Main.npc[index7].Center; + int num98 = 1; + for (int index8 = (int) Main.npc[index7].ai[0]; num98 < 15 && Main.npc[index8].active && Main.npc[index8].type >= 134 && Main.npc[index8].type <= 136; index8 = (int) Main.npc[index8].ai[0]) + { + ++num98; + center += Main.npc[index8].Center; + } + vector2 = center / (float) num98; + } + int headTextureIndex = Main.npc[index7].GetBossHeadTextureIndex(); + float num99 = (vector2.X / 16f - num18) * scale; + float num100 = (vector2.Y / 16f - num19) * scale; + float num101 = num99 + num3; + float num102 = num100 + num4 - (float) (2.0 * (double) scale / 5.0); + if ((double) num101 > (double) (Main.miniMapX + 12) && (double) num101 < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) num102 > (double) (Main.miniMapY + 10) && (double) num102 < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + Main.spriteBatch.Draw(Main.npcHeadBossTexture[headTextureIndex], new Vector2(num101 + num10, num102 + num11), new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), bossHeadRotation, Main.npcHeadBossTexture[headTextureIndex].Size() / 2f, num89, headSpriteEffects, 0.0f); + float num103 = num101 - (float) (Main.npcHeadBossTexture[headTextureIndex].Width / 2) * num89; + float num104 = num102 - (float) (Main.npcHeadBossTexture[headTextureIndex].Height / 2) * num89; + float num105 = num103 + (float) Main.npcHeadBossTexture[headTextureIndex].Width * num89; + float num106 = num104 + (float) Main.npcHeadBossTexture[headTextureIndex].Height * num89; + if ((double) Main.mouseX >= (double) num103 && (double) Main.mouseX <= (double) num105 && (double) Main.mouseY >= (double) num104 && (double) Main.mouseY <= (double) num106) + cursorText = Main.npc[index7].GivenOrTypeName; + } + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && (!Main.player[Main.myPlayer].hostile && !Main.player[index].hostile || Main.player[Main.myPlayer].team == Main.player[index].team && Main.player[index].team != 0 || index == Main.myPlayer)) + { + float num107 = ((float) (((double) Main.player[index].position.X + (double) (Main.player[index].width / 2)) / 16.0) - num18) * scale; + float num108 = ((float) (((double) Main.player[index].position.Y + (double) Main.player[index].gfxOffY + (double) (Main.player[index].height / 2)) / 16.0) - num19) * scale; + float num109 = num107 + num3; + float num110 = num108 + num4; + float num111 = num109 - 6f; + float num112 = num110 - 6f - (float) (2.0 - (double) scale / 5.0 * 2.0); + float X = num111 + num10; + float Y = num112 + num11; + if ((double) Main.screenPosition.X != (double) Main.leftWorld + 640.0 + 16.0 && (double) Main.screenPosition.X + (double) Main.screenWidth != (double) Main.rightWorld - 640.0 - 32.0 && (double) Main.screenPosition.Y != (double) Main.topWorld + 640.0 + 16.0 && (double) Main.screenPosition.Y + (double) Main.screenHeight <= (double) Main.bottomWorld - 640.0 - 32.0 && index == Main.myPlayer && (double) Main.zoomX == 0.0 && (double) Main.zoomY == 0.0) + { + float num113 = num3 + (float) (Main.miniMapWidth / 2); + Y = num4 + (float) (Main.miniMapHeight / 2) - 3f; + X = num113 - 4f; + } + if (!Main.player[index].dead && (double) X > (double) (Main.miniMapX + 6) && (double) X < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) Y > (double) (Main.miniMapY + 6) && (double) Y < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + this.DrawPlayerHead(Main.player[index], X, Y, (float) num5 / (float) byte.MaxValue, num89); + if (index != Main.myPlayer) + { + float num114 = (float) ((double) X + 4.0 - 14.0 * (double) num89); + float num115 = (float) ((double) Y + 2.0 - 14.0 * (double) num89); + float num116 = num114 + 28f * num89; + float num117 = num115 + 28f * num89; + if ((double) Main.mouseX >= (double) num114 && (double) Main.mouseX <= (double) num116 && (double) Main.mouseY >= (double) num115 && (double) Main.mouseY <= (double) num117) + cursorText = Main.player[index].name; + } + } + if (Main.player[index].showLastDeath) + { + float num118 = (Main.player[index].lastDeathPostion.X / 16f - num18) * scale; + float num119 = (Main.player[index].lastDeathPostion.Y / 16f - num19) * scale; + float num120 = num118 + num3; + float num121 = num119 + num4 - (float) (2.0 - (double) scale / 5.0 * 2.0); + float x6 = num120 + num10; + float y6 = num121 + num11; + if ((double) x6 > (double) (Main.miniMapX + 8) && (double) x6 < (double) (Main.miniMapX + Main.miniMapWidth - 18) && (double) y6 > (double) (Main.miniMapY + 8) && (double) y6 < (double) (Main.miniMapY + Main.miniMapHeight - 16)) + { + Main.spriteBatch.Draw(this.mapDeathTexture, new Vector2(x6, y6), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, this.mapDeathTexture.Width, this.mapDeathTexture.Height)), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2((float) this.mapDeathTexture.Width * 0.5f, (float) this.mapDeathTexture.Height * 0.5f), num89, SpriteEffects.None, 0.0f); + float num122 = (float) ((double) x6 + 4.0 - 14.0 * (double) num89); + float num123 = (float) ((double) y6 + 2.0 - 14.0 * (double) num89); + float num124 = num122 - 4f; + float num125 = num123 - 4f; + float num126 = num124 + 28f * num89; + float num127 = num125 + 28f * num89; + if ((double) Main.mouseX >= (double) num124 && (double) Main.mouseX <= (double) num126 && (double) Main.mouseY >= (double) num125 && (double) Main.mouseY <= (double) num127) + { + TimeSpan time = DateTime.Now - Main.player[index].lastDeathTime; + cursorText = Language.GetTextValue("Game.PlayerDeathTime", (object) Main.player[index].name, (object) Lang.LocalizedDuration(time, false, false)); + } + } + } + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + Main.spriteBatch.Draw(Main.miniMapFrameTexture, new Vector2(x5, y5), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.miniMapFrameTexture.Width, Main.miniMapFrameTexture.Height)), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int index = 0; index < 3; ++index) + { + float x7 = x5 + 148f + (float) (index * 26); + float y7 = y5 + 234f; + if ((double) Main.mouseX > (double) x7 && (double) Main.mouseX < (double) x7 + 22.0 && (double) Main.mouseY > (double) y7 && (double) Main.mouseY < (double) y7 + 22.0) + { + Main.spriteBatch.Draw(Main.miniMapButtonTexture[index], new Vector2(x7, y7), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.miniMapButtonTexture[index].Width, Main.miniMapButtonTexture[index].Height)), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (!PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft) + { + if (Main.mouseLeftRelease) + Main.PlaySound(12); + switch (index) + { + case 0: + Main.mapMinimapScale = 1.25f; + continue; + case 1: + Main.mapMinimapScale *= 0.975f; + continue; + case 2: + Main.mapMinimapScale *= 1.025f; + continue; + default: + continue; + } + } + } + } + } + } + } + if (Main.mapFullscreen) + { + int x8 = (int) ((-(double) num16 + (double) Main.mouseX) / (double) scale + (double) num12); + int y8 = (int) ((-(double) num17 + (double) Main.mouseY) / (double) scale + (double) num13); + bool flag2 = false; + if ((double) x8 < (double) num12) + flag2 = true; + if ((double) x8 >= (double) num14) + flag2 = true; + if ((double) y8 < (double) num13) + flag2 = true; + if ((double) y8 >= (double) num15) + flag2 = true; + if (!flag2 && Main.Map[x8, y8].Light > (byte) 40) + { + int type = (int) Main.Map[x8, y8].Type; + int num128 = (int) MapHelper.tileLookup[21]; + int num129 = (int) MapHelper.tileLookup[441]; + int tileOptionCount1 = MapHelper.tileOptionCounts[21]; + int num130 = (int) MapHelper.tileLookup[467]; + int num131 = (int) MapHelper.tileLookup[468]; + int tileOptionCount2 = MapHelper.tileOptionCounts[467]; + int num132 = (int) MapHelper.tileLookup[88]; + int tileOptionCount3 = MapHelper.tileOptionCounts[88]; + LocalizedText[] chestType = Lang.chestType; + LocalizedText[] chestType2 = Lang.chestType2; + if (type >= num128 && type < num128 + tileOptionCount1) + { + Tile chestTile = Main.tile[x8, y8]; + if (chestTile != null) + { + int x9 = x8; + int y9 = y8; + if ((int) chestTile.frameX % 36 != 0) + --x9; + if ((int) chestTile.frameY % 36 != 0) + --y9; + cursorText = Main.DrawMap_FindChestName(chestType, chestTile, x9, y9); + } + } + else if (type >= num130 && type < num130 + tileOptionCount2) + { + Tile chestTile = Main.tile[x8, y8]; + if (chestTile != null) + { + int x10 = x8; + int y10 = y8; + if ((int) chestTile.frameX % 36 != 0) + --x10; + if ((int) chestTile.frameY % 36 != 0) + --y10; + cursorText = Main.DrawMap_FindChestName(chestType2, chestTile, x10, y10); + } + } + else if (type >= num129 && type < num129 + tileOptionCount1) + { + Tile tile = Main.tile[x8, y8]; + if (tile != null) + { + int num133 = x8; + int num134 = y8; + if ((int) tile.frameX % 36 != 0) + { + int num135 = num133 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num136 = num134 - 1; + } + cursorText = chestType[(int) tile.frameX / 36].Value; + } + } + else if (type >= num131 && type < num131 + tileOptionCount2) + { + Tile tile = Main.tile[x8, y8]; + if (tile != null) + { + int num137 = x8; + int num138 = y8; + if ((int) tile.frameX % 36 != 0) + { + int num139 = num137 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num140 = num138 - 1; + } + cursorText = chestType2[(int) tile.frameX / 36].Value; + } + } + else if (type >= num132 && type < num132 + tileOptionCount3) + { + Tile tile = Main.tile[x8, y8]; + if (tile != null) + { + int num141 = x8; + int num142 = y8; + int num143 = (int) tile.frameX % 54 / 18; + int X = num141 - num143; + if ((int) tile.frameY % 36 != 0) + --num142; + int Y = num142; + 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 num144; + if (((double) scale * 0.25 * 2.0 + 1.0) / 3.0 > 1.0) + num144 = 1f; + num144 = 1f; + float uiScale = Main.UIScale; + for (int index9 = 0; index9 < 200; ++index9) + { + if (Main.npc[index9].active && Main.npc[index9].townNPC) + { + int headIndex = NPC.TypeToHeadIndex(Main.npc[index9].type); + if (headIndex > 0) + { + SpriteEffects effects = SpriteEffects.None; + if (Main.npc[index9].direction > 0) + effects = SpriteEffects.FlipHorizontally; + float num145 = (float) (((double) Main.npc[index9].position.X + (double) (Main.npc[index9].width / 2)) / 16.0) * scale; + float num146 = (float) (((double) Main.npc[index9].position.Y + (double) Main.npc[index9].gfxOffY + (double) (Main.npc[index9].height / 2)) / 16.0) * scale; + float num147 = num145 + num16; + float num148 = num146 + num17; + float x11 = num147 - 10f * scale; + float y11 = num148 - 10f * scale; + Main.spriteBatch.Draw(Main.npcHeadTexture[headIndex], new Vector2(x11, y11), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcHeadTexture[headIndex].Width, Main.npcHeadTexture[headIndex].Height)), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), 0.0f, new Vector2((float) (Main.npcHeadTexture[headIndex].Width / 2), (float) (Main.npcHeadTexture[headIndex].Height / 2)), uiScale, effects, 0.0f); + float num149 = x11 - (float) (Main.npcHeadTexture[headIndex].Width / 2) * uiScale; + float num150 = y11 - (float) (Main.npcHeadTexture[headIndex].Height / 2) * uiScale; + float num151 = num149 + (float) Main.npcHeadTexture[headIndex].Width * uiScale; + float num152 = num150 + (float) Main.npcHeadTexture[headIndex].Height * uiScale; + if ((double) Main.mouseX >= (double) num149 && (double) Main.mouseX <= (double) num151 && (double) Main.mouseY >= (double) num150 && (double) Main.mouseY <= (double) num152) + cursorText = Main.npc[index9].FullName; + } + } + 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 num153 = 1; + for (int index10 = (int) Main.npc[index9].ai[0]; num153 < 15 && Main.npc[index10].active && Main.npc[index10].type >= 134 && Main.npc[index10].type <= 136; index10 = (int) Main.npc[index10].ai[0]) + { + ++num153; + center += Main.npc[index10].Center; + } + vector2 = center / (float) num153; + } + int headTextureIndex = Main.npc[index9].GetBossHeadTextureIndex(); + float num154 = vector2.X / 16f * scale; + float num155 = vector2.Y / 16f * scale; + float num156 = num154 + num16; + float num157 = num155 + num17; + float x12 = num156 - 10f * scale; + float y12 = num157 - 10f * scale; + Main.spriteBatch.Draw(Main.npcHeadBossTexture[headTextureIndex], new Vector2(x12, y12), new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) num5, (int) num5, (int) num5, (int) num5), bossHeadRotation, Main.npcHeadBossTexture[headTextureIndex].Size() / 2f, uiScale, headSpriteEffects, 0.0f); + float num158 = x12 - (float) (Main.npcHeadBossTexture[headTextureIndex].Width / 2) * uiScale; + float num159 = y12 - (float) (Main.npcHeadBossTexture[headTextureIndex].Height / 2) * uiScale; + float num160 = num158 + (float) Main.npcHeadBossTexture[headTextureIndex].Width * uiScale; + float num161 = num159 + (float) Main.npcHeadBossTexture[headTextureIndex].Height * uiScale; + if ((double) Main.mouseX >= (double) num158 && (double) Main.mouseX <= (double) num160 && (double) Main.mouseY >= (double) num159 && (double) Main.mouseY <= (double) num161) + cursorText = Main.npc[index9].GivenOrTypeName; + } + } + bool flag3 = false; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && (!Main.player[Main.myPlayer].hostile && !Main.player[index].hostile || Main.player[Main.myPlayer].team == Main.player[index].team && Main.player[index].team != 0 || index == Main.myPlayer) && Main.player[index].showLastDeath) + { + float num162 = (Main.player[index].lastDeathPostion.X / 16f - num18) * scale; + float num163 = (Main.player[index].lastDeathPostion.Y / 16f - num19) * scale; + float num164 = num162 + num16; + float num165 = num163 + num17 - (float) (2.0 - (double) scale / 5.0 * 2.0); + float x13 = num164 - 10f * scale; + float y13 = num165 - 10f * scale; + Main.spriteBatch.Draw(this.mapDeathTexture, new Vector2(x13, y13), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, this.mapDeathTexture.Width, this.mapDeathTexture.Height)), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2((float) this.mapDeathTexture.Width * 0.5f, (float) this.mapDeathTexture.Height * 0.5f), uiScale, SpriteEffects.None, 0.0f); + float num166 = (float) ((double) x13 + 4.0 - 14.0 * (double) uiScale); + float num167 = (float) ((double) y13 + 2.0 - 14.0 * (double) uiScale); + float num168 = num166 + 28f * uiScale; + float num169 = num167 + 28f * uiScale; + if ((double) Main.mouseX >= (double) num166 && (double) Main.mouseX <= (double) num168 && (double) Main.mouseY >= (double) num167 && (double) Main.mouseY <= (double) num169) + { + TimeSpan time = DateTime.Now - Main.player[index].lastDeathTime; + cursorText = Language.GetTextValue("Game.PlayerDeathTime", (object) Main.player[index].name, (object) Lang.LocalizedDuration(time, false, false)); + } + } + } + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && (!Main.player[Main.myPlayer].hostile && !Main.player[index].hostile || Main.player[Main.myPlayer].team == Main.player[index].team && Main.player[index].team != 0 || index == Main.myPlayer)) + { + float num170 = ((float) (((double) Main.player[index].position.X + (double) (Main.player[index].width / 2)) / 16.0) - num18) * scale; + float num171 = ((float) (((double) Main.player[index].position.Y + (double) Main.player[index].gfxOffY + (double) (Main.player[index].height / 2)) / 16.0) - num19) * scale; + float num172 = num170 + num16; + float num173 = num171 + num17; + float num174 = num172 - 6f; + float num175 = num173 - 2f - (float) (2.0 - (double) scale / 5.0 * 2.0); + float X = num174 - 10f * scale; + float Y = num175 - 10f * scale; + float num176 = (float) ((double) X + 4.0 - 14.0 * (double) uiScale); + float num177 = (float) ((double) Y + 2.0 - 14.0 * (double) uiScale); + float num178 = num176 + 28f * uiScale; + float num179 = num177 + 28f * uiScale; + if (!Main.player[index].dead) + { + this.DrawPlayerHead(Main.player[index], X, Y, (float) num5 / (float) byte.MaxValue, uiScale); + if ((double) Main.mouseX >= (double) num176 && (double) Main.mouseX <= (double) num178 && (double) Main.mouseY >= (double) num177 && (double) Main.mouseY <= (double) num179) + { + cursorText = Main.player[index].name; + if (index != Main.myPlayer && Main.player[Main.myPlayer].team > 0 && Main.player[Main.myPlayer].team == Main.player[index].team && Main.netMode == 1 && Main.player[Main.myPlayer].HasUnityPotion()) + { + flag3 = true; + if (!this.unityMouseOver) + Main.PlaySound(12); + this.unityMouseOver = true; + this.DrawPlayerHead(Main.player[index], X, Y, 2f, uiScale + 0.5f); + cursorText = Language.GetTextValue("Game.TeleportTo", (object) Main.player[index].name); + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.mapFullscreen = false; + Main.player[Main.myPlayer].UnityTeleport(Main.player[index].position); + Main.player[Main.myPlayer].TakeUnityPotion(); + } + } + } + } + } + } + if (!flag3 && this.unityMouseOver) + this.unityMouseOver = false; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + int num180 = 10; + int num181 = Main.screenHeight - 40; + if (Main.showFrameRate) + num181 -= 15; + int index11 = 0; + int num182 = 130; + if (Main.mouseX >= num180 && Main.mouseX <= num180 + 32 && Main.mouseY >= num181 && Main.mouseY <= num181 + 30) + { + num182 = (int) byte.MaxValue; + index11 += 4; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.PlaySound(10); + Main.mapFullscreen = false; + } + } + Main.spriteBatch.Draw(Main.mapIconTexture[index11], new Vector2((float) num180, (float) num181), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.mapIconTexture[index11].Width, Main.mapIconTexture[index11].Height)), new Microsoft.Xna.Framework.Color(num182, num182, num182, num182), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.DrawCursor(Main.DrawThickCursor()); + } + if (cursorText != "") + this.MouseText(cursorText); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + PlayerInput.SetZoom_Unscaled(); + TimeLogger.DetailedDrawTime(9); + } + + 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 DrawItems() + { + for (int whoami = 0; whoami < 400; ++whoami) + { + if (Main.item[whoami].active && Main.item[whoami].type > 0) + this.DrawItem(Main.item[whoami], whoami); + } + } + + public void DrawSimpleSurfaceBackground() + { + float val2 = (float) Main.worldSurface * 16f; + float num1 = Math.Min(Main.screenPosition.Y + (float) Main.screenHeight, val2) - Main.screenPosition.Y; + float y = Main.screenPosition.Y; + float num2 = Main.screenPosition.Y + num1; + Vector4 vector4_1 = Main.bgColor.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(Main.blackTileTexture, new Vector4(0.0f, 0.0f, (float) Main.screenWidth, num1), colors); + float w = (float) Main.screenHeight - 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(Main.blackTileTexture, new Vector4(0.0f, num1, (float) Main.screenWidth, w), colors); + } + + public void DrawCapture(Microsoft.Xna.Framework.Rectangle area, CaptureSettings settings) + { + float[] bgAlpha = Main.bgAlpha; + Main.bgAlpha = new float[bgAlpha.Length]; + for (int index = 0; index < Main.bgAlpha.Length; ++index) + Main.bgAlpha[index] = 0.0f; + Main.bgAlpha[settings.Biome.BackgroundIndex] = 1f; + float[] bgAlpha2 = Main.bgAlpha2; + Main.bgAlpha2 = new float[bgAlpha2.Length]; + for (int index = 0; index < Main.bgAlpha2.Length; ++index) + Main.bgAlpha2[index] = 0.0f; + Main.bgAlpha2[settings.Biome.BackgroundIndex2] = 1f; + if (settings.Biome.BackgroundIndex2 == 6) + Main.bgAlpha2[0] = 1f; + int holyTiles = Main.holyTiles; + Main.holyTiles = settings.Biome.BackgroundIndex == 6 ? 400 : 0; + int offScreenRange = Main.offScreenRange; + Main.offScreenRange = 0; + SpriteViewMatrix gameViewMatrix = Main.GameViewMatrix; + Main.GameViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + this.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; + int x1 = area.X; + int y1 = area.Y; + int num1 = area.X + Main.screenWidth / 16; + int num2 = area.Y + Main.screenHeight / 16; + Main.bgColor = Microsoft.Xna.Framework.Color.White; + double num3 = Main.time / 54000.0; + int screenWidth2 = Main.screenWidth; + int width1 = Main.sunTexture.Width; + int width2 = Main.sunTexture.Width; + Microsoft.Xna.Framework.Color white1 = Microsoft.Xna.Framework.Color.White; + double num4 = Main.time / 54000.0; + double num5 = Main.time / 32400.0; + int screenWidth3 = Main.screenWidth; + int width3 = Main.moonTexture[Main.moonType].Width; + int width4 = Main.moonTexture[Main.moonType].Width; + Microsoft.Xna.Framework.Color white2 = Microsoft.Xna.Framework.Color.White; + double num6 = Main.time / 32400.0; + double num7; + double num8; + if (Main.dayTime) + { + if (Main.time < 27000.0) + { + num7 = Math.Pow(1.0 - Main.time / 54000.0 * 2.0, 2.0); + int bgTop = this.bgTop; + } + else + { + num7 = Math.Pow((Main.time / 54000.0 - 0.5) * 2.0, 2.0); + int bgTop = this.bgTop; + } + } + else if (Main.time < 16200.0) + { + num8 = Math.Pow(1.0 - Main.time / 32400.0 * 2.0, 2.0); + int bgTop = this.bgTop; + } + else + { + num8 = Math.Pow((Main.time / 32400.0 - 0.5) * 2.0, 2.0); + int bgTop = this.bgTop; + } + if (Main.dayTime) + { + if (Main.time < 13500.0) + { + float num9 = (float) (Main.time / 13500.0); + white1.R = (byte) ((double) num9 * 200.0 + 55.0); + white1.G = (byte) ((double) num9 * 180.0 + 75.0); + white1.B = (byte) ((double) num9 * 250.0 + 5.0); + Main.bgColor.R = (byte) ((double) num9 * 230.0 + 25.0); + Main.bgColor.G = (byte) ((double) num9 * 220.0 + 35.0); + Main.bgColor.B = (byte) ((double) num9 * 220.0 + 35.0); + } + if (Main.time > 45900.0) + { + float num10 = (float) (1.0 - (Main.time / 54000.0 - 0.85) * (20.0 / 3.0)); + white1.R = (byte) ((double) num10 * 120.0 + 55.0); + white1.G = (byte) ((double) num10 * 100.0 + 25.0); + white1.B = (byte) ((double) num10 * 120.0 + 55.0); + Main.bgColor.R = (byte) ((double) num10 * 200.0 + 35.0); + Main.bgColor.G = (byte) ((double) num10 * 85.0 + 35.0); + Main.bgColor.B = (byte) ((double) num10 * 135.0 + 35.0); + } + else if (Main.time > 37800.0) + { + float num11 = (float) (1.0 - (Main.time / 54000.0 - 0.7) * (20.0 / 3.0)); + white1.R = (byte) ((double) num11 * 80.0 + 175.0); + white1.G = (byte) ((double) num11 * 130.0 + 125.0); + white1.B = (byte) ((double) num11 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num11 * 20.0 + 235.0); + Main.bgColor.G = (byte) ((double) num11 * 135.0 + 120.0); + Main.bgColor.B = (byte) ((double) num11 * 85.0 + 170.0); + } + } + if (!Main.dayTime) + { + if (Main.bloodMoon) + { + if (Main.time < 16200.0) + { + float num12 = (float) (1.0 - Main.time / 16200.0); + white2.R = (byte) ((double) num12 * 10.0 + 205.0); + white2.G = (byte) ((double) num12 * 170.0 + 55.0); + white2.B = (byte) ((double) num12 * 200.0 + 55.0); + Main.bgColor.R = (byte) (40.0 - (double) num12 * 40.0 + 35.0); + Main.bgColor.G = (byte) ((double) num12 * 20.0 + 15.0); + Main.bgColor.B = (byte) ((double) num12 * 20.0 + 15.0); + } + else if (Main.time >= 16200.0) + { + float num13 = (float) ((Main.time / 32400.0 - 0.5) * 2.0); + white2.R = (byte) ((double) num13 * 50.0 + 205.0); + white2.G = (byte) ((double) num13 * 100.0 + 155.0); + white2.B = (byte) ((double) num13 * 100.0 + 155.0); + white2.R = (byte) ((double) num13 * 10.0 + 205.0); + white2.G = (byte) ((double) num13 * 170.0 + 55.0); + white2.B = (byte) ((double) num13 * 200.0 + 55.0); + Main.bgColor.R = (byte) (40.0 - (double) num13 * 40.0 + 35.0); + Main.bgColor.G = (byte) ((double) num13 * 20.0 + 15.0); + Main.bgColor.B = (byte) ((double) num13 * 20.0 + 15.0); + } + } + else if (Main.time < 16200.0) + { + float num14 = (float) (1.0 - Main.time / 16200.0); + white2.R = (byte) ((double) num14 * 10.0 + 205.0); + white2.G = (byte) ((double) num14 * 70.0 + 155.0); + white2.B = (byte) ((double) num14 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num14 * 30.0 + 5.0); + Main.bgColor.G = (byte) ((double) num14 * 30.0 + 5.0); + Main.bgColor.B = (byte) ((double) num14 * 30.0 + 5.0); + } + else if (Main.time >= 16200.0) + { + float num15 = (float) ((Main.time / 32400.0 - 0.5) * 2.0); + white2.R = (byte) ((double) num15 * 50.0 + 205.0); + white2.G = (byte) ((double) num15 * 100.0 + 155.0); + white2.B = (byte) ((double) num15 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num15 * 20.0 + 5.0); + Main.bgColor.G = (byte) ((double) num15 * 30.0 + 5.0); + Main.bgColor.B = (byte) ((double) num15 * 30.0 + 5.0); + } + } + if (Main.gameMenu) + Main.bgDelay = 1000; + if (biome.TileColor == CaptureBiome.TileColorStyle.Corrupt) + { + float num16 = 1f; + int r1 = (int) Main.bgColor.R; + int g1 = (int) Main.bgColor.G; + int b1 = (int) Main.bgColor.B; + int num17 = r1 - (int) (100.0 * (double) num16 * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num18 = g1 - (int) (140.0 * (double) num16 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num19 = b1 - (int) (80.0 * (double) num16 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num17 < 15) + num17 = 15; + if (num18 < 15) + num18 = 15; + if (num19 < 15) + num19 = 15; + Main.bgColor.R = (byte) num17; + Main.bgColor.G = (byte) num18; + Main.bgColor.B = (byte) num19; + int r2 = (int) white1.R; + int g2 = (int) white1.G; + int b2 = (int) white1.B; + int num20 = r2 - (int) (100.0 * (double) num16 * ((double) white1.R / (double) byte.MaxValue)); + int num21 = g2 - (int) (100.0 * (double) num16 * ((double) white1.G / (double) byte.MaxValue)); + int num22 = b2 - (int) (0.0 * (double) num16 * ((double) white1.B / (double) byte.MaxValue)); + if (num20 < 15) + num20 = 15; + if (num21 < 15) + num21 = 15; + if (num22 < 15) + num22 = 15; + white1.R = (byte) num20; + white1.G = (byte) num21; + white1.B = (byte) num22; + int r3 = (int) white2.R; + int g3 = (int) white2.G; + int b3 = (int) white2.B; + int num23 = r3 - (int) (140.0 * (double) num16 * ((double) white2.R / (double) byte.MaxValue)); + int num24 = g3 - (int) (190.0 * (double) num16 * ((double) white2.G / (double) byte.MaxValue)); + int num25 = b3 - (int) (170.0 * (double) num16 * ((double) white2.B / (double) byte.MaxValue)); + if (num23 < 15) + num23 = 15; + if (num24 < 15) + num24 = 15; + if (num25 < 15) + num25 = 15; + white2.R = (byte) num23; + white2.G = (byte) num24; + white2.B = (byte) num25; + } + if (biome.TileColor == CaptureBiome.TileColorStyle.Crimson) + { + float num26 = 1f; + int r4 = (int) Main.bgColor.R; + int g4 = (int) Main.bgColor.G; + int b4 = (int) Main.bgColor.B; + int num27 = r4 - (int) (70.0 * (double) num26 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num28 = g4 - (int) (110.0 * (double) num26 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num29 = b4 - (int) (150.0 * (double) num26 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num27 < 15) + num27 = 15; + if (num28 < 15) + num28 = 15; + if (num29 < 15) + num29 = 15; + Main.bgColor.R = (byte) num27; + Main.bgColor.G = (byte) num28; + Main.bgColor.B = (byte) num29; + int num30 = (int) white1.R; + int g5 = (int) white1.G; + int b5 = (int) white1.B; + int num31 = g5 - (int) (90.0 * (double) num26 * ((double) white1.G / (double) byte.MaxValue)); + int num32 = b5 - (int) (110.0 * (double) num26 * ((double) white1.B / (double) byte.MaxValue)); + if (num30 < 15) + num30 = 15; + if (num31 < 15) + num31 = 15; + if (num32 < 15) + num32 = 15; + white1.R = (byte) num30; + white1.G = (byte) num31; + white1.B = (byte) num32; + int r5 = (int) white2.R; + int g6 = (int) white2.G; + int b6 = (int) white2.B; + int num33 = r5 - (int) (100.0 * (double) num26 * ((double) white2.R / (double) byte.MaxValue)); + int num34 = g6 - (int) (120.0 * (double) num26 * ((double) white2.G / (double) byte.MaxValue)); + int num35 = b6 - (int) (180.0 * (double) num26 * ((double) white2.B / (double) byte.MaxValue)); + if (num33 < 15) + num33 = 15; + if (num34 < 15) + num34 = 15; + if (num35 < 15) + num35 = 15; + white2.R = (byte) num33; + white2.G = (byte) num34; + white2.B = (byte) num35; + } + if (biome.TileColor == CaptureBiome.TileColorStyle.Jungle) + { + float num36 = 1f; + int r6 = (int) Main.bgColor.R; + int num37 = (int) Main.bgColor.G; + int b7 = (int) Main.bgColor.B; + int num38 = r6 - (int) (40.0 * (double) num36 * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num39 = b7 - (int) (70.0 * (double) num36 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num37 > (int) byte.MaxValue) + num37 = (int) byte.MaxValue; + if (num37 < 15) + num37 = 15; + if (num38 > (int) byte.MaxValue) + num38 = (int) byte.MaxValue; + if (num38 < 15) + num38 = 15; + if (num39 < 15) + num39 = 15; + Main.bgColor.R = (byte) num38; + Main.bgColor.G = (byte) num37; + Main.bgColor.B = (byte) num39; + int r7 = (int) white1.R; + int num40 = (int) white1.G; + int b8 = (int) white1.B; + int num41 = r7 - (int) (30.0 * (double) num36 * ((double) white1.R / (double) byte.MaxValue)); + int num42 = b8 - (int) (10.0 * (double) num36 * ((double) white1.B / (double) byte.MaxValue)); + if (num41 < 15) + num41 = 15; + if (num40 < 15) + num40 = 15; + if (num42 < 15) + num42 = 15; + white1.R = (byte) num41; + white1.G = (byte) num40; + white1.B = (byte) num42; + int r8 = (int) white2.R; + int g = (int) white2.G; + int b9 = (int) white2.B; + int num43 = g - (int) (140.0 * (double) num36 * ((double) white2.R / (double) byte.MaxValue)); + int num44 = r8 - (int) (170.0 * (double) num36 * ((double) white2.G / (double) byte.MaxValue)); + int num45 = b9 - (int) (190.0 * (double) num36 * ((double) white2.B / (double) byte.MaxValue)); + if (num44 < 15) + num44 = 15; + if (num43 < 15) + num43 = 15; + if (num45 < 15) + num45 = 15; + white2.R = (byte) num44; + white2.G = (byte) num43; + white2.B = (byte) num45; + } + if (biome.TileColor == CaptureBiome.TileColorStyle.Mushroom) + { + float num46 = 1f; + int r9 = (int) Main.bgColor.R; + int g7 = (int) Main.bgColor.G; + int b10 = (int) Main.bgColor.B; + int num47 = g7 - (int) (250.0 * (double) num46 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num48 = r9 - (int) (250.0 * (double) num46 * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num49 = b10 - (int) (250.0 * (double) num46 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num47 < 15) + num47 = 15; + if (num48 < 15) + num48 = 15; + if (num49 < 15) + num49 = 15; + Main.bgColor.R = (byte) num48; + Main.bgColor.G = (byte) num47; + Main.bgColor.B = (byte) num49; + int r10 = (int) white1.R; + int g8 = (int) white1.G; + int b11 = (int) white1.B; + int num50 = g8 - (int) (10.0 * (double) num46 * ((double) white1.G / (double) byte.MaxValue)); + int num51 = r10 - (int) (30.0 * (double) num46 * ((double) white1.R / (double) byte.MaxValue)); + int num52 = b11 - (int) (10.0 * (double) num46 * ((double) white1.B / (double) byte.MaxValue)); + if (num51 < 15) + num51 = 15; + if (num50 < 15) + num50 = 15; + if (num52 < 15) + num52 = 15; + white1.R = (byte) num51; + white1.G = (byte) num50; + white1.B = (byte) num52; + int r11 = (int) white2.R; + int g9 = (int) white2.G; + int b12 = (int) white2.B; + int num53 = g9 - (int) (140.0 * (double) num46 * ((double) white2.R / (double) byte.MaxValue)); + int num54 = r11 - (int) (170.0 * (double) num46 * ((double) white2.G / (double) byte.MaxValue)); + int num55 = b12 - (int) (190.0 * (double) num46 * ((double) white2.B / (double) byte.MaxValue)); + if (num54 < 15) + num54 = 15; + if (num53 < 15) + num53 = 15; + if (num55 < 15) + num55 = 15; + white2.R = (byte) num54; + white2.G = (byte) num53; + white2.B = (byte) num55; + } + if (Lighting.NotRetro) + { + if (Main.bgColor.R < (byte) 10) + Main.bgColor.R = (byte) 10; + if (Main.bgColor.G < (byte) 10) + Main.bgColor.G = (byte) 10; + if (Main.bgColor.B < (byte) 10) + Main.bgColor.B = (byte) 10; + } + else + { + if (Main.bgColor.R < (byte) 15) + Main.bgColor.R = (byte) 15; + if (Main.bgColor.G < (byte) 15) + Main.bgColor.G = (byte) 15; + if (Main.bgColor.B < (byte) 15) + Main.bgColor.B = (byte) 15; + } + Main.tileColor.A = byte.MaxValue; + Main.tileColor.R = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.R * 7) / 10); + Main.tileColor.G = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.G * 7) / 10); + Main.tileColor.B = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.B * 7) / 10); + Main.backColor = Main.bgColor; + Main.trueBackColor = Main.backColor; + Lighting.Initialize(true); + Main.renderCount = 99; + for (int index = 0; index < 3; ++index) + Lighting.LightTiles(x1, num1, y1, num2); + 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 num56 = Math.Min(val1_2, Main.maxTilesX - 5) + 2; + int num57 = Math.Min(val1_4, Main.maxTilesY - 5) + 4; + Microsoft.Xna.Framework.Rectangle drawArea = new Microsoft.Xna.Framework.Rectangle(x2, y2, num56 - x2, num57 - y2); + LiquidRenderer.Instance.PrepareDraw(drawArea); + WorldGen.SectionTileFrameWithCheck(x1, y1, num1, num2); + if (captureBackground) + { + Matrix transform = Main.Transform; + int screenHeight2 = Main.screenHeight; + int screenWidth4 = 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 num58 = 2500f; + float scale = MathHelper.Clamp((float) settings.Area.Height * 16f / num58, 1f, 2f); + 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) num58 * (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) num58 * (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); + } + Main.tileBatch.Begin(); + this.DrawSimpleSurfaceBackground(); + Main.tileBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.AnisotropicClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, transform); + 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 = screenWidth4; + 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.drawWaters(true); + else + this.drawWaters(true, Main.bloodMoon ? 9 : biome.WaterStyle, false); + 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 (captureEntities) + { + Main.spriteBatch.Begin(); + this.DrawRain(); + 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(); + } + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + if (biome == null) + this.DrawTiles(); + else + this.DrawTiles(waterStyleOverride: biome.WaterStyle); + Main.tileBatch.End(); + Main.spriteBatch.End(); + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + if (biome == null) + this.DrawTiles(false); + else + this.DrawTiles(false, Main.bloodMoon ? 9 : biome.WaterStyle); + Main.tileBatch.End(); + Main.spriteBatch.End(); + if (captureEntities) + { + Main.spriteBatch.Begin(); + this.waterfallManager.FindWaterfalls(); + this.waterfallManager.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + this.DrawPlayers(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(); + this.DrawNPCs(true); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCs); + Main.spriteBatch.Begin(); + this.DrawNPCs(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawCachedNPCs(this.DrawCacheNPCProjectiles, false); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawItems(); + Main.spriteBatch.End(); + this.DrawProjectiles(); + this.DrawDust(); + Main.spriteBatch.Begin(); + this.DrawGore(); + Main.spriteBatch.End(); + } + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + if (biome == null) + this.drawWaters(); + else + this.drawWaters(styleOverride: biome.WaterStyle, allowUpdate: false); + 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(Main.blackTileTexture, 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; + Lighting.Initialize(true); + Main.offScreenRange = offScreenRange; + Main.cloudAlpha = cloudAlpha; + Main.bgAlpha = bgAlpha; + Main.bgAlpha2 = bgAlpha2; + Main.holyTiles = holyTiles; + 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(); + if (Main.ignoreErrors) + { + try + { + this.DrawTiles(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawTiles(); + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + 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(); + if (Main.ignoreErrors) + { + try + { + this.DrawTiles(false); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawTiles(false); + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + 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); + } + + protected void drawWaters(bool bg = false, int styleOverride = -1, bool allowUpdate = true) + { + if (!bg) + { + Main.waterStyle = Main.bgStyle != 1 ? (Main.bgStyle != 5 ? (Main.bgStyle != 5 || Main.bloodTiles <= Main.holyTiles ? (Main.bgStyle != 3 ? (Main.bgStyle != 8 ? (Main.bgStyle != 6 ? (Main.bgStyle != 7 ? (Main.bgStyle != 2 ? ((double) Main.screenPosition.Y / 16.0 <= Main.rockLayer + 40.0 ? ((double) Main.screenPosition.Y / 16.0 <= Main.worldSurface ? 0 : 7) : (Main.shroomTiles <= 300 ? 8 : 7)) : 6) : 5) : 4) : 10) : 3) : 10) : (Main.evilTiles <= Main.holyTiles ? (Main.bloodTiles <= Main.holyTiles ? 4 : 10) : (Main.bloodTiles <= Main.evilTiles ? 2 : 10))) : 2; + if (Main.bgStyle != 4 && Main.bloodMoon && !Main.dayTime) + Main.waterStyle = 9; + if (Main.fountainColor >= 0) + Main.waterStyle = Main.fountainColor; + if (Main.waterStyle == 0) + { + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[0] += 0.2f; + if ((double) Main.liquidAlpha[0] > 1.0) + Main.liquidAlpha[0] = 1f; + } + if (Main.waterStyle == 2) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[2] += 0.2f; + if ((double) Main.liquidAlpha[2] > 1.0) + Main.liquidAlpha[2] = 1f; + } + if (Main.waterStyle == 3) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[3] += 0.2f; + if ((double) Main.liquidAlpha[3] > 1.0) + Main.liquidAlpha[3] = 1f; + } + if (Main.waterStyle == 4) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[4] += 0.2f; + if ((double) Main.liquidAlpha[4] > 1.0) + Main.liquidAlpha[4] = 1f; + } + if (Main.waterStyle == 5) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[5] += 0.2f; + if ((double) Main.liquidAlpha[5] > 1.0) + Main.liquidAlpha[5] = 1f; + } + if (Main.waterStyle == 6) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[6] += 0.2f; + if ((double) Main.liquidAlpha[6] > 1.0) + Main.liquidAlpha[6] = 1f; + } + if (Main.waterStyle == 7) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[7] += 0.2f; + if ((double) Main.liquidAlpha[7] > 1.0) + Main.liquidAlpha[7] = 1f; + } + if (Main.waterStyle == 8) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[8] += 0.2f; + if ((double) Main.liquidAlpha[8] > 1.0) + Main.liquidAlpha[8] = 1f; + } + if (Main.waterStyle == 9) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[10] -= 0.2f; + if ((double) Main.liquidAlpha[10] < 0.0) + Main.liquidAlpha[10] = 0.0f; + Main.liquidAlpha[9] += 0.2f; + if ((double) Main.liquidAlpha[9] > 1.0) + Main.liquidAlpha[9] = 1f; + } + if (Main.waterStyle == 10) + { + Main.liquidAlpha[0] -= 0.2f; + if ((double) Main.liquidAlpha[0] < 0.0) + Main.liquidAlpha[0] = 0.0f; + Main.liquidAlpha[2] -= 0.2f; + if ((double) Main.liquidAlpha[2] < 0.0) + Main.liquidAlpha[2] = 0.0f; + Main.liquidAlpha[3] -= 0.2f; + if ((double) Main.liquidAlpha[3] < 0.0) + Main.liquidAlpha[3] = 0.0f; + Main.liquidAlpha[4] -= 0.2f; + if ((double) Main.liquidAlpha[4] < 0.0) + Main.liquidAlpha[4] = 0.0f; + Main.liquidAlpha[5] -= 0.2f; + if ((double) Main.liquidAlpha[5] < 0.0) + Main.liquidAlpha[5] = 0.0f; + Main.liquidAlpha[6] -= 0.2f; + if ((double) Main.liquidAlpha[6] < 0.0) + Main.liquidAlpha[6] = 0.0f; + Main.liquidAlpha[7] -= 0.2f; + if ((double) Main.liquidAlpha[7] < 0.0) + Main.liquidAlpha[7] = 0.0f; + Main.liquidAlpha[8] -= 0.2f; + if ((double) Main.liquidAlpha[8] < 0.0) + Main.liquidAlpha[8] = 0.0f; + Main.liquidAlpha[9] -= 0.2f; + if ((double) Main.liquidAlpha[9] < 0.0) + Main.liquidAlpha[9] = 0.0f; + Main.liquidAlpha[10] += 0.2f; + if ((double) Main.liquidAlpha[10] > 1.0) + Main.liquidAlpha[10] = 1f; + } + } + Main.drewLava = false; + if (!Main.drawToScreen) + { + if ((!bg ^ styleOverride != -1) & allowUpdate) + { + 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 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); + } + if (styleOverride != -1) + { + this.DrawWater(bg, styleOverride); + } + else + { + for (int Style = 0; Style < 11; ++Style) + { + if (Style != 1 && (double) Main.liquidAlpha[Style] > 0.0) + this.DrawWater(bg, Style, Main.liquidAlpha[Style]); + } + } + } + else if (styleOverride != -1) + { + this.DrawWater(bg, styleOverride); + } + else + { + if ((double) Main.liquidAlpha[0] > 0.0) + { + if (bg) + this.DrawWater(bg); + else + this.DrawWater(bg, Alpha: Main.liquidAlpha[0]); + } + if ((double) Main.liquidAlpha[2] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 2) + this.DrawWater(bg, 2, Main.liquidAlpha[2]); + else + this.DrawWater(bg, 2); + } + else + this.DrawWater(bg, 2, Main.liquidAlpha[2]); + } + if ((double) Main.liquidAlpha[3] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 3) + this.DrawWater(bg, 3, Main.liquidAlpha[3]); + else + this.DrawWater(bg, 3); + } + else + this.DrawWater(bg, 3, Main.liquidAlpha[3]); + } + if ((double) Main.liquidAlpha[4] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 4) + this.DrawWater(bg, 4, Main.liquidAlpha[4]); + else + this.DrawWater(bg, 4); + } + else + this.DrawWater(bg, 4, Main.liquidAlpha[4]); + } + if ((double) Main.liquidAlpha[5] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 5) + this.DrawWater(bg, 5, Main.liquidAlpha[5]); + else + this.DrawWater(bg, 5); + } + else + this.DrawWater(bg, 5, Main.liquidAlpha[5]); + } + if ((double) Main.liquidAlpha[6] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 6) + this.DrawWater(bg, 6, Main.liquidAlpha[6]); + else + this.DrawWater(bg, 6); + } + else + this.DrawWater(bg, 6, Main.liquidAlpha[6]); + } + if ((double) Main.liquidAlpha[7] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 7) + this.DrawWater(bg, 7, Main.liquidAlpha[7]); + else + this.DrawWater(bg, 7); + } + else + this.DrawWater(bg, 7, Main.liquidAlpha[7]); + } + if ((double) Main.liquidAlpha[8] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 8) + this.DrawWater(bg, 8, Main.liquidAlpha[8]); + else + this.DrawWater(bg, 8); + } + else + this.DrawWater(bg, 8, Main.liquidAlpha[8]); + } + if ((double) Main.liquidAlpha[9] > 0.0) + { + if (bg) + { + if (Main.waterStyle < 9) + this.DrawWater(bg, 9, Main.liquidAlpha[9]); + else + this.DrawWater(bg, 9); + } + else + this.DrawWater(bg, 9, Main.liquidAlpha[9]); + } + if ((double) Main.liquidAlpha[10] <= 0.0) + return; + if (bg) + { + if (Main.waterStyle < 10) + this.DrawWater(bg, 10, Main.liquidAlpha[10]); + else + this.DrawWater(bg, 10); + } + else + this.DrawWater(bg, 10, Main.liquidAlpha[10]); + } + } + + 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 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; + 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(Main.liquidTexture[index1], 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(Main.liquidTexture[index1], 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(Main.liquidTexture[index1], 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(Main.liquidTexture[index1], 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) 1) + { + 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.lightMode) + { + case 2: + num2 = (float) ((int) Main.tileColor.R - 55) / (float) byte.MaxValue; + if ((double) num2 < 0.0) + { + num2 = 0.0f; + break; + } + break; + case 3: + num2 = (float) (num1 - 55) / (float) byte.MaxValue; + if ((double) num2 < 0.0) + { + num2 = 0.0f; + break; + } + break; + } + int num3 = Main.offScreenRange / 16; + int num4 = (int) (((double) Main.screenPosition.X - (double) vector2.X) / 16.0 - 1.0) - num3; + int num5 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2.X) / 16.0) + 2 + num3; + int val1_1 = (int) (((double) Main.screenPosition.Y - (double) vector2.Y) / 16.0 - 1.0) - num3; + int val1_2 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2.Y) / 16.0) + 5 + num3; + if (num4 < 0) + num4 = num3; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX - num3; + if (val1_1 < 0) + val1_1 = num3; + if (val1_2 > Main.maxTilesY) + val1_2 = Main.maxTilesY - num3; + 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.maxTilesY - 200); + val1_1 = Math.Max(val1_1, Main.maxTilesY - 200); + } + } + for (int y = val1_1; y < val1_2; ++y) + { + bool flag = y >= Main.maxTilesY - 200; + if (flag) + num2 = 0.2f; + for (int x = num4; x < num5; ++x) + { + int num6 = x; + for (; x < num5; ++x) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + Tile testTile = Main.tile[x, y]; + float num7 = (float) Math.Floor((double) Lighting.Brightness(x, y) * (double) byte.MaxValue) / (float) byte.MaxValue; + byte liquid = testTile.liquid; + if (((((double) num7 > (double) num2 ? 0 : (!flag && liquid < (byte) 250 || WorldGen.SolidTile(testTile) ? 1 : (liquid < (byte) 200 ? 0 : ((double) num7 == 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 : (Lighting.LightingDrawToScreen || !LiquidRenderer.Instance.HasFullWater(x, y) || testTile.wall != (byte) 0 || testTile.halfBrick() ? 1 : ((double) y <= Main.worldSurface ? 1 : 0))) == 0) + break; + } + if (x - num6 > 0) + Main.spriteBatch.Draw(Main.blackTileTexture, new Vector2((float) (num6 << 4), (float) (y << 4)) - Main.screenPosition + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, x - num6 << 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() + { + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num1 = (int) (120.0 * (1.0 - (double) Main.gfxQuality) + 40.0 * (double) Main.gfxQuality); + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + int num2 = (int) (((double) Main.screenPosition.X - (double) vector2.X) / 16.0 - 1.0); + int num3 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2.X) / 16.0) + 2; + int num4 = (int) (((double) Main.screenPosition.Y - (double) vector2.Y) / 16.0 - 1.0); + int num5 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2.Y) / 16.0) + 5; + int num6 = Main.offScreenRange / 16; + int num7 = Main.offScreenRange / 16; + if (num2 - num6 < 4) + num2 = num6 + 4; + if (num3 + num6 > Main.maxTilesX - 4) + num3 = Main.maxTilesX - num6 - 4; + if (num4 - num7 < 4) + num4 = num7 + 4; + if (num5 + num7 > Main.maxTilesY - 4) + num5 = Main.maxTilesY - num7 - 4; + int num8 = Main.maxTilesY - 200; + for (int index1 = num4 - num7; index1 < num5 + num7; ++index1) + { + for (int index2 = num2 - num6; index2 < num3 + num6; ++index2) + { + Tile testTile = Main.tile[index2, index1]; + if (testTile == null) + { + testTile = new Tile(); + Main.tile[index2, index1] = testTile; + } + byte wall = testTile.wall; + if (wall > (byte) 0 && !this.FullTile(index2, index1)) + { + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor(index2, index1); + if (color1.R != (byte) 0 || color1.G != (byte) 0 || color1.B != (byte) 0 || index1 >= num8) + { + this.LoadWall((int) wall); + int num9 = (int) Main.wallFrame[(int) wall] * 180; + Microsoft.Xna.Framework.Rectangle rectangle; + if (Lighting.NotRetro && !Main.wallLight[(int) wall] && (testTile.wall < (byte) 88 || testTile.wall > (byte) 93) && !WorldGen.SolidTile(testTile)) + { + Texture2D texture = !Main.canDrawColorWall(index2, index1) ? Main.wallTexture[(int) testTile.wall] : (Texture2D) Main.wallAltTexture[(int) testTile.wall, (int) testTile.wallColor()]; + VertexColors vertices; + if (testTile.wall == (byte) 44) + { + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.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.GetColor4Slice_New(index2, index1, out vertices); + Main.tileBatch.Draw(texture, new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X - 8), (float) (index1 * 16 - (int) Main.screenPosition.Y - 8)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(testTile.wallFrameX(), testTile.wallFrameY() + num9, 32, 32)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + else if (testTile.wall == (byte) 44) + { + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color(); + color3.R = (byte) Main.DiscoR; + color3.G = (byte) Main.DiscoG; + color3.B = (byte) Main.DiscoB; + color3.A = byte.MaxValue; + rectangle = new Microsoft.Xna.Framework.Rectangle(testTile.wallFrameX(), testTile.wallFrameY() + num9, 32, 32); + Main.spriteBatch.Draw(Main.wallTexture[(int) testTile.wall], new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X - 8), (float) (index1 * 16 - (int) Main.screenPosition.Y - 8)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else + { + rectangle = new Microsoft.Xna.Framework.Rectangle(testTile.wallFrameX(), testTile.wallFrameY() + num9, 32, 32); + if (Main.canDrawColorWall(index2, index1)) + Main.spriteBatch.Draw((Texture2D) Main.wallAltTexture[(int) testTile.wall, (int) testTile.wallColor()], new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X - 8), (float) (index1 * 16 - (int) Main.screenPosition.Y - 8)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.wallTexture[(int) testTile.wall], new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X - 8), (float) (index1 * 16 - (int) Main.screenPosition.Y - 8)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + if ((double) color1.R > (double) num1 * 0.4 || (double) color1.G > (double) num1 * 0.35 || (double) color1.B > (double) num1 * 0.3) + { + int num10 = Main.tile[index2 - 1, index1].wall <= (byte) 0 ? 0 : (Main.wallBlend[(int) Main.tile[index2 - 1, index1].wall] != Main.wallBlend[(int) testTile.wall] ? 1 : 0); + bool flag1 = Main.tile[index2 + 1, index1].wall > (byte) 0 && Main.wallBlend[(int) Main.tile[index2 + 1, index1].wall] != Main.wallBlend[(int) testTile.wall]; + bool flag2 = Main.tile[index2, index1 - 1].wall > (byte) 0 && Main.wallBlend[(int) Main.tile[index2, index1 - 1].wall] != Main.wallBlend[(int) testTile.wall]; + bool flag3 = Main.tile[index2, index1 + 1].wall > (byte) 0 && Main.wallBlend[(int) Main.tile[index2, index1 + 1].wall] != Main.wallBlend[(int) testTile.wall]; + if (num10 != 0) + Main.spriteBatch.Draw(Main.wallOutlineTexture, new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X), (float) (index1 * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 2, 16)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag1) + Main.spriteBatch.Draw(Main.wallOutlineTexture, new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X + 14), (float) (index1 * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(14, 0, 2, 16)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag2) + Main.spriteBatch.Draw(Main.wallOutlineTexture, new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X), (float) (index1 * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 2)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag3) + Main.spriteBatch.Draw(Main.wallOutlineTexture, new Vector2((float) (index2 * 16 - (int) Main.screenPosition.X), (float) (index1 * 16 - (int) Main.screenPosition.Y + 14)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 14, 16, 2)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + this.DrawTileCracks(2); + TimeLogger.DrawTime(2, stopwatch.Elapsed.TotalMilliseconds); + } + + 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.Depth16, 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.Depth24, 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.Depth24); + this.backWaterTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + this.blackTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + this.tileTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + this.tile2Target = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + this.wallTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + this.backgroundTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + Main.screenTarget = new RenderTarget2D(this.GraphicsDevice, this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + Main.screenTargetSwap = new RenderTarget2D(this.GraphicsDevice, this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); + if (Main.OnRenderTargetsInitialized == null) + return; + Main.OnRenderTargetsInitialized(this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight); + } + catch + { + Lighting.lightMode = 2; + 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; + for (int y = num9; y < num10; ++y) + { + for (int x = num7; x < num8; ++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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.wireTextureNew, 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(Main.actuatorTexture, 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, Main.actuatorTexture.Width, Main.actuatorTexture.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); + } + + protected void DrawWiresOld() + { + double gfxQuality1 = (double) Main.gfxQuality; + double gfxQuality2 = (double) Main.gfxQuality; + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + int num1 = (int) (((double) Main.screenPosition.X - (double) vector2.X) / 16.0 - 1.0); + int num2 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2.X) / 16.0) + 2; + int num3 = (int) (((double) Main.screenPosition.Y - (double) vector2.Y) / 16.0 - 1.0); + int num4 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2.Y) / 16.0) + 5; + 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 y = num3; y < num4; ++y) + { + for (int x = num1; x < num2; ++x) + { + if (Main.tile[x, y].wire() && (double) Lighting.Brightness(x, y) > 0.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num5 = Main.tile[x, y - 1].wire() ? 1 : 0; + bool flag1 = Main.tile[x, y + 1].wire(); + bool flag2 = Main.tile[x - 1, y].wire(); + bool flag3 = Main.tile[x + 1, y].wire(); + rectangle = num5 == 0 ? (!flag1 ? (!flag2 ? (!flag3 ? new Microsoft.Xna.Framework.Rectangle(0, 54, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 36, 16, 16)) : (!flag3 ? new Microsoft.Xna.Framework.Rectangle(54, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 0, 16, 16))) : (!flag2 ? (!flag3 ? new Microsoft.Xna.Framework.Rectangle(18, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 36, 16, 16)) : (!flag3 ? new Microsoft.Xna.Framework.Rectangle(72, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 0, 16, 16)))) : (!flag1 ? (!flag2 ? (!flag3 ? new Microsoft.Xna.Framework.Rectangle(36, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 18, 16, 16)) : (!flag3 ? new Microsoft.Xna.Framework.Rectangle(54, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 18, 16, 16))) : (!flag2 ? (!flag3 ? new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 0, 16, 16)) : (!flag3 ? new Microsoft.Xna.Framework.Rectangle(54, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 18, 16, 16)))); + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + Main.spriteBatch.Draw(Main.wireTexture, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.tile[x, y].wire2() && (double) Lighting.Brightness(x, y) > 0.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num6 = Main.tile[x, y - 1].wire2() ? 1 : 0; + bool flag4 = Main.tile[x, y + 1].wire2(); + bool flag5 = Main.tile[x - 1, y].wire2(); + bool flag6 = Main.tile[x + 1, y].wire2(); + rectangle = num6 == 0 ? (!flag4 ? (!flag5 ? (!flag6 ? new Microsoft.Xna.Framework.Rectangle(0, 54, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 36, 16, 16)) : (!flag6 ? new Microsoft.Xna.Framework.Rectangle(54, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 0, 16, 16))) : (!flag5 ? (!flag6 ? new Microsoft.Xna.Framework.Rectangle(18, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 36, 16, 16)) : (!flag6 ? new Microsoft.Xna.Framework.Rectangle(72, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 0, 16, 16)))) : (!flag4 ? (!flag5 ? (!flag6 ? new Microsoft.Xna.Framework.Rectangle(36, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 18, 16, 16)) : (!flag6 ? new Microsoft.Xna.Framework.Rectangle(54, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 18, 16, 16))) : (!flag5 ? (!flag6 ? new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 0, 16, 16)) : (!flag6 ? new Microsoft.Xna.Framework.Rectangle(54, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 18, 16, 16)))); + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + int num7 = 1; + if (Main.tile[x, y].wire()) + ++num7; + float num8 = 1f / (float) num7; + color = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color.R * (double) num8), (int) (byte) ((double) color.G * (double) num8), (int) (byte) ((double) color.B * (double) num8), (int) (byte) ((double) color.A * (double) num8)); + Main.spriteBatch.Draw(Main.wire2Texture, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.tile[x, y].wire3() && (double) Lighting.Brightness(x, y) > 0.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num9 = Main.tile[x, y - 1].wire3() ? 1 : 0; + bool flag7 = Main.tile[x, y + 1].wire3(); + bool flag8 = Main.tile[x - 1, y].wire3(); + bool flag9 = Main.tile[x + 1, y].wire3(); + rectangle = num9 == 0 ? (!flag7 ? (!flag8 ? (!flag9 ? new Microsoft.Xna.Framework.Rectangle(0, 54, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 36, 16, 16)) : (!flag9 ? new Microsoft.Xna.Framework.Rectangle(54, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 0, 16, 16))) : (!flag8 ? (!flag9 ? new Microsoft.Xna.Framework.Rectangle(18, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 36, 16, 16)) : (!flag9 ? new Microsoft.Xna.Framework.Rectangle(72, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 0, 16, 16)))) : (!flag7 ? (!flag8 ? (!flag9 ? new Microsoft.Xna.Framework.Rectangle(36, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 18, 16, 16)) : (!flag9 ? new Microsoft.Xna.Framework.Rectangle(54, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 18, 16, 16))) : (!flag8 ? (!flag9 ? new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 0, 16, 16)) : (!flag9 ? new Microsoft.Xna.Framework.Rectangle(54, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 18, 16, 16)))); + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + int num10 = 1; + if (Main.tile[x, y].wire()) + ++num10; + if (Main.tile[x, y].wire2()) + ++num10; + float num11 = 1f / (float) num10; + color = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color.R * (double) num11), (int) (byte) ((double) color.G * (double) num11), (int) (byte) ((double) color.B * (double) num11), (int) (byte) ((double) color.A * (double) num11)); + Main.spriteBatch.Draw(Main.wire3Texture, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.tile[x, y].wire4() && (double) Lighting.Brightness(x, y) > 0.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num12 = Main.tile[x, y - 1].wire4() ? 1 : 0; + bool flag10 = Main.tile[x, y + 1].wire4(); + bool flag11 = Main.tile[x - 1, y].wire4(); + bool flag12 = Main.tile[x + 1, y].wire4(); + rectangle = num12 == 0 ? (!flag10 ? (!flag11 ? (!flag12 ? new Microsoft.Xna.Framework.Rectangle(0, 54, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 36, 16, 16)) : (!flag12 ? new Microsoft.Xna.Framework.Rectangle(54, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 0, 16, 16))) : (!flag11 ? (!flag12 ? new Microsoft.Xna.Framework.Rectangle(18, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 36, 16, 16)) : (!flag12 ? new Microsoft.Xna.Framework.Rectangle(72, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(72, 0, 16, 16)))) : (!flag10 ? (!flag11 ? (!flag12 ? new Microsoft.Xna.Framework.Rectangle(36, 36, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 18, 16, 16)) : (!flag12 ? new Microsoft.Xna.Framework.Rectangle(54, 18, 16, 16) : new Microsoft.Xna.Framework.Rectangle(0, 18, 16, 16))) : (!flag11 ? (!flag12 ? new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(36, 0, 16, 16)) : (!flag12 ? new Microsoft.Xna.Framework.Rectangle(54, 0, 16, 16) : new Microsoft.Xna.Framework.Rectangle(18, 18, 16, 16)))); + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + int num13 = 1; + if (Main.tile[x, y].wire()) + ++num13; + if (Main.tile[x, y].wire2()) + ++num13; + if (Main.tile[x, y].wire3()) + ++num13; + float num14 = 1f / (float) num13; + color = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color.R * (double) num14), (int) (byte) ((double) color.G * (double) num14), (int) (byte) ((double) color.B * (double) num14), (int) (byte) ((double) color.A * (double) num14)); + Main.spriteBatch.Draw(Main.wire4Texture, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.tile[x, y].actuator() && (double) Lighting.Brightness(x, y) > 0.0) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + Main.spriteBatch.Draw(Main.actuatorTexture, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.actuatorTexture.Width, Main.actuatorTexture.Height)), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + TimeLogger.DetailedDrawTime(34); + } + + public static int GetTreeStyle(int X) + { + int num = X > Main.treeX[0] ? (X > Main.treeX[1] ? (X > Main.treeX[2] ? Main.treeStyle[3] : Main.treeStyle[2]) : Main.treeStyle[1]) : Main.treeStyle[0]; + switch (num) + { + case 0: + return 0; + case 5: + return 10; + default: + return 5 + num; + } + } + + protected void lookForColorTiles() + { + int num1 = (int) ((double) Main.screenPosition.X / 16.0 - 2.0); + int num2 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0) + 3; + int num3 = (int) ((double) Main.screenPosition.Y / 16.0 - 2.0); + int num4 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0) + 3; + if (num1 < 1) + num1 = 1; + if (num2 > Main.maxTilesX - 2) + num2 = Main.maxTilesX - 2; + if (num3 < 1) + num3 = 1; + if (num4 > Main.maxTilesY - 2) + num4 = Main.maxTilesY - 2; + for (int x = num1; x < num2; ++x) + { + if (x > 0) + { + for (int y = num3; y < num4; ++y) + { + if (Main.tile[x, y] != null) + { + int treeVariant = Main.GetTreeVariant(x, y); + if (treeVariant != -1) + this.woodColorCheck(treeVariant, (int) Main.tile[x, y].color()); + if (Main.tile[x, y].active() && Main.tile[x, y].color() > (byte) 0) + this.tileColorCheck((int) Main.tile[x, y].type, (int) Main.tile[x, y].color()); + if (Main.tile[x, y].wall > (byte) 0 && Main.tile[x, y].wallColor() > (byte) 0) + this.wallColorCheck((int) Main.tile[x, y].wall, (int) Main.tile[x, y].wallColor()); + } + } + } + } + for (int t = 0; t < Main.numTreeStyles; ++t) + { + for (int c = 0; c < Main.numTileColors; ++c) + { + if (Main.checkTreeAlt[t, c]) + { + this.treeColorCheck(t, c); + Main.checkTreeAlt[t, c] = false; + } + } + } + } + + protected 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: + return 2; + case 147: + return 3; + case 199: + return 4; + default: + return -1; + } + } + + protected void woodColorCheck(int t, int c) + { + this.LoadTiles(5); + if (c >= Main.numTileColors) + return; + bool flag = false; + if (Main.woodAltTexture[t, c] == null) + { + Main.woodAltTexture[t, c] = new RenderTarget2D(this.GraphicsDevice, Main.woodTexture[t].Width, Main.woodTexture[t].Height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents); + flag = true; + } + if (Main.woodAltTexture[t, c].IsContentLost) + flag = true; + if (!flag) + return; + this.GraphicsDevice.SetRenderTarget(Main.woodAltTexture[t, c]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (c >= 28) + Main.tileShader.CurrentTechnique.Passes[40 + c - 28].Apply(); + else if (c > 0 && c < 13) + Main.tileShader.CurrentTechnique.Passes[c + 27].Apply(); + else + Main.tileShader.CurrentTechnique.Passes[c].Apply(); + Main.spriteBatch.Draw(Main.woodTexture[t], new Microsoft.Xna.Framework.Rectangle(0, 0, Main.woodTexture[t].Width, Main.woodTexture[t].Height), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void tileColorCheck(int t, int c) + { + this.LoadTiles(t); + if (c >= Main.numTileColors) + return; + if (!Main.tileAltTextureInit[t, c]) + { + Main.tileAltTexture[t, c] = new RenderTarget2D(this.GraphicsDevice, Main.tileTexture[t].Width, Main.tileTexture[t].Height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents); + Main.tileAltTextureInit[t, c] = true; + } + if (Main.tileAltTexture[t, c].IsContentLost) + Main.tileAltTextureDrawn[t, c] = false; + if (Main.tileAltTextureDrawn[t, c]) + return; + this.GraphicsDevice.SetRenderTarget(Main.tileAltTexture[t, c]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (c >= 28) + Main.tileShader.CurrentTechnique.Passes[40 + c - 28].Apply(); + else if (c > 0 && c < 13 && (t == 0 || t == 2 || t == 5 || t == 23 || t == 59 || t == 60 || t == 70 || t == 109 || t == 199)) + Main.tileShader.CurrentTechnique.Passes[c + 27].Apply(); + else + Main.tileShader.CurrentTechnique.Passes[c].Apply(); + Main.spriteBatch.Draw(Main.tileTexture[t], new Microsoft.Xna.Framework.Rectangle(0, 0, Main.tileTexture[t].Width, Main.tileTexture[t].Height), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + Main.tileAltTextureDrawn[t, c] = true; + } + + protected void treeColorCheck(int t, int c) + { + if (!Main.treeAltTextureInit[t, c]) + { + Main.treeTopAltTexture[t, c] = new RenderTarget2D(this.GraphicsDevice, Main.treeTopTexture[t].Width, Main.treeTopTexture[t].Height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents); + Main.treeBranchAltTexture[t, c] = new RenderTarget2D(this.GraphicsDevice, Main.treeBranchTexture[t].Width, Main.treeBranchTexture[t].Height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents); + Main.treeAltTextureInit[t, c] = true; + } + if (Main.treeTopAltTexture[t, c].IsContentLost || Main.treeBranchAltTexture[t, c].IsContentLost) + Main.treeAltTextureDrawn[t, c] = false; + if (Main.treeAltTextureDrawn[t, c]) + return; + this.GraphicsDevice.SetRenderTarget(Main.treeTopAltTexture[t, c]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (c >= 28) + Main.tileShader.CurrentTechnique.Passes[40 + c - 28].Apply(); + else if (c > 0 && c < 13) + Main.tileShader.CurrentTechnique.Passes[c + 27].Apply(); + else + Main.tileShader.CurrentTechnique.Passes[c].Apply(); + Main.spriteBatch.Draw(Main.treeTopTexture[t], new Microsoft.Xna.Framework.Rectangle(0, 0, Main.treeTopTexture[t].Width, Main.treeTopTexture[t].Height), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + this.GraphicsDevice.SetRenderTarget(Main.treeBranchAltTexture[t, c]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (c >= 28) + Main.tileShader.CurrentTechnique.Passes[40 + c - 28].Apply(); + else if (c > 0 && c < 13) + Main.tileShader.CurrentTechnique.Passes[c + 27].Apply(); + else + Main.tileShader.CurrentTechnique.Passes[c].Apply(); + Main.spriteBatch.Draw(Main.treeBranchTexture[t], new Microsoft.Xna.Framework.Rectangle(0, 0, Main.treeBranchTexture[t].Width, Main.treeBranchTexture[t].Height), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + Main.treeAltTextureDrawn[t, c] = true; + } + + protected void wallColorCheck(int t, int c) + { + this.LoadWall(t); + if (!Main.wallAltTextureInit[t, c]) + { + Main.wallAltTexture[t, c] = new RenderTarget2D(this.GraphicsDevice, Main.wallTexture[t].Width, Main.wallTexture[t].Height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents); + Main.wallAltTextureInit[t, c] = true; + } + if (Main.wallAltTexture[t, c].IsContentLost) + Main.wallAltTextureDrawn[t, c] = false; + if (Main.wallAltTextureDrawn[t, c]) + return; + this.GraphicsDevice.SetRenderTarget(Main.wallAltTexture[t, c]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (c == 30) + Main.tileShader.CurrentTechnique.Passes[43].Apply(); + else if (c >= 28) + Main.tileShader.CurrentTechnique.Passes[40 + c - 28].Apply(); + else + Main.tileShader.CurrentTechnique.Passes[c].Apply(); + Main.spriteBatch.Draw(Main.wallTexture[t], new Microsoft.Xna.Framework.Rectangle(0, 0, Main.wallTexture[t].Width, Main.wallTexture[t].Height), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + Main.wallAltTextureDrawn[t, c] = true; + } + + public void UpdateWeather(GameTime gameTime) + { + Main.cloudLimit = 200; + if ((double) Main.windSpeed < (double) Main.windSpeedSet) + { + Main.windSpeed += 1f / 1000f * (float) Main.dayRate; + if ((double) Main.windSpeed > (double) Main.windSpeedSet) + Main.windSpeed = Main.windSpeedSet; + } + else if ((double) Main.windSpeed > (double) Main.windSpeedSet) + { + Main.windSpeed -= 1f / 1000f * (float) Main.dayRate; + if ((double) Main.windSpeed < (double) Main.windSpeedSet) + Main.windSpeed = Main.windSpeedSet; + } + switch (Main.netMode) + { + case 1: + break; + case 2: + Main.windSpeedSpeed += (float) Main.rand.Next(-10, 11) * 0.0001f; + if (!Main.dayTime) + Main.windSpeedSpeed += (float) Main.rand.Next(-10, 11) * 0.0002f; + if ((double) Main.windSpeedSpeed < -0.002) + Main.windSpeedSpeed = -1f / 500f; + if ((double) Main.windSpeedSpeed > 0.002) + Main.windSpeedSpeed = 1f / 500f; + Main.windSpeedTemp += Main.windSpeedSpeed; + if (Main.raining) + Main.windSpeedTemp += Main.windSpeedSpeed * 2f; + float num = (float) (0.300000011920929 + 0.5 * (double) Main.cloudAlpha); + if ((double) Main.windSpeedTemp < -(double) num) + Main.windSpeedTemp = -num; + if ((double) Main.windSpeedTemp > (double) num) + Main.windSpeedTemp = num; + 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(1000) < 25.0 * (1.0 - (double) Main.cloudBGAlpha)) + --Main.numCloudsTemp; + if ((double) Main.rand.Next(1000) < 200.0 * (double) Main.cloudAlpha && Main.numCloudsTemp < Main.cloudLimit / 2) + ++Main.numCloudsTemp; + if ((double) Main.rand.Next(1000) < 50.0 * (double) Main.cloudAlpha) + ++Main.numCloudsTemp; + if (Main.numCloudsTemp > Main.cloudLimit / 4 && Main.rand.Next(100) == 0) + Main.numCloudsTemp -= Main.rand.Next(1, 3); + if (Main.numCloudsTemp < Main.cloudLimit / 4 && Main.rand.Next(100) == 0) + Main.numCloudsTemp += Main.rand.Next(1, 3); + if ((double) Main.cloudBGActive <= 0.0 && Main.numCloudsTemp > Main.cloudLimit / 2 && (double) Main.cloudAlpha == 0.0) + Main.numCloudsTemp = Main.cloudLimit / 2; + if (Main.numCloudsTemp < 0) + Main.numCloudsTemp = 0; + if (Main.numCloudsTemp > Main.cloudLimit) + Main.numCloudsTemp = Main.cloudLimit; + Main.weatherCounter -= Main.dayRate; + if (Main.weatherCounter > 0) + break; + Main.numClouds = Main.numCloudsTemp; + Main.windSpeedSet = Main.windSpeedTemp; + Main.weatherCounter = Main.rand.Next(3600, 18000); + 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 || Main.backgroundLoaded[i]) + return; + Main.backgroundTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Background_" + (object) i); + Main.backgroundWidth[i] = Main.backgroundTexture[i].Width; + Main.backgroundHeight[i] = Main.backgroundTexture[i].Height; + Main.backgroundLoaded[i] = true; + } + + protected void LoadNPC(int i) + { + if (Main.NPCLoaded[i] && Main.npcTexture[i] != null) + return; + Main.npcTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "NPC_" + (object) i); + Main.NPCLoaded[i] = true; + } + + protected void LoadProjectile(int i) + { + if (Main.projectileLoaded[i]) + return; + Main.projectileTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Projectile_" + (object) i); + Main.projectileLoaded[i] = true; + } + + protected void LoadGore(int i) + { + if (Main.goreLoaded[i]) + return; + Main.goreTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Gore_" + (object) i); + Main.goreLoaded[i] = true; + } + + protected void LoadWall(int i) + { + if (Main.wallLoaded[i]) + return; + Main.wallTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Wall_" + (object) i); + Main.wallLoaded[i] = true; + } + + protected void LoadTiles(int i) + { + if (Main.tileSetsLoaded[i]) + return; + Main.tileTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Tiles_" + (object) i); + Main.tileSetsLoaded[i] = true; + } + + protected void LoadItemFlames(int i) + { + if (Main.itemFlameLoaded[i]) + return; + try + { + Main.itemFlameTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "ItemFlame_" + (object) i); + } + catch + { + } + Main.itemFlameLoaded[i] = true; + } + + protected void LoadWings(int i) + { + if (Main.wingsLoaded[i]) + return; + Main.wingsTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Wings_" + (object) i); + Main.wingsLoaded[i] = true; + } + + protected void LoadHair(int i) + { + if (Main.hairLoaded[i]) + return; + Main.playerHairTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Player_Hair_" + (object) (i + 1)); + Main.playerHairAltTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Player_HairAlt_" + (object) (i + 1)); + Main.hairLoaded[i] = true; + } + + protected void LoadArmorHead(int i) + { + if (Main.armorHeadLoaded[i]) + return; + Main.armorHeadTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Armor_Head_" + (object) i); + Main.armorHeadLoaded[i] = true; + } + + protected void LoadArmorBody(int i) + { + if (Main.armorBodyLoaded[i]) + return; + Main.femaleBodyTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Female_Body_" + (object) i); + Main.armorBodyTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Armor_Body_" + (object) i); + Main.armorArmTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Armor_Arm_" + (object) i); + Main.armorBodyLoaded[i] = true; + } + + protected void LoadArmorLegs(int i) + { + if (Main.armorLegsLoaded[i]) + return; + Main.armorLegTexture[i] = this.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Armor_Legs_" + (object) i); + Main.armorLegsLoaded[i] = true; + } + + protected void LoadAccHandsOn(int i) + { + if (Main.accHandsOnLoaded[i]) + return; + Main.accHandsOnTexture[i] = this.OurLoad("Images/Acc_HandsOn_" + (object) i); + Main.accHandsOnLoaded[i] = true; + } + + protected void LoadAccHandsOff(int i) + { + if (Main.accHandsOffLoaded[i]) + return; + Main.accHandsOffTexture[i] = this.OurLoad("Images/Acc_HandsOff_" + (object) i); + Main.accHandsOffLoaded[i] = true; + } + + protected void LoadAccBack(int i) + { + if (Main.accBackLoaded[i]) + return; + Main.accBackTexture[i] = this.OurLoad("Images/Acc_Back_" + (object) i); + Main.accBackLoaded[i] = true; + } + + protected void LoadAccFront(int i) + { + if (Main.accFrontLoaded[i]) + return; + Main.accFrontTexture[i] = this.OurLoad("Images/Acc_Front_" + (object) i); + Main.accFrontLoaded[i] = true; + } + + protected void LoadAccShoes(int i) + { + if (Main.accShoesLoaded[i]) + return; + Main.accShoesTexture[i] = this.OurLoad("Images/Acc_Shoes_" + (object) i); + Main.accShoesLoaded[i] = true; + } + + protected void LoadAccWaist(int i) + { + if (Main.accWaistLoaded[i]) + return; + Main.accWaistTexture[i] = this.OurLoad("Images/Acc_Waist_" + (object) i); + Main.accWaistLoaded[i] = true; + } + + protected void LoadAccShield(int i) + { + if (Main.accShieldLoaded[i]) + return; + Main.accShieldTexture[i] = this.OurLoad("Images/Acc_Shield_" + (object) i); + Main.accShieldLoaded[i] = true; + } + + protected void LoadAccNeck(int i) + { + if (Main.accNeckLoaded[i]) + return; + Main.accNeckTexture[i] = this.OurLoad("Images/Acc_Neck_" + (object) i); + Main.accNeckLoaded[i] = true; + } + + protected void LoadAccFace(int i) + { + if (Main.accFaceLoaded[i]) + return; + Main.accFaceTexture[i] = this.OurLoad("Images/Acc_Face_" + (object) i); + Main.accFaceLoaded[i] = true; + } + + protected void LoadAccBalloon(int i) + { + if (Main.accballoonLoaded[i]) + return; + Main.accBalloonTexture[i] = this.OurLoad("Images/Acc_Balloon_" + (object) i); + Main.accballoonLoaded[i] = true; + } + + protected void LoadFlameRing() + { + if (Main.flameRingLoaded) + return; + this.flameRingTexture = this.OurLoad("Images/FlameRing"); + Main.flameRingLoaded = true; + } + + protected void DrawSurfaceBG() + { + float num1 = SkyManager.Instance.ProcessCloudAlpha(); + 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.bgColor); + float num2 = Main.cloud[index].scale * 0.8f; + float num3 = (float) (((double) Main.cloud[index].scale + 1.0) / 2.0 * 0.899999976158142); + color.R = (byte) ((double) color.R * (double) num2); + color.G = (byte) ((double) color.G * (double) num3); + Main.atmo = 1f; + float num4 = Main.cloud[index].position.Y * ((float) Main.screenHeight / 600f); + float num5 = Main.cloud[index].position.Y + (float) (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 750.0 + 830.0) + (float) (int) this.scAdj; + Main.spriteBatch.Draw(Main.cloudTexture[Main.cloud[index].type], new Vector2(Main.cloud[index].position.X + (float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, num5 + (float) Main.cloudTexture[Main.cloud[index].type].Height * 0.5f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.cloudTexture[Main.cloud[index].type].Width, Main.cloudTexture[Main.cloud[index].type].Height)), color * num1, Main.cloud[index].rotation, new Vector2((float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, (float) Main.cloudTexture[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(); + Main.atmo = 1f; + Main.bgScale *= 2f; + this.bgParallax = 0.15; + if ((double) Main.atmo < 1.0) + { + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.atmo); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.atmo); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.atmo); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.atmo); + } + if (!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]); + Main.bgScale *= 2f; + this.bgParallax = 0.15; + float num6 = Main.cloudBGAlpha; + if ((double) num6 > 1.0) + num6 = 1f; + Main.bgScale = 1.65f; + this.bgParallax = 0.0900000035762787; + if (this.IsActive) + Main.cloudBGX[0] += (float) ((double) Main.windSpeed * this.bgParallax * 5.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; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.cloudBG[0]] * (double) Main.bgScale); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 900.0 + 600.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = -150; + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2) - (double) Main.bgW); + this.bgStart += (int) Main.cloudBGX[0]; + this.bgLoops = Main.screenWidth / Main.bgW + 2 + 2; + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) num6); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) num6); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) num6); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) num6); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.cloudBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.cloudBG[0]], Main.backgroundHeight[Main.cloudBG[0]])), Main.backColor * num1, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + float num7 = Main.cloudBGAlpha * 1.5f; + if ((double) num7 > 1.0) + num7 = 1f; + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) num7); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) num7); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) num7); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) num7); + Main.bgScale = 1.85f; + this.bgParallax = 0.12; + if (this.IsActive) + Main.cloudBGX[1] += (float) ((double) Main.windSpeed * this.bgParallax * 5.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; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.cloudBG[1]] * (double) Main.bgScale); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1100.0 + 750.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = -50; + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2) - (double) Main.bgW); + this.bgStart += (int) Main.cloudBGX[1]; + this.bgLoops = Main.screenWidth / Main.bgW + 2 + 2; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.cloudBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.cloudBG[1]], Main.backgroundHeight[Main.cloudBG[1]])), Main.backColor * num1, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + this.LoadBackground(Main.treeMntBG[0]); + this.LoadBackground(Main.treeMntBG[1]); + Main.bgScale = 1f; + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1300.0 + 1090.0) + (int) this.scAdj; + Main.bgScale *= 2f; + this.bgParallax = 0.15; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeMntBG[0]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + if (Main.bgW == 0) + Main.bgW = 1024; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if (Main.gameMenu) + this.bgTop = 100; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[0]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[0]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[0]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[0]); + if ((double) Main.bgAlpha2[0] > 0.0) + { + if (Main.treeMntBG[0] == 93 || Main.treeMntBG[0] >= 168 && Main.treeMntBG[0] <= 170) + this.bgTop -= 50; + if (Main.treeMntBG[0] == 171) + this.bgTop -= 100; + if (Main.treeMntBG[0] == 176) + this.bgTop += 250; + if (Main.treeMntBG[0] == 179) + this.bgTop -= 100; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.treeMntBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.treeMntBG[0]], Main.backgroundHeight[Main.treeMntBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + if (Main.treeMntBG[0] == 93 || Main.treeMntBG[0] >= 168 && Main.treeMntBG[0] <= 170) + this.bgTop += 50; + if (Main.treeMntBG[0] == 171) + this.bgTop += 100; + if (Main.treeMntBG[0] == 176) + this.bgTop -= 250; + if (Main.treeMntBG[0] == 179) + this.bgTop += 100; + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[1]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[1]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[1]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[1]); + if ((double) Main.bgAlpha2[1] > 0.0) + { + this.LoadBackground(23); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[23], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[23], Main.backgroundHeight[23])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[2]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[2]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[2]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[2]); + if ((double) Main.bgAlpha2[2] > 0.0) + { + this.LoadBackground(24); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[24], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[24], Main.backgroundHeight[24])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[4]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[4]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[4]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[4]); + if ((double) Main.bgAlpha2[4] > 0.0) + { + this.LoadBackground(Main.snowMntBG[0]); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.snowMntBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.snowMntBG[0]], Main.backgroundHeight[Main.snowMntBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[5]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[5]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[5]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[5]); + if ((double) Main.bgAlpha2[5] > 0.0) + { + this.LoadBackground(24); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[24], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[24], Main.backgroundHeight[24])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 5f); + } + } + this.cTop = (float) (this.bgTop - 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.bgColor); + if ((double) Main.atmo < 1.0) + { + 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); + color.A = (byte) ((double) color.A * (double) Main.atmo); + } + float num8 = Main.cloud[index].position.Y * ((float) Main.screenHeight / 600f); + float num9 = (float) (((double) Main.screenPosition.Y / 16.0 - 24.0) / Main.worldSurface); + if ((double) num9 < 0.0) + num9 = 0.0f; + float num10; + if ((double) num9 > 1.0) + num10 = 1f; + if (Main.gameMenu) + num10 = 1f; + Main.spriteBatch.Draw(Main.cloudTexture[Main.cloud[index].type], new Vector2(Main.cloud[index].position.X + (float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, (float) ((double) num8 + (double) Main.cloudTexture[Main.cloud[index].type].Height * 0.5 + (double) this.cTop + 200.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.cloudTexture[Main.cloud[index].type].Width, Main.cloudTexture[Main.cloud[index].type].Height)), color * num1, Main.cloud[index].rotation, new Vector2((float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, (float) Main.cloudTexture[Main.cloud[index].type].Height * 0.5f), Main.cloud[index].scale, Main.cloud[index].spriteDir, 0.0f); + } + } + } + if (Main.holyTiles > 0 && Main.BackgroundEnabled) + { + this.bgParallax = 0.17; + Main.bgScale = 1.1f; + Main.bgScale *= 2f; + Main.bgW = (int) (3500.0 * (double) Main.bgScale * 1.05); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgLoops = Main.screenWidth / Main.bgW + 2; + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1400.0 + 900.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 230; + this.bgStart -= 500; + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + Microsoft.Xna.Framework.Color trueBackColor = Main.trueBackColor; + float num11 = (float) Main.holyTiles / 400f; + if ((double) num11 > 0.5) + num11 = 0.5f; + trueBackColor.R = (byte) ((double) trueBackColor.R * (double) num11); + trueBackColor.G = (byte) ((double) trueBackColor.G * (double) num11); + trueBackColor.B = (byte) ((double) trueBackColor.B * (double) num11); + trueBackColor.A = (byte) ((double) trueBackColor.A * (double) num11 * 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(Main.backgroundTexture[18], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[18], Main.backgroundHeight[18])), trueBackColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.backgroundTexture[19], new Vector2((float) (this.bgStart + Main.bgW * index + 1700), (float) (this.bgTop + 100)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[19], Main.backgroundHeight[19])), trueBackColor, 0.0f, new Vector2(), Main.bgScale * 0.9f, SpriteEffects.None, 0.0f); + } + } + } + if (Main.treeMntBG[1] > -1) + { + this.LoadBackground(Main.treeMntBG[1]); + this.bgParallax = 0.2; + Main.bgScale = 1.15f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeMntBG[1]] * (double) Main.bgScale); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgLoops = Main.screenWidth / Main.bgW + 2; + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1400.0 + 1260.0) + (int) this.scAdj; + } + if (Main.BackgroundEnabled) + { + if (Main.gameMenu) + { + this.bgTop = 230; + this.bgStart -= 500; + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[0]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[0]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[0]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[0]); + if ((double) Main.bgAlpha2[0] > 0.0 && Main.treeMntBG[1] > -1) + { + if (Main.treeMntBG[1] == 172) + this.bgTop += 130; + if (Main.treeMntBG[1] == 177) + this.bgTop += 200; + if (Main.treeMntBG[1] >= 180 && Main.treeMntBG[1] <= 183) + this.bgTop -= 350; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.treeMntBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.treeMntBG[1]], Main.backgroundHeight[Main.treeMntBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + if (Main.treeMntBG[1] == 172) + this.bgTop -= 130; + if (Main.treeMntBG[1] == 177) + this.bgTop -= 200; + if (Main.treeMntBG[1] >= 180 && Main.treeMntBG[1] <= 183) + this.bgTop += 350; + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[1]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[1]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[1]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[1]); + if ((double) Main.bgAlpha2[1] > 0.0) + { + this.LoadBackground(22); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[22], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[22], Main.backgroundHeight[22])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[2]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[2]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[2]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[2]); + if ((double) Main.bgAlpha2[2] > 0.0) + { + this.LoadBackground(25); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[25], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[25], Main.backgroundHeight[25])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[3]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[3]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[3]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[3]); + if ((double) Main.bgAlpha2[3] > 0.0) + { + this.LoadBackground(Main.oceanBG); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.oceanBG], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.oceanBG], Main.backgroundHeight[Main.oceanBG])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[4]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[4]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[4]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[4]); + if ((double) Main.bgAlpha2[4] > 0.0) + { + this.LoadBackground(Main.snowMntBG[1]); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.snowMntBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.snowMntBG[1]], Main.backgroundHeight[Main.snowMntBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha2[5]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha2[5]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha2[5]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha2[5]); + if ((double) Main.bgAlpha2[5] > 0.0) + { + this.LoadBackground(42); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[42], new Vector2((float) (this.bgStart + Main.bgW * index), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[42], Main.backgroundHeight[42])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + } + this.cTop = (float) ((double) this.bgTop * 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.bgColor); + if ((double) Main.atmo < 1.0) + { + 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); + color.A = (byte) ((double) color.A * (double) Main.atmo); + } + float num12 = (float) ((double) Main.cloud[index].position.Y * ((double) Main.screenHeight / 600.0) - 100.0); + float num13 = (float) (((double) Main.screenPosition.Y / 16.0 - 24.0) / Main.worldSurface); + if ((double) num13 < 0.0) + num13 = 0.0f; + float num14; + if ((double) num13 > 1.0) + num14 = 1f; + if (Main.gameMenu) + num14 = 1f; + Main.spriteBatch.Draw(Main.cloudTexture[Main.cloud[index].type], new Vector2(Main.cloud[index].position.X + (float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, num12 + (float) Main.cloudTexture[Main.cloud[index].type].Height * 0.5f + this.cTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.cloudTexture[Main.cloud[index].type].Width, Main.cloudTexture[Main.cloud[index].type].Height)), color * num1, Main.cloud[index].rotation, new Vector2((float) Main.cloudTexture[Main.cloud[index].type].Width * 0.5f, (float) Main.cloudTexture[Main.cloud[index].type].Height * 0.5f), Main.cloud[index].scale, Main.cloud[index].spriteDir, 0.0f); + } + } + } + } + if (!Main.mapFullscreen) + { + for (int index1 = 0; index1 < 10; ++index1) + { + if (Main.bgStyle == index1) + { + Main.bgAlpha[index1] += Main.tranSpeed; + if ((double) Main.bgAlpha[index1] > 1.0) + Main.bgAlpha[index1] = 1f; + } + else + { + Main.bgAlpha[index1] -= Main.tranSpeed; + if ((double) Main.bgAlpha[index1] < 0.0) + Main.bgAlpha[index1] = 0.0f; + } + if (Main.BackgroundEnabled) + { + Main.backColor = Main.trueBackColor; + Main.backColor.R = (byte) ((double) Main.backColor.R * (double) Main.bgAlpha[index1]); + Main.backColor.G = (byte) ((double) Main.backColor.G * (double) Main.bgAlpha[index1]); + Main.backColor.B = (byte) ((double) Main.backColor.B * (double) Main.bgAlpha[index1]); + Main.backColor.A = (byte) ((double) Main.backColor.A * (double) Main.bgAlpha[index1]); + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 3) + { + this.LoadBackground(Main.jungleBG[0]); + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.jungleBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1660.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + if (Main.jungleBG[0] == 59) + this.bgTop -= 200; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index2 = 0; index2 < this.bgLoops; ++index2) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.jungleBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index2), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.jungleBG[0]], Main.backgroundHeight[Main.jungleBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + this.LoadBackground(Main.jungleBG[1]); + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.jungleBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1840.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + if (Main.jungleBG[1] == 60) + this.bgTop -= 175; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index3 = 0; index3 < this.bgLoops; ++index3) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.jungleBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index3), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.jungleBG[1]], Main.backgroundHeight[Main.jungleBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.jungleBG[2]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.jungleBG[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2060.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + if (Main.jungleBG[2] == 61) + this.bgTop -= 150; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index4 = 0; index4 < this.bgLoops; ++index4) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.jungleBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index4), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.jungleBG[2]], Main.backgroundHeight[Main.jungleBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 2) + { + this.LoadBackground(Main.desertBG[0]); + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.desertBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.37; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index5 = 0; index5 < this.bgLoops; ++index5) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.desertBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index5), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.desertBG[0]], Main.backgroundHeight[Main.desertBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.desertBG[1]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.desertBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2150.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index6 = 0; index6 < this.bgLoops; ++index6) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.desertBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index6), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.desertBG[1]], Main.backgroundHeight[Main.desertBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 5) + { + this.LoadBackground(26); + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[26] * (double) Main.bgScale); + this.bgParallax = 0.37; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index7 = 0; index7 < this.bgLoops; ++index7) + Main.spriteBatch.Draw(Main.backgroundTexture[26], new Vector2((float) (this.bgStart + Main.bgW * index7), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[26], Main.backgroundHeight[26])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(27); + Main.bgW = (int) ((double) Main.backgroundWidth[27] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2150.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index8 = 0; index8 < this.bgLoops; ++index8) + Main.spriteBatch.Draw(Main.backgroundTexture[27], new Vector2((float) (this.bgStart + Main.bgW * index8), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[27], Main.backgroundHeight[27])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 1) + { + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.LoadBackground(Main.corruptBG[0]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.corruptBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1500.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + if (Main.corruptBG[0] == 56) + this.bgTop -= 100; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index9 = 0; index9 < this.bgLoops; ++index9) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.corruptBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index9), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.corruptBG[0]], Main.backgroundHeight[Main.corruptBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + this.LoadBackground(Main.corruptBG[1]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.corruptBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + if (Main.corruptBG[0] == 56) + this.bgTop -= 100; + if (Main.bgW == 0) + Main.bgW = 1; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + try + { + for (int index10 = 0; index10 < this.bgLoops; ++index10) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.corruptBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index10), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.corruptBG[1]], Main.backgroundHeight[Main.corruptBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + catch + { + this.LoadBackground(Main.corruptBG[1]); + } + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.corruptBG[2]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.corruptBG[2]] * (double) Main.bgScale); + if (Main.bgW == 0) + Main.bgW = 150; + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2000.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + if (Main.corruptBG[0] == 56) + this.bgTop -= 100; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index11 = 0; index11 < this.bgLoops; ++index11) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.corruptBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index11), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.corruptBG[2]], Main.backgroundHeight[Main.corruptBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 6) + { + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.LoadBackground(Main.hallowBG[0]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.hallowBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1500.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index12 = 0; index12 < this.bgLoops; ++index12) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.hallowBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index12), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.hallowBG[0]], Main.backgroundHeight[Main.hallowBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + this.LoadBackground(Main.hallowBG[1]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.hallowBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index13 = 0; index13 < this.bgLoops; ++index13) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.hallowBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index13), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.hallowBG[1]], Main.backgroundHeight[Main.hallowBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.hallowBG[2]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.hallowBG[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2000.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index14 = 0; index14 < this.bgLoops; ++index14) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.hallowBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index14), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.hallowBG[2]], Main.backgroundHeight[Main.hallowBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 0) + { + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.bgParallax = 0.4; + if (Main.treeBG[0] == 91) + { + this.bgParallax = 0.270000010728836; + Main.bgScale = 1.2f; + Main.bgScale *= 2f; + } + if (Main.treeBG[0] == 173) + { + this.bgParallax = 0.25; + Main.bgScale = 1.3f; + Main.bgScale *= 2f; + } + if (Main.treeBG[0] == 178) + { + this.bgParallax = 0.300000011920929; + Main.bgScale = 1.2f; + Main.bgScale *= 2f; + } + if (Main.treeBG[0] == 184) + { + this.bgParallax = 0.25; + Main.bgScale = 1.2f; + Main.bgScale *= 2f; + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if (Main.treeBG[0] >= 0) + { + this.LoadBackground(Main.treeBG[0]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeBG[0]] * (double) Main.bgScale); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1500.0) + (int) this.scAdj; + if (Main.treeBG[0] == 91) + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1600.0 + 1400.0) + (int) this.scAdj; + if (Main.treeBG[0] == 173) + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1600.0 + 1400.0) + (int) this.scAdj; + if (Main.treeBG[0] == 184) + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1600.0 + 1400.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + if (Main.treeBG[0] == 50) + this.bgTop -= 50; + if (Main.treeBG[0] == 53) + this.bgTop -= 100; + if (Main.treeBG[0] == 91) + this.bgTop += 200; + if (Main.treeBG[0] == 173) + this.bgTop += 200; + if (Main.treeBG[0] == 178) + this.bgTop += 75; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index15 = 0; index15 < this.bgLoops; ++index15) + { + if (Main.backgroundTexture[Main.treeBG[0]] != null) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.treeBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index15), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.treeBG[0]], Main.backgroundHeight[Main.treeBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + } + if (Main.treeBG[1] >= 0) + { + this.LoadBackground(Main.treeBG[1]); + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + if (Main.treeBG[1] == 51) + this.bgTop -= 50; + if (Main.treeBG[1] == 54) + this.bgTop -= 100; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index16 = 0; index16 < this.bgLoops; ++index16) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.treeBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index16), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.treeBG[1]], Main.backgroundHeight[Main.treeBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + } + if (Main.treeBG[2] >= 0) + { + this.LoadBackground(Main.treeBG[2]); + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if (Main.treeBG[0] == 91) + { + Main.bgScale = 1.3f; + Main.bgScale *= 2f; + this.bgParallax = 0.42; + } + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeBG[2]] * (double) Main.bgScale); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2000.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + if (Main.treeBG[2] == 52) + this.bgTop -= 50; + if (Main.treeBG[2] == 55) + this.bgTop -= 100; + if (Main.treeBG[2] == 92) + this.bgTop += 150; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index17 = 0; index17 < this.bgLoops; ++index17) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.treeBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index17), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.treeBG[2]], Main.backgroundHeight[Main.treeBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 7) + { + if (Main.snowBG[0] >= 0) + { + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.LoadBackground(Main.snowBG[0]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.snowBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1500.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index18 = 0; index18 < this.bgLoops; ++index18) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.snowBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index18), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.snowBG[0]], Main.backgroundHeight[Main.snowBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (Main.snowBG[1] >= 0) + { + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + this.LoadBackground(Main.snowBG[1]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.snowBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index19 = 0; index19 < this.bgLoops; ++index19) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.snowBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index19), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.snowBG[1]], Main.backgroundHeight[Main.snowBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (Main.snowBG[2] >= 0) + { + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.snowBG[2]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.snowBG[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2000.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index20 = 0; index20 < this.bgLoops; ++index20) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.snowBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index20), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.snowBG[2]], Main.backgroundHeight[Main.snowBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 8) + { + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.LoadBackground(Main.crimsonBG[0]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.crimsonBG[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1500.0) + (int) this.scAdj; + if (Main.crimsonBG[0] == 105) + this.bgTop += 50; + if (Main.crimsonBG[0] == 174) + this.bgTop -= 350; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index21 = 0; index21 < this.bgLoops; ++index21) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.crimsonBG[0]], new Vector2((float) (this.bgStart + Main.bgW * index21), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.crimsonBG[0]], Main.backgroundHeight[Main.crimsonBG[0]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.31f; + Main.bgScale *= 2f; + if (Main.crimsonBG[1] > -1) + { + this.LoadBackground(Main.crimsonBG[1]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.crimsonBG[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1750.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index22 = 0; index22 < this.bgLoops; ++index22) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.crimsonBG[1]], new Vector2((float) (this.bgStart + Main.bgW * index22), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.crimsonBG[1]], Main.backgroundHeight[Main.crimsonBG[1]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + Main.bgScale = 1.34f; + Main.bgScale *= 2f; + this.LoadBackground(Main.crimsonBG[2]); + Main.bgW = (int) ((double) Main.backgroundWidth[Main.crimsonBG[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 2000.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + if (Main.crimsonBG[2] == 175) + { + this.bgStart -= 1000; + this.bgTop -= 400; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index23 = 0; index23 < this.bgLoops; ++index23) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.crimsonBG[2]], new Vector2((float) (this.bgStart + Main.bgW * index23), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.crimsonBG[2]], Main.backgroundHeight[Main.crimsonBG[2]])), Main.backColor, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.bgAlpha[index1] > 0.0 && index1 == 9) + { + float num15 = (float) Main.backColor.A / (float) byte.MaxValue; + Microsoft.Xna.Framework.Color backColor1 = Main.backColor; + float num16 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 5000f; + float num17 = 0.1f; + float num18 = (float) (0.150000005960464 + (double) num16 / 2.0); + float num19 = 0.3f + num16; + float num20 = num17 * (float) byte.MaxValue; + float num21 = num18 * (float) byte.MaxValue; + float num22 = num19 * (float) byte.MaxValue; + float num23 = num20 * (0.33f * num15); + float num24 = num21 * (0.33f * num15); + float num25 = num22 * (0.33f * num15); + if ((double) num23 > (double) byte.MaxValue) + num23 = (float) byte.MaxValue; + if ((double) num24 > (double) byte.MaxValue) + num24 = (float) byte.MaxValue; + if ((double) num25 > (double) byte.MaxValue) + num25 = (float) byte.MaxValue; + if ((double) num23 > (double) backColor1.R) + backColor1.R = (byte) num23; + if ((double) num24 > (double) backColor1.G) + backColor1.G = (byte) num24; + if ((double) num25 > (double) backColor1.B) + backColor1.B = (byte) num25; + Main.bgScale = 1.25f; + Main.bgScale *= 2f; + this.LoadBackground(46); + Main.bgW = (int) ((double) Main.backgroundWidth[46] * (double) Main.bgScale); + this.bgParallax = 0.4; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1800.0 + 1400.0) + (int) this.scAdj; + if (Main.gameMenu) + this.bgTop = 320; + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index24 = 0; index24 < this.bgLoops; ++index24) + Main.spriteBatch.Draw(Main.backgroundTexture[46], new Vector2((float) (this.bgStart + Main.bgW * index24), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[46], Main.backgroundHeight[46])), backColor1, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Microsoft.Xna.Framework.Color backColor2 = Main.backColor; + float num26 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 5000f; + float num27 = 0.1f; + float num28 = (float) (0.174999997019768 + (double) num26 / 2.0); + float num29 = 0.3f + num26; + float num30 = num27 * (float) byte.MaxValue; + float num31 = num28 * (float) byte.MaxValue; + float num32 = num29 * (float) byte.MaxValue; + float num33 = num30 * (0.5f * num15); + float num34 = num31 * (0.5f * num15); + float num35 = num32 * (0.5f * num15); + if ((double) num33 > (double) byte.MaxValue) + num33 = (float) byte.MaxValue; + if ((double) num34 > (double) byte.MaxValue) + num34 = (float) byte.MaxValue; + if ((double) num35 > (double) byte.MaxValue) + num35 = (float) byte.MaxValue; + if ((double) num33 > (double) backColor2.R) + backColor2.R = (byte) num33; + if ((double) num34 > (double) backColor2.G) + backColor2.G = (byte) num34; + if ((double) num35 > (double) backColor2.B) + backColor2.B = (byte) num35; + Main.bgScale = 1.32f; + Main.bgScale *= 2f; + this.LoadBackground(47); + Main.bgW = (int) ((double) Main.backgroundWidth[47] * (double) Main.bgScale); + this.bgParallax = 0.43; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1950.0 + 1675.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 400; + this.bgStart -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index25 = 0; index25 < this.bgLoops; ++index25) + Main.spriteBatch.Draw(Main.backgroundTexture[47], new Vector2((float) (this.bgStart + Main.bgW * index25), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[47], Main.backgroundHeight[47])), backColor2, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Microsoft.Xna.Framework.Color backColor3 = Main.backColor; + float num36 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 3000f; + float num37 = 0.125f; + float num38 = (float) (0.200000002980232 + (double) num36 / 2.0); + float num39 = 0.3f + num36; + float num40 = num37 * (float) ((double) byte.MaxValue * (double) num15 * 0.75); + float num41 = num38 * (float) ((double) byte.MaxValue * (double) num15 * 0.75); + float num42 = num39 * (float) ((double) byte.MaxValue * (double) num15 * 0.75); + if ((double) num40 > (double) byte.MaxValue) + num40 = (float) byte.MaxValue; + if ((double) num41 > (double) byte.MaxValue) + num41 = (float) byte.MaxValue; + if ((double) num42 > (double) byte.MaxValue) + num42 = (float) byte.MaxValue; + if ((double) num40 > (double) backColor3.R) + backColor3.R = (byte) num40; + if ((double) num41 > (double) backColor3.G) + backColor3.G = (byte) num41; + if ((double) num42 > (double) backColor3.B) + backColor3.B = (byte) num42; + Main.bgScale = 1.36f; + Main.bgScale *= 2f; + this.LoadBackground(48); + Main.bgW = (int) ((double) Main.backgroundWidth[48] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStart = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgW) - (double) (Main.bgW / 2)); + this.bgTop = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 2100.0 + 1950.0) + (int) this.scAdj; + if (Main.gameMenu) + { + this.bgTop = 480; + this.bgStart -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgW + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index26 = 0; index26 < this.bgLoops; ++index26) + Main.spriteBatch.Draw(Main.backgroundTexture[48], new Vector2((float) (this.bgStart + Main.bgW * index26), (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[48], Main.backgroundHeight[48])), backColor3, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f); + } + } + } + } + if (!Main.mapFullscreen && (double) Main.cloudAlpha > 0.0 && (double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + this.bgParallax = 0.1; + this.bgStart = (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.bgTop = (int) (-(double) Main.screenPosition.Y / (Main.worldSurface * 16.0 - 600.0) * 200.0); + for (int index = 0; index < this.bgLoops; ++index) + { + Microsoft.Xna.Framework.Color bgColor = Main.bgColor; + this.bgStart = 0; + float cloudAlpha = Main.cloudAlpha; + bgColor.R = (byte) ((double) bgColor.R * (double) cloudAlpha); + bgColor.G = (byte) ((double) bgColor.G * (double) cloudAlpha); + bgColor.B = (byte) ((double) bgColor.B * (double) cloudAlpha); + bgColor.A = (byte) ((double) bgColor.A * (double) cloudAlpha); + Main.spriteBatch.Draw(Main.backgroundTexture[49], new Microsoft.Xna.Framework.Rectangle(this.bgStart + Main.backgroundWidth[49] * index, this.bgTop, Main.backgroundWidth[49], Math.Max(Main.screenHeight, Main.backgroundHeight[49])), bgColor); + } + } + if (Main.mapFullscreen) + return; + SkyManager.Instance.DrawRemainingDepth(Main.spriteBatch); + } + + 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(Main.blackTileTexture, new Microsoft.Xna.Framework.Rectangle(0, (int) num3, Main.screenWidth, (int) ((double) num4 - (double) num3)), Microsoft.Xna.Framework.Color.Black); + } + + private void DrawTileCracks(int crackType) + { + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + for (int index = 0; index < Main.player[Main.myPlayer].hitTile.data.Length; ++index) + { + if (Main.player[Main.myPlayer].hitTile.data[index].type == crackType) + { + int damage = Main.player[Main.myPlayer].hitTile.data[index].damage; + if (damage >= 20) + { + int x = Main.player[Main.myPlayer].hitTile.data[index].X; + int y = Main.player[Main.myPlayer].hitTile.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 > (byte) 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 (Main.tile[x, y].type == (ushort) 5) + { + 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(Main.player[Main.myPlayer].hitTile.data[index].crackStyle * 18, num * 18, 16, 16); + if (flag3) + rectangle.X = (4 + Main.player[Main.myPlayer].hitTile.data[index].crackStyle / 2) * 18; + Main.spriteBatch.Draw(Main.tileCrackTexture, 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.monolithType) + { + if (!Filters.Scene[Main.MonolithFilterNames[Main.monolithType]].IsActive()) + Filters.Scene.Activate(Main.MonolithFilterNames[Main.monolithType], new Vector2()); + if (!SkyManager.Instance[Main.MonolithSkyNames[index]].IsActive()) + SkyManager.Instance.Activate(Main.MonolithSkyNames[index], new Vector2()); + } + else + { + if (Filters.Scene[Main.MonolithFilterNames[index]].IsActive()) + 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); + this._isDrawingOrUpdating = false; + } + + private void DoDraw(GameTime gameTime) + { + 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(); + CaptureManager.Instance.DrawTick(); + TimeLogger.NewDrawFrame(); + if (!Main.gameMenu) + this.lookForColorTiles(); + 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(); + Stopwatch stopwatch1 = new Stopwatch(); + stopwatch1.Start(); + ++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; + if (false) + { + num = 30; + } + else + { + switch (Main.stackDelay) + { + case 3: + num = 10; + break; + case 4: + num = 15; + break; + case 5: + num = 20; + break; + case 6: + num = 25; + 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(); + Vector3 vector3 = Vector3.One / new Vector3(1f, 1f, 1f); + if (!Main.gameMenu && Main.netMode != 2) + { + 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; + float num2 = 0.0f; + float num3 = 0.0f; + float num4 = 24f; + if (Main.player[Main.myPlayer].noThrow <= 0 && !Main.player[Main.myPlayer].lastMouseInterface || (double) Main.zoomX != 0.0 || (double) Main.zoomY != 0.0) + { + if (PlayerInput.UsingGamepad) + { + Player player = Main.player[Main.myPlayer]; + if ((double) PlayerInput.GamepadThumbstickRight.Length() != 0.0 || !Main.SmartCursorEnabled) + { + float num5 = -1f; + if (player.inventory[player.selectedItem].type == 1254 && player.scope) + num5 = 0.8f; + else if (player.inventory[player.selectedItem].type == 1254) + num5 = 0.6666667f; + else if (player.inventory[player.selectedItem].type == 1299) + num5 = 0.6666667f; + else if (player.scope) + num5 = 0.5f; + Vector2 vector2_1 = (Main.MouseScreen - new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f) / (new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f); + num4 = 48f; + if (vector2_1 != Vector2.Zero && (double) num5 != -1.0) + { + Vector2 vector2_2 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f * vector2_1 * num5; + num2 = vector2_2.X; + num3 = vector2_2.Y; + } + } + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1254 && Main.player[Main.myPlayer].scope && Main.mouseRight) + { + int num6 = Main.mouseX; + int num7 = Main.mouseY; + if (num6 > Main.screenWidth) + num6 = Main.screenWidth; + if (num6 < 0) + num6 = 0; + if (num7 > Main.screenHeight) + num7 = Main.screenHeight; + if (num7 < 0) + num7 = 0; + num2 = (float) (num6 - Main.screenWidth / 2) / 1.25f; + num3 = (float) (num7 - Main.screenHeight / 2) / 1.25f; + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1254 && Main.mouseRight) + { + int num8 = Main.mouseX; + int num9 = Main.mouseY; + if (num8 > Main.screenWidth) + num8 = Main.screenWidth; + if (num8 < 0) + num8 = 0; + if (num9 > Main.screenHeight) + num9 = Main.screenHeight; + if (num9 < 0) + num9 = 0; + num2 = (float) (num8 - Main.screenWidth / 2) / 1.5f; + num3 = (float) (num9 - Main.screenHeight / 2) / 1.5f; + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1299 && Main.player[Main.myPlayer].selectedItem != 58) + { + int num10 = Main.mouseX; + int num11 = Main.mouseY; + if (num10 > Main.screenWidth) + num10 = Main.screenWidth; + if (num10 < 0) + num10 = 0; + if (num11 > Main.screenHeight) + num11 = Main.screenHeight; + if (num11 < 0) + num11 = 0; + num2 = (float) (num10 - Main.screenWidth / 2) / 1.5f; + num3 = (float) (num11 - Main.screenHeight / 2) / 1.5f; + } + else if (Main.player[Main.myPlayer].scope && Main.mouseRight) + { + int num12 = Main.mouseX; + int num13 = Main.mouseY; + if (num12 > Main.screenWidth) + num12 = Main.screenWidth; + if (num12 < 0) + num12 = 0; + if (num13 > Main.screenHeight) + num13 = Main.screenHeight; + if (num13 < 0) + num13 = 0; + num2 = (float) (num12 - Main.screenWidth / 2) / 2f; + num3 = (float) (num13 - Main.screenHeight / 2) / 2f; + } + } + if (float.IsNaN(Main.zoomX)) + Main.zoomX = 0.0f; + if (float.IsNaN(Main.zoomY)) + Main.zoomY = 0.0f; + float num14 = num2 - Main.zoomX; + float num15 = num3 - Main.zoomY; + float num16 = (float) Math.Sqrt((double) num14 * (double) num14 + (double) num15 * (double) num15); + float num17 = (float) Math.Sqrt((double) num14 * (double) num14 + (double) num15 * (double) num15); + if ((double) num17 < (double) num4) + { + Main.zoomX = num2; + Main.zoomY = num3; + } + else + { + float num18 = num4 / num17; + float num19 = num14 * num18; + float num20 = num15 * num18; + Main.zoomX += num19; + Main.zoomY += num20; + } + Main.screenPosition.X += Main.zoomX; + Main.screenPosition.Y += Main.zoomY * 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; + } + if (!Main.gameMenu && Main.netMode != 2) + Main.ClampScreenPositionToWorld(); + Main.CheckMonoliths(); + if (Main.showSplash) + { + this.DrawSplash(gameTime); + TimeLogger.SplashDrawTime(stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + else + { + 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.bgStart = (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.bgTop = (int) (-(double) Main.screenPosition.Y / (Main.worldSurface * 16.0 - 600.0) * 200.0); + Main.bgColor = Microsoft.Xna.Framework.Color.White; + if (Main.gameMenu || Main.netMode == 2) + this.bgTop = -200; + int num21 = (int) (Main.time / 54000.0 * (double) (Main.screenWidth + Main.sunTexture.Width * 2)) - Main.sunTexture.Width; + int num22 = 0; + Microsoft.Xna.Framework.Color white1 = Microsoft.Xna.Framework.Color.White; + float scale1 = 1f; + float rotation1 = (float) (Main.time / 54000.0 * 2.0 - 7.30000019073486); + int num23 = (int) (Main.time / 32400.0 * (double) (Main.screenWidth + Main.moonTexture[Main.moonType].Width * 2)) - Main.moonTexture[Main.moonType].Width; + int num24 = 0; + Microsoft.Xna.Framework.Color white2 = Microsoft.Xna.Framework.Color.White; + float scale2 = 1f; + float rotation2 = (float) (Main.time / 32400.0 * 2.0 - 7.30000019073486); + if (Main.dayTime) + { + double num25; + if (Main.time < 27000.0) + { + num25 = Math.Pow(1.0 - Main.time / 54000.0 * 2.0, 2.0); + num22 = (int) ((double) this.bgTop + num25 * 250.0 + 180.0); + } + else + { + num25 = Math.Pow((Main.time / 54000.0 - 0.5) * 2.0, 2.0); + num22 = (int) ((double) this.bgTop + num25 * 250.0 + 180.0); + } + scale1 = (float) (1.2 - num25 * 0.4); + } + else + { + double num26; + if (Main.time < 16200.0) + { + num26 = Math.Pow(1.0 - Main.time / 32400.0 * 2.0, 2.0); + num24 = (int) ((double) this.bgTop + num26 * 250.0 + 180.0); + } + else + { + num26 = Math.Pow((Main.time / 32400.0 - 0.5) * 2.0, 2.0); + num24 = (int) ((double) this.bgTop + num26 * 250.0 + 180.0); + } + scale2 = (float) (1.2 - num26 * 0.4); + } + if (Main.dayTime) + { + if (Main.time < 13500.0) + { + float num27 = (float) (Main.time / 13500.0); + white1.R = (byte) ((double) num27 * 200.0 + 55.0); + white1.G = (byte) ((double) num27 * 180.0 + 75.0); + white1.B = (byte) ((double) num27 * 250.0 + 5.0); + Main.bgColor.R = (byte) ((double) num27 * 230.0 + 25.0); + Main.bgColor.G = (byte) ((double) num27 * 220.0 + 35.0); + Main.bgColor.B = (byte) ((double) num27 * 220.0 + 35.0); + } + if (Main.time > 45900.0) + { + float num28 = (float) (1.0 - (Main.time / 54000.0 - 0.85) * (20.0 / 3.0)); + white1.R = (byte) ((double) num28 * 120.0 + 55.0); + white1.G = (byte) ((double) num28 * 100.0 + 25.0); + white1.B = (byte) ((double) num28 * 120.0 + 55.0); + Main.bgColor.R = (byte) ((double) num28 * 200.0 + 35.0); + Main.bgColor.G = (byte) ((double) num28 * 85.0 + 35.0); + Main.bgColor.B = (byte) ((double) num28 * 135.0 + 35.0); + } + else if (Main.time > 37800.0) + { + float num29 = (float) (1.0 - (Main.time / 54000.0 - 0.7) * (20.0 / 3.0)); + white1.R = (byte) ((double) num29 * 80.0 + 175.0); + white1.G = (byte) ((double) num29 * 130.0 + 125.0); + white1.B = (byte) ((double) num29 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num29 * 20.0 + 235.0); + Main.bgColor.G = (byte) ((double) num29 * 135.0 + 120.0); + Main.bgColor.B = (byte) ((double) num29 * 85.0 + 170.0); + } + } + if (!Main.dayTime) + { + if (Main.bloodMoon) + { + if (Main.time < 16200.0) + { + float num30 = (float) (1.0 - Main.time / 16200.0); + white2.R = (byte) ((double) num30 * 10.0 + 205.0); + white2.G = (byte) ((double) num30 * 170.0 + 55.0); + white2.B = (byte) ((double) num30 * 200.0 + 55.0); + Main.bgColor.R = (byte) (40.0 - (double) num30 * 40.0 + 35.0); + Main.bgColor.G = (byte) ((double) num30 * 20.0 + 15.0); + Main.bgColor.B = (byte) ((double) num30 * 20.0 + 15.0); + } + else if (Main.time >= 16200.0) + { + float num31 = (float) ((Main.time / 32400.0 - 0.5) * 2.0); + white2.R = (byte) ((double) num31 * 50.0 + 205.0); + white2.G = (byte) ((double) num31 * 100.0 + 155.0); + white2.B = (byte) ((double) num31 * 100.0 + 155.0); + white2.R = (byte) ((double) num31 * 10.0 + 205.0); + white2.G = (byte) ((double) num31 * 170.0 + 55.0); + white2.B = (byte) ((double) num31 * 200.0 + 55.0); + Main.bgColor.R = (byte) (40.0 - (double) num31 * 40.0 + 35.0); + Main.bgColor.G = (byte) ((double) num31 * 20.0 + 15.0); + Main.bgColor.B = (byte) ((double) num31 * 20.0 + 15.0); + } + } + else if (Main.time < 16200.0) + { + float num32 = (float) (1.0 - Main.time / 16200.0); + white2.R = (byte) ((double) num32 * 10.0 + 205.0); + white2.G = (byte) ((double) num32 * 70.0 + 155.0); + white2.B = (byte) ((double) num32 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num32 * 30.0 + 5.0); + Main.bgColor.G = (byte) ((double) num32 * 30.0 + 5.0); + Main.bgColor.B = (byte) ((double) num32 * 30.0 + 5.0); + } + else if (Main.time >= 16200.0) + { + float num33 = (float) ((Main.time / 32400.0 - 0.5) * 2.0); + white2.R = (byte) ((double) num33 * 50.0 + 205.0); + white2.G = (byte) ((double) num33 * 100.0 + 155.0); + white2.B = (byte) ((double) num33 * 100.0 + 155.0); + Main.bgColor.R = (byte) ((double) num33 * 20.0 + 5.0); + Main.bgColor.G = (byte) ((double) num33 * 30.0 + 5.0); + Main.bgColor.B = (byte) ((double) num33 * 30.0 + 5.0); + } + } + float num34 = 0.0005f * (float) Main.dayRate; + if (Main.gameMenu) + num34 *= 20f; + if (Main.raining) + { + if ((double) Main.cloudAlpha > (double) Main.maxRaining) + { + Main.cloudAlpha -= num34; + if ((double) Main.cloudAlpha < (double) Main.maxRaining) + Main.cloudAlpha = Main.maxRaining; + } + else if ((double) Main.cloudAlpha < (double) Main.maxRaining) + { + Main.cloudAlpha += num34; + if ((double) Main.cloudAlpha > (double) Main.maxRaining) + Main.cloudAlpha = Main.maxRaining; + } + } + else + { + Main.cloudAlpha -= num34; + if ((double) Main.cloudAlpha < 0.0) + Main.cloudAlpha = 0.0f; + } + if ((double) Main.cloudAlpha > 0.0) + { + float num35 = (float) (1.0 - (double) Main.cloudAlpha * 0.899999976158142); + Main.bgColor.R = (byte) ((double) Main.bgColor.R * (double) num35); + Main.bgColor.G = (byte) ((double) Main.bgColor.G * (double) num35); + Main.bgColor.B = (byte) ((double) Main.bgColor.B * (double) num35); + } + if (Main.gameMenu || Main.netMode == 2) + { + this.bgTop = 0; + if (!Main.dayTime) + { + Main.bgColor.R = (byte) 35; + Main.bgColor.G = (byte) 35; + Main.bgColor.B = (byte) 35; + } + } + if (Main.gameMenu) + { + Main.bgDelay = 1000; + Main.evilTiles = (int) ((double) Main.bgAlpha[1] * 500.0); + } + if (Main.evilTiles > 0) + { + float num36 = (float) Main.evilTiles / 500f; + if ((double) num36 > 1.0) + num36 = 1f; + int r1 = (int) Main.bgColor.R; + int g1 = (int) Main.bgColor.G; + int b1 = (int) Main.bgColor.B; + int num37 = r1 - (int) (100.0 * (double) num36 * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num38 = g1 - (int) (140.0 * (double) num36 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num39 = b1 - (int) (80.0 * (double) num36 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num37 < 15) + num37 = 15; + if (num38 < 15) + num38 = 15; + if (num39 < 15) + num39 = 15; + Main.bgColor.R = (byte) num37; + Main.bgColor.G = (byte) num38; + Main.bgColor.B = (byte) num39; + int r2 = (int) white1.R; + int g2 = (int) white1.G; + int b2 = (int) white1.B; + int num40 = r2 - (int) (100.0 * (double) num36 * ((double) white1.R / (double) byte.MaxValue)); + int num41 = g2 - (int) (100.0 * (double) num36 * ((double) white1.G / (double) byte.MaxValue)); + int num42 = b2 - (int) (0.0 * (double) num36 * ((double) white1.B / (double) byte.MaxValue)); + if (num40 < 15) + num40 = 15; + if (num41 < 15) + num41 = 15; + if (num42 < 15) + num42 = 15; + white1.R = (byte) num40; + white1.G = (byte) num41; + white1.B = (byte) num42; + int r3 = (int) white2.R; + int g3 = (int) white2.G; + int b3 = (int) white2.B; + int num43 = r3 - (int) (140.0 * (double) num36 * ((double) white2.R / (double) byte.MaxValue)); + int num44 = g3 - (int) (190.0 * (double) num36 * ((double) white2.G / (double) byte.MaxValue)); + int num45 = b3 - (int) (170.0 * (double) num36 * ((double) white2.B / (double) byte.MaxValue)); + if (num43 < 15) + num43 = 15; + if (num44 < 15) + num44 = 15; + if (num45 < 15) + num45 = 15; + white2.R = (byte) num43; + white2.G = (byte) num44; + white2.B = (byte) num45; + } + if (Main.bloodTiles > 0) + { + float num46 = (float) Main.bloodTiles / 400f; + if ((double) num46 > 1.0) + num46 = 1f; + int r4 = (int) Main.bgColor.R; + int g4 = (int) Main.bgColor.G; + int b4 = (int) Main.bgColor.B; + int num47 = r4 - (int) (70.0 * (double) num46 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num48 = g4 - (int) (110.0 * (double) num46 * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num49 = b4 - (int) (150.0 * (double) num46 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num47 < 15) + num47 = 15; + if (num48 < 15) + num48 = 15; + if (num49 < 15) + num49 = 15; + Main.bgColor.R = (byte) num47; + Main.bgColor.G = (byte) num48; + Main.bgColor.B = (byte) num49; + int num50 = (int) white1.R; + int g5 = (int) white1.G; + int b5 = (int) white1.B; + int num51 = g5 - (int) (90.0 * (double) num46 * ((double) white1.G / (double) byte.MaxValue)); + int num52 = b5 - (int) (110.0 * (double) num46 * ((double) white1.B / (double) byte.MaxValue)); + if (num50 < 15) + num50 = 15; + if (num51 < 15) + num51 = 15; + if (num52 < 15) + num52 = 15; + white1.R = (byte) num50; + white1.G = (byte) num51; + white1.B = (byte) num52; + int r5 = (int) white2.R; + int g6 = (int) white2.G; + int b6 = (int) white2.B; + int num53 = r5 - (int) (100.0 * (double) num46 * ((double) white2.R / (double) byte.MaxValue)); + int num54 = g6 - (int) (120.0 * (double) num46 * ((double) white2.G / (double) byte.MaxValue)); + int num55 = b6 - (int) (180.0 * (double) num46 * ((double) white2.B / (double) byte.MaxValue)); + if (num53 < 15) + num53 = 15; + if (num54 < 15) + num54 = 15; + if (num55 < 15) + num55 = 15; + white2.R = (byte) num53; + white2.G = (byte) num54; + white2.B = (byte) num55; + } + if (Main.jungleTiles > 0) + { + float num56 = (float) Main.jungleTiles / 200f; + if ((double) num56 > 1.0) + num56 = 1f; + int r6 = (int) Main.bgColor.R; + int num57 = (int) Main.bgColor.G; + int b7 = (int) Main.bgColor.B; + int num58 = r6 - (int) (40.0 * (double) num56 * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num59 = b7 - (int) (70.0 * (double) num56 * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num57 > (int) byte.MaxValue) + num57 = (int) byte.MaxValue; + if (num57 < 15) + num57 = 15; + if (num58 > (int) byte.MaxValue) + num58 = (int) byte.MaxValue; + if (num58 < 15) + num58 = 15; + if (num59 < 15) + num59 = 15; + Main.bgColor.R = (byte) num58; + Main.bgColor.G = (byte) num57; + Main.bgColor.B = (byte) num59; + int r7 = (int) white1.R; + int num60 = (int) white1.G; + int b8 = (int) white1.B; + int num61 = r7 - (int) (30.0 * (double) num56 * ((double) white1.R / (double) byte.MaxValue)); + int num62 = b8 - (int) (10.0 * (double) num56 * ((double) white1.B / (double) byte.MaxValue)); + if (num61 < 15) + num61 = 15; + if (num60 < 15) + num60 = 15; + if (num62 < 15) + num62 = 15; + white1.R = (byte) num61; + white1.G = (byte) num60; + white1.B = (byte) num62; + int r8 = (int) white2.R; + int g = (int) white2.G; + int b9 = (int) white2.B; + int num63 = g - (int) (140.0 * (double) num56 * ((double) white2.R / (double) byte.MaxValue)); + int num64 = r8 - (int) (170.0 * (double) num56 * ((double) white2.G / (double) byte.MaxValue)); + int num65 = b9 - (int) (190.0 * (double) num56 * ((double) white2.B / (double) byte.MaxValue)); + if (num64 < 15) + num64 = 15; + if (num63 < 15) + num63 = 15; + if (num65 < 15) + num65 = 15; + white2.R = (byte) num64; + white2.G = (byte) num63; + white2.B = (byte) num65; + } + if (Main.shroomTiles > 0) + { + double num66 = (double) Main.shroomTiles / 160.0; + if (num66 > (double) Main.shroomLight) + Main.shroomLight += 0.01f; + if (num66 < (double) Main.shroomLight) + Main.shroomLight -= 0.01f; + } + else + Main.shroomLight -= 0.02f; + if ((double) Main.shroomLight < 0.0) + Main.shroomLight = 0.0f; + if ((double) Main.shroomLight > 1.0) + Main.shroomLight = 1f; + if ((double) Main.shroomLight > 0.0) + { + float shroomLight = Main.shroomLight; + int r9 = (int) Main.bgColor.R; + int g7 = (int) Main.bgColor.G; + int b10 = (int) Main.bgColor.B; + int num67 = g7 - (int) (250.0 * (double) shroomLight * ((double) Main.bgColor.G / (double) byte.MaxValue)); + int num68 = r9 - (int) (250.0 * (double) shroomLight * ((double) Main.bgColor.R / (double) byte.MaxValue)); + int num69 = b10 - (int) (250.0 * (double) shroomLight * ((double) Main.bgColor.B / (double) byte.MaxValue)); + if (num67 < 15) + num67 = 15; + if (num68 < 15) + num68 = 15; + if (num69 < 15) + num69 = 15; + Main.bgColor.R = (byte) num68; + Main.bgColor.G = (byte) num67; + Main.bgColor.B = (byte) num69; + int r10 = (int) white1.R; + int g8 = (int) white1.G; + int b11 = (int) white1.B; + int num70 = g8 - (int) (10.0 * (double) shroomLight * ((double) white1.G / (double) byte.MaxValue)); + int num71 = r10 - (int) (30.0 * (double) shroomLight * ((double) white1.R / (double) byte.MaxValue)); + int num72 = b11 - (int) (10.0 * (double) shroomLight * ((double) white1.B / (double) byte.MaxValue)); + if (num71 < 15) + num71 = 15; + if (num70 < 15) + num70 = 15; + if (num72 < 15) + num72 = 15; + white1.R = (byte) num71; + white1.G = (byte) num70; + white1.B = (byte) num72; + int r11 = (int) white2.R; + int g9 = (int) white2.G; + int b12 = (int) white2.B; + int num73 = g9 - (int) (140.0 * (double) shroomLight * ((double) white2.R / (double) byte.MaxValue)); + int num74 = r11 - (int) (170.0 * (double) shroomLight * ((double) white2.G / (double) byte.MaxValue)); + int num75 = b12 - (int) (190.0 * (double) shroomLight * ((double) white2.B / (double) byte.MaxValue)); + if (num74 < 15) + num74 = 15; + if (num73 < 15) + num73 = 15; + if (num75 < 15) + num75 = 15; + white2.R = (byte) num74; + white2.G = (byte) num73; + white2.B = (byte) num75; + } + if (Lighting.NotRetro) + { + if (Main.bgColor.R < (byte) 10) + Main.bgColor.R = (byte) 10; + if (Main.bgColor.G < (byte) 10) + Main.bgColor.G = (byte) 10; + if (Main.bgColor.B < (byte) 10) + Main.bgColor.B = (byte) 10; + } + else + { + if (Main.bgColor.R < (byte) 15) + Main.bgColor.R = (byte) 15; + if (Main.bgColor.G < (byte) 15) + Main.bgColor.G = (byte) 15; + if (Main.bgColor.B < (byte) 15) + Main.bgColor.B = (byte) 15; + } + if (Main.bloodMoon) + { + if (Main.bgColor.R < (byte) 25) + Main.bgColor.R = (byte) 25; + if (Main.bgColor.G < (byte) 25) + Main.bgColor.G = (byte) 25; + if (Main.bgColor.B < (byte) 25) + Main.bgColor.B = (byte) 25; + } + if (Main.eclipse && Main.dayTime) + { + float num76 = 1242f; + Main.eclipseLight = (float) Main.time / num76; + 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 num77 = (float) (1.0 - 0.925000011920929 * (double) Main.eclipseLight); + float num78 = (float) (1.0 - 0.959999978542328 * (double) Main.eclipseLight); + float num79 = (float) (1.0 - 1.0 * (double) Main.eclipseLight); + int num80 = (int) ((double) Main.bgColor.R * (double) num77); + int num81 = (int) ((double) Main.bgColor.G * (double) num78); + int num82 = (int) ((double) Main.bgColor.B * (double) num79); + Main.bgColor.R = (byte) num80; + Main.bgColor.G = (byte) num81; + Main.bgColor.B = (byte) num82; + white1.R = byte.MaxValue; + white1.G = (byte) 127; + white1.B = (byte) 67; + if (Main.bgColor.R < (byte) 20) + Main.bgColor.R = (byte) 20; + if (Main.bgColor.G < (byte) 10) + Main.bgColor.G = (byte) 10; + if (!Lighting.NotRetro) + { + if (Main.bgColor.R < (byte) 20) + Main.bgColor.R = (byte) 20; + if (Main.bgColor.G < (byte) 14) + Main.bgColor.G = (byte) 14; + if (Main.bgColor.B < (byte) 6) + Main.bgColor.B = (byte) 6; + } + } + Main.tileColor.A = byte.MaxValue; + Main.tileColor.R = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.R * 7) / 10); + Main.tileColor.G = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.G * 7) / 10); + Main.tileColor.B = (byte) (((int) Main.bgColor.R + (int) Main.bgColor.G + (int) Main.bgColor.B + (int) Main.bgColor.B * 7) / 10); + Main.tileColor = SkyManager.Instance.ProcessTileColor(Main.tileColor); + float num83 = (float) (Main.maxTilesX / 4200); + float num84 = num83 * num83; + Main.atmo = (float) ((((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0 - (65.0 + 10.0 * (double) num84)) / (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.atmo = 1f; + Main.bgColor.R = (byte) ((double) Main.bgColor.R * (double) Main.atmo); + Main.bgColor.G = (byte) ((double) Main.bgColor.G * (double) Main.atmo); + Main.bgColor.B = (byte) ((double) Main.bgColor.B * (double) Main.atmo); + if ((double) Main.atmo <= 0.05) + { + Main.bgColor.R = (byte) 0; + Main.bgColor.G = (byte) 0; + Main.bgColor.B = (byte) 0; + Main.bgColor.A = (byte) 0; + } + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Black); + base.Draw(gameTime); + float val2_1 = (float) Main.screenWidth / 1920f; + float val2_2 = (float) Main.screenHeight / 1200f; + Main.GameViewMatrix.Effects = Main.gameMenu || (double) Main.player[Main.myPlayer].gravDir == 1.0 ? SpriteEffects.None : SpriteEffects.FlipVertically; + Main.BackgroundViewMatrix.Effects = Main.GameViewMatrix.Effects; + Main.ForcedMinimumZoom = Math.Max(Math.Max(1f, val2_1), val2_2); + Main.BackgroundViewMatrix.Zoom = new Vector2(Main.ForcedMinimumZoom); + Main.GameViewMatrix.Zoom = new Vector2(Main.ForcedMinimumZoom * MathHelper.Clamp(Main.GameZoomTarget, 1f, 2f)); + this.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 && Filters.Scene.CanCapture(); + if (flag) + Filters.Scene.BeginCapture(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.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) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(Main.backgroundTexture[Main.background], new Microsoft.Xna.Framework.Rectangle(this.bgStart + Main.backgroundWidth[Main.background] * index, this.bgTop, Main.backgroundWidth[Main.background], Math.Max(Main.screenHeight, Main.backgroundHeight[Main.background])), Main.bgColor); + TimeLogger.DetailedDrawTime(6); + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.BackgroundViewMatrix.EffectMatrix); + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0 && (double) byte.MaxValue * (1.0 - (double) Main.cloudAlpha) - (double) Main.bgColor.R - 25.0 > 0.0 && Main.netMode != 2) + { + for (int index = 0; index < Main.numStars; ++index) + { + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(); + float num85 = (float) Main.evilTiles / 500f; + if ((double) num85 > 1.0) + num85 = 1f; + float num86 = (float) (1.0 - (double) num85 * 0.5); + if (Main.evilTiles <= 0) + num86 = 1f; + int num87 = (int) ((double) ((int) byte.MaxValue - (int) Main.bgColor.R - 100) * (double) Main.star[index].twinkle * (double) num86); + int num88 = (int) ((double) ((int) byte.MaxValue - (int) Main.bgColor.G - 100) * (double) Main.star[index].twinkle * (double) num86); + int num89 = (int) ((double) ((int) byte.MaxValue - (int) Main.bgColor.B - 100) * (double) Main.star[index].twinkle * (double) num86); + if (num87 < 0) + num87 = 0; + if (num88 < 0) + num88 = 0; + if (num89 < 0) + num89 = 0; + color.R = (byte) num87; + color.G = (byte) ((double) num88 * (double) num86); + color.B = (byte) ((double) num89 * (double) num86); + float num90 = Main.star[index].position.X * ((float) Main.screenWidth / 800f); + float num91 = Main.star[index].position.Y * ((float) Main.screenHeight / 600f); + Main.spriteBatch.Draw(Main.starTexture[Main.star[index].type], new Vector2(num90 + (float) Main.starTexture[Main.star[index].type].Width * 0.5f, num91 + (float) Main.starTexture[Main.star[index].type].Height * 0.5f + (float) this.bgTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.starTexture[Main.star[index].type].Width, Main.starTexture[Main.star[index].type].Height)), color, Main.star[index].rotation, new Vector2((float) Main.starTexture[Main.star[index].type].Width * 0.5f, (float) Main.starTexture[Main.star[index].type].Height * 0.5f), Main.star[index].scale * Main.star[index].twinkle, SpriteEffects.None, 0.0f); + } + } + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 2.0) + { + if (Main.dayTime) + { + scale1 *= 1.1f; + if (Main.eclipse) + { + float num92 = 1f - Main.shroomLight - Main.cloudAlpha * 1.5f; + if ((double) num92 < 0.0) + num92 = 0.0f; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num92), (int) (byte) ((double) white1.G * (double) num92), (int) (byte) ((double) white1.B * (double) num92), (int) (byte) ((double) byte.MaxValue * (double) num92)); + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) white1.R * (double) num92), (int) (byte) ((double) white1.G * (double) num92), (int) (byte) ((double) white1.B * (double) num92), (int) (byte) ((double) ((int) white1.B - 60) * (double) num92)); + Main.spriteBatch.Draw(Main.sun3Texture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sun3Texture.Width, Main.sun3Texture.Height)), color1, rotation1, new Vector2((float) (Main.sun3Texture.Width / 2), (float) (Main.sun3Texture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.sun3Texture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sun3Texture.Width, Main.sun3Texture.Height)), color2, rotation1, new Vector2((float) (Main.sun3Texture.Width / 2), (float) (Main.sun3Texture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + } + else if (!Main.gameMenu && Main.player[Main.myPlayer].head == 12) + { + float num93 = 1f - Main.shroomLight - Main.cloudAlpha * 1.5f; + if ((double) num93 < 0.0) + num93 = 0.0f; + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num93), (int) (byte) ((double) white1.G * (double) num93), (int) (byte) ((double) white1.B * (double) num93), (int) (byte) ((double) byte.MaxValue * (double) num93)); + Microsoft.Xna.Framework.Color color4 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) white1.R * (double) num93), (int) (byte) ((double) white1.G * (double) num93), (int) (byte) ((double) white1.B * (double) num93), (int) (byte) ((double) ((int) white1.B - 60) * (double) num93)); + Main.spriteBatch.Draw(Main.sun2Texture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sun2Texture.Width, Main.sun2Texture.Height)), color3, rotation1, new Vector2((float) (Main.sun2Texture.Width / 2), (float) (Main.sun2Texture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.sun2Texture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sun2Texture.Width, Main.sun2Texture.Height)), color4, rotation1, new Vector2((float) (Main.sun2Texture.Width / 2), (float) (Main.sun2Texture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + } + else + { + float num94 = 1f - Main.shroomLight - Main.cloudAlpha * 1.5f; + if ((double) num94 < 0.0) + num94 = 0.0f; + Microsoft.Xna.Framework.Color color5 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num94), (int) (byte) ((double) white1.G * (double) num94), (int) (byte) ((double) white1.B * (double) num94), (int) (byte) ((double) byte.MaxValue * (double) num94)); + Microsoft.Xna.Framework.Color color6 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) white1.R * (double) num94), (int) (byte) ((double) white1.G * (double) num94), (int) (byte) ((double) white1.B * (double) num94), (int) (byte) ((double) white1.B * (double) num94)); + Main.spriteBatch.Draw(Main.sunTexture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sunTexture.Width, Main.sunTexture.Height)), color5, rotation1, new Vector2((float) (Main.sunTexture.Width / 2), (float) (Main.sunTexture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(Main.sunTexture, new Vector2((float) num21, (float) (num22 + (int) Main.sunModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.sunTexture.Width, Main.sunTexture.Height)), color6, rotation1, new Vector2((float) (Main.sunTexture.Width / 2), (float) (Main.sunTexture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + } + } + if (!Main.dayTime) + { + float num95 = (float) (1.0 - (double) Main.cloudAlpha * 1.5); + if ((double) num95 < 0.0) + num95 = 0.0f; + white2.R = (byte) ((double) white2.R * (double) num95); + white2.G = (byte) ((double) white2.G * (double) num95); + white2.B = (byte) ((double) white2.B * (double) num95); + white2.A = (byte) ((double) white2.A * (double) num95); + if (Main.pumpkinMoon) + Main.spriteBatch.Draw(Main.pumpkinMoonTexture, new Vector2((float) num23, (float) (num24 + (int) Main.moonModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.pumpkinMoonTexture.Width * Main.moonPhase, Main.pumpkinMoonTexture.Width, Main.pumpkinMoonTexture.Width)), white2, rotation2, new Vector2((float) (Main.pumpkinMoonTexture.Width / 2), (float) (Main.pumpkinMoonTexture.Width / 2)), scale2, SpriteEffects.None, 0.0f); + else if (Main.snowMoon) + Main.spriteBatch.Draw(Main.snowMoonTexture, new Vector2((float) num23, (float) (num24 + (int) Main.moonModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.snowMoonTexture.Width * Main.moonPhase, Main.snowMoonTexture.Width, Main.snowMoonTexture.Width)), white2, rotation2, new Vector2((float) (Main.snowMoonTexture.Width / 2), (float) (Main.snowMoonTexture.Width / 2)), scale2, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(Main.moonTexture[Main.moonType], new Vector2((float) num23, (float) (num24 + (int) Main.moonModY)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, Main.moonTexture[Main.moonType].Width * Main.moonPhase, Main.moonTexture[Main.moonType].Width, Main.moonTexture[Main.moonType].Width)), white2, rotation2, new Vector2((float) (Main.moonTexture[Main.moonType].Width / 2), (float) (Main.moonTexture[Main.moonType].Width / 2)), scale2, SpriteEffects.None, 0.0f); + } + } + Microsoft.Xna.Framework.Rectangle rectangle1 = !Main.dayTime ? new Microsoft.Xna.Framework.Rectangle((int) ((double) num23 - (double) Main.moonTexture[Main.moonType].Width * 0.5 * (double) scale2), (int) ((double) num24 - (double) Main.moonTexture[Main.moonType].Width * 0.5 * (double) scale2 + (double) Main.moonModY), (int) ((double) Main.moonTexture[Main.moonType].Width * (double) scale2), (int) ((double) Main.moonTexture[Main.moonType].Width * (double) scale2)) : new Microsoft.Xna.Framework.Rectangle((int) ((double) num21 - (double) Main.sunTexture.Width * 0.5 * (double) scale1), (int) ((double) num22 - (double) Main.sunTexture.Height * 0.5 * (double) scale1 + (double) Main.sunModY), (int) ((double) Main.sunTexture.Width * (double) scale1), (int) ((double) Main.sunTexture.Width * (double) scale1)); + 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 && Main.netMode != 1) + { + if (Main.mouseLeft && Main.hasFocus) + { + if (rectangle2.Intersects(rectangle1) || Main.grabSky) + { + if (Main.dayTime) + { + Main.time = 54000.0 * ((double) (Main.mouseX + Main.sunTexture.Width) / ((double) Main.screenWidth + (double) (Main.sunTexture.Width * 2))); + Main.sunModY = (short) (Main.mouseY - num22); + if (Main.time > 53990.0) + Main.time = 53990.0; + } + else + { + Main.time = 32400.0 * ((double) (Main.mouseX + Main.moonTexture[Main.moonType].Width) / ((double) Main.screenWidth + (double) (Main.moonTexture[Main.moonType].Width * 2))); + Main.moonModY = (short) (Main.mouseY - num24); + if (Main.time > 32390.0) + Main.time = 32390.0; + } + if (Main.time < 10.0) + Main.time = 10.0; + if (Main.netMode != 0) + NetMessage.SendData(18); + Main.grabSky = true; + } + } + else + Main.grabSky = false; + } + TimeLogger.DetailedDrawTime(7); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Sky); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.BackgroundViewMatrix.TransformationMatrix); + this.DrawBG(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, this.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, this.Rasterizer, (Effect) null, Main.UIScaleMatrix); + if (Main.gameMenu || Main.netMode == 2) + { + 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.bgColor * 0.85f; + for (int index = 0; index < Main.maxRain; ++index) + { + if (Main.rain[index].active) + { + Rain rain = Main.rain[index]; + Main.spriteBatch.Draw(Main.rainTexture, 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(); + } + } + this.DrawMenu(gameTime); + TimeLogger.MenuDrawTime(stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + else + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + this.firstTileX = (int) Math.Floor((double) Main.screenPosition.X / 16.0) - 1; + this.lastTileX = (int) Math.Floor(((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0) + 2; + this.firstTileY = (int) Math.Floor((double) Main.screenPosition.Y / 16.0) - 1; + this.lastTileY = (int) Math.Floor(((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0) + 2; + if (!Main.drawSkip) + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + 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(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + this.DrawFPS(); + this.DrawPlayerChat(); + 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 white3 = 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); + Sandstorm.DrawGrains(Main.spriteBatch); + ScreenDarkness.DrawBack(Main.spriteBatch); + ++Main.magmaBGFrameCounter; + if (Main.magmaBGFrameCounter >= 8) + { + Main.magmaBGFrameCounter = 0; + ++Main.magmaBGFrame; + if (Main.magmaBGFrame >= 3) + Main.magmaBGFrame = 0; + } + try + { + this.CacheNPCDraws(); + this.CacheProjDraws(); + this.DrawCachedNPCs(this.DrawCacheNPCsMoonMoon, true); + 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); + this.DrawWoF(); + if (Main.drawBackGore) + { + Main.drawBackGore = false; + if (Main.ignoreErrors) + { + try + { + this.DrawGoreBehind(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawGoreBehind(); + } + MoonlordDeathDrama.DrawPieces(Main.spriteBatch); + MoonlordDeathDrama.DrawExplosions(Main.spriteBatch); + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + if (Main.player[Main.myPlayer].detectCreature) + { + if (Main.drawToScreen) + { + this.DrawTiles(false); + TimeLogger.DetailedDrawReset(); + this.waterfallManager.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawTime(16); + this.DrawTiles(); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.tile2Target, Main.sceneTile2Pos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(15); + this.waterfallManager.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawTime(16); + Main.spriteBatch.Draw((Texture2D) this.tileTarget, Main.sceneTilePos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(17); + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + this.DrawNPCs(true); + TimeLogger.DetailedDrawTime(18); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCs); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + Main.player[Main.myPlayer].hitTile.DrawFreshAnimations(Main.spriteBatch); + this.DrawNPCs(); + this.DrawCachedNPCs(this.DrawCacheNPCProjectiles, false); + TimeLogger.DetailedDrawTime(19); + } + else + { + if (Main.drawToScreen) + { + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + this.DrawTiles(false); + TimeLogger.DetailedDrawReset(); + this.waterfallManager.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawTime(16); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + this.DrawNPCs(true); + TimeLogger.DetailedDrawTime(18); + this.DrawTiles(); + } + else + { + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + Main.spriteBatch.Draw((Texture2D) this.tile2Target, Main.sceneTile2Pos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(15); + this.waterfallManager.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawTime(16); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + this.DrawNPCs(true); + TimeLogger.DetailedDrawTime(18); + Main.spriteBatch.Draw((Texture2D) this.tileTarget, Main.sceneTilePos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(17); + } + Main.player[Main.myPlayer].hitTile.DrawFreshAnimations(Main.spriteBatch); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCs); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.Rasterizer, (Effect) null, Main.Transform); + TimeLogger.DetailedDrawReset(); + this.DrawNPCs(); + this.DrawCachedNPCs(this.DrawCacheNPCProjectiles, false); + TimeLogger.DetailedDrawTime(19); + } + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.TilesAndNPCs); + if (!Main.mapFullscreen && Main.mapStyle == 2) + { + if (Main.ignoreErrors) + { + try + { + this.DrawMap(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawMap(); + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(35); + this.SortDrawCacheWorms(); + this.DrawCachedProjs(this.DrawCacheProjsBehindProjectiles); + this.DrawProjectiles(); + this.DrawPlayers(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, this.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, this.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) + Filters.Scene.EndCapture(); + TimeLogger.DetailedDrawTime(36); + if (!Main.hideUI) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + TimeLogger.DetailedDrawReset(); + 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 vec; + vec.X = (float) ((double) Main.player[index].position.X + (double) (Main.player[index].width / 2) - (double) messageSize.X / 2.0); + vec.Y = (float) ((double) Main.player[index].position.Y - (double) messageSize.Y - 2.0); + vec.Y += Main.player[index].gfxOffY; + vec = vec.Floor(); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + vec.Y -= Main.screenPosition.Y; + vec.Y = Main.screenPosition.Y + (float) Main.screenHeight - vec.Y; + } + int hoveredSnippet = 0; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, Main.player[index].chatOverhead.snippets, vec - Main.screenPosition, 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + } + } + 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_3 = Main.fontCombatText[index2].MeasureString(Main.combatText[index1].text); + Vector2 vector2_4 = new Vector2(vector2_3.X * 0.5f, vector2_3.Y * 0.5f); + float num96 = 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 num97 = r * (float) ((double) num96 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num98 = b * (float) ((double) num96 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num99 = g * (float) ((double) num96 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num100 = a * (num96 * Main.combatText[index1].alpha); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) num97, (int) num99, (int) num98, (int) num100); + for (int index3 = 0; index3 < 5; ++index3) + { + float num101 = 0.0f; + float num102 = 0.0f; + if (index3 == 0) + num101 -= targetScale; + else if (index3 == 1) + num101 += targetScale; + else if (index3 == 2) + num102 -= targetScale; + else if (index3 == 3) + { + num102 += targetScale; + } + else + { + float num103 = (float) Main.combatText[index1].color.R * num96 * Main.combatText[index1].alpha; + float num104 = (float) Main.combatText[index1].color.B * num96 * Main.combatText[index1].alpha; + float num105 = (float) Main.combatText[index1].color.G * num96 * Main.combatText[index1].alpha; + float num106 = (float) Main.combatText[index1].color.A * num96 * Main.combatText[index1].alpha; + color = new Microsoft.Xna.Framework.Color((int) num103, (int) num105, (int) num104, (int) num106); + } + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + float num107 = Main.combatText[index1].position.Y - Main.screenPosition.Y; + float num108 = (float) Main.screenHeight - num107; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontCombatText[index2], Main.combatText[index1].text, new Vector2(Main.combatText[index1].position.X - Main.screenPosition.X + num101 + vector2_4.X, num108 + num102 + vector2_4.Y), color, Main.combatText[index1].rotation, vector2_4, Main.combatText[index1].scale, SpriteEffects.None, 0.0f); + } + else + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontCombatText[index2], Main.combatText[index1].text, new Vector2(Main.combatText[index1].position.X - Main.screenPosition.X + num101 + vector2_4.X, Main.combatText[index1].position.Y - Main.screenPosition.Y + num102 + vector2_4.Y), color, Main.combatText[index1].rotation, vector2_4, Main.combatText[index1].scale, SpriteEffects.None, 0.0f); + } + } + } + float num109 = ItemText.TargetScale; + if ((double) num109 == 0.0) + num109 = 1f; + for (int index4 = 0; index4 < 20; ++index4) + { + if (Main.itemText[index4].active) + { + string str = Main.itemText[index4].name; + if (Main.itemText[index4].stack > 1) + str = str + " (" + (object) Main.itemText[index4].stack + ")"; + Vector2 vector2_5 = Main.fontMouseText.MeasureString(str); + Vector2 vector2_6 = new Vector2(vector2_5.X * 0.5f, vector2_5.Y * 0.5f); + float num110 = Main.itemText[index4].scale / num109; + float r = (float) Main.itemText[index4].color.R; + float g = (float) Main.itemText[index4].color.G; + float b = (float) Main.itemText[index4].color.B; + float a = (float) Main.itemText[index4].color.A; + float num111 = r * (float) ((double) num110 * (double) Main.itemText[index4].alpha * 0.300000011920929); + float num112 = b * (float) ((double) num110 * (double) Main.itemText[index4].alpha * 0.300000011920929); + float num113 = g * (float) ((double) num110 * (double) Main.itemText[index4].alpha * 0.300000011920929); + float num114 = a * (num110 * Main.itemText[index4].alpha); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) num111, (int) num113, (int) num112, (int) num114); + for (int index5 = 0; index5 < 5; ++index5) + { + float num115 = 0.0f; + float num116 = 0.0f; + if (index5 == 0) + num115 -= num109 * 2f; + else if (index5 == 1) + num115 += num109 * 2f; + else if (index5 == 2) + num116 -= num109 * 2f; + else if (index5 == 3) + { + num116 += num109 * 2f; + } + else + { + float num117 = (float) Main.itemText[index4].color.R * num110 * Main.itemText[index4].alpha; + float num118 = (float) Main.itemText[index4].color.B * num110 * Main.itemText[index4].alpha; + float num119 = (float) Main.itemText[index4].color.G * num110 * Main.itemText[index4].alpha; + float num120 = (float) Main.itemText[index4].color.A * num110 * Main.itemText[index4].alpha; + color = new Microsoft.Xna.Framework.Color((int) num117, (int) num119, (int) num118, (int) num120); + } + if (index5 < 4) + color = new Microsoft.Xna.Framework.Color(0, 0, 0, (int) ((float) Main.itemText[index4].color.A * num110 * Main.itemText[index4].alpha)); + float num121 = Main.itemText[index4].position.Y - Main.screenPosition.Y + num116; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + num121 = (float) Main.screenHeight - num121; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2(Main.itemText[index4].position.X - Main.screenPosition.X + num115 + vector2_6.X, num121 + vector2_6.Y), color, Main.itemText[index4].rotation, vector2_6, Main.itemText[index4].scale, SpriteEffects.None, 0.0f); + } + } + } + if (Main.netMode == 1 && Netplay.Connection.StatusText != "" && Netplay.Connection.StatusText != null) + { + string str = Netplay.Connection.StatusText + ": " + (object) (int) ((double) Netplay.Connection.StatusCount / (double) Netplay.Connection.StatusMax * 100.0) + "%"; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, Main.fontMouseText, str, new Vector2((float) (628.0 - (double) Main.fontMouseText.MeasureString(str).X * 0.5) + (float) (Main.screenWidth - 800), 84f), 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); + } + 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(Main.loTexture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Microsoft.Xna.Framework.Color(0, 0, 0, a)); + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + this.DrawFPS(); + 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) + Main.stackSplit = 0; + if (Main.stackSplit > 0) + --Main.stackSplit; + TimeLogger.RenderTime(Main.renderCount, stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + } + } + } + + 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() + { + this.scAdj = 1f - (float) (((double) Main.screenPosition.Y + (double) Main.screenHeight) / (Main.worldSurface * 16.0)); + this.scAdj = (float) (Main.worldSurface * 16.0) / (Main.screenPosition.Y + (float) Main.screenHeight); + float num1 = (float) ((double) Main.maxTilesY * 0.150000005960464 * 16.0) - Main.screenPosition.Y; + if ((double) num1 < 0.0) + num1 = 0.0f; + float num2 = num1 * 0.00025f; + this.scAdj *= 0.45f - num2 * num2; + if ((double) Main.maxTilesY <= 1200.0) + this.scAdj *= -500f; + else if ((double) Main.maxTilesY <= 1800.0) + this.scAdj *= -300f; + else + this.scAdj *= -150f; + this.screenOff = (float) (Main.screenHeight - 600); + this.bgTop = (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.bgTop - 50); + if (Main.resetClouds) + { + Cloud.resetClouds(); + Main.resetClouds = false; + } + Main.bgScale = 1f; + Main.bgW = (int) ((double) Main.backgroundWidth[Main.treeMntBG[0]] * (double) Main.bgScale); + Main.backColor = Main.bgColor; + Main.trueBackColor = Main.backColor; + int bgStyle = Main.bgStyle; + int num3 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + int num4 = (double) Main.screenPosition.Y / 16.0 >= Main.worldSurface + 10.0 || num3 >= 380 && num3 <= Main.maxTilesX - 380 ? (Main.shroomTiles <= 100 ? (Main.sandTiles <= 1000 ? (!Main.player[Main.myPlayer].ZoneHoly ? (!Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (!Main.player[Main.myPlayer].ZoneJungle ? (!Main.player[Main.myPlayer].ZoneSnow ? 0 : 7) : 3) : 8) : 1) : 6) : (!Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (!Main.player[Main.myPlayer].ZoneHoly ? 2 : 5) : 5) : 5)) : 9) : 4; + int num5 = 30; + Main.tranSpeed = 0.05f; + if (num4 == 0) + num5 = 60; + if (Main.bgDelay < 0) + ++Main.bgDelay; + else if (num4 != Main.bgStyle) + { + ++Main.bgDelay; + if (Main.bgDelay > num5) + { + Main.bgDelay = -60; + Main.bgStyle = num4; + if (num4 == 0) + Main.bgDelay = 0; + } + } + else if (Main.bgDelay > 0) + --Main.bgDelay; + if (Main.gameMenu) + { + Main.tranSpeed = 0.02f; + Main.bgStyle = Main.dayTime ? 0 : 1; + num4 = Main.bgStyle; + } + if (Main.quickBG > 0) + { + --Main.quickBG; + Main.bgStyle = num4; + Main.tranSpeed = 1f; + } + switch (Main.bgStyle) + { + case 1: + case 5: + case 6: + Main.bgAlpha2[0] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[0] < 0.0) + Main.bgAlpha2[0] = 0.0f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] += Main.tranSpeed; + if ((double) Main.bgAlpha2[2] > 1.0) + Main.bgAlpha2[2] = 1f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + case 2: + Main.bgAlpha2[0] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[0] < 0.0) + Main.bgAlpha2[0] = 0.0f; + Main.bgAlpha2[1] += Main.tranSpeed; + if ((double) Main.bgAlpha2[1] > 1.0) + Main.bgAlpha2[1] = 1f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + case 4: + Main.bgAlpha2[0] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[0] < 0.0) + Main.bgAlpha2[0] = 0.0f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] += Main.tranSpeed; + if ((double) Main.bgAlpha2[3] > 1.0) + Main.bgAlpha2[3] = 1f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + case 7: + Main.bgAlpha2[0] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[0] < 0.0) + Main.bgAlpha2[0] = 0.0f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] += Main.tranSpeed; + if ((double) Main.bgAlpha2[4] > 1.0) + Main.bgAlpha2[4] = 1f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + case 8: + Main.bgAlpha2[0] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[0] < 0.0) + Main.bgAlpha2[0] = 0.0f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] += Main.tranSpeed; + if ((double) Main.bgAlpha2[5] > 1.0) + Main.bgAlpha2[5] = 1f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + case 9: + Main.bgAlpha2[0] += Main.tranSpeed; + if ((double) Main.bgAlpha2[0] > 1.0) + Main.bgAlpha2[0] = 1f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] += Main.tranSpeed; + if ((double) Main.bgAlpha2[6] > 1.0) + { + Main.bgAlpha2[6] = 1f; + break; + } + break; + default: + Main.bgAlpha2[0] += Main.tranSpeed; + if ((double) Main.bgAlpha2[0] > 1.0) + Main.bgAlpha2[0] = 1f; + Main.bgAlpha2[1] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[1] < 0.0) + Main.bgAlpha2[1] = 0.0f; + Main.bgAlpha2[2] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[2] < 0.0) + Main.bgAlpha2[2] = 0.0f; + Main.bgAlpha2[3] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[3] < 0.0) + Main.bgAlpha2[3] = 0.0f; + Main.bgAlpha2[4] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[4] < 0.0) + Main.bgAlpha2[4] = 0.0f; + Main.bgAlpha2[5] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[5] < 0.0) + Main.bgAlpha2[5] = 0.0f; + Main.bgAlpha2[6] -= Main.tranSpeed; + if ((double) Main.bgAlpha2[6] < 0.0) + { + Main.bgAlpha2[6] = 0.0f; + break; + } + break; + } + if (Main.ignoreErrors) + { + try + { + this.DrawSurfaceBG(); + if (Main.BackgroundEnabled) + this.DrawUnderworldBackground(false); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + { + this.DrawSurfaceBG(); + if (Main.BackgroundEnabled) + this.DrawUnderworldBackground(false); + } + TimeLogger.DetailedDrawTime(8); + } + + 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(this.flameRingTexture, 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.downedGoblins = true; + if (Main.netMode == 2) + NetMessage.SendData(7); + AchievementsHelper.NotifyProgressionEvent(10); + break; + case 2: + NPC.downedFrost = true; + AchievementsHelper.NotifyProgressionEvent(12); + break; + case 3: + NPC.downedPirates = true; + AchievementsHelper.NotifyProgressionEvent(11); + break; + case 4: + NPC.downedMartians = true; + 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 + --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 + --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; + NetMessage.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].owner == 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].owner == (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) + { + if (Main.item[whoAmI].active && (Main.item[whoAmI].owner == (int) byte.MaxValue || !Main.player[Main.item[whoAmI].owner].active)) + Main.item[whoAmI].FindOwner(whoAmI); + } + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (Netplay.Clients[playerIndex].IsActive) + { + ++Netplay.Clients[playerIndex].TimeOutTimer; + if (!Main.stopTimeOuts && Netplay.Clients[playerIndex].TimeOutTimer > 7200) + Netplay.Clients[playerIndex].PendingTermination = 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, bool force = false) + { + int num1 = 80; + if (!force && newText.Length > num1) + { + string newText1 = newText; + while (newText1.Length > num1) + { + int num2 = num1; + int startIndex = num2; + while (newText1.Substring(startIndex, 1) != " ") + { + --startIndex; + if (startIndex < 1) + break; + } + if (startIndex == 0) + { + while (newText1.Substring(num2, 1) != " ") + { + ++num2; + if (num2 >= newText1.Length - 1) + break; + } + } + else + num2 = startIndex; + if (num2 >= newText1.Length - 1) + num2 = newText1.Length; + Main.NewText(newText1.Substring(0, num2), R, G, B, true); + newText1 = newText1.Substring(num2); + if (newText1.Length > 0) + { + while (newText1.Substring(0, 1) == " ") + newText1 = newText1.Substring(1); + } + } + if (newText1.Length <= 0) + return; + Main.NewText(newText1, R, G, B, true); + } + else + { + for (int index = Main.numChatLines - 1; index > 0; --index) + { + Main.chatLine[index].text = Main.chatLine[index - 1].text; + Main.chatLine[index].parsedText = Main.chatLine[index - 1].parsedText; + Main.chatLine[index].showTime = Main.chatLine[index - 1].showTime; + Main.chatLine[index].color = Main.chatLine[index - 1].color; + } + Main.chatLine[0].color = R != (byte) 0 || G != (byte) 0 || B != (byte) 0 ? new Microsoft.Xna.Framework.Color((int) R, (int) G, (int) B) : Microsoft.Xna.Framework.Color.White; + Main.chatLine[0].text = newText; + Main.chatLine[0].parsedText = ChatManager.ParseMessage(Main.chatLine[0].text, Main.chatLine[0].color).ToArray(); + Main.chatLine[0].showTime = Main.chatLength; + Main.PlaySound(12); + } + } + + public static void NewTextMultiline(string text, bool force = false, Microsoft.Xna.Framework.Color c = default (Microsoft.Xna.Framework.Color), int WidthLimit = -1) + { + if (c == new Microsoft.Xna.Framework.Color()) + c = Microsoft.Xna.Framework.Color.White; + List> textSnippetListList = WidthLimit == -1 ? Utils.WordwrapStringSmart(text, c, Main.fontMouseText, Main.TextMaxLengthForScreen, 10) : Utils.WordwrapStringSmart(text, c, Main.fontMouseText, WidthLimit, 10); + for (int index = 0; index < textSnippetListList.Count; ++index) + Main.NewText(textSnippetListList[index]); + } + + public static void NewText(List snippets) + { + for (int index = Main.numChatLines - 1; index > 0; --index) + { + Main.chatLine[index].text = Main.chatLine[index - 1].text; + Main.chatLine[index].parsedText = Main.chatLine[index - 1].parsedText; + Main.chatLine[index].showTime = Main.chatLine[index - 1].showTime; + Main.chatLine[index].color = Main.chatLine[index - 1].color; + } + Main.chatLine[0].text = "whatever"; + Main.chatLine[0].parsedText = snippets.ToArray(); + Main.chatLine[0].showTime = Main.chatLength; + Main.PlaySound(12); + } + + public static void NewTextMultilineOld(string text, bool force = false, Microsoft.Xna.Framework.Color c = default (Microsoft.Xna.Framework.Color)) + { + if (c == new Microsoft.Xna.Framework.Color()) + c = Microsoft.Xna.Framework.Color.White; + int lineAmount; + string[] strArray = Utils.WordwrapString(text, Main.fontMouseText, 460, 10, out lineAmount); + for (int index = 0; index <= lineAmount; ++index) + Main.NewText(strArray[index], c.R, c.G, c.B, force); + } + + private static void StopRain() + { + Main.rainTime = 0; + Main.raining = false; + Main.maxRaining = 0.0f; + } + + private static void StartRain() + { + int maxValue1 = 86400; + int maxValue2 = maxValue1 / 24; + Main.rainTime = Main.rand.Next(maxValue2 * 8, maxValue1); + if (Main.rand.Next(3) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2); + if (Main.rand.Next(4) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2 * 2); + if (Main.rand.Next(5) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2 * 2); + if (Main.rand.Next(6) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2 * 3); + if (Main.rand.Next(7) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2 * 4); + if (Main.rand.Next(8) == 0) + Main.rainTime += Main.rand.Next(0, maxValue2 * 5); + float num = 1f; + if (Main.rand.Next(2) == 0) + num += 0.05f; + if (Main.rand.Next(3) == 0) + num += 0.1f; + if (Main.rand.Next(4) == 0) + num += 0.15f; + if (Main.rand.Next(5) == 0) + num += 0.2f; + Main.rainTime = (int) ((double) Main.rainTime * (double) num); + Main.ChangeRain(); + Main.raining = true; + } + + private static void ChangeRain() + { + if ((double) Main.cloudBGActive >= 1.0 || (double) Main.numClouds > 150.0) + { + if (Main.rand.Next(3) == 0) + Main.maxRaining = (float) Main.rand.Next(20, 90) * 0.01f; + else + Main.maxRaining = (float) Main.rand.Next(40, 90) * 0.01f; + } + else if ((double) Main.numClouds > 100.0) + { + if (Main.rand.Next(3) == 0) + Main.maxRaining = (float) Main.rand.Next(10, 70) * 0.01f; + else + Main.maxRaining = (float) Main.rand.Next(20, 60) * 0.01f; + } + else if (Main.rand.Next(3) == 0) + Main.maxRaining = (float) Main.rand.Next(5, 40) * 0.01f; + else + Main.maxRaining = (float) Main.rand.Next(5, 30) * 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; + 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 (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) + { + 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) + { + int num = 86400 / (Main.dayRate != 0 ? Main.dayRate : 1); + if (Main.rand.Next((int) ((double) num * 5.5)) == 0) + Main.StartRain(); + else if ((double) Main.cloudBGActive >= 1.0 && Main.rand.Next(num * 4) == 0) + Main.StartRain(); + if (!Main.raining && !NPC.BusyWithAnyInvasionOfSorts()) + { + int maxValue = (int) (1728000.0 / (double) Main.dayRate); + if (!NPC.downedSlimeKing) + maxValue /= 2; + if (Main.hardMode) + maxValue = (int) ((double) maxValue * 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) + maxValue *= 5; + if (Main.dayRate > 0 && maxValue > 0 && (flag || Main.expertMode) && Main.rand.Next(maxValue) == 0) + Main.StartSlimeRain(); + } + } + } + if ((double) Main.maxRaining != (double) Main.oldMaxRaining) + { + if (Main.netMode == 2) + NetMessage.SendData(7); + Main.oldMaxRaining = Main.maxRaining; + } + Main.UpdateSundial(); + Main.time += (double) Main.dayRate; + CultistRitual.UpdateTime(); + BirthdayParty.UpdateTime(); + Sandstorm.UpdateTime(); + DD2Event.UpdateTime(); + 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 (!Filters.Scene["MoonLordShake"].IsActive()) + Filters.Scene.Activate("MoonLordShake", Main.player[Main.myPlayer].position); + Filters.Scene["MoonLordShake"].GetShader().UseIntensity(intensity); + } + else if (Filters.Scene["MoonLordShake"].IsActive()) + 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.slimeWarningTime > 0) + { + --Main.slimeWarningTime; + if (Main.slimeWarningTime <= 0) + { + 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) + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.gen[74].Key), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + else + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.gen[75].Key), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + } + } + 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; + } + if (!Main.dayTime) + { + Main.eclipse = false; + if (!Main.fastForwardTime) + { + 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_98; + case 2: + NPC.SpawnOnPlayer(plr, 125); + NPC.SpawnOnPlayer(plr, 126); + goto label_98; + case 3: + NPC.SpawnOnPlayer(plr, (int) sbyte.MaxValue); + goto label_98; + default: + goto label_98; + } + } + } + } +label_98: + WorldGen.spawnHardBoss = 0; + } + } + if (Main.time > 32400.0) + { + if (Main.fastForwardTime) + { + Main.fastForwardTime = false; + Main.UpdateSundial(); + } + Main.checkXMas(); + Main.checkHalloween(); + Main.AnglerQuestSwap(); + BirthdayParty.CheckMorning(); + if (Main.invasionDelay > 0) + --Main.invasionDelay; + WorldGen.prioritizedTownNPC = 0; + Main.checkForSpawns = 0; + Main.time = 0.0; + if (Main.bloodMoon && Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(5); + Main.bloodMoon = false; + Main.stopMoonEvent(); + Main.dayTime = true; + if (Main.sundialCooldown > 0) + --Main.sundialCooldown; + ++Main.moonPhase; + if (Main.moonPhase >= 8) + Main.moonPhase = 0; + if (Main.netMode == 2) + { + NetMessage.SendData(7); + WorldGen.saveAndPlay(); + } + if (Main.netMode != 1) + { + AchievementsHelper.NotifyProgressionEvent(1); + 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) + NetMessage.BroadcastChatMessage(Lang.misc[20].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + } + if (Main.netMode == 2) + NetMessage.SendData(7); + } + else if (!Main.snowMoon && !Main.pumpkinMoon && !DD2Event.Ongoing) + { + 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(50) == 0 || !NPC.downedPirates && Main.rand.Next(30) == 0)) + Main.StartInvasion(3); + } + } + } + if (Main.time <= 16200.0 || !WorldGen.spawnMeteor) + return; + WorldGen.spawnMeteor = false; + WorldGen.dropMeteor(); + } + else + { + Main.bloodMoon = false; + Main.stopMoonEvent(); + if (Main.time > 54000.0) + { + NPC.setFireFlyChance(); + BirthdayParty.CheckNight(); + WorldGen.prioritizedTownNPC = 0; + Main.checkForSpawns = 0; + if (Main.rand.Next(50) == 0 && Main.netMode != 1 && WorldGen.shadowOrbSmashed) + WorldGen.spawnMeteor = true; + if (Main.eclipse && Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(3); + Main.eclipse = false; + if (Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(0); + if (!Main.fastForwardTime) + { + 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: + NetMessage.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_178; + case 2: + NetMessage.BroadcastChatMessage(Lang.misc[28].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_178; + default: + goto label_178; + } + } + 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_178; + case 2: + NetMessage.BroadcastChatMessage(Lang.misc[29].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_178; + default: + goto label_178; + } + } + 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_178; + case 2: + NetMessage.BroadcastChatMessage(Lang.misc[30].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_178; + default: + goto label_178; + } + } + } + } + } +label_178: + 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: + NetMessage.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) + NetMessage.SendData(7); + } + Main.UpdateTime_SpawnTownNPCs(); + } + } + + private static void UpdateTime_SpawnTownNPCs() + { + if (Main.netMode == 1 || Main.worldRate <= 0) + return; + ++Main.checkForSpawns; + if (Main.checkForSpawns < 7200 / Main.worldRate) + return; + int num1 = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + ++num1; + } + for (int index = 0; index < 580; ++index) + Main.townNPCCanSpawn[index] = false; + Main.checkForSpawns = 0; + WorldGen.prioritizedTownNPC = 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; + 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; + ++num26; + } + } + if (WorldGen.prioritizedTownNPC != 0) + return; + int num27 = 0; + bool flag1 = false; + int num28 = 0; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + 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 (num27 < 2000000000) + { + if (Main.player[index1].inventory[index2].type == 71) + num27 += Main.player[index1].inventory[index2].stack; + if (Main.player[index1].inventory[index2].type == 72) + num27 += Main.player[index1].inventory[index2].stack * 100; + if (Main.player[index1].inventory[index2].type == 73) + num27 += Main.player[index1].inventory[index2].stack * 10000; + if (Main.player[index1].inventory[index2].type == 74) + num27 += 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 (Main.player[index1].inventory[index2].type == 166 || Main.player[index1].inventory[index2].type == 167 || Main.player[index1].inventory[index2].type == 168 || Main.player[index1].inventory[index2].type == 235 || Main.player[index1].inventory[index2].type == 2896 || Main.player[index1].inventory[index2].type == 3547) + 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) + { + if (Main.player[index1].inventory[index2].type >= 3385 && Main.player[index1].inventory[index2].type <= 3388) + flag5 = true; + flag4 = true; + } + } + } + int num29 = Main.player[index1].statLifeMax / 20; + if (num29 > 5) + flag1 = true; + num28 += num29; + 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 flag6 = false; + if (Main.rand.Next(40) == 0) + flag6 = true; + if (num6 < 1) + Main.townNPCCanSpawn[22] = true; + if ((double) num27 > 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 && ((NPC.downedBoss1 || NPC.downedBoss2 ? 1 : (NPC.downedBoss3 ? 1 : 0)) | (flag5 ? 1 : 0)) != 0) + 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 (num26 >= 8 && num19 < 1) + Main.townNPCCanSpawn[227] = true; + if (flag6 && num17 < 1 && num26 >= 14) + Main.townNPCCanSpawn[208] = true; + if (NPC.savedBartender && num25 < 1) + Main.townNPCCanSpawn[550] = true; + if (WorldGen.prioritizedTownNPC == 0 && num6 < 1) + WorldGen.prioritizedTownNPC = 22; + if (WorldGen.prioritizedTownNPC == 0 && (double) num27 > 5000.0 && num2 < 1) + WorldGen.prioritizedTownNPC = 17; + if (WorldGen.prioritizedTownNPC == 0 & flag1 && num3 < 1 && num2 > 0) + WorldGen.prioritizedTownNPC = 18; + if (WorldGen.prioritizedTownNPC == 0 & flag2 && num5 < 1) + WorldGen.prioritizedTownNPC = 19; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedGoblin && num11 < 1) + WorldGen.prioritizedTownNPC = 107; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedTaxCollector && num24 < 1) + WorldGen.prioritizedTownNPC = 441; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedWizard && num10 < 1) + WorldGen.prioritizedTownNPC = 108; + if (WorldGen.prioritizedTownNPC == 0 && Main.hardMode && num14 < 1) + WorldGen.prioritizedTownNPC = 160; + if (WorldGen.prioritizedTownNPC == 0 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3) && num4 < 1) + WorldGen.prioritizedTownNPC = 20; + if (WorldGen.prioritizedTownNPC == 0 & flag3 && num2 > 0 && num8 < 1) + WorldGen.prioritizedTownNPC = 38; + if (WorldGen.prioritizedTownNPC == 0 && NPC.downedQueenBee && num20 < 1) + WorldGen.prioritizedTownNPC = 228; + if (WorldGen.prioritizedTownNPC == 0 && NPC.downedMechBossAny && num15 < 1) + WorldGen.prioritizedTownNPC = 178; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedMech && num12 < 1) + WorldGen.prioritizedTownNPC = 124; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedAngler && num23 < 1) + WorldGen.prioritizedTownNPC = 369; + if (WorldGen.prioritizedTownNPC == 0 && Main.hardMode && NPC.downedPlantBoss && num18 < 1) + WorldGen.prioritizedTownNPC = 209; + if (WorldGen.prioritizedTownNPC == 0 && NPC.downedPirates && num21 < 1) + WorldGen.prioritizedTownNPC = 229; + if (WorldGen.prioritizedTownNPC == 0 && NPC.downedBoss3 && num9 < 1) + WorldGen.prioritizedTownNPC = 54; + if (WorldGen.prioritizedTownNPC == 0 && NPC.savedStylist && num22 < 1) + WorldGen.prioritizedTownNPC = 353; + if (WorldGen.prioritizedTownNPC == 0 & flag4 && num16 < 1) + WorldGen.prioritizedTownNPC = 207; + if (WorldGen.prioritizedTownNPC == 0 && num26 >= 8 && num19 < 1) + WorldGen.prioritizedTownNPC = 227; + if (WorldGen.prioritizedTownNPC == 0 & flag6 && num26 >= 14 && num17 < 1) + WorldGen.prioritizedTownNPC = 208; + if (WorldGen.prioritizedTownNPC == 0 && NPC.downedFrost && num13 < 1 && Main.xMas) + WorldGen.prioritizedTownNPC = 142; + if (WorldGen.prioritizedTownNPC != 0 || !NPC.savedBartender || num25 >= 1) + return; + WorldGen.prioritizedTownNPC = 550; + } + + public static int DamageVar(float dmg) => (int) Math.Round((double) dmg * (1.0 + (double) Main.rand.Next(-15, 16) * 0.00999999977648258)); + + public static double CalculateDamage(int Damage, int Defense) + { + double num = (double) Damage - (double) Defense * 0.5; + if (num < 1.0) + num = 1.0; + return num; + } + + public static double CalculatePlayerDamage(int Damage, int Defense) + { + double num = (double) Damage - (double) Defense * 0.5; + 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: + Main.PlaySound(SoundID.LiquidsWaterLava, x * 16 + count * 8, y * 16 + count * 8); + break; + case TileChangeType.HoneyWater: + Main.PlaySound(SoundID.LiquidsHoneyWater, x * 16 + count * 8, y * 16 + count * 8); + break; + case TileChangeType.HoneyLava: + Main.PlaySound(SoundID.LiquidsHoneyLava, x * 16 + count * 8, y * 16 + count * 8); + break; + } + } + + public static void PlaySound(int type, Vector2 position, int Style = 1) => Main.PlaySound(type, (int) position.X, (int) position.Y, Style); + + public static void PlaySoundInstance(SoundEffectInstance sound) => sound.Play(); + + public static ActiveSound GetActiveSound(SlotId id) => Main._trackedSounds.Has(id) ? Main._trackedSounds[id] : (ActiveSound) null; + + public static SoundEffectInstance PlaySound( + LegacySoundStyle type, + Vector2 position) + { + return type == null ? (SoundEffectInstance) null : Main.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 : Main.PlaySound(type.SoundId, x, y, type.Style, type.Volume, type.GetRandomPitch()); + } + + public static void StopTrackedSounds() + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) Main._trackedSounds) + ((ActiveSound) trackedSound.Value).Stop(); + Main._trackedSounds.Clear(); + } + + public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position) + { + if (Main.dedServ || style == null || !style.IsTrackable) + return (SlotId) SlotId.Invalid; + if ((double) Vector2.DistanceSquared(Main.screenPosition + new Vector2((float) (Main.screenWidth / 2), (float) (Main.screenHeight / 2)), position) > 100000000.0) + return (SlotId) SlotId.Invalid; + ActiveSound activeSound = new ActiveSound(style, position); + return Main._trackedSounds.Add(activeSound); + } + + public static SlotId PlayTrackedSound(SoundStyle style) + { + if (Main.dedServ || style == null || !style.IsTrackable) + return (SlotId) SlotId.Invalid; + ActiveSound activeSound = new ActiveSound(style); + return Main._trackedSounds.Add(activeSound); + } + + public static 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; + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.screenPosition.X - (double) (Main.screenWidth * 2)), (int) ((double) Main.screenPosition.Y - (double) (Main.screenHeight * 2)), Main.screenWidth * 5, Main.screenHeight * 5); + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle(x, y, 1, 1); + Vector2 vector2 = new Vector2(Main.screenPosition.X + (float) Main.screenWidth * 0.5f, Main.screenPosition.Y + (float) Main.screenHeight * 0.5f); + if (rectangle2.Intersects(rectangle1)) + flag = true; + if (flag) + { + num2 = (float) (((double) x - (double) vector2.X) / ((double) Main.screenWidth * 0.5)); + double num3 = (double) Math.Abs((float) x - vector2.X); + float num4 = Math.Abs((float) y - vector2.Y); + num1 = (float) (1.0 - Math.Sqrt(num3 * num3 + (double) num4 * (double) num4) / ((double) Main.screenWidth * 1.5)); + } + } + 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 num5 = type >= 30 && type <= 35 || type == 39 ? num1 * (Main.ambientVolume * (Main.gameInactive ? 0.0f : 1f)) : num1 * Main.soundVolume; + if ((double) num5 > 1.0) + num5 = 1f; + if ((double) num5 <= 0.0 && (type < 30 || type > 35) && type != 39) + return (SoundEffectInstance) null; + SoundEffectInstance sound = (SoundEffectInstance) null; + switch (type) + { + case 0: + int index2 = Main.rand.Next(3); + Main.soundInstanceDig[index2].Stop(); + Main.soundInstanceDig[index2] = Main.soundDig[index2].CreateInstance(); + Main.soundInstanceDig[index2].Volume = num5; + Main.soundInstanceDig[index2].Pan = num2; + Main.soundInstanceDig[index2].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceDig[index2]; + break; + case 1: + int index3 = Main.rand.Next(3); + Main.soundInstancePlayerHit[index3].Stop(); + Main.soundInstancePlayerHit[index3] = Main.soundPlayerHit[index3].CreateInstance(); + Main.soundInstancePlayerHit[index3].Volume = num5; + Main.soundInstancePlayerHit[index3].Pan = num2; + sound = Main.soundInstancePlayerHit[index3]; + break; + case 2: + if (index1 == 123) + num5 *= 0.5f; + if (index1 == 124 || index1 == 125) + num5 *= 0.65f; + if (index1 == 116) + num5 *= 0.5f; + if (index1 == 1) + { + int num6 = Main.rand.Next(3); + if (num6 == 1) + index1 = 18; + if (num6 == 2) + index1 = 19; + } + else if (index1 == 55 || index1 == 53) + { + num5 *= 0.75f; + if (index1 == 55) + num5 *= 0.75f; + if (Main.soundInstanceItem[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + } + else if (index1 == 37) + num5 *= 0.5f; + if (index1 != 9 && index1 != 10 && index1 != 24 && index1 != 26 && index1 != 34 && index1 != 43 && index1 != 103) + Main.soundInstanceItem[index1].Stop(); + Main.soundInstanceItem[index1] = Main.soundItem[index1].CreateInstance(); + Main.soundInstanceItem[index1].Volume = num5; + Main.soundInstanceItem[index1].Pan = num2; + Main.soundInstanceItem[index1].Pitch = index1 != 47 ? (index1 != 53 ? (index1 != 55 ? (float) Main.rand.Next(-6, 7) * 0.01f : (float) -Main.rand.Next(-20, -11) * 0.02f) : (float) Main.rand.Next(-20, -11) * 0.02f) : (float) Main.rand.Next(-5, 6) * 0.19f; + if (index1 == 26 || index1 == 35) + { + Main.soundInstanceItem[index1].Volume = num5 * 0.75f; + Main.soundInstanceItem[index1].Pitch = Main.harpNote; + } + sound = Main.soundInstanceItem[index1]; + break; + case 3: + if (index1 >= 20 && index1 <= 54) + num5 *= 0.5f; + if (index1 == 57 && Main.soundInstanceNPCHit[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + if (index1 == 57) + num5 *= 0.6f; + if (index1 == 55 || index1 == 56) + num5 *= 0.5f; + Main.soundInstanceNPCHit[index1].Stop(); + Main.soundInstanceNPCHit[index1] = Main.soundNPCHit[index1].CreateInstance(); + Main.soundInstanceNPCHit[index1].Volume = num5; + Main.soundInstanceNPCHit[index1].Pan = num2; + Main.soundInstanceNPCHit[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceNPCHit[index1]; + break; + case 4: + if (index1 >= 23 && index1 <= 57) + num5 *= 0.5f; + if (index1 == 61) + num5 *= 0.6f; + if (index1 == 62) + num5 *= 0.6f; + if (index1 == 10 && Main.soundInstanceNPCKilled[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + Main.soundInstanceNPCKilled[index1] = Main.soundNPCKilled[index1].CreateInstance(); + Main.soundInstanceNPCKilled[index1].Volume = num5; + Main.soundInstanceNPCKilled[index1].Pan = num2; + Main.soundInstanceNPCKilled[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceNPCKilled[index1]; + break; + case 5: + Main.soundInstancePlayerKilled.Stop(); + Main.soundInstancePlayerKilled = Main.soundPlayerKilled.CreateInstance(); + Main.soundInstancePlayerKilled.Volume = num5; + Main.soundInstancePlayerKilled.Pan = num2; + sound = Main.soundInstancePlayerKilled; + break; + case 6: + Main.soundInstanceGrass.Stop(); + Main.soundInstanceGrass = Main.soundGrass.CreateInstance(); + Main.soundInstanceGrass.Volume = num5; + Main.soundInstanceGrass.Pan = num2; + Main.soundInstanceGrass.Pitch = (float) Main.rand.Next(-30, 31) * 0.01f; + sound = Main.soundInstanceGrass; + break; + case 7: + Main.soundInstanceGrab.Stop(); + Main.soundInstanceGrab = Main.soundGrab.CreateInstance(); + Main.soundInstanceGrab.Volume = num5; + Main.soundInstanceGrab.Pan = num2; + Main.soundInstanceGrab.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceGrab; + break; + case 8: + Main.soundInstanceDoorOpen.Stop(); + Main.soundInstanceDoorOpen = Main.soundDoorOpen.CreateInstance(); + Main.soundInstanceDoorOpen.Volume = num5; + Main.soundInstanceDoorOpen.Pan = num2; + Main.soundInstanceDoorOpen.Pitch = (float) Main.rand.Next(-20, 21) * 0.01f; + sound = Main.soundInstanceDoorOpen; + break; + case 9: + Main.soundInstanceDoorClosed.Stop(); + Main.soundInstanceDoorClosed = Main.soundDoorClosed.CreateInstance(); + Main.soundInstanceDoorClosed.Volume = num5; + Main.soundInstanceDoorClosed.Pan = num2; + Main.soundInstanceDoorOpen.Pitch = (float) Main.rand.Next(-20, 21) * 0.01f; + sound = Main.soundInstanceDoorClosed; + break; + case 10: + Main.soundInstanceMenuOpen.Stop(); + Main.soundInstanceMenuOpen = Main.soundMenuOpen.CreateInstance(); + Main.soundInstanceMenuOpen.Volume = num5; + Main.soundInstanceMenuOpen.Pan = num2; + sound = Main.soundInstanceMenuOpen; + break; + case 11: + Main.soundInstanceMenuClose.Stop(); + Main.soundInstanceMenuClose = Main.soundMenuClose.CreateInstance(); + Main.soundInstanceMenuClose.Volume = num5; + Main.soundInstanceMenuClose.Pan = num2; + sound = Main.soundInstanceMenuClose; + break; + case 12: + Main.soundInstanceMenuTick.Stop(); + Main.soundInstanceMenuTick = Main.soundMenuTick.CreateInstance(); + Main.soundInstanceMenuTick.Volume = num5; + Main.soundInstanceMenuTick.Pan = num2; + sound = Main.soundInstanceMenuTick; + break; + case 13: + Main.soundInstanceShatter.Stop(); + Main.soundInstanceShatter = Main.soundShatter.CreateInstance(); + Main.soundInstanceShatter.Volume = num5; + Main.soundInstanceShatter.Pan = num2; + sound = Main.soundInstanceShatter; + break; + case 14: + switch (Style) + { + case 489: + int index4 = Main.rand.Next(21, 24); + Main.soundInstanceZombie[index4] = Main.soundZombie[index4].CreateInstance(); + Main.soundInstanceZombie[index4].Volume = num5 * 0.4f; + Main.soundInstanceZombie[index4].Pan = num2; + sound = Main.soundInstanceZombie[index4]; + break; + case 542: + int index5 = 7; + Main.soundInstanceZombie[index5] = Main.soundZombie[index5].CreateInstance(); + Main.soundInstanceZombie[index5].Volume = num5 * 0.4f; + Main.soundInstanceZombie[index5].Pan = num2; + sound = Main.soundInstanceZombie[index5]; + break; + default: + int index6 = Main.rand.Next(3); + Main.soundInstanceZombie[index6] = Main.soundZombie[index6].CreateInstance(); + Main.soundInstanceZombie[index6].Volume = num5 * 0.4f; + Main.soundInstanceZombie[index6].Pan = num2; + sound = Main.soundInstanceZombie[index6]; + break; + } + break; + case 15: + float num7 = 1f; + if (index1 == 4) + { + index1 = 1; + num7 = 0.25f; + } + if (Main.soundInstanceRoar[index1].State == SoundState.Stopped) + { + Main.soundInstanceRoar[index1] = Main.soundRoar[index1].CreateInstance(); + Main.soundInstanceRoar[index1].Volume = num5 * num7; + Main.soundInstanceRoar[index1].Pan = num2; + sound = Main.soundInstanceRoar[index1]; + break; + } + break; + case 16: + Main.soundInstanceDoubleJump.Stop(); + Main.soundInstanceDoubleJump = Main.soundDoubleJump.CreateInstance(); + Main.soundInstanceDoubleJump.Volume = num5; + Main.soundInstanceDoubleJump.Pan = num2; + Main.soundInstanceDoubleJump.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceDoubleJump; + break; + case 17: + Main.soundInstanceRun.Stop(); + Main.soundInstanceRun = Main.soundRun.CreateInstance(); + Main.soundInstanceRun.Volume = num5; + Main.soundInstanceRun.Pan = num2; + Main.soundInstanceRun.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceRun; + break; + case 18: + Main.soundInstanceCoins = Main.soundCoins.CreateInstance(); + Main.soundInstanceCoins.Volume = num5; + Main.soundInstanceCoins.Pan = num2; + sound = Main.soundInstanceCoins; + break; + case 19: + if (Main.soundInstanceSplash[index1].State == SoundState.Stopped) + { + Main.soundInstanceSplash[index1] = Main.soundSplash[index1].CreateInstance(); + Main.soundInstanceSplash[index1].Volume = num5; + Main.soundInstanceSplash[index1].Pan = num2; + Main.soundInstanceSplash[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceSplash[index1]; + break; + } + break; + case 20: + int index7 = Main.rand.Next(3); + Main.soundInstanceFemaleHit[index7].Stop(); + Main.soundInstanceFemaleHit[index7] = Main.soundFemaleHit[index7].CreateInstance(); + Main.soundInstanceFemaleHit[index7].Volume = num5; + Main.soundInstanceFemaleHit[index7].Pan = num2; + sound = Main.soundInstanceFemaleHit[index7]; + break; + case 21: + int index8 = Main.rand.Next(3); + Main.soundInstanceTink[index8].Stop(); + Main.soundInstanceTink[index8] = Main.soundTink[index8].CreateInstance(); + Main.soundInstanceTink[index8].Volume = num5; + Main.soundInstanceTink[index8].Pan = num2; + sound = Main.soundInstanceTink[index8]; + break; + case 22: + Main.soundInstanceUnlock.Stop(); + Main.soundInstanceUnlock = Main.soundUnlock.CreateInstance(); + Main.soundInstanceUnlock.Volume = num5; + Main.soundInstanceUnlock.Pan = num2; + sound = Main.soundInstanceUnlock; + break; + case 23: + Main.soundInstanceDrown.Stop(); + Main.soundInstanceDrown = Main.soundDrown.CreateInstance(); + Main.soundInstanceDrown.Volume = num5; + Main.soundInstanceDrown.Pan = num2; + sound = Main.soundInstanceDrown; + break; + case 24: + Main.soundInstanceChat = Main.soundChat.CreateInstance(); + Main.soundInstanceChat.Volume = num5; + Main.soundInstanceChat.Pan = num2; + sound = Main.soundInstanceChat; + break; + case 25: + Main.soundInstanceMaxMana = Main.soundMaxMana.CreateInstance(); + Main.soundInstanceMaxMana.Volume = num5; + Main.soundInstanceMaxMana.Pan = num2; + sound = Main.soundInstanceMaxMana; + break; + case 26: + int index9 = Main.rand.Next(3, 5); + Main.soundInstanceZombie[index9] = Main.soundZombie[index9].CreateInstance(); + Main.soundInstanceZombie[index9].Volume = num5 * 0.9f; + Main.soundInstanceZombie[index9].Pan = num2; + Main.soundInstanceZombie[index9].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceZombie[index9]; + break; + case 27: + if (Main.soundInstancePixie.State == SoundState.Playing) + { + Main.soundInstancePixie.Volume = num5; + Main.soundInstancePixie.Pan = num2; + Main.soundInstancePixie.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + return (SoundEffectInstance) null; + } + Main.soundInstancePixie.Stop(); + Main.soundInstancePixie = Main.soundPixie.CreateInstance(); + Main.soundInstancePixie.Volume = num5; + Main.soundInstancePixie.Pan = num2; + Main.soundInstancePixie.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstancePixie; + break; + case 28: + if (Main.soundInstanceMech[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + Main.soundInstanceMech[index1] = Main.soundMech[index1].CreateInstance(); + Main.soundInstanceMech[index1].Volume = num5; + Main.soundInstanceMech[index1].Pan = num2; + Main.soundInstanceMech[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceMech[index1]; + break; + case 29: + if (index1 >= 24 && index1 <= 87) + num5 *= 0.5f; + if (index1 >= 88 && index1 <= 91) + num5 *= 0.7f; + if (index1 >= 93 && index1 <= 99) + num5 *= 0.4f; + if (index1 == 92) + num5 *= 0.5f; + if (index1 == 103) + num5 *= 0.4f; + if (index1 == 104) + num5 *= 0.55f; + if (index1 == 100 || index1 == 101) + num5 *= 0.25f; + if (index1 == 102) + num5 *= 0.4f; + if (Main.soundInstanceZombie[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + Main.soundInstanceZombie[index1] = Main.soundZombie[index1].CreateInstance(); + Main.soundInstanceZombie[index1].Volume = num5; + Main.soundInstanceZombie[index1].Pan = num2; + Main.soundInstanceZombie[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceZombie[index1]; + break; + case 30: + int index10 = Main.rand.Next(10, 12); + if (Main.rand.Next(300) == 0) + { + index10 = 12; + if (Main.soundInstanceZombie[index10].State == SoundState.Playing) + return (SoundEffectInstance) null; + } + Main.soundInstanceZombie[index10] = Main.soundZombie[index10].CreateInstance(); + Main.soundInstanceZombie[index10].Volume = num5 * 0.75f; + Main.soundInstanceZombie[index10].Pan = num2; + Main.soundInstanceZombie[index10].Pitch = index10 == 12 ? (float) Main.rand.Next(-40, 21) * 0.01f : (float) Main.rand.Next(-70, 1) * 0.01f; + sound = Main.soundInstanceZombie[index10]; + break; + case 31: + int index11 = 13; + Main.soundInstanceZombie[index11] = Main.soundZombie[index11].CreateInstance(); + Main.soundInstanceZombie[index11].Volume = num5 * 0.35f; + Main.soundInstanceZombie[index11].Pan = num2; + Main.soundInstanceZombie[index11].Pitch = (float) Main.rand.Next(-40, 21) * 0.01f; + sound = Main.soundInstanceZombie[index11]; + break; + case 32: + if (Main.soundInstanceZombie[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + Main.soundInstanceZombie[index1] = Main.soundZombie[index1].CreateInstance(); + Main.soundInstanceZombie[index1].Volume = num5 * 0.15f; + Main.soundInstanceZombie[index1].Pan = num2; + Main.soundInstanceZombie[index1].Pitch = (float) Main.rand.Next(-70, 26) * 0.01f; + sound = Main.soundInstanceZombie[index1]; + break; + case 33: + int index12 = 15; + if (Main.soundInstanceZombie[index12].State == SoundState.Playing) + return (SoundEffectInstance) null; + Main.soundInstanceZombie[index12] = Main.soundZombie[index12].CreateInstance(); + Main.soundInstanceZombie[index12].Volume = num5 * 0.2f; + Main.soundInstanceZombie[index12].Pan = num2; + Main.soundInstanceZombie[index12].Pitch = (float) Main.rand.Next(-10, 31) * 0.01f; + sound = Main.soundInstanceZombie[index12]; + break; + case 34: + float num8 = (float) index1 / 50f; + if ((double) num8 > 1.0) + num8 = 1f; + float num9 = num5 * num8 * 0.2f; + if ((double) num9 <= 0.0 || x == -1 || y == -1) + { + if (Main.soundInstanceLiquid[0].State == SoundState.Playing) + { + Main.soundInstanceLiquid[0].Stop(); + break; + } + break; + } + if (Main.soundInstanceLiquid[0].State == SoundState.Playing) + { + Main.soundInstanceLiquid[0].Volume = num9; + Main.soundInstanceLiquid[0].Pan = num2; + Main.soundInstanceLiquid[0].Pitch = -0.2f; + break; + } + Main.soundInstanceLiquid[0] = Main.soundLiquid[0].CreateInstance(); + Main.soundInstanceLiquid[0].Volume = num9; + Main.soundInstanceLiquid[0].Pan = num2; + sound = Main.soundInstanceLiquid[0]; + break; + case 35: + float num10 = (float) index1 / 50f; + if ((double) num10 > 1.0) + num10 = 1f; + float num11 = num5 * num10 * 0.65f; + if ((double) num11 <= 0.0 || x == -1 || y == -1) + { + if (Main.soundInstanceLiquid[1].State == SoundState.Playing) + { + Main.soundInstanceLiquid[1].Stop(); + break; + } + break; + } + if (Main.soundInstanceLiquid[1].State == SoundState.Playing) + { + Main.soundInstanceLiquid[1].Volume = num11; + Main.soundInstanceLiquid[1].Pan = num2; + Main.soundInstanceLiquid[1].Pitch = -0.0f; + break; + } + Main.soundInstanceLiquid[1] = Main.soundLiquid[1].CreateInstance(); + Main.soundInstanceLiquid[1].Volume = num11; + Main.soundInstanceLiquid[1].Pan = num2; + sound = Main.soundInstanceLiquid[1]; + break; + case 36: + int index13 = Style; + if (Style == -1) + index13 = 0; + Main.soundInstanceRoar[index13] = Main.soundRoar[index13].CreateInstance(); + Main.soundInstanceRoar[index13].Volume = num5; + Main.soundInstanceRoar[index13].Pan = num2; + if (Style == -1) + Main.soundInstanceRoar[index13].Pitch += 0.6f; + sound = Main.soundInstanceRoar[index13]; + break; + case 37: + int index14 = Main.rand.Next(57, 59); + float num12 = num5 * ((float) Style * 0.05f); + Main.soundInstanceItem[index14] = Main.soundItem[index14].CreateInstance(); + Main.soundInstanceItem[index14].Volume = num12; + Main.soundInstanceItem[index14].Pan = num2; + Main.soundInstanceItem[index14].Pitch = (float) Main.rand.Next(-40, 41) * 0.01f; + sound = Main.soundInstanceItem[index14]; + break; + case 38: + int index15 = Main.rand.Next(5); + Main.soundInstanceCoin[index15] = Main.soundCoin[index15].CreateInstance(); + Main.soundInstanceCoin[index15].Volume = num5; + Main.soundInstanceCoin[index15].Pan = num2; + Main.soundInstanceCoin[index15].Pitch = (float) Main.rand.Next(-40, 41) * (1f / 500f); + sound = Main.soundInstanceCoin[index15]; + break; + case 39: + int index16 = Style; + Main.soundInstanceDrip[index16] = Main.soundDrip[index16].CreateInstance(); + Main.soundInstanceDrip[index16].Volume = num5 * 0.5f; + Main.soundInstanceDrip[index16].Pan = num2; + Main.soundInstanceDrip[index16].Pitch = (float) Main.rand.Next(-30, 31) * 0.01f; + sound = Main.soundInstanceDrip[index16]; + break; + case 40: + Main.soundInstanceCamera.Stop(); + Main.soundInstanceCamera = Main.soundCamera.CreateInstance(); + Main.soundInstanceCamera.Volume = num5; + Main.soundInstanceCamera.Pan = num2; + sound = Main.soundInstanceCamera; + break; + case 41: + Main.soundInstanceMoonlordCry = Main.soundNPCKilled[10].CreateInstance(); + Main.soundInstanceMoonlordCry.Volume = (float) (1.0 / (1.0 + (double) (new Vector2((float) x, (float) y) - Main.player[Main.myPlayer].position).Length())); + Main.soundInstanceMoonlordCry.Pan = num2; + Main.soundInstanceMoonlordCry.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = Main.soundInstanceMoonlordCry; + break; + case 42: + sound = Main.trackableSounds[index1].CreateInstance(); + sound.Volume = num5; + sound.Pan = num2; + Main.trackableSoundInstances[index1] = sound; + break; + } + if (sound != null) + { + sound.Pitch += pitchOffset; + sound.Volume *= volumeScale; + Main.PlaySoundInstance(sound); + } + return sound; + } + } + catch + { + } + return (SoundEffectInstance) null; + } + + 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(); + Main.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(); + Main.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) + { + if (Main.graphics.IsFullScreen != fullscreen) + Main.graphics.ToggleFullScreen(); + 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; + if (!Main.instance.IsActive && (Main.screenBorderless || Main.screenMaximized || Main.graphics.IsFullScreen)) + return; + bool flag2 = false; + int num1; + int num2; + if (Main.screenBorderless || Main.screenMaximized || Main.graphics.IsFullScreen) + { + form.MinimumSize = new Size(0, 0); + if (Main.screenBorderless && !Main.graphics.IsFullScreen && Main.screenBorderlessPendingResizes > 0) + { + --Main.screenBorderlessPendingResizes; + System.Drawing.Rectangle bounds = Screen.FromPoint(form.Location).Bounds; + width = bounds.Width; + height = bounds.Height; + } + 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); + } + 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 + { + 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 viewport1 = Main.graphics.GraphicsDevice.Viewport; + num1 = viewport1.Width; + viewport1 = Main.graphics.GraphicsDevice.Viewport; + num2 = viewport1.Height; + int preferredBackBufferWidth = Main.graphics.PreferredBackBufferWidth; + Viewport viewport2 = Main.graphics.GraphicsDevice.Viewport; + int width1 = viewport2.Width; + int num7; + if (preferredBackBufferWidth == width1) + { + int backBufferHeight = Main.graphics.PreferredBackBufferHeight; + viewport2 = Main.graphics.GraphicsDevice.Viewport; + int height1 = viewport2.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 (((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) + { + form.SendToBack(); + form.BringToFront(); + if (Main.screenBorderless) + { + if (Main.screenBorderlessPendingResizes > 0) + { + --Main.screenBorderlessPendingResizes; + System.Drawing.Rectangle bounds = Screen.FromPoint(form.Location).Bounds; + form.Location = new System.Drawing.Point(bounds.X, bounds.Y); + form.Width = bounds.Width; + form.Height = bounds.Height; + form.FormBorderStyle = FormBorderStyle.None; + } + } + else + form.FormBorderStyle = FormBorderStyle.Sizable; + } + Lighting.Initialize(true); + if (!Main.drawToScreen) + Main.instance.InitTargets(); + UserInterface.ActiveInstance.Recalculate(); + Console.WriteLine(Language.GetTextValue("Misc.ResolutionChanged", (object) width, (object) height)); + } + if (Main.graphics.SynchronizeWithVerticalRetrace) + return; + Main.graphics.SynchronizeWithVerticalRetrace = true; + Main.graphics.ApplyChanges(); + } + + public static void FixUIScale() => Main.UIScale = Main.UIScaleWanted; + + public void UpdateDisplaySettings() + { + Viewport viewport = this.GraphicsDevice.Viewport; + int width = viewport.Width; + viewport = this.GraphicsDevice.Viewport; + int height = viewport.Height; + Main.SetResolution(width, height); + } + + public static void OpenPlayerSelect(Main.OnPlayerSelected method) + { + if (Main.gameMenu && (Main.menuMode == 10 || Main.menuMode == 14)) + 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 delegate void OnPlayerSelected(PlayerFileData player); + } +} diff --git a/Map/MapHelper.cs b/Map/MapHelper.cs new file mode 100644 index 0000000..7ba1d87 --- /dev/null +++ b/Map/MapHelper.cs @@ -0,0 +1,2284 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapHelper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 bool saveLock = false; + private static object padlock = 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 void Initialize() + { + Color[][] colorArray1 = new Color[470][]; + for (int index = 0; index < 470; ++index) + colorArray1[index] = new Color[12]; + Color color1 = new Color(151, 107, 75); + colorArray1[0][0] = color1; + colorArray1[5][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[2][0] = new Color(28, 216, 94); + 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; + color1 = new Color(185, 164, 23); + colorArray1[8][0] = color1; + colorArray1[45][0] = color1; + color1 = new Color(185, 194, 195); + colorArray1[9][0] = color1; + colorArray1[46][0] = 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[43][0] = new Color(84, 100, 63); + colorArray1[44][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[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; + color1 = new Color(73, 120, 17); + colorArray1[80][0] = color1; + colorArray1[188][0] = color1; + 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[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[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[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[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[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; + color1 = new Color(191, 142, 111); + colorArray1[14][0] = color1; + colorArray1[469][0] = color1; + colorArray1[15][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[377][0] = color1; + colorArray1[380][0] = color1; + colorArray1[395][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[349][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[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[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[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; + color1 = new Color(72, 145, 125); + 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[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); + 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); + color1 = new Color(99, 99, 99); + colorArray1[185][0] = color1; + colorArray1[186][0] = color1; + colorArray1[187][0] = color1; + color1 = new Color(114, 81, 56); + colorArray1[185][1] = color1; + colorArray1[186][1] = color1; + colorArray1[187][1] = 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; + 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((int) byte.MaxValue, 222, 100); + 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[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[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[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[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[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(140, 84, 60); + 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[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[410][0] = new Color(75, 139, 166); + 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[468][0] = colorArray1[467][0]; + colorArray1[468][1] = colorArray1[467][1]; + Color[] colorArray2 = new Color[3] + { + new Color(9, 61, 191), + new Color(253, 32, 3), + new Color(254, 194, 20) + }; + Color[][] colorArray3 = new Color[231][]; + for (int index = 0; index < 231; ++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[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[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[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[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); + Color[] colorArray4 = new Color[256]; + Color color2 = new Color(50, 40, (int) byte.MaxValue); + Color color3 = 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) color2.R * (double) num2 + (double) color3.R * (double) num1), (int) (byte) ((double) color2.G * (double) num2 + (double) color3.G * (double) num1), (int) (byte) ((double) color2.B * (double) num2 + (double) color3.B * (double) num1)); + } + Color[] colorArray5 = new Color[256]; + Color color4 = new Color(88, 61, 46); + Color color5 = 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) color4.R * (double) num4 + (double) color5.R * (double) num3), (int) (byte) ((double) color4.G * (double) num4 + (double) color5.G * (double) num3), (int) (byte) ((double) color4.B * (double) num4 + (double) color5.B * (double) num3)); + } + Color[] colorArray6 = new Color[256]; + Color color6 = new Color(74, 67, 60); + color5 = 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) color6.R * (double) num6 + (double) color5.R * (double) num5), (int) (byte) ((double) color6.G * (double) num6 + (double) color5.G * (double) num5), (int) (byte) ((double) color6.B * (double) num6 + (double) color5.B * (double) num5)); + } + Color color7 = new Color(50, 44, 38); + int num7 = 0; + MapHelper.tileOptionCounts = new int[470]; + for (int index1 = 0; index1 < 470; ++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[231]; + for (int index3 = 0; index3 < 231; ++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[470]; + for (int index5 = 0; index5 < 470; ++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[231]; + MapHelper.wallRangeStart = num8; + for (int index7 = 0; index7 < 231; ++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] = color7; + 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 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; + 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) + 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 tile = Main.tile[i, j] ?? (Main.tile[i, j] = new Tile()); + int num1 = 0; + int num2 = (int) Light; + ushort type1 = Main.Map[i, j].Type; + int num3 = 0; + int num4 = 0; + if (tile.active()) + { + int type2 = (int) tile.type; + num3 = (int) MapHelper.tileLookup[type2]; + if (type2 == 51 && (i + j) % 2 == 0) + num3 = 0; + if (num3 != 0) + { + num1 = type2 != 160 ? (int) tile.color() : 0; + switch (type2) + { + case 4: + if (tile.frameX < (short) 66) + ; + num4 = 0; + break; + case 21: + case 441: + switch ((int) tile.frameX / 36) + { + case 1: + case 2: + case 10: + case 13: + case 15: + num4 = 1; + break; + case 3: + case 4: + num4 = 2; + break; + case 6: + num4 = 3; + break; + case 11: + case 17: + num4 = 4; + break; + default: + num4 = 0; + break; + } + break; + case 26: + num4 = tile.frameX < (short) 54 ? 0 : 1; + break; + case 27: + num4 = tile.frameY >= (short) 34 ? 0 : 1; + break; + case 28: + num4 = tile.frameY >= (short) 144 ? (tile.frameY >= (short) 252 ? (tile.frameY < (short) 360 || tile.frameY > (short) 900 && tile.frameY < (short) 1008 ? 2 : (tile.frameY >= (short) 468 ? (tile.frameY >= (short) 576 ? (tile.frameY >= (short) 684 ? (tile.frameY >= (short) 792 ? (tile.frameY >= (short) 898 ? (tile.frameY >= (short) 1006 ? (tile.frameY >= (short) 1114 ? (tile.frameY >= (short) 1222 ? 7 : 3) : 0) : 7) : 8) : 6) : 5) : 4) : 3)) : 1) : 0; + break; + case 31: + num4 = tile.frameX < (short) 36 ? 0 : 1; + break; + case 82: + case 83: + case 84: + num4 = tile.frameX >= (short) 18 ? (tile.frameX >= (short) 36 ? (tile.frameX >= (short) 54 ? (tile.frameX >= (short) 72 ? (tile.frameX >= (short) 90 ? (tile.frameX >= (short) 108 ? 6 : 5) : 4) : 3) : 2) : 1) : 0; + break; + case 105: + num4 = tile.frameX < (short) 1548 || tile.frameX > (short) 1654 ? (tile.frameX < (short) 1656 || tile.frameX > (short) 1798 ? 0 : 2) : 1; + break; + case 133: + num4 = tile.frameX >= (short) 52 ? 1 : 0; + break; + case 134: + num4 = tile.frameX >= (short) 28 ? 1 : 0; + break; + case 137: + num4 = tile.frameY != (short) 0 ? 1 : 0; + break; + case 149: + num4 = j % 3; + break; + case 160: + num4 = j % 3; + break; + case 165: + num4 = tile.frameX >= (short) 54 ? (tile.frameX >= (short) 106 ? (tile.frameX < (short) 216 ? (tile.frameX >= (short) 162 ? 3 : 2) : 1) : 1) : 0; + break; + case 178: + num4 = tile.frameX >= (short) 18 ? (tile.frameX >= (short) 36 ? (tile.frameX >= (short) 54 ? (tile.frameX >= (short) 72 ? (tile.frameX >= (short) 90 ? (tile.frameX >= (short) 108 ? 6 : 5) : 4) : 3) : 2) : 1) : 0; + break; + case 184: + num4 = tile.frameX >= (short) 22 ? (tile.frameX >= (short) 44 ? (tile.frameX >= (short) 66 ? (tile.frameX >= (short) 88 ? (tile.frameX >= (short) 110 ? 5 : 4) : 3) : 2) : 1) : 0; + break; + case 185: + if (tile.frameY < (short) 18) + { + int num5 = (int) tile.frameX / 18; + if (num5 < 6 || num5 == 28 || num5 == 29 || num5 == 30 || num5 == 31 || num5 == 32) + { + num4 = 0; + break; + } + if (num5 < 12 || num5 == 33 || num5 == 34 || num5 == 35) + { + num4 = 1; + break; + } + if (num5 < 28) + { + num4 = 2; + break; + } + if (num5 < 48) + { + num4 = 3; + break; + } + if (num5 < 54) + { + num4 = 4; + break; + } + break; + } + int num6 = (int) tile.frameX / 36; + if (num6 < 6 || num6 == 19 || num6 == 20 || num6 == 21 || num6 == 22 || num6 == 23 || num6 == 24 || num6 == 33 || num6 == 38 || num6 == 39 || num6 == 40) + { + num4 = 0; + break; + } + if (num6 < 16) + { + num4 = 2; + break; + } + if (num6 < 19 || num6 == 31 || num6 == 32) + { + num4 = 1; + break; + } + if (num6 < 31) + { + num4 = 3; + break; + } + if (num6 < 38) + { + num4 = 4; + break; + } + break; + case 186: + int num7 = (int) tile.frameX / 54; + if (num7 < 7) + { + num4 = 2; + break; + } + if (num7 < 22 || num7 == 33 || num7 == 34 || num7 == 35) + { + num4 = 0; + break; + } + if (num7 < 25) + { + num4 = 1; + break; + } + if (num7 == 25) + { + num4 = 5; + break; + } + if (num7 < 32) + { + num4 = 3; + break; + } + break; + case 187: + int num8 = (int) tile.frameX / 54; + if (num8 < 3 || num8 == 14 || num8 == 15 || num8 == 16) + { + num4 = 0; + break; + } + if (num8 < 6) + { + num4 = 6; + break; + } + if (num8 < 9) + { + num4 = 7; + break; + } + if (num8 < 14) + { + num4 = 4; + break; + } + if (num8 < 18) + { + num4 = 4; + break; + } + if (num8 < 23) + { + num4 = 8; + break; + } + if (num8 < 25) + { + num4 = 0; + break; + } + if (num8 < 29) + { + num4 = 1; + break; + } + break; + case 227: + num4 = (int) tile.frameX / 34; + break; + case 240: + int num9 = (int) tile.frameX / 54 + (int) tile.frameY / 54 * 36; + if (num9 >= 0 && num9 <= 11 || num9 >= 47 && num9 <= 53) + { + num4 = 0; + break; + } + if (num9 >= 12 && num9 <= 15) + { + num4 = 1; + break; + } + if (num9 == 16 || num9 == 17) + { + num4 = 2; + break; + } + if (num9 >= 18 && num9 <= 35) + { + num4 = 1; + break; + } + if (num9 >= 41 && num9 <= 45) + { + num4 = 3; + break; + } + if (num9 == 46) + { + num4 = 4; + break; + } + break; + case 242: + switch ((int) tile.frameY / 72) + { + case 22: + case 23: + case 24: + num4 = 1; + break; + default: + num4 = 0; + break; + } + break; + case 419: + int num10 = (int) tile.frameX / 18; + if (num10 > 2) + num10 = 2; + num4 = num10; + break; + case 420: + int num11 = (int) tile.frameY / 18; + if (num11 > 5) + num11 = 5; + num4 = num11; + break; + case 423: + int num12 = (int) tile.frameY / 18; + if (num12 > 6) + num12 = 6; + num4 = num12; + break; + case 428: + int num13 = (int) tile.frameY / 18; + if (num13 > 3) + num13 = 3; + num4 = num13; + break; + case 440: + int num14 = (int) tile.frameX / 54; + if (num14 > 6) + num14 = 6; + num4 = num14; + break; + case 453: + int num15 = (int) tile.frameX / 36; + if (num15 > 2) + num15 = 2; + num4 = num15; + break; + case 457: + int num16 = (int) tile.frameX / 36; + if (num16 > 4) + num16 = 4; + num4 = num16; + break; + case 467: + case 468: + switch ((int) tile.frameX / 36) + { + case 0: + num4 = 0; + break; + case 1: + num4 = 1; + break; + default: + num4 = 0; + break; + } + break; + default: + num4 = 0; + break; + } + } + } + if (num3 == 0) + { + if (tile.liquid > (byte) 32) + { + int num17 = (int) tile.liquidType(); + num3 = (int) MapHelper.liquidPosition + num17; + } + else if (tile.wall > (byte) 0) + { + int wall = (int) tile.wall; + num3 = (int) MapHelper.wallLookup[wall]; + num1 = (int) tile.wallColor(); + switch (wall) + { + case 21: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 168: + num1 = 0; + break; + case 27: + num4 = i % 2; + break; + default: + num4 = 0; + break; + } + } + } + if (num3 == 0) + { + if ((double) j < Main.worldSurface) + { + int num18 = (int) (byte) ((double) byte.MaxValue * ((double) j / Main.worldSurface)); + num3 = (int) MapHelper.skyPosition + num18; + num2 = (int) byte.MaxValue; + num1 = 0; + } + else if (j < Main.maxTilesY - 200) + { + num1 = 0; + bool flag = (int) type1 < (int) MapHelper.dirtPosition || (int) type1 >= (int) MapHelper.hellPosition; + byte num19 = 0; + float num20 = (float) ((double) Main.screenPosition.X / 16.0 - 5.0); + float num21 = (float) (((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0 + 5.0); + float num22 = (float) ((double) Main.screenPosition.Y / 16.0 - 5.0); + float num23 = (float) (((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0 + 5.0); + if ((((double) i >= (double) num20 && (double) i <= (double) num21 && (double) j >= (double) num22 && (double) j <= (double) num23 || i <= 40 || i >= Main.maxTilesX - 40 || j <= 40 ? 0 : (j < Main.maxTilesY - 40 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + for (int index1 = i - 36; index1 <= i + 30; index1 += 10) + { + for (int index2 = j - 36; index2 <= j + 30; index2 += 10) + { + for (int index3 = 0; index3 < MapHelper.snowTypes.Length; ++index3) + { + if ((int) MapHelper.snowTypes[index3] == (int) type1) + { + num19 = byte.MaxValue; + index1 = i + 31; + index2 = j + 31; + break; + } + } + } + } + } + else + { + float num24 = (float) Main.snowTiles / 1000f * (float) byte.MaxValue; + if ((double) num24 > (double) byte.MaxValue) + num24 = (float) byte.MaxValue; + num19 = (byte) num24; + } + num3 = (double) j >= Main.rockLayer ? (int) MapHelper.rockPosition + (int) num19 : (int) MapHelper.dirtPosition + (int) num19; + } + else + num3 = (int) MapHelper.hellPosition; + } + return MapTile.Create((ushort) (num3 + num4), (byte) num2, (byte) num1); + } + + public static void SaveMap() + { + bool isCloudSave = Main.ActivePlayerFileData.IsCloudSave; + if (isCloudSave && SocialAPI.Cloud == null || !Main.mapEnabled || MapHelper.saveLock) + return; + string path1 = Main.playerPathName.Substring(0, Main.playerPathName.Length - 4); + lock (MapHelper.padlock) + { + try + { + MapHelper.saveLock = true; + try + { + if (!isCloudSave) + Directory.CreateDirectory(path1); + } + catch + { + } + string str = path1 + Path.DirectorySeparatorChar.ToString(); + string path2 = !Main.ActiveWorldFileData.UseGuidAsMapName ? str + (object) Main.worldID + ".map" : str + Main.ActiveWorldFileData.UniqueId.ToString() + ".map"; + new Stopwatch().Start(); + bool flag1 = false; + if (!Main.gameMenu) + flag1 = 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(194); + Main.MapFileMetadata.IncrementAndWrite(writer); + writer.Write(Main.worldName); + writer.Write(Main.worldID); + writer.Write(Main.maxTilesY); + writer.Write(Main.maxTilesX); + writer.Write((short) 470); + writer.Write((short) 231); + 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 < 470; ++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 < 231; ++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 < 470; ++index2) + { + if (MapHelper.tileOptionCounts[index2] != 1) + writer.Write((byte) MapHelper.tileOptionCounts[index2]); + } + for (int index3 = 0; index3 < 231; ++index3) + { + if (MapHelper.wallOptionCounts[index3] != 1) + writer.Write((byte) MapHelper.wallOptionCounts[index3]); + } + writer.Flush(); + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (!flag1) + { + 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 flag2 = true; + bool flag3 = true; + int num9 = 0; + int num10 = 0; + byte num11 = 0; + int num12; + ushort num13; + int num14; + if (mapTile.Light <= (byte) 18) + { + flag3 = false; + flag2 = 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); + flag2 = false; + } + else if ((int) num13 < (int) MapHelper.dirtPosition) + { + num12 = 6; + flag3 = false; + flag2 = 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; + flag2 = false; + } + if (mapTile.Light == byte.MaxValue) + flag3 = false; + if (flag3) + { + 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 (flag2 && num13 > (ushort) byte.MaxValue) + num17 |= (byte) 16; + if (flag3) + 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 (flag2) + { + buffer[count] = (byte) num13; + ++count; + if (num13 > (ushort) byte.MaxValue) + { + buffer[count] = (byte) ((uint) num13 >> 8); + ++count; + } + } + if (flag3) + { + 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(path2, memoryStream.ToArray(), isCloudSave); + } + } + } + } + catch (Exception ex) + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + } + MapHelper.saveLock = 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.maxTilesY - 200) + { + 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.maxTilesY - 200) + { + 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.maxTilesY - 200) + { + 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 < 470; ++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 < 231; ++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/MapTile.cs b/Map/MapTile.cs new file mode 100644 index 0000000..2d82ab4 --- /dev/null +++ b/Map/MapTile.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapTile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/WorldMap.cs b/Map/WorldMap.cs new file mode 100644 index 0000000..7a7f5b8 --- /dev/null +++ b/Map/WorldMap.cs @@ -0,0 +1,129 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.WorldMap +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + 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]; + 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() + { + 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 + Main.ActiveWorldFileData.UniqueId.ToString() + ".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 > 194) + return; + if (release <= 91) + MapHelper.LoadMapVersion1(fileIO, release); + else + MapHelper.LoadMapVersion2(fileIO, release); + 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(); + } + } + } +} diff --git a/MessageBuffer.cs b/MessageBuffer.cs new file mode 100644 index 0000000..0795f34 --- /dev/null +++ b/MessageBuffer.cs @@ -0,0 +1,2569 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.MessageBuffer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Net; +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 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) 120) + return; + ++Main.rxMsg; + Main.rxData += length; + ++Main.rxMsgType[(int) num1]; + Main.rxDataType[(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.SendData(2, this.whoAmI, text: Lang.mp[1].ToNetworkText()); + } + else + { + if (Main.netMode == 2 && 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 (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.SendData(2, this.whoAmI, text: Lang.mp[3].ToNetworkText()); + break; + } + if (Netplay.Clients[this.whoAmI].State != 0) + break; + if (this.reader.ReadString() == "Terraria" + (object) 194) + { + if (string.IsNullOrEmpty(Netplay.ServerPassword)) + { + Netplay.Clients[this.whoAmI].State = 1; + NetMessage.SendData(3, this.whoAmI); + break; + } + Netplay.Clients[this.whoAmI].State = -1; + NetMessage.SendData(37, this.whoAmI); + break; + } + NetMessage.SendData(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.SendData(4, number: number1); + NetMessage.SendData(68, number: number1); + NetMessage.SendData(16, number: number1); + NetMessage.SendData(42, number: number1); + NetMessage.SendData(50, number: number1); + for (int index = 0; index < 59; ++index) + NetMessage.SendData(5, number: number1, number2: ((float) index), number3: ((float) player1.inventory[index].prefix)); + for (int index = 0; index < player1.armor.Length; ++index) + NetMessage.SendData(5, number: number1, number2: ((float) (59 + index)), number3: ((float) player1.armor[index].prefix)); + for (int index = 0; index < player1.dye.Length; ++index) + NetMessage.SendData(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.SendData(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.SendData(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.SendData(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.SendData(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.SendData(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.SendData(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)); + NetMessage.SendData(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, 9f); + player2.hair = (int) this.reader.ReadByte(); + if (player2.hair >= 134) + 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.hideVisual[key] = bitsByte1[key]; + bitsByte1 = (BitsByte) this.reader.ReadByte(); + for (int key = 0; key < 2; ++key) + player2.hideVisual[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; + if (bitsByte2[1]) + player2.difficulty += (byte) 2; + if (player2.difficulty > (byte) 2) + player2.difficulty = (byte) 2; + player2.extraAccessory = bitsByte2[2]; + 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.SendData(2, this.whoAmI, text: NetworkText.FromFormattable("{0} {1}", (object) player2.name, (object) Lang.mp[5].ToNetworkText())); + break; + } + if (player2.name.Length > Player.nameLen) + { + NetMessage.SendData(2, this.whoAmI, text: NetworkText.FromKey("Net.NameTooLong")); + break; + } + if (player2.name == "") + { + NetMessage.SendData(2, this.whoAmI, text: NetworkText.FromKey("Net.EmptyName")); + break; + } + Netplay.Clients[this.whoAmI].Name = player2.name; + Netplay.Clients[this.whoAmI].Name = player2.name; + NetMessage.SendData(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].IsStackingItems()) + break; + Player player3 = Main.player[number3]; + lock (player3) + { + int index1 = (int) this.reader.ReadByte(); + int num4 = (int) this.reader.ReadInt16(); + int pre = (int) this.reader.ReadByte(); + int type1 = (int) this.reader.ReadInt16(); + Item[] objArray = (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 + 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; + objArray = player3.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; + objArray = player3.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; + objArray = player3.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; + objArray = player3.miscDyes; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length) - 1; + objArray = player3.miscEquips; + } + else if (index1 > 58 + player3.armor.Length) + { + index2 = index1 - 58 - player3.armor.Length - 1; + objArray = player3.dye; + } + else if (index1 > 58) + { + index2 = index1 - 58 - 1; + objArray = player3.armor; + } + else + { + index2 = index1; + objArray = player3.inventory; + } + if (flag2) + { + player3.trashItem = new Item(); + player3.trashItem.netDefaults(type1); + player3.trashItem.stack = num4; + player3.trashItem.Prefix(pre); + } + else if (index1 <= 58) + { + int type2 = objArray[index2].type; + int stack = objArray[index2].stack; + objArray[index2] = new Item(); + objArray[index2].netDefaults(type1); + objArray[index2].stack = num4; + objArray[index2].Prefix(pre); + if (number3 == Main.myPlayer && index2 == 58) + Main.mouseItem = objArray[index2].Clone(); + if (number3 == Main.myPlayer && Main.netMode == 1) + { + Main.player[number3].inventoryChestStack[index1] = false; + if (objArray[index2].stack != stack || objArray[index2].type != type2) + { + Recipe.FindRecipes(); + Main.PlaySound(7); + } + } + } + else + { + objArray[index2] = new Item(); + objArray[index2].netDefaults(type1); + objArray[index2].stack = num4; + objArray[index2].Prefix(pre); + } + if (Main.netMode != 2 || number3 != this.whoAmI || index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length) + break; + NetMessage.SendData(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.SendData(7, this.whoAmI); + Main.SyncAnInvasion(this.whoAmI); + break; + case 7: + if (Main.netMode != 1) + break; + Main.time = (double) this.reader.ReadInt32(); + BitsByte bitsByte3 = (BitsByte) this.reader.ReadByte(); + Main.dayTime = bitsByte3[0]; + Main.bloodMoon = bitsByte3[1]; + Main.eclipse = bitsByte3[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.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(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()); + Main.iceBackStyle = (int) this.reader.ReadByte(); + Main.jungleBackStyle = (int) this.reader.ReadByte(); + Main.hellBackStyle = (int) this.reader.ReadByte(); + Main.windSpeedSet = 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(); + Main.maxRaining = this.reader.ReadSingle(); + Main.raining = (double) Main.maxRaining > 0.0; + BitsByte bitsByte4 = (BitsByte) this.reader.ReadByte(); + WorldGen.shadowOrbSmashed = bitsByte4[0]; + NPC.downedBoss1 = bitsByte4[1]; + NPC.downedBoss2 = bitsByte4[2]; + NPC.downedBoss3 = bitsByte4[3]; + Main.hardMode = bitsByte4[4]; + NPC.downedClown = bitsByte4[5]; + Main.ServerSideCharacter = bitsByte4[6]; + NPC.downedPlantBoss = bitsByte4[7]; + BitsByte bitsByte5 = (BitsByte) this.reader.ReadByte(); + NPC.downedMechBoss1 = bitsByte5[0]; + NPC.downedMechBoss2 = bitsByte5[1]; + NPC.downedMechBoss3 = bitsByte5[2]; + NPC.downedMechBossAny = bitsByte5[3]; + Main.cloudBGActive = bitsByte5[4] ? 1f : 0.0f; + WorldGen.crimson = bitsByte5[5]; + Main.pumpkinMoon = bitsByte5[6]; + Main.snowMoon = bitsByte5[7]; + BitsByte bitsByte6 = (BitsByte) this.reader.ReadByte(); + Main.expertMode = bitsByte6[0]; + Main.fastForwardTime = bitsByte6[1]; + Main.UpdateSundial(); + int num5 = bitsByte6[2] ? 1 : 0; + NPC.downedSlimeKing = bitsByte6[3]; + NPC.downedQueenBee = bitsByte6[4]; + NPC.downedFishron = bitsByte6[5]; + NPC.downedMartians = bitsByte6[6]; + NPC.downedAncientCultist = bitsByte6[7]; + BitsByte bitsByte7 = (BitsByte) this.reader.ReadByte(); + NPC.downedMoonlord = bitsByte7[0]; + NPC.downedHalloweenKing = bitsByte7[1]; + NPC.downedHalloweenTree = bitsByte7[2]; + NPC.downedChristmasIceQueen = bitsByte7[3]; + NPC.downedChristmasSantank = bitsByte7[4]; + NPC.downedChristmasTree = bitsByte7[5]; + NPC.downedGolemBoss = bitsByte7[6]; + BirthdayParty.ManualParty = bitsByte7[7]; + BitsByte bitsByte8 = (BitsByte) this.reader.ReadByte(); + NPC.downedPirates = bitsByte8[0]; + NPC.downedFrost = bitsByte8[1]; + NPC.downedGoblins = bitsByte8[2]; + Sandstorm.Happening = bitsByte8[3]; + DD2Event.Ongoing = bitsByte8[4]; + DD2Event.DownedInvasionT1 = bitsByte8[5]; + DD2Event.DownedInvasionT2 = bitsByte8[6]; + DD2Event.DownedInvasionT3 = bitsByte8[7]; + 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) + break; + Netplay.Connection.State = 4; + 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.SendData(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.SendData(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.SendData(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.SendData(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.SendData(21, this.whoAmI, number: number6); + NetMessage.SendData(22, this.whoAmI, number: number6); + } + } + for (int number7 = 0; number7 < 200; ++number7) + { + if (Main.npc[number7].active) + NetMessage.SendData(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.SendData(27, this.whoAmI, number: number8); + } + for (int number9 = 0; number9 < 267; ++number9) + NetMessage.SendData(83, this.whoAmI, number: number9); + NetMessage.SendData(49, this.whoAmI); + NetMessage.SendData(57, this.whoAmI); + NetMessage.SendData(7, this.whoAmI); + NetMessage.SendData(103, number: NPC.MoonLordCountdown); + NetMessage.SendData(101, this.whoAmI); + break; + case 9: + if (Main.netMode != 1) + break; + Netplay.Connection.StatusMax += this.reader.ReadInt32(); + Netplay.Connection.StatusText = NetworkText.Deserialize(this.reader).ToString(); + 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.Spawn(); + 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.greetPlayer(this.whoAmI); + NetMessage.buffer[this.whoAmI].broadcast = true; + NetMessage.SyncConnectedPlayer(this.whoAmI); + NetMessage.SendData(12, ignoreClient: this.whoAmI, number: this.whoAmI); + NetMessage.SendData(74, this.whoAmI, text: NetworkText.FromLiteral(Main.player[this.whoAmI].name), number: Main.anglerQuest); + break; + } + NetMessage.SendData(12, ignoreClient: this.whoAmI, number: this.whoAmI); + 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 bitsByte9 = (BitsByte) this.reader.ReadByte(); + player5.controlUp = bitsByte9[0]; + player5.controlDown = bitsByte9[1]; + player5.controlLeft = bitsByte9[2]; + player5.controlRight = bitsByte9[3]; + player5.controlJump = bitsByte9[4]; + player5.controlUseItem = bitsByte9[5]; + player5.direction = bitsByte9[6] ? 1 : -1; + BitsByte bitsByte10 = (BitsByte) this.reader.ReadByte(); + if (bitsByte10[0]) + { + player5.pulley = true; + player5.pulleyDir = bitsByte10[1] ? (byte) 2 : (byte) 1; + } + else + player5.pulley = false; + player5.selectedItem = (int) this.reader.ReadByte(); + player5.position = this.reader.ReadVector2(); + if (bitsByte10[2]) + player5.velocity = this.reader.ReadVector2(); + else + player5.velocity = Vector2.Zero; + player5.vortexStealthActive = bitsByte10[3]; + player5.gravDir = bitsByte10[4] ? 1f : -1f; + if (Main.netMode != 2 || Netplay.Clients[this.whoAmI].State != 10) + break; + NetMessage.SendData(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 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.SendData(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 (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 (Main.netMode != 2) + break; + NetMessage.SendData(17, ignoreClient: this.whoAmI, number: ((int) num17), number2: ((float) index4), number3: ((float) index5), number4: ((float) num18), number5: num19); + if (num17 != (byte) 1 || num18 != (short) 53) + 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 num20 = this.reader.ReadByte(); + int num21 = (int) this.reader.ReadInt16(); + int num22 = (int) this.reader.ReadInt16(); + if (!WorldGen.InWorld(num21, num22, 3)) + break; + int direction1 = this.reader.ReadByte() == (byte) 0 ? -1 : 1; + switch (num20) + { + case 0: + WorldGen.OpenDoor(num21, num22, direction1); + break; + case 1: + WorldGen.CloseDoor(num21, num22, true); + break; + case 2: + WorldGen.ShiftTrapdoor(num21, num22, direction1 == 1, 1); + break; + case 3: + WorldGen.ShiftTrapdoor(num21, num22, direction1 == 1, 0); + break; + case 4: + WorldGen.ShiftTallGate(num21, num22, false); + break; + case 5: + WorldGen.ShiftTallGate(num21, num22, true); + break; + } + if (Main.netMode != 2) + break; + NetMessage.SendData(19, ignoreClient: this.whoAmI, number: ((int) num20), number2: ((float) num21), number3: ((float) num22), number4: (direction1 == 1 ? 1f : 0.0f)); + break; + case 20: + int num23 = (int) this.reader.ReadUInt16(); + short num24 = (short) (num23 & (int) short.MaxValue); + int num25 = (uint) (num23 & 32768) > 0U ? 1 : 0; + byte num26 = 0; + if (num25 != 0) + num26 = this.reader.ReadByte(); + int num27 = (int) this.reader.ReadInt16(); + int num28 = (int) this.reader.ReadInt16(); + if (!WorldGen.InWorld(num27, num28, 3)) + break; + TileChangeType type3 = TileChangeType.None; + if (Enum.IsDefined(typeof (TileChangeType), (object) num26)) + type3 = (TileChangeType) num26; + if (MessageBuffer.OnTileChangeReceived != null) + MessageBuffer.OnTileChangeReceived(num27, num28, (int) num24, type3); + BitsByte bitsByte11 = (BitsByte) (byte) 0; + BitsByte bitsByte12 = (BitsByte) (byte) 0; + for (int index6 = num27; index6 < num27 + (int) num24; ++index6) + { + for (int index7 = num28; index7 < num28 + (int) num24; ++index7) + { + if (Main.tile[index6, index7] == null) + Main.tile[index6, index7] = new Tile(); + Tile tile = Main.tile[index6, index7]; + bool flag4 = tile.active(); + BitsByte bitsByte13 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte14 = (BitsByte) this.reader.ReadByte(); + tile.active(bitsByte13[0]); + tile.wall = bitsByte13[2] ? (byte) 1 : (byte) 0; + bool flag5 = bitsByte13[3]; + if (Main.netMode != 2) + tile.liquid = flag5 ? (byte) 1 : (byte) 0; + tile.wire(bitsByte13[4]); + tile.halfBrick(bitsByte13[5]); + tile.actuator(bitsByte13[6]); + tile.inActive(bitsByte13[7]); + tile.wire2(bitsByte14[0]); + tile.wire3(bitsByte14[1]); + if (bitsByte14[2]) + tile.color(this.reader.ReadByte()); + if (bitsByte14[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 (!flag4 || (int) tile.type != type4) + { + tile.frameX = (short) -1; + tile.frameY = (short) -1; + } + byte slope = 0; + if (bitsByte14[4]) + ++slope; + if (bitsByte14[5]) + slope += (byte) 2; + if (bitsByte14[6]) + slope += (byte) 4; + tile.slope(slope); + } + tile.wire4(bitsByte14[7]); + if (tile.wall > (byte) 0) + tile.wall = this.reader.ReadByte(); + if (flag5) + { + tile.liquid = this.reader.ReadByte(); + tile.liquidType((int) this.reader.ReadByte()); + } + } + } + WorldGen.RangeFrame(num27, num28, num27 + (int) num24, num28 + (int) num24); + if (Main.netMode != 2) + break; + NetMessage.SendData((int) num1, ignoreClient: this.whoAmI, number: ((int) num24), number2: ((float) num27), number3: ((float) num28)); + 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 num29 = (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]; + bool flag6 = (obj.newAndShiny || obj.netID != type5) && ItemSlot.Options.HighlightNewItems && (type5 < 0 || type5 >= 3930 || !ItemID.Sets.NeverShiny[type5]); + obj.netDefaults(type5); + obj.newAndShiny = flag6; + 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.owner = Main.myPlayer; + obj.keepTime = 600; + } + obj.wet = Collision.WetCollision(obj.position, obj.width, obj.height); + break; + } + if (Main.itemLockoutTime[index8] > 0) + break; + if (type5 == 0) + { + if (index8 >= 400) + break; + Main.item[index8].active = false; + NetMessage.SendData(21, number: index8); + break; + } + bool flag7 = false; + if (index8 == 400) + flag7 = true; + if (flag7) + { + 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.owner = Main.myPlayer; + if (flag7) + { + NetMessage.SendData(21, number: index8); + if (num29 == 0) + { + Main.item[index8].ownIgnore = this.whoAmI; + Main.item[index8].ownTime = 100; + } + Main.item[index8].FindOwner(index8); + break; + } + NetMessage.SendData(21, ignoreClient: this.whoAmI, number: index8); + break; + case 22: + int number12 = (int) this.reader.ReadInt16(); + int num30 = (int) this.reader.ReadByte(); + if (Main.netMode == 2 && Main.item[number12].owner != this.whoAmI) + break; + Main.item[number12].owner = num30; + Main.item[number12].keepTime = num30 != Main.myPlayer ? 0 : 15; + if (Main.netMode != 2) + break; + Main.item[number12].owner = (int) byte.MaxValue; + Main.item[number12].keepTime = 15; + NetMessage.SendData(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 num31 = (int) this.reader.ReadUInt16(); + if (num31 == (int) ushort.MaxValue) + num31 = 0; + BitsByte bitsByte15 = (BitsByte) this.reader.ReadByte(); + float[] numArray1 = new float[NPC.maxAI]; + for (int index11 = 0; index11 < NPC.maxAI; ++index11) + numArray1[index11] = !bitsByte15[index11 + 2] ? 0.0f : this.reader.ReadSingle(); + int Type1 = (int) this.reader.ReadInt16(); + int num32 = 0; + if (!bitsByte15[7]) + { + switch (this.reader.ReadByte()) + { + case 2: + num32 = (int) this.reader.ReadInt16(); + break; + case 4: + num32 = this.reader.ReadInt32(); + break; + default: + num32 = (int) this.reader.ReadSByte(); + break; + } + } + int oldType = -1; + NPC npc1 = Main.npc[index10]; + if (!npc1.active || npc1.netID != Type1) + { + if (npc1.active) + oldType = npc1.type; + npc1.active = true; + npc1.SetDefaults(Type1); + } + if ((double) Vector2.DistanceSquared(npc1.position, vector2_3) < 6400.0) + npc1.visualOffset = npc1.position - vector2_3; + npc1.position = vector2_3; + npc1.velocity = vector2_4; + npc1.target = num31; + npc1.direction = bitsByte15[0] ? 1 : -1; + npc1.directionY = bitsByte15[1] ? 1 : -1; + npc1.spriteDirection = bitsByte15[6] ? 1 : -1; + if (bitsByte15[7]) + num32 = npc1.life = npc1.lifeMax; + else + npc1.life = num32; + if (num32 <= 0) + npc1.active = false; + 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 >= 580 || !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.SendData(24, ignoreClient: this.whoAmI, number: number13, number2: ((float) index13)); + NetMessage.SendData(23, number: number13); + break; + case 27: + int num33 = (int) this.reader.ReadInt16(); + Vector2 vector2_5 = this.reader.ReadVector2(); + Vector2 vector2_6 = this.reader.ReadVector2(); + float num34 = this.reader.ReadSingle(); + int num35 = (int) this.reader.ReadInt16(); + int index14 = (int) this.reader.ReadByte(); + int Type2 = (int) this.reader.ReadInt16(); + BitsByte bitsByte16 = (BitsByte) this.reader.ReadByte(); + float[] numArray2 = new float[Projectile.maxAI]; + for (int key = 0; key < Projectile.maxAI; ++key) + numArray2[key] = !bitsByte16[key] ? 0.0f : this.reader.ReadSingle(); + int index15 = bitsByte16[Projectile.maxAI] ? (int) this.reader.ReadInt16() : -1; + if (index15 >= 1000) + index15 = -1; + if (Main.netMode == 2) + { + 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 == num33 && 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; + } + } + } + Projectile projectile1 = Main.projectile[number14]; + if (!projectile1.active || projectile1.type != Type2) + { + projectile1.SetDefaults(Type2); + if (Main.netMode == 2) + ++Netplay.Clients[this.whoAmI].SpamProjectile; + } + projectile1.identity = num33; + projectile1.position = vector2_5; + projectile1.velocity = vector2_6; + projectile1.type = Type2; + projectile1.damage = num35; + projectile1.knockBack = num34; + projectile1.owner = index14; + for (int index18 = 0; index18 < Projectile.maxAI; ++index18) + projectile1.ai[index18] = numArray2[index18]; + if (index15 >= 0) + { + projectile1.projUUID = index15; + Main.projectileIdentity[index14, index15] = number14; + } + projectile1.ProjectileFixDesperation(); + if (Main.netMode != 2) + break; + NetMessage.SendData(27, ignoreClient: this.whoAmI, number: number14); + break; + case 28: + int number15 = (int) this.reader.ReadInt16(); + int Damage1 = (int) this.reader.ReadInt16(); + float num36 = this.reader.ReadSingle(); + int hitDirection = (int) this.reader.ReadByte() - 1; + byte num37 = 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, num36, hitDirection, num37 == (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.SendData(28, ignoreClient: this.whoAmI, number: number15, number2: ((float) Damage1), number3: num36, number4: ((float) hitDirection), number5: ((int) num37)); + if (Main.npc[number15].life <= 0) + NetMessage.SendData(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.SendData(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 num38 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + num38 = this.whoAmI; + for (int index19 = 0; index19 < 1000; ++index19) + { + if (Main.projectile[index19].owner == num38 && Main.projectile[index19].identity == number16 && Main.projectile[index19].active) + { + Main.projectile[index19].Kill(); + break; + } + } + if (Main.netMode != 2) + break; + NetMessage.SendData(29, ignoreClient: this.whoAmI, number: number16, number2: ((float) num38)); + break; + case 30: + int number17 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number17 = this.whoAmI; + bool flag8 = this.reader.ReadBoolean(); + Main.player[number17].hostile = flag8; + if (Main.netMode != 2) + break; + NetMessage.SendData(30, ignoreClient: this.whoAmI, number: number17); + LocalizedText localizedText1 = flag8 ? Lang.mp[11] : Lang.mp[12]; + Color color1 = Main.teamColor[Main.player[number17].team]; + NetMessage.BroadcastChatMessage(NetworkText.FromKey(localizedText1.Key, (object) Main.player[number17].name), color1); + break; + case 31: + if (Main.netMode != 2) + break; + int chest1 = Chest.FindChest((int) this.reader.ReadInt16(), (int) this.reader.ReadInt16()); + if (chest1 <= -1 || Chest.UsingChest(chest1) != -1) + break; + for (int index20 = 0; index20 < 40; ++index20) + NetMessage.SendData(32, this.whoAmI, number: chest1, number2: ((float) index20)); + NetMessage.SendData(33, this.whoAmI, number: chest1); + Main.player[this.whoAmI].chest = chest1; + if (Main.myPlayer == this.whoAmI) + Main.recBigList = false; + NetMessage.SendData(80, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) chest1)); + break; + case 32: + int index21 = (int) this.reader.ReadInt16(); + int index22 = (int) this.reader.ReadByte(); + int num39 = (int) this.reader.ReadInt16(); + int pre2 = (int) this.reader.ReadByte(); + int type6 = (int) this.reader.ReadInt16(); + 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 = num39; + Recipe.FindRecipes(); + break; + case 33: + int num40 = (int) this.reader.ReadInt16(); + int index23 = (int) this.reader.ReadInt16(); + int index24 = (int) this.reader.ReadInt16(); + int num41 = (int) this.reader.ReadByte(); + string str1 = string.Empty; + if (num41 != 0) + { + if (num41 <= 20) + str1 = this.reader.ReadString(); + else if (num41 != (int) byte.MaxValue) + num41 = 0; + } + if (Main.netMode == 1) + { + Player player8 = Main.player[Main.myPlayer]; + if (player8.chest == -1) + { + Main.playerInventory = true; + Main.PlaySound(10); + } + else if (player8.chest != num40 && num40 != -1) + { + Main.playerInventory = true; + Main.PlaySound(12); + Main.recBigList = false; + } + else if (player8.chest != -1 && num40 == -1) + { + Main.PlaySound(11); + Main.recBigList = false; + } + player8.chest = num40; + player8.chestX = index23; + player8.chestY = index24; + Recipe.FindRecipes(); + 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 (num41 != 0) + { + int chest2 = Main.player[this.whoAmI].chest; + Chest chest3 = Main.chest[chest2]; + chest3.name = str1; + NetMessage.SendData(69, ignoreClient: this.whoAmI, number: chest2, number2: ((float) chest3.x), number3: ((float) chest3.y)); + } + Main.player[this.whoAmI].chest = num40; + Recipe.FindRecipes(); + NetMessage.SendData(80, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) num40)); + break; + case 34: + byte num42 = 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 (num42 == (byte) 0) + { + int number5_1 = WorldGen.PlaceChest(index25, index26, style: style1); + if (number5_1 == -1) + { + NetMessage.SendData(34, this.whoAmI, number: ((int) num42), 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.SendData(34, number: ((int) num42), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_1); + break; + } + if (num42 == (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.SendData(34, number: ((int) num42), number2: ((float) index25), number3: ((float) index26), number5: chest4); + break; + } + if (num42 == (byte) 2) + { + int number5_2 = WorldGen.PlaceChest(index25, index26, (ushort) 88, style: style1); + if (number5_2 == -1) + { + NetMessage.SendData(34, this.whoAmI, number: ((int) num42), 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.SendData(34, number: ((int) num42), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_2); + break; + } + if (num42 == (byte) 3 && Main.tile[index25, index26].type == (ushort) 88) + { + Tile tile = Main.tile[index25, index26]; + int num43 = index25 - (int) tile.frameX % 54 / 18; + if ((int) tile.frameY % 36 != 0) + --index26; + int chest5 = Chest.FindChest(num43, index26); + WorldGen.KillTile(num43, index26); + if (tile.active()) + break; + NetMessage.SendData(34, number: ((int) num42), number2: ((float) num43), number3: ((float) index26), number5: chest5); + break; + } + if (num42 == (byte) 4) + { + int number5_3 = WorldGen.PlaceChest(index25, index26, (ushort) 467, style: style1); + if (number5_3 == -1) + { + NetMessage.SendData(34, this.whoAmI, number: ((int) num42), 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.SendData(34, number: ((int) num42), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_3); + break; + } + if (num42 != (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.SendData(34, number: ((int) num42), number2: ((float) index25), number3: ((float) index26), number5: chest6); + break; + } + switch (num42) + { + case 0: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + WorldGen.PlaceChestDirect(index25, index26, (ushort) 21, style1, id); + return; + case 2: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + WorldGen.PlaceDresserDirect(index25, index26, (ushort) 88, style1, id); + return; + case 4: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + 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.SendData(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.SendData(36, ignoreClient: this.whoAmI, number: number19); + break; + case 37: + if (Main.netMode != 1) + break; + if (Main.autoPass) + { + NetMessage.SendData(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.SendData(3, this.whoAmI); + break; + } + NetMessage.SendData(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].owner = (int) byte.MaxValue; + NetMessage.SendData(22, number: number20); + break; + case 40: + int number21 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number21 = this.whoAmI; + int num44 = (int) this.reader.ReadInt16(); + Main.player[number21].talkNPC = num44; + if (Main.netMode != 2) + break; + NetMessage.SendData(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 num45 = this.reader.ReadSingle(); + int num46 = (int) this.reader.ReadInt16(); + player10.itemRotation = num45; + player10.itemAnimation = num46; + player10.channel = player10.inventory[player10.selectedItem].channel; + if (Main.netMode != 2) + break; + NetMessage.SendData(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 num47 = (int) this.reader.ReadInt16(); + int num48 = (int) this.reader.ReadInt16(); + Main.player[index27].statMana = num47; + Main.player[index27].statManaMax = num48; + 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.SendData(43, ignoreClient: this.whoAmI, number: number23, number2: ((float) manaAmount)); + 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.SendData(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) + NetMessage.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.SendData(47, this.whoAmI, number: number25, number2: ((float) this.whoAmI)); + break; + case 47: + int index29 = (int) this.reader.ReadInt16(); + int num49 = (int) this.reader.ReadInt16(); + int num50 = (int) this.reader.ReadInt16(); + string text1 = this.reader.ReadString(); + string str2 = (string) null; + if (Main.sign[index29] != null) + str2 = Main.sign[index29].text; + Main.sign[index29] = new Sign(); + Main.sign[index29].x = num49; + Main.sign[index29].y = num50; + Sign.TextSign(index29, text1); + int num51 = (int) this.reader.ReadByte(); + if (Main.netMode == 2 && str2 != text1) + { + num51 = this.whoAmI; + NetMessage.SendData(47, ignoreClient: this.whoAmI, number: index29, number2: ((float) num51)); + } + if (Main.netMode != 1 || num51 != Main.myPlayer || Main.sign[index29] == null) + break; + Main.playerInventory = false; + Main.player[Main.myPlayer].talkNPC = -1; + Main.npcChatCornerItem = 0; + Main.editSign = false; + Main.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 num52 = this.reader.ReadByte(); + byte num53 = this.reader.ReadByte(); + if (Main.netMode == 2 && Netplay.spamCheck) + { + int whoAmI = this.whoAmI; + int num54 = (int) ((double) Main.player[whoAmI].position.X + (double) (Main.player[whoAmI].width / 2)); + int num55 = (int) ((double) Main.player[whoAmI].position.Y + (double) (Main.player[whoAmI].height / 2)); + int num56 = 10; + int num57 = num54 - num56; + int num58 = num54 + num56; + int num59 = num55 - num56; + int num60 = num55 + num56; + if (i1 < num57 || i1 > num58 || j1 < num59 || j1 > num60) + { + 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 = num52; + Main.tile[i1, j1].liquidType((int) num53); + 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(); + 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.ReadByte(); + player12.buffTime[index30] = player12.buffType[index30] <= 0 ? 0 : 60; + } + if (Main.netMode != 2) + break; + NetMessage.SendData(50, ignoreClient: this.whoAmI, number: number26); + break; + case 51: + byte num61 = this.reader.ReadByte(); + byte num62 = this.reader.ReadByte(); + switch (num62) + { + case 1: + NPC.SpawnSkeletron(); + return; + case 2: + if (Main.netMode == 2) + { + NetMessage.SendData(51, ignoreClient: this.whoAmI, number: ((int) num61), number2: ((float) num62)); + return; + } + Main.PlaySound(SoundID.Item1, (int) Main.player[(int) num61].position.X, (int) Main.player[(int) num61].position.Y); + return; + case 3: + if (Main.netMode != 2) + return; + Main.Sundialing(); + return; + case 4: + Main.npc[(int) num61].BigMimicSpawnSmoke(); + return; + default: + return; + } + case 52: + int num63 = (int) this.reader.ReadByte(); + int num64 = (int) this.reader.ReadInt16(); + int num65 = (int) this.reader.ReadInt16(); + if (num63 == 1) + { + Chest.Unlock(num64, num65); + if (Main.netMode == 2) + { + NetMessage.SendData(52, ignoreClient: this.whoAmI, number2: ((float) num63), number3: ((float) num64), number4: ((float) num65)); + NetMessage.SendTileSquare(-1, num64, num65, 2); + } + } + if (num63 != 2) + break; + WorldGen.UnlockDoor(num64, num65); + if (Main.netMode != 2) + break; + NetMessage.SendData(52, ignoreClient: this.whoAmI, number2: ((float) num63), number3: ((float) num64), number4: ((float) num65)); + NetMessage.SendTileSquare(-1, num64, num65, 2); + break; + case 53: + int number27 = (int) this.reader.ReadInt16(); + int type7 = (int) this.reader.ReadByte(); + int time1 = (int) this.reader.ReadInt16(); + Main.npc[number27].AddBuff(type7, time1, true); + if (Main.netMode != 2) + break; + NetMessage.SendData(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.ReadByte(); + npc2.buffTime[index32] = (int) this.reader.ReadInt16(); + } + break; + case 55: + int index33 = (int) this.reader.ReadByte(); + int type8 = (int) this.reader.ReadByte(); + int time1_1 = 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, time1_1); + break; + } + if (Main.netMode != 2) + break; + NetMessage.SendData(55, index33, number: index33, number2: ((float) type8), number3: ((float) time1_1)); + 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; + break; + } + if (Main.netMode != 2) + break; + NetMessage.SendData(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 number2_1 = this.reader.ReadSingle(); + if (Main.netMode == 2) + { + NetMessage.SendData(58, ignoreClient: this.whoAmI, number: this.whoAmI, number2: number2_1); + break; + } + Player player13 = Main.player[index34]; + Main.harpNote = number2_1; + LegacySoundStyle type9 = SoundID.Item26; + if (player13.inventory[player13.selectedItem].type == 507) + type9 = SoundID.Item35; + Main.PlaySound(type9, player13.position); + break; + case 59: + int num66 = (int) this.reader.ReadInt16(); + int j2 = (int) this.reader.ReadInt16(); + Wiring.SetCurrentUser(this.whoAmI); + Wiring.HitSwitch(num66, j2); + Wiring.SetCurrentUser(); + if (Main.netMode != 2) + break; + NetMessage.SendData(59, ignoreClient: this.whoAmI, number: num66, 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 num67 = this.reader.ReadByte(); + if (n >= 200) + { + NetMessage.BootPlayer(this.whoAmI, NetworkText.FromKey("Net.CheatingInvalid")); + break; + } + if (Main.netMode == 1) + { + Main.npc[n].homeless = num67 == (byte) 1; + Main.npc[n].homeTileX = x1; + Main.npc[n].homeTileY = y4; + if (num67 == (byte) 1) + { + WorldGen.TownManager.KickOut(Main.npc[n].type); + break; + } + if (num67 != (byte) 2) + break; + WorldGen.TownManager.SetRoom(Main.npc[n].type, x1, y4); + break; + } + if (num67 == (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 < 580 && NPCID.Sets.MPAllowedEnemies[Type3]) + { + if (NPC.AnyNPCs(Type3)) + break; + NPC.SpawnOnPlayer(plr, Type3); + break; + } + switch (Type3) + { + case -8: + if (!NPC.downedGolemBoss || !Main.hardMode || NPC.AnyDanger() || NPC.AnyoneNearCultists()) + return; + WorldGen.StartImpendingDoom(); + NetMessage.SendData(7); + return; + case -7: + Main.invasionDelay = 0; + Main.StartInvasion(4); + NetMessage.SendData(7); + NetMessage.SendData(78, number2: 1f, number3: ((float) (Main.invasionType + 3))); + return; + case -6: + if (!Main.dayTime || Main.eclipse) + return; + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[20].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.eclipse = true; + NetMessage.SendData(7); + return; + case -5: + if (Main.dayTime || DD2Event.Ongoing) + return; + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[34].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.startSnowMoon(); + NetMessage.SendData(7); + NetMessage.SendData(78, number2: 1f, number3: 1f, number4: 1f); + return; + case -4: + if (Main.dayTime || DD2Event.Ongoing) + return; + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[31].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.startPumpkinMoon(); + NetMessage.SendData(7); + NetMessage.SendData(78, number2: 1f, number3: 2f, number4: 1f); + return; + default: + if (Type3 >= 0) + return; + int type10 = 1; + if (Type3 > -5) + type10 = -Type3; + if (type10 > 0 && Main.invasionType == 0) + { + Main.invasionDelay = 0; + Main.StartInvasion(type10); + } + NetMessage.SendData(78, number2: 1f, number3: ((float) (Main.invasionType + 3))); + return; + } + case 62: + int number29 = (int) this.reader.ReadByte(); + int num68 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number29 = this.whoAmI; + if (num68 == 1) + Main.player[number29].NinjaDodge(); + if (num68 == 2) + Main.player[number29].ShadowDodge(); + if (Main.netMode != 2) + break; + NetMessage.SendData(62, ignoreClient: this.whoAmI, number: number29, number2: ((float) num68)); + break; + case 63: + int num69 = (int) this.reader.ReadInt16(); + int y5 = (int) this.reader.ReadInt16(); + byte color3 = this.reader.ReadByte(); + WorldGen.paintTile(num69, y5, color3); + if (Main.netMode != 2) + break; + NetMessage.SendData(63, ignoreClient: this.whoAmI, number: num69, number2: ((float) y5), number3: ((float) color3)); + break; + case 64: + int num70 = (int) this.reader.ReadInt16(); + int y6 = (int) this.reader.ReadInt16(); + byte color4 = this.reader.ReadByte(); + WorldGen.paintWall(num70, y6, color4); + if (Main.netMode != 2) + break; + NetMessage.SendData(64, ignoreClient: this.whoAmI, number: num70, number2: ((float) y6), number3: ((float) color4)); + break; + case 65: + BitsByte bitsByte17 = (BitsByte) this.reader.ReadByte(); + int index35 = (int) this.reader.ReadInt16(); + if (Main.netMode == 2) + index35 = this.whoAmI; + Vector2 vector2_7 = this.reader.ReadVector2(); + int num71 = 0; + int num72 = 0; + if (bitsByte17[0]) + ++num71; + if (bitsByte17[1]) + num71 += 2; + if (bitsByte17[2]) + ++num72; + if (bitsByte17[3]) + num72 += 2; + switch (num71) + { + case 0: + Main.player[index35].Teleport(vector2_7, num72); + break; + case 1: + Main.npc[index35].Teleport(vector2_7, num72); + break; + case 2: + Main.player[index35].Teleport(vector2_7, num72); + if (Main.netMode == 2) + { + RemoteClient.CheckSection(this.whoAmI, vector2_7); + NetMessage.SendData(65, number2: ((float) index35), number3: vector2_7.X, number4: vector2_7.Y, number5: num72); + int index36 = -1; + float num73 = 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) num73) + { + num73 = vector2_8.Length(); + index36 = index37; + } + } + } + if (index36 >= 0) + { + NetMessage.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 || num71 != 0) + break; + NetMessage.SendData(65, ignoreClient: this.whoAmI, number2: ((float) index35), number3: vector2_7.X, number4: vector2_7.Y, number5: num72); + break; + case 66: + int number30 = (int) this.reader.ReadByte(); + int healAmount2 = (int) this.reader.ReadInt16(); + if (healAmount2 <= 0) + break; + Player player14 = Main.player[number30]; + player14.statLife += healAmount2; + if (player14.statLife > player14.statLifeMax2) + player14.statLife = player14.statLifeMax2; + player14.HealEffect(healAmount2, false); + if (Main.netMode != 2) + break; + NetMessage.SendData(66, ignoreClient: this.whoAmI, number: number30, number2: ((float) healAmount2)); + break; + case 68: + this.reader.ReadString(); + break; + case 69: + int number31 = (int) this.reader.ReadInt16(); + int X = (int) this.reader.ReadInt16(); + int Y = (int) this.reader.ReadInt16(); + if (Main.netMode == 1) + { + if (number31 < 0 || number31 >= 1000) + break; + Chest chest7 = Main.chest[number31]; + if (chest7 == null) + { + chest7 = new Chest(); + chest7.x = X; + chest7.y = Y; + Main.chest[number31] = chest7; + } + else if (chest7.x != X || chest7.y != Y) + break; + chest7.name = this.reader.ReadString(); + break; + } + if (number31 < -1 || number31 >= 1000) + break; + if (number31 == -1) + { + number31 = Chest.FindChest(X, Y); + if (number31 == -1) + break; + } + Chest chest8 = Main.chest[number31]; + if (chest8.x != X || chest8.y != Y) + break; + NetMessage.SendData(69, this.whoAmI, number: number31, number2: ((float) X), number3: ((float) Y)); + 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 num74 = this.reader.ReadInt32(); + int num75 = (int) this.reader.ReadInt16(); + byte num76 = this.reader.ReadByte(); + int y7 = num74; + int Type4 = num75; + int Style = (int) num76; + int whoAmI1 = this.whoAmI; + NPC.ReleaseNPC(x2, y7, Type4, Style, 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: + Main.player[this.whoAmI].TeleportationPotion(); + break; + 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 number32 = (int) this.reader.ReadByte(); + if (number32 == Main.myPlayer && !Main.ServerSideCharacter) + break; + if (Main.netMode == 2) + number32 = this.whoAmI; + Main.player[number32].anglerQuestsFinished = this.reader.ReadInt32(); + if (Main.netMode != 2) + break; + NetMessage.SendData(76, ignoreClient: this.whoAmI, number: number32); + break; + case 77: + int type11 = (int) this.reader.ReadInt16(); + ushort num77 = this.reader.ReadUInt16(); + short num78 = this.reader.ReadInt16(); + short num79 = this.reader.ReadInt16(); + int num80 = (int) num77; + int x3 = (int) num78; + int y8 = (int) num79; + Animation.NewTemporaryAnimation(type11, (ushort) num80, 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 num81 = this.reader.ReadInt16(); + int style2 = (int) this.reader.ReadInt16(); + int num82 = (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) num81, style: style2, alternate: num82, random: random, direction: direction2); + if (Main.netMode != 2) + break; + NetMessage.SendObjectPlacment(this.whoAmI, x4, y9, (int) num81, style2, num82, random, direction2); + break; + case 80: + if (Main.netMode != 1) + break; + int index39 = (int) this.reader.ReadByte(); + int num83 = (int) this.reader.ReadInt16(); + if (num83 < -3 || num83 >= 1000) + break; + Main.player[index39].chest = num83; + Recipe.FindRecipes(); + break; + case 81: + if (Main.netMode != 1) + break; + int x5 = (int) this.reader.ReadSingle(); + int num84 = (int) this.reader.ReadSingle(); + Color color5 = this.reader.ReadRGB(); + int amount = this.reader.ReadInt32(); + int y10 = num84; + CombatText.NewText(new Rectangle(x5, y10, 0, 0), color5, amount); + break; + case 82: + NetManager.Instance.Read(this.reader, this.whoAmI); + break; + case 83: + if (Main.netMode != 1) + break; + int index40 = (int) this.reader.ReadInt16(); + int num85 = this.reader.ReadInt32(); + if (index40 < 0 || index40 >= 267) + break; + NPC.killCount[index40] = num85; + break; + case 84: + int number33 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number33 = this.whoAmI; + float num86 = this.reader.ReadSingle(); + Main.player[number33].stealth = num86; + if (Main.netMode != 2) + break; + NetMessage.SendData(84, ignoreClient: this.whoAmI, number: number33); + break; + case 85: + int whoAmI2 = this.whoAmI; + byte num87 = this.reader.ReadByte(); + if (Main.netMode != 2 || whoAmI2 >= (int) byte.MaxValue || num87 >= (byte) 58) + break; + Chest.ServerPlaceItem(this.whoAmI, (int) num87); + 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; + switch (tileEntity) + { + case TETrainingDummy _: + case TEItemFrame _: + case TELogicSensor _: + TileEntity.ByID.Remove(key1); + TileEntity.ByPosition.Remove(tileEntity.Position); + return; + default: + return; + } + } + else + { + TileEntity tileEntity = TileEntity.Read(this.reader, true); + tileEntity.ID = key1; + TileEntity.ByID[tileEntity.ID] = tileEntity; + TileEntity.ByPosition[tileEntity.Position] = tileEntity; + break; + } + case 87: + if (Main.netMode != 2) + break; + int num88 = (int) this.reader.ReadInt16(); + int num89 = (int) this.reader.ReadInt16(); + int type12 = (int) this.reader.ReadByte(); + if (!WorldGen.InWorld(num88, num89) || TileEntity.ByPosition.ContainsKey(new Point16(num88, num89))) + break; + TileEntity.PlaceEntityNet(num88, num89, type12); + 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 bitsByte18 = (BitsByte) this.reader.ReadByte(); + if (bitsByte18[0]) + obj2.color.PackedValue = this.reader.ReadUInt32(); + if (bitsByte18[1]) + obj2.damage = (int) this.reader.ReadUInt16(); + if (bitsByte18[2]) + obj2.knockBack = this.reader.ReadSingle(); + if (bitsByte18[3]) + obj2.useAnimation = (int) this.reader.ReadUInt16(); + if (bitsByte18[4]) + obj2.useTime = (int) this.reader.ReadUInt16(); + if (bitsByte18[5]) + obj2.shoot = (int) this.reader.ReadInt16(); + if (bitsByte18[6]) + obj2.shootSpeed = this.reader.ReadSingle(); + if (!bitsByte18[7]) + break; + bitsByte18 = (BitsByte) this.reader.ReadByte(); + if (bitsByte18[0]) + obj2.width = (int) this.reader.ReadInt16(); + if (bitsByte18[1]) + obj2.height = (int) this.reader.ReadInt16(); + if (bitsByte18[2]) + obj2.scale = this.reader.ReadSingle(); + if (bitsByte18[3]) + obj2.ammo = (int) this.reader.ReadInt16(); + if (bitsByte18[4]) + obj2.useAmmo = (int) this.reader.ReadInt16(); + if (!bitsByte18[5]) + break; + obj2.notAmmo = this.reader.ReadBoolean(); + break; + case 89: + if (Main.netMode != 2) + break; + int x6 = (int) this.reader.ReadInt16(); + int num90 = (int) this.reader.ReadInt16(); + int num91 = (int) this.reader.ReadInt16(); + int num92 = (int) this.reader.ReadByte(); + int num93 = (int) this.reader.ReadInt16(); + int y11 = num90; + int netid = num91; + int prefix = num92; + int stack1 = num93; + TEItemFrame.TryPlacing(x6, y11, netid, prefix, stack1); + break; + case 91: + if (Main.netMode != 1) + break; + int key2 = this.reader.ReadInt32(); + int type13 = (int) this.reader.ReadByte(); + if (type13 == (int) byte.MaxValue) + { + if (!EmoteBubble.byID.ContainsKey(key2)) + break; + EmoteBubble.byID.Remove(key2); + break; + } + int meta = (int) this.reader.ReadUInt16(); + int time2 = (int) this.reader.ReadByte(); + int emotion = (int) this.reader.ReadByte(); + int num94 = 0; + if (emotion < 0) + num94 = (int) this.reader.ReadInt16(); + WorldUIAnchor bubbleAnchor = EmoteBubble.DeserializeNetAnchor(type13, meta); + lock (EmoteBubble.byID) + { + if (!EmoteBubble.byID.ContainsKey(key2)) + { + EmoteBubble.byID[key2] = new EmoteBubble(emotion, bubbleAnchor, time2); + } + else + { + EmoteBubble.byID[key2].lifeTime = time2; + EmoteBubble.byID[key2].lifeTimeStart = time2; + EmoteBubble.byID[key2].emote = emotion; + EmoteBubble.byID[key2].anchor = bubbleAnchor; + } + EmoteBubble.byID[key2].ID = key2; + EmoteBubble.byID[key2].metadata = num94; + break; + } + case 92: + int number34 = (int) this.reader.ReadInt16(); + float num95 = this.reader.ReadSingle(); + float num96 = this.reader.ReadSingle(); + float num97 = this.reader.ReadSingle(); + if (number34 < 0 || number34 > 200) + break; + if (Main.netMode == 1) + { + Main.npc[number34].moneyPing(new Vector2(num96, num97)); + Main.npc[number34].extraValue = num95; + break; + } + Main.npc[number34].extraValue += num95; + NetMessage.SendData(92, number: number34, number2: Main.npc[number34].extraValue, number3: num96, number4: num97); + break; + case 95: + ushort num98 = this.reader.ReadUInt16(); + if (Main.netMode != 2 || num98 < (ushort) 0 || num98 >= (ushort) 1000) + break; + Projectile projectile2 = Main.projectile[(int) num98]; + if (projectile2.type != 602) + break; + projectile2.Kill(); + NetMessage.SendData(29, number: projectile2.whoAmI, number2: ((float) projectile2.owner)); + break; + case 96: + int index42 = (int) this.reader.ReadByte(); + Player player15 = Main.player[index42]; + int extraInfo1 = (int) this.reader.ReadInt16(); + Vector2 newPos1 = this.reader.ReadVector2(); + Vector2 vector2_9 = this.reader.ReadVector2(); + player15.lastPortalColorIndex = extraInfo1 + (extraInfo1 % 2 == 0 ? 1 : -1); + player15.Teleport(newPos1, 4, extraInfo1); + player15.velocity = vector2_9; + 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 number35 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number35 = this.whoAmI; + Main.player[number35].MinionRestTargetPoint = this.reader.ReadVector2(); + if (Main.netMode != 2) + break; + NetMessage.SendData(99, ignoreClient: this.whoAmI, number: number35); + 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; + 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(); + byte num99 = this.reader.ReadByte(); + Vector2 Other = this.reader.ReadVector2(); + if (Main.netMode == 2) + { + NetMessage.SendData(102, number: this.whoAmI, number2: ((float) num99), number3: Other.X, number4: Other.Y); + break; + } + Player player16 = Main.player[index44]; + for (int index45 = 0; index45 < (int) byte.MaxValue; ++index45) + { + Player player17 = Main.player[index45]; + if (player17.active && !player17.dead && (player16.team == 0 || player16.team == player17.team) && (double) player17.Distance(Other) < 700.0) + { + Vector2 vector2_11 = player16.Center - player17.Center; + Vector2 vec = Vector2.Normalize(vector2_11); + if (!vec.HasNaNs()) + { + int num100 = 90; + float num101 = 0.0f; + float num102 = 0.2094395f; + Vector2 spinningpoint = new Vector2(0.0f, -8f); + Vector2 vector2_12 = new Vector2(-3f); + float num103 = 0.0f; + float num104 = 0.005f; + switch (num99) + { + case 173: + num100 = 90; + break; + case 176: + num100 = 88; + break; + case 179: + num100 = 86; + break; + } + for (int index46 = 0; (double) index46 < (double) vector2_11.Length() / 6.0; ++index46) + { + Vector2 Position = player17.Center + 6f * (float) index46 * vec + spinningpoint.RotatedBy((double) num101) + vector2_12; + num101 += num102; + int Type5 = num100; + 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 = (num103 += num104); + Main.dust[index47].velocity += vec * 1.5f; + } + } + player17.NebulaLevelup((int) num99); + } + } + 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[] objArray1 = Main.instance.shop[Main.npcShop].item; + int index48 = (int) this.reader.ReadByte(); + int type14 = (int) this.reader.ReadInt16(); + int num105 = (int) this.reader.ReadInt16(); + int pre3 = (int) this.reader.ReadByte(); + int num106 = this.reader.ReadInt32(); + BitsByte bitsByte19 = (BitsByte) this.reader.ReadByte(); + if (index48 >= objArray1.Length) + break; + objArray1[index48] = new Item(); + objArray1[index48].netDefaults(type14); + objArray1[index48].stack = num105; + objArray1[index48].Prefix(pre3); + objArray1[index48].value = num106; + objArray1[index48].buyOnce = bitsByte19[0]; + break; + case 105: + if (Main.netMode == 1) + break; + int i3 = (int) this.reader.ReadInt16(); + int num107 = (int) this.reader.ReadInt16(); + bool flag9 = this.reader.ReadBoolean(); + int j3 = num107; + int num108 = flag9 ? 1 : 0; + WorldGen.ToggleGemLock(i3, j3, num108 != 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 num109 = (int) this.reader.ReadInt16(); + Color c = color6; + int WidthLimit = num109; + 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 num110 = (int) this.reader.ReadInt16(); + int x9 = (int) this.reader.ReadInt16(); + int y13 = (int) this.reader.ReadInt16(); + int num111 = (int) this.reader.ReadByte(); + int whoAmI3 = this.whoAmI; + WiresUI.Settings.MultiToolMode toolMode = WiresUI.Settings.ToolMode; + WiresUI.Settings.ToolMode = (WiresUI.Settings.MultiToolMode) num111; + int y14 = num110; + 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 type15 = (int) this.reader.ReadInt16(); + int num112 = (int) this.reader.ReadInt16(); + int index49 = (int) this.reader.ReadByte(); + if (index49 != Main.myPlayer) + break; + Player player18 = Main.player[index49]; + for (int index50 = 0; index50 < num112; ++index50) + player18.ConsumeItem(type15); + player18.wireOperationsCooldown = 0; + break; + case 111: + if (Main.netMode != 2) + break; + BirthdayParty.ToggleManualParty(); + break; + case 112: + int number36 = (int) this.reader.ReadByte(); + int x10 = (int) this.reader.ReadInt16(); + int y15 = (int) this.reader.ReadInt16(); + int height = (int) this.reader.ReadByte(); + int num113 = (int) this.reader.ReadInt16(); + if (number36 != 1) + break; + if (Main.netMode == 1) + WorldGen.TreeGrowFX(x10, y15, height, num113); + if (Main.netMode != 2) + break; + NetMessage.SendData((int) num1, number: number36, number2: ((float) x10), number3: ((float) y15), number4: ((float) height), number5: num113); + break; + 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 number37 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number37 = this.whoAmI; + Main.player[number37].MinionAttackTargetNPC = (int) this.reader.ReadInt16(); + if (Main.netMode != 2) + break; + NetMessage.SendData(115, ignoreClient: this.whoAmI, number: number37); + 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 num114 = (int) this.reader.ReadInt16(); + int num115 = (int) this.reader.ReadByte() - 1; + BitsByte bitsByte20 = (BitsByte) this.reader.ReadByte(); + bool flag10 = bitsByte20[0]; + bool pvp1 = bitsByte20[1]; + int num116 = (int) this.reader.ReadSByte(); + Main.player[playerTargetIndex1].Hurt(playerDeathReason1, num114, num115, pvp1, true, flag10, num116); + if (Main.netMode != 2) + break; + NetMessage.SendPlayerHurt(playerTargetIndex1, playerDeathReason1, num114, num115, flag10, pvp1, num116, 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 num117 = (int) this.reader.ReadByte() - 1; + bool pvp2 = ((BitsByte) this.reader.ReadByte())[0]; + Main.player[playerTargetIndex2].KillMe(playerDeathReason2, (double) damage, num117, pvp2); + if (Main.netMode != 2) + break; + NetMessage.SendPlayerDeath(playerTargetIndex2, playerDeathReason2, damage, num117, pvp2, ignoreClient: this.whoAmI); + break; + case 119: + if (Main.netMode != 1) + break; + int x12 = (int) this.reader.ReadSingle(); + int num118 = (int) this.reader.ReadSingle(); + Color color7 = this.reader.ReadRGB(); + NetworkText networkText = NetworkText.Deserialize(this.reader); + int y17 = num118; + CombatText.NewText(new Rectangle(x12, y17, 0, 0), color7, networkText.ToString()); + 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..198b035 --- /dev/null +++ b/Minecart.cs @@ -0,0 +1,1373 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Minecart +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.ID; + +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) Main.minecartMountTexture.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 BitsByte TrackCollision( + ref Vector2 Position, + ref Vector2 Velocity, + ref Vector2 lastBoost, + int Width, + int Height, + bool followDown, + bool followUp, + int fallStart, + bool trackOnly, + Action MinecartDust) + { + 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) + { + Main.PlaySound(SoundID.Item53, (int) Position.X + Width / 2, (int) Position.Y + Height / 2); + Minecart.WheelSparks(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) + { + int index1 = 0; + 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; + if (Main.tile[i - 1, j - 1] != null && Main.tile[i - 1, j - 1].type == (ushort) 314) + ++index1; + if (Main.tile[i - 1, j] != null && Main.tile[i - 1, j].type == (ushort) 314) + index1 += 2; + if (Main.tile[i - 1, j + 1] != null && Main.tile[i - 1, j + 1].type == (ushort) 314) + index1 += 4; + if (Main.tile[i + 1, j - 1] != null && Main.tile[i + 1, j - 1].type == (ushort) 314) + index1 += 8; + if (Main.tile[i + 1, j] != null && Main.tile[i + 1, j].type == (ushort) 314) + index1 += 16; + if (Main.tile[i + 1, j + 1] != null && Main.tile[i + 1, j + 1].type == (ushort) 314) + index1 += 32; + int index2 = (int) tileTrack.FrontTrack(); + int num1 = (int) tileTrack.BackTrack(); + if (Minecart._trackType == null) + return false; + int num2 = index2 < 0 || index2 >= Minecart._trackType.Length ? 0 : Minecart._trackType[index2]; + int index3 = -1; + int index4 = -1; + int[] trackSwitchOption = Minecart._trackSwitchOptions[index1]; + 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 index5 = 0; index5 < trackSwitchOption.Length; ++index5) + { + int index6 = trackSwitchOption[index5]; + if (num1 == trackSwitchOption[index5]) + index4 = index5; + if (Minecart._trackType[index6] == num2) + { + if (Minecart._leftSideConnection[index6] == -1 || Minecart._rightSideConnection[index6] == -1) + { + if (index2 == trackSwitchOption[index5]) + { + index3 = index5; + flag = true; + } + if (num3 == -1) + num3 = index5; + } + else + { + if (index2 == trackSwitchOption[index5]) + { + index3 = index5; + flag = false; + } + if (num4 == -1) + num4 = index5; + } + } + } + if (num4 != -1) + { + if (index3 == -1 | flag) + index3 = num4; + } + else + { + if (index3 == -1) + { + if (num2 == 2 || num2 == 1) + return false; + index3 = num3; + } + index4 = -1; + } + } + else + { + for (int index7 = 0; index7 < trackSwitchOption.Length; ++index7) + { + if (index2 == trackSwitchOption[index7]) + index3 = index7; + if (num1 == trackSwitchOption[index7]) + index4 = index7; + } + int num5 = 0; + int num6 = 0; + for (int index8 = 0; index8 < trackSwitchOption.Length; ++index8) + { + if (Minecart._trackType[trackSwitchOption[index8]] == num2) + { + if (Minecart._leftSideConnection[trackSwitchOption[index8]] == -1 || Minecart._rightSideConnection[trackSwitchOption[index8]] == -1) + ++num6; + else + ++num5; + } + } + if (num5 < 2 && num6 < 2) + return false; + bool flag1 = num5 == 0; + bool flag2 = false; + if (!flag1) + { + while (!flag2) + { + ++index4; + if (index4 >= trackSwitchOption.Length) + { + index4 = -1; + break; + } + if ((Minecart._leftSideConnection[trackSwitchOption[index4]] != Minecart._leftSideConnection[trackSwitchOption[index3]] || Minecart._rightSideConnection[trackSwitchOption[index4]] != Minecart._rightSideConnection[trackSwitchOption[index3]]) && Minecart._trackType[trackSwitchOption[index4]] == num2 && Minecart._leftSideConnection[trackSwitchOption[index4]] != -1 && Minecart._rightSideConnection[trackSwitchOption[index4]] != -1) + flag2 = true; + } + } + if (!flag2) + { + do + { + ++index3; + if (index3 >= trackSwitchOption.Length) + { + index3 = -1; + do + { + ++index3; + } + while (Minecart._trackType[trackSwitchOption[index3]] != num2 || (Minecart._leftSideConnection[trackSwitchOption[index3]] == -1 ? 1 : (Minecart._rightSideConnection[trackSwitchOption[index3]] == -1 ? 1 : 0)) != (flag1 ? 1 : 0)); + break; + } + } + while (Minecart._trackType[trackSwitchOption[index3]] != num2 || (Minecart._leftSideConnection[trackSwitchOption[index3]] == -1 ? 1 : (Minecart._rightSideConnection[trackSwitchOption[index3]] == -1 ? 1 : 0)) != (flag1 ? 1 : 0)); + } + } + bool flag3 = false; + switch (index3) + { + 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[index3]) + { + flag3 = true; + break; + } + break; + } + if (index4 == -1) + { + if (tileTrack.BackTrack() != (short) -1) + flag3 = true; + } + else if ((int) tileTrack.BackTrack() != trackSwitchOption[index4]) + flag3 = true; + switch (index3) + { + case -2: + tileTrack.FrontTrack(Minecart._firstPressureFrame); + break; + case -1: + tileTrack.FrontTrack((short) 0); + break; + default: + tileTrack.FrontTrack((short) trackSwitchOption[index3]); + break; + } + if (index4 == -1) + tileTrack.BackTrack((short) -1); + else + tileTrack.BackTrack((short) trackSwitchOption[index4]); + if (pound & flag3 && !mute) + WorldGen.KillTile(i, j, true); + return true; + } + + 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, + Action MinecartDust) + { + Vector2 Position1 = Position; + Vector2 Position2 = Position; + Vector2 zero = Vector2.Zero; + Vector2 Velocity = new Vector2(-12f, 0.0f); + Minecart.TrackCollision(ref Position1, ref Velocity, ref zero, Width, Height, followDown, followUp, 0, true, MinecartDust); + Vector2 vector2_1 = Position1 + Velocity; + Velocity = new Vector2(12f, 0.0f); + Minecart.TrackCollision(ref Position2, ref Velocity, ref zero, Width, Height, followDown, followUp, 0, true, MinecartDust); + Vector2 vector2_2 = Position2 + Velocity; + float num1 = vector2_2.Y - vector2_1.Y; + float num2 = vector2_2.X - vector2_1.X; + float num3 = num1 / num2; + double num4 = (double) vector2_1.Y + ((double) Position.X - (double) vector2_1.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 HitTrackSwitch(Vector2 Position, int Width, int Height) + { + 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; + int num = (int) ((double) vector2_2.X / 16.0); + int j = (int) ((double) vector2_2.Y / 16.0); + Wiring.HitSwitch(num, j); + NetMessage.SendData(59, number: num, number2: ((float) j)); + } + + 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 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..7bff954 --- /dev/null +++ b/Modules/AnchorDataModule.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.AnchorDataModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..fc478b7 --- /dev/null +++ b/Modules/AnchorTypesModule.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.AnchorTypesModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..87b15af --- /dev/null +++ b/Modules/LiquidDeathModule.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.LiquidDeathModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c363845 --- /dev/null +++ b/Modules/LiquidPlacementModule.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.LiquidPlacementModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d7fafb1 --- /dev/null +++ b/Modules/TileObjectAlternatesModule.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectAlternatesModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..e525482 --- /dev/null +++ b/Modules/TileObjectBaseModule.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectBaseModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..e314971 --- /dev/null +++ b/Modules/TileObjectCoordinatesModule.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectCoordinatesModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 TileObjectCoordinatesModule(TileObjectCoordinatesModule copyFrom = null, int[] drawHeight = null) + { + if (copyFrom == null) + { + this.width = 0; + this.padding = 0; + this.paddingFix = Point16.Zero; + this.styleWidth = 0; + this.styleHeight = 0; + this.calculated = false; + this.heights = drawHeight; + } + else + { + this.width = copyFrom.width; + this.padding = copyFrom.padding; + this.paddingFix = copyFrom.paddingFix; + 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..e814db1 --- /dev/null +++ b/Modules/TileObjectDrawModule.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectDrawModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Modules +{ + public class TileObjectDrawModule + { + public int yOffset; + public bool flipHorizontal; + public bool flipVertical; + public int stepDown; + + public TileObjectDrawModule(TileObjectDrawModule copyFrom = null) + { + if (copyFrom == null) + { + this.yOffset = 0; + this.flipHorizontal = false; + this.flipVertical = false; + this.stepDown = 0; + } + else + { + 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..cf88176 --- /dev/null +++ b/Modules/TileObjectStyleModule.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectStyleModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 TileObjectStyleModule(TileObjectStyleModule copyFrom = null) + { + if (copyFrom == null) + { + this.style = 0; + this.horizontal = false; + this.styleWrapLimit = 0; + 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; + } + } + } +} diff --git a/Modules/TileObjectSubTilesModule.cs b/Modules/TileObjectSubTilesModule.cs new file mode 100644 index 0000000..b87c924 --- /dev/null +++ b/Modules/TileObjectSubTilesModule.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectSubTilesModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..480179a --- /dev/null +++ b/Modules/TilePlacementHooksModule.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TilePlacementHooksModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..b0afa95 --- /dev/null +++ b/Mount.cs @@ -0,0 +1,2549 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Mount +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Achievements; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria +{ + public class Mount + { + public static int currentShader = 0; + 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 maxMounts = 15; + 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 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; + + 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[15]; + 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 = Main.rudolphMountTexture[0]; + mountData1.backTextureExtra = (Texture2D) null; + mountData1.frontTexture = Main.rudolphMountTexture[1]; + mountData1.frontTextureExtra = Main.rudolphMountTexture[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 = Main.pigronMountTexture; + mountData2.backTextureExtra = (Texture2D) null; + mountData2.frontTexture = (Texture2D) null; + mountData2.frontTextureExtra = (Texture2D) null; + 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.5f; + 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 = Main.bunnyMountTexture; + mountData3.backTextureExtra = (Texture2D) null; + mountData3.frontTexture = (Texture2D) null; + mountData3.frontTextureExtra = (Texture2D) null; + 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 = 10; + 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 = Main.slimeMountTexture; + mountData4.backTextureExtra = (Texture2D) null; + mountData4.frontTexture = (Texture2D) null; + mountData4.frontTextureExtra = (Texture2D) null; + 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.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 = (Texture2D) null; + mountData5.backTextureExtra = (Texture2D) null; + mountData5.frontTexture = Main.minecartMountTexture; + mountData5.frontTextureExtra = (Texture2D) null; + mountData5.textureWidth = mountData5.frontTexture.Width; + mountData5.textureHeight = mountData5.frontTexture.Height; + } + Mount.MountData mountData6 = new Mount.MountData(); + Mount.mounts[4] = mountData6; + mountData6.spawnDust = 56; + mountData6.buff = 131; + mountData6.heightBoost = 26; + mountData6.flightTimeMax = 0; + mountData6.fallDamage = 1f; + mountData6.runSpeed = 2f; + mountData6.dashSpeed = 2f; + mountData6.swimSpeed = 6f; + mountData6.acceleration = 0.08f; + mountData6.jumpHeight = 10; + mountData6.jumpSpeed = 3.15f; + mountData6.totalFrames = 12; + int[] numArray6 = new int[mountData6.totalFrames]; + for (int index = 0; index < numArray6.Length; ++index) + numArray6[index] = 26; + mountData6.playerYOffsets = numArray6; + mountData6.xOffset = 1; + mountData6.bodyFrame = 3; + mountData6.yOffset = 13; + mountData6.playerHeadOffset = 30; + mountData6.standingFrameCount = 1; + mountData6.standingFrameDelay = 12; + mountData6.standingFrameStart = 0; + mountData6.runningFrameCount = 6; + mountData6.runningFrameDelay = 12; + mountData6.runningFrameStart = 0; + mountData6.flyingFrameCount = 0; + mountData6.flyingFrameDelay = 0; + mountData6.flyingFrameStart = 0; + mountData6.inAirFrameCount = 1; + mountData6.inAirFrameDelay = 12; + mountData6.inAirFrameStart = 3; + mountData6.idleFrameCount = 0; + mountData6.idleFrameDelay = 0; + mountData6.idleFrameStart = 0; + mountData6.idleFrameLoop = false; + mountData6.swimFrameCount = 6; + mountData6.swimFrameDelay = 12; + mountData6.swimFrameStart = 6; + if (Main.netMode != 2) + { + mountData6.backTexture = Main.turtleMountTexture; + mountData6.backTextureExtra = (Texture2D) null; + mountData6.frontTexture = (Texture2D) null; + mountData6.frontTextureExtra = (Texture2D) null; + mountData6.textureWidth = mountData6.backTexture.Width; + mountData6.textureHeight = mountData6.backTexture.Height; + } + Mount.MountData mountData7 = new Mount.MountData(); + Mount.mounts[5] = mountData7; + mountData7.spawnDust = 152; + mountData7.buff = 132; + mountData7.heightBoost = 16; + mountData7.flightTimeMax = 320; + mountData7.fatigueMax = 320; + mountData7.fallDamage = 0.0f; + mountData7.usesHover = true; + mountData7.runSpeed = 2f; + mountData7.dashSpeed = 2f; + mountData7.acceleration = 0.16f; + mountData7.jumpHeight = 10; + mountData7.jumpSpeed = 4f; + mountData7.blockExtraJumps = true; + mountData7.totalFrames = 12; + int[] numArray7 = new int[mountData7.totalFrames]; + for (int index = 0; index < numArray7.Length; ++index) + numArray7[index] = 16; + numArray7[8] = 18; + mountData7.playerYOffsets = numArray7; + mountData7.xOffset = 1; + mountData7.bodyFrame = 3; + mountData7.yOffset = 4; + mountData7.playerHeadOffset = 18; + mountData7.standingFrameCount = 1; + mountData7.standingFrameDelay = 12; + mountData7.standingFrameStart = 0; + mountData7.runningFrameCount = 5; + mountData7.runningFrameDelay = 12; + mountData7.runningFrameStart = 0; + mountData7.flyingFrameCount = 3; + mountData7.flyingFrameDelay = 12; + mountData7.flyingFrameStart = 5; + mountData7.inAirFrameCount = 3; + mountData7.inAirFrameDelay = 12; + mountData7.inAirFrameStart = 5; + mountData7.idleFrameCount = 4; + mountData7.idleFrameDelay = 12; + mountData7.idleFrameStart = 8; + mountData7.idleFrameLoop = true; + mountData7.swimFrameCount = 0; + mountData7.swimFrameDelay = 12; + mountData7.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData7.backTexture = Main.beeMountTexture[0]; + mountData7.backTextureExtra = Main.beeMountTexture[1]; + mountData7.frontTexture = (Texture2D) null; + mountData7.frontTextureExtra = (Texture2D) null; + mountData7.textureWidth = mountData7.backTexture.Width; + mountData7.textureHeight = mountData7.backTexture.Height; + } + Mount.MountData mountData8 = new Mount.MountData(); + Mount.mounts[7] = mountData8; + mountData8.spawnDust = 226; + mountData8.spawnDustNoGravity = true; + mountData8.buff = 141; + mountData8.heightBoost = 16; + mountData8.flightTimeMax = 320; + mountData8.fatigueMax = 320; + mountData8.fallDamage = 0.0f; + mountData8.usesHover = true; + mountData8.runSpeed = 8f; + mountData8.dashSpeed = 8f; + mountData8.acceleration = 0.16f; + mountData8.jumpHeight = 10; + mountData8.jumpSpeed = 4f; + mountData8.blockExtraJumps = true; + mountData8.totalFrames = 8; + int[] numArray8 = new int[mountData8.totalFrames]; + for (int index = 0; index < numArray8.Length; ++index) + numArray8[index] = 16; + mountData8.playerYOffsets = numArray8; + mountData8.xOffset = 1; + mountData8.bodyFrame = 3; + mountData8.yOffset = 4; + mountData8.playerHeadOffset = 18; + mountData8.standingFrameCount = 8; + mountData8.standingFrameDelay = 4; + mountData8.standingFrameStart = 0; + mountData8.runningFrameCount = 8; + mountData8.runningFrameDelay = 4; + mountData8.runningFrameStart = 0; + mountData8.flyingFrameCount = 8; + mountData8.flyingFrameDelay = 4; + mountData8.flyingFrameStart = 0; + mountData8.inAirFrameCount = 8; + mountData8.inAirFrameDelay = 4; + mountData8.inAirFrameStart = 0; + mountData8.idleFrameCount = 0; + mountData8.idleFrameDelay = 12; + mountData8.idleFrameStart = 0; + mountData8.idleFrameLoop = true; + mountData8.swimFrameCount = 0; + mountData8.swimFrameDelay = 12; + mountData8.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData8.backTexture = (Texture2D) null; + mountData8.backTextureExtra = (Texture2D) null; + mountData8.frontTexture = Main.UFOMountTexture[0]; + mountData8.frontTextureExtra = Main.UFOMountTexture[1]; + mountData8.textureWidth = mountData8.frontTexture.Width; + mountData8.textureHeight = mountData8.frontTexture.Height; + } + Mount.MountData mountData9 = new Mount.MountData(); + Mount.mounts[8] = mountData9; + mountData9.spawnDust = 226; + mountData9.buff = 142; + mountData9.heightBoost = 16; + mountData9.flightTimeMax = 320; + mountData9.fatigueMax = 320; + mountData9.fallDamage = 1f; + mountData9.usesHover = true; + mountData9.swimSpeed = 4f; + mountData9.runSpeed = 6f; + mountData9.dashSpeed = 4f; + mountData9.acceleration = 0.16f; + mountData9.jumpHeight = 10; + mountData9.jumpSpeed = 4f; + mountData9.blockExtraJumps = true; + mountData9.emitsLight = true; + mountData9.lightColor = new Vector3(0.3f, 0.3f, 0.4f); + mountData9.totalFrames = 1; + int[] numArray9 = new int[mountData9.totalFrames]; + for (int index = 0; index < numArray9.Length; ++index) + numArray9[index] = 4; + mountData9.playerYOffsets = numArray9; + mountData9.xOffset = 1; + mountData9.bodyFrame = 3; + mountData9.yOffset = 4; + mountData9.playerHeadOffset = 18; + mountData9.standingFrameCount = 1; + mountData9.standingFrameDelay = 12; + mountData9.standingFrameStart = 0; + mountData9.runningFrameCount = 1; + mountData9.runningFrameDelay = 12; + mountData9.runningFrameStart = 0; + mountData9.flyingFrameCount = 1; + mountData9.flyingFrameDelay = 12; + mountData9.flyingFrameStart = 0; + mountData9.inAirFrameCount = 1; + mountData9.inAirFrameDelay = 12; + mountData9.inAirFrameStart = 0; + mountData9.idleFrameCount = 0; + mountData9.idleFrameDelay = 12; + mountData9.idleFrameStart = 8; + mountData9.swimFrameCount = 0; + mountData9.swimFrameDelay = 12; + mountData9.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData9.backTexture = Main.drillMountTexture[0]; + mountData9.backTextureGlow = Main.drillMountTexture[3]; + mountData9.backTextureExtra = (Texture2D) null; + mountData9.backTextureExtraGlow = (Texture2D) null; + mountData9.frontTexture = Main.drillMountTexture[1]; + mountData9.frontTextureGlow = Main.drillMountTexture[4]; + mountData9.frontTextureExtra = Main.drillMountTexture[2]; + mountData9.frontTextureExtraGlow = Main.drillMountTexture[5]; + mountData9.textureWidth = mountData9.frontTexture.Width; + mountData9.textureHeight = mountData9.frontTexture.Height; + } + Mount.drillTextureSize = new Vector2(80f, 80f); + Vector2 vector2_1 = new Vector2((float) mountData9.textureWidth, (float) (mountData9.textureHeight / mountData9.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) mountData9.textureWidth + ", " + (object) mountData9.textureHeight + "."); + Mount.MountData mountData10 = new Mount.MountData(); + Mount.mounts[9] = mountData10; + mountData10.spawnDust = 152; + mountData10.buff = 143; + mountData10.heightBoost = 16; + mountData10.flightTimeMax = 0; + mountData10.fatigueMax = 0; + mountData10.fallDamage = 0.0f; + mountData10.abilityChargeMax = 40; + mountData10.abilityCooldown = 20; + mountData10.abilityDuration = 0; + mountData10.runSpeed = 8f; + mountData10.dashSpeed = 8f; + mountData10.acceleration = 0.4f; + mountData10.jumpHeight = 22; + mountData10.jumpSpeed = 10.01f; + mountData10.blockExtraJumps = false; + mountData10.totalFrames = 12; + int[] numArray10 = new int[mountData10.totalFrames]; + for (int index = 0; index < numArray10.Length; ++index) + numArray10[index] = 16; + mountData10.playerYOffsets = numArray10; + mountData10.xOffset = 1; + mountData10.bodyFrame = 3; + mountData10.yOffset = 6; + mountData10.playerHeadOffset = 18; + mountData10.standingFrameCount = 6; + mountData10.standingFrameDelay = 12; + mountData10.standingFrameStart = 6; + mountData10.runningFrameCount = 6; + mountData10.runningFrameDelay = 12; + mountData10.runningFrameStart = 0; + mountData10.flyingFrameCount = 0; + mountData10.flyingFrameDelay = 12; + mountData10.flyingFrameStart = 0; + mountData10.inAirFrameCount = 1; + mountData10.inAirFrameDelay = 12; + mountData10.inAirFrameStart = 1; + mountData10.idleFrameCount = 0; + mountData10.idleFrameDelay = 12; + mountData10.idleFrameStart = 6; + mountData10.idleFrameLoop = true; + mountData10.swimFrameCount = 0; + mountData10.swimFrameDelay = 12; + mountData10.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData10.backTexture = Main.scutlixMountTexture[0]; + mountData10.backTextureExtra = (Texture2D) null; + mountData10.frontTexture = Main.scutlixMountTexture[1]; + mountData10.frontTextureExtra = Main.scutlixMountTexture[2]; + mountData10.textureWidth = mountData10.backTexture.Width; + mountData10.textureHeight = mountData10.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) (mountData10.textureWidth / 2), (float) (mountData10.textureHeight / mountData10.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) mountData10.textureWidth + ", " + (object) mountData10.textureHeight + "."); + for (int index = 0; index < Mount.scutlixEyePositions.Length; ++index) + Mount.scutlixEyePositions[index] -= Mount.scutlixTextureSize; + Mount.MountData mountData11 = new Mount.MountData(); + Mount.mounts[10] = mountData11; + mountData11.spawnDust = 15; + mountData11.buff = 162; + mountData11.heightBoost = 34; + mountData11.flightTimeMax = 0; + mountData11.fallDamage = 0.2f; + mountData11.runSpeed = 4f; + mountData11.dashSpeed = 12f; + mountData11.acceleration = 0.3f; + mountData11.jumpHeight = 10; + mountData11.jumpSpeed = 8.01f; + mountData11.totalFrames = 16; + int[] numArray11 = new int[mountData11.totalFrames]; + for (int index = 0; index < numArray11.Length; ++index) + numArray11[index] = 28; + numArray11[3] += 2; + numArray11[4] += 2; + numArray11[7] += 2; + numArray11[8] += 2; + numArray11[12] += 2; + numArray11[13] += 2; + numArray11[15] += 4; + mountData11.playerYOffsets = numArray11; + mountData11.xOffset = 5; + mountData11.bodyFrame = 3; + mountData11.yOffset = 1; + mountData11.playerHeadOffset = 31; + mountData11.standingFrameCount = 1; + mountData11.standingFrameDelay = 12; + mountData11.standingFrameStart = 0; + mountData11.runningFrameCount = 7; + mountData11.runningFrameDelay = 15; + mountData11.runningFrameStart = 1; + mountData11.dashingFrameCount = 6; + mountData11.dashingFrameDelay = 40; + mountData11.dashingFrameStart = 9; + mountData11.flyingFrameCount = 6; + mountData11.flyingFrameDelay = 6; + mountData11.flyingFrameStart = 1; + mountData11.inAirFrameCount = 1; + mountData11.inAirFrameDelay = 12; + mountData11.inAirFrameStart = 15; + mountData11.idleFrameCount = 0; + mountData11.idleFrameDelay = 0; + mountData11.idleFrameStart = 0; + mountData11.idleFrameLoop = false; + mountData11.swimFrameCount = mountData11.inAirFrameCount; + mountData11.swimFrameDelay = mountData11.inAirFrameDelay; + mountData11.swimFrameStart = mountData11.inAirFrameStart; + if (Main.netMode != 2) + { + mountData11.backTexture = Main.unicornMountTexture; + mountData11.backTextureExtra = (Texture2D) null; + mountData11.frontTexture = (Texture2D) null; + mountData11.frontTextureExtra = (Texture2D) null; + mountData11.textureWidth = mountData11.backTexture.Width; + mountData11.textureHeight = mountData11.backTexture.Height; + } + Mount.MountData mountData12 = new Mount.MountData(); + Mount.mounts[11] = mountData12; + mountData12.Minecart = true; + mountData12.MinecartDust = new Action(DelegateMethods.Minecart.SparksMech); + mountData12.spawnDust = 213; + mountData12.buff = 167; + mountData12.extraBuff = 166; + mountData12.heightBoost = 12; + mountData12.flightTimeMax = 0; + mountData12.fallDamage = 1f; + mountData12.runSpeed = 20f; + mountData12.dashSpeed = 20f; + mountData12.acceleration = 0.1f; + mountData12.jumpHeight = 15; + mountData12.jumpSpeed = 5.15f; + mountData12.blockExtraJumps = true; + mountData12.totalFrames = 3; + int[] numArray12 = new int[mountData12.totalFrames]; + for (int index = 0; index < numArray12.Length; ++index) + numArray12[index] = 9; + mountData12.playerYOffsets = numArray12; + mountData12.xOffset = -1; + mountData12.bodyFrame = 3; + mountData12.yOffset = 11; + mountData12.playerHeadOffset = 14; + mountData12.standingFrameCount = 1; + mountData12.standingFrameDelay = 12; + mountData12.standingFrameStart = 0; + mountData12.runningFrameCount = 3; + mountData12.runningFrameDelay = 12; + mountData12.runningFrameStart = 0; + mountData12.flyingFrameCount = 0; + mountData12.flyingFrameDelay = 0; + mountData12.flyingFrameStart = 0; + mountData12.inAirFrameCount = 0; + mountData12.inAirFrameDelay = 0; + mountData12.inAirFrameStart = 0; + mountData12.idleFrameCount = 0; + mountData12.idleFrameDelay = 0; + mountData12.idleFrameStart = 0; + mountData12.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData12.backTexture = (Texture2D) null; + mountData12.backTextureExtra = (Texture2D) null; + mountData12.frontTexture = Main.minecartMechMountTexture[0]; + mountData12.frontTextureGlow = Main.minecartMechMountTexture[1]; + mountData12.frontTextureExtra = (Texture2D) null; + mountData12.textureWidth = mountData12.frontTexture.Width; + mountData12.textureHeight = mountData12.frontTexture.Height; + } + Mount.MountData mountData13 = new Mount.MountData(); + Mount.mounts[12] = mountData13; + mountData13.spawnDust = 15; + mountData13.buff = 168; + mountData13.heightBoost = 14; + mountData13.flightTimeMax = 320; + mountData13.fatigueMax = 320; + mountData13.fallDamage = 0.0f; + mountData13.usesHover = true; + mountData13.runSpeed = 2f; + mountData13.dashSpeed = 1f; + mountData13.acceleration = 0.2f; + mountData13.jumpHeight = 4; + mountData13.jumpSpeed = 3f; + mountData13.swimSpeed = 16f; + mountData13.blockExtraJumps = true; + mountData13.totalFrames = 23; + int[] numArray13 = new int[mountData13.totalFrames]; + for (int index = 0; index < numArray13.Length; ++index) + numArray13[index] = 12; + mountData13.playerYOffsets = numArray13; + mountData13.xOffset = 2; + mountData13.bodyFrame = 3; + mountData13.yOffset = 16; + mountData13.playerHeadOffset = 31; + mountData13.standingFrameCount = 1; + mountData13.standingFrameDelay = 12; + mountData13.standingFrameStart = 8; + mountData13.runningFrameCount = 7; + mountData13.runningFrameDelay = 14; + mountData13.runningFrameStart = 8; + mountData13.flyingFrameCount = 8; + mountData13.flyingFrameDelay = 16; + mountData13.flyingFrameStart = 0; + mountData13.inAirFrameCount = 8; + mountData13.inAirFrameDelay = 6; + mountData13.inAirFrameStart = 0; + mountData13.idleFrameCount = 0; + mountData13.idleFrameDelay = 0; + mountData13.idleFrameStart = 0; + mountData13.idleFrameLoop = false; + mountData13.swimFrameCount = 8; + mountData13.swimFrameDelay = 4; + mountData13.swimFrameStart = 15; + if (Main.netMode != 2) + { + mountData13.backTexture = Main.cuteFishronMountTexture[0]; + mountData13.backTextureGlow = Main.cuteFishronMountTexture[1]; + mountData13.frontTexture = (Texture2D) null; + mountData13.frontTextureExtra = (Texture2D) null; + mountData13.textureWidth = mountData13.backTexture.Width; + mountData13.textureHeight = mountData13.backTexture.Height; + } + Mount.MountData mountData14 = new Mount.MountData(); + Mount.mounts[13] = mountData14; + mountData14.Minecart = true; + mountData14.MinecartDirectional = true; + mountData14.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + mountData14.spawnDust = 213; + mountData14.buff = 184; + mountData14.extraBuff = 185; + mountData14.heightBoost = 10; + mountData14.flightTimeMax = 0; + mountData14.fallDamage = 1f; + mountData14.runSpeed = 10f; + mountData14.dashSpeed = 10f; + mountData14.acceleration = 0.03f; + mountData14.jumpHeight = 12; + mountData14.jumpSpeed = 5.15f; + mountData14.blockExtraJumps = true; + mountData14.totalFrames = 3; + int[] numArray14 = new int[mountData14.totalFrames]; + for (int index = 0; index < numArray14.Length; ++index) + numArray14[index] = 8; + mountData14.playerYOffsets = numArray14; + mountData14.xOffset = 1; + mountData14.bodyFrame = 3; + mountData14.yOffset = 13; + mountData14.playerHeadOffset = 14; + mountData14.standingFrameCount = 1; + mountData14.standingFrameDelay = 12; + mountData14.standingFrameStart = 0; + mountData14.runningFrameCount = 3; + mountData14.runningFrameDelay = 12; + mountData14.runningFrameStart = 0; + mountData14.flyingFrameCount = 0; + mountData14.flyingFrameDelay = 0; + mountData14.flyingFrameStart = 0; + mountData14.inAirFrameCount = 0; + mountData14.inAirFrameDelay = 0; + mountData14.inAirFrameStart = 0; + mountData14.idleFrameCount = 0; + mountData14.idleFrameDelay = 0; + mountData14.idleFrameStart = 0; + mountData14.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData14.backTexture = (Texture2D) null; + mountData14.backTextureExtra = (Texture2D) null; + mountData14.frontTexture = Main.minecartWoodMountTexture; + mountData14.frontTextureExtra = (Texture2D) null; + mountData14.textureWidth = mountData14.frontTexture.Width; + mountData14.textureHeight = mountData14.frontTexture.Height; + } + Mount.MountData mountData15 = new Mount.MountData(); + Mount.mounts[14] = mountData15; + mountData15.spawnDust = 15; + mountData15.buff = 193; + mountData15.heightBoost = 8; + mountData15.flightTimeMax = 0; + mountData15.fallDamage = 0.2f; + mountData15.runSpeed = 8f; + mountData15.acceleration = 0.25f; + mountData15.jumpHeight = 20; + mountData15.jumpSpeed = 8.01f; + mountData15.totalFrames = 8; + int[] numArray15 = new int[mountData15.totalFrames]; + for (int index = 0; index < numArray15.Length; ++index) + numArray15[index] = 8; + numArray15[1] += 2; + numArray15[3] += 2; + numArray15[6] += 2; + mountData15.playerYOffsets = numArray15; + mountData15.xOffset = 4; + mountData15.bodyFrame = 3; + mountData15.yOffset = 9; + mountData15.playerHeadOffset = 10; + mountData15.standingFrameCount = 1; + mountData15.standingFrameDelay = 12; + mountData15.standingFrameStart = 0; + mountData15.runningFrameCount = 6; + mountData15.runningFrameDelay = 30; + mountData15.runningFrameStart = 2; + mountData15.inAirFrameCount = 1; + mountData15.inAirFrameDelay = 12; + mountData15.inAirFrameStart = 1; + mountData15.idleFrameCount = 0; + mountData15.idleFrameDelay = 0; + mountData15.idleFrameStart = 0; + mountData15.idleFrameLoop = false; + mountData15.swimFrameCount = mountData15.inAirFrameCount; + mountData15.swimFrameDelay = mountData15.inAirFrameDelay; + mountData15.swimFrameStart = mountData15.inAirFrameStart; + if (Main.netMode == 2) + return; + mountData15.backTexture = Main.basiliskMountTexture; + mountData15.backTextureExtra = (Texture2D) null; + mountData15.frontTexture = (Texture2D) null; + mountData15.frontTextureExtra = (Texture2D) null; + mountData15.textureWidth = mountData15.backTexture.Width; + mountData15.textureHeight = mountData15.backTexture.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._data.playerYOffsets[0] - this._data.playerYOffsets[this._frame] + this._data.playerYOffsets[0] / 4; + + public int PlayerHeadOffset => !this._active ? 0 : this._data.playerHeadOffset; + + public int HeightBoost => this._data.heightBoost; + + public static int GetHeightBoost(int MountType) => MountType <= -1 || MountType >= 15 ? 0 : Mount.mounts[MountType].heightBoost; + + public float RunSpeed + { + get + { + if (this._type == 4 && this._frameState == 4 || this._type == 12 && this._frameState == 4) + return this._data.swimSpeed; + if (this._type == 12 && this._frameState == 2) + return this._data.runSpeed + 11f; + return this._type == 5 && this._frameState == 2 ? this._data.runSpeed + (float) (4.0 * (1.0 - (double) (this._fatigue / this._fatigueMax))) : 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: + 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: + 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 Cart => this._data != null && this._active && this._data.Minecart; + + public bool Directional => this._data == null || this._data.MinecartDirectional; + + public Action MinecartDust => this._data == null ? new Action(DelegateMethods.Minecart.Sparks) : this._data.MinecartDust; + + 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; + + public bool CanHover => this._active && this._data.usesHover; + + public bool AbilityReady => this._abilityCooldown == 0; + + 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; + 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, 441, 0, 0.0f, mountedPlayer.whoAmI, ai0, ai1); + this._abilityCharging = true; + } + else + { + if (this._type != 9) + return; + this._abilityCharging = true; + } + } + + public void StopAbilityCharge() + { + if (this._type != 9) + return; + this._abilityCharging = false; + this._abilityCooldown = this._data.abilityCooldown; + this._abilityDuration = this._data.abilityDuration; + } + + 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); + 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.PerLinePoint plot = (Utils.PerLinePoint) ((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; + 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, 606, Damage, 0.0f, Main.myPlayer); + } + break; + } + } + + public bool Hover(Player mountedPlayer) + { + if (this._frameState == 2 || this._frameState == 4) + { + bool flag = true; + float num1 = 1f; + float num2 = mountedPlayer.gravity / Player.defaultGravity; + if (mountedPlayer.slowFall) + num2 /= 3f; + if ((double) num2 < 0.25) + num2 = 0.25f; + if (this._type != 7 && this._type != 8 && this._type != 12) + { + if (this._flyTime > 0) + --this._flyTime; + else if ((double) this._fatigue < (double) this._fatigueMax) + this._fatigue += num2; + else + flag = false; + } + if (this._type == 12 && !mountedPlayer.MountFishronSpecial) + num1 = 0.5f; + float num3 = this._fatigue / this._fatigueMax; + if (this._type == 7 || this._type == 8 || this._type == 12) + num3 = 0.0f; + float num4 = 4f * num3; + float num5 = 4f * num3; + if ((double) num4 == 0.0) + num4 = -1f / 1000f; + if ((double) num5 == 0.0) + num5 = -1f / 1000f; + float num6 = mountedPlayer.velocity.Y; + if (((mountedPlayer.controlUp ? 1 : (mountedPlayer.controlJump ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + num4 = (float) (-2.0 - 6.0 * (1.0 - (double) num3)); + num6 -= this._data.acceleration * num1; + } + else if (mountedPlayer.controlDown) + { + num6 += this._data.acceleration * num1; + num5 = 8f; + } + 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; + mountedPlayer.fallStart = (int) ((double) mountedPlayer.position.Y / 16.0); + } + else if (this._type != 7 && this._type != 8 && this._type != 12) + mountedPlayer.velocity.Y += mountedPlayer.gravity * mountedPlayer.gravDir; + else if ((double) mountedPlayer.velocity.Y == 0.0) + mountedPlayer.velocity.Y = 1f / 1000f; + if (this._type == 7) + { + float num7 = mountedPlayer.velocity.X / this._data.dashSpeed; + if ((double) num7 > 0.95) + num7 = 0.95f; + if ((double) num7 < -0.95) + num7 = -0.95f; + float num8 = (float) (0.785398185253143 * (double) num7 / 2.0); + float num9 = 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 * num9, 0.0f); + mountedPlayer.fullRotation = num8; + } + else if (this._type == 8) + { + float num10 = mountedPlayer.velocity.X / this._data.dashSpeed; + if ((double) num10 > 0.95) + num10 = 0.95f; + if ((double) num10 < -0.95) + num10 = -0.95f; + float num11 = (float) (0.785398185253143 * (double) num10 / 2.0); + mountedPlayer.fullRotation = num11; + Mount.DrillMountData mountSpecificData = (Mount.DrillMountData) this._mountSpecificData; + float num12 = mountSpecificData.outerRingRotation + mountedPlayer.velocity.X / 80f; + if ((double) num12 > 3.14159274101257) + num12 -= 6.283185f; + else if ((double) num12 < -3.14159274101257) + num12 += 6.283185f; + mountSpecificData.outerRingRotation = num12; + } + return true; + } + + 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: + 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 (flag2) + { + 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, Utils.SelectRandom(Main.rand, 176, 177, 179))]; + 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; + 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 (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); + 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; + } + 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); + ++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 num13 = (int) ((double) (this._idleTime - this._idleTimeNext) / (double) idleFrameDelay); + if (num13 >= this._data.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 + num13; + if (this._type != 5) + break; + this._frameExtra = this._frame; + 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 num14; + switch (this._type) + { + case 6: + num14 = this._flipDraw ? velocity.X : -velocity.X; + break; + case 9: + num14 = !this._flipDraw ? Math.Abs(velocity.X) : -Math.Abs(velocity.X); + break; + case 13: + num14 = this._flipDraw ? velocity.X : -velocity.X; + break; + default: + num14 = Math.Abs(velocity.X); + break; + } + this._frameCounter += num14; + if ((double) num14 >= 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) + break; + 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; + 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) + break; + this._frame = this._data.swimFrameStart; + break; + case 5: + float num15; + switch (this._type) + { + case 6: + num15 = this._flipDraw ? velocity.X : -velocity.X; + break; + case 9: + num15 = !this._flipDraw ? Math.Abs(velocity.X) : -Math.Abs(velocity.X); + break; + case 13: + num15 = this._flipDraw ? velocity.X : -velocity.X; + break; + default: + num15 = Math.Abs(velocity.X); + break; + } + this._frameCounter += num15; + if ((double) num15 >= 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 UpdateEffects(Player mountedPlayer) + { + mountedPlayer.autoJump = this.AutoJump; + switch (this._type) + { + case 8: + if (mountedPlayer.ownedProjectileCounts[453] >= 1) + break; + this._abilityActive = false; + break; + case 9: + Vector2 center = mountedPlayer.Center; + Vector2 mousePosition = center; + bool flag1 = false; + float num1 = 1500f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + Vector2 v = npc.Center - center; + float num2 = v.Length(); + if ((double) Vector2.Distance(mousePosition, center) > (double) num2 && (double) num2 < (double) num1 || !flag1) + { + bool flag2 = true; + float num3 = Math.Abs(v.ToRotation()); + if (mountedPlayer.direction == 1 && (double) num3 > 1.04719759490799) + flag2 = false; + else if (mountedPlayer.direction == -1 && (double) num3 < 2.09439514610459) + flag2 = false; + if (Collision.CanHitLine(center, 0, 0, npc.position, npc.width, npc.height) & flag2) + { + num1 = num2; + mousePosition = npc.Center; + flag1 = true; + } + } + } + } + if (flag1) + { + if (this._abilityCooldown == 0 && mountedPlayer.whoAmI == Main.myPlayer) + { + this.AimAbility(mountedPlayer, mousePosition); + 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.doubleJumpUnicorn = 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 num4 = (float) (1.0 + (double) Math.Abs(mountedPlayer.velocity.X) / (double) this.RunSpeed * 2.5); + mountedPlayer.statDefense += (int) (2.0 * (double) num4); + int num5 = Math.Sign(mountedPlayer.velocity.X); + if (num5 == 0) + num5 = mountedPlayer.direction; + if (Main.netMode != 2) + { + Vector3 vector3_2 = vector3_1 * num4; + 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 num6 = -24f; + if (mountedPlayer.direction != num5) + num6 = -22f; + if (num5 == -1) + ++num6; + Vector2 vector2_1 = new Vector2(num6 * (float) num5, -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 (num5 == 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 num7 = (int) Vector2.Distance(vector2_3, vector2_4) / 3; + if ((double) Vector2.Distance(vector2_3, vector2_4) % 3.0 != 0.0) + ++num7; + for (float num8 = 1f; (double) num8 <= (double) num7; ++num8) + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.Center, 0, 0, 182)]; + dust.position = Vector2.Lerp(vector2_4, vector2_3, num8 / (float) num7); + 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 num9 = 60; + int num10 = 0; + float num11 = 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) num5 == -1.0 ? 3.141593f : 0.0f))) < 0.785398185253143) + { + Vector2 v = npc.position + npc.Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) - minecartMechPoint; + num11 += v.ToRotation(); + ++num10; + 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 = num9; + 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; + mountedPlayer.thrownDamage += 0.15f; + } + if (mountedPlayer.statLife <= mountedPlayer.statLifeMax2 / 2) + mountedPlayer.MountFishronSpecialCounter = 60f; + if (!mountedPlayer.wet) + break; + mountedPlayer.MountFishronSpecialCounter = 300f; + 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; + 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; + 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 frameExtra = this._frameExtra; + int direction = 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 != frameExtra || mountedPlayer.direction != direction; + 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; + texture2 = this._data.backTextureGlow; + break; + case 1: + texture1 = this._data.backTextureExtra; + texture2 = this._data.backTextureExtraGlow; + break; + case 2: + if (this._type == 0 && this._idleTime >= this._idleTimeNext) + return; + texture1 = this._data.frontTexture; + texture2 = this._data.frontTextureGlow; + break; + case 3: + texture1 = this._data.frontTextureExtra; + texture2 = this._data.frontTextureExtraGlow; + break; + default: + texture1 = (Texture2D) null; + texture2 = (Texture2D) null; + break; + } + 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 = false; + int num2; + switch (this._type) + { + case 5: + switch (drawType) + { + case 0: + num2 = this._frame; + break; + case 1: + num2 = this._frameExtra; + break; + default: + num2 = 0; + break; + } + break; + case 9: + flag1 = true; + switch (drawType) + { + case 0: + num2 = this._frame; + break; + case 2: + num2 = this._frameExtra; + break; + case 3: + num2 = this._frameExtra; + break; + default: + num2 = 0; + break; + } + break; + default: + num2 = this._frame; + break; + } + int height = this._data.textureHeight / this._data.totalFrames; + Rectangle rectangle1 = new Rectangle(0, height * num2, 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 num3 = 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 * num3; + 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 type1 = 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; + case 11: + effect = Math.Sign(drawPlayer.velocity.X) == -drawPlayer.direction ? playerEffect ^ SpriteEffects.FlipHorizontally : playerEffect; + break; + default: + effect = playerEffect; + break; + } + bool flag2 = false; + int type2 = this._type; + DrawData drawData; + 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); + } + if (this._type != 8 || drawType != 3) + return; + Mount.DrillMountData mountSpecificData2 = (Mount.DrillMountData) this._mountSpecificData; + Rectangle rectangle2 = new Rectangle(0, 0, 1, 1); + Vector2 vector2_1 = Mount.drillDiodePoint1.RotatedBy((double) mountSpecificData2.diodeRotation); + Vector2 vector2_2 = Mount.drillDiodePoint2.RotatedBy((double) mountSpecificData2.diodeRotation); + for (int index1 = 0; index1 < mountSpecificData2.beams.Length; ++index1) + { + Mount.DrillBeam beam = mountSpecificData2.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(Main.magicPixel, vector2_4 + Position, new Rectangle?(rectangle2), color4, rotation2 - 1.570796f, Vector2.Zero, scale2, SpriteEffects.None, 0); + drawData.ignorePlayerRotation = true; + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + } + } + } + } + + 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; + if (Main.netMode != 2) + { + for (int index1 = 0; index1 < 100; ++index1) + { + if (this._type == 6 || this._type == 11 || this._type == 13) + { + 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 index3 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust); + 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; + } + } + } + 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 >= 15 || 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; + 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; + 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 (Main.netMode != 2) + { + for (int index1 = 0; index1 < 100; ++index1) + { + if (this._type == 6 || this._type == 11 || this._type == 13) + { + 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 index3 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, this._data.spawnDust); + 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 (mountedPlayer.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(13, number: mountedPlayer.whoAmI); + } + + public bool CanMount(int m, Player mountingPlayer) + { + int Height = 42 + Mount.mounts[m].heightBoost; + return Collision.IsClearSpotTest(mountingPlayer.position + new Vector2(0.0f, (float) (mountingPlayer.height - Height)) + mountingPlayer.velocity, 16f, mountingPlayer.width, Height, true, true); + } + + 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 MountData + { + public Texture2D backTexture; + public Texture2D backTextureGlow; + public Texture2D backTextureExtra; + public Texture2D backTextureExtraGlow; + public Texture2D frontTexture; + public Texture2D frontTextureGlow; + public Texture2D frontTextureExtra; + public Texture2D frontTextureExtraGlow; + 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 Action MinecartDust; + public Vector3 lightColor = Vector3.One; + public bool emitsLight; + } + } +} diff --git a/NPC.cs b/NPC.cs new file mode 100644 index 0000000..45abb32 --- /dev/null +++ b/NPC.cs @@ -0,0 +1,39709 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.NPC +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Utilities; +using Terraria.World.Generation; + +namespace Terraria +{ + public class NPC : Entity + { + private const int NPC_TARGETS_START = 300; + 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 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 = 150; + public static int[] killCount = new int[580]; + public static float waveKills = 0.0f; + public static int waveNumber = 0; + public const float nameOverIncrement = 0.025f; + public const float nameOverDistance = 400f; + public float nameOver; + public bool SpawnedFromStatue; + public bool dripping; + public bool drippingSlime; + public int altTexture; + public Vector2 visualOffset = 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; + 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 byte npcNameLookup; + 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[206]; + public bool midas; + public bool ichor; + public bool onFire; + public bool onFire2; + public bool onFrostBurn; + public bool poisoned; + 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 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 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[580]; + private static int spawnRate = NPC.defaultSpawnRate; + private static int maxSpawns = NPC.defaultMaxSpawns; + public int soundDelay; + 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 float extraValue; + public bool dontTakeDamage; + public int netID; + public bool townNPC; + public static bool travelNPC = false; + public bool homeless; + public int homeTileX = -1; + public int homeTileY = -1; + 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 reflectingProjectiles; + public int lastPortalColorIndex; + public static int[,] cavernMonsterType = new int[2, 3]; + private static int ignorePlayerInteractions = 0; + + public bool CanTalk => (this.townNPC || this.type == 453) && 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] = 60; + 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] = 120; + numArray[0, 1, 0, 2] = 3; + numArray[0, 1, 1, 2] = 90; + numArray[0, 1, 0, 3] = 0; + numArray[0, 1, 1, 3] = 120; + numArray[0, 1, 0, 4] = 2; + numArray[0, 1, 1, 4] = 390; + numArray[0, 2, 0, 0] = 3; + numArray[0, 2, 1, 0] = 90; + numArray[0, 2, 0, 1] = 0; + numArray[0, 2, 1, 1] = 120; + numArray[0, 2, 0, 2] = 2; + numArray[0, 2, 1, 2] = 435; + numArray[0, 2, 0, 3] = 0; + numArray[0, 2, 1, 3] = 120; + 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 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 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 < 580) + NPC.npcsFoundForCheckActive[npc.type] = true; + } + } + + public static string getNewNPCName(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 "Finn"; + case 20: + return "Isaac"; + case 21: + return "Joseph"; + 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(26)) + { + 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(22)) + { + 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 "Bryce"; + case 15: + return "Miles"; + case 16: + return "Charles"; + case 17: + return "Adam"; + case 18: + return "Tyler"; + case 19: + return "Jey"; + case 20: + 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; + default: + return ""; + } + } + + public NetworkText GetTypeNetName() => NetworkText.FromKey(Lang.GetNPCName(this.netID).Key); + + 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); + } + 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 && Main.npc[index].type == type) + { + ++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 TypeToHeadIndex(int type) + { + switch (type) + { + 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; + default: + return -1; + } + } + + public static int HeadIndexToType(int type) + { + switch (type) + { + 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; + 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 = 20; + 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) + { + bool flag = false; + int Type = NPCID.FromNetId(id); + this.SetDefaults(0); + switch (id) + { + case -65: + this.SetDefaults(Type, 1.21f); + 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(Type, 0.87f); + 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(Type, 1.16f); + 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(Type, 0.78f); + 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(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 -60: + this.SetDefaults(Type, 0.92f); + 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(Type, 1.15f); + 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(Type, 0.8f); + 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(Type, 1.25f); + 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(Type, 0.85f); + 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(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 -54: + this.SetDefaults(Type, 0.9f); + 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(Type, 1.15f); + 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(Type, 0.85f); + 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(Type, 1.13f); + 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(Type, 0.87f); + 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(Type, 1.07f); + 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(Type, 0.93f); + 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(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 -46: + this.SetDefaults(Type, 0.9f); + 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(Type, 1.05f); + 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(Type, 0.87f); + 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(Type, 1.15f); + 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(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 -41: + this.SetDefaults(Type, 0.85f); + 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(Type, 0.9f); + 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(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 -38: + this.SetDefaults(Type, 1.15f); + 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(Type, 1.08f); + 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(Type, 0.92f); + 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(Type, 1.13f); + 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(Type, 0.87f); + 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(Type, 1.11f); + 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(Type, 0.89f); + 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(Type, 1.13f); + 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(Type, 0.93f); + 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(Type, 1.15f); + 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(Type, 0.85f); + 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(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 -26: + this.SetDefaults(Type, 0.9f); + 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(Type, 1.15f); + 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(Type, 0.85f); + 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(Type, 1.15f); + 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(Type, 0.85f); + 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(Type, 1.2f); + 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(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(Type, 0.9f); + 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(Type, 0.8f); + 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(Type, 1.2f); + 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(Type, 0.85f); + 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(Type, 1.15f); + 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(Type, 1.15f); + 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(Type, 0.9f); + 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(Type, 1.15f); + 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(Type, 0.85f); + 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(Type, 1.1f); + this.damage = 18; + this.defense = 6; + this.life = 60; + this.color = new Color(143, 215, 93, 100); + this.value = 500f; + flag = true; + break; + case -9: + this.SetDefaults(Type, 1.2f); + this.damage = 15; + this.defense = 7; + this.life = 45; + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, 100); + this.value = 10f; + flag = true; + break; + case -8: + this.SetDefaults(Type, 1.025f); + this.damage = 12; + this.defense = 4; + this.life = 35; + this.color = new Color((int) byte.MaxValue, 30, 0, 100); + this.value = 8f; + flag = true; + break; + case -7: + this.SetDefaults(Type, 1.2f); + 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; + flag = true; + break; + case -6: + this.SetDefaults(Type, 1.05f); + this.damage = 15; + this.defense = 4; + this.life = 45; + this.color = new Color(0, 0, 0, 50); + this.value = 20f; + flag = true; + break; + case -5: + this.SetDefaults(Type, 0.9f); + 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; + flag = true; + break; + case -4: + this.SetDefaults(Type, 0.6f); + this.damage = 5; + this.defense = 5; + this.life = 150; + this.knockBackResist *= 1.4f; + this.color = new Color(250, 30, 90, 90); + this.value = 10000f; + flag = true; + this.rarity = 1; + break; + case -3: + this.SetDefaults(Type, 0.9f); + this.damage = 6; + this.defense = 0; + this.life = 14; + this.knockBackResist *= 1.2f; + this.color = new Color(0, 220, 40, 100); + this.value = 3f; + flag = true; + break; + case -2: + this.SetDefaults(Type, 0.9f); + this.damage = 45; + this.defense = 20; + this.life = 90; + this.knockBackResist *= 1.2f; + this.value = 100f; + flag = true; + break; + case -1: + this.SetDefaults(Type, 0.6f); + this.damage = 45; + this.defense = 10; + this.life = 90; + this.knockBackResist *= 1.2f; + this.value = 100f; + flag = true; + break; + default: + return; + } + this.netID = id; + this.lifeMax = this.life; + this.defDamage = this.damage; + this.defDefense = this.defense; + if (!(Main.expertMode & flag)) + return; + this.scaleStats(); + } + + 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(int Type, float scaleOverride = -1f) + { + if (Type < 0) + { + this.SetDefaultsFromNetId(Type); + } + else + { + this.waterMovementSpeed = this.lavaMovementSpeed = 0.5f; + this.honeyMovementSpeed = 0.25f; + this.altTexture = 0; + this.nameOver = 0.0f; + this.takenDamageMultiplier = 1f; + this.extraValue = 0.0f; + 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.npcNameLookup = (byte) 0; + this.netStream = (byte) 32; + bool flag = false; + this.netID = 0; + this.netAlways = false; + this.netSpam = 0; + this.SpawnedFromStatue = false; + 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 < 206; ++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.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.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.reflectingProjectiles = false; + this.canGhostHeal = true; + this.javelined = false; + this.daybreak = false; + this.celled = false; + this.dryadBane = false; + this.betsysCurse = false; + this.oiled = 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.timeLeft = NPC.activeTime * 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 = 65; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 300f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + 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 = 300f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + 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 = 220; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 300f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + 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; + } + 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.timeLeft = NPC.activeTime * 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.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + 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 = 50; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 8000f; + } + 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.timeLeft = NPC.activeTime * 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.timeLeft = NPC.activeTime * 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; + } + 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.NPCDeath31; + this.knockBackResist = 0.25f; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + this.timeLeft = NPC.activeTime * 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.NPCDeath31; + this.knockBackResist = 0.25f; + this.value = 500f; + this.timeLeft = NPC.activeTime * 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.NPCDeath31; + this.knockBackResist = 0.25f; + this.value = 100f; + this.timeLeft = NPC.activeTime * 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.NPCDeath31; + this.knockBackResist = 0.25f; + this.value = 100f; + this.timeLeft = NPC.activeTime * 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; + } + 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 = 10000f; + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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.timeLeft = NPC.activeTime * 30; + this.boss = true; + this.value = 100000f; + 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 = 90f; + 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 = 25f; + 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.timeLeft = NPC.activeTime * 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.timeLeft = NPC.activeTime * 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.timeLeft = NPC.activeTime * 2; + this.buffImmune[20] = true; + } + else if (this.type == 240) + { + this.noGravity = true; + this.width = 50; + this.height = 20; + 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.timeLeft = NPC.activeTime * 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; + } + 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.0f; + this.noGravity = true; + this.noTileCollide = true; + this.timeLeft = NPC.activeTime * 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 = 40; + this.defense = 14; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.alpha = 100; + this.value = 700f; + flag = true; + this.knockBackResist = 0.7f; + } + 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; + } + 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 = 10000f; + 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 = 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) 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 = 10000f; + this.boss = true; + this.netAlways = true; + this.timeLeft = NPC.activeTime * 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 = 12; + 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 = 80; + 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.timeLeft = NPC.activeTime * 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 = 0.0f; + 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; + } + 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 = 10000f; + this.boss = true; + this.netAlways = true; + this.timeLeft = NPC.activeTime * 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.timeLeft = NPC.activeTime * 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 = 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) 2892; + this.rarity = 3; + } + else if (this.type == 446) + { + this.width = 14; + this.height = 12; + 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; + } + 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 = 2; + } + 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; + } + 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.NPCDeath44; + 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 = 34; + this.defense = 0; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 140f; + } + else if (this.type == 514) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 18; + this.defense = 12; + this.lifeMax = 80; + 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; + this.npcSlots = 0.0f; + } + else if (this.type == 515) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 16; + this.defense = 20; + this.lifeMax = 80; + 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; + 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 = 33; + this.height = 31; + this.aiStyle = 3; + this.damage = 24; + this.defense = 16; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit31; + this.DeathSound = SoundID.NPCDeath34; + this.knockBackResist = 0.2f; + this.value = 80f; + this.buffImmune[31] = false; + this.npcSlots = 0.8f; + } + else if (this.type == 509) + { + this.width = 40; + this.height = 31; + this.aiStyle = 44; + this.damage = 30; + this.defense = 12; + this.lifeMax = 50; + this.knockBackResist = 0.6f; + 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.timeLeft = NPC.activeTime * 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.timeLeft = NPC.activeTime * 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 = 32; + 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.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; + } + 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 = 40; + 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 = 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; + } + else if (this.type == 28) + { + this.scale = 1.1f; + this.width = 18; + this.height = 40; + 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 = 40; + 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 = 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; + } + else if (this.type == 471) + { + this.width = 18; + this.height = 40; + 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; + } + 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 = 11; + this.defense = 8; + this.lifeMax = 60; + 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.8f; + 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 = 10; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.8f; + this.value = 130f; + this.behindTiles = true; + } + 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; + } + if (flag) + { + for (int index = 0; index < 206; ++index) + this.buffImmune[index] = true; + } + if (Main.dedServ) + this.frame = new Microsoft.Xna.Framework.Rectangle(); + else if (Main.NPCLoaded[this.type]) + this.frame = new Microsoft.Xna.Framework.Rectangle(0, 0, Main.npcTexture[this.type].Width, Main.npcTexture[this.type].Height / Main.npcFrameCount[this.type]); + else + this.setFrameSize = true; + if ((double) scaleOverride > 0.0) + { + 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 = scaleOverride; + 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.expertMode) + return; + this.scaleStats(); + } + } + + private void LazySetLiquidMovementDD2() + { + this.waterMovementSpeed = 1f; + this.lavaMovementSpeed = 1f; + this.honeyMovementSpeed = 1f; + } + + public static void setWorldMonsters() + { + 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 void scaleStats() + { + if (!Main.expertMode) + return; + if (this.friendly) + { + int life = this.life; + } + if ((this.type < 0 || !NPCID.Sets.NeedsExpertScaling[this.type]) && (this.life <= 5 || this.damage == 0 || this.friendly || this.townNPC)) + return; + bool flag = this.type >= 0 && NPCID.Sets.ProjectileNPC[this.type]; + if (this.type != 5 && (this.type < 13 || this.type > 15) && this.type != 267 && (this.type < 113 || this.type > 119) && 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) + { + this.damage = (int) ((double) this.damage * 0.600000023841858); + this.lifeMax = (int) ((double) this.lifeMax * 0.800000011920929); + this.defense = (int) ((double) this.defense * 0.800000011920929); + } + if (!flag) + { + this.value = (float) (int) ((double) this.value * 2.5); + this.lifeMax = (int) ((double) this.lifeMax * (double) Main.expertLife); + } + this.damage = (int) ((double) this.damage * (double) Main.expertDamage); + this.knockBackResist *= Main.expertKnockBack; + int num4 = 0; + float num5 = 1f; + float num6 = 0.35f; + if (Main.netMode != 0) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + ++num4; + } + for (int index = 1; index < num4; ++index) + { + num5 += num6; + num6 += (float) ((1.0 - (double) num6) / 3.0); + } + } + if ((double) num5 > 8.0) + num5 = (float) (((double) num5 * 2.0 + 8.0) / 3.0); + if ((double) num5 > 1000.0) + num5 = 1000f; + if (this.type == 5) + this.lifeMax = (int) ((double) this.lifeMax * 0.75); + if (this.type == 4) + this.lifeMax = (int) ((double) this.lifeMax * 0.65 * (double) num5); + if (this.type >= 13 && this.type <= 15) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) num5); + 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.lifeMax = (int) ((double) this.lifeMax * 0.85 * (double) num5); + this.damage = (int) ((double) this.damage * 0.9); + this.scale *= 1.05f; + } + if (this.type == 50) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) num5); + this.damage = (int) ((double) this.damage * 0.8); + } + if (this.type == 471) + this.lifeMax = (int) ((double) this.lifeMax * 0.85 * ((double) num5 * 2.0 + 1.0) / 3.0); + if (this.type == 472) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.85 * ((double) num5 + 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) num5); + 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) num5); + this.damage = (int) ((double) this.damage * 1.1); + } + else if (this.type == 36) + { + this.lifeMax = (int) ((double) this.lifeMax * 1.3 * (double) num5); + 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) num5); + this.damage = (int) ((double) this.damage * 1.5); + } + else if (this.type == 115) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) num5); + if (num4 > 1) + this.knockBackResist *= 1f - num6; + this.defense += 6; + } + else if (this.type == 116) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) num5); + if (num4 > 1) + this.knockBackResist *= 1f - num6; + } + else if (this.type == 117 || this.type == 118 || this.type == 119) + this.lifeMax = (int) ((double) this.lifeMax * 0.8); + if (this.type >= 134 && this.type <= 136) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) num5); + 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) num5 * 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) num5); + this.damage = (int) ((double) this.damage * 0.85); + } + if (this.type >= 125 && this.type <= 126) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) num5); + this.damage = (int) ((double) this.damage * 0.85); + } + if (this.type >= 262 && this.type <= 262) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) num5); + this.damage = (int) ((double) this.damage * 1.15); + } + if (this.type >= 245 && this.type <= 249) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) num5); + this.damage = (int) ((double) this.damage * 0.8); + } + if (this.type == 370) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.6 * (double) num5); + 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) num5); + 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) num5); + this.damage = (int) ((double) this.damage * 0.75); + } + if (this.type == 551) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) num5); + this.damage = (int) ((double) this.damage * 0.65); + } + 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); + 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); + this.damage = (int) ((double) this.damage * 0.75); + break; + } + this.defDefense = this.defense; + this.defDamage = this.damage; + this.life = this.lifeMax; + } + + 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; + } + 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 (119166 instructions) + } + + private void AI_069_DukeFishron() + { + bool expertMode = Main.expertMode; + float num1 = expertMode ? 0.6f * Main.damageMultiplier : 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) + { + 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; + if (this.timeLeft > 10) + this.timeLeft = 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; + } + Main.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) + Main.PlaySound(29, (int) center.X, (int) center.Y, 20); + if ((double) this.ai[2] % (double) num7 == 0.0) + { + Main.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)) + Main.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)) + Main.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) + Main.PlaySound(29, (int) center.X, (int) center.Y, 20); + if ((double) this.ai[2] % (double) num15 == 0.0) + { + Main.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)) + Main.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)) + Main.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)) + Main.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) + Main.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; + 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 Damage = 22; + if (Main.expertMode) + Damage = 18; + int Type = 100; + vector2.X += SpeedX * 5f; + vector2.Y += SpeedY * 5f; + int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, 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; + 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; + Main.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.target < 0 || this.target == (int) byte.MaxValue || Main.player[this.target].dead) + this.TargetClosest(); + 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 == 252) + { + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + 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); + } + 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.localAI[0]; + float num5 = (float) (((double) this.localAI[0] - 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 = Main.player[this.target].position.X + (float) (Main.player[this.target].width / 2); + float num7 = Main.player[this.target].position.Y + (float) (Main.player[this.target].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 flag = false; + if ((double) num12 > 600.0) + flag = 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; + } + if (this.type == 6 || 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) + { + if ((double) num13 > 100.0 || this.type == 42 || this.type == 94 || this.type == 176 || this.type == 210 || this.type == 211 || this.type >= 231 && this.type <= 235) + { + ++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.velocity.X += SpeedX1 * 0.007f; + this.velocity.Y += SpeedY1 * 0.007f; + } + } + if (Main.player[this.target].dead) + { + SpeedX1 = (float) ((double) this.direction * (double) num1 / 2.0); + SpeedY1 = (float) (-(double) num1 / 2.0); + } + if ((double) this.velocity.X < (double) SpeedX1) + { + this.velocity.X += num2; + if (this.type != 173 && this.type != 6 && this.type != 42 && (this.type < 231 || this.type > 235) && this.type != 94 && this.type != 139 && (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 (this.type != 173 && this.type != 6 && this.type != 42 && (this.type < 231 || this.type > 235) && this.type != 94 && this.type != 139 && (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 (this.type != 173 && this.type != 6 && this.type != 42 && (this.type < 231 || this.type > 235) && this.type != 94 && this.type != 139 && (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 (this.type != 173 && this.type != 6 && this.type != 42 && (this.type < 231 || this.type > 235) && this.type != 94 && this.type != 139 && (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 (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + int Damage = 25; + if (Main.expertMode) + Damage = 22; + int Type = 84; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX1, SpeedY1, Type, Damage, 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.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 == 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 num15 = 0.7f; + if (this.type == 6 || this.type == 173) + num15 = 0.4f; + if (this.collideX) + { + this.netUpdate = true; + this.velocity.X = this.oldVelocity.X * -num15; + 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 * -num15; + 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; + } + 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; + } + 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; + } + } + 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.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) + { + Main.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 ((double) Main.player[this.target].stealth == 0.0 && Main.player[this.target].itemAnimation == 0) + this.ai[1] = 0.0f; + if ((double) this.ai[1] >= 130.0) + { + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + float num16 = 8f; + Vector2 vector2_2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) (this.height / 2)); + float num17 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2_2.X + (float) Main.rand.Next(-20, 21); + float num18 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2_2.Y + (float) Main.rand.Next(-20, 21); + if ((double) num17 < 0.0 && (double) this.velocity.X < 0.0 || (double) num17 > 0.0 && (double) this.velocity.X > 0.0) + { + float num19 = (float) Math.Sqrt((double) num17 * (double) num17 + (double) num18 * (double) num18); + float num20 = num16 / num19; + float SpeedX2 = num17 * num20; + float SpeedY2 = num18 * num20; + 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 & flag) + { + 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 && this.type == 94 && !Main.player[this.target].dead) + { + if (this.justHit) + this.localAI[0] = 0.0f; + ++this.localAI[0]; + if ((double) this.localAI[0] == 180.0) + { + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + 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 (Main.dayTime && this.type != 173 && 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 && (this.type < 231 || this.type > 235) || Main.player[this.target].dead) + { + this.velocity.Y -= num2 * 2f; + if (this.timeLeft > 10) + this.timeLeft = 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; + } + + private void AI_006_Worms() + { + if (this.type == 117 && (double) this.localAI[1] == 0.0) + { + this.localAI[1] = 1f; + Main.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) + { + Main.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; + } + } + 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) + { + if (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; + } + 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) + { + if (this.timeLeft > 300) + this.timeLeft = 300; + if (flag1) + this.velocity.Y += num1; + } + 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[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[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[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[index9].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index9 = 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) Main.rand.Next(45, 56); + if (Main.expertMode) + this.ai[2] = (float) (int) ((double) this.ai[2] * 1.10000002384186); + } + 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); + } + else + this.ai[0] = 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 ? (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) : (float) NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), this.type, this.whoAmI); + 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 index11 = this.whoAmI; + int num4 = 30; + for (int index12 = 0; index12 < num4; ++index12) + { + int Type = 413; + if (index12 == num4 - 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) index11; + Main.npc[index11].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index11 = 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: + 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: + 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 num5 = (float) this.life / (float) this.lifeMax; + float num6 = this.ai[0]; + this.SetDefaultsKeepPlayerInteraction(this.type); + this.life = (int) ((double) this.lifeMax * (double) num5); + this.ai[0] = num6; + this.TargetClosest(); + this.netUpdate = true; + this.whoAmI = whoAmI; + } + if (this.type == 14 && (!Main.npc[(int) this.ai[0]].active || Main.npc[(int) this.ai[0]].aiStyle != this.aiStyle)) + { + int whoAmI = this.whoAmI; + float num7 = (float) this.life / (float) this.lifeMax; + float num8 = this.ai[1]; + this.SetDefaultsKeepPlayerInteraction(this.type); + this.life = (int) ((double) this.lifeMax * (double) num7); + this.ai[1] = num8; + this.TargetClosest(); + this.netUpdate = true; + this.whoAmI = whoAmI; + } + } + if (!this.active && Main.netMode == 2) + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + int num9 = (int) ((double) this.position.X / 16.0) - 1; + int num10 = (int) (((double) this.position.X + (double) this.width) / 16.0) + 2; + int num11 = (int) ((double) this.position.Y / 16.0) - 1; + int num12 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + 2; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesX) + num10 = Main.maxTilesX; + if (num11 < 0) + num11 = 0; + if (num12 > Main.maxTilesY) + num12 = 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 == 402 && (double) this.ai[1] == -1.0) + flag2 = true; + if (this.type >= 412 && this.type <= 414) + flag2 = true; + if (!flag2) + { + for (int i = num9; i < num10; ++i) + { + for (int j = num11; j < num12; ++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()) + 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)) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + int num13 = 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 - num13, (int) Main.player[index].position.Y - num13, num13 * 2, num13 * 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) + { + 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) + { + 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; + } + float num14 = 8f; + float num15 = 0.07f; + if (this.type == 95) + { + num14 = 5.5f; + num15 = 0.045f; + } + if (this.type == 10) + { + num14 = 6f; + num15 = 0.05f; + } + if (this.type == 513) + { + num14 = 7f; + num15 = 0.1f; + } + if (this.type == 13) + { + num14 = 10f; + num15 = 0.07f; + if (Main.expertMode) + { + num14 = 12f; + num15 = 0.15f; + } + } + if (this.type == 510) + { + if (!Main.player[this.target].dead && Main.player[this.target].ZoneSandstorm) + { + num14 = 16f; + num15 = 0.35f; + } + else + { + num14 = 10f; + num15 = 0.25f; + } + } + if (this.type == 87) + { + num14 = 11f; + num15 = 0.25f; + } + if (this.type == 375) + { + num14 = 6f; + num15 = 0.15f; + } + if (this.type == 454) + { + num14 = 20f; + num15 = 0.55f; + } + if (this.type == 402) + { + num14 = 6f; + num15 = 0.2f; + } + if (this.type == 117 && Main.wof >= 0) + { + double num16; + if ((num16 = (double) ((float) Main.npc[Main.wof].life / (float) Main.npc[Main.wof].lifeMax)) < 0.5) + { + ++num14; + num15 += 0.1f; + } + if (num16 < 0.25) + { + ++num14; + num15 += 0.1f; + } + if (num16 < 0.1) + { + num14 += 2f; + num15 += 0.1f; + } + } + Vector2 vector2_3 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num17 = Main.player[this.target].position.X + (float) (Main.player[this.target].width / 2); + float num18 = Main.player[this.target].position.Y + (float) (Main.player[this.target].height / 2); + if (this.type == 412) + { + num14 = 10f; + num15 = 0.3f; + int num19 = -1; + int num20 = (int) ((double) Main.player[this.target].Center.X / 16.0); + int num21 = (int) ((double) Main.player[this.target].Center.Y / 16.0); + for (int i = num20 - 2; i <= num20 + 2; ++i) + { + for (int j = num21; j <= num21 + 15; ++j) + { + if (WorldGen.SolidTile2(i, j)) + { + num19 = j; + break; + } + } + if (num19 > 0) + break; + } + if (num19 > 0) + { + num19 *= 16; + float num22 = (float) (num19 - 800); + if ((double) Main.player[this.target].position.Y > (double) num22) + { + num18 = num22; + if ((double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) < 500.0) + num17 = (double) this.velocity.X <= 0.0 ? Main.player[this.target].Center.X - 600f : Main.player[this.target].Center.X + 600f; + } + } + else + { + num14 = 14f; + num15 = 0.5f; + } + float num23 = num14 * 1.3f; + float num24 = num14 * 0.7f; + float num25 = this.velocity.Length(); + if ((double) num25 > 0.0) + { + if ((double) num25 > (double) num23) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num23; + } + else if ((double) num25 < (double) num24) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num24; + } + } + if (num19 > 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; + num17 -= vector2_5.X; + num18 -= 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; + num17 -= vector2_7.X; + num18 -= vector2_7.Y; + } + } + } + } + } + float num26 = (float) ((int) ((double) num17 / 16.0) * 16); + float num27 = (float) ((int) ((double) num18 / 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 num28 = num26 - vector2_3.X; + float num29 = num27 - vector2_3.Y; + if (this.type == 375) + { + num28 *= -1f; + num29 *= -1f; + } + float num30 = (float) Math.Sqrt((double) num28 * (double) num28 + (double) num29 * (double) num29); + 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); + num28 = Main.npc[(int) this.ai[1]].position.X + (float) (Main.npc[(int) this.ai[1]].width / 2) - vector2_3.X; + num29 = 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) num29, (double) num28) + 1.57f; + float num31 = (float) Math.Sqrt((double) num28 * (double) num28 + (double) num29 * (double) num29); + int num32 = this.width; + if (this.type >= 87 && this.type <= 92) + num32 = 42; + if (this.type >= 454 && this.type <= 459) + num32 = 36; + if (this.type >= 13 && this.type <= 15) + num32 = (int) ((double) num32 * (double) this.scale); + if (this.type >= 412 && this.type <= 414) + num32 += 6; + float num33 = (num31 - (float) num32) / num31; + float num34 = num28 * num33; + float num35 = num29 * num33; + this.velocity = Vector2.Zero; + this.position.X += num34; + this.position.Y += num35; + if (this.type >= 87 && this.type <= 92) + { + if ((double) num34 < 0.0) + this.spriteDirection = 1; + else if ((double) num34 > 0.0) + this.spriteDirection = -1; + } + if (this.type < 454 || this.type > 459) + return; + if ((double) num34 < 0.0) + { + this.spriteDirection = 1; + return; + } + if ((double) num34 <= 0.0) + return; + this.spriteDirection = -1; + return; + } + } + if (!flag2) + { + this.TargetClosest(); + this.velocity.Y += 0.11f; + if ((double) this.velocity.Y > (double) num14) + this.velocity.Y = num14; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num14 * 0.4) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X -= num15 * 1.1f; + else + this.velocity.X += num15 * 1.1f; + } + else if ((double) this.velocity.Y == (double) num14) + { + if ((double) this.velocity.X < (double) num28) + this.velocity.X += num15; + else if ((double) this.velocity.X > (double) num28) + this.velocity.X -= num15; + } + else if ((double) this.velocity.Y > 4.0) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X += num15 * 0.9f; + else + this.velocity.X -= num15 * 0.9f; + } + } + else + { + if (this.type != 87 && this.type != 117 && this.type != 454 && this.type != 412 && this.soundDelay == 0) + { + float num36 = num30 / 40f; + if ((double) num36 < 10.0) + num36 = 10f; + if ((double) num36 > 20.0) + num36 = 20f; + this.soundDelay = (int) num36; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y); + } + float num37 = (float) Math.Sqrt((double) num28 * (double) num28 + (double) num29 * (double) num29); + float num38 = Math.Abs(num28); + float num39 = Math.Abs(num29); + float num40 = num14 / num37; + float num41 = num28 * num40; + float num42 = num29 * num40; + 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 num43; + for (int number = (int) this.ai[0]; number > 0 && number < 200 && Main.npc[number].active && Main.npc[number].aiStyle == this.aiStyle; number = num43) + { + num43 = (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); + } + num41 = 0.0f; + num42 = num14; + } + } + bool flag6 = false; + if (this.type == 87) + { + if (((double) this.velocity.X > 0.0 && (double) num41 < 0.0 || (double) this.velocity.X < 0.0 && (double) num41 > 0.0 || (double) this.velocity.Y > 0.0 && (double) num42 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num42 > 0.0) && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num15 / 2.0 && (double) num37 < 300.0) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num14) + 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) num14 / 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) num14) + this.velocity.Y -= num15; + } + } + if (this.type == 454) + { + if (((double) this.velocity.X > 0.0 && (double) num41 < 0.0 || (double) this.velocity.X < 0.0 && (double) num41 > 0.0 || (double) this.velocity.Y > 0.0 && (double) num42 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num42 > 0.0) && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num15 / 2.0 && (double) num37 < 300.0) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num14) + 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) num14 / 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) num14) + this.velocity.Y -= num15; + } + } + if (!flag6) + { + if ((double) this.velocity.X > 0.0 && (double) num41 > 0.0 || (double) this.velocity.X < 0.0 && (double) num41 < 0.0 || (double) this.velocity.Y > 0.0 && (double) num42 > 0.0 || (double) this.velocity.Y < 0.0 && (double) num42 < 0.0) + { + if ((double) this.velocity.X < (double) num41) + this.velocity.X += num15; + else if ((double) this.velocity.X > (double) num41) + this.velocity.X -= num15; + if ((double) this.velocity.Y < (double) num42) + this.velocity.Y += num15; + else if ((double) this.velocity.Y > (double) num42) + this.velocity.Y -= num15; + if ((double) Math.Abs(num42) < (double) num14 * 0.2 && ((double) this.velocity.X > 0.0 && (double) num41 < 0.0 || (double) this.velocity.X < 0.0 && (double) num41 > 0.0)) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num15 * 2f; + else + this.velocity.Y -= num15 * 2f; + } + if ((double) Math.Abs(num41) < (double) num14 * 0.2 && ((double) this.velocity.Y > 0.0 && (double) num42 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num42 > 0.0)) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num15 * 2f; + else + this.velocity.X -= num15 * 2f; + } + } + else if ((double) num38 > (double) num39) + { + if ((double) this.velocity.X < (double) num41) + this.velocity.X += num15 * 1.1f; + else if ((double) this.velocity.X > (double) num41) + this.velocity.X -= num15 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num14 * 0.5) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num15; + else + this.velocity.Y -= num15; + } + } + else + { + if ((double) this.velocity.Y < (double) num42) + this.velocity.Y += num15 * 1.1f; + else if ((double) this.velocity.Y > (double) num42) + this.velocity.Y -= num15 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num14 * 0.5) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num15; + else + this.velocity.X -= num15; + } + } + } + } + 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) + { + 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) + return; + float num44 = Vector2.Distance(Main.player[this.target].Center, this.Center); + int num45 = 0; + if ((double) Vector2.Normalize(Main.player[this.target].Center - this.Center).ToRotation().AngleTowards(this.velocity.ToRotation(), 1.570796f) == (double) this.velocity.ToRotation() && (double) num44 < 350.0) + num45 = 4; + if ((double) num45 > this.frameCounter) + ++this.frameCounter; + if ((double) num45 < this.frameCounter) + --this.frameCounter; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter <= 4.0) + return; + this.frameCounter = 4.0; + } + + private void AI_002_FloatingEye() + { + if ((this.type == 170 || this.type == 171 || this.type == 180) && Main.rand.Next(1000) == 0) + Main.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 (Main.dayTime && (double) this.position.Y <= Main.worldSurface * 16.0 && (this.type == 2 || this.type == 133 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194 || this.type == 317 || this.type == 318)) + { + if (this.timeLeft > 10) + this.timeLeft = 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) + { + 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; + } + } + 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) + { + 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.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(); + } + + private void AI_007_TownEntities() + { + int maxValue1 = 300; + 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.expertMode ? (this.dryadWard ? this.defDefense + 6 : this.defDefense) : (this.dryadWard ? this.defDefense + 10 : this.defDefense); + if (this.townNPC || this.type == 453) + { + 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.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.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) + { + bool flag2 = false; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].type == 582 && (double) Main.projectile[index].ai[1] == (double) this.whoAmI) + { + flag2 = true; + break; + } + } + this.localAI[0] = (float) flag2.ToInt(); + } + if ((this.type == 362 || this.type == 364) && 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; + } + if (this.type >= 0 && this.type < 580 && 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 homeTileY = this.homeTileY; + if (this.type == 441) + NPC.taxCollector = true; + this.directionY = -1; + if (this.direction == 0) + this.direction = 1; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].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[index].position.X + (double) (Main.player[index].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; + Main.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 (Main.netMode != 1 && this.homeTileY > 0) + { + while (!WorldGen.SolidTile(this.homeTileX, homeTileY) && homeTileY < Main.maxTilesY - 20) + ++homeTileY; + } + 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 < 200.0) + this.direction = 1; + else if ((double) this.position.X / 16.0 > (double) (Main.maxTilesX - 200)) + this.direction = -1; + } + int x = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int y = (int) ((double) this.position.Y + (double) this.height + 1.0) / 16; + if (!WorldGen.InWorld(x, y) || Main.tile[x, y] == null) + return; + if (!this.homeless && Main.netMode != 1 && this.townNPC && (flag1 || Main.tileDungeon[(int) Main.tile[x, y].type]) && (x != this.homeTileX || y != homeTileY)) + { + bool flag4 = true; + for (int index1 = 0; index1 < 2; ++index1) + { + 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 (index1 == 1) + rectangle = new Microsoft.Xna.Framework.Rectangle(this.homeTileX * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, homeTileY * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index2 = 0; index2 < (int) byte.MaxValue; ++index2) + { + if (Main.player[index2].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index2].position.X, (int) Main.player[index2].position.Y, Main.player[index2].width, Main.player[index2].height).Intersects(rectangle)) + { + flag4 = false; + break; + } + if (!flag4) + break; + } + } + if (flag4) + { + if (this.type == 37 || !Collision.SolidTiles(this.homeTileX - 1, this.homeTileX + 1, homeTileY - 3, homeTileY - 1)) + { + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + this.position.X = (float) (this.homeTileX * 16 + 8 - this.width / 2); + this.position.Y = (float) (homeTileY * 16 - this.height) - 0.1f; + this.netUpdate = true; + } + else + { + this.homeless = true; + WorldGen.QuickFindHome(this.whoAmI); + } + } + } + bool flag5 = this.type == 300 || this.type == 447; + float num2 = 200f; + if (NPCID.Sets.DangerDetectRange[this.type] != -1) + num2 = (float) NPCID.Sets.DangerDetectRange[this.type]; + bool flag6 = false; + bool flag7 = false; + float num3 = -1f; + float num4 = -1f; + int num5 = 0; + int index3 = -1; + int index4 = -1; + if (Main.netMode != 1 && !flag3) + { + for (int index5 = 0; index5 < 200; ++index5) + { + if (Main.npc[index5].active && !Main.npc[index5].friendly && Main.npc[index5].damage > 0 && (double) Main.npc[index5].Distance(this.Center) < (double) num2 && (this.type != 453 || !NPCID.Sets.Skeletons.Contains(Main.npc[index5].netID))) + { + flag6 = true; + float num6 = Main.npc[index5].Center.X - this.Center.X; + if ((double) num6 < 0.0 && ((double) num3 == -1.0 || (double) num6 > (double) num3)) + { + num3 = num6; + index3 = index5; + } + if ((double) num6 > 0.0 && ((double) num4 == -1.0 || (double) num6 < (double) num4)) + { + num4 = num6; + index4 = index5; + } + } + } + if (flag6) + { + num5 = (double) num3 != -1.0 ? ((double) num4 != -1.0 ? ((double) num4 < -(double) num3).ToDirectionInt() : -1) : 1; + float num7 = 0.0f; + if ((double) num3 != -1.0) + num7 = -num3; + if ((double) num7 == 0.0 || (double) num4 < (double) num7 && (double) num4 > 0.0) + num7 = num4; + if ((double) this.ai[0] == 8.0) + { + if (this.direction == -num5) + { + 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) num7) + { + flag6 = false; + flag7 = true; + } + else if ((double) this.ai[0] != 1.0) + { + 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 = -num5; + 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 = -num5; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 1.0 && this.direction != -num5) + { + this.direction = -num5; + this.netUpdate = true; + } + } + } + } + if ((double) this.ai[0] == 0.0) + { + if ((double) this.localAI[3] > 0.0) + --this.localAI[3]; + if (flag1 && !flag3 && !NPCID.Sets.TownCritter[this.type]) + { + if (Main.netMode != 1) + { + if (x == this.homeTileX && y == homeTileY) + { + 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; + } + else + { + if (x > this.homeTileX) + 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 ((double) this.ai[1] > 0.0) + --this.ai[1]; + if ((double) this.ai[1] <= 0.0) + { + 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; + } + } + } + if (Main.netMode != 1 && (!flag1 || x == this.homeTileX && y == homeTileY)) + { + if (x < this.homeTileX - 25 || x > this.homeTileX + 25) + { + if ((double) this.localAI[3] == 0.0) + { + if (x < this.homeTileX - 50 && this.direction == -1) + { + this.direction = 1; + this.netUpdate = true; + } + else if (x > this.homeTileX + 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 && x == this.homeTileX && y == this.homeTileY && !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 flag8 = Collision.DrownCollision(this.position, this.width, this.height, 1f); + if (!flag8) + { + if (Main.netMode != 1 && !this.homeless && !Main.tileDungeon[(int) Main.tile[x, y].type] && (x < this.homeTileX - 35 || x > this.homeTileX + 35)) + { + if ((double) this.position.X < (double) (this.homeTileX * 16) && this.direction == -1) + this.ai[1] -= 5f; + else if ((double) this.position.X > (double) (this.homeTileX * 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 num8 = 1f; + float num9 = 0.07f; + if (this.type == 299 || this.type == 539 || this.type == 538) + num8 = 1.5f; + if (flag5) + { + num8 = 2f; + num9 = 1f; + } + if (this.friendly && flag6 | flag8) + { + num8 = 1.5f + (float) (1.0 - (double) this.life / (double) this.lifeMax) * 0.9f; + num9 = 0.1f; + } + if ((double) this.velocity.X < -(double) num8 || (double) this.velocity.X > (double) num8) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num8 && this.direction == 1) + { + this.velocity.X += num9; + if ((double) this.velocity.X > (double) num8) + this.velocity.X = num8; + } + else if ((double) this.velocity.X > -(double) num8 && this.direction == -1) + { + this.velocity.X -= num9; + if ((double) this.velocity.X > (double) num8) + this.velocity.X = num8; + } + bool holdsMatching = true; + if ((double) (this.homeTileY * 16 - 32) > (double) this.position.Y) + holdsMatching = false; + if (this.direction == 1 && (double) this.position.Y + (double) (this.width / 2) > (double) (this.homeTileX * 16) || this.direction == -1 && (double) this.position.Y + (double) (this.width / 2) < (double) (this.homeTileX * 16)) + holdsMatching = true; + if ((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 num10 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int j = (int) (((double) this.position.Y + (double) this.height - 16.0) / 16.0); + bool flag9 = false; + bool flag10 = true; + bool flag11 = x >= this.homeTileX - 35 && x <= this.homeTileX + 35; + if (this.townNPC && (double) this.ai[1] < 30.0) + { + flag9 = !Utils.PlotTileLine(this.Top, this.Bottom, (float) this.width, new Utils.PerLinePoint(DelegateMethods.SearchAvoidedByNPCs)); + if (!flag9) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + hitbox.X -= 20; + hitbox.Width += 40; + for (int index6 = 0; index6 < 200; ++index6) + { + if (Main.npc[index6].active && Main.npc[index6].friendly && index6 != this.whoAmI && (double) Main.npc[index6].velocity.X == 0.0 && hitbox.Intersects(Main.npc[index6].Hitbox)) + { + flag9 = true; + break; + } + } + } + } + if (!flag9 & flag8) + flag9 = true; + if (flag10 && (NPCID.Sets.TownCritter[this.type] || !flag11 && this.direction == Math.Sign(this.homeTileX - x))) + flag10 = false; + if (flag10) + { + int num11 = 0; + for (int index7 = -1; index7 <= 4; ++index7) + { + Tile tileSafely = Framing.GetTileSafely(num10 - this.direction * num11, j + index7); + if (tileSafely.lava() && tileSafely.liquid > (byte) 0) + { + flag10 = true; + break; + } + if (tileSafely.nactive() && Main.tileSolid[(int) tileSafely.type]) + { + flag10 = false; + break; + } + } + } + if (!flag10 && this.wet) + { + bool flag12 = flag8; + bool flag13 = false; + if (!flag12) + flag13 = Collision.DrownCollision(this.position + new Vector2((float) (this.width * this.direction), 0.0f), this.width, this.height, 1f); + if ((flag13 || Collision.DrownCollision(this.position + new Vector2((float) (this.width * this.direction), (float) (this.height * 2 - 16 - (flag12 ? 16 : 0))), this.width, 16 + (flag12 ? 16 : 0), 1f)) && (double) this.localAI[3] <= 0.0) + { + flag10 = true; + this.localAI[3] = 600f; + } + } + if ((double) this.position.X == (double) this.localAI[3]) + { + this.direction *= -1; + this.netUpdate = true; + this.localAI[3] = 600f; + } + if (flag8) + { + if ((double) this.localAI[3] > 0.0) + --this.localAI[3]; + } + else + this.localAI[3] = -1f; + Tile tileSafely1 = Framing.GetTileSafely(num10, j); + Tile tileSafely2 = Framing.GetTileSafely(num10, j - 1); + Tile tileSafely3 = Framing.GetTileSafely(num10, j - 2); + 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(num10, j - 2, this.direction)) + { + this.closeDoor = true; + this.doorX = num10; + this.doorY = j - 2; + NetMessage.SendData(19, number2: ((float) num10), number3: ((float) (j - 2)), number4: ((float) this.direction)); + this.netUpdate = true; + this.ai[1] += 80f; + } + else if (WorldGen.OpenDoor(num10, j - 2, -this.direction)) + { + this.closeDoor = true; + this.doorX = num10; + this.doorY = j - 2; + NetMessage.SendData(19, number2: ((float) num10), number3: ((float) (j - 2)), number4: ((float) -this.direction)); + this.netUpdate = true; + this.ai[1] += 80f; + } + else if (WorldGen.ShiftTallGate(num10, j - 2, false)) + { + this.closeDoor = true; + this.doorX = num10; + this.doorY = j - 2; + NetMessage.SendData(19, number: 4, number2: ((float) num10), number3: ((float) (j - 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) + { + if (tileSafely3.nactive() && Main.tileSolid[(int) tileSafely3.type] && !Main.tileSolidTop[(int) tileSafely3.type]) + { + if (!Collision.SolidTilesVersatile(num10 - this.direction * 2, num10 - this.direction, j - 5, j - 1) && !Collision.SolidTiles(num10, num10, j - 5, j - 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 (flag6) + { + flag9 = false; + this.velocity.X = 0.0f; + this.direction *= -1; + this.netUpdate = true; + this.ai[0] = 8f; + this.ai[1] = 240f; + } + else + { + this.direction *= -1; + this.netUpdate = true; + } + } + else if (tileSafely2.nactive() && Main.tileSolid[(int) tileSafely2.type] && !Main.tileSolidTop[(int) tileSafely2.type]) + { + if (!Collision.SolidTilesVersatile(num10 - this.direction * 2, num10 - this.direction, j - 4, j - 1) && !Collision.SolidTiles(num10, num10, j - 4, j - 2)) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (flag6) + { + flag9 = false; + this.velocity.X = 0.0f; + this.direction *= -1; + this.netUpdate = true; + this.ai[0] = 8f; + this.ai[1] = 240f; + } + else + { + this.direction *= -1; + this.netUpdate = true; + } + } + else if ((double) this.position.Y + (double) this.height - (double) (j * 16) > 20.0 && tileSafely1.nactive() && Main.tileSolid[(int) tileSafely1.type] && !tileSafely1.topSlope()) + { + if (!Collision.SolidTilesVersatile(num10 - this.direction * 2, num10, j - 3, j - 1)) + { + this.velocity.Y = -4.4f; + this.netUpdate = true; + } + else if (flag6) + { + flag9 = false; + this.velocity.X = 0.0f; + this.direction *= -1; + this.netUpdate = true; + this.ai[0] = 8f; + this.ai[1] = 240f; + } + else + { + this.direction *= -1; + this.netUpdate = true; + } + } + else if (flag10) + { + this.direction *= -1; + this.velocity.X *= -1f; + this.netUpdate = true; + if (flag6) + { + flag9 = false; + this.velocity.X = 0.0f; + this.ai[0] = 8f; + this.ai[1] = 240f; + } + } + if (flag9) + { + 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) + { + this.velocity.X *= 0.8f; + --this.ai[1]; + if ((double) this.ai[0] == 8.0 && (double) this.ai[1] < 60.0 & flag6) + { + this.ai[1] = 180f; + this.netUpdate = true; + } + if ((double) this.ai[0] == 5.0) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + if (Main.tile[tileCoordinates.X, tileCoordinates.Y].type != (ushort) 15) + this.ai[1] = 0.0f; + } + 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) + { + 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 index8 = (int) this.ai[2]; + if (index8 < 0 || index8 > (int) byte.MaxValue || !Main.player[index8].active || Main.player[index8].dead || (double) Main.player[index8].Distance(this.Center) > 200.0 || !Collision.CanHitLine(this.Top, 0, 0, Main.player[index8].Top, 0, 0)) + this.ai[1] = 0.0f; + if ((double) this.ai[1] > 0.0) + { + int num12 = (double) this.Center.X < (double) Main.player[index8].Center.X ? 1 : -1; + if (num12 != this.direction) + this.netUpdate = true; + this.direction = num12; + } + 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 num13 = 0; + float KnockBack = 0.0f; + float num14 = 0.0f; + int num15 = 0; + int num16 = 0; + int maxValue2 = 0; + float num17 = 0.0f; + float num18 = (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; + num14 = 6f; + num13 = 20; + num15 = 10; + num16 = 180; + maxValue2 = 120; + num17 = 16f; + KnockBack = 7f; + } + else if (this.type == 550) + { + Type = 669; + num14 = 6f; + num13 = 24; + num15 = 10; + num16 = 120; + maxValue2 = 60; + num17 = 16f; + KnockBack = 9f; + } + else if (this.type == 208) + { + Type = 588; + num14 = 6f; + num13 = 30; + num15 = 10; + num16 = 60; + maxValue2 = 120; + num17 = 16f; + KnockBack = 6f; + } + else if (this.type == 17) + { + Type = 48; + num14 = 9f; + num13 = 12; + num15 = 10; + num16 = 60; + maxValue2 = 60; + num17 = 16f; + KnockBack = 1.5f; + } + else if (this.type == 369) + { + Type = 520; + num14 = 12f; + num13 = 10; + num15 = 10; + num16 = 0; + maxValue2 = 1; + num17 = 16f; + KnockBack = 3f; + } + else if (this.type == 453) + { + Type = 21; + num14 = 14f; + num13 = 14; + num15 = 10; + num16 = 0; + maxValue2 = 1; + num17 = 16f; + KnockBack = 3f; + } + else if (this.type == 107) + { + Type = 24; + num14 = 5f; + num13 = 15; + num15 = 10; + num16 = 60; + maxValue2 = 60; + num17 = 16f; + KnockBack = 1f; + } + else if (this.type == 124) + { + Type = 582; + num14 = 10f; + num13 = 11; + num15 = 1; + num16 = 30; + maxValue2 = 30; + KnockBack = 3.5f; + } + else if (this.type == 18) + { + Type = 583; + num14 = 8f; + num13 = 8; + num15 = 1; + num16 = 15; + maxValue2 = 10; + KnockBack = 2f; + num17 = 10f; + } + else if (this.type == 142) + { + Type = 589; + num14 = 7f; + num13 = 22; + num15 = 1; + num16 = 10; + maxValue2 = 1; + KnockBack = 2f; + num17 = 10f; + } + if (Main.expertMode) + num13 = (int) ((double) num13 * (double) Main.expertNPCDamage); + int Damage = (int) ((double) num13 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num15 && Main.netMode != 1) + { + Vector2 vec = -Vector2.UnitY; + if (num5 == 1 && this.spriteDirection == 1 && index4 != -1) + vec = this.DirectionTo(Main.npc[index4].Center + new Vector2(0.0f, -num17 * MathHelper.Clamp(this.Distance(Main.npc[index4].Center) / num18, 0.0f, 1f))); + if (num5 == -1 && this.spriteDirection == -1 && index3 != -1) + vec = this.DirectionTo(Main.npc[index3].Center + new Vector2(0.0f, -num17 * MathHelper.Clamp(this.Distance(Main.npc[index3].Center) / num18, 0.0f, 1f))); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, -1f); + Vector2 vector2 = vec * num14 + Utils.RandomVector2(Main.rand, -max, max); + int index9 = 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[index9].npcProj = true; + Main.projectile[index9].noDropItem = true; + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag6 ? 8f : 0.0f; + this.ai[1] = (float) (num16 + Main.rand.Next(maxValue2)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num16 / 2 + Main.rand.Next(maxValue2)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 12.0) + { + int Type = 0; + int num19 = 0; + float num20 = 0.0f; + int num21 = 0; + int num22 = 0; + int maxValue3 = 0; + float KnockBack = 0.0f; + int num23 = 0; + bool flag14 = 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 index10 = -1; + if (num5 == 1 && this.spriteDirection == 1) + index10 = index4; + if (num5 == -1 && this.spriteDirection == -1) + index10 = index3; + if (this.type == 19) + { + Type = 14; + num20 = 13f; + num19 = 24; + num22 = 14; + maxValue3 = 4; + KnockBack = 3f; + num21 = 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) + { + num19 = 15; + if ((double) this.localAI[3] > (double) num21) + { + num21 = 10; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 20; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 30; + flag14 = true; + } + } + } + else if (this.type == 227) + { + Type = 587; + num20 = 10f; + num19 = 8; + num22 = 10; + maxValue3 = 1; + KnockBack = 1.75f; + num21 = 1; + max = 0.5f; + if ((double) this.localAI[3] > (double) num21) + { + num21 = 12; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 24; + flag14 = true; + } + if (Main.hardMode) + num19 += 2; + } + else if (this.type == 368) + { + Type = 14; + num20 = 13f; + num19 = 24; + num22 = 12; + maxValue3 = 5; + KnockBack = 2f; + num21 = 1; + max = 0.2f; + if (Main.hardMode) + { + num19 = 30; + Type = 357; + } + } + else if (this.type == 22) + { + num20 = 10f; + num19 = 8; + num21 = 1; + if (Main.hardMode) + { + Type = 2; + num22 = 15; + maxValue3 = 10; + num19 += 6; + } + else + { + Type = 1; + num22 = 30; + maxValue3 = 20; + } + KnockBack = 2.75f; + num23 = 4; + max = 0.7f; + } + else if (this.type == 228) + { + Type = 267; + num20 = 14f; + num19 = 20; + num21 = 1; + num22 = 10; + maxValue3 = 1; + KnockBack = 3f; + num23 = 6; + max = 0.4f; + } + else if (this.type == 178) + { + Type = 242; + num20 = 13f; + num19 = 15; + num22 = 10; + maxValue3 = 1; + KnockBack = 2f; + num21 = 1; + if ((double) this.localAI[3] > (double) num21) + { + num21 = 8; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 16; + flag14 = true; + } + max = 0.3f; + } + else if (this.type == 229) + { + Type = 14; + num20 = 14f; + num19 = 24; + num22 = 10; + maxValue3 = 1; + KnockBack = 2f; + num21 = 1; + max = 0.7f; + if ((double) this.localAI[3] > (double) num21) + { + num21 = 16; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 24; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 32; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 40; + flag14 = true; + } + if ((double) this.localAI[3] > (double) num21) + { + num21 = 48; + flag14 = true; + } + if ((double) this.localAI[3] == 0.0 && index10 != -1 && (double) this.Distance(Main.npc[index10].Center) < (double) NPCID.Sets.PrettySafe[this.type]) + { + max = 0.1f; + Type = 162; + num19 = 50; + KnockBack = 10f; + num20 = 24f; + } + } + else if (this.type == 209) + { + Type = Utils.SelectRandom(Main.rand, 134, 133, 135); + num21 = 1; + switch (Type) + { + case 133: + num20 = 10f; + num19 = 25; + num22 = 10; + maxValue3 = 1; + KnockBack = 6f; + max = 0.2f; + break; + case 134: + num20 = 13f; + num19 = 20; + num22 = 20; + maxValue3 = 10; + KnockBack = 4f; + max = 0.1f; + break; + case 135: + num20 = 12f; + num19 = 30; + num22 = 30; + maxValue3 = 10; + KnockBack = 7f; + max = 0.2f; + break; + } + } + if (Main.expertMode) + num19 = (int) ((double) num19 * (double) Main.expertNPCDamage); + int Damage = (int) ((double) num19 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num21 && Main.netMode != 1) + { + Vector2 vec = Vector2.Zero; + if (index10 != -1) + vec = this.DirectionTo(Main.npc[index10].Center + new Vector2(0.0f, (float) -num23)); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, 0.0f); + Vector2 vector2 = vec * num20 + Utils.RandomVector2(Main.rand, -max, max); + int index11 = 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[index11].npcProj = true; + Main.projectile[index11].noDropItem = true; + } + if ((double) this.localAI[3] == (double) num21 & flag14 && index10 != -1) + { + Vector2 vector2 = this.DirectionTo(Main.npc[index10].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 & flag6 ? 8f : 0.0f; + this.ai[1] = (float) (num22 + Main.rand.Next(maxValue3)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num22 / 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 index12 = 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[index12].npcProj = true; + Main.projectile[index12].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 num24 = 0; + float num25 = 0.0f; + int num26 = 0; + int num27 = 0; + int maxValue4 = 0; + float KnockBack = 0.0f; + float num28 = 0.0f; + float num29 = (float) NPCID.Sets.DangerDetectRange[this.type]; + float num30 = 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 index13 = -1; + if (num5 == 1 && this.spriteDirection == 1) + index13 = index4; + if (num5 == -1 && this.spriteDirection == -1) + index13 = index3; + if (this.type == 54) + { + Type = 585; + num25 = 10f; + num24 = 16; + num26 = 30; + num27 = 20; + maxValue4 = 15; + KnockBack = 2f; + max = 1f; + } + else if (this.type == 108) + { + Type = 15; + num25 = 6f; + num24 = 18; + num26 = 15; + num27 = 15; + maxValue4 = 5; + KnockBack = 3f; + num28 = 20f; + } + else if (this.type == 160) + { + Type = 590; + num24 = 40; + num26 = 15; + num27 = 10; + maxValue4 = 1; + KnockBack = 3f; + while ((double) this.localAI[3] > (double) num26) + num26 += 15; + } + else if (this.type == 20) + { + Type = 586; + num26 = 24; + num27 = 10; + maxValue4 = 1; + KnockBack = 3f; + } + if (Main.expertMode) + num24 = (int) ((double) num24 * (double) Main.expertNPCDamage); + int Damage = (int) ((double) num24 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num26 && Main.netMode != 1) + { + Vector2 vec = Vector2.Zero; + if (index13 != -1) + vec = this.DirectionTo(Main.npc[index13].Center + new Vector2(0.0f, -num28 * MathHelper.Clamp(this.Distance(Main.npc[index13].Center) / num29, 0.0f, 1f))); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, 0.0f); + Vector2 vector2_1 = vec * num25 + Utils.RandomVector2(Main.rand, -max, max); + if (this.type == 108) + { + int num31 = Utils.SelectRandom(Main.rand, 1, 1, 1, 1, 2, 2, 3); + for (int index14 = 0; index14 < num31; ++index14) + { + Vector2 vector2_2 = Utils.RandomVector2(Main.rand, -3.4f, 3.4f); + int index15 = 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[index15].npcProj = true; + Main.projectile[index15].noDropItem = true; + } + } + else if (this.type == 160) + { + if (index13 != -1) + { + Vector2 vector2_3 = Main.npc[index13].position - Main.npc[index13].Size * 2f + Main.npc[index13].Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) * 5f; + for (int index16 = 10; index16 > 0 && WorldGen.SolidTile(Framing.GetTileSafely((int) vector2_3.X / 16, (int) vector2_3.Y / 16)); vector2_3 = Main.npc[index13].position - Main.npc[index13].Size * 2f + Main.npc[index13].Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) * 5f) + --index16; + int index17 = Projectile.NewProjectile(vector2_3.X, vector2_3.Y, 0.0f, 0.0f, Type, Damage, KnockBack, Main.myPlayer); + Main.projectile[index17].npcProj = true; + Main.projectile[index17].noDropItem = true; + } + } + else if (this.type == 20) + { + int index18 = 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[index18].npcProj = true; + Main.projectile[index18].noDropItem = true; + } + else + { + int index19 = 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[index19].npcProj = true; + Main.projectile[index19].noDropItem = true; + } + } + if ((double) num30 > 0.0) + { + Vector3 vector3 = NPCID.Sets.MagicAuraColor[this.type].ToVector3() * num30; + 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 & flag6 ? 8f : 0.0f; + this.ai[1] = (float) (num27 + Main.rand.Next(maxValue4)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num27 / 2 + Main.rand.Next(maxValue4)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 15.0) + { + int num32 = 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 num33 = 0; + float num34 = 0.0f; + int num35 = 0; + int num36 = 0; + if (num5 == 1) + { + int spriteDirection1 = this.spriteDirection; + } + if (num5 == -1) + { + int spriteDirection2 = this.spriteDirection; + } + if (this.type == 207) + { + num33 = 11; + num35 = num36 = 32; + num32 = 12; + maxValue5 = 6; + num34 = 4.25f; + } + else if (this.type == 441) + { + num33 = 9; + num35 = num36 = 28; + num32 = 9; + maxValue5 = 3; + num34 = 3.5f; + } + else if (this.type == 353) + { + num33 = 10; + num35 = num36 = 32; + num32 = 15; + maxValue5 = 8; + num34 = 5f; + } + if (Main.expertMode) + num33 = (int) ((double) num33 * (double) Main.expertNPCDamage); + int Damage = (int) ((double) num33 * (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, num35, num36); + Microsoft.Xna.Framework.Rectangle itemRectangle = new Microsoft.Xna.Framework.Rectangle((int) swingStats.Item1.X, (int) swingStats.Item1.Y, num35, num36); + if (this.spriteDirection == -1) + itemRectangle.X -= num35; + itemRectangle.Y -= num36; + 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, num34, this.spriteDirection); + if (Main.netMode != 0) + NetMessage.SendData(28, number: number, number2: ((float) Damage), number3: num34, number4: ((float) this.spriteDirection)); + npc.netUpdate = true; + npc.immune[player] = (int) this.ai[1] + 2; + } + } + } + if ((double) this.ai[1] <= 0.0) + { + bool flag15 = false; + if (flag6) + { + if (!Collision.CanHit(this.Center, 0, 0, this.Center + Vector2.UnitX * (float) -num5 * 32f, 0, 0) || (double) this.localAI[2] == 8.0) + flag15 = true; + if (flag15) + { + int num37 = NPCID.Sets.AttackTime[this.type]; + int index20 = num5 == 1 ? index4 : index3; + int index21 = num5 == 1 ? index3 : index4; + if (index20 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index20].Center, 0, 0)) + index20 = index21 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index21].Center, 0, 0) ? -1 : index21; + if (index20 != -1) + { + this.ai[0] = 15f; + this.ai[1] = (float) num37; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index20].position.X ? 1 : -1; + this.netUpdate = true; + } + else + flag15 = false; + } + } + if (!flag15) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag6 ? 8f : 0.0f; + this.ai[1] = (float) (num32 + Main.rand.Next(maxValue5)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num32 / 2 + Main.rand.Next(maxValue5)); + this.netUpdate = true; + } + } + } + if (Main.netMode == 1 || !this.townNPC && this.type != 453 || flag3) + return; + bool flag16 = (double) this.ai[0] < 2.0 && !flag6; + bool flag17 = ((double) this.ai[0] < 2.0 || (double) this.ai[0] == 8.0) && flag6 | flag7; + if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + if ((double) this.localAI[1] > 0.0) + flag17 = false; + if (flag17 && this.type == 124 && (double) this.localAI[0] == 1.0) + flag17 = false; + if (flag17 && this.type == 20) + { + flag17 = false; + for (int index22 = 0; index22 < 200; ++index22) + { + NPC npc = Main.npc[index22]; + if (npc.active && npc.townNPC && (double) this.Distance(npc.Center) <= 1200.0 && npc.FindBuffIndex(165) == -1) + { + flag17 = true; + break; + } + } + } + if (flag16 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(300) == 0) + { + int num38 = 420; + int num39 = Main.rand.Next(2) != 0 ? num38 * Main.rand.Next(1, 3) : num38 * Main.rand.Next(1, 4); + int num40 = 100; + int num41 = 20; + for (int index23 = 0; index23 < 200; ++index23) + { + NPC npc = Main.npc[index23]; + bool flag18 = (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.CanTalk && !flag18 && (double) npc.Distance(this.Center) < (double) num40 && (double) npc.Distance(this.Center) > (double) num41 && 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) num39; + this.ai[2] = (float) index23; + this.direction = directionInt; + this.netUpdate = true; + npc.ai[0] = 4f; + npc.ai[1] = (float) num39; + npc.ai[2] = (float) this.whoAmI; + npc.direction = -directionInt; + npc.netUpdate = true; + break; + } + } + } + else if (flag16 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1800) == 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 index24 = 0; index24 < 200; ++index24) + { + NPC npc = Main.npc[index24]; + 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.CanTalk && !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] = 16f; + this.ai[1] = (float) num43; + this.ai[2] = (float) index24; + 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) num43; + 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 (flag16 && (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 num46 = 300; + int num47 = 150; + for (int index25 = 0; index25 < (int) byte.MaxValue; ++index25) + { + Player player = Main.player[index25]; + if (player.active && !player.dead && (double) player.Distance(this.Center) < (double) num47 && 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) num46; + this.ai[2] = (float) index25; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (flag16 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(600) == 0 && this.type == 550) + { + int num48 = 300; + int num49 = 150; + for (int index26 = 0; index26 < (int) byte.MaxValue; ++index26) + { + Player player = Main.player[index26]; + if (player.active && !player.dead && (double) player.Distance(this.Center) < (double) num49 && 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) num48; + this.ai[2] = (float) index26; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (flag16 && (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 (flag16 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(600) == 0 && this.type == 229 && !flag7) + { + this.ai[0] = 11f; + this.ai[1] = (float) (30 * Main.rand.Next(1, 4)); + this.netUpdate = true; + } + else if (flag16 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1200) == 0) + { + int num50 = 220; + 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] = 7f; + this.ai[1] = (float) num50; + this.ai[2] = (float) index27; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (flag16 && (double) this.ai[0] == 1.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(maxValue1) == 0) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + bool flag20 = WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 1); + if (flag20) + { + for (int index28 = 0; index28 < 200; ++index28) + { + if (Main.npc[index28].active && Main.npc[index28].aiStyle == 7 && Main.npc[index28].townNPC && (double) Main.npc[index28].ai[0] == 5.0 && Main.npc[index28].Center.ToTileCoordinates() == tileCoordinates) + { + flag20 = false; + break; + } + } + } + if (flag20) + { + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + bool flag21 = tile.type == (ushort) 15; + if (flag21 && tile.frameY == (short) 1080) + flag21 = false; + if (flag21) + { + 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 + 32)); + this.velocity = Vector2.Zero; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + } + else if (flag16 && (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.PerLinePoint(DelegateMethods.SearchAvoidedByNPCs))) + { + Point tileCoordinates = (this.Center + new Vector2((float) (this.direction * 10), 0.0f)).ToTileCoordinates(); + bool flag22 = WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 1); + if (flag22) + { + Tile tileSafely = Framing.GetTileSafely(tileCoordinates.X, tileCoordinates.Y); + if (!tileSafely.nactive() || !TileID.Sets.InteractibleByNPCs[(int) tileSafely.type]) + flag22 = false; + } + if (flag22) + { + 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 ((double) this.ai[0] < 2.0 && (double) this.velocity.Y == 0.0 && this.type == 18) + { + int index29 = -1; + for (int index30 = 0; index30 < 200; ++index30) + { + NPC npc = Main.npc[index30]; + if (npc.active && npc.townNPC && npc.life != npc.lifeMax && (index29 == -1 || npc.lifeMax - npc.life > Main.npc[index29].lifeMax - Main.npc[index29].life) && Collision.CanHitLine(this.position, this.width, this.height, npc.position, npc.width, npc.height) && (double) this.Distance(npc.Center) < 500.0) + index29 = index30; + } + if (index29 != -1) + { + this.ai[0] = 13f; + this.ai[1] = 34f; + this.ai[2] = (float) index29; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index29].position.X ? 1 : -1; + this.netUpdate = true; + } + } + if (flag17 && (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 num52 = NPCID.Sets.AttackTime[this.type]; + int index31 = num5 == 1 ? index4 : index3; + int index32 = num5 == 1 ? index3 : index4; + if (index31 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index31].Center, 0, 0)) + index31 = index32 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index32].Center, 0, 0) ? -1 : index32; + if (index31 != -1) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 10f; + this.ai[1] = (float) num52; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index31].position.X ? 1 : -1; + this.netUpdate = true; + } + } + else if (flag17 && (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 num53 = NPCID.Sets.AttackTime[this.type]; + int index33 = num5 == 1 ? index4 : index3; + int index34 = num5 == 1 ? index3 : index4; + if (index33 != -1 && !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index33].Center, 0, 0)) + index33 = index34 == -1 || !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index34].Center, 0, 0) ? -1 : index34; + if (index33 != -1) + { + Vector2 vector2 = this.DirectionTo(Main.npc[index33].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) num53; + this.ai[2] = vector2.Y; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index33].position.X ? 1 : -1; + this.netUpdate = true; + } + } + } + if (flag17 && (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 num54 = NPCID.Sets.AttackTime[this.type]; + int index35 = num5 == 1 ? index4 : index3; + int index36 = num5 == 1 ? index3 : index4; + if (index35 != -1 && !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index35].Center, 0, 0)) + index35 = index36 == -1 || !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index36].Center, 0, 0) ? -1 : index36; + if (index35 != -1) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 14f; + this.ai[1] = (float) num54; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index35].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) num54; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + if (!flag17 || (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 num55 = NPCID.Sets.AttackTime[this.type]; + int index37 = num5 == 1 ? index4 : index3; + int index38 = num5 == 1 ? index3 : index4; + if (index37 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index37].Center, 0, 0)) + index37 = index38 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index38].Center, 0, 0) ? -1 : index38; + if (index37 == -1) + return; + this.localAI[2] = this.ai[0]; + this.ai[0] = 15f; + this.ai[1] = (float) num55; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index37].position.X ? 1 : -1; + this.netUpdate = true; + } + } + } + + private void AI_003_Fighters() + { + 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.knockBackMultiplier; + 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 == 379 || this.type == 380) + { + if ((double) this.ai[3] < 0.0) + { + 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 num1 = 300; + int num2 = 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) num1) + { + if (this.justHit) + this.ai[2] += 15f; + ++this.ai[2]; + } + else if ((double) this.velocity.Y == 0.0) + { + this.ai[2] = (float) -num2; + this.netUpdate = true; + } + } + if (this.type == 480) + { + int num3 = 180; + int num4 = 300; + int num5 = 180; + int num6 = 60; + int num7 = 20; + if (this.life < this.lifeMax / 3) + { + num3 = 120; + num4 = 240; + num5 = 240; + num6 = 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) (-num5 - num7); + this.netUpdate = true; + } + } + else + { + if ((double) this.ai[2] < 0.0 && (double) this.ai[2] < (double) -num5) + { + this.velocity.X *= 0.9f; + if ((double) this.velocity.Y < -2.0 || (double) this.velocity.Y > 4.0 || this.justHit) + { + this.ai[2] = (float) num3; + } + else + { + ++this.ai[2]; + if ((double) this.ai[2] == 0.0) + this.ai[2] = (float) num4; + } + float num8 = this.ai[2] + (float) num5 + (float) num7; + if ((double) num8 == 1.0) + Main.PlaySound(4, (int) this.position.X, (int) this.position.Y, 17); + if ((double) num8 < (double) num7) + { + Vector2 Position = this.Top + new Vector2((float) (this.spriteDirection * 6), 6f); + float num9 = MathHelper.Lerp(20f, 30f, (float) (((double) num8 * 3.0 + 50.0) / 182.0)); + double num10 = (double) Main.rand.NextFloat(); + for (float num11 = 0.0f; (double) num11 < 2.0; ++num11) + { + 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 * num9; + 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); + return; + } + if ((double) this.ai[2] < 0.0 && (double) this.ai[2] >= (double) -num5) + { + 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) num3; + } + else + { + ++this.ai[2]; + if ((double) this.ai[2] == 0.0) + this.ai[2] = (float) num4; + } + float num12 = this.ai[2] + (float) num5; + if ((double) num12 < 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 num13 = MathHelper.Lerp(20f, 30f, (float) (((double) num12 * 3.0 + 50.0) / 182.0)); + double num14 = (double) Main.rand.NextFloat(); + for (float num15 = 0.0f; (double) num15 < 1.0; ++num15) + { + 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 * num13; + dust.noGravity = true; + dust.velocity = vector2 * 4f; + dust.scale = 0.5f + Main.rand.NextFloat(); + } + } + 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_2 = player1.Center - this.Center; + if ((double) vector2_2.Length() >= 700.0) + return; + bool flag = (double) vector2_2.Length() < 30.0; + if (!flag) + { + float x = 0.7853982f.ToRotationVector2().X; + Vector2 vector2_3 = Vector2.Normalize(vector2_2); + if ((double) vector2_3.X > (double) x || (double) vector2_3.X < -(double) x) + flag = 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) || !flag || (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) + return; + player1.AddBuff(156, num6 + (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.knockBackMultiplier; + 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 num16 = 8f; + float num17 = 40f; + Vector2 vector2_4 = Main.player[this.target].Center - this.Center; + float num18 = vector2_4.Length(); + float num19 = num16 + num18 / 200f; + vector2_4.Normalize(); + Vector2 vector2_5 = vector2_4 * num19; + this.velocity = (this.velocity * (num17 - 1f) + vector2_5) / num17; + if ((double) num18 >= 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 index1 = (int) this.Center.X / 16; + int index2 = (int) ((double) this.position.Y + (double) this.height + 12.0) / 16; + bool flag = false; + for (int index3 = index1 - 1; index3 <= index1 + 1; ++index3) + { + if (Main.tile[index3, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index3, index2].active() && Main.tileSolid[(int) Main.tile[index3, index2].type]) + flag = true; + } + if (flag && !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 index4 = 0; index4 < 2; ++index4) + { + 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 index5 = Dust.NewDust(Position, 1, 1, 27, newColor: newColor); + Main.dust[index5].velocity = -vector2_7 * 0.3f; + Main.dust[index5].alpha = 100; + if (Main.rand.Next(2) == 0) + { + Main.dust[index5].noGravity = true; + Main.dust[index5].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.timeLeft > 1) + this.timeLeft = 1; + } + } + if (this.type == 419) + { + this.reflectingProjectiles = false; + this.takenDamageMultiplier = 1f; + int num20 = 6; + int num21 = 10; + float num22 = 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) -num20) + { + --this.ai[2]; + this.velocity.X *= 0.9f; + return; + } + if ((double) this.ai[2] == (double) -num20) + { + --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 * num22; + this.netUpdate = true; + return; + } + if ((double) this.ai[2] < (double) -num20) + { + --this.ai[2]; + if ((double) this.velocity.Y == 0.0) + this.ai[2] = 60f; + else if ((double) this.ai[2] < (double) (-num20 - num21)) + { + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > 24.0) + this.velocity.Y = 24f; + } + this.reflectingProjectiles = true; + this.takenDamageMultiplier = 3f; + if (!this.justHit) + return; + this.ai[2] = 60f; + this.netUpdate = true; + return; + } + } + } + if (this.type == 415) + { + int num23 = 42; + int num24 = 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 num25 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 516) + ++num25; + } + if (num25 > 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) -num23) + { + --this.ai[2]; + if ((double) this.ai[2] == (double) -num23) + this.ai[2] = (float) (180 + 30 * Main.rand.Next(10)); + this.velocity.X *= 0.8f; + if ((double) this.ai[2] != (double) -num24 && (double) this.ai[2] != (double) (-num24 - 8) && (double) this.ai[2] != (double) (-num24 - 16)) + return; + 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; + } + 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) + { + 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; + } + } + 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) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.scale = 1f; + dust.noLight = true; + } + } + bool flag1 = false; + if ((double) this.velocity.X == 0.0) + flag1 = true; + if (this.justHit) + flag1 = 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 num26 = 60; + if (this.type == 120) + { + num26 = 180; + if ((double) this.ai[3] == -120.0) + { + this.velocity = this.velocity * 0.0f; + this.ai[3] = 0.0f; + Main.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 num27 = this.oldPos[2].X + (float) this.width * 0.5f - vector2.X; + float num28 = this.oldPos[2].Y + (float) this.height * 0.5f - vector2.Y; + float num29 = 2f / (float) Math.Sqrt((double) num27 * (double) num27 + (double) num28 * (double) num28); + float SpeedX = num27 * num29; + float SpeedY = num28 * num29; + for (int index6 = 0; index6 < 20; ++index6) + { + int index7 = Dust.NewDust(this.position, this.width, this.height, 71, SpeedX, SpeedY, 200, Scale: 2f); + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity.X *= 2f; + } + for (int index8 = 0; index8 < 20; ++index8) + { + int index9 = Dust.NewDust(this.oldPos[2], this.width, this.height, 71, -SpeedX, -SpeedY, 200, Scale: 2f); + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity.X *= 2f; + } + } + } + bool flag2 = false; + bool flag3 = 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 == 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 == 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) + flag3 = false; + bool flag4 = false; + switch (this.type) + { + case 425: + case 471: + flag4 = true; + break; + } + bool flag5 = 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) + { + flag5 = false; + break; + } + break; + } + if (!flag4 & flag5) + { + 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; + if ((((double) this.position.X == (double) this.oldPosition.X ? 1 : ((double) this.ai[3] >= (double) num26 ? 1 : 0)) | (flag2 ? 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) (num26 * 10)) + this.ai[3] = 0.0f; + if (this.justHit) + this.ai[3] = 0.0f; + if ((double) this.ai[3] == (double) num26) + this.netUpdate = true; + } + 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 index10 = 0; index10 < 100; ++index10) + { + int index11 = Main.rand.Next(maxValue); + int index12 = index11; + while (index12 == index11) + index12 = Main.rand.Next(maxValue); + int num30 = numArray[index11]; + numArray[index11] = numArray[index12]; + numArray[index12] = num30; + } + } + 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 num31 = (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 *= num31; + if (maxValue > 0) + { + --maxValue; + vector2_12 = Main.player[numArray[maxValue]].Center - this.Center; + vector2_12.Normalize(); + vector2_12 *= num31; + } + 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.knockBackMultiplier; + if (this.type == 469) + { + this.knockBackResist = 0.45f * Main.knockBackMultiplier; + if ((double) this.ai[2] == 1.0) + this.knockBackResist = 0.0f; + bool flag6 = false; + int num32 = (int) this.Center.X / 16; + int num33 = (int) this.Center.Y / 16; + for (int index13 = num32 - 1; index13 <= num32 + 1; ++index13) + { + for (int index14 = num33 - 1; index14 <= num33 + 1; ++index14) + { + if (Main.tile[index13, index14] != null && Main.tile[index13, index14].wall > (byte) 0) + { + flag6 = true; + break; + } + } + if (flag6) + break; + } + if ((double) this.ai[2] == 0.0 & flag6) + { + if ((double) this.velocity.Y == 0.0) + { + this.velocity.Y = -4.6f; + this.velocity.X *= 1.3f; + } + else if ((double) this.velocity.Y > 0.0) + this.ai[2] = 1f; + } + if (flag6 && (double) this.ai[2] == 1.0 && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + Vector2 vector2 = Main.player[this.target].Center - this.Center; + float num34 = vector2.Length(); + vector2.Normalize(); + this.velocity = (this.velocity * 29f + vector2 * (float) (4.5 + (double) num34 / 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)) + { + 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 ((double) this.ai[3] < (double) num26 && (Main.eclipse || !Main.dayTime || (double) this.position.Y > Main.worldSurface * 16.0 || Main.invasionType == 1 && (this.type == 343 || this.type == 350) || Main.invasionType == 1 && (this.type == 26 || this.type == 27 || this.type == 28 || this.type == 111 || this.type == 471) || this.type == 73 || Main.invasionType == 3 && this.type >= 212 && this.type <= 216 || Main.invasionType == 4 && (this.type == 381 || this.type == 382 || this.type == 383 || this.type == 385 || this.type == 386 || this.type == 389 || this.type == 391 || this.type == 520) || this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 47 || this.type == 67 || this.type == 77 || this.type == 78 || this.type == 79 || this.type == 80 || this.type == 110 || this.type == 120 || this.type == 168 || this.type == 181 || this.type == 185 || this.type == 198 || this.type == 199 || this.type == 206 || this.type == 217 || this.type == 218 || this.type == 219 || this.type == 220 || this.type == 239 || this.type == 243 || this.type == 254 || this.type == (int) byte.MaxValue || this.type == 257 || this.type == 258 || this.type == 291 || this.type == 292 || this.type == 293 || this.type == 379 || this.type == 380 || this.type == 464 || this.type == 470 || this.type == 424 || this.type == 411 && ((double) this.ai[1] >= 180.0 || (double) this.ai[1] < 90.0) || this.type == 409 || this.type == 425 || this.type == 429 || this.type == 427 || this.type == 428 || this.type == 508 || this.type == 415 || this.type == 419 || this.type >= 524 && this.type <= 527 || this.type == 528 || this.type == 529 || this.type == 530 || this.type == 532)) + { + if ((this.type == 3 || 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) && Main.rand.Next(1000) == 0) + Main.PlaySound(14, (int) this.position.X, (int) this.position.Y); + if (this.type == 489 && Main.rand.Next(800) == 0) + Main.PlaySound(14, (int) this.position.X, (int) this.position.Y, this.type); + if ((this.type == 78 || this.type == 79 || this.type == 80) && Main.rand.Next(500) == 0) + Main.PlaySound(26, (int) this.position.X, (int) this.position.Y); + if (this.type == 159 && Main.rand.Next(500) == 0) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 7); + if (this.type == 162 && Main.rand.Next(500) == 0) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 6); + if (this.type == 181 && Main.rand.Next(500) == 0) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 8); + if (this.type >= 269 && this.type <= 280 && Main.rand.Next(1000) == 0) + Main.PlaySound(14, (int) this.position.X, (int) this.position.Y); + this.TargetClosest(); + } + else if ((double) this.ai[2] <= 0.0 || this.type != 110 && this.type != 111 && this.type != 206 && this.type != 216 && this.type != 214 && this.type != 215 && this.type != 291 && this.type != 292 && this.type != 293 && this.type != 350 && this.type != 381 && this.type != 382 && this.type != 383 && this.type != 385 && this.type != 386 && this.type != 389 && this.type != 391 && this.type != 469 && this.type != 166 && this.type != 466 && this.type != 471 && this.type != 411 && this.type != 409 && this.type != 424 && this.type != 425 && this.type != 426 && this.type != 415 && this.type != 419 && this.type != 520) + { + if (Main.dayTime && (double) this.position.Y / 16.0 < Main.worldSurface && this.timeLeft > 10) + this.timeLeft = 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) + { + float num35 = 1.5f; + if (this.type == 294) + num35 = 2f; + else if (this.type == 295) + num35 = 1.75f; + else if (this.type == 296) + num35 = 1.25f; + else if (this.type == 201) + num35 = 1.1f; + else if (this.type == 202) + num35 = 0.9f; + else if (this.type == 203) + num35 = 1.2f; + else if (this.type == 338) + num35 = 1.75f; + else if (this.type == 339) + num35 = 1.25f; + else if (this.type == 340) + num35 = 2f; + else if (this.type == 385) + num35 = 1.8f; + else if (this.type == 389) + num35 = 2.25f; + else if (this.type == 462) + num35 = 4f; + else if (this.type == 463) + num35 = 0.75f; + else if (this.type == 466) + num35 = 3.75f; + else if (this.type == 469) + num35 = 3.25f; + else if (this.type == 480) + num35 = (float) (1.5 + (1.0 - (double) this.life / (double) this.lifeMax) * 2.0); + else if (this.type == 425) + num35 = 6f; + else if (this.type == 429) + num35 = 4f; + if (this.type == 21 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 342) + num35 *= (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num35 || (double) this.velocity.X > (double) num35) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num35 && this.direction == 1) + { + if (this.type == 466 && (double) this.velocity.X < -2.0) + this.velocity.X *= 0.9f; + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num35) + this.velocity.X = num35; + } + else if ((double) this.velocity.X > -(double) num35 && this.direction == -1) + { + if (this.type == 466 && (double) this.velocity.X > 2.0) + this.velocity.X *= 0.9f; + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num35) + this.velocity.X = -num35; + } + 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 num36 = 1.5f; + if (this.type == 269) + num36 = 2f; + if (this.type == 270) + num36 = 1f; + if (this.type == 271) + num36 = 1.5f; + if (this.type == 272) + num36 = 3f; + if (this.type == 273) + num36 = 1.25f; + if (this.type == 274) + num36 = 3f; + if (this.type == 275) + num36 = 3.25f; + if (this.type == 276) + num36 = 2f; + if (this.type == 277) + num36 = 2.75f; + if (this.type == 278) + num36 = 1.8f; + if (this.type == 279) + num36 = 1.3f; + if (this.type == 280) + num36 = 2.5f; + float num37 = num36 * (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num37 || (double) this.velocity.X > (double) num37) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num37 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num37) + this.velocity.X = num37; + } + else if ((double) this.velocity.X > -(double) num37 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num37) + this.velocity.X = -num37; + } + } + else if (this.type >= 305 && this.type <= 314) + { + float num38 = 1.5f; + if (this.type == 305 || this.type == 310) + num38 = 2f; + if (this.type == 306 || this.type == 311) + num38 = 1.25f; + if (this.type == 307 || this.type == 312) + num38 = 2.25f; + if (this.type == 308 || this.type == 313) + num38 = 1.5f; + if (this.type == 309 || this.type == 314) + num38 = 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) + { + this.velocity.Y = -7f; + this.velocity.X = num38 * (float) this.direction; + } + } + else if (this.spriteDirection == this.direction) + this.velocity.X = (float) (((double) this.velocity.X * 10.0 + (double) num38 * (double) this.direction) / 11.0); + } + else if ((double) this.velocity.X < -(double) num38 || (double) this.velocity.X > (double) num38) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num38 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num38) + this.velocity.X = num38; + } + else if ((double) this.velocity.X > -(double) num38 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num38) + this.velocity.X = -num38; + } + } + 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) + { + float num39 = 1f; + float num40 = 0.05f; + if (this.life < this.lifeMax / 2) + { + num39 = 2f; + num40 = 0.1f; + } + if (this.type == 79) + num39 *= 1.5f; + if ((double) this.velocity.X < -(double) num39 || (double) this.velocity.X > (double) num39) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num39 && this.direction == 1) + { + this.velocity.X += num40; + if ((double) this.velocity.X > (double) num39) + this.velocity.X = num39; + } + else if ((double) this.velocity.X > -(double) num39 && this.direction == -1) + { + this.velocity.X -= num40; + if ((double) this.velocity.X < -(double) num39) + this.velocity.X = -num39; + } + } + else if (this.type == 287) + { + float num41 = 5f; + float num42 = 0.2f; + 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.7f; + } + else if ((double) this.velocity.X < (double) num41 && this.direction == 1) + { + this.velocity.X += num42; + if ((double) this.velocity.X > (double) num41) + this.velocity.X = num41; + } + else if ((double) this.velocity.X > -(double) num41 && this.direction == -1) + { + this.velocity.X -= num42; + if ((double) this.velocity.X < -(double) num41) + this.velocity.X = -num41; + } + } + else if (this.type == 243) + { + float num43 = 1f; + float num44 = 0.07f; + float num45 = num43 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 1.5); + float num46 = num44 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 0.150000005960464); + 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 == 251) + { + float num47 = 1f; + float num48 = 0.08f; + float num49 = num47 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 2.0); + float num50 = num48 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 0.200000002980232); + if ((double) this.velocity.X < -(double) num49 || (double) this.velocity.X > (double) num49) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num49 && this.direction == 1) + { + this.velocity.X += num50; + if ((double) this.velocity.X > (double) num49) + this.velocity.X = num49; + } + else if ((double) this.velocity.X > -(double) num49 && this.direction == -1) + { + this.velocity.X -= num50; + if ((double) this.velocity.X < -(double) num49) + this.velocity.X = -num49; + } + } + 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 num51 = 0.15f; + float num52 = 1.5f; + if ((double) this.velocity.X < -(double) num52 || (double) this.velocity.X > (double) num52) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num52 && this.direction == 1) + { + this.velocity.X += num51; + if ((double) this.velocity.X > (double) num52) + this.velocity.X = num52; + } + else if ((double) this.velocity.X > -(double) num52 && this.direction == -1) + { + this.velocity.X -= num51; + if ((double) this.velocity.X < -(double) num52) + this.velocity.X = -num52; + } + } + } + else if (this.type == 460) + { + float num53 = 3f; + float num54 = 0.1f; + if ((double) Math.Abs(this.velocity.X) > 2.0) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 2.5) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 3.0) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 3.5) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 4.0) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 4.5) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 5.0) + num54 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 5.5) + num54 *= 0.8f; + float num55 = num53 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 3.0); + 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) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X *= 0.93f; + this.velocity.X += num54; + if ((double) this.velocity.X > (double) num55) + this.velocity.X = num55; + } + else if ((double) this.velocity.X > -(double) num55 && this.direction == -1) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X *= 0.93f; + this.velocity.X -= num54; + if ((double) this.velocity.X < -(double) num55) + this.velocity.X = -num55; + } + } + else if (this.type == 508) + { + float num56 = 2.5f; + float num57 = 40f; + float num58 = Math.Abs(this.velocity.X); + if ((double) num58 > 2.75) + { + num56 = 3.5f; + num57 += 80f; + } + else if ((double) num58 > 2.25) + { + num56 = 3f; + num57 += 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.9f; + if ((double) this.velocity.X < 0.0 && this.direction > 0) + this.velocity = this.velocity * 0.9f; + } + if ((double) Math.Abs(this.velocity.Y) > (double) NPC.gravity) + num57 *= 3f; + if ((double) this.velocity.X <= 0.0 && this.direction < 0) + this.velocity.X = (float) (((double) this.velocity.X * (double) num57 - (double) num56) / ((double) num57 + 1.0)); + else if ((double) this.velocity.X >= 0.0 && this.direction > 0) + this.velocity.X = (float) (((double) this.velocity.X * (double) num57 + (double) num56) / ((double) num57 + 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 num59 = 5f; + float num60 = 0.25f; + float num61 = 0.7f; + if (this.type == 427) + { + num59 = 6f; + num60 = 0.2f; + num61 = 0.8f; + } + else if (this.type == 415) + { + num59 = 4f; + num60 = 0.1f; + num61 = 0.95f; + } + else if (this.type == 419) + { + num59 = 6f; + num60 = 0.15f; + num61 = 0.85f; + } + else if (this.type == 518) + { + num59 = 5f; + num60 = 0.1f; + num61 = 0.95f; + } + else if (this.type == 532) + { + num59 = 5f; + num60 = 0.15f; + num61 = 0.98f; + } + if ((double) this.velocity.X < -(double) num59 || (double) this.velocity.X > (double) num59) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num61; + } + else if ((double) this.velocity.X < (double) num59 && this.direction == 1) + { + this.velocity.X += num60; + if ((double) this.velocity.X > (double) num59) + this.velocity.X = num59; + } + else if ((double) this.velocity.X > -(double) num59 && this.direction == -1) + { + this.velocity.X -= num60; + if ((double) this.velocity.X < -(double) num59) + this.velocity.X = -num59; + } + } + else if (this.type >= 430 && this.type <= 436 || this.type == 494 || this.type == 495) + { + if ((double) this.ai[2] == 0.0) + { + this.damage = this.defDamage; + float num62 = 1f * (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num62 || (double) this.velocity.X > (double) num62) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num62 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num62) + this.velocity.X = num62; + } + else if ((double) this.velocity.X > -(double) num62 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num62) + this.velocity.X = -num62; + } + 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 num63 = 50; + if (this.type >= 494 && this.type <= 495) + num63 = 42; + if ((double) vector2.Length() < (double) num63 && 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 num64 = 1f; + if (this.type == 186) + num64 = 1.1f; + if (this.type == 187) + num64 = 0.9f; + if (this.type == 188) + num64 = 1.2f; + if (this.type == 189) + num64 = 0.8f; + if (this.type == 132) + num64 = 0.95f; + if (this.type == 200) + num64 = 0.87f; + if (this.type == 223) + num64 = 1.05f; + if (this.type == 489) + { + float num65 = (Main.player[this.target].Center - this.Center).Length() * (1f / 400f); + if ((double) num65 > 1.5) + num65 = 1.5f; + num64 = (!Main.expertMode ? 2.5f - num65 : 3f - num65) * 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) + num64 *= (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num64 || (double) this.velocity.X > (double) num64) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num64 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num64) + this.velocity.X = num64; + } + else if ((double) this.velocity.X > -(double) num64 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num64) + this.velocity.X = -num64; + } + } + 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)) + 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 num66 = Main.player[this.target].Center.X - (float) (this.direction * 400) - this.Center.X; + float num67 = Main.player[this.target].Bottom.Y - this.Bottom.Y; + if ((double) num66 < 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.9f; + else if ((double) num66 > 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.9f; + if ((double) num66 < 0.0 && (double) this.velocity.X > -5.0) + this.velocity.X -= 0.1f; + else if ((double) num66 > 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) num67 < -20.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.8f; + else if ((double) num67 > 20.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.8f; + if ((double) num67 < -20.0 && (double) this.velocity.Y > -5.0) + this.velocity.Y -= 0.3f; + else if ((double) num67 > 20.0 && (double) this.velocity.Y < 5.0) + this.velocity.Y += 0.3f; + } + if (Main.rand.Next(3) == 0) + { + 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; + } + 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)) + { + 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 Damage = Main.expertMode ? 50 : 75; + 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, Damage, 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 num68 = Main.player[this.target].Center.X - this.Center.X; + float num69 = Main.player[this.target].Center.Y - this.Center.Y; + if ((double) num68 < 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.98f; + else if ((double) num68 > 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.98f; + if ((double) num68 < -20.0 && (double) this.velocity.X > -6.0) + this.velocity.X -= 0.015f; + else if ((double) num68 > 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) num69 < -20.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.98f; + else if ((double) num69 > 20.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.98f; + if ((double) num69 < -20.0 && (double) this.velocity.Y > -6.0) + this.velocity.Y -= 0.15f; + else if ((double) num69 > 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)) + { + 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 num70 = Main.player[this.target].Center.X - (float) (this.direction * 300) - this.Center.X; + if ((double) num70 < 40.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.98f; + else if ((double) num70 > 40.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.98f; + if ((double) num70 < 40.0 && (double) this.velocity.X > -5.0) + this.velocity.X -= 0.2f; + else if ((double) num70 > 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)) + 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) + { + 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; + } + if ((double) this.ai[1] >= 57.0) + { + 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; + } + if (Main.rand.Next(6) == 0) + { + 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; + } + } + 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 num71 = (double) Main.player[this.target].position.X + (double) Main.player[this.target].width * 0.5 - (double) vector2.X; + float num72 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + if (Math.Sqrt(num71 * num71 + (double) num72 * (double) num72) > 300.0) + this.Transform(158); + } + if (this.type == 164 && Main.netMode != 1 && (double) this.velocity.Y == 0.0) + { + int num73 = (int) this.Center.X / 16; + int num74 = (int) this.Center.Y / 16; + bool flag7 = false; + for (int index15 = num73 - 1; index15 <= num73 + 1; ++index15) + { + for (int index16 = num74 - 1; index16 <= num74 + 1; ++index16) + { + if (Main.tile[index15, index16].wall > (byte) 0) + flag7 = true; + } + } + if (flag7) + this.Transform(165); + } + if (this.type == 239 && Main.netMode != 1 && (double) this.velocity.Y == 0.0) + { + int num75 = (int) this.Center.X / 16; + int num76 = (int) this.Center.Y / 16; + bool flag8 = false; + for (int index17 = num75 - 1; index17 <= num75 + 1; ++index17) + { + for (int index18 = num76 - 1; index18 <= num76 + 1; ++index18) + { + if (Main.tile[index17, index18].wall > (byte) 0) + flag8 = true; + } + } + if (flag8) + this.Transform(240); + } + if (this.type == 530 && Main.netMode != 1 && (double) this.velocity.Y == 0.0) + { + int num77 = (int) this.Center.X / 16; + int num78 = (int) this.Center.Y / 16; + bool flag9 = false; + for (int index19 = num77 - 1; index19 <= num77 + 1; ++index19) + { + for (int index20 = num78 - 1; index20 <= num78 + 1; ++index20) + { + if (Main.tile[index19, index20].wall > (byte) 0) + flag9 = true; + } + } + if (flag9) + this.Transform(531); + } + if (Main.netMode != 1 && 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; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2.X, vector2.Y, 472, 18, 0.0f, Main.myPlayer); + } + } + if (this.type == 163 && Main.netMode != 1 && (double) this.velocity.Y == 0.0) + { + int num79 = (int) this.Center.X / 16; + int num80 = (int) this.Center.Y / 16; + bool flag10 = false; + for (int index21 = num79 - 1; index21 <= num79 + 1; ++index21) + { + for (int index22 = num80 - 1; index22 <= num80 + 1; ++index22) + { + if (Main.tile[index21, index22].wall > (byte) 0) + flag10 = true; + } + } + if (flag10) + this.Transform(238); + } + if (this.type == 236 && Main.netMode != 1 && (double) this.velocity.Y == 0.0) + { + int num81 = (int) this.Center.X / 16; + int num82 = (int) this.Center.Y / 16; + bool flag11 = false; + for (int index23 = num81 - 1; index23 <= num81 + 1; ++index23) + { + for (int index24 = num82 - 1; index24 <= num82 + 1; ++index24) + { + if (Main.tile[index23, index24].wall > (byte) 0) + flag11 = true; + } + } + if (flag11) + this.Transform(237); + } + 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 num83 = (float) Main.rand.Next(30, 900) * ((float) this.life / (float) this.lifeMax) + 30f; + if (Main.netMode != 1 && (double) this.ai[2] >= (double) num83 && (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 num84 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num85 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num86 = num84 + (float) Main.rand.Next(-40, 41); + float num87 = num85 + (float) Main.rand.Next(-40, 41); + float num88 = (float) Math.Sqrt((double) num86 * (double) num86 + (double) num87 * (double) num87); + this.netUpdate = true; + float num89 = (float) (15.0 / (double) num88); + float SpeedX = num86 * num89; + float SpeedY = num87 * num89; + 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 num90 = (float) Main.rand.Next(60, 1800) * ((float) this.life / (float) this.lifeMax) + 15f; + if (Main.netMode != 1 && (double) this.ai[2] >= (double) num90 && (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 num91 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num92 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num93 = num91 + (float) Main.rand.Next(-40, 41); + float num94 = num92 + (float) Main.rand.Next(-30, 0); + float num95 = (float) Math.Sqrt((double) num93 * (double) num93 + (double) num94 * (double) num94); + this.netUpdate = true; + float num96 = (float) (15.0 / (double) num95); + float SpeedX = num93 * num96; + float SpeedY = num94 * num96; + 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 num97 = (int) this.position.X / 16; + int num98 = (int) this.position.Y / 16; + int num99 = (int) this.position.X / 16; + int num100 = (int) this.position.Y / 16; + int num101 = 5; + int num102 = 0; + bool flag12 = false; + int num103 = 2; + int num104 = 0; + while (!flag12 && num102 < 100) + { + ++num102; + int index25 = Main.rand.Next(num97 - num101, num97 + num101); + for (int index26 = Main.rand.Next(num98 - num101, num98 + num101); index26 < num98 + num101; ++index26) + { + if ((index26 < num98 - num103 || index26 > num98 + num103 || index25 < num97 - num103 || index25 > num97 + num103) && (index26 < num100 - num104 || index26 > num100 + num104 || index25 < num99 - num104 || index25 > num99 + num104) && Main.tile[index25, index26].nactive()) + { + bool flag13 = true; + if (Main.tile[index25, index26 - 1].lava()) + flag13 = false; + if (flag13 && Main.tileSolid[(int) Main.tile[index25, index26].type] && !Collision.SolidTiles(index25 - 1, index25 + 1, index26 - 4, index26 - 1)) + { + int index27 = NPC.NewNPC(index25 * 16 - this.width / 2, index26 * 16, 387); + Main.npc[index27].position.Y = (float) (index26 * 16 - Main.npc[index27].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 num105 = -1; + int num106 = -1; + if (this.type == 411) + { + flag14 = true; + num105 = 90; + num106 = 90; + if ((double) this.ai[1] <= 150.0) + flag16 = false; + } + if (this.confused) + { + this.ai[2] = 0.0f; + } + else + { + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + if (this.justHit) + { + this.ai[1] = 30f; + this.ai[2] = 0.0f; + } + int num107 = 70; + if (this.type == 379 || this.type == 380) + num107 = 80; + if (this.type == 381 || this.type == 382) + num107 = 80; + if (this.type == 520) + num107 = 15; + if (this.type == 350) + num107 = 110; + if (this.type == 291) + num107 = 200; + if (this.type == 292) + num107 = 120; + if (this.type == 293) + num107 = 90; + if (this.type == 111) + num107 = 180; + if (this.type == 206) + num107 = 50; + if (this.type == 481) + num107 = 100; + if (this.type == 214) + num107 = 40; + if (this.type == 215) + num107 = 80; + if (this.type == 290) + num107 = 30; + if (this.type == 411) + num107 = 300; + if (this.type == 409) + num107 = 60; + if (this.type == 424) + num107 = 180; + if (this.type == 426) + num107 = 60; + bool flag17 = false; + if (this.type == 216) + { + if ((double) this.localAI[2] >= 20.0) + flag17 = true; + num107 = !flag17 ? 8 : 60; + } + int num108 = num107 / 2; + if (this.type == 424) + num108 = num107 - 1; + if (this.type == 426) + num108 = num107 - 1; + if ((double) this.ai[2] > 0.0) + { + if (flag16) + this.TargetClosest(); + if ((double) this.ai[1] == (double) num108) + { + if (this.type == 216) + ++this.localAI[2]; + float num109 = 11f; + if (this.type == 111) + num109 = 9f; + if (this.type == 206) + num109 = 7f; + if (this.type == 290) + num109 = 9f; + if (this.type == 293) + num109 = 4f; + if (this.type == 214) + num109 = 14f; + if (this.type == 215) + num109 = 16f; + if (this.type == 382) + num109 = 7f; + if (this.type == 520) + num109 = 8f; + if (this.type == 409) + num109 = 4f; + if (this.type >= 449 && this.type <= 452) + num109 = 7f; + if (this.type == 481) + num109 = 8f; + if (this.type == 468) + num109 = 7.5f; + if (this.type == 411) + num109 = 1f; + if (this.type >= 498 && this.type <= 506) + num109 = 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 num110 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num111 = Math.Abs(num110) * 0.1f; + if (this.type == 291 || this.type == 292) + num111 = 0.0f; + if (this.type == 215) + num111 = Math.Abs(num110) * 0.08f; + if (this.type == 214 || this.type == 216 && !flag17) + num111 = 0.0f; + if (this.type == 381 || this.type == 382 || this.type == 520) + num111 = 0.0f; + if (this.type >= 449 && this.type <= 452) + num111 = (float) ((double) Math.Abs(num110) * (double) Main.rand.Next(10, 50) * 0.00999999977648258); + if (this.type == 468) + num111 = (float) ((double) Math.Abs(num110) * (double) Main.rand.Next(10, 50) * 0.00999999977648258); + if (this.type == 481) + num111 = (float) ((double) Math.Abs(num110) * (double) Main.rand.Next(-10, 11) * 0.00350000010803342); + if (this.type >= 498 && this.type <= 506) + num111 = (float) ((double) Math.Abs(num110) * (double) Main.rand.Next(1, 11) * (1.0 / 400.0)); + float num112 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y - num111; + if (this.type == 291) + { + num110 += (float) Main.rand.Next(-40, 41) * 0.2f; + num112 += (float) Main.rand.Next(-40, 41) * 0.2f; + } + else if (this.type == 381 || this.type == 382 || this.type == 520) + { + float num113 = num110 + (float) Main.rand.Next(-100, 101) * 0.4f; + float num114 = num112 + (float) Main.rand.Next(-100, 101) * 0.4f; + num110 = num113 * ((float) Main.rand.Next(85, 116) * 0.01f); + num112 = num114 * ((float) Main.rand.Next(85, 116) * 0.01f); + if (this.type == 520) + { + float num115 = num110 + (float) Main.rand.Next(-100, 101) * 0.6f; + float num116 = num112 + (float) Main.rand.Next(-100, 101) * 0.6f; + num110 = num115 * ((float) Main.rand.Next(85, 116) * 0.015f); + num112 = num116 * ((float) Main.rand.Next(85, 116) * 0.015f); + } + } + else if (this.type == 481) + { + num110 += (float) Main.rand.Next(-40, 41) * 0.4f; + num112 += (float) Main.rand.Next(-40, 41) * 0.4f; + } + else if (this.type >= 498 && this.type <= 506) + { + num110 += (float) Main.rand.Next(-40, 41) * 0.3f; + num112 += (float) Main.rand.Next(-40, 41) * 0.3f; + } + else if (this.type != 292) + { + num110 += (float) Main.rand.Next(-40, 41); + num112 += (float) Main.rand.Next(-40, 41); + } + float num117 = (float) Math.Sqrt((double) num110 * (double) num110 + (double) num112 * (double) num112); + this.netUpdate = true; + float num118 = num109 / num117; + float num119 = num110 * num118; + float SpeedY = num112 * num118; + 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 = 20; + } + 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 = Main.expertMode ? 45 : 60; + } + if (this.type == 424) + { + Type = 573; + Damage = Main.expertMode ? 45 : 60; + } + if (this.type == 426) + { + Type = 581; + Damage = Main.expertMode ? 45 : 60; + } + 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 += num119; + vector2.Y += SpeedY; + if (Main.expertMode && this.type == 290) + Damage = (int) ((double) Damage * 0.75); + if (Main.expertMode && this.type >= 381 && this.type <= 392) + Damage = (int) ((double) Damage * 0.8); + if (Main.netMode != 1) + { + if (this.type == 292) + { + for (int index = 0; index < 4; ++index) + { + float num120 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num121 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num122 = 12f / (float) Math.Sqrt((double) num120 * (double) num120 + (double) num121 * (double) num121); + float num123; + float num124 = num123 = num120 + (float) Main.rand.Next(-40, 41); + float num125; + float num126 = num125 = num121 + (float) Main.rand.Next(-40, 41); + num119 = num124 * num122; + SpeedY = num126 * num122; + Projectile.NewProjectile(vector2.X, vector2.Y, num119, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + } + } + else if (this.type == 411) + Projectile.NewProjectile(vector2.X, vector2.Y, num119, 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(num119, SpeedY - 6f); + } + else + Projectile.NewProjectile(vector2.X, vector2.Y, num119, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + } + this.ai[2] = (double) Math.Abs(SpeedY) <= (double) Math.Abs(num119) * 2.0 ? ((double) Math.Abs(num119) <= (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 || num105 != -1 && (double) this.ai[1] >= (double) num105 && (double) this.ai[1] < (double) (num105 + num106) && (!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 num127 = 10f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num128 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num129 = Math.Abs(num128) * 0.1f; + float num130 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y - num129; + float num131 = num128 + (float) Main.rand.Next(-40, 41); + float num132 = num130 + (float) Main.rand.Next(-40, 41); + float num133 = (float) Math.Sqrt((double) num131 * (double) num131 + (double) num132 * (double) num132); + float num134 = 700f; + if (this.type == 214) + num134 = 550f; + if (this.type == 215) + num134 = 800f; + if (this.type >= 498 && this.type <= 506) + num134 = 190f; + if (this.type >= 449 && this.type <= 452) + num134 = 200f; + if (this.type == 481) + num134 = 400f; + if (this.type == 468) + num134 = 400f; + if ((double) num133 < (double) num134) + { + this.netUpdate = true; + this.velocity.X *= 0.5f; + float num135 = num127 / num133; + float num136 = num131 * num135; + float num137 = num132 * num135; + this.ai[2] = 3f; + this.ai[1] = (float) num107; + this.ai[2] = (double) Math.Abs(num137) <= (double) Math.Abs(num136) * 2.0 ? ((double) Math.Abs(num136) <= (double) Math.Abs(num137) * 2.0 ? ((double) num137 <= 0.0 ? 4f : 2f) : 3f) : ((double) num137 <= 0.0 ? 5f : 1f); + } + } + } + if ((double) this.ai[2] <= 0.0 || flag14 && (num105 == -1 || (double) this.ai[1] < (double) num105 || (double) this.ai[1] >= (double) (num105 + num106))) + { + float num138 = 1f; + float num139 = 0.07f; + float num140 = 0.8f; + if (this.type == 214) + { + num138 = 2f; + num139 = 0.09f; + } + else if (this.type == 215) + { + num138 = 1.5f; + num139 = 0.08f; + } + else if (this.type == 381 || this.type == 382) + { + num138 = 2f; + num139 = 0.5f; + } + else if (this.type == 520) + { + num138 = 4f; + num139 = 1f; + num140 = 0.7f; + } + else if (this.type == 411) + { + num138 = 2f; + num139 = 0.5f; + } + else if (this.type == 409) + { + num138 = 2f; + num139 = 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) num138 ? 1 : ((double) this.velocity.X > (double) num138 ? 1 : 0)) | (flag19 ? 1 : 0)) != 0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num140; + } + else if ((double) this.velocity.X < (double) num138 && this.direction == 1) + { + this.velocity.X += num139; + if ((double) this.velocity.X > (double) num138) + this.velocity.X = num138; + } + else if ((double) this.velocity.X > -(double) num138 && this.direction == -1) + { + this.velocity.X -= num139; + if ((double) this.velocity.X < -(double) num138) + this.velocity.X = -num138; + } + } + 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] > 450.0) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f - (float) (this.direction * 24), this.position.Y + 4f); + int num141 = 3 * this.direction; + int num142 = -5; + int index = Projectile.NewProjectile(vector2.X, vector2.Y, (float) num141, (float) num142, 75, 0, 0.0f, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + this.ai[2] = 0.0f; + } + } + bool flag20 = false; + if ((double) this.velocity.Y == 0.0) + { + int index28 = (int) ((double) this.position.Y + (double) this.height + 7.0) / 16; + int num143 = (int) this.position.X / 16; + int num144 = (int) ((double) this.position.X + (double) this.width) / 16; + for (int index29 = num143; index29 <= num144; ++index29) + { + if (Main.tile[index29, index28] == null) + return; + if (Main.tile[index29, index28].nactive() && Main.tileSolid[(int) Main.tile[index29, index28].type]) + { + flag20 = true; + break; + } + } + } + if (this.type == 428) + flag20 = false; + if ((double) this.velocity.Y >= 0.0) + { + int num145 = 0; + if ((double) this.velocity.X < 0.0) + num145 = -1; + if ((double) this.velocity.X > 0.0) + num145 = 1; + Vector2 position = this.position; + position.X += this.velocity.X; + int index30 = (int) (((double) position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 1) * num145)) / 16.0); + int index31 = (int) (((double) position.Y + (double) this.height - 1.0) / 16.0); + if (Main.tile[index30, index31] == null) + Main.tile[index30, index31] = new Tile(); + if (Main.tile[index30, index31 - 1] == null) + Main.tile[index30, index31 - 1] = new Tile(); + if (Main.tile[index30, index31 - 2] == null) + Main.tile[index30, index31 - 2] = new Tile(); + if (Main.tile[index30, index31 - 3] == null) + Main.tile[index30, index31 - 3] = new Tile(); + if (Main.tile[index30, index31 + 1] == null) + Main.tile[index30, index31 + 1] = new Tile(); + if (Main.tile[index30 - num145, index31 - 3] == null) + Main.tile[index30 - num145, index31 - 3] = new Tile(); + if ((double) (index30 * 16) < (double) position.X + (double) this.width && (double) (index30 * 16 + 16) > (double) position.X && (Main.tile[index30, index31].nactive() && !Main.tile[index30, index31].topSlope() && !Main.tile[index30, index31 - 1].topSlope() && Main.tileSolid[(int) Main.tile[index30, index31].type] && !Main.tileSolidTop[(int) Main.tile[index30, index31].type] || Main.tile[index30, index31 - 1].halfBrick() && Main.tile[index30, index31 - 1].nactive()) && (!Main.tile[index30, index31 - 1].nactive() || !Main.tileSolid[(int) Main.tile[index30, index31 - 1].type] || Main.tileSolidTop[(int) Main.tile[index30, index31 - 1].type] || Main.tile[index30, index31 - 1].halfBrick() && (!Main.tile[index30, index31 - 4].nactive() || !Main.tileSolid[(int) Main.tile[index30, index31 - 4].type] || Main.tileSolidTop[(int) Main.tile[index30, index31 - 4].type])) && (!Main.tile[index30, index31 - 2].nactive() || !Main.tileSolid[(int) Main.tile[index30, index31 - 2].type] || Main.tileSolidTop[(int) Main.tile[index30, index31 - 2].type]) && (!Main.tile[index30, index31 - 3].nactive() || !Main.tileSolid[(int) Main.tile[index30, index31 - 3].type] || Main.tileSolidTop[(int) Main.tile[index30, index31 - 3].type]) && (!Main.tile[index30 - num145, index31 - 3].nactive() || !Main.tileSolid[(int) Main.tile[index30 - num145, index31 - 3].type])) + { + float num146 = (float) (index31 * 16); + if (Main.tile[index30, index31].halfBrick()) + num146 += 8f; + if (Main.tile[index30, index31 - 1].halfBrick()) + num146 -= 8f; + if ((double) num146 < (double) position.Y + (double) this.height) + { + float num147 = position.Y + (float) this.height - num146; + float num148 = 16.1f; + if (this.type == 163 || this.type == 164 || this.type == 236 || this.type == 239 || this.type == 530) + num148 += 8f; + if ((double) num147 <= (double) num148) + { + this.gfxOffY += this.position.Y + (float) this.height - num146; + this.position.Y = num146 - (float) this.height; + this.stepSpeed = (double) num147 >= 9.0 ? 2f : 1f; + } + } + } + } + if (flag20) + { + int index32 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int index33 = (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 == 508 || this.type == 415 || this.type == 530 || this.type == 532) + index32 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 16) * this.direction)) / 16.0); + if (Main.tile[index32, index33] == null) + Main.tile[index32, index33] = new Tile(); + if (Main.tile[index32, index33 - 1] == null) + Main.tile[index32, index33 - 1] = new Tile(); + if (Main.tile[index32, index33 - 2] == null) + Main.tile[index32, index33 - 2] = new Tile(); + if (Main.tile[index32, index33 - 3] == null) + Main.tile[index32, index33 - 3] = new Tile(); + if (Main.tile[index32, index33 + 1] == null) + Main.tile[index32, index33 + 1] = new Tile(); + if (Main.tile[index32 + this.direction, index33 - 1] == null) + Main.tile[index32 + this.direction, index33 - 1] = new Tile(); + if (Main.tile[index32 + this.direction, index33 + 1] == null) + Main.tile[index32 + this.direction, index33 + 1] = new Tile(); + if (Main.tile[index32 - this.direction, index33 + 1] == null) + Main.tile[index32 - this.direction, index33 + 1] = new Tile(); + Main.tile[index32, index33 + 1].halfBrick(); + if (((!Main.tile[index32, index33 - 1].nactive() ? 0 : (Main.tile[index32, index33 - 1].type == (ushort) 10 ? 1 : (Main.tile[index32, index33 - 1].type == (ushort) 388 ? 1 : 0))) & (flag3 ? 1 : 0)) != 0) + { + ++this.ai[2]; + this.ai[3] = 0.0f; + if ((double) this.ai[2] >= 60.0) + { + if (!Main.bloodMoon && (this.type == 3 || 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.ai[1] = 0.0f; + this.velocity.X = 0.5f * (float) -this.direction; + int num149 = 5; + if (Main.tile[index32, index33 - 1].type == (ushort) 388) + num149 = 2; + this.ai[1] += (float) num149; + 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 flag21 = false; + if ((double) this.ai[1] >= 10.0) + { + flag21 = true; + this.ai[1] = 10f; + } + if (this.type == 460) + flag21 = true; + WorldGen.KillTile(index32, index33 - 1, true); + if ((Main.netMode != 1 || !flag21) && flag21 && Main.netMode != 1) + { + if (this.type == 26) + { + WorldGen.KillTile(index32, index33 - 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) index32), number3: ((float) (index33 - 1))); + } + else + { + if (Main.tile[index32, index33 - 1].type == (ushort) 10) + { + bool flag22 = WorldGen.OpenDoor(index32, index33 - 1, this.direction); + if (!flag22) + { + this.ai[3] = (float) num26; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag22) + NetMessage.SendData(19, number2: ((float) index32), number3: ((float) (index33 - 1)), number4: ((float) this.direction)); + } + if (Main.tile[index32, index33 - 1].type == (ushort) 388) + { + bool flag23 = WorldGen.ShiftTallGate(index32, index33 - 1, false); + if (!flag23) + { + this.ai[3] = (float) num26; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag23) + NetMessage.SendData(19, number: 4, number2: ((float) index32), number3: ((float) (index33 - 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[index32, index33 - 2].nactive() && Main.tileSolid[(int) Main.tile[index32, index33 - 2].type]) + { + if (Main.tile[index32, index33 - 3].nactive() && Main.tileSolid[(int) Main.tile[index32, index33 - 3].type]) + { + this.velocity.Y = -8f; + this.netUpdate = true; + } + else + { + this.velocity.Y = -7f; + this.netUpdate = true; + } + } + else if (Main.tile[index32, index33 - 1].nactive() && Main.tileSolid[(int) Main.tile[index32, index33 - 1].type]) + { + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if ((double) this.position.Y + (double) this.height - (double) (index33 * 16) > 20.0 && Main.tile[index32, index33].nactive() && !Main.tile[index32, index33].topSlope() && Main.tileSolid[(int) Main.tile[index32, index33].type]) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (this.directionY < 0 && this.type != 67 && (!Main.tile[index32, index33 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index32, index33 + 1].type]) && (!Main.tile[index32 + this.direction, index33 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index32 + this.direction, index33 + 1].type])) + { + this.velocity.Y = -8f; + this.velocity.X *= 1.5f; + this.netUpdate = true; + } + else if (flag3) + { + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + if ((double) this.velocity.Y == 0.0 & flag1 && (double) this.ai[3] == 1.0) + this.velocity.Y = -5f; + } + 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 && (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)))) < 100.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 *= 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 (flag3) + { + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + if (Main.netMode == 1 || this.type != 120 || (double) this.ai[3] < (double) num26) + return; + int num150 = (int) Main.player[this.target].position.X / 16; + int num151 = (int) Main.player[this.target].position.Y / 16; + int num152 = (int) this.position.X / 16; + int num153 = (int) this.position.Y / 16; + int num154 = 20; + int num155 = 0; + bool flag24 = 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) + { + num155 = 100; + flag24 = true; + } + while (!flag24 && num155 < 100) + { + ++num155; + int index34 = Main.rand.Next(num150 - num154, num150 + num154); + for (int index35 = Main.rand.Next(num151 - num154, num151 + num154); index35 < num151 + num154; ++index35) + { + if ((index35 < num151 - 4 || index35 > num151 + 4 || index34 < num150 - 4 || index34 > num150 + 4) && (index35 < num153 - 1 || index35 > num153 + 1 || index34 < num152 - 1 || index34 > num152 + 1) && Main.tile[index34, index35].nactive()) + { + bool flag25 = true; + if (this.type == 32 && Main.tile[index34, index35 - 1].wall == (byte) 0) + flag25 = false; + else if (Main.tile[index34, index35 - 1].lava()) + flag25 = false; + if (flag25 && Main.tileSolid[(int) Main.tile[index34, index35].type] && !Collision.SolidTiles(index34 - 1, index34 + 1, index35 - 4, index35 - 1)) + { + this.position.X = (float) (index34 * 16 - this.width / 2); + this.position.Y = (float) (index35 * 16 - this.height); + this.netUpdate = true; + this.ai[3] = -120f; + } + } + } + } + } + + 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) + { + int num; + switch (Main.rand.Next(4)) + { + case 0: + switch (Main.rand.Next(7)) + { + case 0: + num = 290; + break; + case 1: + num = 292; + break; + case 2: + num = 296; + break; + case 3: + num = 2322; + break; + default: + num = Main.netMode == 0 || Main.rand.Next(2) != 0 ? 2350 : 2997; + break; + } + break; + case 1: + switch (Main.rand.Next(4)) + { + case 0: + num = 8; + break; + case 1: + num = 166; + break; + case 2: + num = 965; + break; + default: + num = 58; + break; + } + break; + case 2: + num = Main.rand.Next(2) != 0 ? Main.rand.Next(699, 703) : Main.rand.Next(11, 15); + break; + default: + switch (Main.rand.Next(3)) + { + case 0: + num = 71; + break; + case 1: + num = 72; + break; + default: + num = 73; + break; + } + break; + } + this.ai[1] = (float) num; + this.netUpdate = true; + } + } + 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.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; + } + 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) + { + int index = Dust.NewDust(this.position, this.width, this.height, 14, Alpha: this.alpha, newColor: this.color); + Main.dust[index].velocity *= 0.3f; + } + } + 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) + 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) + { + int index = Dust.NewDust(this.position, this.width, this.height, 76); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.1f; + } + if (this.type == 184) + { + if (Main.rand.Next(8) == 0) + { + int index = Dust.NewDust(this.position - this.velocity, this.width, this.height, 76); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.15f; + } + 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); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_2.X, vector2_2.Y, 174, 9, 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); + Projectile.NewProjectile(vector2_3.X, vector2_3.Y, vector2_4.X, vector2_4.Y, 605, 9, 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 == 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 num11 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2_5.X; + float num12 = Main.player[this.target].position.Y - vector2_5.Y; + float num13 = (float) Math.Sqrt((double) num11 * (double) num11 + (double) num12 * (double) num12); + if (Main.expertMode && (double) num13 < 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); + Projectile.NewProjectile(vector2_5.X, vector2_5.Y, vector2_6.X, vector2_6.Y, 176, 13, 0.0f, Main.myPlayer); + this.localAI[0] = 80f; + } + } + } + if ((double) num13 < 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 num14 = Main.player[this.target].position.Y - vector2_5.Y - (float) Main.rand.Next(-30, 20) - num13 * 0.05f; + float num15 = Main.player[this.target].position.X - vector2_5.X - (float) Main.rand.Next(-20, 20); + float num16 = 7f / (float) Math.Sqrt((double) num15 * (double) num15 + (double) num14 * (double) num14); + float SpeedX = num15 * num16; + float SpeedY = num14 * num16; + 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) + { + 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; + } + 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 == 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]; + } + int num = 0; + if ((double) this.ai[0] >= 0.0) + num = 1; + if ((double) this.ai[0] >= -1000.0 && (double) this.ai[0] <= -500.0) + num = 2; + if ((double) this.ai[0] >= -2000.0 && (double) this.ai[0] <= -1500.0) + num = 3; + if (num > 0) + { + this.netUpdate = true; + if (flag && (double) this.ai[2] == 1.0) + this.TargetClosest(); + if (num == 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 (num == 1) + this.ai[0] -= 1000f; + else + this.ai[0] -= 2000f; + } + 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) + return; + this.direction = -this.direction; + this.velocity.X *= -1f; + } + 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; + } + } + + 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) + Main.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 = Main.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 = Main.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) + Main.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) + Main.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); + Main.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); + Main.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 (Main.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 ((((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_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num3 = (double) Main.player[this.target].position.X + (double) Main.player[this.target].width * 0.5 - (double) vector2_1.X; + float num4 = Main.player[this.target].position.Y - vector2_1.Y; + float num5 = (float) Math.Sqrt(num3 * num3 + (double) num4 * (double) num4); + if ((double) num5 < 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_2 = Vector2.UnitY.RotatedByRandom(6.28318548202515); + dust.position = Position + vector2_2 * 20f; + dust.velocity = -vector2_2 * 2f; + dust.scale = (float) (0.5 + (double) vector2_2.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_3 = Vector2.UnitY.RotatedByRandom(6.28318548202515); + dust.position = Position + vector2_3 * 4f; + dust.velocity = vector2_3 * 4f + Vector2.UnitX * Main.rand.NextFloat() * (float) this.spriteDirection * -5f; + dust.scale = (float) (0.5 + (double) vector2_3.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, Main.expertMode ? 35 : 50, 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) num5 < 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) num5 < 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) num5 < 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; + Main.PlaySound(3, this.Center, 11); + } + if ((double) this.ai[3] < (double) num1) + { + if ((this.type == 329 || this.type == 315) && !Main.pumpkinMoon) + { + if (this.timeLeft > 10) + this.timeLeft = 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 num6 = 6f; + float num7 = 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) num6 || (double) this.velocity.X > (double) num6) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num6 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num6) + this.velocity.X = num6; + } + else if ((double) this.velocity.X > -(double) num6 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num6) + this.velocity.X = -num6; + } + } + else if (this.type == 410) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.9f; + num6 = 6f; + num7 = 0.2f; + } + else if (this.type == 423) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.85f; + num6 = 10f; + num7 = 0.2f; + } + else if (this.type == 546) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.92f; + float num8 = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedSet)) * (float) Math.Sign(Main.windSpeedSet); + if (!Main.player[this.target].ZoneSandstorm) + num8 = 0.0f; + num6 = (float) (5.0 + (double) num8 * (double) this.direction * 4.0); + num7 = 0.2f; + } + if ((double) this.velocity.X < -(double) num6 || (double) this.velocity.X > (double) num6) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num6 && this.direction == 1) + { + this.velocity.X += num7; + if ((double) this.velocity.X > (double) num6) + this.velocity.X = num6; + } + else if ((double) this.velocity.X > -(double) num6 && this.direction == -1) + { + this.velocity.X -= num7; + if ((double) this.velocity.X < -(double) num6) + this.velocity.X = -num6; + } + } + if ((double) this.velocity.Y >= 0.0) + { + int num9 = 0; + if ((double) this.velocity.X < 0.0) + num9 = -1; + if ((double) this.velocity.X > 0.0) + num9 = 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) * num9)) / 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 - num9, index2 - 3].nactive() || !Main.tileSolid[(int) Main.tile[index1 - num9, index2 - 3].type])) + { + float num10 = (float) (index2 * 16); + if (Main.tile[index1, index2].halfBrick()) + num10 += 8f; + if (Main.tile[index1, index2 - 1].halfBrick()) + num10 -= 8f; + if ((double) num10 < (double) position.Y + (double) this.height) + { + float num11 = position.Y + (float) this.height - num10; + if ((double) num11 <= 16.1) + { + this.gfxOffY += this.position.Y + (float) this.height - num10; + this.position.Y = num10 - (float) this.height; + this.stepSpeed = (double) num11 >= 9.0 ? 2f : 1f; + } + } + } + } + if ((double) this.velocity.Y == 0.0) + { + int index3 = (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 index4 = (int) (((double) this.position.Y + (double) this.height - 15.0) / 16.0); + if (Main.tile[index3, index4] == null) + Main.tile[index3, index4] = new Tile(); + if (Main.tile[index3, index4 - 1] == null) + Main.tile[index3, index4 - 1] = new Tile(); + if (Main.tile[index3, index4 - 2] == null) + Main.tile[index3, index4 - 2] = new Tile(); + if (Main.tile[index3, index4 - 3] == null) + Main.tile[index3, index4 - 3] = new Tile(); + if (Main.tile[index3, index4 + 1] == null) + Main.tile[index3, index4 + 1] = new Tile(); + if (Main.tile[index3 + this.direction, index4 - 1] == null) + Main.tile[index3 + this.direction, index4 - 1] = new Tile(); + if (Main.tile[index3 + this.direction, index4 + 1] == null) + Main.tile[index3 + this.direction, index4 + 1] = new Tile(); + if (Main.tile[index3 - this.direction, index4 + 1] == null) + Main.tile[index3 - this.direction, index4 + 1] = 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 flag6 = this.type == 410 || this.type == 423; + float num12 = 3f; + if (Main.tile[index3, index4 - 2].nactive() && Main.tileSolid[(int) Main.tile[index3, index4 - 2].type]) + { + if (Main.tile[index3, index4 - 3].nactive() && Main.tileSolid[(int) Main.tile[index3, index4 - 3].type]) + { + this.velocity.Y = -8.5f; + this.netUpdate = true; + } + else + { + this.velocity.Y = -7.5f; + this.netUpdate = true; + } + } + else if (Main.tile[index3, index4 - 1].nactive() && !Main.tile[index3, index4 - 1].topSlope() && Main.tileSolid[(int) Main.tile[index3, index4 - 1].type]) + { + this.velocity.Y = -7f; + this.netUpdate = true; + } + else if ((double) this.position.Y + (double) this.height - (double) (index4 * 16) > 20.0 && Main.tile[index3, index4].nactive() && !Main.tile[index3, index4].topSlope() && Main.tileSolid[(int) Main.tile[index3, index4].type]) + { + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if ((this.directionY < 0 || (double) Math.Abs(this.velocity.X) > (double) num12) && (!flag6 || !Main.tile[index3, index4 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index3, index4 + 1].type]) && (!Main.tile[index3, index4 + 2].nactive() || !Main.tileSolid[(int) Main.tile[index3, index4 + 2].type]) && (!Main.tile[index3 + this.direction, index4 + 3].nactive() || !Main.tileSolid[(int) Main.tile[index3 + this.direction, index4 + 3].type])) + { + this.velocity.Y = -8f; + this.netUpdate = true; + } + } + } + if (this.type == 423 && (double) Math.Abs(this.velocity.X) >= (double) num6 * 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; + bool flag17 = true; + bool flag18 = false; + int num16 = 30; + bool flag19 = false; + bool flag20 = false; + bool flag21 = false; + bool flag22 = false; + LegacySoundStyle legacySoundStyle = (LegacySoundStyle) null; + int maxValue1 = 0; + bool flag23 = false; + float max2 = 1f; + float num17 = 0.07f; + float num18 = 0.8f; + float num19 = (float) (this.width / 2 + 6); + bool flag24 = this.directionY < 0; + bool flag25 = false; + int num20 = 1; + bool flag26 = false; + float num21 = 0.025f; + NPCAimedTarget targetData = this.GetTargetData(); + if (targetData.Type == NPCTargetType.NPC && Main.npc[this.TranslatedTargetIndex].type == 548 && Main.npc[this.TranslatedTargetIndex].dontTakeDamageFromHostiles) + { + NPCUtils.TargetClosestOldOnesInvasion(this); + targetData = this.GetTargetData(); + } + 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); + bool flag27 = flag2 & (double) this.ai[0] <= 0.0; + if (flag27) + { + 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 flag28 = NPCID.Sets.FighterUsesDD2PortalAppearEffect[this.type]; + bool flag29 = true; + Vector2 size; + switch (this.type) + { + case 552: + case 553: + case 554: + legacySoundStyle = SoundID.DD2_GoblinScream; + maxValue1 = 1000; + flag5 = true; + flag20 = DD2Event.EnemiesShouldChasePlayers; + if (this.type == 553) + { + num17 += 0.01f; + max2 += 0.2f; + } + if (this.type == 554) + { + num17 += 0.02f; + max2 += 0.4f; + } + if ((double) this.localAI[3] < 60.0) + { + num17 = (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 num22 = (double) this.localAI[3] >= 60.0 ? 1 : 0; + flag20 = DD2Event.EnemiesShouldChasePlayers; + flag23 = 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 (num22 == 0) + { + num11 = 1f; + num17 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + } + if (this.type == 555) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = Main.expertMode ? 15 : 20; + } + if (this.type == 555) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = Main.expertMode ? 25 : 30; + } + if (this.type == 557) + { + max2 = 1.12f; + max1 = 0.4f; + Damage = Main.expertMode ? 35 : 40; + } + if ((double) this.ai[1] == (double) num9) + { + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_GoblinBomberThrow, this.Center); + break; + } + break; + case 561: + case 562: + case 563: + int num23 = (double) this.localAI[3] >= 60.0 ? 1 : 0; + if ((double) this.ai[1] == 82.0) + { + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_JavelinThrowersAttack, this.Center); + maxValue1 = 7; + legacySoundStyle = SoundID.DD2_JavelinThrowersTaunt; + } + flag20 = DD2Event.EnemiesShouldChasePlayers; + flag23 = 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 (num23 == 0) + { + num11 = 1f; + num17 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + } + if (this.type == 561) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = Main.expertMode ? 10 : 15; + num10 = 11.5f; + num11 -= 100f; + } + if (this.type == 562) + { + max2 = 0.94f; + max1 = 0.5f; + Damage = Main.expertMode ? 20 : 30; + num10 = 12.2f; + num11 -= 50f; + } + if (this.type == 563) + { + max2 = 1f; + max1 = 0.4f; + Damage = Main.expertMode ? 30 : 45; + 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.PerLinePoint(DelegateMethods.CastLightOpen)); + flag20 = DD2Event.EnemiesShouldChasePlayers; + int num24 = (double) this.localAI[3] >= 120.0 ? 1 : 0; + if (num24 == 0) + num17 = 0.0f; + if (num24 != 0) + { + this.dontTakeDamage = false; + break; + } + this.dontTakeDamage = true; + this.velocity.X = 0.0f; + flag23 = true; + flag19 = true; + this.ai[3] = 0.0f; + if ((double) this.localAI[3] == 0.0) + this.alpha = (int) byte.MaxValue; + ++this.localAI[3]; + float num25 = this.localAI[3]; + if ((double) num25 >= 110.0) + { + this.alpha -= 26; + if (this.alpha < 0) + this.alpha = 0; + } + if ((double) num25 >= 100.0) + { + int num26 = (int) this.localAI[3] / 20; + size = this.Size; + float num27 = size.Length() / 2f / 20f; + int maxValue2 = 5; + for (int index = 0; index < num26 * 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 * num27; + } + } + } + else + { + int num28 = (int) this.localAI[3] / 10; + size = this.Size; + float num29 = size.Length() / 2f / 20f; + int maxValue3 = 5; + for (int index = 0; (double) index < (double) num28 * 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 * num29 * Main.rand.NextFloat(); + dust.velocity.Y *= Utils.InverseLerp((float) this.width * 0.75f, 0.0f, Math.Abs(dust.position.X - this.Center.X), true); + } + } + } + if ((double) num25 > 100.0 && (int) num25 % 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; + num17 = 0.16f; + num18 = 0.7f; + max2 = 1.4f; + flag5 = true; + num4 = 600f; + flag20 = DD2Event.EnemiesShouldChasePlayers; + if ((double) this.localAI[3] < 60.0) + num17 = (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 num30 = (double) ((SlotId) ref slotId1).ToFloat(); + localAi[1] = (float) num30; + } + 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 = Main.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound == null) + { + float[] localAi = this.localAI; + slotId1 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_WitherBeastAuraPulse, this.Center); + double num31 = (double) ((SlotId) ref slotId1).ToFloat(); + localAi[1] = (float) num31; + } + 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.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: + flag20 = DD2Event.EnemiesShouldChasePlayers; + flag23 = 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 = Main.expertMode ? 25 : 35; + if (this.type == 571) + Damage = Main.expertMode ? 45 : 60; + max2 = 0.77f; + if ((double) this.ai[0] > 0.0) + { + if ((double) this.ai[1] == 40.0) + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinShot, this.Center); + else if ((double) this.ai[1] == 60.0) + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinBreathIn, this.Center); + } + if ((double) this.localAI[3] < 60.0) + { + num11 = 1f; + num17 = (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 num32 = (double) ((SlotId) ref invalid).ToFloat(); + localAi1[0] = (float) num32; + float[] localAi2 = this.localAI; + slotId2 = (SlotId) SlotId.Invalid; + double num33 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi2[1] = (float) num33; + } + flag20 = DD2Event.EnemiesShouldChasePlayers; + if ((double) this.ai[1] == 2.0) + { + Main.GetActiveSound(SlotId.FromFloat(this.localAI[0]))?.Stop(); + Main.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 = (int) (80.0 * (double) Main.damageMultiplier); + 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; + Main.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 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgnite, this.Center); + double num34 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[0] = (float) num34; + } + ++this.localAI[2]; + if ((double) this.localAI[2] == 30.0) + { + float[] localAi3 = this.localAI; + slotId2 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgniteLoop, this.Center); + double num35 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi3[0] = (float) num35; + float[] localAi4 = this.localAI; + slotId2 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldScreamChargeLoop, this.Center); + double num36 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi4[1] = (float) num36; + } + } + 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 = Main.GetActiveSound(SlotId.FromFloat(this.localAI[0])); + if (activeSound1 == null) + { + float[] localAi = this.localAI; + slotId2 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgniteLoop, this.Center); + double num37 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[0] = (float) num37; + } + else + activeSound1.Position = this.Center; + ActiveSound activeSound2 = Main.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound2 == null) + { + float[] localAi = this.localAI; + slotId2 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldScreamChargeLoop, this.Center); + double num38 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[1] = (float) num38; + } + else + activeSound2.Position = this.Center; + } + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] == 0.0) + { + flag5 = true; + num5 = 40; + num4 = 64f; + num17 = 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) + { + num17 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + break; + } + break; + case 576: + case 577: + maxValue1 = 700; + legacySoundStyle = SoundID.DD2_OgreRoar; + num19 -= 32f; + flag5 = true; + num6 = 60; + num4 = 130f; + num5 = 44; + flag20 = DD2Event.EnemiesShouldChasePlayers; + num7 = 0.7f; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if ((double) this.ai[0] <= 0.0) + { + float num39 = this.ai[1]; + float num40 = this.Distance(targetData.Center); + if ((double) this.localAI[3] >= 60.0) + { + if ((double) num40 <= (double) num4 + 300.0 && (double) this.localAI[0] <= 0.0) + this.ai[1] = 2f; + else if ((double) num40 > (double) num4 + 30.0) + this.ai[1] = 1f; + else if ((double) num40 <= (double) num4) + { + this.ai[1] = 0.0f; + if ((double) num39 == 1.0) + this.ai[0] = 0.0f; + } + } + if ((double) num39 != (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) + { + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreAttack, this.Center); + break; + } + break; + case 1: + flag3 = true; + num5 = 90; + num4 = 1000f; + num6 = 240; + Damage = this.type != 576 ? (Main.expertMode ? 30 : 40) : (Main.expertMode ? 30 : 40); + flag15 = false; + vector2_1 = new Vector2((float) (this.direction * 30), -70f); + Type = 676; + if ((double) this.ai[0] == 80.0) + { + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreSpit, this.Center); + break; + } + break; + case 2: + num5 = 90; + num4 = 250f; + flag4 = true; + Damage = this.type != 576 ? (Main.expertMode ? 40 : 60) : (Main.expertMode ? 40 : 60); + 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) + { + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreGroundPound, this.Center); + break; + } + break; + } + if ((double) this.ai[0] < (double) -num6) + { + this.ai[0] = (float) -num6; + break; + } + break; + } + if (flag26) + { + bool flag30 = (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 -= num21; + else + this.velocity.X += num21; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= num21; + else + this.velocity.Y += num21; + } + } + if (flag30) + this.velocity.Y = 0.0f; + } + if (flag28) + { + if ((double) this.localAI[3] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[3] == 30.0) + Main.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 num41 = (int) this.localAI[3] / 10; + size = this.Size; + float num42 = size.Length() / 2f / 20f; + int maxValue4 = 5; + if (this.type == 576 || this.type == 577) + maxValue4 = 1; + for (int index = 0; index < num41; ++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 * num42; + dust.velocity += this.velocity; + } + } + } + } + bool flag31 = false; + if (flag12 | flag5 && (double) this.ai[0] > 0.0) + flag17 = false; + if (flag12 && (double) this.ai[1] > 0.0) + flag21 = true; + if (flag5 && (double) this.ai[0] > 0.0) + flag21 = 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 * num20; + if (flag7) + { + this.velocity.X *= num7; + flag23 = true; + flag19 = true; + this.ai[3] = 0.0f; + } + --this.ai[0]; + if ((double) this.ai[0] == 0.0) + this.ai[0] = (float) -num6; + } + } + if (flag3 && (double) this.ai[0] > 0.0) + { + if (flag15) + { + NPCUtils.TargetClosestOldOnesInvasion(this); + targetData = this.GetTargetData(); + } + if ((double) this.ai[0] == (double) num9) + { + Vector2 vector2_3 = this.Center + vector2_1; + Vector2 v = targetData.Center - vector2_3; + v.Y -= Math.Abs(v.X) * num13; + Vector2 vector2_4 = v.SafeNormalize(-Vector2.UnitY) * num10; + for (int index = 0; index < num14; ++index) + { + Vector2 vector2_5 = vector2_4; + Vector2 vector2_6 = vector2_3; + Vector2 velocity = !nullable.HasValue ? vector2_5 + Utils.RandomVector2(Main.rand, -max1, max1) : vector2_5 + nullable.Value; + Vector2 position = vector2_6 + vector2_4 * 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 (!flag16 & flag17) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X * (double) this.direction < 0.0) + flag18 = true; + if ((((double) this.position.X == (double) this.oldPosition.X ? 1 : ((double) this.ai[3] >= (double) num16 ? 1 : 0)) | (flag18 ? 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) (num16 * 10)) + this.ai[3] = 0.0f; + if (this.justHit && !flag29) + this.ai[3] = 0.0f; + if ((double) this.ai[3] == (double) num16) + { + this.netUpdate = true; + if (flag29) + { + this.noGravity = true; + this.noTileCollide = true; + this.position.X += (float) (this.direction * this.width * 2); + int num43 = 20; + size = this.Size; + float num44 = size.Length() / 2f / 20f; + int maxValue5 = 5; + if (this.type == 576 || this.type == 577) + maxValue5 = 1; + for (int index = 0; index < num43; ++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 * num44; + dust.noGravity = true; + dust.fadeIn = 1.5f; + dust.velocity *= 3f; + } + } + return; + } + } + } + if (!flag19) + { + if ((double) this.ai[3] < (double) num16 & flag20) + { + if (maxValue1 > 0 && Main.rand.Next(maxValue1) == 0) + Main.PlayTrackedSound((SoundStyle) legacySoundStyle, this.Center); + NPCUtils.TargetClosestOldOnesInvasion(this); + targetData = this.GetTargetData(); + } + else if (!flag21) + { + if (flag22 && this.timeLeft > 10) + this.timeLeft = 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 * num20; + this.ai[2] = 0.0f; + } + } + } + else + this.ai[2] = 0.0f; + if (this.direction == 0) + this.direction = 1; + } + } + if (!flag23) + { + if ((double) this.velocity.X < -(double) max2 || (double) this.velocity.X > (double) max2) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num18; + } + 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 + num17 * (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] = 30f; + this.ai[0] = 0.0f; + } + if ((double) this.ai[0] > 0.0) + { + if (flag15) + { + NPCUtils.TargetClosestOldOnesInvasion(this); + targetData = this.GetTargetData(); + } + if ((double) this.ai[1] == (double) num9) + { + Vector2 vector2_7 = this.Center + vector2_1; + Vector2 v = targetData.Center - vector2_7; + v.Y -= Math.Abs(v.X) * num13; + Vector2 vector2_8 = v.SafeNormalize(-Vector2.UnitY) * num10; + for (int index = 0; index < num14; ++index) + { + Vector2 vector2_9 = vector2_7; + Vector2 vector2_10 = vector2_8; + Vector2 velocity = !nullable.HasValue ? vector2_10 + Utils.RandomVector2(Main.rand, -max1, max1) : vector2_10 + nullable.Value; + Vector2 position = vector2_9 + velocity * num15; + if (Main.netMode != 1) + Projectile.NewProjectile(position, velocity, Type, Damage, 0.0f, Main.myPlayer); + } + this.ai[0] = (double) Math.Abs(vector2_8.Y) <= (double) Math.Abs(vector2_8.X) * 2.0 ? ((double) Math.Abs(vector2_8.X) <= (double) Math.Abs(vector2_8.Y) * 2.0 ? ((double) vector2_8.Y > 0.0 ? 2f : 4f) : 3f) : ((double) vector2_8.Y > 0.0 ? 1f : 5f); + } + if ((double) this.velocity.Y != 0.0 && !flag14 || (double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + } + else if (!flag13) + { + this.velocity.X *= 0.9f; + this.spriteDirection = this.direction * num20; + } + } + 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_11 = targetData.Center - this.Center; + if ((double) vector2_11.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_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 ((double) this.ai[0] <= 0.0 | flag13) + { + bool flag32 = (double) this.Distance(targetData.Center) < (double) num12; + if (flag32 && 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)) | (flag32 ? 1 : 0)) != 0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= num18; + } + 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 + num17 * (float) this.direction, -max2, max2); + } + } + } + if ((double) this.velocity.Y == 0.0) + { + int index12 = (int) ((double) this.Bottom.Y + 7.0) / 16; + int num45 = (int) this.Left.X / 16; + int num46 = (int) this.Right.X / 16; + int index13; + for (int index14 = num45; index14 <= num46; 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]) + { + flag31 = true; + break; + } + } + } + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + if (WorldGen.InWorld(tileCoordinates1.X, tileCoordinates1.Y, 5) && !this.noGravity) + { + Vector2 cPosition; + int cWidth; + int cHeight; + this.GetTileCollisionParameters(out cPosition, out cWidth, out cHeight); + Vector2 vector2_12 = this.position - cPosition; + Collision.StepUp(ref cPosition, ref this.velocity, cWidth, cHeight, ref this.stepSpeed, ref this.gfxOffY); + this.position = cPosition + vector2_12; + } + if (flag31) + { + int index = (int) ((double) this.Center.X + (double) num19 * (double) this.direction) / 16; + int j = ((int) this.Bottom.Y - 15) / 16; + bool flag33 = (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 num47 = 5; + if (Main.tile[index, j - 1].type == (ushort) 388) + num47 = 2; + this.velocity.X = 0.5f * (float) -this.direction; + this.ai[1] += (float) num47; + bool flag34 = false; + if ((double) this.ai[1] >= 10.0) + { + flag34 = true; + this.ai[1] = 10f; + } + if (flag10) + flag34 = true; + WorldGen.KillTile(index, j - 1, true); + if (Main.netMode != 1 & flag34) + { + 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 flag35 = WorldGen.OpenDoor(index, j - 1, this.direction); + if (!flag35) + { + this.ai[3] = (float) num16; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag35) + NetMessage.SendData(19, number2: ((float) index), number3: ((float) (j - 1)), number4: ((float) this.direction)); + } + if (tileSafely4.type == (ushort) 388) + { + bool flag36 = WorldGen.ShiftTallGate(index, j - 1, false); + if (!flag36) + { + this.ai[3] = (float) num16; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag36) + 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 * num20) > 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 (flag33 && tileSafely3.nactive() && !tileSafely3.topSlope() && Main.tileSolid[(int) tileSafely3.type]) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (flag24 && (!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 (flag25 && (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 (!flag27 || !this.noTileCollide) + return; + if (flag28) + { + if (this.alpha < 60) + this.alpha += 20; + this.localAI[3] = 40f; + } + int num48 = (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 Position1 = new Vector2(this.Center.X - (float) (Width / 2), this.position.Y + (float) this.height - (float) height); + bool flag37 = false; + if ((double) this.position.Y + (double) this.height < (double) targetData.Position.Y + (double) targetData.Height - 16.0) + flag37 = true; + if (flag37) + this.velocity.Y += 0.5f; + else if (Collision.SolidCollision(Position1, Width, height) || (double) targetData.Center.Y - (double) this.Center.Y < -100.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 (num48 == 0) + return; + this.velocity.Y = 0.0f; + } + + private void AI_084_LunaticCultist() + { + if ((double) this.ai[0] != -1.0 && Main.rand.Next(1000) == 0) + Main.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 Damage1 = 35; + if (expertMode) + { + num1 = 90; + Damage1 = 25; + } + int num2 = 18; + int num3 = 3; + int Damage2 = 30; + if (expertMode) + { + num2 = 12; + num3 = 4; + Damage2 = 20; + } + int num4 = 80; + int Damage3 = 45; + if (expertMode) + { + num4 = 40; + Damage3 = 30; + } + 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) + { + Main.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) + Main.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, Damage1, 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, Damage2, 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, Damage3, 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) + Main.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.expertKnockBack; + 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 = Main.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 = Main.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 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldFlyerChargeScream, this.Center); + double num27 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num27; + Main.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 = Main.GetActiveSound(SlotId.FromFloat(this.localAI[2])); + if (activeSound == null) + { + float[] localAi = this.localAI; + slotId = Main.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 = Main.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 = Main.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 = (int) (80.0 * (double) Main.damageMultiplier); + 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; + Main.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.PerLinePoint(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) + Main.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) + Main.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 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) + Main.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 = 10; + num9 = 10f; + num10 = 50f; + num6 = 5; + num7 = 30; + center += new Vector2((float) (-this.spriteDirection * 20), 10f); + 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; + } + } + if (flag3) + { + if ((double) this.localAI[1] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[1] == 30.0) + Main.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; + if (this.timeLeft <= 10) + return; + this.timeLeft = 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 i = 0; i < 1000; ++i) + { + if (Main.projectile[i].active && Main.projectile[i].CanReflect()) + { + Microsoft.Xna.Framework.Rectangle hitbox = Main.projectile[i].Hitbox; + if (myRect.Intersects(hitbox)) + this.ReflectProjectile(i); + } + } + } + + public void ReflectProjectile(int i) + { + if (this.HitSound != null) + Main.PlaySound(this.HitSound, Main.projectile[i].position); + for (int index1 = 0; index1 < 3; ++index1) + { + int index2 = Dust.NewDust(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 31); + Main.dust[index2].velocity *= 0.3f; + } + Main.projectile[i].hostile = true; + Main.projectile[i].friendly = false; + Vector2 vector2_1 = Main.player[Main.projectile[i].owner].Center - Main.projectile[i].Center; + vector2_1.Normalize(); + Vector2 vector2_2 = vector2_1 * Main.projectile[i].oldVelocity.Length(); + Main.projectile[i].velocity = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + Main.projectile[i].velocity.Normalize(); + Projectile projectile1 = Main.projectile[i]; + projectile1.velocity = projectile1.velocity * vector2_2.Length(); + Projectile projectile2 = Main.projectile[i]; + projectile2.velocity = projectile2.velocity + vector2_2 * 20f; + Main.projectile[i].velocity.Normalize(); + Projectile projectile3 = Main.projectile[i]; + projectile3.velocity = projectile3.velocity * vector2_2.Length(); + Main.projectile[i].damage /= 2; + Main.projectile[i].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() => this.frame.Height > 0 && this.townNPC && BirthdayParty.PartyIsUp && this.type != 441 && this.type != 37; + + 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; + return (PartyHatColor) (num2 % 5); + } + + public void FindFrame() + { + int num1 = 1; + if (!Main.dedServ) + { + if (!Main.NPCLoaded[this.type] || Main.npcTexture[this.type] == null) + return; + num1 = Main.npcTexture[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; + if (this.type == 568 || this.type == 569) + { + if ((double) this.ai[0] > 0.0) + { + int num3 = this.frame.Y / this.frame.Height; + this.spriteDirection = this.direction; + if (num3 < 5 || num3 > 16) + this.frameCounter = 0.0; + int num4 = 7; + ++this.frameCounter; + int num5 = 0; + int num6; + if (this.frameCounter >= (double) (5 * (num6 = num5 + 1))) + num4 = 8; + int num7; + if (this.frameCounter >= (double) (5 * (num7 = num6 + 1))) + num4 = 9; + int num8; + if (this.frameCounter >= (double) (5 * (num8 = num7 + 1))) + num4 = 10; + int num9; + if (this.frameCounter >= (double) (5 * (num9 = num8 + 1))) + num4 = 7; + int num10; + if (this.frameCounter >= (double) (5 * (num10 = num9 + 1))) + num4 = 8; + int num11; + if (this.frameCounter >= (double) (5 * (num11 = num10 + 1))) + num4 = 9; + int num12; + if (this.frameCounter >= (double) (5 * (num12 = num11 + 1))) + num4 = 10; + int num13; + if (this.frameCounter >= (double) (5 * (num13 = num12 + 1))) + num4 = 7; + int num14; + if (this.frameCounter >= (double) (5 * (num14 = num13 + 1))) + num4 = 8; + int num15; + if (this.frameCounter >= (double) (5 * (num15 = num14 + 1))) + num4 = 9; + int num16; + if (this.frameCounter >= (double) (5 * (num16 = num15 + 1))) + num4 = 10; + int num17; + if (this.frameCounter >= (double) (5 * (num17 = num16 + 1))) + num4 = 7; + int num18; + if (this.frameCounter >= (double) (5 * (num18 = num17 + 1))) + num4 = 8; + int num19; + if (this.frameCounter >= (double) (5 * (num19 = num18 + 1))) + num4 = 9; + int num20; + if (this.frameCounter >= (double) (5 * (num20 = num19 + 1))) + num4 = 10; + int num21; + if (this.frameCounter >= (double) (5 * (num21 = num20 + 1))) + num4 = 7; + int num22; + if (this.frameCounter >= (double) (5 * (num22 = num21 + 1))) + num4 = 8; + int num23; + if (this.frameCounter >= (double) (5 * (num23 = num22 + 1))) + num4 = 9; + int num24; + if (this.frameCounter >= (double) (5 * (num24 = num23 + 1))) + num4 = 10; + int num25; + if (this.frameCounter >= (double) (5 * (num25 = num24 + 1))) + num4 = 7; + int num26; + if (this.frameCounter >= (double) (5 * (num26 = num25 + 1))) + num4 = 8; + int num27; + if (this.frameCounter >= (double) (5 * (num27 = num26 + 1))) + num4 = 9; + int num28; + if (this.frameCounter >= (double) (5 * (num28 = num27 + 1))) + num4 = 10; + int num29; + if (this.frameCounter >= (double) (5 * (num29 = num28 + 1))) + num4 = 11; + int num30; + if (this.frameCounter >= (double) (5 * (num30 = num29 + 1))) + num4 = 12; + int num31; + if (this.frameCounter >= (double) (5 * (num31 = num30 + 1))) + num4 = 13; + int num32; + if (this.frameCounter >= (double) (5 * (num32 = num31 + 1))) + num4 = 14; + if (this.frameCounter >= 270.0) + { + num4 = 14; + this.frameCounter -= 10.0; + } + this.frame.Y = num1 * num4; + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + } + else + { + 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); + } + } + } + else if (this.type == 551) + { + int num33 = this.frame.Y / num1; + int num34; + if ((double) this.ai[0] == 4.0) + { + float num35 = 60f; + int num36 = 6 * 10; + if (num33 < 5) + this.frameCounter = 0.0; + num34 = 5; + this.frameCounter = (double) (int) this.ai[1]; + int num37 = 0; + int num38; + if (this.frameCounter >= (double) (5 * (num38 = num37 + 1))) + num34 = 6; + num38 = 0; + if (this.frameCounter >= (double) num35 - 6.0) + num34 = 7; + if (this.frameCounter >= (double) num35 - 3.0) + num34 = 8; + if (this.frameCounter >= (double) num35) + num34 = 9 + (int) this.frameCounter / 3 % 2; + int num39 = 0; + if (this.frameCounter >= (double) num35 + (double) num36 + 3.0) + num34 = 8; + int num40; + if (this.frameCounter >= (double) num35 + (double) num36 + 3.0 + (double) (5 * (num40 = num39 + 1))) + num34 = 7; + if (this.frameCounter >= (double) num35 + (double) num36 + 3.0 + (double) (5 * (num38 = num40 + 1))) + num34 = 0; + } + else if ((double) this.ai[0] == 3.0) + { + float num41 = 40f; + float num42 = 80f; + float num43 = num41 + num42; + float num44 = 25f; + if (num33 < 5) + this.frameCounter = 0.0; + num34 = 5; + this.frameCounter = (double) (int) this.ai[1]; + int num45 = 0; + int num46; + if (this.frameCounter >= (double) (5 * (num46 = num45 + 1))) + num34 = 6; + num46 = 0; + if (this.frameCounter >= (double) num41 - 6.0) + num34 = 7; + if (this.frameCounter >= (double) num41 - 3.0) + num34 = 8; + if (this.frameCounter >= (double) num41) + num34 = 9 + (int) this.frameCounter / 3 % 2; + int num47 = 0; + if (this.frameCounter >= (double) num43 - (double) num44 + 3.0) + num34 = 8; + int num48; + if (this.frameCounter >= (double) num43 - (double) num44 + 3.0 + (double) (5 * (num48 = num47 + 1))) + num34 = 7; + if (this.frameCounter >= (double) num43 - (double) num44 + 3.0 + (double) (5 * (num46 = num48 + 1))) + num34 = 0; + } + else if ((double) this.ai[0] == 5.0) + num34 = 3; + else if ((double) this.ai[0] == 6.0) + { + if (num33 > 4) + this.frameCounter = 0.0; + num34 = 1; + this.frameCounter = (double) (int) this.ai[1]; + int num49 = 0; + int num50; + if (this.frameCounter >= (double) (8 * (num50 = num49 + 1))) + num34 = 2; + int num51; + if (this.frameCounter >= (double) (8 * (num51 = num50 + 1))) + num34 = 3; + int num52; + if (this.frameCounter >= (double) (8 * (num52 = num51 + 1))) + num34 = 4; + int num53; + if (this.frameCounter >= (double) (8 * (num53 = num52 + 1))) + num34 = 3; + int num54; + if (this.frameCounter >= (double) (8 * (num54 = num53 + 1))) + num34 = 4; + int num55; + if (this.frameCounter >= (double) (8 * (num55 = num54 + 1))) + num34 = 3; + int num56; + if (this.frameCounter >= (double) (8 * (num56 = num55 + 1))) + num34 = 2; + int num57; + if (this.frameCounter >= (double) (8 * (num57 = num56 + 1))) + num34 = 1; + int num58; + if (this.frameCounter >= (double) (8 * (num58 = num57 + 1))) + num34 = 0; + } + else + num34 = 0; + this.frame.Y = num1 * num34; + } + if (this.type == 552 || this.type == 553 || this.type == 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; + } + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + } + else + { + 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); + } + } + } + if (this.type == 572 || this.type == 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); + } + } + else 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + } + else + { + 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); + } + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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); + } + } + } + if (this.type == 566 || this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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); + } + } + if (this.type == 576 || this.type == 577) + { + int num59 = 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 (num59 < 11 || num59 > 20) + { + num59 = 11; + this.frameCounter = 0.0; + } + int num60 = 4; + if (num59 == 13 || num59 == 19) + num60 = 8; + if (num59 == 14 || num59 == 18) + num60 = 2; + if (++this.frameCounter >= (double) num60 && num59 < 20) + { + this.frameCounter = 0.0; + ++num59; + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 2.0) + { + this.spriteDirection = this.direction; + if (num59 < 37 || num59 > 47) + { + num59 = 39; + this.frameCounter = 0.0; + } + int num61 = 5; + if (num59 == 42) + num61 = 6; + if (num59 == 45) + num61 = 8; + if (num59 == 46) + num61 = 4; + if (num59 == 47) + num61 = 26; + if (num59 == 37 || num59 == 38) + num61 = 7; + bool flag = true; + if (num59 == 46 && (double) this.velocity.Y != 0.0) + flag = false; + if (num59 == 38) + flag = false; + if (flag) + ++this.frameCounter; + if (this.frameCounter >= (double) num61) + { + if (num59 < 47) + { + this.frameCounter = 0.0; + ++num59; + } + else + { + num59 = 37; + this.frameCounter = 0.0; + } + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 1.0) + { + this.spriteDirection = this.direction; + if (num59 < 21 || num59 > 38) + { + num59 = 21; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 5.0 && num59 < 38) + { + this.frameCounter = 0.0; + ++num59; + } + } + else + { + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + num59 = 43; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + num59 = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 60.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + num59 = 1 + (int) (this.frameCounter / 6.0); + } + } + this.frame.Y = num59; + } + if (this.type == 570 || this.type == 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 num62 = 5; + if (this.frame.Y == num1 * 14) + num62 = 35; + if (++this.frameCounter >= (double) num62 && this.frame.Y < num1 * 15) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + } + else + { + 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); + } + } + } + if (this.type == 561 || this.type == 562 || this.type == 563) + { + if (this.justHit) + this.justHit = this.justHit; + 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; + } + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + } + else + { + 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); + } + } + } + if (this.type == 555 || this.type == 556 || this.type == 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; + } + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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); + } + } + } + if (this.type == 558 || this.type == 559 || this.type == 560) + { + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + float num63 = this.velocity.ToRotation(); + if ((double) this.velocity.X < 0.0) + num63 += 3.141593f; + if ((double) this.ai[0] != 2.0) + num63 = this.velocity.X * 0.1f; + this.rotation = num63; + if ((double) this.ai[0] == 2.0) + this.frame.Y = num1 * 4; + else if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 4) + this.frame.Y = 0; + } + } + if (this.type == 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; + } + } + if (this.type == 574 || this.type == 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 num64 = 4; + if (this.frame.Y >= num1 * 5) + num64 = 8; + Vector2 Position = this.Center + new Vector2((float) (56 * this.spriteDirection), -30f).RotatedBy((double) this.rotation); + if (++this.frameCounter >= (double) num64 && 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; + } + } + } + } + else if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 2) + this.frame.Y = 0; + } + } + if (this.type == 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; + } + } + if (this.type == 564 || this.type == 565) + { + int y = this.frame.Y; + this.frame.Width = 80; + this.frame.Height = 80; + int num65; + 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; + num65 = 5; + ++this.frameCounter; + int num66 = 0; + int num67; + if (this.frameCounter >= (double) (7 * (num67 = num66 + 1))) + num65 = 6; + int num68; + if (this.frameCounter >= (double) (7 * (num68 = num67 + 1))) + num65 = 7; + int num69; + if (this.frameCounter >= (double) (7 * (num69 = num68 + 1))) + num65 = 5; + int num70; + if (this.frameCounter >= (double) (7 * (num70 = num69 + 1))) + num65 = 6; + int num71; + if (this.frameCounter >= (double) (7 * (num71 = num70 + 1))) + num65 = 7; + int num72; + if (this.frameCounter >= (double) (7 * (num72 = num71 + 1))) + num65 = 5; + int num73; + if (this.frameCounter >= (double) (7 * (num73 = num72 + 1))) + num65 = 6; + int num74; + if (this.frameCounter >= (double) (7 * (num74 = num73 + 1))) + num65 = 7; + int num75; + if (this.frameCounter >= (double) (7 * (num75 = num74 + 1))) + num65 = 8; + int num76; + if (this.frameCounter >= (double) (7 * (num76 = num75 + 1))) + num65 = 9; + int num77; + if (this.frameCounter >= (double) (7 * (num77 = num76 + 1))) + num65 = 10; + int num78; + if (this.frameCounter >= (double) (7 * (num78 = num77 + 1))) + num65 = 11; + int num79; + if (this.frameCounter >= (double) (7 * (num79 = num78 + 1))) + num65 = 12; + int num80; + if (this.frameCounter >= (double) (7 * (num80 = num79 + 1))) + { + num65 = 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; + num65 = 13; + ++this.frameCounter; + int num81 = 0; + int num82; + if (this.frameCounter >= (double) (8 * (num82 = num81 + 1))) + num65 = 14; + int num83; + if (this.frameCounter >= (double) (8 * (num83 = num82 + 1))) + num65 = 15; + int num84; + if (this.frameCounter >= (double) (8 * (num84 = num83 + 1))) + num65 = 16; + int num85; + if (this.frameCounter >= (double) (8 * (num85 = num84 + 1))) + num65 = 17; + int num86; + if (this.frameCounter >= (double) (8 * (num86 = num85 + 1))) + num65 = 18; + int num87; + if (this.frameCounter >= (double) (8 * (num87 = num86 + 1))) + num65 = 19; + int num88; + if (this.frameCounter >= (double) (8 * (num88 = num87 + 1))) + num65 = 20; + int num89; + if (this.frameCounter >= (double) (8 * (num89 = num88 + 1))) + num65 = 18; + int num90; + if (this.frameCounter >= (double) (8 * (num90 = num89 + 1))) + num65 = 19; + int num91; + if (this.frameCounter >= (double) (8 * (num91 = num90 + 1))) + num65 = 20; + int num92; + if (this.frameCounter >= (double) (8 * (num92 = num91 + 1))) + num65 = 21; + int num93; + if (this.frameCounter >= (double) (8 * (num93 = num92 + 1))) + num65 = 22; + int num94; + if (this.frameCounter >= (double) (8 * (num94 = num93 + 1))) + num65 = 23; + int num95; + if (this.frameCounter >= (double) (8 * (num95 = num94 + 1))) + num65 = 24; + int num96; + if (this.frameCounter >= (double) (8 * (num96 = num95 + 1))) + num65 = 25; + int num97; + if (this.frameCounter >= (double) (8 * (num97 = num96 + 1))) + { + num65 = 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; + num65 = 26; + ++this.frameCounter; + int num98 = 0; + int num99; + if (this.frameCounter >= (double) (8 * (num99 = num98 + 1))) + num65 = 27; + int num100; + if (this.frameCounter >= (double) (8 * (num100 = num99 + 1))) + num65 = 28; + int num101; + if (this.frameCounter >= (double) (8 * (num101 = num100 + 1))) + num65 = 29; + int num102; + if (this.frameCounter >= (double) (8 * (num102 = num101 + 1))) + num65 = 26; + int num103; + if (this.frameCounter >= (double) (8 * (num103 = num102 + 1))) + num65 = 27; + int num104; + if (this.frameCounter >= (double) (8 * (num104 = num103 + 1))) + num65 = 28; + int num105; + if (this.frameCounter >= (double) (8 * (num105 = num104 + 1))) + num65 = 29; + int num106; + if (this.frameCounter >= (double) (8 * (num106 = num105 + 1))) + num65 = 26; + int num107; + if (this.frameCounter >= (double) (8 * (num107 = num106 + 1))) + num65 = 27; + int num108; + if (this.frameCounter >= (double) (8 * (num108 = num107 + 1))) + num65 = 28; + int num109; + if (this.frameCounter >= (double) (8 * (num109 = num108 + 1))) + num65 = 29; + int num110; + if (this.frameCounter >= (double) (8 * (num110 = num109 + 1))) + num65 = 30; + int num111; + if (this.frameCounter >= (double) (8 * (num111 = num110 + 1))) + num65 = 31; + int num112; + if (this.frameCounter >= (double) (8 * (num112 = num111 + 1))) + num65 = 32; + int num113; + if (this.frameCounter >= (double) (8 * (num113 = num112 + 1))) + num65 = 33; + int num114; + if (this.frameCounter >= (double) (8 * (num114 = num113 + 1))) + num65 = 34; + int num115; + if (this.frameCounter >= (double) (8 * (num115 = num114 + 1))) + num65 = 35; + int num116; + if (this.frameCounter >= (double) (8 * (num116 = num115 + 1))) + num65 = 36; + int num117; + if (this.frameCounter >= (double) (8 * (num117 = num116 + 1))) + num65 = 37; + int num118; + if (this.frameCounter >= (double) (8 * (num118 = num117 + 1))) + num65 = 38; + int num119; + if (this.frameCounter >= (double) (8 * (num119 = num118 + 1))) + num65 = 39; + int num120; + if (this.frameCounter >= (double) (8 * (num120 = num119 + 1))) + num65 = 40; + int num121; + if (this.frameCounter >= (double) (8 * (num121 = num120 + 1))) + { + num65 = 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; + num65 = (int) (this.frameCounter / 8.0); + } + this.frame.Y = num65; + } + if (this.type == 338 || this.type == 339 || this.type == 340 || this.type == 17 || this.type == 18 || this.type == 19 || this.type == 20 || this.type == 22 || this.type == 142 || this.type == 353 || this.type == 178 || this.type == 38 || this.type == 26 || this.type == 27 || this.type == 28 || this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 21 || this.type == 44 || this.type == 54 || this.type == 37 || this.type == 73 || this.type == 77 || this.type == 78 || this.type == 79 || this.type == 80 || this.type == 104 || this.type == 107 || this.type == 108 || this.type == 120 || this.type == 124 || this.type == 140 || this.type == 159 || this.type == 160 || this.type == 167 || this.type == 181 || this.type == 185 || this.type == 196 || this.type == 197 || this.type == 198 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 207 || this.type == 208 || this.type == 209 || this.type == 212 || this.type == 213 || this.type == 227 || this.type == 228 || this.type == 229 || this.type == 287 || this.type >= 310 && this.type <= 314 || this.type >= 322 && this.type <= 324 || this.type == 326 || this.type == 368 || this.type == 369 || this.type == 453 || this.type == 460 || this.type == 462 || this.type == 463 || this.type == 489 || this.type == 441 || this.type == 534 || this.type == 550) + { + int num122 = this.townNPC || this.type == 453 ? 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 num123 = Main.npcFrameCount[this.type] - NPCID.Sets.AttackFrameCount[this.type]; + if ((double) this.ai[0] == 2.0) + { + ++this.frameCounter; + if (this.frame.Y / num1 == num123 - 1 && this.frameCounter >= 5.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + else if (this.frame.Y / num1 == 0 && this.frameCounter >= 40.0) + { + this.frame.Y = num1 * (num123 - 1); + this.frameCounter = 0.0; + } + else if (this.frame.Y != 0 && this.frame.Y != num1 * (num123 - 1)) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + } + else if ((double) this.ai[0] == 11.0) + { + ++this.frameCounter; + if (this.frame.Y / num1 == num123 - 1 && this.frameCounter >= 20.0) + { + if (this.frameCounter == 20.0) + { + int num124 = Main.rand.Next(4); + for (int index1 = 0; index1 < 3 + num124; ++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 >= 40.0 && Main.rand.Next(20) == 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + } + else if (this.frame.Y / num1 == 0 && this.frameCounter >= 20.0) + { + this.frame.Y = num1 * (num123 - 1); + this.frameCounter = 0.0; + if (Main.netMode != 1) + EmoteBubble.NewBubble(89, new WorldUIAnchor((Entity) this), 30); + } + else if (this.frame.Y != 0 && this.frame.Y != num1 * (num123 - 1)) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + } + else if ((double) this.ai[0] == 5.0) + { + this.frame.Y = num1 * (num123 - 3); + this.frameCounter = 0.0; + } + else if ((double) this.ai[0] == 6.0) + { + ++this.frameCounter; + int num125 = this.frame.Y / num1; + switch (num123 - num125) + { + case 1: + case 2: + case 4: + case 5: + int num126 = 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 : num123 - 5) : num123 - 4) : num123 - 5) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : 0; + if (num126 == num123 - 4 && num125 == num123 - 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 * num126; + if (this.frameCounter >= 300.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num125 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if ((double) this.ai[0] == 7.0) + { + ++this.frameCounter; + int num127 = this.frame.Y / num1; + switch (num123 - num127) + { + case 1: + case 2: + case 4: + case 5: + int num128 = 0; + if (this.frameCounter < 16.0) + num128 = 0; + else if (this.frameCounter == 16.0 && Main.netMode != 1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), 112); + else if (this.frameCounter < 128.0) + num128 = this.frameCounter % 16.0 < 8.0 ? num123 - 2 : 0; + else if (this.frameCounter < 160.0) + num128 = 0; + else if (this.frameCounter == 160.0 && Main.netMode != 1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), 60); + else + num128 = this.frameCounter >= 220.0 ? 0 : (this.frameCounter % 12.0 < 6.0 ? num123 - 2 : 0); + this.frame.Y = num1 * num128; + if (this.frameCounter >= 220.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num127 != 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 num129 = this.frame.Y / num1; + switch (num123 - num129) + { + case 1: + case 2: + case 4: + case 5: + int num130 = this.frameCounter >= 10.0 ? (this.frameCounter >= 16.0 ? num123 - 4 : num123 - 5) : 0; + if ((double) this.ai[1] < 16.0) + num130 = num123 - 5; + if ((double) this.ai[1] < 10.0) + num130 = 0; + this.frame.Y = num1 * num130; + break; + default: + if (num129 != 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 num131 = this.frame.Y / num1; + switch (num123 - num131) + { + case 1: + case 2: + case 4: + case 5: + int num132 = 0; + num132 = this.frameCounter >= 10.0 ? (this.frameCounter >= 16.0 ? num123 - 2 : num123 - 1) : 0; + if ((double) this.ai[1] < 16.0) + num132 = num123 - 1; + if ((double) this.ai[1] < 10.0) + num132 = 0; + int num133 = Main.npcFrameCount[this.type] - 2; + this.frame.Y = num1 * num133; + break; + default: + if (num131 != 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 num134 = this.frame.Y / num1; + if ((uint) (num134 - num123) > 3U && num134 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num135 = 10; + int num136 = 6; + int num137 = this.frameCounter >= (double) num135 ? (this.frameCounter >= (double) (num135 + num136) ? (this.frameCounter >= (double) (num135 + num136 * 2) ? (this.frameCounter >= (double) (num135 + num136 * 3) ? (this.frameCounter >= (double) (num135 + num136 * 4) ? 0 : num123 + 3) : num123 + 2) : num123 + 1) : num123) : 0; + this.frame.Y = num1 * num137; + } + else if ((double) this.ai[0] == 15.0) + { + ++this.frameCounter; + int num138 = this.frame.Y / num1; + if ((uint) (num138 - num123) > 3U && num138 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + float num139 = this.ai[1] / (float) NPCID.Sets.AttackTime[this.type]; + int num140 = (double) num139 <= 0.649999976158142 ? ((double) num139 <= 0.5 ? ((double) num139 <= 0.349999994039536 ? ((double) num139 <= 0.0 ? 0 : num123 + 3) : num123 + 2) : num123 + 1) : num123; + this.frame.Y = num1 * num140; + } + else if ((double) this.ai[0] == 12.0) + { + ++this.frameCounter; + int num141 = this.frame.Y / num1; + if ((uint) (num141 - num123) > 4U && num141 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num142 = num123 + this.GetShootingFrame(this.ai[2]); + this.frame.Y = num1 * num142; + } + else if ((double) this.ai[0] == 14.0) + { + ++this.frameCounter; + int num143 = this.frame.Y / num1; + if ((uint) (num143 - num123) > 1U && num143 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num144 = 12; + int num145 = this.frameCounter % (double) num144 * 2.0 < (double) num144 ? num123 : num123 + 1; + this.frame.Y = num1 * num145; + } + else if ((double) this.ai[0] == 3.0 || (double) this.ai[0] == 4.0) + { + ++this.frameCounter; + int num146 = this.frame.Y / num1; + switch (num123 - num146) + { + case 1: + case 2: + case 4: + case 5: + bool flag = (double) this.ai[0] == 3.0; + int num147 = 0; + int num148 = 0; + int time1 = -1; + int time2 = -1; + if (this.frameCounter < 10.0) + num147 = 0; + else if (this.frameCounter < 16.0) + num147 = num123 - 5; + else if (this.frameCounter < 46.0) + num147 = num123 - 4; + else if (this.frameCounter < 60.0) + num147 = num123 - 5; + else if (this.frameCounter < 216.0) + num147 = 0; + else if (this.frameCounter == 216.0 && Main.netMode != 1) + time1 = 70; + else if (this.frameCounter < 286.0) + num147 = this.frameCounter % 12.0 < 6.0 ? num123 - 2 : 0; + else if (this.frameCounter < 320.0) + num147 = 0; + else if (this.frameCounter == 320.0 && Main.netMode != 1) + time1 = 100; + else + num147 = this.frameCounter >= 420.0 ? 0 : (this.frameCounter % 16.0 < 8.0 ? num123 - 2 : 0); + if (this.frameCounter < 70.0) + num148 = 0; + else if (this.frameCounter == 70.0 && Main.netMode != 1) + time2 = 90; + else + num148 = 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 : num123 - 1) : 0) : num123 - 5) : num123 - 4) : num123 - 5) : (this.frameCounter % 16.0 < 8.0 ? num123 - 2 : 0); + if (flag) + { + if (time1 != -1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), time1, new WorldUIAnchor((Entity) Main.npc[(int) this.ai[2]])); + if (time2 != -1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) Main.npc[(int) this.ai[2]]), time2, new WorldUIAnchor((Entity) this)); + } + this.frame.Y = num1 * (flag ? num147 : num148); + if (this.frameCounter >= 420.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num146 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if ((double) this.ai[0] == 16.0 || (double) this.ai[0] == 17.0) + { + ++this.frameCounter; + int num149 = this.frame.Y / num1; + switch (num123 - num149) + { + case 1: + case 2: + case 4: + case 5: + bool flag = (double) this.ai[0] == 16.0; + int num150 = 0; + int time = -1; + if (this.frameCounter < 10.0) + num150 = 0; + else if (this.frameCounter < 16.0) + num150 = num123 - 5; + else if (this.frameCounter < 22.0) + num150 = num123 - 4; + else if (this.frameCounter < 28.0) + num150 = num123 - 5; + else if (this.frameCounter < 34.0) + num150 = num123 - 4; + else if (this.frameCounter < 40.0) + num150 = num123 - 5; + else if (this.frameCounter == 40.0 && Main.netMode != 1) + time = 45; + else if (this.frameCounter < 70.0) + num150 = num123 - 4; + else if (this.frameCounter < 76.0) + num150 = num123 - 5; + else if (this.frameCounter < 82.0) + num150 = num123 - 4; + else if (this.frameCounter < 88.0) + num150 = num123 - 5; + else if (this.frameCounter < 94.0) + num150 = num123 - 4; + else if (this.frameCounter < 100.0) + num150 = num123 - 5; + else if (this.frameCounter == 100.0 && Main.netMode != 1) + time = 45; + else if (this.frameCounter < 130.0) + num150 = num123 - 4; + else if (this.frameCounter < 136.0) + num150 = num123 - 5; + else if (this.frameCounter < 142.0) + num150 = num123 - 4; + else if (this.frameCounter < 148.0) + num150 = num123 - 5; + else if (this.frameCounter < 154.0) + num150 = num123 - 4; + else if (this.frameCounter < 160.0) + num150 = num123 - 5; + else if (this.frameCounter == 160.0 && Main.netMode != 1) + time = 75; + else + num150 = this.frameCounter >= 220.0 ? (this.frameCounter >= 226.0 ? 0 : num123 - 5) : num123 - 4; + if (flag && time != -1) + { + int num151 = (int) this.localAI[2]; + int num152 = (int) this.localAI[3]; + int num153 = (int) Main.npc[(int) this.ai[2]].localAI[3]; + int num154 = (int) Main.npc[(int) this.ai[2]].localAI[2]; + int num155 = 3 - num151 - num152; + int num156 = 0; + if (this.frameCounter == 40.0) + num156 = 1; + if (this.frameCounter == 100.0) + num156 = 2; + if (this.frameCounter == 160.0) + num156 = 3; + int num157 = 3 - num156; + int num158 = -1; + int num159 = 0; + while (num158 < 0 && ++num159 < 100) + { + num158 = Main.rand.Next(2); + if (num158 == 0 && num154 >= num152) + num158 = -1; + if (num158 == 1 && num153 >= num151) + num158 = -1; + if (num158 == -1 && num157 <= num155) + num158 = 2; + } + if (num158 == 0) + { + ++Main.npc[(int) this.ai[2]].localAI[3]; + ++num153; + } + if (num158 == 1) + { + ++Main.npc[(int) this.ai[2]].localAI[2]; + ++num154; + } + int emoticon1 = Utils.SelectRandom(Main.rand, 38, 37, 36); + int emoticon2 = emoticon1; + if (num158 == 0) + { + switch (emoticon1) + { + case 36: + emoticon2 = 38; + break; + case 37: + emoticon2 = 36; + break; + case 38: + emoticon2 = 37; + break; + } + } + else if (num158 == 1) + { + switch (emoticon1) + { + case 36: + emoticon2 = 37; + break; + case 37: + emoticon2 = 38; + break; + case 38: + emoticon2 = 36; + break; + } + } + if (num157 == 0) + { + if (num153 >= 2) + emoticon1 -= 3; + if (num154 >= 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 ? num150 : num150); + if (this.frameCounter >= 420.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num149 != 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 == 140 || this.type == 287 || this.type == 489) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + else + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + } + else + { + int num160 = 6; + if (this.type == 534) + num160 = 12; + if (this.type == 489) + { + num160 = 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) + num160 = 9; + if (this.frameCounter > (double) num160) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - num122) + this.frame.Y = num1 * 2; + } + } + else if (this.type == 462) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 2 : num1; + } + else + { + 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 == 78 || this.type == 79 || this.type == 80 || this.type == 120 || this.type == 140 || this.type == 159 || this.type == 167 || this.type == 197 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 287 || this.type >= 322 && this.type <= 324) + this.frame.Y = 0; + if (this.type == 181) + this.frame.Y = num1 * 14; + } + } + if (this.type >= 494 && this.type <= 495) + { + if ((double) this.ai[2] > 0.0) + { + if ((double) this.ai[2] < 7.0) + this.frame.Y = num1 * 5; + else if ((double) this.ai[2] < 14.0) + this.frame.Y = num1 * 6; + else if ((double) this.ai[2] < 20.0) + this.frame.Y = num1 * 7; + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + this.frame.Y = 0; + else if (this.frameCounter < 16.0) + this.frame.Y = num1; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 32.0) + this.frame.Y = num1 * 3; + else if (this.frameCounter < 39.0) + { + this.frame.Y = num1 * 4; + } + else + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + } + } + } + } + if (this.type == 541) + { + if ((double) this.ai[0] > 0.0) + { + float num161 = this.ai[0]; + this.frame.Y = (double) num161 >= 6.0 ? ((double) num161 >= 105.0 ? ((double) num161 >= 114.0 ? ((double) num161 >= 135.0 ? num1 : num1 * (int) (((double) num161 - 99.0 - 15.0) / 7.0 + 10.0)) : num1 * 9) : num1 * (int) ((double) num161 / 8.0 % 4.0 + 5.0)) : num1 * 4; + } + else + { + 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; + } + } + if (this.type >= 498 && this.type <= 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 10; + } + } + else if (this.type >= 524 && this.type <= 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + } + else if (this.type >= 528 && this.type <= 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + if (this.type >= 496 && this.type <= 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; + 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 + 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 * 6 : num1 * 5) : num1 * 4; + } + 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 * 3 : num1 * 11) : num1 * 10; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 7; + } + } + else 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; + } + } + else if (this.type == 508 || this.type == 532) + { + if ((double) this.velocity.Y != 0.0) + this.frame.Y = num1; + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else if (this.type == 509) + { + 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; + } + } + if (this.type == 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 num162 = 0; + int num163 = 18; + int num164 = 4; + if (this.frameCounter > (double) (num163 - num164 * 2)) + num162 = 8 + (int) this.frameCounter / 4 % 2; + if (this.frameCounter > (double) (num163 + num164 * 6)) + { + num162 = 0; + this.frameCounter = 0.0; + } + this.frame.Y = num1 * num162; + } + else 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; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 416) + { + int index = (int) this.ai[0]; + if (Main.npc[index].active && Main.npc[index].type == 415 && Main.npcTexture[415] != null) + this.frame.Y = Main.npc[index].frame.Y / (Main.npcTexture[415].Height / Main.npcFrameCount[415]) * num1; + } + else if (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; + this.frame.Y = (int) (this.frameCounter / 6.0) * num1; + if (this.frameCounter >= 48.0) + this.frameCounter = 0.0; + } + else if ((double) this.ai[0] == 1.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * (9 + (int) ((double) this.ai[1] / 6.0)); + } + else if ((double) this.ai[0] == 5.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * (13 - (int) ((double) this.ai[1] / 6.0)); + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 14; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 419) + { + if ((double) this.ai[2] < 0.0) + { + int num165 = 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) (num165 * 4 + 6)) + this.frameCounter = 8.0; + this.frame.Y = this.frameCounter >= 6.0 ? num1 * (int) (4.0 + (this.frameCounter - 6.0) / (double) num165) : num1 * (int) (2.0 + this.frameCounter / 3.0); + } + else 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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; + } + } + else if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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; + } + } + else if (this.type == 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; + } + else + { + ++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; + } + } + else 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + else 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; + } + } + } + else if (this.type == 423) + { + if ((double) this.ai[2] == 1.0) + { + int num166 = 2; + if ((double) this.ai[1] >= 30.0 && (double) this.ai[1] < 45.0) + num166 = 3; + this.frame.Y = num166 * num1; + } + else if ((double) this.velocity.Y != 0.0) + this.frame.Y = num1; + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else if (this.type == 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; + } + } + if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + else if (this.type == 420 && ++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; + } + if (this.type == 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; + } + else 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; + } + else + { + 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; + } + } + else + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + } + else if (this.type == 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; + } + } + else if (this.type == 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; + } + } + else if ((this.type == 405 || this.type == 406) && ++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; + } + if (this.type == 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; + } + } + if (this.type == 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; + } + else 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; + else 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; + } + } + if (this.type == 1 || this.type == 537 || this.type == 16 || this.type == 59 || this.type == 71 || this.type == 81 || this.type == 138 || this.type == 147 || this.type == 183 || this.type == 184 || this.type == 204 || this.type == 225 || this.type == 302 || this.type == 304 || this.type >= 333 && this.type <= 336 || this.type == 535) + { + 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; + } + if (this.type == 488) + { + int num167 = (int) this.localAI[1]; + if (Framing.GetTileSafely((int) this.ai[0], (int) this.ai[1]).frameX >= (short) 36) + num167 *= -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 num168 = num167 == -1 ? 4 : 6; + int num169 = (int) this.localAI[0] / num168; + if ((double) this.localAI[0] % (double) num168 != 0.0) + ++num169; + if (num169 != 0 && num167 == 1) + num169 += 5; + this.frame.Y = num169 * num1; + } + if (this.type >= 430 && this.type <= 436) + { + 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; + } + else + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + this.frame.Y = 0; + else if (this.frameCounter < 16.0) + this.frame.Y = num1; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 32.0) + this.frame.Y = num1; + else + this.frameCounter = 0.0; + } + } + } + if (this.type == 454) + { + int num170 = (int) (this.frameCounter / 2.0); + this.frame.Y = num1 * num170; + } + if (this.type == 377 || this.type == 446) + { + this.frame.Y = (double) this.velocity.Y == 0.0 ? 0 : num1; + this.spriteDirection = this.direction; + } + if (this.type == 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; + } + } + if (this.type == 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; + } + } + if (this.type == 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; + } + } + if (this.type == 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; + } + else + { + ++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; + } + } + } + else + { + 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; + } + } + } + if (this.type == 492) + this.frame.Y = num1 * (int) this.ai[2]; + if (this.type == 473 || this.type == 474 || this.type == 475 || this.type == 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; + } + else if ((double) this.ai[0] == 1.0) + { + this.rotation = 0.0f; + this.frameCounter = 0.0; + int num171 = 6; + this.frame.Y = (double) this.ai[1] >= (double) num171 ? ((double) this.ai[1] >= (double) (num171 * 2) ? ((double) this.ai[1] >= (double) (num171 * 3) ? ((double) this.ai[1] >= (double) (num171 * 4) ? ((double) this.ai[1] >= (double) (num171 * 5) ? num1 * 6 : num1 * 5) : num1 * 4) : num1 * 3) : num1 * 2) : num1; + } + else 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 num172 = 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) (num172 * 2); + } + } + else if (this.frameCounter < (double) num172) + this.frame.Y = num1 * 12; + else if (this.frameCounter < (double) (num172 * 2)) + this.frame.Y = num1 * 11; + else if (this.frameCounter < (double) (num172 * 3)) + { + this.frame.Y = num1 * 10; + } + else + { + this.frame.Y = num1 * 11; + if (this.frameCounter >= (double) (num172 * 4 - 1)) + this.frameCounter = 0.0; + } + } + else + { + this.frame.Y = num1 * 13; + this.frameCounter = 0.0; + } + } + else 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; + } + } + else 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; + } + else if ((double) this.ai[0] == 4.09999990463257) + { + this.rotation = 0.0f; + if (this.frame.Y > num1 * 6) + this.frameCounter = 0.0; + ++this.frameCounter; + int num173 = 4; + if (this.frameCounter < (double) num173) + this.frame.Y = num1 * 6; + else if (this.frameCounter < (double) (num173 * 2)) + this.frame.Y = num1 * 5; + else if (this.frameCounter < (double) (num173 * 3)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num173 * 4)) + this.frame.Y = num1 * 3; + else if (this.frameCounter < (double) (num173 * 5)) + { + this.frame.Y = num1 * 4; + } + else + { + this.frame.Y = num1 * 5; + if (this.frameCounter >= (double) (num173 * 6 - 1)) + this.frameCounter = 0.0; + } + } + } + if (this.type == 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; + } + if (this.type == 479) + { + ++this.frameCounter; + int num174 = 4; + if (this.frameCounter < (double) num174) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num174 * 2)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num174 * 3)) + this.frame.Y = num1 * 2; + else if (this.frameCounter < (double) (num174 * 4 - 1)) + this.frame.Y = num1; + else + this.frameCounter = 0.0; + } + if (this.type == 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; + } + if (this.type >= 449 && this.type <= 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 num175 = 0; + if ((double) this.ai[1] < 22.0) + num175 = -14; + else if ((double) this.ai[1] < 28.0) + num175 = 3; + else if ((double) this.ai[1] < 34.0) + num175 = 2; + else if ((double) this.ai[1] < 40.0) + num175 = 1; + this.frame.Y = num1 * (15 + num175); + this.frameCounter = 0.0; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + if (this.type == 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 num176 = 0; + if ((double) this.ai[1] < 22.0) + num176 = -14; + else if ((double) this.ai[1] < 28.0) + num176 = 3; + else if ((double) this.ai[1] < 34.0) + num176 = 2; + else if ((double) this.ai[1] < 40.0) + num176 = 1; + this.frame.Y = num1 * (15 + num176); + this.frameCounter = 0.0; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + if (this.type == 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 num177 = 0; + if ((double) this.ai[1] < 22.0) + num177 = -15; + else if ((double) this.ai[1] < 28.0) + num177 = 3; + else if ((double) this.ai[1] < 34.0) + num177 = 2; + else if ((double) this.ai[1] < 40.0) + num177 = 1; + this.frame.Y = num1 * (15 + num177); + this.frameCounter = 0.0; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 379 || this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + } + else + { + 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 381 || this.type == 382 || this.type == 383 || this.type == 385 || this.type == 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; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 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; + } + } + else + { + ++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; + } + } + } + if (this.type == 386) + { + if ((double) this.ai[2] > 0.0) + { + int num178 = (int) this.ai[2] / 12; + this.frame.Y = num1 * (9 + num178 % 2); + } + else 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; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 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; + } + } + if (this.type == 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; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + if (this.type == 390) + { + 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); + } + if (this.type == 393) + { + Vector2 rotationVector2 = this.ai[2].ToRotationVector2(); + int num179 = (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 * num179; + float num180 = 280f; + float num181 = 140f; + if (((double) this.ai[3] < (double) num180 ? 0 : ((double) this.ai[3] < (double) num180 + (double) num181 ? 1 : 0)) != 0 && (int) this.ai[3] % 6 <= 2) + this.frame.Y += num1 * 9; + } + if (this.type == 394) + { + int num182 = (int) this.ai[3] - 300; + if (num182 >= 120) + { + int num183 = num182 - 120; + this.frame.Y = num183 < 160 ? (num183 < 20 ? num1 * (4 + num183 / 5) : num1 * (num183 / 4 % 4)) : num1 * (7 - (num183 - 160) / 5); + } + else + this.frame.Y = num1 * 4; + } + if (this.type == 395) + { + float num184 = 20f; + float num185 = 240f; + int num186 = (double) this.ai[3] < (double) num184 ? 0 : ((double) this.ai[3] < (double) num184 + (double) num185 ? 1 : 0); + ++this.frameCounter; + if (this.frameCounter >= 66.0) + this.frameCounter = 0.0; + if (num186 != 0) + { + ++this.frameCounter; + if (this.frameCounter >= 54.0 || this.frameCounter < 36.0) + this.frameCounter = 36.0; + } + int num187 = (int) this.frameCounter % 66 / 6; + this.frame.Y = num1 * num187; + } + if (this.type == 392) + { + float num188 = 20f; + float num189 = 240f; + int num190 = (double) this.ai[3] < (double) num188 ? 0 : ((double) this.ai[3] < (double) num188 + (double) num189 ? 1 : 0); + ++this.frameCounter; + if (num190 != 0) + ++this.frameCounter; + if (this.frameCounter >= 12.0) + this.frameCounter = 0.0; + int num191 = (int) this.frameCounter % 12 / 3; + this.frame.Y = num1 * num191; + } + if (this.type == 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; + } + else if (this.type == 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; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + if (this.type == 398) + { + if ((double) this.ai[0] <= 0.0) + { + this.frame.Y = 0; + } + else + { + 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 num192 = (int) this.frameCounter % 30 / 6; + this.frame.Y = num1 * num192; + } + } + if (this.type == 397) + { + int num193 = (int) this.frameCounter / 7; + this.frame.Y = num1 * num193; + } + if (this.type == 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 num194 = (int) this.frameCounter % 16 / 4; + this.frame.Y = num1 * num194; + } + if (this.type == 437) + { + ++this.frameCounter; + if (this.frameCounter >= 20.0) + this.frameCounter = 0.0; + int num195 = (int) this.frameCounter % 20 / 5; + this.frame.Y = num1 * num195; + } + if (this.type == 438) + { + ++this.frameCounter; + if ((double) this.ai[1] == 1.0) + ++this.frameCounter; + if (this.frameCounter >= 49.0) + this.frameCounter = 0.0; + int num196 = (int) this.frameCounter % 49 / 7; + if (num196 >= 4) + num196 = 6 - num196; + this.frame.Y = num1 * num196; + } + if (this.type == 439 || this.type == 440) + { + switch ((int) this.localAI[2]) + { + 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; + } + if (this.type == 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; + } + } + if (this.type == 523 && ++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; + } + if (this.type == 371 || this.type == 372 || this.type == 373) + this.frame.Y = num1; + if (this.type == 370) + { + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 5.0) + { + int num197 = 5; + if ((double) this.ai[0] == 5.0) + num197 = 4; + ++this.frameCounter; + if (this.frameCounter > (double) num197) + { + 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 num198 = 90; + if ((double) this.ai[2] < (double) (num198 - 30) || (double) this.ai[2] > (double) (num198 - 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) (num198 - 20) && (double) this.ai[2] < (double) (num198 - 15)) + this.frame.Y = num1 * 7; + } + } + if ((double) this.ai[0] == 4.0 || (double) this.ai[0] == 9.0) + { + int num199 = 180; + if ((double) this.ai[2] < (double) (num199 - 60) || (double) this.ai[2] > (double) (num199 - 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; + } + else + { + this.frame.Y = num1 * 6; + if ((double) this.ai[2] > (double) (num199 - 50) && (double) this.ai[2] < (double) (num199 - 25)) + this.frame.Y = num1 * 7; + } + } + } + if (this.type == 359 || this.type == 360) + { + if ((double) this.velocity.Y > 1.0) + { + ++this.frameCounter; + int num200 = 6; + if (this.frameCounter < (double) num200) + { + this.frame.Y = num1 * 4; + } + else + { + this.frame.Y = num1 * 5; + if (this.frameCounter >= (double) (num200 * 2 - 1)) + this.frameCounter = 0.0; + } + } + else + { + ++this.frameCounter; + int num201 = 10; + if (this.frameCounter < (double) num201) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num201 * 2)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num201 * 3)) + this.frame.Y = num1 * 2; + else if (this.frameCounter < (double) (num201 * 4)) + this.frame.Y = num1 * 3; + else if (this.frameCounter < (double) (num201 * 5)) + { + this.frame.Y = num1 * 2; + } + else + { + this.frame.Y = num1; + if (this.frameCounter >= (double) (num201 * 6 - 1)) + this.frameCounter = 0.0; + } + } + } + if (this.type == 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; + } + } + if (this.type == 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; + } + if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + ref int local = ref this.frame.Y; + local = local; + this.frameCounter = 0.0; + } + else + { + 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; + } + } + if (this.type == 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; + } + if (this.type == 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; + else 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; + } + else if ((double) this.ai[0] == 2.0) + this.frame.Y = num1 * 5; + } + if (this.type == 344) + { + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 2.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 9) + this.frame.Y = 0; + } + else + { + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 9) + this.frame.Y = 0; + } + } + if (this.type == 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; + } + else + { + ++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; + } + } + if (this.type == 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; + } + else if (this.type == 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; + } + else + { + if (this.frame.Y < num1 * 4) + this.frame.Y = num1 * 4; + if (this.frame.Y > num1 * 7) + this.frame.Y = num1 * 4; + } + } + else if (this.type == 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; + } + else + { + if (this.frame.Y < num1 * 4) + this.frame.Y = num1 * 4; + if (this.frame.Y > num1 * 7) + this.frame.Y = num1 * 4; + } + } + else if (this.type >= 305 && this.type <= 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; + } + else if (this.type == 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; + } + } + } + else if (this.frame.Y < 2) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + } + } + else if (this.type == 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; + } + else if (this.type == 289) + { + ++this.frameCounter; + if (this.frameCounter < 2.0) + this.frame.Y = 0; + else if (this.frameCounter < 3.0) + { + this.frame.Y = num1; + } + else + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + } + if ((double) this.ai[3] == 1.0) + this.frame.Y += num1 * 3; + } + else if (this.type == 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; + } + else if (this.type == 355 || this.type == 358) + { + 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; + } + else if (this.type == 356 || this.type == 444) + { + int num202 = 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) num202) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num202 * 2)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num202 * 3)) + { + this.frame.Y = num1 * 2; + } + else + { + this.frame.Y = num1; + if (this.frameCounter >= (double) (num202 * 4 - 1)) + this.frameCounter = 0.0; + } + if (this.type != 444) + this.frame.Y += (int) ((double) (num1 * 3) * ((double) this.ai[2] - 1.0)); + } + else if (this.type == 357 || this.type == 448 || this.type == 484) + { + 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 x = (int) this.Center.X / 16; + int y = (int) this.position.Y / 16; + if (WorldGen.InWorld(x, y) && Main.tile[x, y] != null) + { + if (Main.tile[x, y].slope() == (byte) 0) + ++y; + if (Main.tile[x, y].slope() == (byte) 1) + { + this.rotation = 0.785f; + this.localAI[0] = 0.0f; + } + else if (Main.tile[x, y].slope() == (byte) 2) + { + this.rotation = -0.785f; + this.localAI[0] = 0.0f; + } + } + } + else if (this.type >= 485 && this.type <= 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 index5 = (int) this.Center.X / 16; + int index6 = (int) this.position.Y / 16; + if (Main.tile[index5, index6] != null) + { + if (Main.tile[index5, index6].slope() == (byte) 0) + ++index6; + if (Main.tile[index5, index6].slope() == (byte) 1) + { + this.rotation = 0.785f; + this.localAI[0] = 0.0f; + } + else if (Main.tile[index5, index6].slope() == (byte) 2) + { + this.rotation = -0.785f; + this.localAI[0] = 0.0f; + } + } + } + else if (this.type == 250 || this.type == 264 || this.type == 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; + } + else if (this.type == 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; + else if ((double) this.ai[0] == 1.0) + this.frame.Y = 1; + } + else if (this.type == 246) + { + if ((double) this.ai[0] == 0.0) + this.frame.Y = (double) this.localAI[0] != 1.0 ? 0 : num1; + else 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; + } + } + else if (this.type == 249) + this.frame.Y = (double) this.localAI[0] != 1.0 ? 0 : num1; + else if (this.type == 141) + { + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = num1 * 2; + } + else + { + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1) + this.frame.Y = 0; + } + } + else if (this.type == 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; + } + else if (this.frameCounter < -6.0) + { + if (this.frame.Y > num1 * 9) + this.frame.Y = num1 * 12; + } + else if (this.frameCounter < 0.0) + { + this.frameCounter = 0.0; + if (this.frame.Y > num1 * 9) + this.frame.Y = num1 * 11; + } + } + else + { + this.frameCounter = -18.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 13 : num1 * 14; + } + } + else + { + 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; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + else if (this.type == 164 || this.type == 239 || this.type == 530) + { + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? 0 : num1 * 4; + } + else + { + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + 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; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else if (this.type == 165 || this.type == 237 || this.type == 238 || this.type == 240 || this.type == 531) + { + float num203 = 0.5f; + if (this.type == 531) + num203 = 0.4f; + this.frameCounter += ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * (double) num203; + 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 + this.frameCounter = 0.0; + } + else if (this.type == 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; + else if (this.type == 174) + 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; + else if (this.type == 177) + { + if ((double) this.velocity.Y == 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 10.0) + { + this.frameCounter = 30.0; + this.frame.Y = 0; + } + else + this.frame.Y = num1; + } + else if ((double) this.velocity.Y < 0.0) + { + this.frame.Y = num1 * 2; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + } + } + else if (this.type == 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; + } + else + { + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + if (this.frameCounter < -6.0) + this.frame.Y = num1 * 6; + else if (this.frameCounter < 0.0) + this.frame.Y = num1 * 7; + 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 < 18.0) + this.frame.Y = num1 * 3; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else if (this.type == 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; + } + else + { + 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; + } + } + else if (this.type == 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; + else if ((double) this.ai[2] < 8.0) + this.frame.Y = num1; + else if ((double) this.ai[2] < 12.0) + this.frame.Y = num1 * 2; + else if ((double) this.ai[2] < 16.0) + this.frame.Y = num1 * 3; + } + else + { + 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; + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + } + else if (this.type == 170 || this.type == 171 || this.type == 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; + } + else if (this.type == 135) + this.frame.Y = (double) this.ai[2] != 0.0 ? num1 : 0; + else if (this.type == 85 || this.type == 341) + { + if ((double) this.ai[0] == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + int num204 = 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) (num204 * 4)) + this.frameCounter = (double) (num204 * 4); + if (this.frameCounter < (double) num204) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num204 * 2)) + this.frame.Y = num1 * 2; + else if (this.frameCounter < (double) (num204 * 3)) + this.frame.Y = num1 * 3; + else if (this.frameCounter < (double) (num204 * 4)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num204 * 5)) + this.frame.Y = num1 * 5; + else if (this.frameCounter < (double) (num204 * 6)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num204 * 7)) + { + this.frame.Y = num1 * 3; + } + else + { + this.frame.Y = num1 * 2; + if (this.frameCounter >= (double) (num204 * 8)) + this.frameCounter = (double) num204; + } + } + if ((double) this.ai[3] == 2.0) + this.frame.Y += num1 * 6; + else if ((double) this.ai[3] == 3.0) + this.frame.Y += num1 * 12; + else if ((double) this.ai[3] == 4.0) + this.frame.Y += num1 * 18; + } + else if (this.type == 113 || this.type == 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; + } + else + { + this.frame.Y = 0; + this.frameCounter = -60.0; + } + } + else if (this.type == 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; + } + else + { + ++this.frameCounter; + if (this.frameCounter < 4.0) + { + this.frame.Y = num1; + } + else + { + this.frame.Y = num1 * 2; + if (this.frameCounter >= 7.0) + this.frameCounter = 0.0; + } + } + } + else if (this.type == 252 || this.type == 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; + } + else + { + ++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; + } + } + else if (this.type == 122) + { + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.05f; + if ((double) this.ai[3] > 0.0) + { + int num205 = (int) ((double) this.ai[3] / 8.0); + this.frameCounter = 0.0; + this.frame.Y = (num205 + 3) * num1; + } + else + { + ++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; + } + } + else if (this.type == 74 || this.type == 297 || this.type == 298 || this.type == 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; + } + else + { + ++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; + } + } + else if (this.type == 362 || this.type == 364) + { + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + ++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; + } + } + else if (this.type == 363 || this.type == 365) + { + 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; + } + else 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; + } + else + { + 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; + } + } + else if (this.type == 62 || this.type == 66) + { + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + } + else + { + this.frame.Y = num1; + if (this.frameCounter >= 11.0) + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else if (this.type == 63 || this.type == 64 || this.type == 103 || this.type == 242 || this.type == 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; + else if (this.frameCounter < 12.0) + this.frame.Y = num1; + else if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + } + else + { + this.frame.Y = num1 * 3; + if (this.frameCounter >= 23.0) + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else + { + ++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; + } + } + else if (this.type == 2 || this.type == 23 || this.type == 121 || this.type == 169 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194 || this.type == 317 || this.type == 318) + { + 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) + { + 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 >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + this.frame.Y = 0; + } + else if (this.type == 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; + } + else if (this.type == 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; + } + else if (this.type == 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; + } + else if (this.type == 157) + { + this.spriteDirection = this.direction; + ++this.frameCounter; + if (!this.wet) + ++this.frameCounter; + int num206 = 5; + if (this.frameCounter < (double) num206) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num206 * 2)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num206 * 3)) + this.frame.Y = num1 * 2; + else if (this.frameCounter < (double) (num206 * 4)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num206 * 5)) + this.frame.Y = num1 * 3; + else if (this.frameCounter < (double) (num206 * 6)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num206 * 7)) + this.frame.Y = num1 * 5; + else if (this.frameCounter < (double) (num206 * 8)) + this.frame.Y = num1 * 4; + else + this.frameCounter = 0.0; + } + else if (this.type == 55 || this.type == 57 || this.type == 58 || this.type == 102 || this.type == 241 || this.type == 465) + { + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.wet) + { + 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 + this.frameCounter = 0.0; + } + else if (this.frameCounter < 6.0) + this.frame.Y = num1 * 4; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 5; + else + this.frameCounter = 0.0; + } + else if (this.type == 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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + } + } + else if (this.type == 155) + { + if ((double) this.velocity.Y > 0.0) + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + } + else if ((double) this.velocity.Y < 0.0) + { + this.frame.Y = num1 * 6; + this.frameCounter = 0.0; + } + else + { + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.400000005960464; + if (this.direction > 0 && (double) this.velocity.X < 0.0 || this.direction < 0 && (double) this.velocity.X > 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else if (this.frameCounter < 8.0) + this.frame.Y = num1 * 3; + else if (this.frameCounter < 16.0) + this.frame.Y = num1 * 6; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 4; + else if (this.frameCounter < 32.0) + this.frame.Y = num1 * 5; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 329) + { + if ((double) this.velocity.Y > 0.0) + { + this.frame.Y = num1 * 3; + this.frameCounter = 0.0; + } + else if ((double) this.velocity.Y < 0.0) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + } + else + { + 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; + } + } + } + else if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else 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; + } + } + else + { + 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; + } + } + } + else if (this.type == 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; + } + else + { + 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; + } + } + } + else if (this.type == (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; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + } + } + else if (this.type == 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; + } + } + else if (this.type == 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; + } + } + else if (this.type == 67 || this.type == 217 || this.type == 218 || this.type == 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; + } + } + else if (this.type == 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; + } + } + else if (this.type == 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; + } + } + else if (this.type == 83 || this.type == 84 || this.type == 179) + { + if ((double) this.ai[0] == 2.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + ++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; + } + } + } + else if (this.type == 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; + } + } + else if (this.type == 65) + { + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.wet && this.type == 65) + { + 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 + this.frameCounter = 0.0; + } + } + else if (this.type >= 542 && this.type <= 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); + } + else if (this.type == 224) + { + 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; + } + else if (this.type == 150 || this.type == 151 || this.type == 152 || this.type == 158 || this.type == 226) + { + 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; + } + else if (this.type == 48 || this.type == 49 || this.type == 51 || this.type == 60 || this.type == 82 || this.type == 93 || this.type == 137 || this.type == 182 || this.type == 210 || this.type == 211 || this.type == 253 || this.type == 316) + { + 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; + 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; + } + else if (this.type == 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; + } + else if (this.type == 42 || this.type >= 231 && this.type <= 235) + { + ++this.frameCounter; + if (this.frameCounter < 2.0) + this.frame.Y = 0; + else if (this.frameCounter < 4.0) + this.frame.Y = num1; + else if (this.frameCounter < 6.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 8.0) + this.frame.Y = num1; + else + this.frameCounter = 0.0; + } + else if (this.type == 205) + { + this.frameCounter += 0.5; + if (this.frameCounter < 2.0) + this.frame.Y = 0; + else if (this.frameCounter < 4.0) + this.frame.Y = num1; + else if (this.frameCounter < 6.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 8.0) + this.frame.Y = num1; + else + this.frameCounter = 0.0; + } + else if (this.type == 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; + } + else if (this.type == 43 || this.type == 56 || this.type == 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; + } + else if (this.type == 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; + } + else if (this.type == 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; + } + if (this.type == 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) + return; + this.frameCounter = 0.0; + this.frame.Y += num1; + } + else + { + if ((double) this.velocity.Y != 0.0) + return; + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter <= 12.0) + return; + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y <= num1 * 7) + return; + this.frame.Y = num1 * 3; + } + } + else if (this.type == 467) + { + if ((double) this.ai[0] == 1.0) + { + ++this.frameCounter; + if (this.frameCounter <= 4.0) + return; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 6) + return; + this.frame.Y += num1; + this.frameCounter = 0.0; + } + else + { + ++this.frameCounter; + if (this.frameCounter <= 4.0) + return; + this.frameCounter = 0.0; + if (this.frame.Y > num1 * 3) + this.frame.Y = num1 * 3; + if (this.frame.Y <= 0) + return; + this.frame.Y -= num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else + { + if (this.frame.Y >= num1 * 21) + return; + this.frame.Y = num1 * 21; + } + } + else 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) + return; + this.frame.Y = 0; + } + else + { + 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; + } + else + { + if (this.frame.Y / num1 >= 10) + return; + this.frame.Y = num1 * 10; + } + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + } + } + else if (this.type == 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; + } + else + { + ++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; + } + } + else if (this.type == 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; + } + else + { + if (this.frame.Y >= num1 * 11) + return; + this.frame.Y = num1 * 11; + } + } + else if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + this.frame.Y = 0; + } + else + { + 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; + } + else + { + if (this.frame.Y / num1 >= 2) + return; + this.frame.Y = num1 * 2; + } + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + else if (this.type == 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 num207 = (float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction); + if ((double) Math.Abs(this.rotation - num207) >= 3.14) + { + if ((double) num207 < (double) this.rotation) + this.rotation -= 6.28f; + else + this.rotation += 6.28f; + } + this.rotation = (float) (((double) this.rotation * 4.0 + (double) num207) / 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; + } + else + { + if (this.frame.Y / num1 >= 16) + return; + this.frame.Y = num1 * 19; + } + } + else + { + 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; + } + else + { + 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) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + } + else if (this.type == 466) + { + if ((double) this.ai[2] <= 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 = 0; + else if ((double) this.ai[2] < -8.0) + this.frame.Y = num1; + else + this.frame.Y = num1 * 2; + } + else 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; + } + else + { + 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) + return; + this.frame.Y = num1 * 4; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 3; + } + } + else if (this.type == 471) + { + bool flag = false; + if ((double) this.ai[3] < 0.0) + flag = true; + if (flag) + { + 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; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 18; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 19; + else if (this.frameCounter < 23.0) + { + this.frame.Y = num1 * 18; + } + else + { + this.frame.Y = num1 * 18; + this.frameCounter = 0.0; + } + } + else if ((double) this.ai[3] == 1.0) + { + this.frame.Y = num1 * 16; + this.frameCounter = 0.0; + } + else 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; + } + else + { + 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) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + else if (this.type == 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) + return; + this.frame.Y = 0; + } + else + { + 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) + return; + this.frame.Y = num1 * 7; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + } + } + else if (this.type == 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) + return; + this.frame.Y = num1 * 2; + } + else + { + 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; + } + else + { + 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) + return; + this.frame.Y = num1 * 6; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + } + else if (this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 : num1; + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 : 0; + this.frameCounter = 0.0; + } + } + else if (this.type >= 269 && this.type <= 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; + } + else + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + } + else + { + 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]) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + else if (this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = 0; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + if ((double) this.velocity.Y <= 4.0) + return; + this.rotation -= this.velocity.Y * 0.01f; + } + } + else if (this.type == 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) + { + if ((double) this.ai[1] < 10.0) + this.frame.Y = num1 * 11; + else if ((double) this.ai[1] < 20.0) + this.frame.Y = num1 * 10; + else + this.frame.Y = num1 * 9; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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) + return; + this.frame.Y = num1 * 2; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1; + } + } + else if (this.type == 110 || this.type == 214 || this.type == 215 || this.type == 216 || this.type == 291 || this.type == 292 || this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 6; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + else if (this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 6; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + } + else if (this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 7; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 5; + } + } + else if (this.type == 111) + { + 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; + } + else + { + 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]) + return; + this.frame.Y = num1 * 7; + } + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + } + } + else if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + this.frame.Y = 0; + else if (this.frameCounter < 16.0) + this.frame.Y = num1; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 32.0) + this.frame.Y = num1 * 3; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 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) + return; + this.frame.Y = num1 * 3; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + this.frame.Y = 0; + else if (this.frameCounter < 16.0) + this.frame.Y = num1; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 2; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + 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) + return; + this.frame.Y = num1; + } + } + else if (this.type == 349) + { + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y <= num1 * 7) + return; + this.frame.Y = 0; + } + else if (this.type == 3 || this.type == 342 || this.type == 331 || this.type == 332 || this.type == 52 || this.type == 53 || this.type == 536 || this.type == 132 || this.type == 161 || this.type == 162 || this.type == 186 || this.type == 187 || this.type == 188 || this.type == 189 || this.type == 200 || this.type == 223 || this.type == 251 || this.type == 254 || this.type == (int) byte.MaxValue || this.type >= 319 && this.type <= 321) + { + 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; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + this.frame.Y = 0; + else if (this.frameCounter < 16.0) + this.frame.Y = num1; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 32.0) + this.frame.Y = num1; + else + this.frameCounter = 0.0; + } + } + else if (this.type == 148 || this.type == 149 || this.type == 168 || this.type == 470) + { + int num208 = 0; + if ((double) this.localAI[0] == 2.0) + num208 = 3; + if ((double) this.localAI[0] == 3.0) + num208 = 6; + if ((double) this.localAI[0] == 4.0) + num208 = 9; + int num209 = num208 * 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 = num209; + this.frameCounter = 0.0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (this.frameCounter < 6.0) + this.frame.Y = num209; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 + num209; + else if (this.frameCounter < 15.0) + { + this.frame.Y = num1 * 2 + num209; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num209; + } + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num209; + } + else + { + if ((double) this.velocity.Y <= 0.0) + return; + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num209; + } + } + else if (this.type == 299 || this.type == 538 || this.type == 539) + { + 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; + } + else + { + 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) + return; + this.frame.Y = num1; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + } + else + { + if ((double) this.velocity.Y <= 0.0) + return; + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + } + } + else if (this.type == 300 || this.type == 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) + return; + this.frame.Y = 0; + } + else + { + 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]) + return; + this.frame.Y = num1 * 2; + } + } + else + { + 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]) + return; + this.frame.Y = num1 * 2; + } + } + else if (this.type == 361 || this.type == 445) + { + this.spriteDirection = this.direction; + 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) + return; + this.frame.Y = 0; + } + else + { + ++this.frameCounter; + int num210 = 6; + if (this.frameCounter < (double) num210) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num210 * 2)) + this.frame.Y = num1 * 6; + else if (this.frameCounter < (double) (num210 * 3)) + { + this.frame.Y = num1 * 8; + } + else + { + this.frame.Y = num1 * 9; + if (this.frameCounter < (double) (num210 * 4 - 1)) + return; + this.frameCounter = 0.0; + } + } + } + else if ((double) this.velocity.Y > 0.0) + this.frame.Y = num1 * 9; + else + this.frame.Y = num1 * 8; + } + else if (this.type == 366 || this.type == 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; + } + else + { + 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]) + return; + this.frame.Y = 0; + } + } + else if (this.type == 46 || this.type == 47 || this.type == 303 || this.type == 337 || this.type == 443 || this.type == 464 || this.type == 540) + { + 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; + } + else + { + 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]) + return; + this.frame.Y = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + } + else + { + if ((double) this.velocity.Y <= 0.0) + return; + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + } + } + else if (this.type == 4 || this.type == 125 || this.type == 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) + return; + this.frame.Y += num1 * 3; + } + else if (this.type == 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]) + return; + this.frame.Y = 0; + } + else if (this.type == 94) + { + ++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 + { + this.frame.Y = num1; + if (this.frameCounter < 23.0) + return; + this.frameCounter = 0.0; + } + } + else if (this.type == 6 || this.type == 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]) + return; + this.frame.Y = 0; + } + else if (this.type == 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; + else if (this.frameCounter <= 8.0) + this.frame.Y = num1 * 5; + else if (this.frameCounter <= 12.0) + this.frame.Y = num1 * 6; + else if (this.frameCounter <= 16.0) + this.frame.Y = num1 * 7; + else if (this.frameCounter <= 20.0) + { + this.frame.Y = num1 * 8; + } + else + { + this.frame.Y = num1 * 9; + this.frameCounter = 100.0; + } + } + else + { + ++this.frameCounter; + if (this.frameCounter <= 4.0) + this.frame.Y = 0; + else if (this.frameCounter <= 8.0) + this.frame.Y = num1; + else if (this.frameCounter <= 12.0) + { + this.frame.Y = num1 * 2; + } + else + { + this.frame.Y = num1 * 3; + if (this.frameCounter < 16.0) + return; + this.frameCounter = 0.0; + } + } + } + else if (this.type == 29 || this.type == 32 || this.type == 45 || this.type == 172 || this.type >= 281 && this.type <= 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; + } + else + { + if ((double) this.ai[1] <= 0.0) + return; + this.frame.Y += num1 * 2; + } + } + else + { + if (this.type != 34) + return; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y < num1 * Main.npcFrameCount[this.type]) + return; + this.frame.Y = 0; + } + } + + 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 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].active(false); + } + } + for (int index = 0; index < 40; ++index) + Main.chest[chest1].item[index] = new Item(); + Chest.DestroyChest(x, y); + 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) + { + float num6 = num2 - (float) Main.player[this.target].aggro; + float num7 = (float) ((Main.player[this.target].height + Main.player[this.target].width + this.height + this.width) / 4 + 750 + 50); + if (Main.player[this.target].itemAnimation != 0 || Main.player[this.target].aggro >= 0 || (double) num6 <= (double) num7 || 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 void CheckActive() + { + if (!this.active) + return; + switch (this.type) + { + case 8: + return; + case 9: + return; + case 11: + return; + case 12: + return; + case 14: + return; + case 15: + return; + case 40: + case 41: + return; + case 88: + return; + case 89: + return; + case 90: + return; + case 91: + return; + case 92: + return; + case 96: + return; + case 97: + return; + case 99: + return; + case 100: + return; + case 113: + case 114: + case 115: + return; + case 118: + case 119: + return; + case 134: + case 135: + case 136: + return; + case 139: + if (NPC.npcsFoundForCheckActive[134]) + return; + break; + case 246: + case 247: + case 248: + case 249: + return; + case 263: + return; + case 267: + return; + case 328: + return; + case 379: + case 380: + return; + case 396: + case 397: + case 398: + return; + case 400: + return; + case 422: + return; + case 437: + case 438: + case 439: + case 440: + return; + case 488: + return; + case 493: + return; + case 507: + return; + case 517: + return; + case 548: + return; + case 549: + return; + case 551: + return; + 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; + break; + case 564: + return; + case 565: + return; + } + if (this.townNPC) + { + 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(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].townNPCs += this.npcSlots; + } + } + 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 index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + if (rectangle1.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))) + { + 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[index].activeNPCs += this.npcSlots * Main.slimeRainNPCSlots; + else + Main.player[index].activeNPCs += this.npcSlots; + } + } + if (rectangle2.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))) + this.timeLeft = NPC.activeTime; + 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; + 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.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); + } + } + } + } + } + + public void checkDead() + { + if (!this.active || this.realLife >= 0 && this.realLife != this.whoAmI || this.life > 0) + return; + 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) + { + NetworkText fullNetName = this.GetFullNetName(); + NetworkText text = NetworkText.FromKey(Lang.misc[this.type == 369 ? 36 : 19].Key, (object) fullNetName); + switch (Main.netMode) + { + case 0: + Main.NewText(text.ToString(), G: (byte) 25, B: (byte) 25); + break; + case 2: + NetMessage.BroadcastChatMessage(text, 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.prioritizedTownNPC == this.type) + WorldGen.prioritizedTownNPC = 0; + if (this.DeathSound != null) + Main.PlaySound(this.DeathSound, this.position); + if (this.type == 13 || this.type == 14 || this.type == 15) + { + 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(); + } + 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 num3 = 0; + switch (this.type) + { + case 26: + case 27: + case 28: + case 29: + case 111: + case 471: + num3 = 1; + break; + case 143: + case 144: + case 145: + num3 = 2; + break; + case 212: + case 213: + case 214: + case 215: + case 216: + case 491: + num3 = 3; + break; + case 381: + case 382: + case 383: + case 385: + case 386: + case 388: + case 389: + case 390: + case 391: + case 395: + num3 = 4; + break; + } + if (num3 == 0 || num3 != Main.invasionType) + return; + int num4 = 1; + switch (this.type) + { + case 216: + num4 = 5; + break; + case 395: + num4 = 10; + break; + case 471: + num4 = 10; + break; + case 491: + num4 = 10; + break; + } + Main.invasionSize -= num4; + if (Main.invasionSize < 0) + Main.invasionSize = 0; + if (Main.netMode != 1) + Main.ReportInvasionProgress(Main.invasionSizeStart - Main.invasionSize, Main.invasionSizeStart, num3 + 3, 0); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: ((float) Main.invasionProgressIcon)); + } + } + + 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: + NetMessage.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: + NetMessage.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 < 580; ++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 void NPCLoot() + { + if (Main.netMode == 1 || this.type >= 580) + return; + bool flag1 = NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3; + switch (this.type) + { + case 13: + case 14: + case 15: + if (this.boss) + { + AchievementsHelper.NotifyNPCKilled(this); + break; + } + break; + case 125: + case 126: + if (!NPC.AnyNPCs(this.type == 126 ? 125 : 126)) + { + AchievementsHelper.NotifyNPCKilled(this); + AchievementsHelper.CheckMechaMayhem(this.type); + break; + } + break; + case (int) sbyte.MaxValue: + case 134: + AchievementsHelper.CheckMechaMayhem(this.type); + AchievementsHelper.NotifyNPCKilled(this); + break; + default: + AchievementsHelper.NotifyNPCKilled(this); + break; + } + int index1 = Item.NPCtoBanner(this.BannerID()); + if (index1 > 0 && !NPCID.Sets.ExcludedFromDeathTally[this.type]) + { + if (this.realLife < 0 ? this.AnyInteractions() : Main.npc[this.realLife].AnyInteractions()) + { + ++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) + { + int npc = Item.BannerToNPC(index1); + new NPC().SetDefaults(npc); + 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: + NetMessage.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); + } + } + } + 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; + if ((this.type == 170 || this.type == 180 || this.type == 171) && Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3532); + switch (this.type) + { + case 75: + case 80: + case 84: + case 86: + case 120: + case 122: + case 137: + case 138: + case 171: + case 244: + case 475: + int maxValue1 = Main.expertMode ? 150 : 200; + if (Main.rand.Next(maxValue1) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3260); + break; + } + break; + } + if (Main.slimeRain && Main.slimeRainNPC[this.type] && !NPC.AnyNPCs(50)) + { + int num = 150; + if (NPC.downedSlimeKing) + num /= 2; + ++Main.slimeRainKillCount; + if (Main.slimeRainKillCount >= num) + { + NPC.SpawnOnPlayer(this.FindClosestPlayer(), 50); + Main.slimeRainKillCount = -num / 2; + } + } + if (!Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneDungeon) + { + bool flag2 = false; + if (Main.expertMode && Main.rand.Next(5) == 0) + flag2 = true; + else if (Main.rand.Next(5) == 0) + flag2 = true; + if (this.boss) + flag2 = false; + switch (this.type) + { + case 13: + case 14: + case 15: + flag2 = false; + break; + } + if (((!Main.hardMode || this.lifeMax <= 1 || this.damage <= 0 || this.friendly ? 0 : ((double) this.position.Y > Main.rockLayer * 16.0 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0 && this.type != 121 && (double) this.value > 0.0) + { + if (Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneCorrupt || Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneCrimson) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 521); + if (Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneHoly) + 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 < 3930) + { + int Stack = 1; + switch (Type) + { + case 8: + Stack = Main.rand.Next(5, 11); + break; + case 166: + Stack = Main.rand.Next(2, 7); + break; + case 965: + Stack = Main.rand.Next(20, 46); + break; + default: + if (Type >= 11 && Type <= 14 || Type >= 699 && Type <= 702) + { + Stack = Main.rand.Next(3, 9); + if (Main.rand.Next(2) == 0) + { + Stack += 5; + break; + } + break; + } + switch (Type) + { + case 71: + Stack = Main.rand.Next(50, 100); + break; + case 72: + Stack = Main.rand.Next(20, 100); + break; + case 73: + Stack = Main.rand.Next(1, 3); + break; + } + break; + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + } + } + 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 == 353 && Main.rand.Next(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3352); + if (this.type == 441 && Main.rand.Next(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3351); + if (this.type == 227 && Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3350); + if (this.type == 550 && Main.rand.Next(6) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3821); + if (this.type == 208 && Main.rand.Next(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 && Main.rand.Next(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3349); + if (Main.hardMode && (double) this.value > 0.0) + { + if (!NPC.downedMechBoss1 && Main.rand.Next(2500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 556); + else if (!NPC.downedMechBoss2 && Main.rand.Next(2500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 544); + else if (!NPC.downedMechBoss3 && Main.rand.Next(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) + { + if (Main.rand.Next(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1825); + else if (Main.rand.Next(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) + { + if (Main.rand.Next(2500) == 0 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneJungle) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1533); + if (Main.rand.Next(2500) == 0 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneCorrupt) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1534); + if (Main.rand.Next(2500) == 0 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneCrimson) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1535); + if (Main.rand.Next(2500) == 0 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].ZoneHoly) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1536); + if (Main.rand.Next(2500) == 0 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].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 maxValue2 = (int) ((double) (30 - waveNumber) / 2.5); + if (Main.expertMode) + maxValue2 -= 2; + if (maxValue2 < 1) + maxValue2 = 1; + if (this.type == 344) + NPC.downedChristmasTree = true; + if (this.type == 345) + NPC.downedChristmasIceQueen = true; + if (this.type == 346) + NPC.downedChristmasSantank = true; + if ((this.type == 344 || this.type == 345 || this.type == 346) && Main.rand.Next(maxValue2) == 0 && waveNumber >= 15) + { + int maxValue3 = 4; + if (waveNumber == 16) + maxValue3 = 4; + if (waveNumber == 17) + maxValue3 = 3; + if (waveNumber == 18) + maxValue3 = 3; + if (waveNumber == 19) + maxValue3 = 2; + if (waveNumber >= 20) + maxValue3 = 2; + if (Main.expertMode && Main.rand.Next(3) == 0) + --maxValue3; + if (Main.rand.Next(maxValue3) == 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 (Main.rand.Next(maxValue2) == 0) + { + if (this.type == 344) + { + int num = Main.rand.Next(3); + if (Main.rand.Next(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 && Main.rand.Next(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1914); + else if (Main.rand.Next(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 index3 = 0; index3 < num; ++index3) + 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 && Main.rand.Next(5) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type >= 338 && this.type <= 340 && Main.rand.Next(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.downedHalloweenTree = true; + if (this.type == 327) + NPC.downedHalloweenKing = true; + int waveNumber = NPC.waveNumber; + if (Main.expertMode) + waveNumber += 6; + int maxValue4 = (int) ((double) (17 - waveNumber) / 1.25); + if (Main.expertMode) + --maxValue4; + if (maxValue4 < 1) + maxValue4 = 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(maxValue4) == 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 (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 && Main.rand.Next(80) == 0) + 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 && Main.rand.Next(13) == 0) + 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.maxTilesY - 200) && Main.rand.Next(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 index4 = 0; index4 < num; ++index4) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + } + if (this.type == 156 && Main.rand.Next(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1518); + if (this.type == 243 && Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1519); + if (this.type >= 269 && this.type <= 280 && Main.rand.Next(450) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1517); + if ((this.type == 158 || this.type == 159) && Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1520); + if (this.type == 176 && Main.rand.Next(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1521); + if (this.type == 48 && Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1516); + if (this.type == 205 && Main.rand.Next(2) == 0) + 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 && Main.rand.Next(100) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && Main.rand.Next(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 && Main.rand.Next(300) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && (double) this.value > 0.0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3289, pfix: -1); + else if (Main.hardMode && Main.rand.Next(200) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && (double) this.value > 0.0) + { + 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.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 index5 = 0; index5 < num1; ++index5) + { + if (this.type == 461 && Main.rand.Next(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) && Main.rand.Next(35) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 900, pfix: -1); + if (this.type == 251 && Main.rand.Next(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 (Main.rand.Next(20) == 0 && NPC.downedPlantBoss) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2770, pfix: -1); + ++index5; + } + if (Main.rand.Next(4) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1570, pfix: -1); + ++index5; + } + else if (Main.rand.Next(3) == 0 && NPC.downedPlantBoss) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3292, pfix: -1); + ++index5; + } + } + if (this.type == 253 && Main.rand.Next(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 && Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3098, pfix: -1); + if (this.type == 468 && Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3105, pfix: -1); + if (this.type == 466 && Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3106, pfix: -1); + if (this.type == 467 && Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3249, pfix: -1); + if (this.type == 463 && Main.rand.Next(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 && Main.rand.Next(1000) == 0 && (double) this.value > 0.0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1314, pfix: -1); + if (this.type == 77 && Main.rand.Next(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 723, pfix: -1); + if (Main.rand.Next(100) == 0 || Main.expertMode && Main.rand.Next(100) == 0) + { + int Type1 = -1; + int Type2 = -1; + switch (this.type) + { + case 34: + case 83: + case 84: + case 179: + 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 (Main.rand.Next(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 (Main.rand.Next(100) == 0) + { + Type2 = Type1 != 888 ? 888 : 890; + break; + } + break; + case 80: + case 93: + case 109: + Type1 = 893; + break; + case 81: + 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 index6 = 0; index6 < num2; ++index6) + { + if (this.type == 290) + { + if (Main.rand.Next(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1513, pfix: -1); + else if (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 938, pfix: -1); + } + if (this.type == 287 && Main.rand.Next(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 (Main.rand.Next(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1300, pfix: -1); + else if (Main.rand.Next(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1254, pfix: -1); + } + if (this.type == 292) + { + if (Main.rand.Next(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1514, pfix: -1); + else if (Main.rand.Next(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 679, pfix: -1); + } + if (this.type == 293 && Main.rand.Next(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) && Main.rand.Next(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) && Main.rand.Next(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) && Main.rand.Next(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 (Main.rand.Next(400) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1183, pfix: -1); + else if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1266, pfix: -1); + else if (Main.rand.Next(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) + { + int maxValue5 = 13; + if (Main.expertMode) + maxValue5 = 9; + if (Main.rand.Next(maxValue5) == 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 && Main.rand.Next(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 || Main.rand.Next(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 (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2110, pfix: -1); + switch (Main.rand.Next(8)) + { + 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, 1294, pfix: -1); + break; + case 5: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1295, pfix: -1); + break; + case 6: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1296, pfix: -1); + break; + case 7: + 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.downedGolemBoss = true; + } + if (this.type == 471 && (Main.expertMode || Main.rand.Next(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.downedFishron = true; + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2588, pfix: -1); + if (Main.rand.Next(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 == 109 && !NPC.downedClown) + { + NPC.downedClown = true; + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 153 && Main.rand.Next(17) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1328, pfix: -1); + if (this.type == 120 && Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1326, pfix: -1); + if (this.type == 49 && Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1325, pfix: -1); + if (this.type == 185 && Main.rand.Next(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 951, pfix: -1); + if (this.type == 44 && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1320, pfix: -1); + if (this.type == 44 && Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 88, pfix: -1); + if (this.type == 110 && Main.rand.Next(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1321, pfix: -1); + if (this.type == 60 && Main.rand.Next(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1322, pfix: -1); + if (this.type == 151 && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1322, pfix: -1); + if (this.type == 24 && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1323, pfix: -1); + if (this.type == 109 && Main.rand.Next(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 (Main.rand.Next(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) && Main.rand.Next(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 && Main.rand.Next(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 && Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 682, pfix: -1); + if (this.type == 154 && Main.rand.Next(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) && Main.rand.Next(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 && Main.rand.Next(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 (Main.rand.Next(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1172, pfix: -1); + if (Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1293, pfix: -1); + if (Main.rand.Next(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 (Main.rand.Next(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 870, pfix: -1); + if (Main.rand.Next(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 871, pfix: -1); + if (Main.rand.Next(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 (Main.rand.Next(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 (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 (Main.rand.Next(8000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + if (Main.rand.Next(4000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + if (Main.rand.Next(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + if (Main.rand.Next(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + if (Main.rand.Next(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 672, pfix: -1); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1277); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1278); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1279); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1280); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1704); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1705); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1710); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1716); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1720); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2379); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2389); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2405); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2843); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3885); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2663); + if (Main.rand.Next(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3904, Main.rand.Next(6, 11) * 5); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3910); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2238); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2133); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2137); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2143); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2147); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2151); + if (Main.rand.Next(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2155); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3263); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3264); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3265); + } + else if (this.type == 216) + { + if (Main.rand.Next(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + if (Main.rand.Next(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + if (Main.rand.Next(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + if (Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + if (Main.rand.Next(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 (Main.rand.Next(400) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + else if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + else if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + else if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + else if (Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + else if (Main.rand.Next(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) && Main.rand.Next(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 && Main.rand.Next(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 (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + else if (this.type == 80 && Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + if (this.type == 524 && Main.rand.Next(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 (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 522, Main.rand.Next(1, 4)); + if (Main.rand.Next(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + if (this.type == 526) + { + if (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1332, Main.rand.Next(1, 4)); + if (Main.rand.Next(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + if (this.type == 527) + { + if (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (Main.rand.Next(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + } + if (this.type == 532) + { + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3380); + if (Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3771); + } + if (this.type == 528) + { + if (Main.rand.Next(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2802); + if (Main.rand.Next(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 (Main.rand.Next(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2801); + if (Main.rand.Next(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) && Main.rand.Next(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) && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 393, pfix: -1); + if (this.type == 58 && Main.rand.Next(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 (Main.rand.Next(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 18, pfix: -1); + else if (Main.rand.Next(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 393, pfix: -1); + else if (Main.rand.Next(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 (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 954, pfix: -1); + else if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 955, pfix: -1); + else if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1166, pfix: -1); + else if (Main.rand.Next(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 (Main.rand.Next(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 (Main.rand.Next(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 (Main.rand.Next(450) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 959, pfix: -1); + if (Main.rand.Next(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) && Main.rand.Next(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 == 86) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 526); + if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 856); + } + 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 (Main.rand.Next(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) + { + int Stack = Main.rand.Next(1, 3); + if (Main.expertMode) + { + if (this.netID == -7) + ++Stack; + if (this.netID == -8 || this.netID == -9) + Stack += Main.rand.Next(2); + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Stack); + int maxValue6 = 8000; + if (Main.expertMode) + maxValue6 = (int) ((double) maxValue6 * 0.7); + if (Main.rand.Next(maxValue6) == 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 && Main.rand.Next(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 maxValue7 = 100; + if (Main.expertMode) + maxValue7 = (int) ((double) maxValue7 * 0.7); + if (Main.rand.Next(maxValue7) == 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 (Main.expertMode) + { + if (this.netID == -7) + ++Stack; + if (this.netID == -8 || this.netID == -9) + Stack += Main.rand.Next(2); + } + 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 maxValue8 = 10000; + if (Main.expertMode) + maxValue8 = (int) ((double) maxValue8 * 0.7); + if (Main.rand.Next(maxValue8) == 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 (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 38); + else if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 236); + } + if (this.type == 104 && Main.rand.Next(60) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 485, pfix: -1); + if (this.type == 58) + { + if (Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 263); + else if (Main.rand.Next(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 118); + } + if (this.type == 102 && Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 263); + if (this.type == 3 || 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 (Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 216, pfix: -1); + if (Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1304, pfix: -1); + } + if ((this.type == 489 || this.type == 490) && (Main.expertMode || Main.rand.Next(2) == 0)) + { + if (Main.rand.Next(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3212, pfix: -1); + if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3213, pfix: -1); + } + if (this.type == 223 && Main.rand.Next(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) && Main.rand.Next(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)) && Main.rand.Next(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 == 509 || this.type == 508) && Main.rand.Next(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 == 508 && Main.rand.Next(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) && Main.rand.Next(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3109); + if ((this.type == 6 || this.type == 94) && Main.rand.Next(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) && Main.rand.Next(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 (Main.rand.Next(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) && (Main.rand.Next(50) == 0 || Main.expertMode && Main.rand.Next(50) == 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 215); + if ((this.type == 47 || this.type == 464) && Main.rand.Next(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 243); + if ((this.type == 168 || this.type == 470) && Main.rand.Next(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 (Main.rand.Next(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3795); + else if (Main.rand.Next(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 (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2112, pfix: -1); + if (Main.rand.Next(40) == 0 || Main.expertMode && Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1299); + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3097, pfix: -1); + int num3 = 1; + if (Main.expertMode) + num3 = 2; + for (int index7 = 0; index7 < num3; ++index7) + { + 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 (Main.expertMode) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(30, 51)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(30, 51)); + } + if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2104, pfix: -1); + if (Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3060); + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3223); + } + } + 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 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].statLife < Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].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 (Main.expertMode) + { + 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 (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3224); + if (Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 994); + if (Main.rand.Next(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 && Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].statLife < Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].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 (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2108, pfix: -1); + int Type3 = Main.rand.Next(3); + switch (Type3) + { + case 0: + Type3 = 1121; + break; + case 1: + Type3 = 1123; + break; + case 2: + Type3 = 2888; + break; + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type3, pfix: -1); + if (Main.expertMode) + { + int Type4 = Main.rand.Next(3); + switch (Type4) + { + case 0: + Type4 = 1121; + break; + case 1: + Type4 = 1123; + break; + case 2: + Type4 = 2888; + break; + } + while (Type4 == Type3) + { + Type4 = Main.rand.Next(3); + switch (Type4) + { + case 0: + Type4 = 1121; + continue; + case 1: + Type4 = 1123; + continue; + case 2: + Type4 = 2888; + continue; + default: + continue; + } + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type4, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1132, pfix: -1); + } + else if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1132, pfix: -1); + if (Main.expertMode && Main.rand.Next(15) == 0 || Main.rand.Next(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1170); + if (Main.expertMode && Main.rand.Next(20) == 0 || Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2502); + if (Main.expertMode) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1129); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(842, 845)); + } + else 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 || Main.expertMode) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1130, Main.rand.Next(10, 30)); + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1130, Main.rand.Next(10, 30)); + } + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2431, Main.rand.Next(44, 67)); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2431, Main.rand.Next(16, 27)); + } + NPC.downedQueenBee = true; + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 35) + { + if (Main.expertMode) + this.DropBossBags(); + else if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1281, pfix: -1); + else if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1273, pfix: -1); + else if (Main.rand.Next(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 (Main.rand.Next(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.expertMode) + { + 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); + 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; + } + } + else if (Main.rand.Next(2) == 0) + { + int num5 = Main.rand.Next(4); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, num5 != 3 ? 489 + num5 : 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) + { + int num6 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num7 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + int num8 = this.width / 2 / 16 + 1; + for (int index8 = num6 - num8; index8 <= num6 + num8; ++index8) + { + for (int index9 = num7 - num8; index9 <= num7 + num8; ++index9) + { + if ((index8 == num6 - num8 || index8 == num6 + num8 || index9 == num7 - num8 || index9 == num7 + num8) && !Main.tile[index8, index9].active()) + { + Main.tile[index8, index9].type = WorldGen.crimson ? (ushort) 347 : (ushort) 140; + Main.tile[index8, index9].active(true); + } + Main.tile[index8, index9].lava(false); + Main.tile[index8, index9].liquid = (byte) 0; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index8, index9, 1); + else + WorldGen.SquareTileFrame(index8, index9); + } + } + } + } + if (this.type == 439) + { + NPC.downedAncientCultist = true; + if (Main.rand.Next(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.downedMoonlord = true; + NPC.LunarApocalypseIsUp = false; + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3373, 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, 3546, 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 num9 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num9 = (int) ((double) num9 * 1.5); + for (int index10 = 0; index10 < num9; ++index10) + 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 num10 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num10 = (int) ((double) num10 * 1.5); + for (int index11 = 0; index11 < num10; ++index11) + 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 num11 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num11 = (int) ((double) num11 * 1.5); + for (int index12 = 0; index12 < num11; ++index12) + 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 num12 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num12 = (int) ((double) num12 * 1.5); + for (int index13 = 0; index13 < num12; ++index13) + 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 (Main.rand.Next(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 383: + case 386: + case 389: + if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2806); + if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2807); + if (Main.rand.Next(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 (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2803); + if (Main.rand.Next(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2804); + if (Main.rand.Next(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, 2798, 2796, 2882, 2880, 2769, 2800)); + if (this.type == 390 && Main.rand.Next(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 (Main.rand.Next(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 == 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 && Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3187 + Main.rand.Next(3)); + 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 (Main.rand.Next(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 118); + else if (this.type == 44) + { + if (Main.rand.Next(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 (Main.rand.Next(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2430); + if (Main.rand.Next(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.downedSlimeKing = true; + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 23 && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 116); + if (this.type == 24 && Main.rand.Next(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) + { + if (Main.rand.Next(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 932); + else if (Main.rand.Next(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3095); + else if (Main.rand.Next(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 (Main.rand.Next(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 && Main.rand.Next(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 && (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 == 65) + { + if (Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 268); + 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 && Main.rand.Next(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 (Main.rand.Next(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + if (Main.rand.Next(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 (Main.rand.Next(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + if (Main.rand.Next(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 (Main.rand.Next(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 (Main.rand.Next(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 (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2109, pfix: -1); + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1141, Main.rand.Next(2, 4), pfix: -1); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1141, pfix: -1); + if (Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1182, pfix: -1); + if (Main.rand.Next(50) == 0 || Main.expertMode && Main.rand.Next(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1305, pfix: -1); + if (Main.rand.Next(4) == 0 || Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1157, pfix: -1); + if (Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3021, pfix: -1); + int num13 = 1; + if (Main.expertMode) + num13 = 2; + int num14 = 0; + for (int index14 = 0; index14 < num13; ++index14) + { + int num15 = Main.rand.Next(7); + if (!NPC.downedPlantBoss) + num15 = 0; + if (index14 == 0) + { + num14 = num15; + } + else + { + while (num14 == num15) + num15 = Main.rand.Next(7); + } + switch (num15) + { + 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 num16 = NPC.downedPlantBoss ? 1 : 0; + NPC.downedPlantBoss = true; + if (num16 == 0) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[33].Value, (byte) 50, B: (byte) 130); + break; + case 2: + NetMessage.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) && Main.rand.Next(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.downedBoss1 = true; + else if (this.type == 13 || this.type == 14 || this.type == 15) + NPC.downedBoss2 = true; + else if (this.type == 266) + NPC.downedBoss2 = true; + else if (this.type == 35) + NPC.downedBoss3 = true; + if (this.type == (int) sbyte.MaxValue) + { + NPC.downedMechBoss3 = true; + NPC.downedMechBossAny = true; + } + if (this.type == 134) + { + NPC.downedMechBoss1 = true; + 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 = 499; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + int num17 = Main.rand.Next(5) + 5; + for (int index15 = 0; index15 < num17; ++index15) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 125 || this.type == 126) + { + NPC.downedMechBoss2 = true; + 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: + NetMessage.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: + NetMessage.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: + NetMessage.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; + WorldGen.StartHardmode(); + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && !hardMode) + { + if (Main.netMode == 0) + Main.NewText(Lang.misc[32].Value, (byte) 50, B: (byte) 130); + else if (Main.netMode == 2) + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + } + } + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (!flag1 && 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: + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + if (this.type != 16 && this.type != 81 && this.type != 121 && Main.rand.Next(6) == 0 && this.lifeMax > 1 && this.damage > 0) + { + int closest = (int) Player.FindClosest(this.position, this.width, this.height); + if (Main.rand.Next(2) == 0 && Main.player[closest].statMana < Main.player[closest].statManaMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 184); + else if (Main.rand.Next(2) == 0 && Main.player[closest].statLife < Main.player[closest].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 && Main.rand.Next(2) == 0 && this.lifeMax > 1 && this.damage > 0) + { + int closest = (int) Player.FindClosest(this.position, this.width, this.height); + if (Main.player[closest].statMana < Main.player[closest].statManaMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 184); + } + float num18 = this.value; + if (this.midas) + num18 *= (float) (1.0 + (double) Main.rand.Next(10, 50) * 0.00999999977648258); + float num19 = num18 * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + if (Main.rand.Next(5) == 0) + num19 *= (float) (1.0 + (double) Main.rand.Next(5, 11) * 0.00999999977648258); + if (Main.rand.Next(10) == 0) + num19 *= (float) (1.0 + (double) Main.rand.Next(10, 21) * 0.00999999977648258); + if (Main.rand.Next(15) == 0) + num19 *= (float) (1.0 + (double) Main.rand.Next(15, 31) * 0.00999999977648258); + if (Main.rand.Next(20) == 0) + num19 *= (float) (1.0 + (double) Main.rand.Next(20, 41) * 0.00999999977648258); + float num20 = num19 + this.extraValue; + while ((int) num20 > 0) + { + if ((double) num20 > 1000000.0) + { + int Stack = (int) ((double) num20 / 1000000.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; + num20 -= (float) (1000000 * Stack); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 74, Stack); + } + else if ((double) num20 > 10000.0) + { + int Stack = (int) ((double) num20 / 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; + num20 -= (float) (10000 * Stack); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Stack); + } + else if ((double) num20 > 100.0) + { + int Stack = (int) ((double) num20 / 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; + num20 -= (float) (100 * Stack); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 72, Stack); + } + else + { + int Stack = (int) num20; + 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; + num20 -= (float) Stack; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 71, Stack); + } + } + } + + 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.itemLockoutTime[number] = 54000; + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if ((this.playerInteraction[remoteClient] || !interactionRequired) && Main.player[remoteClient].active) + 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 >= 580 || !Main.npcCatchable[Type] || !NPC.CanReleaseNPCs(who)) + return; + if (Type == 148) + { + int Type1 = Type + Main.rand.Next(2); + int index = NPC.NewNPC(x, y, Type1); + Main.npc[index].releaseOwner = (short) who; + } + else + { + int index = NPC.NewNPC(x, y, Type); + if (Type == 356) + Main.npc[index].ai[2] = (float) Style; + Main.npc[index].releaseOwner = (short) who; + } + } + } + + 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.activeNPCs > (double) num1) + return; + int maxValue1 = 45 + (int) (450.0 * (double) (player.activeNPCs / 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 void SpawnNPC() + { + if (NPC.noSpawnCycle) + { + NPC.noSpawnCycle = false; + } + else + { + bool flag1 = false; + bool flag2 = false; + int index1 = 0; + int y = 0; + int num1 = 0; + int num2 = 0; + for (int index2 = 0; index2 < (int) byte.MaxValue; ++index2) + { + if (Main.player[index2].active) + ++num2; + } + for (int plr = 0; plr < (int) byte.MaxValue; ++plr) + { + if (Main.player[plr].active && !Main.player[plr].dead) + { + if (Main.slimeRain) + NPC.SlimeRainSpawns(plr); + 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 = NPC.downedPlantBoss && Main.hardMode; + if (Main.player[plr].active && Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0 && (double) Main.player[plr].position.Y < Main.worldSurface * 16.0 + (double) NPC.sHeight) + { + int num3 = 3000; + if ((double) Main.player[plr].position.X > Main.invasionX * 16.0 - (double) num3 && (double) Main.player[plr].position.X < Main.invasionX * 16.0 + (double) num3) + flag5 = true; + else if (Main.invasionX >= (double) (Main.maxTilesX / 2 - 5) && Main.invasionX <= (double) (Main.maxTilesX / 2 + 5)) + { + for (int index3 = 0; index3 < 200; ++index3) + { + if (Main.npc[index3].townNPC && (double) Math.Abs(Main.player[plr].position.X - Main.npc[index3].Center.X) < (double) num3) + { + if (Main.rand.Next(3) == 0) + { + flag5 = true; + break; + } + break; + } + } + } + } + if (Main.player[plr].ZoneTowerSolar || Main.player[plr].ZoneTowerNebula || Main.player[plr].ZoneTowerVortex || Main.player[plr].ZoneTowerStardust) + flag5 = true; + bool flag14 = 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[plr].position.Y > (double) ((Main.maxTilesY - 200) * 16)) + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 2.0); + else if ((double) Main.player[plr].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[plr].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[plr].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[plr].ZoneSnow && (double) Main.player[plr].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.player[plr].ZoneDungeon) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.70000004768372); + } + else if (Main.player[plr].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[plr].ZoneUndergroundDesert) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * (Main.hardMode ? 0.200000002980232 : 0.300000011920929)); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 2.0); + } + else if (Main.player[plr].ZoneJungle) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.5); + } + else if (Main.player[plr].ZoneCorrupt || Main.player[plr].ZoneCrimson) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.65); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.29999995231628); + } + else if (Main.player[plr].ZoneMeteor) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.10000002384186); + } + if (Main.player[plr].ZoneHoly && (double) Main.player[plr].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.wof >= 0 && (double) Main.player[plr].position.Y > (double) ((Main.maxTilesY - 200) * 16)) + { + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.300000011920929); + NPC.spawnRate *= 3; + } + if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.2) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.600000023841858); + else if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.4) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.699999988079071); + else if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.6) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.800000011920929); + else if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.8) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.899999976158142); + if ((double) Main.player[plr].position.Y / 16.0 > (Main.worldSurface + Main.rockLayer) / 2.0 || Main.player[plr].ZoneCorrupt || Main.player[plr].ZoneCrimson) + { + if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.2) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.699999988079071); + else if ((double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns * 0.4) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.899999976158142); + } + if (Main.player[plr].calmed) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.29999995231628); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.699999988079071); + } + if (Main.player[plr].sunflower) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.20000004768372); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.800000011920929); + } + if (Main.player[plr].enemySpawns) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.5); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 2.0); + } + if (Main.player[plr].ZoneWaterCandle || Main.player[plr].inventory[Main.player[plr].selectedItem].type == 148) + { + if (!Main.player[plr].ZonePeaceCandle && Main.player[plr].inventory[Main.player[plr].selectedItem].type != 3117) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.75); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.5); + } + } + else if (Main.player[plr].ZonePeaceCandle || Main.player[plr].inventory[Main.player[plr].selectedItem].type == 3117) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.3); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.699999988079071); + } + if (Main.player[plr].ZoneWaterCandle && (double) Main.player[plr].position.Y / 16.0 < Main.worldSurface * 0.349999994039536) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.5); + 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.pumpkinMoon || Main.snowMoon) && (double) Main.player[plr].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[plr].ZoneOldOneArmy) + { + NPC.maxSpawns = NPC.defaultMaxSpawns; + NPC.spawnRate = NPC.defaultSpawnRate; + } + if (flag5) + { + NPC.maxSpawns = (int) ((double) NPC.defaultMaxSpawns * (2.0 + 0.3 * (double) num2)); + NPC.spawnRate = 20; + } + if (Main.player[plr].ZoneDungeon && !NPC.downedBoss3) + NPC.spawnRate = 10; + if (!flag5 && (!Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon || Main.dayTime) && (!Main.eclipse || !Main.dayTime) && !Main.player[plr].ZoneDungeon && !Main.player[plr].ZoneCorrupt && !Main.player[plr].ZoneCrimson && !Main.player[plr].ZoneMeteor && !Main.player[plr].ZoneOldOneArmy) + { + if ((double) Main.player[plr].Center.Y / 16.0 > (double) (Main.maxTilesY - 200)) + { + if ((double) Main.player[plr].townNPCs == 1.0) + { + if (Main.rand.Next(2) == 0) + flag4 = true; + if (Main.rand.Next(10) == 0) + { + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.25); + } + else if ((double) Main.player[plr].townNPCs == 2.0) + { + if (Main.rand.Next(4) != 0) + flag4 = true; + if (Main.rand.Next(5) == 0) + { + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.5); + } + else if ((double) Main.player[plr].townNPCs >= 3.0) + { + if (Main.rand.Next(10) != 0) + flag4 = true; + if (Main.rand.Next(3) == 0) + { + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 2.0); + } + } + else if ((double) Main.player[plr].townNPCs == 1.0) + { + flag4 = true; + if (Main.rand.Next(3) == 1) + { + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 2.0); + } + else if ((double) Main.player[plr].townNPCs == 2.0) + { + flag4 = true; + if (Main.rand.Next(3) != 0) + { + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 3.0); + } + else if ((double) Main.player[plr].townNPCs >= 3.0) + { + flag4 = true; + if (!Main.expertMode || Main.rand.Next(30) != 0) + flag11 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + } + int index4 = (int) ((double) Main.player[plr].position.X + (double) (Main.player[plr].width / 2)) / 16; + int index5 = (int) ((double) Main.player[plr].position.Y + (double) (Main.player[plr].height / 2)) / 16; + if (Main.wallHouse[(int) Main.tile[index4, index5].wall]) + flag4 = true; + if (Main.tile[index4, index5].wall == (byte) 87) + flag3 = true; + bool flag15 = false; + if (Main.player[plr].active && !Main.player[plr].dead && (double) Main.player[plr].activeNPCs < (double) NPC.maxSpawns && Main.rand.Next(NPC.spawnRate) == 0) + { + 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[plr].inventory[Main.player[plr].selectedItem].type == 1254 || Main.player[plr].inventory[Main.player[plr].selectedItem].type == 1299 || Main.player[plr].scope) + { + float num4 = 1.5f; + if (Main.player[plr].inventory[Main.player[plr].selectedItem].type == 1254 && Main.player[plr].scope) + num4 = 1.25f; + else if (Main.player[plr].inventory[Main.player[plr].selectedItem].type == 1254) + num4 = 1.5f; + else if (Main.player[plr].inventory[Main.player[plr].selectedItem].type == 1299) + num4 = 1.5f; + else if (Main.player[plr].scope) + num4 = 2f; + NPC.spawnRangeX += (int) ((double) (NPC.sWidth / 16) * 0.5 / (double) num4); + NPC.spawnRangeY += (int) ((double) (NPC.sHeight / 16) * 0.5 / (double) num4); + NPC.safeRangeX += (int) ((double) (NPC.sWidth / 16) * 0.5 / (double) num4); + NPC.safeRangeY += (int) ((double) (NPC.sHeight / 16) * 0.5 / (double) num4); + } + int minValue1 = (int) ((double) Main.player[plr].position.X / 16.0) - NPC.spawnRangeX; + int maxValue1 = (int) ((double) Main.player[plr].position.X / 16.0) + NPC.spawnRangeX; + int minValue2 = (int) ((double) Main.player[plr].position.Y / 16.0) - NPC.spawnRangeY; + int maxValue2 = (int) ((double) Main.player[plr].position.Y / 16.0) + NPC.spawnRangeY; + int num5 = (int) ((double) Main.player[plr].position.X / 16.0) - NPC.safeRangeX; + int num6 = (int) ((double) Main.player[plr].position.X / 16.0) + NPC.safeRangeX; + int num7 = (int) ((double) Main.player[plr].position.Y / 16.0) - NPC.safeRangeY; + int num8 = (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 index6 = 0; index6 < 50; ++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]) + { + if (!flag5 && (double) index8 < Main.worldSurface * 0.349999994039536 && !flag11 && ((double) index7 < (double) Main.maxTilesX * 0.45 || (double) index7 > (double) Main.maxTilesX * 0.55 || Main.hardMode)) + { + num1 = (int) Main.tile[index7, index8].type; + index1 = index7; + y = index8; + flag14 = true; + flag2 = true; + } + else if (!flag5 && (double) index8 < Main.worldSurface * 0.449999988079071 && !flag11 && Main.hardMode && Main.rand.Next(10) == 0) + { + num1 = (int) Main.tile[index7, index8].type; + index1 = index7; + y = index8; + flag14 = true; + flag2 = true; + } + else + { + for (int index9 = index8; index9 < Main.maxTilesY; ++index9) + { + if (Main.tile[index7, index9].nactive() && Main.tileSolid[(int) Main.tile[index7, index9].type]) + { + if (index7 < num5 || index7 > num6 || index9 < num7 || index9 > num8) + { + num1 = (int) Main.tile[index7, index9].type; + index1 = index7; + y = index9; + flag14 = true; + break; + } + break; + } + } + } + if (flag14) + { + int num9 = index1 - NPC.spawnSpaceX / 2; + int num10 = index1 + NPC.spawnSpaceX / 2; + int num11 = y - NPC.spawnSpaceY; + int num12 = y; + if (num9 < 0) + flag14 = false; + if (num10 > Main.maxTilesX) + flag14 = false; + if (num11 < 0) + flag14 = false; + if (num12 > Main.maxTilesY) + flag14 = false; + if (flag14) + { + for (int index10 = num9; index10 < num10; ++index10) + { + for (int index11 = num11; index11 < num12; ++index11) + { + if (Main.tile[index10, index11].nactive() && Main.tileSolid[(int) Main.tile[index10, index11].type]) + { + flag14 = false; + break; + } + if (Main.tile[index10, index11].lava()) + { + flag14 = false; + break; + } + } + } + } + if (index1 >= num5 && index1 <= num6) + flag15 = true; + } + } + else + continue; + } + if (flag14 || flag14) + break; + } + } + if (flag14) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(index1 * 16, y * 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)) + flag14 = false; + } + } + } + if (flag14) + { + if (Main.player[plr].ZoneDungeon && (!Main.tileDungeon[(int) Main.tile[index1, y].type] || Main.tile[index1, y - 1].wall == (byte) 0)) + flag14 = false; + if (Main.tile[index1, y - 1].liquid > (byte) 0 && Main.tile[index1, y - 2].liquid > (byte) 0 && !Main.tile[index1, y - 1].lava()) + { + if (Main.tile[index1, y - 1].honey()) + flag7 = true; + else + flag6 = true; + } + int index13 = (int) Main.player[plr].Center.X / 16; + int index14 = (int) ((double) Main.player[plr].Bottom.Y + 8.0) / 16; + if (Main.tile[index1, y].type == (ushort) 367) + flag9 = true; + else if (Main.tile[index1, y].type == (ushort) 368) + flag8 = true; + else if (Main.tile[index13, index14].type == (ushort) 367) + flag9 = true; + else if (Main.tile[index13, index14].type == (ushort) 368) + { + flag8 = true; + } + else + { + int num13 = Main.rand.Next(20, 31); + int num14 = Main.rand.Next(1, 4); + if (index1 - num13 < 0) + num13 = index1; + if (y - num13 < 0) + num13 = y; + if (index1 + num13 >= Main.maxTilesX) + num13 = Main.maxTilesX - index1 - 1; + if (y + num13 >= Main.maxTilesY) + num13 = Main.maxTilesY - y - 1; + for (int index15 = index1 - num13; index15 <= index1 + num13; index15 += num14) + { + int num15 = Main.rand.Next(1, 4); + for (int index16 = y - num13; index16 <= y + num13; index16 += num15) + { + if (Main.tile[index15, index16].type == (ushort) 367) + flag9 = true; + if (Main.tile[index15, index16].type == (ushort) 368) + flag8 = true; + } + } + int num16 = Main.rand.Next(30, 61); + int num17 = Main.rand.Next(3, 7); + if (index13 - num16 < 0) + num16 = index13; + if (index14 - num16 < 0) + num16 = index14; + if (index13 + num16 >= Main.maxTilesX) + num16 = Main.maxTilesX - index13 - 2; + if (index14 + num16 >= Main.maxTilesY) + num16 = Main.maxTilesY - index14 - 2; + for (int index17 = index13 - num16; index17 <= index13 + num16; index17 += num17) + { + int num18 = Main.rand.Next(3, 7); + for (int index18 = index14 - num16; index18 <= index14 + num16; index18 += num18) + { + if (Main.tile[index17, index18].type == (ushort) 367) + flag9 = true; + if (Main.tile[index17, index18].type == (ushort) 368) + flag8 = true; + } + } + } + } + if (flag7) + flag14 = false; + if (flag14) + { + if ((double) y > Main.rockLayer && y < Main.maxTilesY - 200 && !Main.player[plr].ZoneDungeon && !flag5) + { + if (Main.rand.Next(3) == 0) + { + int num19 = Main.rand.Next(5, 15); + if (index1 - num19 >= 0 && index1 + num19 < Main.maxTilesX) + { + for (int index19 = index1 - num19; index19 < index1 + num19; ++index19) + { + for (int index20 = y - num19; index20 < y + num19; ++index20) + { + if (Main.tile[index19, index20].wall == (byte) 62) + flag10 = true; + } + } + } + } + else + { + int index21 = (int) Main.player[plr].position.X / 16; + int index22 = (int) Main.player[plr].position.Y / 16; + if (Main.tile[index21, index22].wall == (byte) 62) + flag10 = true; + } + } + if ((double) y < Main.rockLayer && y > 200 && !Main.player[plr].ZoneDungeon && !flag5) + { + if (Main.rand.Next(3) == 0) + { + int num20 = Main.rand.Next(5, 15); + if (index1 - num20 >= 0 && index1 + num20 < Main.maxTilesX) + { + for (int index23 = index1 - num20; index23 < index1 + num20; ++index23) + { + for (int index24 = y - num20; index24 < y + num20; ++index24) + { + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index23, index24].wall] || WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index23, index24].wall]) + flag12 = true; + } + } + } + } + else + { + int index25 = (int) Main.player[plr].position.X / 16; + int index26 = (int) Main.player[plr].position.Y / 16; + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index25, index26].wall] || WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index25, index26].wall]) + flag12 = true; + } + } + flag1 = false; + int type = (int) Main.tile[index1, y].type; + int newNPC = 200; + if (Main.player[plr].ZoneTowerNebula) + { + bool flag16 = true; + int Type = 0; + while (flag16) + { + Type = Utils.SelectRandom(Main.rand, 424, 424, 424, 423, 423, 423, 421, 421, 421, 421, 421, 420); + flag16 = false; + if (Type == 424 && NPC.CountNPCS(Type) >= 2) + flag16 = true; + if (Type == 423 && NPC.CountNPCS(Type) >= 3) + flag16 = true; + if (Type == 420 && NPC.CountNPCS(Type) >= 2) + flag16 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type, 1); + } + else if (Main.player[plr].ZoneTowerVortex) + { + bool flag17 = true; + int Type = 0; + while (flag17) + { + Type = Utils.SelectRandom(Main.rand, 429, 429, 429, 429, 427, 427, 425, 425, 426); + flag17 = false; + if (Type == 425 && NPC.CountNPCS(Type) >= 3) + flag17 = true; + if (Type == 426 && NPC.CountNPCS(Type) >= 3) + flag17 = true; + if (Type == 429 && NPC.CountNPCS(Type) >= 4) + flag17 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type, 1); + } + else if (Main.player[plr].ZoneTowerStardust) + { + int Type = Utils.SelectRandom(Main.rand, 411, 411, 411, 409, 409, 407, 402, 405); + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type, 1); + } + else if (Main.player[plr].ZoneTowerSolar) + { + bool flag18 = true; + int Type = 0; + while (flag18) + { + Type = Utils.SelectRandom(Main.rand, 518, 419, 418, 412, 417, 416, 415); + flag18 = false; + if (Type == 415 && NPC.CountNPCS(Type) >= 2) + flag18 = true; + if (Type == 416 && NPC.CountNPCS(Type) >= 1) + flag18 = true; + if (Type == 518 && NPC.CountNPCS(Type) >= 2) + flag18 = true; + if (Type == 412 && NPC.CountNPCS(Type) >= 1) + flag18 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type, 1); + } + else if (flag2) + { + int maxValue3 = 8; + int maxValue4 = 30; + bool flag19 = (double) Math.Abs(index1 - Main.maxTilesX / 2) / (double) (Main.maxTilesX / 2) > 0.330000013113022 && (Main.wallLight[(int) Main.tile[index4, index5].wall] || Main.tile[index4, index5].wall == (byte) 73); + if (flag19 && NPC.AnyDanger()) + flag19 = false; + if (Main.player[plr].ZoneWaterCandle) + { + maxValue3 = 3; + maxValue4 = 10; + } + if (flag5 && Main.invasionType == 4) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 388); + else if (flag19 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(maxValue3) == 0 || Main.rand.Next(maxValue4) == 0) && !NPC.AnyNPCs(399)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 399); + else if (flag19 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(maxValue3) == 0 || Main.rand.Next(maxValue4) == 0) && !NPC.AnyNPCs(399) && (Main.player[plr].inventory[Main.player[plr].selectedItem].type == 148 || Main.player[plr].ZoneWaterCandle)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 399); + else if (Main.hardMode && !NPC.AnyNPCs(87) && !flag4 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 87, 1); + else if (Main.hardMode && !NPC.AnyNPCs(87) && !flag4 && Main.rand.Next(10) == 0 && (Main.player[plr].inventory[Main.player[plr].selectedItem].type == 148 || Main.player[plr].ZoneWaterCandle)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 87, 1); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 48); + } + else if (flag5) + { + switch (Main.invasionType) + { + case 1: + if (Main.hardMode && !NPC.AnyNPCs(471) && Main.rand.Next(30) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 471); + break; + } + if (Main.rand.Next(9) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 29); + break; + } + if (Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 26); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 111); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 27); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 28); + break; + case 2: + if (Main.rand.Next(7) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 145); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 143); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 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, y - 40, y - 10)) + { + NPC.NewNPC(index1 * 16 + 8, (y - 10) * 16, 491); + break; + } + if (Main.rand.Next(30) == 0 && !NPC.AnyNPCs(216)) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 216); + break; + } + if (Main.rand.Next(11) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 215); + break; + } + if (Main.rand.Next(9) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 252); + break; + } + if (Main.rand.Next(7) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 214); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 213); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 212); + break; + case 4: + int Type1 = 0; + int num21 = Main.rand.Next(7); + if (Main.invasionSize <= 100 && Main.rand.Next(10) == 0 && !NPC.AnyNPCs(395)) + Type1 = 395; + else if (num21 >= 6) + { + if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(395)) + { + Type1 = 395; + } + else + { + int num22 = Main.rand.Next(2); + if (num22 == 0) + Type1 = 390; + if (num22 == 1) + Type1 = 386; + } + } + else if (num21 >= 4) + { + int num23 = Main.rand.Next(5); + Type1 = num23 >= 2 ? (num23 >= 4 ? 388 : 381) : 382; + } + else + { + int num24 = Main.rand.Next(4); + if (num24 == 3) + { + if (!NPC.AnyNPCs(520)) + Type1 = 520; + else + num24 = Main.rand.Next(3); + } + if (num24 == 0) + Type1 = 385; + if (num24 == 1) + Type1 = 389; + if (num24 == 2) + Type1 = 383; + } + if (Type1 != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type1, 1); + break; + } + break; + } + } + else if (!NPC.savedBartender && DD2Event.ReadyToFindBartender && !NPC.AnyNPCs(579) && Main.rand.Next(80) == 0 && !flag6) + NPC.NewNPC(index1 * 16 + 8, y * 16, 579); + else if (Main.tile[index1, y].wall == (byte) 62 | flag10) + { + if (Main.tile[index1, y].wall == (byte) 62 && Main.rand.Next(8) == 0 && !flag6 && (double) y >= Main.rockLayer && y < Main.maxTilesY - 210 && !NPC.savedStylist && !NPC.AnyNPCs(354)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 354); + else if (Main.hardMode) + NPC.NewNPC(index1 * 16 + 8, y * 16, 163); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 164); + } + else if (((WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index1, y].wall] ? 1 : (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index1, y].wall] ? 1 : 0)) | (flag12 ? 1 : 0)) != 0 && WorldGen.checkUnderground(index1, y)) + { + if (Main.hardMode && Main.rand.Next(33) == 0 && !flag4 && (double) y > Main.worldSurface + 100.0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 510); + else if (Main.rand.Next(22) == 0 && !flag4 && (double) y > Main.worldSurface + 100.0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 513); + else if (Main.hardMode && Main.rand.Next(5) != 0) + { + List intList = new List(); + if (Main.player[plr].ZoneCorrupt) + { + intList.Add(525); + intList.Add(525); + } + if (Main.player[plr].ZoneCrimson) + { + intList.Add(526); + intList.Add(526); + } + if (Main.player[plr].ZoneHoly) + { + intList.Add(527); + intList.Add(527); + } + if (intList.Count == 0) + { + intList.Add(524); + intList.Add(524); + } + if (Main.player[plr].ZoneCorrupt || Main.player[plr].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, y * 16, Type2); + intList.Clear(); + } + else + { + int Type3 = Utils.SelectRandom(Main.rand, 69, 508, 508, 508, 509); + NPC.NewNPC(index1 * 16 + 8, y * 16, Type3); + } + } + else if (Main.hardMode & flag6 && Main.player[plr].ZoneJungle && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 157); + else if (Main.hardMode & flag6 && Main.player[plr].ZoneCrimson && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 242); + else if (Main.hardMode & flag6 && Main.player[plr].ZoneCrimson && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 241); + else if (flag6 && (index1 < 250 || index1 > Main.maxTilesX - 250) && Main.tileSand[type] && (double) y < Main.rockLayer) + { + bool flag20 = false; + if (!NPC.savedAngler && !NPC.AnyNPCs(376)) + { + int num25 = -1; + for (int j = y - 1; j > y - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num25 = j + 2; + break; + } + } + if (num25 > y) + num25 = y; + if (num25 > 0 && !flag15) + { + NPC.NewNPC(index1 * 16 + 8, num25 * 16, 376); + flag20 = true; + } + } + if (!flag20) + { + if (Main.rand.Next(60) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 220); + else if (Main.rand.Next(25) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 221); + else if (Main.rand.Next(8) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 65); + else if (Main.rand.Next(3) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 67); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 64); + } + } + else if (!flag6 && !NPC.savedAngler && !NPC.AnyNPCs(376) && (index1 < 340 || index1 > Main.maxTilesX - 340) && Main.tileSand[type] && (double) y < Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, y * 16, 376); + else if (flag6 && ((double) y > Main.rockLayer && Main.rand.Next(2) == 0 || type == 60)) + { + if (Main.hardMode && Main.rand.Next(3) > 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 102); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 58); + } + else if (flag6 && (double) y > Main.worldSurface && Main.rand.Next(3) == 0) + { + if (Main.hardMode) + NPC.NewNPC(index1 * 16 + 8, y * 16, 103); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 63); + } + else if (flag6 && Main.rand.Next(4) == 0) + { + if (Main.player[plr].ZoneCorrupt) + NPC.NewNPC(index1 * 16 + 8, y * 16, 57); + else if ((double) y < Main.worldSurface && y > 50 && Main.rand.Next(3) != 0 && Main.dayTime) + { + int num26 = -1; + for (int j = y - 1; j > y - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num26 = j + 2; + break; + } + } + if (num26 > y) + num26 = y; + if (num26 > 0 && !flag15) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, num26 * 16, 362); + else + NPC.NewNPC(index1 * 16 + 8, num26 * 16, 364); + } + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 55); + } + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 55); + } + else if (NPC.downedGoblins && Main.rand.Next(20) == 0 && !flag6 && (double) y >= Main.rockLayer && y < Main.maxTilesY - 210 && !NPC.savedGoblin && !NPC.AnyNPCs(105)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 105); + else if (Main.hardMode && Main.rand.Next(20) == 0 && !flag6 && (double) y >= Main.rockLayer && y < Main.maxTilesY - 210 && !NPC.savedWizard && !NPC.AnyNPCs(106)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 106); + else if (flag11) + { + if (flag6) + { + if ((double) y < Main.worldSurface && y > 50 && Main.rand.Next(3) != 0 && Main.dayTime) + { + int num27 = -1; + for (int j = y - 1; j > y - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num27 = j + 2; + break; + } + } + if (num27 > y) + num27 = y; + if (num27 > 0 && !flag15) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, num27 * 16, 362); + else + NPC.NewNPC(index1 * 16 + 8, num27 * 16, 364); + } + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 55); + } + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 55); + } + else + { + switch (type) + { + case 2: + case 109: + if (Main.raining) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 448); + break; + } + if (Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 357); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 230); + break; + } + if (!Main.dayTime && Main.rand.Next(NPC.fireFlyFriendly) == 0 && (double) y <= Main.worldSurface) + { + int Type4 = 355; + if (type == 109) + Type4 = 358; + NPC.NewNPC(index1 * 16 + 8, y * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, y * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, y * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16 - 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16 + 16, Type4); + break; + } + break; + } + if (Main.dayTime && Main.time < 18000.0 && Main.rand.Next(3) != 0 && (double) y <= Main.worldSurface) + { + int num28 = Main.rand.Next(4); + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 442); + break; + } + switch (num28) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, y * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, y * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, y * 16, 74); + break; + } + } + else + { + if (Main.dayTime && Main.rand.Next(NPC.butterflyChance) == 0 && (double) y <= Main.worldSurface) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 444); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, y * 16, 356); + if (Main.rand.Next(4) == 0) + { + NPC.NewNPC(index1 * 16 + 8 + 16, y * 16, 356); + break; + } + break; + } + if (Main.rand.Next(2) == 0 && (double) y <= Main.worldSurface) + { + int num29 = Main.rand.Next(4); + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 442); + break; + } + switch (num29) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, y * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, y * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, y * 16, 74); + break; + } + } + else + { + if (type == 53) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(366, 368)); + break; + } + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 443); + break; + } + if (Main.rand.Next(NPC.goldCritterChance) == 0 && (double) y <= Main.worldSurface) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 539); + break; + } + if (Main.halloween && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 303); + break; + } + if (Main.xMas && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 337); + break; + } + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 540); + break; + } + if (Main.rand.Next(3) == 0 && (double) y <= Main.worldSurface) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538)); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 46); + break; + } + } + break; + case 60: + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 445); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 361); + break; + case 147: + case 161: + if (Main.rand.Next(2) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 148); + break; + } + NPC.NewNPC(index1 * 16 + 8, y * 16, 149); + break; + default: + if ((double) y <= Main.worldSurface) + return; + goto case 2; + } + } + } + else if (Main.player[plr].ZoneDungeon) + { + int num30 = 0; + if (Main.tile[index1, y].wall == (byte) 94 || Main.tile[index1, y].wall == (byte) 96 || Main.tile[index1, y].wall == (byte) 98) + num30 = 1; + if (Main.tile[index1, y].wall == (byte) 95 || Main.tile[index1, y].wall == (byte) 97 || Main.tile[index1, y].wall == (byte) 99) + num30 = 2; + if (Main.rand.Next(7) == 0) + num30 = Main.rand.Next(3); + if (!NPC.downedBoss3) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 68); + else if (!NPC.savedMech && Main.rand.Next(5) == 0 && !flag6 && !NPC.AnyNPCs(123) && (double) y > Main.rockLayer) + NPC.NewNPC(index1 * 16 + 8, y * 16, 123); + else if (flag13 && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 287); + else if (flag13 && num30 == 0 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 293); + else if (flag13 && num30 == 1 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 291); + else if (flag13 && num30 == 2 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 292); + else if (flag13 && !NPC.AnyNPCs(290) && num30 == 0 && Main.rand.Next(35) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 290); + else if (flag13 && (num30 == 1 || num30 == 2) && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 289); + else if (flag13 && Main.rand.Next(20) == 0) + { + int num31 = 281; + if (num30 == 0) + num31 += 2; + if (num30 == 2) + num31 += 4; + int Type5 = num31 + Main.rand.Next(2); + if (!NPC.AnyNPCs(Type5)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type5); + } + else if (flag13 && Main.rand.Next(3) != 0) + { + int num32 = 269; + if (num30 == 0) + num32 += 4; + if (num30 == 2) + num32 += 8; + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, num32 + Main.rand.Next(4)); + } + else if (Main.rand.Next(37) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 71); + else if (num30 == 1 && Main.rand.Next(4) == 0 && !NPC.NearSpikeBall(index1, y)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 70); + else if (num30 == 2 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 72); + else if (num30 == 0 && Main.rand.Next(9) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 34); + else if (Main.rand.Next(7) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 32); + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 294); + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 295); + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 296); + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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[plr].ZoneMeteor) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 23); + else if (DD2Event.Ongoing && Main.player[plr].ZoneOldOneArmy) + DD2Event.SpawnNPC(ref newNPC); + else if ((double) y <= 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, y * 16, 341); + else if (waveNumber >= 20) + { + switch (Main.rand.Next(3)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 345); + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 346); + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 343) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 343) : NPC.NewNPC(index1 * 16 + 8, y * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 343) : NPC.NewNPC(index1 * 16 + 8, y * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 343) : NPC.NewNPC(index1 * 16 + 8, y * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 343) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 345); + else if (waveNumber == 14) + { + if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(345)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 345); + else if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(346)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 346); + else if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(344)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 344); + else if (Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 350))) : (Main.rand.Next(8) != 0 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 350) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 350) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 342) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 343)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 347) : NPC.NewNPC(index1 * 16 + 8, y * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 343)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 345)); + } + else if ((double) y <= Main.worldSurface && !Main.dayTime && Main.pumpkinMoon) + { + int waveNumber = NPC.waveNumber; + int num33; + if (NPC.waveNumber >= 15) + { + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 325) : NPC.NewNPC(index1 * 16 + 8, y * 16, 327); + } + else + { + switch (waveNumber) + { + case 2: + newNPC = Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 326); + break; + case 3: + newNPC = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 326) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 326) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325)) : NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 326) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 327); + break; + case 11: + if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(327)) + num33 = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325); + break; + case 12: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(327) < 2) + num33 = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 326) : NPC.NewNPC(index1 * 16 + 8, y * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325); + break; + case 13: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(327) < 2) + num33 = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 329) : NPC.NewNPC(index1 * 16 + 8, y * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325); + break; + case 14: + newNPC = Main.rand.Next(5) != 0 || NPC.CountNPCS(327) >= 3 ? (Main.rand.Next(5) != 0 || NPC.CountNPCS(325) >= 3 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 315) : NPC.NewNPC(index1 * 16 + 8, y * 16, 325)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 327); + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(305, 315)); + break; + } + } + } + else if ((double) y <= Main.worldSurface && Main.dayTime && Main.eclipse) + { + bool flag21 = false; + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + flag21 = true; + newNPC = !flag21 || 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 ? (!flag21 || 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, y * 16, 166) : NPC.NewNPC(index1 * 16 + 8, y * 16, 462)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 461)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 162)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 460)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 468)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 469)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 253)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 159)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 467)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 463)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 466)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 251)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 477); + } + else if (((!Main.hardMode ? 0 : (num1 == 70 ? 1 : 0)) & (flag6 ? 1 : 0)) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 256); + else if (num1 == 70 && (double) y <= 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, y * 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, y * 16, 260); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 259); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 258) : NPC.NewNPC(index1 * 16 + 8, y * 16, 257); + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, (int) byte.MaxValue) : NPC.NewNPC(index1 * 16 + 8, y * 16, 254); + } + else if (num1 == 70 && Main.hardMode && (double) y >= Main.worldSurface && Main.rand.Next(3) != 0) + { + if (Main.hardMode && Main.rand.Next(5) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 374); + else if (!Main.hardMode && Main.rand.Next(4) == 0 || Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 360); + else if (Main.rand.Next(4) == 0) + { + if (Main.hardMode && Main.rand.Next(3) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 260); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 259); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 258) : NPC.NewNPC(index1 * 16 + 8, y * 16, 257); + } + else if (Main.player[plr].ZoneCorrupt && Main.rand.Next(65) == 0 && !flag4) + newNPC = !Main.hardMode || Main.rand.Next(4) == 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 7, 1) : NPC.NewNPC(index1 * 16 + 8, y * 16, 98, 1); + else if (Main.hardMode && (double) y > Main.worldSurface && Main.rand.Next(75) == 0) + newNPC = Main.rand.Next(2) != 0 || !Main.player[plr].ZoneCorrupt || NPC.AnyNPCs(473) ? (Main.rand.Next(2) != 0 || !Main.player[plr].ZoneCrimson || NPC.AnyNPCs(474) ? (Main.rand.Next(2) != 0 || !Main.player[plr].ZoneHoly || NPC.AnyNPCs(475) ? NPC.NewNPC(index1 * 16 + 8, y * 16, 85) : NPC.NewNPC(index1 * 16 + 8, y * 16, 475)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 474)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 473); + else if (Main.hardMode && Main.tile[index1, y - 1].wall == (byte) 2 && Main.rand.Next(20) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 85); + else if (Main.hardMode && (double) y <= Main.worldSurface && !Main.dayTime && (Main.rand.Next(20) == 0 || Main.rand.Next(5) == 0 && Main.moonPhase == 4)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 82); + else if (Main.hardMode && Main.halloween && (double) y <= Main.worldSurface && !Main.dayTime && Main.rand.Next(10) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 304); + else if (type == 60 && Main.rand.Next(500) == 0 && !Main.dayTime) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 52); + else if (type == 60 && (double) y > Main.worldSurface && Main.rand.Next(60) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 219); + else if ((double) y > Main.worldSurface && y < Main.maxTilesY - 210 && !Main.player[plr].ZoneSnow && !Main.player[plr].ZoneCrimson && !Main.player[plr].ZoneCorrupt && !Main.player[plr].ZoneJungle && !Main.player[plr].ZoneHoly && Main.rand.Next(8) == 0) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 448); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 357); + } + else if ((double) y > Main.worldSurface && y < Main.maxTilesY - 210 && !Main.player[plr].ZoneSnow && !Main.player[plr].ZoneCrimson && !Main.player[plr].ZoneCorrupt && !Main.player[plr].ZoneJungle && !Main.player[plr].ZoneHoly && Main.rand.Next(13) == 0) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 447); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 300); + } + else if ((double) y > Main.worldSurface && (double) y < (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && !Main.player[plr].ZoneSnow && !Main.player[plr].ZoneCrimson && !Main.player[plr].ZoneCorrupt && !Main.player[plr].ZoneHoly && Main.rand.Next(13) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 359); + else if ((double) y < Main.worldSurface && Main.player[plr].ZoneJungle && Main.rand.Next(9) == 0) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 445); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 361); + } + else if (type == 60 && Main.hardMode && Main.rand.Next(3) != 0) + { + if ((double) y < Main.worldSurface && !Main.dayTime && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 152); + else if ((double) y < Main.worldSurface && Main.dayTime && Main.rand.Next(4) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 177); + else if ((double) y > Main.worldSurface && Main.rand.Next(100) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 205); + else if ((double) y > Main.worldSurface && Main.rand.Next(5) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 236); + else if ((double) y > Main.worldSurface && Main.rand.Next(4) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 175); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + else + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 153); + } + else if (type == 226 & flag3) + newNPC = Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 198) : NPC.NewNPC(index1 * 16 + 8, y * 16, 226); + else if (type == 60 && (double) y > (Main.worldSurface + Main.rockLayer) / 2.0) + { + if (Main.rand.Next(4) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 204); + else if (Main.rand.Next(4) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 43); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + else + { + switch (Main.rand.Next(8)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 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, y * 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, y * 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, y * 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, y * 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 (type == 60 && Main.rand.Next(4) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 51); + else if (type == 60 && Main.rand.Next(8) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 56); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + Main.npc[newNPC].netUpdate = true; + } + else if (Sandstorm.Happening && Main.player[plr].ZoneSandstorm && TileID.Sets.Conversion.Sand[type] && NPC.Spawning_SandstoneCheck(index1, y)) + { + if (!NPC.downedBoss1 && !Main.hardMode) + newNPC = Main.rand.Next(2) != 0 ? (Main.rand.Next(2) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 69) : NPC.NewNPC(index1 * 16 + 8, y * 16, 61)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 508)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 546); + else if (Main.hardMode && Main.rand.Next(20) == 0 && !NPC.AnyNPCs(541)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 541); + else if (Main.hardMode && !flag4 && Main.rand.Next(3) == 0 && NPC.CountNPCS(510) < 4) + newNPC = NPC.NewNPC(index1 * 16 + 8, (y + 10) * 16, 510); + else if (Main.hardMode && !flag4 && Main.rand.Next(2) == 0) + { + int Type6 = 542; + if (TileID.Sets.Corrupt[type]) + Type6 = 543; + if (TileID.Sets.Crimson[type]) + Type6 = 544; + if (TileID.Sets.Hallow[type]) + Type6 = 545; + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Type6); + } + else + newNPC = !Main.hardMode || type != 53 || Main.rand.Next(3) != 0 ? (!Main.hardMode || type != 112 && type != 234 || Main.rand.Next(3) != 0 ? (!Main.hardMode || type != 116 || Main.rand.Next(3) != 0 ? (Main.rand.Next(2) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 509) : NPC.NewNPC(index1 * 16 + 8, y * 16, 508)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 546)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 80)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 79)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 78); + } + else if (Main.hardMode && type == 53 && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 78); + else if (Main.hardMode && (type == 112 || type == 234) && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 79); + else if (Main.hardMode && type == 116 && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 80); + else if (Main.hardMode && !flag6 && (double) y < Main.rockLayer && (type == 116 || type == 117 || type == 109 || type == 164)) + newNPC = Main.dayTime || Main.rand.Next(2) != 0 ? (Main.rand.Next(10) == 0 || Main.player[plr].ZoneWaterCandle && Main.rand.Next(10) == 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 86) : NPC.NewNPC(index1 * 16 + 8, y * 16, 75)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 122); + else if (!flag4 && Main.hardMode && Main.rand.Next(50) == 0 && !flag6 && (double) y >= Main.rockLayer && (type == 116 || type == 117 || type == 109 || type == 164)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 84); + else if (type == 204 && Main.player[plr].ZoneCrimson || type == 199 || type == 200 || type == 203 || type == 234) + { + if (Main.hardMode && (double) y >= Main.rockLayer && Main.rand.Next(5) == 0 && !flag4) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 182); + else if (Main.hardMode && (double) y >= Main.rockLayer && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 268); + else if (Main.hardMode && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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) y >= Main.rockLayer && Main.rand.Next(40) == 0 && !flag4) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 179); + else if (Main.hardMode && (Main.rand.Next(2) == 0 || (double) y > Main.worldSurface)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 174); + else if (Main.tile[index1, y].wall > (byte) 0 && Main.rand.Next(4) != 0 || Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 239); + else if (Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 181); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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 (type == 22 && Main.player[plr].ZoneCorrupt || type == 23 || type == 25 || type == 112 || type == 163) + { + if (Main.hardMode && (double) y >= Main.rockLayer && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 101); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) y; + 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, y * 16, 81) : NPC.NewNPC(index1 * 16 + 8, y * 16, 121); + else if (Main.hardMode && (double) y >= Main.rockLayer && Main.rand.Next(40) == 0 && !flag4) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 83); + else if (Main.hardMode && (Main.rand.Next(2) == 0 || (double) y > Main.rockLayer)) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 94); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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) y <= Main.worldSurface) + { + bool flag22 = (double) Math.Abs(index1 - Main.maxTilesX / 2) / (double) (Main.maxTilesX / 2) > 0.330000013113022; + if (flag22 && NPC.AnyDanger()) + flag22 = false; + if (Main.player[plr].ZoneSnow && Main.hardMode && (double) Main.cloudAlpha > 0.0 && !NPC.AnyNPCs(243) && Main.rand.Next(20) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 243); + else if (Main.player[plr].ZoneHoly && Main.hardMode && (double) Main.cloudAlpha > 0.0 && !NPC.AnyNPCs(244) && Main.rand.Next(20) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 244); + else if (!Main.player[plr].ZoneSnow && Main.hardMode && (double) Main.cloudAlpha > 0.0 && NPC.CountNPCS(250) < 2 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 250); + else if (flag22 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(100) == 0 || Main.rand.Next(400) == 0) && !NPC.AnyNPCs(399)) + NPC.NewNPC(index1 * 16 + 8, y * 16, 399); + else if (Main.dayTime) + { + int num34 = Math.Abs(index1 - Main.spawnTileX); + if (num34 < Main.maxTilesX / 3 && Main.rand.Next(15) == 0 && (type == 2 || type == 109 || type == 147 || type == 161)) + { + if (type == 147 || type == 161) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 148); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 149); + } + else if (Main.dayTime && Main.rand.Next(NPC.butterflyChance) == 0 && (double) y <= Main.worldSurface) + { + if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 444); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, y * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, y * 16, 356); + } + else if (Main.rand.Next(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 443); + else if (Main.rand.Next(NPC.goldCritterChance) == 0 && (double) y <= Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, y * 16, 539); + else if (Main.halloween && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 303); + else if (Main.xMas && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 337); + else if (BirthdayParty.PartyIsUp && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, y * 16, 540); + else if (Main.rand.Next(3) == 0 && (double) y <= Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, y * 16, (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538)); + else + NPC.NewNPC(index1 * 16 + 8, y * 16, 46); + } + else if (num34 < Main.maxTilesX / 3 && Main.rand.Next(15) == 0 && type == 53) + NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(366, 368)); + else if (num34 < Main.maxTilesX / 3 && Main.dayTime && Main.time < 18000.0 && (type == 2 || type == 109) && Main.rand.Next(4) == 0 && (double) y <= Main.worldSurface && NPC.CountNPCS(74) + NPC.CountNPCS(297) + NPC.CountNPCS(298) < 6) + { + int num35 = Main.rand.Next(4); + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 442); + } + else + { + switch (num35) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, y * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, y * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, y * 16, 74); + break; + } + } + } + else if (num34 < Main.maxTilesX / 3 && Main.rand.Next(15) == 0 && (type == 2 || type == 109 || type == 147)) + { + int num36 = Main.rand.Next(4); + if (Main.rand.Next(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, y * 16, 442); + } + else + { + switch (num36) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, y * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, y * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, y * 16, 74); + break; + } + } + } + else if (num34 > Main.maxTilesX / 3 && type == 2 && Main.rand.Next(300) == 0 && !NPC.AnyNPCs(50)) + NPC.SpawnOnPlayer(plr, 50); + else if (type == 53 && Main.rand.Next(5) == 0 && NPC.Spawning_SandstoneCheck(index1, y) && !flag6) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 69); + else if (type == 53 && Main.rand.Next(3) == 0 && !flag6) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 537); + else if (type == 53 && !flag6) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 61); + else if (num34 > Main.maxTilesX / 3 && (Main.rand.Next(15) == 0 || !NPC.downedGoblins && WorldGen.shadowOrbSmashed && Main.rand.Next(7) == 0)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 73); + else if (Main.raining && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 224); + else if (Main.raining && Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 225); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 1); + switch (type) + { + 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 || num34 < 200 && !Main.expertMode) + { + Main.npc[newNPC].SetDefaults(-3); + break; + } + if (Main.rand.Next(10) == 0 && (num34 > 400 || Main.expertMode)) + { + Main.npc[newNPC].SetDefaults(-7); + break; + } + break; + } + } + } + else if ((num1 == 2 || num1 == 109) && Main.rand.Next(NPC.fireFlyChance) == 0 && (double) y <= Main.worldSurface) + { + int Type7 = 355; + if (type == 109) + Type7 = 358; + NPC.NewNPC(index1 * 16 + 8, y * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, y * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, y * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16 - 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, y * 16 + 16, Type7); + } + else if (Main.rand.Next(10) == 0 && Main.halloween) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 301); + 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, y * 16, 133); + else if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(317, 319)); + else if (Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 190); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-38); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 191); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-39); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 192); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-40); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 193); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-41); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 16, 109); + else if (Main.rand.Next(250) == 0 && Main.bloodMoon) + NPC.NewNPC(index1 * 16 + 8, y * 16, 53); + else if (Main.rand.Next(250) == 0 && Main.bloodMoon) + NPC.NewNPC(index1 * 16 + 8, y * 16, 536); + else if (Main.moonPhase == 0 && Main.hardMode && Main.rand.Next(3) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 104); + else if (Main.hardMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 140); + else if (Main.bloodMoon && Main.rand.Next(5) < 2) + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 490) : NPC.NewNPC(index1 * 16 + 8, y * 16, 489); + else if (num1 == 147 || num1 == 161 || num1 == 163 || num1 == 164 || num1 == 162) + newNPC = !Main.hardMode || Main.rand.Next(4) != 0 ? (!Main.hardMode || Main.rand.Next(3) != 0 ? (!Main.expertMode || Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 161) : NPC.NewNPC(index1 * 16 + 8, y * 16, 431)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 155)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 169); + else if (Main.raining && Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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 num37 = Main.rand.Next(7); + if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(319, 322)); + else if (Main.xMas && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(331, 333)); + else if (num37 == 0 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 430); + else if (num37 == 2 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 432); + else if (num37 == 3 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 433); + else if (num37 == 4 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 434); + else if (num37 == 5 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 435); + else if (num37 == 6 && Main.expertMode && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 436); + } + else + { + switch (num37) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 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, y * 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, y * 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, y * 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, y * 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, y * 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; + } + } + } + } + else if ((double) y <= Main.rockLayer) + { + if (!flag4 && Main.rand.Next(50) == 0 && !Main.player[plr].ZoneSnow) + newNPC = !Main.hardMode ? (!Main.player[plr].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, y * 16, 10, 1) : NPC.NewNPC(index1 * 16 + 8, y * 16, 185)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 95, 1); + else if (Main.hardMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 140); + else if (Main.hardMode && Main.rand.Next(4) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 141); + else if (type == 147 || type == 161 || Main.player[plr].ZoneSnow) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 147); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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 (y > Main.maxTilesY - 190) + newNPC = !Main.hardMode || NPC.savedTaxCollector || Main.rand.Next(20) != 0 || NPC.AnyNPCs(534) ? (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, y * 16, 60) : NPC.NewNPC(index1 * 16 + 8, y * 16, 151)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 59)) : (Main.rand.Next(7) != 0 ? (!Main.hardMode || !NPC.downedMechBossAny || Main.rand.Next(5) == 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 62) : NPC.NewNPC(index1 * 16 + 8, y * 16, 156)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 66))) : NPC.NewNPC(index1 * 16 + 8, y * 16, 24)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 39, 1)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 534); + else if (Main.rand.Next(60) == 0) + newNPC = !Main.player[plr].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, y * 16, 217) : NPC.NewNPC(index1 * 16 + 8, y * 16, 218); + else if ((type == 116 || type == 117 || type == 164) && Main.hardMode && !flag4 && Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 120); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164) && !flag4 && Main.hardMode && Main.player[plr].ZoneCorrupt && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 170); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164) && !flag4 && Main.hardMode && Main.player[plr].ZoneHoly && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 171); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164) && !flag4 && Main.hardMode && Main.player[plr].ZoneCrimson && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 180); + else if (Main.hardMode && Main.player[plr].ZoneSnow && Main.rand.Next(10) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 154); + else if (!flag4 && Main.rand.Next(100) == 0 && !Main.player[plr].ZoneHoly) + newNPC = !Main.hardMode ? (!Main.player[plr].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, y * 16, 10, 1) : NPC.NewNPC(index1 * 16 + 8, y * 16, 185)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 95, 1); + else if (Main.player[plr].ZoneSnow && Main.rand.Next(20) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 185); + else if (!Main.hardMode && Main.rand.Next(10) == 0) + { + if (Main.player[plr].ZoneSnow) + Main.npc[newNPC].SetDefaults(184); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 16); + } + else if (!Main.hardMode && Main.rand.Next(4) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 1); + if (Main.player[plr].ZoneJungle) + Main.npc[newNPC].SetDefaults(-10); + else if (Main.player[plr].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, y * 16, 453); + else if (!Main.hardMode && Main.rand.Next(80) == 0 || Main.rand.Next(200) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 195); + else if (Main.hardMode && (double) y > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && Main.rand.Next(300) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 172); + else if ((double) y > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && (Main.rand.Next(200) == 0 || Main.rand.Next(50) == 0 && Main.player[plr].armor[1].type >= 1282 && Main.player[plr].armor[1].type <= 1287 && Main.player[plr].armor[0].type != 238)) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 45); + else if (flag9 && Main.rand.Next(4) != 0) + newNPC = Main.rand.Next(6) == 0 || NPC.AnyNPCs(480) || !Main.hardMode ? NPC.NewNPC(index1 * 16 + 8, y * 16, 481) : NPC.NewNPC(index1 * 16 + 8, y * 16, 480); + else if (flag8 && Main.rand.Next(5) != 0) + newNPC = Main.rand.Next(6) == 0 || NPC.AnyNPCs(483) ? NPC.NewNPC(index1 * 16 + 8, y * 16, 482) : NPC.NewNPC(index1 * 16 + 8, y * 16, 483); + else if (Main.hardMode && Main.rand.Next(10) != 0) + { + if (Main.rand.Next(2) == 0) + { + if (Main.player[plr].ZoneSnow) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 197); + else if (Main.halloween && Main.rand.Next(5) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 316); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 77); + if ((double) y > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && Main.rand.Next(5) == 0) + Main.npc[newNPC].SetDefaults(-15); + } + } + else + newNPC = !Main.player[plr].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, y * 16, 110) : NPC.NewNPC(index1 * 16 + 8, y * 16, 206); + } + else if (Main.rand.Next(20) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 44); + else if (num1 == 147 || num1 == 161 || num1 == 162) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 167); + else if (Main.player[plr].ZoneSnow) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, 185); + else if (Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, NPC.cavernMonsterType[Main.rand.Next(2), Main.rand.Next(3)]); + else if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 16, Main.rand.Next(322, 325)); + else if (Main.expertMode && Main.rand.Next(3) == 0) + { + int num38 = Main.rand.Next(4); + newNPC = num38 != 0 ? (num38 != 0 ? (num38 != 0 ? NPC.NewNPC(index1 * 16 + 8, y * 16, 452) : NPC.NewNPC(index1 * 16 + 8, y * 16, 451)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 450)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 449); + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, y * 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, y * 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, y * 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, y * 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[plr].ZoneHoly & Main.rand.Next(2) == 0) ? (!Main.player[plr].ZoneJungle ? (!Main.hardMode || !Main.player[plr].ZoneHoly ? (!Main.hardMode || Main.rand.Next(6) <= 0 ? (num1 == 147 || num1 == 161 || num1 == 162 ? (!Main.hardMode ? NPC.NewNPC(index1 * 16 + 8, y * 16, 150) : NPC.NewNPC(index1 * 16 + 8, y * 16, 169)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 49)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 93)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 137)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 51)) : NPC.NewNPC(index1 * 16 + 8, y * 16, 138); + if (Main.npc[newNPC].type == 1 && Main.rand.Next(180) == 0) + Main.npc[newNPC].SetDefaults(-4); + if (Main.netMode != 2 || newNPC >= 200) + break; + NetMessage.SendData(23, number: newNPC); + break; + } + } + } + } + } + + public static bool AnyDanger() + { + bool flag = false; + if (NPC.MoonLordCountdown > 0) + flag = true; + if (Main.invasionType > 0) + flag = true; + if (!flag) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].boss || NPCID.Sets.TechnicallyABoss[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.wof >= 0 || Main.netMode == 1) + 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; + NetMessage.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; + NetMessage.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 - 100; --j) + { + if (WorldGen.SolidTile(i, j)) + { + num4 = j; + break; + } + } + for (int j = num3; j < num3 + 100; ++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; + NetMessage.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; + NetMessage.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; + NetMessage.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 <= (byte) 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; + int number = NPC.NewNPC(num7 * 16 + 8, num8 * 16, Type, 1); + if (number == 200) + break; + Main.npc[number].target = plr; + Main.npc[number].timeLeft *= 20; + string typeName1 = 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); + break; + } + if (Main.netMode != 2) + break; + NetMessage.BroadcastChatMessage(Lang.misc[48].ToNetworkText(), new Color(175, 75, (int) byte.MaxValue)); + break; + } + if (Type == 82 || Type == 126 || Type == 50 || Type == 398 || Type == 551) + break; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) typeName1), (byte) 175, (byte) 75); + break; + } + if (Main.netMode != 2) + break; + NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[number].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + + 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) + { + int index1 = -1; + if (Type == 222) + { + for (int index2 = 199; index2 >= 0; --index2) + { + if (!Main.npc[index2].active) + { + index1 = index2; + break; + } + } + } + else + { + for (int index3 = Start; index3 < 200; ++index3) + { + if (!Main.npc[index3].active) + { + index1 = index3; + break; + } + } + } + if (index1 < 0) + return 200; + Main.npc[index1] = new NPC(); + Main.npc[index1].SetDefaults(Type); + if (NPC.TypeToHeadIndex(Type) != -1 || Type == 453) + Main.npc[index1].GivenName = NPC.getNewNPCName(Type); + Main.npc[index1].position.X = (float) (X - Main.npc[index1].width / 2); + Main.npc[index1].position.Y = (float) (Y - Main.npc[index1].height); + Main.npc[index1].active = true; + Main.npc[index1].timeLeft = (int) ((double) NPC.activeTime * 1.25); + Main.npc[index1].wet = Collision.WetCollision(Main.npc[index1].position, Main.npc[index1].width, Main.npc[index1].height); + Main.npc[index1].ai[0] = ai0; + Main.npc[index1].ai[1] = ai1; + Main.npc[index1].ai[2] = ai2; + Main.npc[index1].ai[3] = ai3; + Main.npc[index1].target = Target; + if (Type == 50) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) Main.npc[index1].TypeName), (byte) 175, (byte) 75); + break; + case 2: + NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[index1].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + return index1; + } + + public void TransformVisuals(int oldType, int newType) + { + if (oldType == 158 && newType == 159 || oldType == 159 && newType == 158) + { + Main.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) + return; + 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; + } + } + + 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; + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult); + this.position = newPos; + if (Style == 4) + { + this.lastPortalColorIndex = extraInfo; + extraInfo1 = this.lastPortalColorIndex; + } + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult); + 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; + 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; + 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; + } + for (int index = 0; index < 5; ++index) + { + this.buffType[index] = numArray1[index]; + this.buffTime[index] = numArray2[index]; + } + if (Main.netMode == 2) + { + this.netUpdate = true; + NetMessage.SendData(23, number: this.whoAmI); + NetMessage.SendData(54, number: this.whoAmI); + } + this.TransformVisuals(type, newType); + if (NPC.TypeToHeadIndex(this.type) != -1) + Main.npc[this.whoAmI].GivenName = NPC.getNewNPCName(this.type); + this.npcNameLookup = (byte) 0; + if (this.townNPC) + this.homeless = true; + 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.CalculateDamage((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.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 ((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) + Main.PlaySound(this.HitSound, this.position); + if (this.realLife >= 0) + Main.npc[this.realLife].checkDead(); + else + this.checkDead(); + return dmg; + } + + public void HitEffect(int hitDirection = 0, double dmg = 10.0) + { + // ISSUE: unable to decompile the method. + } + + 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 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 b = -1; + for (int index3 = 0; index3 < 5; ++index3) + { + if (!Main.debuff[this.buffType[index3]]) + { + b = index3; + break; + } + } + if (b == -1) + return; + for (int index4 = b; index4 < 5; ++index4) + { + if (this.buffType[index4] == 0) + { + index1 = index4; + break; + } + } + if (index1 == -1) + this.DelBuff(b); + } + this.buffType[index1] = type; + this.buffTime[index1] = time; + } + + public void DelBuff(int b) + { + this.buffTime[b] = 0; + this.buffType[b] = 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 void moneyPing(Vector2 pos) + { + Main.PlaySound(38, pos); + int Type = 244; + if ((double) this.extraValue >= 1000000.0) + Type = 247; + else if ((double) this.extraValue >= 10000.0) + Type = 246; + else if ((double) this.extraValue >= 100.0) + 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) + Main.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) + Main.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) + Main.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) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 32); + else if (this.type == 153 && Main.rand.Next(1000) == 0) + Main.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) + Main.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) + Main.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) + Main.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) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(41, 44)); + else if (this.type == 508 && Main.rand.Next(800) == 0) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 44); + else if (this.type == 509 && Main.rand.Next(800) == 0) + Main.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) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 47); + else if (this.type == 467 && Main.rand.Next(700) == 0) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.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) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 73); + else if (this.type == 258 && Main.rand.Next(700) == 0) + Main.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) + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 78); + else if (this.type == 469 && Main.rand.Next(700) == 0) + Main.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) + Main.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) + { + Main.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; + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(86, 87)); + } + } + + private void UpdateAltTexture() + { + if (!this.townNPC) + return; + int altTexture = this.altTexture; + this.altTexture = !BirthdayParty.PartyIsUp ? 0 : 1; + if (this.type == 441 || this.type == 453) + this.altTexture = 0; + if (altTexture == 0 && this.altTexture == 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 (altTexture != 1 || this.altTexture != 0) + return; + for (int index = 0; index < 4; ++index) + Utils.PoofOfSmoke(this.position); + } + + public void UpdateNPC(int i) + { + this.whoAmI = i; + if (!this.active) + return; + this.UpdateAltTexture(); + if (this.type == 368) + NPC.travelNPC = true; + this.UpdateNPC_CastLights(); + this.UpdateNPC_TeleportVisuals(); + this.UpdateNPC_CritterSounds(); + if (Main.netMode == 1 && (this.townNPC || this.type == 453) && this.type != 37 && this.npcNameLookup == (byte) 0) + { + this.npcNameLookup = (byte) 1; + int number = -1; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index] == this) + { + number = index; + break; + } + } + NetMessage.SendData(56, number: number); + } + 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_BloodMoonTransformations(); + float maxFallSpeed; + this.UpdateNPC_UpdateGravity(out maxFallSpeed); + if (this.soundDelay > 0) + --this.soundDelay; + if (this.life <= 0) + this.active = false; + this.oldTarget = this.target; + this.oldDirection = this.direction; + this.oldDirectionY = this.directionY; + 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; + this.TryPortalJumping(); + this.IdleSounds(); + this.AI(); + if (Main.netMode != 2 && (double) this.extraValue > 0.0) + { + int Type = 244; + float num2 = 30f; + if ((double) this.extraValue >= 1000000.0) + { + Type = 247; + num2 *= 0.25f; + } + else if ((double) this.extraValue >= 10000.0) + { + Type = 246; + num2 *= 0.5f; + } + else if ((double) this.extraValue >= 100.0) + { + Type = 245; + num2 *= 0.75f; + } + if (Main.rand.Next((int) num2) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, Type, Alpha: 254, Scale: 0.25f); + Main.dust[index].velocity *= 0.1f; + } + } + 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 || this.type == 46 || this.type == 55 || this.type == 74 || this.type == 148 || this.type == 149 || this.type == 230 || this.type == 297 || this.type == 298 || this.type == 299 || this.type == 303 || this.type == 355 || this.type == 356 || this.type == 358 || this.type == 359 || this.type == 360 || this.type == 361 || this.type == 362 || this.type == 363 || this.type == 364 || this.type == 365 || this.type == 366 || this.type == 367 || this.type == 377 || this.type == 357 || this.type == 374 || this.type >= 442 && this.type <= 448 && this.type != 447) || this.type == 538 || this.type == 539 || this.type == 337 || this.type == 540 || this.type >= 484 && this.type <= 487) + { + if (this.townNPC) + this.CheckDrowning(); + this.CheckLifeRegen(); + this.CheckMeleeCollision(); + } + 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 b = 0; b < 5; ++b) + { + if (this.buffType[b] == 24) + this.DelBuff(b); + } + } + } + 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.ai[0] = 1f; + this.ai[1] = 400f; + this.ai[2] = 0.0f; + } + this.FindFrame(); + this.UpdateNPC_UpdateTrails(); + if (!this.active) + this.netUpdate = true; + if (Main.netMode == 2) + { + 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) + { + float num3 = Math.Abs(this.Center.X - Main.player[remoteClient].Center.X) + Math.Abs(this.Center.Y - Main.player[remoteClient].Center.Y); + if ((double) num3 < 250.0) + this.streamPlayer[remoteClient] -= (byte) 8; + else if ((double) num3 < 500.0) + this.streamPlayer[remoteClient] -= (byte) 4; + else if ((double) num3 < 1000.0) + this.streamPlayer[remoteClient] -= (byte) 2; + else if ((double) num3 < 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.TypeToHeadIndex(this.type) != -1) + { + 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; + } + } + this.CheckActive(); + this.netUpdate = false; + this.justHit = false; + } + + 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.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; + } + 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.oldRot[0] = this.rotation; + } + else + { + for (int index = this.oldPos.Length - 1; index >= 0; --index) + { + this.oldPos[index] = this.position; + 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.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; + } + 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; + } + 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; + } + 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.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); + } + } + } + } + + 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 -= 12; + } + if (this.venom) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 12; + if (amount < 2) + amount = 2; + } + 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.expertNPCDamage; + 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 b = 0; b < 5; ++b) + { + if (this.buffType[b] > 0 && this.buffTime[b] <= 0) + { + this.DelBuff(b); + 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) + { + 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; + } + + private void UpdateNPC_BuffSetFlags() + { + for (int index = 0; index < 5; ++index) + { + if (this.buffType[index] > 0 && this.buffTime[index] > 0) + { + --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] == 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; + } + } + } + + 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.daybreak = false; + this.javelined = false; + this.celled = false; + this.dryadBane = false; + this.betsysCurse = false; + this.oiled = 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 >= 362 && this.type <= 365) + { + if (!Main.dayTime || Main.rand.Next(200) != 0) + return; + Main.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; + Main.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) + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 14); + else + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 18); + } + if (this.type == 297) + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 16); + if (this.type == 298) + { + if (Main.rand.Next(3) != 0) + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 17); + else + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 19); + } + if (this.type != 442) + return; + switch (Main.rand.Next(5)) + { + case 0: + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 16); + break; + case 1: + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 17); + break; + case 2: + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 19); + break; + case 3: + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 14); + break; + default: + Main.PlaySound(32, (int) this.position.X, (int) this.position.Y, 18); + break; + } + } + else + { + if (this.type != 300 && this.type != 447 || Main.rand.Next(1800) != 0) + return; + Main.PlaySound(33, (int) this.position.X, (int) this.position.Y); + } + } + + private void UpdateNPC_CastLights() + { + if (this.type >= 442 && this.type <= 448 || this.type == 539) + { + 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; + } + } + } + if (this.type >= 254 && this.type <= 261 || this.type == 160) + { + 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; + 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 CheckMeleeCollision() + { + if (this.dontTakeDamageFromHostiles) + return; + int specialHitSetter = 1; + if (this.immune[(int) byte.MaxValue] != 0) + return; + int num1 = 30; + if (this.type == 548) + num1 = 20; + Microsoft.Xna.Framework.Rectangle hitbox1 = this.Hitbox; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.friendly && npc.damage > 0) + { + Microsoft.Xna.Framework.Rectangle hitbox2 = npc.Hitbox; + float damageMultiplier = 1f; + NPC.GetMeleeCollisionData(hitbox1, index, ref specialHitSetter, ref damageMultiplier, ref hitbox2); + if (hitbox1.Intersects(hitbox2) && (this.type != 453 || !NPCID.Sets.Skeletons.Contains(npc.netID))) + { + int damage = npc.damage; + int num2 = 6; + int hitDirection1 = 1; + if ((double) npc.position.X + (double) (npc.width / 2) > (double) this.position.X + (double) (this.width / 2)) + hitDirection1 = -1; + double num3 = this.StrikeNPCNoInteraction(damage, (float) num2, hitDirection1); + if (Main.netMode != 0) + NetMessage.SendData(28, number: this.whoAmI, number2: ((float) damage), number3: ((float) num2), number4: ((float) hitDirection1)); + this.netUpdate = true; + this.immune[(int) byte.MaxValue] = num1; + if (this.dryadWard) + { + int Damage = (int) num3 / 3; + int num4 = 6; + int hitDirection2 = hitDirection1 * -1; + npc.StrikeNPCNoInteraction(Damage, (float) num4, hitDirection2); + if (Main.netMode != 0) + NetMessage.SendData(28, number: index, number2: ((float) Damage), number3: ((float) num4), number4: ((float) hitDirection2)); + npc.netUpdate = true; + npc.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; + } + + 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 (!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_MoveWaterOrLavaOld( + bool fall, + Vector2 cPosition, + int cWidth, + int cHeight) + { + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(cPosition, this.velocity, cWidth, cHeight, fall, fall); + if (Collision.up) + this.velocity.Y = 0.01f; + Vector2 vector2 = this.velocity * 0.5f; + if ((double) this.velocity.X != (double) velocity.X) + { + vector2.X = this.velocity.X; + this.collideX = true; + } + if ((double) this.velocity.Y != (double) velocity.Y) + { + vector2.Y = this.velocity.Y; + this.collideY = true; + } + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.position = this.position + vector2; + } + + private void Collision_MoveHoneyOld(bool fall, Vector2 cPosition, int cWidth, int cHeight) + { + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(cPosition, this.velocity, cWidth, cHeight, fall, fall); + if (Collision.up) + this.velocity.Y = 0.01f; + Vector2 vector2 = this.velocity * 0.25f; + if ((double) this.velocity.X != (double) velocity.X) + { + vector2.X = this.velocity.X; + this.collideX = true; + } + if ((double) this.velocity.Y != (double) velocity.Y) + { + vector2.Y = this.velocity.Y; + this.collideY = true; + } + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.position = this.position + vector2; + } + + 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; + } + + private void GetTileCollisionParameters(out Vector2 cPosition, out int cWidth, out int cHeight) + { + cPosition = this.position; + cWidth = this.width; + cHeight = this.height; + 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) + return; + 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; + } + } + + private bool Collision_DecideFallThroughPlatforms() + { + bool flag1 = false; + if (this.type == 2 || this.type == -43 || this.type == 317 || this.type == 318 || this.type == 133) + flag1 = true; + if (this.aiStyle == 10) + flag1 = true; + if (this.aiStyle == 40) + 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 == 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.aiStyle == 7) + { + int num = 16; + bool flag2 = false; + if (!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 (flag) + { + if (this.onFire && !this.lavaWet && Main.netMode != 1) + { + for (int b = 0; b < 5; ++b) + { + if (this.buffType[b] == 24) + this.DelBuff(b); + } + } + 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) + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + 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) + Main.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) + Main.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.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) + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + 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) + Main.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) + Main.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(3) != 0) + return; + NPC.butterflyChance = 999999; + } + + public Color GetAlpha(Color newColor) + { + 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 >= 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 == 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 == 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.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 == 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) + { + 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) + { + 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); + } + + private string GetBirthdayDialog() + { + switch (this.type) + { + case 17: + return Language.SelectRandom(Lang.CreateDialogFilter("MerchantSpecialText.Party")).Value; + case 18: + return Language.SelectRandom(Lang.CreateDialogFilter("NurseSpecialText.Party")).Value; + case 19: + return Language.SelectRandom(Lang.CreateDialogFilter("ArmsDealerSpecialText.Party")).Value; + case 20: + return Language.SelectRandom(Lang.CreateDialogFilter("DryadSpecialText.Party")).Value; + case 22: + return Language.SelectRandom(Lang.CreateDialogFilter("GuideSpecialText.Party")).Value; + case 38: + return Language.SelectRandom(Lang.CreateDialogFilter("DemolitionistSpecialText.Party")).Value; + case 54: + return Language.SelectRandom(Lang.CreateDialogFilter("ClothierSpecialText.Party")).Value; + case 107: + return Language.SelectRandom(Lang.CreateDialogFilter("GoblinTinkererSpecialText.Party")).Value; + case 108: + return Language.SelectRandom(Lang.CreateDialogFilter("WizardSpecialText.Party")).Value; + case 124: + return Language.SelectRandom(Lang.CreateDialogFilter("MechanicSpecialText.Party")).Value; + case 142: + return Language.SelectRandom(Lang.CreateDialogFilter("SantaClausSpecialText.Party")).Value; + case 160: + return Language.SelectRandom(Lang.CreateDialogFilter("TruffleSpecialText.Party")).Value; + case 178: + return Language.SelectRandom(Lang.CreateDialogFilter("SteampunkerSpecialText.Party")).Value; + case 207: + return Language.SelectRandom(Lang.CreateDialogFilter("DyeTraderSpecialText.Party")).Value; + case 208: + return Language.SelectRandom(Lang.CreateDialogFilter("PartyGirlSpecialText.Party")).Value; + case 209: + return Language.SelectRandom(Lang.CreateDialogFilter("CyborgSpecialText.Party")).Value; + case 227: + return Language.SelectRandom(Lang.CreateDialogFilter("PainterSpecialText.Party")).Value; + case 228: + return Language.SelectRandom(Lang.CreateDialogFilter("WitchDoctorSpecialText.Party")).Value; + case 229: + return Language.SelectRandom(Lang.CreateDialogFilter("PirateSpecialText.Party")).Value; + case 353: + return Language.SelectRandom(Lang.CreateDialogFilter("StylistSpecialText.Party")).Value; + case 368: + return Language.SelectRandom(Lang.CreateDialogFilter("TravellingMerchantSpecialText.Party")).Value; + case 369: + return Language.SelectRandom(Lang.CreateDialogFilter("AnglerSpecialText.Party")).Value; + case 550: + return Language.SelectRandom(Lang.CreateDialogFilter("DD2BartenderSpecialText.Party")).Value; + default: + return ""; + } + } + + 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; + object substitutionObject = Lang.CreateDialogSubstitutionObject(this); + bool flag17 = false; + 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 == 2) + { + flag17 = true; + } + else + { + int type = Main.npc[index].type; + } + } + } + string str = ""; + if (this.type == 17) + { + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (flag17 && 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + else if (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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + else if (DD2Event.DownedInvasionT1 && Main.rand.Next(6) == 0) + str = Language.GetTextValueWith("WizardSpecialText.AfterDD2Tier1", substitutionObject); + else if (Main.player[Main.myPlayer].Male & flag17 && 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (!Main.dayTime) + { + str = Lang.dialog(173); + } + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + { + str = this.GetBirthdayDialog(); + } + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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) + { + int num = Main.rand.Next(7); + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + else if (flag2 && Main.rand.Next(6) == 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + 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 = !BirthdayParty.PartyIsUp || Main.rand.Next(3) != 0 ? (!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)) : this.GetBirthdayDialog(); + else if (this.type == 376) + str = Lang.dialog(Main.rand.Next(353, 356)); + else if (this.type == 369) + { + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + str = this.GetBirthdayDialog(); + else if (Main.bloodMoon) + str = Main.anglerQuestFinished ? Lang.dialog(Main.rand.Next(350, 353)) : Lang.dialog(Main.rand.Next(348, 350)); + else if (!Main.anglerQuestFinished) + str = Lang.dialog(Main.rand.Next(334, 338)); + else if (flag4 && Main.rand.Next(5) == 0) + { + str = Lang.dialog(347); + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("AnglerChatter.", substitutionObject)); + int num = Main.rand.Next(all.Length + 9); + str = num < 9 ? Lang.dialog(338 + num) : all[num - 9].FormatWith(substitutionObject); + } + } + else if (this.type == 453) + str = Lang.dialog(Main.rand.Next(356, 364)); + else if (this.type == 441) + str = !(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); + else if (this.type == 579) + str = Language.GetTextValue("BartenderSpecialText.FirstMeeting"); + else if (this.type == 550) + str = Lang.BartenderChat(this); + return str; + } + + public object Clone() => this.MemberwiseClone(); + + 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 && (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 override string ToString() => "name:" + this.TypeName + ", active:" + this.active.ToString() + ", whoAmI:" + (object) this.whoAmI; + } +} diff --git a/Net/AddressType.cs b/Net/AddressType.cs new file mode 100644 index 0000000..62936e1 --- /dev/null +++ b/Net/AddressType.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.AddressType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net +{ + public enum AddressType + { + Tcp, + Steam, + } +} diff --git a/Net/LegacyNetBufferPool.cs b/Net/LegacyNetBufferPool.cs new file mode 100644 index 0000000..75344b8 --- /dev/null +++ b/Net/LegacyNetBufferPool.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.LegacyNetBufferPool +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 0; + private static int _mediumBufferCount = 0; + private static int _largeBufferCount = 0; + private static int _customBufferCount = 0; + + 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/NetManager.cs b/Net/NetManager.cs new file mode 100644 index 0000000..e4d3132 --- /dev/null +++ b/Net/NetManager.cs @@ -0,0 +1,82 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.Localization; +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) + { + ushort key = reader.ReadUInt16(); + if (!this._modules.ContainsKey(key)) + return; + this._modules[key].Deserialize(reader, userId); + } + + 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 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 + { + Console.WriteLine(Language.GetTextValue("Error.ExceptionNormal", (object) Language.GetTextValue("Error.DataSentAfterConnectionLost"))); + } + } + + public static void SendCallback(object state) => ((NetPacket) state).Recycle(); + + private class PacketTypeStorage where T : NetModule + { + public static ushort Id; + public static T Module; + } + } +} diff --git a/Net/NetModule.cs b/Net/NetModule.cs new file mode 100644 index 0000000..947f5d3 --- /dev/null +++ b/Net/NetModule.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..22a5f56 --- /dev/null +++ b/Net/NetPacket.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetPacket +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1a8a09e --- /dev/null +++ b/Net/RemoteAddress.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.RemoteAddress +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..47a8a39 --- /dev/null +++ b/Net/ServerMode.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.ServerMode +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a718df3 --- /dev/null +++ b/Net/Sockets/ISocket.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.ISocket +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..02bde70 --- /dev/null +++ b/Net/Sockets/SocialSocket.cs @@ -0,0 +1,92 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocialSocket +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..d120e00 --- /dev/null +++ b/Net/Sockets/SocketConnectionAccepted.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketConnectionAccepted +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..ed06975 --- /dev/null +++ b/Net/Sockets/SocketReceiveCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketReceiveCallback +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c33de18 --- /dev/null +++ b/Net/Sockets/SocketSendCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketSendCallback +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..76c0ce4 --- /dev/null +++ b/Net/Sockets/TcpSocket.cs @@ -0,0 +1,153 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.TcpSocket +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 int _packetBufferLength; + 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(); + this._connection.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.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; + } + ThreadPool.QueueUserWorkItem(new WaitCallback(this.ListenLoop)); + return true; + } + + void ISocket.StopListening() => this._isListening = false; + + private void ListenLoop(object unused) + { + 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..7a00940 --- /dev/null +++ b/Net/SteamAddress.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.SteamAddress +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..77945e3 --- /dev/null +++ b/Net/TcpAddress.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.TcpAddress +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/NetMessage.cs b/NetMessage.cs new file mode 100644 index 0000000..33c8b5d --- /dev/null +++ b/NetMessage.cs @@ -0,0 +1,2137 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.NetMessage +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Events; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.Tile_Entities; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Net.Sockets; +using Terraria.Social; + +namespace Terraria +{ + public class NetMessage + { + public static MessageBuffer[] buffer = new MessageBuffer[257]; + private static PlayerDeathReason _currentPlayerDeathReason; + + public static void SendChatMessageToClient(NetworkText text, Color color, int playerId) + { + NetPacket packet = NetTextModule.SerializeServerMessage(text, color, byte.MaxValue); + NetManager.Instance.SendToClient(packet, playerId); + } + + public static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer = -1) + { + NetPacket packet = NetTextModule.SerializeServerMessage(text, color, byte.MaxValue); + NetManager.Instance.Broadcast(packet, excludedPlayer); + } + + public static void SendChatMessageFromClient(ChatMessage text) + { + NetPacket packet = NetTextModule.SerializeClientMessage(text); + NetManager.Instance.SendToServer(packet); + } + + 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) 194); + 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.hideVisual[key]; + writer.Write((byte) bitsByte1); + BitsByte bitsByte2 = (BitsByte) (byte) 0; + for (int key = 0; key < 2; ++key) + bitsByte2[key] = player1.hideVisual[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; + bitsByte3[2] = player1.extraAccessory; + writer.Write((byte) bitsByte3); + break; + case 5: + writer.Write((byte) number); + writer.Write((byte) 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 + 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]; + if (obj1.Name == "" || obj1.stack == 0 || obj1.type == 0) + obj1.SetDefaults(); + 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 bitsByte4 = (BitsByte) (byte) 0; + bitsByte4[0] = Main.dayTime; + bitsByte4[1] = Main.bloodMoon; + bitsByte4[2] = Main.eclipse; + writer.Write((byte) bitsByte4); + 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(Main.ActiveWorldFileData.UniqueId.ToByteArray()); + writer.Write(Main.ActiveWorldFileData.WorldGeneratorVersion); + writer.Write((byte) Main.moonType); + writer.Write((byte) WorldGen.treeBG); + 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) Main.iceBackStyle); + writer.Write((byte) Main.jungleBackStyle); + writer.Write((byte) Main.hellBackStyle); + writer.Write(Main.windSpeedSet); + 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]); + if (!Main.raining) + Main.maxRaining = 0.0f; + writer.Write(Main.maxRaining); + BitsByte bitsByte5 = (BitsByte) (byte) 0; + bitsByte5[0] = WorldGen.shadowOrbSmashed; + bitsByte5[1] = NPC.downedBoss1; + bitsByte5[2] = NPC.downedBoss2; + bitsByte5[3] = NPC.downedBoss3; + bitsByte5[4] = Main.hardMode; + bitsByte5[5] = NPC.downedClown; + bitsByte5[7] = NPC.downedPlantBoss; + writer.Write((byte) bitsByte5); + BitsByte bitsByte6 = (BitsByte) (byte) 0; + bitsByte6[0] = NPC.downedMechBoss1; + bitsByte6[1] = NPC.downedMechBoss2; + bitsByte6[2] = NPC.downedMechBoss3; + bitsByte6[3] = NPC.downedMechBossAny; + bitsByte6[4] = (double) Main.cloudBGActive >= 1.0; + bitsByte6[5] = WorldGen.crimson; + bitsByte6[6] = Main.pumpkinMoon; + bitsByte6[7] = Main.snowMoon; + writer.Write((byte) bitsByte6); + BitsByte bitsByte7 = (BitsByte) (byte) 0; + bitsByte7[0] = Main.expertMode; + bitsByte7[1] = Main.fastForwardTime; + bitsByte7[2] = Main.slimeRain; + bitsByte7[3] = NPC.downedSlimeKing; + bitsByte7[4] = NPC.downedQueenBee; + bitsByte7[5] = NPC.downedFishron; + bitsByte7[6] = NPC.downedMartians; + bitsByte7[7] = NPC.downedAncientCultist; + writer.Write((byte) bitsByte7); + BitsByte bitsByte8 = (BitsByte) (byte) 0; + bitsByte8[0] = NPC.downedMoonlord; + bitsByte8[1] = NPC.downedHalloweenKing; + bitsByte8[2] = NPC.downedHalloweenTree; + bitsByte8[3] = NPC.downedChristmasIceQueen; + bitsByte8[4] = NPC.downedChristmasSantank; + bitsByte8[5] = NPC.downedChristmasTree; + bitsByte8[6] = NPC.downedGolemBoss; + bitsByte8[7] = BirthdayParty.PartyIsUp; + writer.Write((byte) bitsByte8); + BitsByte bitsByte9 = (BitsByte) (byte) 0; + bitsByte9[0] = NPC.downedPirates; + bitsByte9[1] = NPC.downedFrost; + bitsByte9[2] = NPC.downedGoblins; + bitsByte9[3] = Sandstorm.Happening; + bitsByte9[4] = DD2Event.Ongoing; + bitsByte9[5] = DD2Event.DownedInvasionT1; + bitsByte9[6] = DD2Event.DownedInvasionT2; + bitsByte9[7] = DD2Event.DownedInvasionT3; + writer.Write((byte) bitsByte9); + 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); + 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: + writer.Write((byte) number); + writer.Write((short) Main.player[number].SpawnX); + writer.Write((short) Main.player[number].SpawnY); + break; + case 13: + Player player3 = Main.player[number]; + writer.Write((byte) number); + BitsByte bitsByte10 = (BitsByte) (byte) 0; + bitsByte10[0] = player3.controlUp; + bitsByte10[1] = player3.controlDown; + bitsByte10[2] = player3.controlLeft; + bitsByte10[3] = player3.controlRight; + bitsByte10[4] = player3.controlJump; + bitsByte10[5] = player3.controlUseItem; + bitsByte10[6] = player3.direction == 1; + writer.Write((byte) bitsByte10); + BitsByte bitsByte11 = (BitsByte) (byte) 0; + bitsByte11[0] = player3.pulley; + bitsByte11[1] = player3.pulley && player3.pulleyDir == (byte) 2; + bitsByte11[2] = player3.velocity != Vector2.Zero; + bitsByte11[3] = player3.vortexStealthActive; + bitsByte11[4] = (double) player3.gravDir == 1.0; + bitsByte11[5] = player3.shieldRaised; + writer.Write((byte) bitsByte11); + writer.Write((byte) player3.selectedItem); + writer.WriteVector2(player3.position); + if (bitsByte11[2]) + { + writer.WriteVector2(player3.velocity); + 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 bitsByte12 = (BitsByte) (byte) 0; + BitsByte bitsByte13 = (BitsByte) (byte) 0; + byte num6 = 0; + byte num7 = 0; + Tile tile = Main.tile[index1, index2]; + bitsByte12[0] = tile.active(); + bitsByte12[2] = tile.wall > (byte) 0; + bitsByte12[3] = tile.liquid > (byte) 0 && Main.netMode == 2; + bitsByte12[4] = tile.wire(); + bitsByte12[5] = tile.halfBrick(); + bitsByte12[6] = tile.actuator(); + bitsByte12[7] = tile.inActive(); + bitsByte13[0] = tile.wire2(); + bitsByte13[1] = tile.wire3(); + if (tile.active() && tile.color() > (byte) 0) + { + bitsByte13[2] = true; + num6 = tile.color(); + } + if (tile.wall > (byte) 0 && tile.wallColor() > (byte) 0) + { + bitsByte13[3] = true; + num7 = tile.wallColor(); + } + bitsByte13 = (BitsByte) (byte) ((uint) (byte) bitsByte13 + (uint) (byte) ((uint) tile.slope() << 4)); + bitsByte13[7] = tile.wire4(); + writer.Write((byte) bitsByte12); + writer.Write((byte) bitsByte13); + 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 > (byte) 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].owner); + 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 bitsByte14 = (BitsByte) (byte) 0; + bitsByte14[0] = npc1.direction > 0; + bitsByte14[1] = npc1.directionY > 0; + bitsByte14[2] = flagArray[0] = (double) npc1.ai[0] != 0.0; + bitsByte14[3] = flagArray[1] = (double) npc1.ai[1] != 0.0; + bitsByte14[4] = flagArray[2] = (double) npc1.ai[2] != 0.0; + bitsByte14[5] = flagArray[3] = (double) npc1.ai[3] != 0.0; + bitsByte14[6] = npc1.spriteDirection > 0; + bitsByte14[7] = num9 == npc1.lifeMax; + writer.Write((byte) bitsByte14); + for (int index = 0; index < NPC.maxAI; ++index) + { + if (flagArray[index]) + writer.Write(npc1.ai[index]); + } + writer.Write(netId2); + if (!bitsByte14[7]) + { + byte npcLifeByte = Main.npcLifeBytes[npc1.netID]; + writer.Write(npcLifeByte); + switch (npcLifeByte) + { + 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 < 580 && 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(projectile1.knockBack); + writer.Write((short) projectile1.damage); + writer.Write((byte) projectile1.owner); + writer.Write((short) projectile1.type); + BitsByte bitsByte15 = (BitsByte) (byte) 0; + for (int key = 0; key < Projectile.maxAI; ++key) + { + if ((double) projectile1.ai[key] != 0.0) + bitsByte15[key] = true; + } + if (projectile1.type > 0 && projectile1.type < 714 && ProjectileID.Sets.NeedsUUID[projectile1.type]) + bitsByte15[Projectile.maxAI] = true; + writer.Write((byte) bitsByte15); + for (int key = 0; key < Projectile.maxAI; ++key) + { + if (bitsByte15[key]) + writer.Write(projectile1.ai[key]); + } + if (bitsByte15[Projectile.maxAI]) + { + 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 num10 = (short) obj3.netID; + if (obj3.Name == null) + num10 = (short) 0; + writer.Write((short) obj3.stack); + writer.Write(obj3.prefix); + writer.Write(num10); + break; + case 33: + int num11 = 0; + int num12 = 0; + int num13 = 0; + string str1 = (string) null; + if (number > -1) + { + num11 = Main.chest[number].x; + num12 = Main.chest[number].y; + } + if ((double) number2 == 1.0) + { + string str2 = text.ToString(); + num13 = (int) (byte) str2.Length; + if (num13 == 0 || num13 > 20) + num13 = (int) byte.MaxValue; + else + str1 = str2; + } + writer.Write((short) number); + writer.Write((short) num11); + writer.Write((short) num12); + writer.Write((byte) num13); + 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: + case 66: + writer.Write((byte) number); + writer.Write((short) number2); + break; + case 36: + Player player4 = Main.player[number]; + writer.Write((byte) number); + writer.Write((byte) player4.zone1); + writer.Write((byte) player4.zone2); + writer.Write((byte) player4.zone3); + writer.Write((byte) player4.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); + 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((byte) 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((byte) number2); + writer.Write((short) number3); + break; + case 54: + writer.Write((short) number); + for (int index = 0; index < 5; ++index) + { + writer.Write((byte) Main.npc[number].buffType[index]); + writer.Write((short) Main.npc[number].buffTime[index]); + } + break; + case 55: + writer.Write((byte) number); + writer.Write((byte) 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); + 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 bitsByte16 = (BitsByte) (byte) 0; + bitsByte16[0] = (number & 1) == 1; + bitsByte16[1] = (number & 2) == 2; + bitsByte16[2] = (number5 & 1) == 1; + bitsByte16[3] = (number5 & 2) == 2; + writer.Write((byte) bitsByte16); + writer.Write((short) number2); + writer.Write(number3); + writer.Write(number4); + 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 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); + 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 >= 267) + index3 = 1; + int num14 = NPC.killCount[index3]; + writer.Write((short) index3); + writer.Write(num14); + break; + case 84: + byte num15 = (byte) number; + float stealth = Main.player[(int) num15].stealth; + writer.Write(num15); + writer.Write(stealth); + break; + case 85: + byte num16 = (byte) number; + writer.Write(num16); + 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 bitsByte17 = (BitsByte) (byte) number2; + BitsByte bitsByte18 = (BitsByte) (byte) number3; + writer.Write((short) number); + writer.Write((byte) bitsByte17); + Item obj4 = Main.item[number]; + if (bitsByte17[0]) + writer.Write(obj4.color.PackedValue); + if (bitsByte17[1]) + writer.Write((ushort) obj4.damage); + if (bitsByte17[2]) + writer.Write(obj4.knockBack); + if (bitsByte17[3]) + writer.Write((ushort) obj4.useAnimation); + if (bitsByte17[4]) + writer.Write((ushort) obj4.useTime); + if (bitsByte17[5]) + writer.Write((short) obj4.shoot); + if (bitsByte17[6]) + writer.Write(obj4.shootSpeed); + if (bitsByte17[7]) + { + writer.Write((byte) bitsByte18); + if (bitsByte18[0]) + writer.Write((ushort) obj4.width); + if (bitsByte18[1]) + writer.Write((ushort) obj4.height); + if (bitsByte18[2]) + writer.Write(obj4.scale); + if (bitsByte18[3]) + writer.Write((short) obj4.ammo); + if (bitsByte18[4]) + writer.Write((short) obj4.useAmmo); + if (bitsByte18[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) obj5.stack); + break; + case 91: + writer.Write(number); + writer.Write((byte) number2); + if ((double) number2 != (double) byte.MaxValue) + { + writer.Write((ushort) number3); + writer.Write((byte) number4); + writer.Write((byte) number5); + if (number5 < 0) + { + writer.Write((short) number6); + break; + } + break; + } + break; + case 92: + writer.Write((short) number); + writer.Write(number2); + writer.Write(number3); + writer.Write(number4); + break; + case 95: + writer.Write((ushort) number); + break; + case 96: + writer.Write((byte) number); + Player player5 = Main.player[number]; + writer.Write((short) number4); + writer.Write(number2); + writer.Write(number3); + writer.WriteVector2(player5.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((byte) 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((short) number2); + writer.Write((short) 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; + } + 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.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[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 index4 = 0; index4 < 256; ++index4) + { + if (index4 != ignoreClient && NetMessage.buffer[index4].broadcast) + { + if (Netplay.Clients[index4].IsConnected()) + { + try + { + ++NetMessage.buffer[index4].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index4].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index4].ServerWriteCallBack)); + } + catch + { + } + } + } + } + ++Main.player[number].netSkip; + if (Main.player[number].netSkip > 2) + { + Main.player[number].netSkip = 0; + break; + } + break; + case 20: + for (int index5 = 0; index5 < 256; ++index5) + { + if (index5 != ignoreClient && NetMessage.buffer[index5].broadcast && Netplay.Clients[index5].IsConnected()) + { + if (Netplay.Clients[index5].SectionRange(number, (int) number2, (int) number3)) + { + try + { + ++NetMessage.buffer[index5].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index5].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index5].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 23: + NPC npc3 = Main.npc[number]; + for (int index6 = 0; index6 < 256; ++index6) + { + if (index6 != ignoreClient && NetMessage.buffer[index6].broadcast && Netplay.Clients[index6].IsConnected()) + { + bool flag3 = false; + if (npc3.boss || npc3.netAlways || npc3.townNPC || !npc3.active) + flag3 = true; + else if (npc3.netSkip <= 0) + { + Rectangle rect1 = Main.player[index6].getRect(); + Rectangle rect2 = npc3.getRect(); + rect2.X -= 2500; + rect2.Y -= 2500; + rect2.Width += 5000; + rect2.Height += 5000; + if (rect1.Intersects(rect2)) + flag3 = true; + } + else + flag3 = true; + if (flag3) + { + try + { + ++NetMessage.buffer[index6].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index6].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index6].ServerWriteCallBack)); + } + catch + { + } + } + } + } + ++npc3.netSkip; + if (npc3.netSkip > 4) + { + npc3.netSkip = 0; + break; + } + break; + case 27: + Projectile projectile2 = Main.projectile[number]; + for (int index7 = 0; index7 < 256; ++index7) + { + if (index7 != ignoreClient && NetMessage.buffer[index7].broadcast && Netplay.Clients[index7].IsConnected()) + { + bool flag4 = false; + if (projectile2.type == 12 || Main.projPet[projectile2.type] || projectile2.aiStyle == 11 || projectile2.netImportant) + { + flag4 = true; + } + else + { + Rectangle rect3 = Main.player[index7].getRect(); + Rectangle rect4 = projectile2.getRect(); + rect4.X -= 5000; + rect4.Y -= 5000; + rect4.Width += 10000; + rect4.Height += 10000; + if (rect3.Intersects(rect4)) + flag4 = true; + } + if (flag4) + { + try + { + ++NetMessage.buffer[index7].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index7].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index7].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 28: + NPC npc4 = Main.npc[number]; + for (int index8 = 0; index8 < 256; ++index8) + { + if (index8 != ignoreClient && NetMessage.buffer[index8].broadcast && Netplay.Clients[index8].IsConnected()) + { + bool flag5 = false; + if (npc4.life <= 0) + { + flag5 = true; + } + else + { + Rectangle rect5 = Main.player[index8].getRect(); + Rectangle rect6 = npc4.getRect(); + rect6.X -= 3000; + rect6.Y -= 3000; + rect6.Width += 6000; + rect6.Height += 6000; + if (rect5.Intersects(rect6)) + flag5 = true; + } + if (flag5) + { + try + { + ++NetMessage.buffer[index8].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index8].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index8].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 34: + case 69: + for (int index9 = 0; index9 < 256; ++index9) + { + if (index9 != ignoreClient && NetMessage.buffer[index9].broadcast) + { + if (Netplay.Clients[index9].IsConnected()) + { + try + { + ++NetMessage.buffer[index9].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index9].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index9].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + default: + for (int index10 = 0; index10 < 256; ++index10) + { + if (index10 != ignoreClient && (NetMessage.buffer[index10].broadcast || Netplay.Clients[index10].State >= 3 && msgType == 10)) + { + if (Netplay.Clients[index10].IsConnected()) + { + try + { + ++NetMessage.buffer[index10].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[index10].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index10].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + } + } + else if (Netplay.Clients[remoteClient].IsConnected()) + { + try + { + ++NetMessage.buffer[remoteClient].spamCount; + ++Main.txMsg; + Main.txData += position2; + ++Main.txMsgType[msgType]; + Main.txDataType[msgType] += position2; + Netplay.Clients[remoteClient].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[remoteClient].ServerWriteCallBack)); + } + catch + { + } + } + if (Main.verboseNetplay) + { + int num17 = 0; + while (num17 < position2) + ++num17; + for (int index11 = 0; index11 < position2; ++index11) + { + int num18 = (int) NetMessage.buffer[whoAmi].writeBuffer[index11]; + } + } + 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; + } + } + + 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[1000]; + 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[13]; + 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) 378 && (int) tile.frameX % 36 == 0 && tile.frameY == (short) 0) + { + int num12 = TETrainingDummy.Find(index4, index3); + if (num12 != -1) + numArray3[(int) num3++] = (short) num12; + } + if (tile.type == (ushort) 395 && (int) tile.frameX % 36 == 0 && tile.frameY == (short) 0) + { + int num13 = TEItemFrame.Find(index4, index3); + if (num13 != -1) + numArray3[(int) num3++] = (short) num13; + } + 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 != (byte) 0) + { + num5 |= (byte) 4; + buffer[index1] = 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 num14 = !tile.halfBrick() ? (tile.slope() == (byte) 0 ? 0 : (int) tile.slope() + 1 << 4) : 16; + byte num15 = (byte) ((uint) num8 | (uint) (byte) num14); + if (tile.actuator()) + num7 |= (byte) 2; + if (tile.inActive()) + num7 |= (byte) 4; + if (tile.wire4()) + num7 |= (byte) 32; + index2 = 2; + if (num7 != (byte) 0) + { + num15 |= (byte) 1; + buffer[index2] = num7; + --index2; + } + if (num15 != (byte) 0) + { + num5 |= (byte) 1; + buffer[index2] = num15; + --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 = 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); + } + 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 num8 = reader.ReadInt16(); + for (int index = 0; index < (int) num8; ++index) + { + short num9 = reader.ReadInt16(); + short num10 = reader.ReadInt16(); + short num11 = reader.ReadInt16(); + string str = reader.ReadString(); + if (num9 >= (short) 0 && num9 < (short) 1000) + { + if (Main.chest[(int) num9] == null) + Main.chest[(int) num9] = new Chest(); + Main.chest[(int) num9].name = str; + Main.chest[(int) num9].x = (int) num10; + Main.chest[(int) num9].y = (int) num11; + } + } + short num12 = reader.ReadInt16(); + for (int index = 0; index < (int) num12; ++index) + { + short num13 = reader.ReadInt16(); + short num14 = reader.ReadInt16(); + short num15 = reader.ReadInt16(); + string str = reader.ReadString(); + if (num13 >= (short) 0 && num13 < (short) 1000) + { + if (Main.sign[(int) num13] == null) + Main.sign[(int) num13] = new Sign(); + Main.sign[(int) num13].text = str; + Main.sign[(int) num13].x = (int) num14; + Main.sign[(int) num13].y = (int) num15; + } + } + short num16 = reader.ReadInt16(); + for (int index = 0; index < (int) num16; ++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 + { + 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 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)); + } + + 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 == "") + NetMessage.SendChatMessageToClient(NetworkText.FromFormattable("{0} {1}!", (object) Lang.mp[18].ToNetworkText(), (object) Main.worldName), new Color((int) byte.MaxValue, 240, 20), plr); + else + NetMessage.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; + } + NetMessage.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); + 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.TypeToHeadIndex(Main.npc[number].type) != -1) + { + 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 index = 0; index < (int) byte.MaxValue; ++index) + { + if (Netplay.Clients[index].State == 10 && Netplay.Clients[index].Socket.GetRemoteAddress().IsLocalHost()) + { + flag = true; + break; + } + } + if (flag) + return; + Console.WriteLine(Language.GetTextValue("Net.ServerAutoShutdown")); + WorldFile.saveWorld(); + Netplay.disconnect = true; + } + + 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); + 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); + 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; + NetMessage.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) + return; + Netplay.Clients[plr].IsAnnouncementCompleted = false; + NetMessage.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"; + } + } + } +} diff --git a/Netplay.cs b/Netplay.cs new file mode 100644 index 0000000..446d7c8 --- /dev/null +++ b/Netplay.cs @@ -0,0 +1,614 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Netplay +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.Net; +using System.Net.Sockets; +using System.Threading; +using Terraria.IO; +using Terraria.Localization; +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 IsServerRunning = false; + public static bool IsListening = true; + public static bool UseUPNP = true; + public static bool disconnect = false; + public static bool spamCheck = false; + public static bool anyClients = false; + private static Thread ServerThread; + public static string portForwardIP; + public static int portForwardPort; + public static bool portForwardOpen; + + public static event Action OnDisconnect; + + private static void OpenPort() + { + Netplay.portForwardIP = Netplay.GetLocalIPAddress(); + Netplay.portForwardPort = Netplay.ListenPort; + } + + public static void closePort() + { + } + + public 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; + } + + public static void ResetNetDiag() + { + Main.rxMsg = 0; + Main.rxData = 0; + Main.txMsg = 0; + Main.txData = 0; + for (int index = 0; index < Main.maxMsg; ++index) + { + Main.rxMsgType[index] = 0; + Main.rxDataType[index] = 0; + Main.txMsgType[index] = 0; + Main.txDataType[index] = 0; + } + } + + 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; + } + + public static void newRecent() + { + 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(object threadContext) + { + 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()) + { + if (NetMessage.buffer[256].checkBytes) + NetMessage.CheckBytes(); + 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.windSpeed = Main.windSpeedSet; + 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.SwitchNetMode(0); + Player.SavePlayer(Main.ActivePlayerFileData); + Main.ActivePlayerFileData.StopPlayTimer(); + Main.gameMenu = true; + Main.StopTrackedSounds(); + 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; + } + + private static void OnConnectionAccepted(ISocket client) + { + int nextOpenClientSlot = Netplay.FindNextOpenClientSlot(); + if (nextOpenClientSlot != -1) + { + Netplay.Clients[nextOpenClientSlot].Reset(); + Netplay.Clients[nextOpenClientSlot].Socket = client; + Console.WriteLine(Language.GetTextValue("Net.ClientConnecting", (object) client.GetRemoteAddress())); + } + if (Netplay.FindNextOpenClientSlot() != -1) + return; + Netplay.StopListening(); + } + + 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 ServerLoop(object threadContext) + { + 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) + { + try + { + Netplay.OpenPort(); + } + catch + { + } + } + int num1 = 0; + while (!Netplay.disconnect) + { + if (!Netplay.IsListening) + { + int num2 = -1; + for (int index = 0; index < Main.maxNetPlayers; ++index) + { + if (!Netplay.Clients[index].IsConnected()) + { + num2 = index; + break; + } + } + if (num2 >= 0) + { + if (Main.ignoreErrors) + { + try + { + Netplay.StartListening(); + Netplay.IsListening = true; + } + catch + { + } + } + else + { + Netplay.StartListening(); + Netplay.IsListening = true; + } + } + } + int num3 = 0; + for (int index = 0; index < 256; ++index) + { + if (NetMessage.buffer[index].checkBytes) + NetMessage.CheckBytes(index); + if (Netplay.Clients[index].PendingTermination) + { + Netplay.Clients[index].Reset(); + NetMessage.SyncDisconnectedPlayer(index); + } + else if (Netplay.Clients[index].IsConnected()) + { + if (!Netplay.Clients[index].IsActive) + Netplay.Clients[index].State = 0; + Netplay.Clients[index].IsActive = true; + ++num3; + if (!Netplay.Clients[index].IsReading) + { + try + { + if (Netplay.Clients[index].Socket.IsDataAvailable()) + { + Netplay.Clients[index].IsReading = true; + Netplay.Clients[index].Socket.AsyncReceive(Netplay.Clients[index].ReadBuffer, 0, Netplay.Clients[index].ReadBuffer.Length, new SocketReceiveCallback(Netplay.Clients[index].ServerReadCallBack)); + } + } + catch + { + Netplay.Clients[index].PendingTermination = true; + } + } + if (Netplay.Clients[index].StatusMax > 0 && Netplay.Clients[index].StatusText2 != "") + { + if (Netplay.Clients[index].StatusCount >= Netplay.Clients[index].StatusMax) + { + Netplay.Clients[index].StatusText = Language.GetTextValue("Net.ClientStatusComplete", (object) Netplay.Clients[index].Socket.GetRemoteAddress(), (object) Netplay.Clients[index].Name, (object) Netplay.Clients[index].StatusText2); + Netplay.Clients[index].StatusText2 = ""; + Netplay.Clients[index].StatusMax = 0; + Netplay.Clients[index].StatusCount = 0; + } + else + Netplay.Clients[index].StatusText = "(" + (object) Netplay.Clients[index].Socket.GetRemoteAddress() + ") " + Netplay.Clients[index].Name + " " + Netplay.Clients[index].StatusText2 + ": " + (object) (int) ((double) Netplay.Clients[index].StatusCount / (double) Netplay.Clients[index].StatusMax * 100.0) + "%"; + } + else if (Netplay.Clients[index].State == 0) + Netplay.Clients[index].StatusText = Language.GetTextValue("Net.ClientConnecting", (object) string.Format("({0}) {1}", (object) Netplay.Clients[index].Socket.GetRemoteAddress(), (object) Netplay.Clients[index].Name)); + else if (Netplay.Clients[index].State == 1) + Netplay.Clients[index].StatusText = Language.GetTextValue("Net.ClientSendingData", (object) Netplay.Clients[index].Socket.GetRemoteAddress(), (object) Netplay.Clients[index].Name); + else if (Netplay.Clients[index].State == 2) + Netplay.Clients[index].StatusText = Language.GetTextValue("Net.ClientRequestedWorldInfo", (object) Netplay.Clients[index].Socket.GetRemoteAddress(), (object) Netplay.Clients[index].Name); + else if (Netplay.Clients[index].State != 3) + { + if (Netplay.Clients[index].State == 10) + { + try + { + Netplay.Clients[index].StatusText = Language.GetTextValue("Net.ClientPlaying", (object) Netplay.Clients[index].Socket.GetRemoteAddress(), (object) Netplay.Clients[index].Name); + } + catch (Exception ex) + { + Netplay.Clients[index].PendingTermination = true; + } + } + } + } + else if (Netplay.Clients[index].IsActive) + { + Netplay.Clients[index].PendingTermination = true; + } + else + { + Netplay.Clients[index].StatusText2 = ""; + if (index < (int) byte.MaxValue) + { + int num4 = Main.player[index].active ? 1 : 0; + Main.player[index].active = false; + if (num4 != 0) + Player.Hooks.PlayerDisconnect(index); + } + } + } + ++num1; + if (num1 > 10) + { + Thread.Sleep(1); + num1 = 0; + } + else + Thread.Sleep(0); + if (!WorldGen.saveLock && !Main.dedServ) + Main.statusText = num3 != 0 ? Language.GetTextValue("Net.ClientsConnected", (object) num3) : Language.GetTextValue("Net.WaitingForClients"); + Netplay.anyClients = num3 != 0; + Netplay.IsServerRunning = true; + } + Netplay.StopListening(); + try + { + Netplay.closePort(); + } + catch + { + } + for (int index = 0; index < 256; ++index) + Netplay.Clients[index].Reset(); + if (Main.menuMode != 15) + { + Main.netMode = 0; + Main.menuMode = 10; + WorldFile.saveWorld(); + do + ; + while (WorldGen.saveLock); + Main.menuMode = 0; + } + else + Main.netMode = 0; + Main.myPlayer = 0; + } + + public static void StartSocialClient(ISocket socket) => ThreadPool.QueueUserWorkItem(new WaitCallback(Netplay.SocialClientLoop), (object) socket); + + public static void StartTcpClient() => ThreadPool.QueueUserWorkItem(new WaitCallback(Netplay.TcpClientLoop), (object) 1); + + public static void StartServer() + { + Netplay.ServerThread = new Thread(new ParameterizedThreadStart(Netplay.ServerLoop)); + Netplay.ServerThread.Start(); + } + + public static bool SetRemoteIP(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 Initialize() + { + NetMessage.buffer[256] = new MessageBuffer(); + NetMessage.buffer[256].whoAmI = 256; + } + + public static int GetSectionX(int x) => x / 200; + + public static int GetSectionY(int y) => y / 150; + } +} diff --git a/ObjectData/TileObjectData.cs b/ObjectData/TileObjectData.cs new file mode 100644 index 0000000..33621a2 --- /dev/null +++ b/ObjectData/TileObjectData.cs @@ -0,0 +1,3278 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ObjectData.TileObjectData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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.HookCheck = new PlacementHook(); + this.HookPostPlaceEveryone = new PlacementHook(); + this.HookPostPlaceMyPlayer = new PlacementHook(); + this.HookPlaceOverride = new PlacementHook(); + this.SubTiles = new List(470); + 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 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 HookCheck + { + get => this._placementHooks == null ? TileObjectData._baseObject.HookCheck : 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 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 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 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(470); + for (int index = 0; index < 470; ++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.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] + { + 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 | 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.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.addTile(270); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.addTile(271); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + 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.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, + 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(298); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(299); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(310); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(339); + 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.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.DrawYOffset = 2; + 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 = 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.DrawYOffset = 2; + TileObjectData.addTile(349); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.addTile(337); + 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(465); + 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.addTile(105); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + 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.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(269); + 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.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.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.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.HookCheck = 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[1] + { + (int) sbyte.MaxValue + }; + 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.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.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.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(187); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + 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.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.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.addTile(102); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(463); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 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.HookCheck = 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[1] + { + (int) sbyte.MaxValue + }; + 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.HookCheck = 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[1] + { + (int) sbyte.MaxValue + }; + 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[1] + { + (int) sbyte.MaxValue + }; + 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[1] + { + (int) sbyte.MaxValue + }; + 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[2] + { + 2, + 109 + }; + 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.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.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 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.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.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.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.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.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.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.addTile(282); + 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.Style6x3); + TileObjectData.addTile(358); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(359); + 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(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.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(354); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(355); + 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(425); + 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.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, + 20 + }; + TileObjectData.addTile(216); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.addTile(390); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.addTile(338); + 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.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.AlternateTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorAlternateTiles = new int[2] + { + 420, + 419 + }; + TileObjectData.newAlternate.UsesCustomCanPlace = true; + 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.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.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.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[1] + { + 124 + }; + 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[1] + { + 124 + }; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleSwitch); + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.addAlternate(3); + 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[1] + { + 124 + }; + 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[1] + { + 124 + }; + 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.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.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newAlternate.DrawStepDown = -4; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[1] + { + 124 + }; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[1] + { + 124 + }; + TileObjectData.addAlternate(3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 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[2] + { + 2, + 109 + }; + 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.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.AnchorWall = true; + 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.AnchorValidWalls = new int[1]; + TileObjectData.newTile.AnchorValidTiles = new int[2] + { + 2, + 109 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.LavaDeath = true; + 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[1] + { + 2 + }; + 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[1] + { + 109 + }; + 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.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, + 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) == 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..4a32fe3 --- /dev/null +++ b/PartyHatColor.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.PartyHatColor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Player.cs b/Player.cs new file mode 100644 index 0000000..1c923a7 --- /dev/null +++ b/Player.cs @@ -0,0 +1,27554 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Player +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI; +using Terraria.GameInput; +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.World.Generation; + +namespace Terraria +{ + public class Player : Entity + { + 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[10]; + public int lostCoins; + public string lostCoinString = ""; + public int soulDrain; + public float drainBoost; + public bool dd2Accessory; + private static float _blizzardSoundVolume = 0.0f; + private static SlotId _strongBlizzardSound = (SlotId) SlotId.Invalid; + private static SlotId _weakBlizzardSound = (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 bool[] NPCBannerBuff = new bool[267]; + public bool hasBanner; + public Vector2 lastDeathPostion; + public DateTime lastDeathTime; + public bool showLastDeath; + public int extraAccessorySlots = 2; + public bool extraAccessory; + 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 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 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 noBuilding; + public int ropeCount; + public int manaRegenBonus; + public int manaRegenDelayBonus; + 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 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 flapSound; + public bool iceBarrier; + public bool dangerSense; + 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 byte iceBarrierFrame; + public byte iceBarrierFrameCounter; + public bool shadowDodge; + public float shadowDodgeCount; + public bool palladiumRegen; + public bool onHitDodge; + public bool onHitRegen; + public bool onHitPetal; + 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 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 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 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; + 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 activeNPCs; + 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 int itemAnimation; + public int itemAnimationMax; + public int itemTime; + public int toolTime; + 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[206]; + 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 string setBonus = ""; + public Item[] inventory = new Item[59]; + public bool[] inventoryChestStack = new bool[59]; + public Chest bank = new Chest(true); + public Chest bank2 = new Chest(true); + public Chest bank3 = new Chest(true); + 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 int attackCD; + public int potionDelay; + public byte difficulty; + public byte wetSlime; + public HitTile hitTile; + 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[] hideVisual = 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 tileInteractionHappened; + public bool tileInteractAttempted; + 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 showItemIcon; + public bool showItemIconR; + public int showItemIcon2; + public string showItemIconText = ""; + 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 int anglerQuestsFinished; + 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 ammoCost80; + public bool ammoCost75; + public int stickyBreak; + public bool magicQuiver; + public bool magmaStone; + public bool lavaRose; + public int phantasmTime; + public bool ammoBox; + public bool ammoPotion; + public bool chaosState; + public bool strongBees; + public bool sporeSac; + public bool shinyStone; + public int yoraiz0rEye; + public bool yoraiz0rDarkness; + public bool leinforsHair; + 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 magicLantern; + public bool rabid; + public bool sunflower; + public bool wellFed; + public bool puppy; + public bool grinch; + public bool miniMinotaur; + public bool arcticDivingGear; + 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 companionCube; + public bool babyFaceMonster; + public bool magicCuffs; + public bool coldDash; + public bool sailDash; + 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 onFire; + public bool onFire2; + public bool noItems; + 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 brokenArmor; + public bool silence; + public bool slow; + public bool gross; + public bool tongued; + public bool kbGlove; + public bool kbBuff; + public bool starCloak; + 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 int meleeCrit = 4; + public int rangedCrit = 4; + public int magicCrit = 4; + public int thrownCrit = 4; + public float meleeDamage = 1f; + public float rangedDamage = 1f; + public float thrownDamage = 1f; + public float bulletDamage = 1f; + public float arrowDamage = 1f; + public float rocketDamage = 1f; + public float magicDamage = 1f; + public float minionDamage = 1f; + public float minionKB; + public float meleeSpeed = 1f; + public float thrownVelocity = 1f; + public bool thrownCost50; + public bool thrownCost33; + 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 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[470]; + public bool[] oldAdjTile = new bool[470]; + public static int defaultItemGrabRange = 38; + private static float itemGrabSpeed = 0.45f; + private static float itemGrabSpeedMax = 4f; + public byte hairDye; + public Color hairDyeColor = Color.Transparent; + public float hairDyeVar; + 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 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 int bestOre = -1; + public bool accCritterGuide; + public byte accCritterGuideCounter; + public byte accCritterGuideNumber; + public bool accDreamCatcher; + 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 doubleJumpCloud; + public bool jumpAgainCloud; + public bool dJumpEffectCloud; + public bool doubleJumpSandstorm; + public bool jumpAgainSandstorm; + public bool dJumpEffectSandstorm; + public bool doubleJumpBlizzard; + public bool jumpAgainBlizzard; + public bool dJumpEffectBlizzard; + public bool doubleJumpFart; + public bool jumpAgainFart; + public bool dJumpEffectFart; + public bool doubleJumpSail; + public bool jumpAgainSail; + public bool dJumpEffectSail; + public bool doubleJumpUnicorn; + public bool jumpAgainUnicorn; + public bool dJumpEffectUnicorn; + public bool autoJump; + public bool justJumped; + public float jumpSpeedBoost; + public int extraFall; + 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 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 bee; + public int wireOperationsCooldown; + public int lastChest; + public int flyingPigChest = -1; + public int chest = -1; + public int chestX; + public int chestY; + public int talkNPC = -1; + public int fallStart; + public int fallStart2; + public int potionDelayTime = Item.potionDelay; + public int restorationDelayTime = Item.restorationDelay; + 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 cGrapple; + public int cMount; + public int cMinecart; + public int cPet; + public int cLight; + public int cYorai; + public int[] ownedProjectileCounts = new int[714]; + public bool[] npcTypeNoAggro = new bool[580]; + public int lastPortalColorIndex; + public int _portalPhysicsTime; + public bool portalPhysicsFlag; + public float MountFishronSpecialCounter; + public Vector2 MinionRestTargetPoint = Vector2.Zero; + public int MinionAttackTargetNPC = -1; + public List TouchedTiles = new List(); + public static int StopMoneyTroughFromWorking = 3; + private bool makeStrongBee; + public bool behindBackWall; + public int _funkytownCheckCD; + private float _stormShaderObstruction = 1f; + private float _shaderObstructionInternalValue = 1f; + private int _quickGrappleCooldown; + 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; + public int[] hurtCooldowns = new int[2]; + public static bool lastPound = true; + + public Vector2 BlehOldPositionFixer => -Vector2.UnitY; + + public Vector2 MountedCenter + { + get => new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + 21f + (float) this.mount.PlayerOffsetHitbox); + set => this.position = new Vector2(value.X - (float) (this.width / 2), value.Y - 21f - (float) this.mount.PlayerOffsetHitbox); + } + + 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 RotatedRelativePoint(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 bool CCed => this.frozen || this.webbed || this.stoned; + + public bool ExtraAccessorySlotsShouldShow => this.extraAccessorySlots > 0 || this.armor[8].type > 0 || this.armor[18].type > 0 || this.dye[8].type > 0; + + 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 ZoneHoly + { + 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 Vector2 Directions => new Vector2((float) this.direction, this.gravDir); + + public Item HeldItem => this.inventory[this.selectedItem]; + + public Vector2 DefaultSize => new Vector2(20f, 42f); + + public bool PortalPhysicsEnabled => this._portalPhysicsTime > 0 && !this.mount.Active; + + public bool MountFishronSpecial => this.statLife < this.statLifeMax2 / 2 || this.wet && !this.lavaWet && !this.honeyWet || this.dripping || (double) this.MountFishronSpecialCounter > 0.0; + + public bool HasMinionRestTarget => this.MinionRestTargetPoint != Vector2.Zero; + + public bool HasMinionAttackTargetNPC => this.MinionAttackTargetNPC != -1; + + 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 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; + Main.PlaySound(11); + } + else if (PlayerInput.InBuildingMode) + { + PlayerInput.ExitBuildingMode(); + Main.PlaySound(11); + } + 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.talkNPC = -1; + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + Main.PlaySound(11); + if (PlayerInput.UsingGamepad) + Main.npcChatRelease = false; + } + else if (this.sign >= 0) + { + this.sign = -1; + Main.editSign = false; + Main.npcChatText = ""; + Main.PlaySound(11); + } + else if (Main.clothesWindow) + Main.CancelClothesWindow(); + else if (!Main.playerInventory) + { + Recipe.FindRecipes(); + Main.playerInventory = true; + Main.EquipPageSelected = 0; + Main.PlaySound(10); + } + else + { + Main.playerInventory = false; + if (!PlayerInput.UsingGamepad) + { + Main.EquipPageSelected = 0; + } + else + { + PlayerInput.NavigatorUnCachePosition(); + Main.GamepadCursorAlpha = 0.0f; + Player.StopMoneyTroughFromWorking = 3; + } + Main.PlaySound(11); + if (ItemSlot.Options.HighlightNewItems) + { + foreach (Item obj in this.inventory) + obj.newAndShiny = false; + } + } + if (!interactAreShared) + return; + this.GamepadEnableGrappleCooldown(); + } + + public void dropItemCheck() + { + if (!Main.playerInventory) + this.noThrow = 0; + if (this.noThrow > 0) + --this.noThrow; + if (!Main.InGuideCraftMenu && Main.guideItem.type > 0) + { + Main.guideItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, Main.guideItem, noText: true); + 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, noText: true); + 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.itemTime == 0 && this.itemAnimation == 0) + this.selectedItem = this.oldSelectItem; + if (WorldGen.InWorld(Player.tileTargetX, Player.tileTargetY) && Main.tile[Player.tileTargetX, Player.tileTargetY] != null && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 334 && this.ItemFitsWeaponRack(this.inventory[this.selectedItem])) + this.noThrow = 2; + if (WorldGen.InWorld(Player.tileTargetX, Player.tileTargetY) && Main.tile[Player.tileTargetX, Player.tileTargetY] != null && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 395 && this.ItemFitsItemFrame(this.inventory[this.selectedItem])) + this.noThrow = 2; + if (Main.mouseItem.type > 0 && !Main.playerInventory) + { + Main.mouseItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, Main.mouseItem, noText: true); + if (obj.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj.type, obj.stack, 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 flag1 = false; + if (this.inventory[this.selectedItem].favorited) + { + this.inventory[this.selectedItem] = this.GetItem(this.whoAmI, this.inventory[this.selectedItem], noText: true); + if (this.selectedItem == 58) + Main.mouseItem = this.inventory[this.selectedItem]; + Recipe.FindRecipes(); + if (this.inventory[this.selectedItem].type == 0) + flag1 = true; + } + if (flag1) + return; + Item obj = new Item(); + bool flag2 = false; + 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; + flag2 = true; + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.inventory[this.selectedItem].type); + if (!flag2 && this.inventory[this.selectedItem].type == 8 && this.inventory[this.selectedItem].stack > 1) + { + --this.inventory[this.selectedItem].stack; + } + else + { + 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.itemAnimation = 10; + this.itemAnimationMax = 10; + } + Recipe.FindRecipes(); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number); + } + + 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 time1, bool quiet = true) + { + if (this.buffImmune[type]) + return; + 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.expertDebuffTime * (double) num); + if (!quiet && Main.netMode == 1) + { + bool flag = true; + for (int index = 0; index < 22; ++index) + { + if (this.buffType[index] == type) + { + flag = false; + break; + } + } + if (flag) + NetMessage.SendData(55, number: this.whoAmI, number2: ((float) type), number3: ((float) num)); + } + int index1 = -1; + for (int index2 = 0; index2 < 22; ++index2) + { + if (this.buffType[index2] == type) + { + if (type == 94) + { + this.buffTime[index2] += num; + if (this.buffTime[index2] <= Player.manaSickTimeMax) + return; + this.buffTime[index2] = Player.manaSickTimeMax; + return; + } + if (this.buffTime[index2] >= num) + return; + this.buffTime[index2] = num; + return; + } + } + if (Main.vanityPet[type] || Main.lightPet[type]) + { + for (int b = 0; b < 22; ++b) + { + if (Main.vanityPet[type] && Main.vanityPet[this.buffType[b]]) + this.DelBuff(b); + if (Main.lightPet[type] && Main.lightPet[this.buffType[b]]) + this.DelBuff(b); + } + } + while (index1 == -1) + { + int b = -1; + for (int index3 = 0; index3 < 22; ++index3) + { + if (!Main.debuff[this.buffType[index3]]) + { + b = index3; + break; + } + } + if (b == -1) + return; + for (int index4 = b; index4 < 22; ++index4) + { + if (this.buffType[index4] == 0) + { + index1 = index4; + break; + } + } + if (index1 == -1) + this.DelBuff(b); + } + this.buffType[index1] = type; + this.buffTime[index1] = num; + if (!Main.meleeBuff[type]) + return; + for (int b = 0; b < 22; ++b) + { + if (b != index1 && Main.meleeBuff[this.buffType[b]]) + this.DelBuff(b); + } + } + + 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) + { + this.buffTime[index2 - 1] = this.buffTime[index2]; + this.buffType[index2 - 1] = this.buffType[index2]; + this.buffTime[index2] = 0; + this.buffType[index2] = 0; + } + } + } + } + + 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.noItems || this.statLife == this.statLifeMax2 || this.potionDelay > 0) + return; + Item itemToUse = this.QuickHeal_GetItemToUse(); + if (itemToUse == null) + return; + Main.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 (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.noItems || 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)) + { + Main.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.noItems) + return; + LegacySoundStyle type1 = (LegacySoundStyle) null; + for (int index1 = 0; index1 < 58; ++index1) + { + if (this.CountBuffs() == 22) + return; + if (this.inventory[index1].stack > 0 && this.inventory[index1].type > 0 && this.inventory[index1].buffType > 0 && !this.inventory[index1].summon && this.inventory[index1].buffType != 90) + { + int type2 = this.inventory[index1].buffType; + bool flag = true; + for (int index2 = 0; index2 < 22; ++index2) + { + if (type2 == 27 && (this.buffType[index2] == type2 || this.buffType[index2] == 101 || this.buffType[index2] == 102)) + { + flag = false; + break; + } + if (this.buffType[index2] == type2) + { + flag = false; + break; + } + if (Main.meleeBuff[type2] && Main.meleeBuff[this.buffType[index2]]) + { + flag = false; + break; + } + } + if (Main.lightPet[this.inventory[index1].buffType] || Main.vanityPet[this.inventory[index1].buffType]) + { + for (int index3 = 0; index3 < 22; ++index3) + { + if (Main.lightPet[this.buffType[index3]] && Main.lightPet[this.inventory[index1].buffType]) + flag = false; + if (Main.vanityPet[this.buffType[index3]] && Main.vanityPet[this.inventory[index1].buffType]) + flag = false; + } + } + if (this.inventory[index1].mana > 0 & flag) + { + if (this.statMana >= (int) ((double) this.inventory[index1].mana * (double) this.manaCost)) + { + this.manaRegenDelay = (int) this.maxRegenDelay; + this.statMana -= (int) ((double) this.inventory[index1].mana * (double) this.manaCost); + } + else + flag = false; + } + if (this.whoAmI == Main.myPlayer && this.inventory[index1].type == 603 && !Main.cEd) + flag = false; + if (type2 == 27) + { + type2 = Main.rand.Next(3); + if (type2 == 0) + type2 = 27; + if (type2 == 1) + type2 = 101; + if (type2 == 2) + type2 = 102; + } + if (flag) + { + type1 = this.inventory[index1].UseSound; + int time1 = this.inventory[index1].buffTime; + if (time1 == 0) + time1 = 3600; + this.AddBuff(type2, time1); + if (this.inventory[index1].consumable) + { + --this.inventory[index1].stack; + if (this.inventory[index1].stack <= 0) + this.inventory[index1].TurnToAir(); + } + } + } + } + if (type1 == null) + return; + Main.PlaySound(type1, this.position); + Recipe.FindRecipes(); + } + + 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.noItems) + return; + Item itemToUse = this.QuickMount_GetItemToUse(); + if (itemToUse != null && itemToUse.mountType != -1 && this.mount.CanMount(itemToUse.mountType, this)) + { + 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; + } + } + if (flag) + return; + this.mount.SetMount(itemToUse.mountType, this); + if (itemToUse.UseSound == null) + return; + Main.PlaySound(itemToUse.UseSound, this.Center); + } + else + { + 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); + } + } + } + + 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 QuickGrapple() + { + if (this.frozen || this.tongued || this.webbed || this.stoned) + 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.mount.Active) + this.mount.Dismount(this); + if (this.noItems) + return; + Item obj = (Item) null; + if (obj == null && 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; + } + } + } + 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; + Main.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) + { + 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) + { + 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 (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 void StatusNPC(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 StatusPvP(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; + this.controlUp = false; + this.controlLeft = false; + this.controlDown = false; + this.controlRight = false; + this.controlJump = false; + if (Main.hasFocus && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput) + PlayerInput.Triggers.Current.CopyInto(this); + 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; + } + + private void OldInputGhost() + { + Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + if (Main.blockKey != Keys.None.ToString()) + { + bool flag = false; + for (int index = 0; index < pressedKeys.Length; ++index) + { + if (pressedKeys[index].ToString() == Main.blockKey) + { + pressedKeys[index] = Keys.None; + flag = true; + } + } + if (!flag) + Main.blockKey = Keys.None.ToString(); + } + for (int index = 0; index < pressedKeys.Length; ++index) + { + string str = string.Concat((object) pressedKeys[index]); + if (str == Main.cUp) + this.controlUp = true; + if (str == Main.cLeft) + this.controlLeft = true; + if (str == Main.cDown) + this.controlDown = true; + if (str == Main.cRight) + this.controlRight = true; + if (str == Main.cJump) + this.controlJump = true; + } + } + + public void OnHit(float x, float y, Entity victim) + { + if (Main.myPlayer != this.whoAmI) + return; + 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 (this.difficulty == (byte) 2) + this.QuickSpawnItem(3763); + 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(3)) + { + case 0: + this.QuickSpawnItem(514); + break; + case 1: + this.QuickSpawnItem(426); + break; + case 2: + this.QuickSpawnItem(434); + 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); + switch (Main.rand.Next(8)) + { + 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(1294); + break; + case 5: + this.QuickSpawnItem(1295); + break; + case 6: + this.QuickSpawnItem(1296); + break; + case 7: + 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 (!this.HasItem(3384)) + this.QuickSpawnItem(3384); + this.QuickSpawnItem(3460, Main.rand.Next(90, 111)); + this.QuickSpawnItem(1131); + this.QuickSpawnItem(3577); + this.QuickSpawnItem(Utils.SelectRandom(Main.rand, 3063, 3389, 3065, 1553, 3546, 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; + } + 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 <= 0) + return; + NPC npc = new NPC(); + npc.SetDefaults(Type); + float num5 = npc.value * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + if (Main.rand.Next(5) == 0) + num5 *= (float) (1.0 + (double) Main.rand.Next(5, 11) * 0.00999999977648258); + if (Main.rand.Next(10) == 0) + num5 *= (float) (1.0 + (double) Main.rand.Next(10, 21) * 0.00999999977648258); + if (Main.rand.Next(15) == 0) + num5 *= (float) (1.0 + (double) Main.rand.Next(15, 31) * 0.00999999977648258); + if (Main.rand.Next(20) == 0) + num5 *= (float) (1.0 + (double) Main.rand.Next(20, 41) * 0.00999999977648258); + while ((int) num5 > 0) + { + if ((double) num5 > 1000000.0) + { + int stack = (int) ((double) num5 / 1000000.0); + num5 -= (float) (1000000 * stack); + this.QuickSpawnItem(74, stack); + } + else if ((double) num5 > 10000.0) + { + int stack = (int) ((double) num5 / 10000.0); + num5 -= (float) (10000 * stack); + this.QuickSpawnItem(73, stack); + } + else if ((double) num5 > 100.0) + { + int stack = (int) ((double) num5 / 100.0); + num5 -= (float) (100 * stack); + this.QuickSpawnItem(72, stack); + } + else + { + int stack = (int) num5; + if (stack < 1) + stack = 1; + num5 -= (float) stack; + this.QuickSpawnItem(71, stack); + } + } + } + + private void TryGettingDevArmor() + { + if (Main.rand.Next(20) != 0) + return; + switch (Main.rand.Next(14)) + { + 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(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(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; + } + } + + public void openCrate(int type) + { + int num = type - 2334; + if (type >= 3203) + num = type - 3203 + 3; + switch (num) + { + case 0: + bool flag1 = true; + while (flag1) + { + if (Main.hardMode & flag1 && 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); + flag1 = false; + } + if (flag1 && 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); + flag1 = false; + } + if (flag1 && 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); + flag1 = false; + } + if (Main.hardMode & flag1 && 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); + flag1 = 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); + flag1 = false; + } + if (!Main.hardMode & flag1 && 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); + flag1 = 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); + flag1 = false; + } + if (Main.rand.Next(7) == 0) + { + int Type = Main.rand.Next(8); + switch (Type) + { + 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; + case 7: + Type = 702; + break; + } + if (Main.hardMode && Main.rand.Next(2) == 0) + { + Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 364; + break; + case 1: + Type = 365; + break; + case 2: + Type = 366; + break; + case 3: + Type = 1104; + break; + case 4: + Type = 1105; + break; + case 5: + Type = 1106; + break; + } + } + int Stack = Main.rand.Next(8, 21); + 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); + flag1 = false; + } + if (Main.rand.Next(8) == 0) + { + int Type = Main.rand.Next(8); + switch (Type) + { + case 0: + Type = 20; + break; + case 1: + Type = 22; + break; + case 2: + Type = 21; + break; + case 3: + Type = 19; + break; + case 4: + Type = 703; + break; + case 5: + Type = 704; + break; + case 6: + Type = 705; + break; + case 7: + Type = 706; + break; + } + int Stack = Main.rand.Next(2, 8); + if (Main.hardMode && Main.rand.Next(2) == 0) + { + 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(2); + } + 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); + flag1 = 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); + flag1 = 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 1: + bool flag2 = true; + while (flag2) + { + if (Main.hardMode & flag2 && 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); + flag2 = false; + } + if (flag2 && 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); + flag2 = false; + } + if (flag2 && 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); + flag2 = false; + } + if (flag2 && 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); + flag2 = false; + } + if (flag2 && 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); + flag2 = false; + } + if (flag2 && 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); + flag2 = 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); + flag2 = false; + } + if (Main.rand.Next(4) == 0) + { + int Type = Main.rand.Next(8); + switch (Type) + { + case 0: + Type = 20; + break; + case 1: + Type = 22; + break; + case 2: + Type = 21; + break; + case 3: + Type = 19; + break; + case 4: + Type = 703; + break; + case 5: + Type = 704; + break; + case 6: + Type = 705; + break; + case 7: + Type = 706; + break; + } + int Stack = Main.rand.Next(6, 15); + if (Main.hardMode && Main.rand.Next(3) != 0) + { + 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(2); + } + 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); + flag2 = 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 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); + flag2 = false; + } + } + if (Main.rand.Next(2) == 0) + { + int number11 = 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: number11, number2: 1f); + } + if (Main.rand.Next(2) != 0) + break; + int number12 = 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: number12, number2: 1f); + break; + case 2: + bool flag3 = true; + while (flag3) + { + if (Main.hardMode & flag3 && Main.rand.Next(20) == 0) + { + int number13 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3064); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number13, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(10) == 0) + { + int number14 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2491); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number14, number2: 1f); + flag3 = false; + } + if (Main.rand.Next(3) == 0) + { + int number15 = 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: number15, number2: 1f); + flag3 = false; + } + 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 (Main.hardMode && Main.rand.Next(3) != 0) + { + 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(15, 31); + int number16 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number16, number2: 1f); + flag3 = 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 number17 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number17, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + int number18 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(499, 501), Main.rand.Next(5, 21)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number18, number2: 1f); + } + if (Main.rand.Next(3) == 0) + break; + int number19 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2676, Main.rand.Next(3, 8)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number19, number2: 1f); + break; + default: + int maxValue = 6; + bool flag4 = true; + while (flag4) + { + if (num == 3 && flag4 && 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 number20 = 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: number20, number2: 1f); + flag4 = false; + } + if (num == 4 && flag4 && 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 number21 = 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: number21, number2: 1f); + flag4 = false; + } + if (num == 5 && flag4 && Main.rand.Next(maxValue) == 0) + { + int number22 = 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: number22, number2: 1f); + flag4 = false; + } + if (num == 6 && flag4 && 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 number23 = 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: number23, number2: 1f); + flag4 = false; + } + if (num == 8 && flag4 && Main.rand.Next(maxValue) == 0) + { + 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 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); + flag4 = false; + } + if (Main.rand.Next(4) == 0) + { + int number25 = 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: number25, number2: 1f); + flag4 = 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 (Main.hardMode && Main.rand.Next(3) != 0) + { + 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 number26 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number26, number2: 1f); + flag4 = 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 number27 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number27, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + int number28 = 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: number28, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + int number29 = 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: number29, number2: 1f); + } + if (num != 3 && num != 4 && num != 7) + break; + if (Main.hardMode && Main.rand.Next(2) == 0) + { + int Type = 521; + if (num == 7) + Type = 520; + int Stack = Main.rand.Next(2, 6); + int number30 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number30, number2: 1f); + } + if (!Main.hardMode || Main.rand.Next(2) != 0) + break; + int Type1 = 522; + int Stack1 = Main.rand.Next(2, 6); + switch (num) + { + case 4: + Type1 = 1332; + break; + case 7: + Type1 = 502; + Stack1 = Main.rand.Next(4, 11); + break; + } + int number31 = 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: number31, 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 openLockBox() + { + bool flag = true; + while (flag) + { + flag = false; + int Type1; + switch (Main.rand.Next(7)) + { + case 1: + Type1 = 329; + break; + case 2: + Type1 = 155; + break; + case 3: + Type1 = 156; + break; + case 4: + Type1 = 157; + break; + case 5: + Type1 = 163; + break; + case 6: + Type1 = 113; + break; + default: + Type1 = 164; + break; + } + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type1, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number1, number2: 1f); + if (Main.rand.Next(3) == 0) + { + flag = false; + int Stack = Main.rand.Next(1, 4); + if (Main.rand.Next(2) == 0) + Stack += Main.rand.Next(2); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(3); + if (Main.rand.Next(4) == 0) + Stack += Main.rand.Next(3); + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 3); + int number2 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number2, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + flag = false; + int number3 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 72, Main.rand.Next(10, 100)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number3, number2: 1f); + } + if (Main.rand.Next(3) == 0) + { + flag = false; + int number4 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 188, Main.rand.Next(2, 6)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number4, number2: 1f); + } + if (Main.rand.Next(3) == 0) + { + flag = false; + int Type2; + switch (Main.rand.Next(9)) + { + case 0: + Type2 = 296; + break; + case 1: + Type2 = 2346; + break; + case 2: + Type2 = 305; + break; + case 3: + Type2 = 2323; + break; + case 4: + Type2 = 292; + break; + case 5: + Type2 = 294; + break; + case 6: + Type2 = 288; + break; + default: + Type2 = Main.netMode != 1 ? 2350 : 2997; + break; + } + int number5 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type2, Main.rand.Next(1, 4)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number5, 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 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(int plr) + { + 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.cGrapple = this.cMount = this.cMinecart = this.cPet = this.cLight = this.cYorai = 0; + if (this.dye[0] != null) + this.cHead = (int) this.dye[0].dye; + if (this.dye[1] != null) + this.cBody = (int) this.dye[1].dye; + if (this.dye[2] != null) + this.cLegs = (int) this.dye[2].dye; + if (this.wearsRobe) + this.cLegs = this.cBody; + if (this.miscDyes[0] != null) + this.cPet = (int) this.miscDyes[0].dye; + if (this.miscDyes[1] != null) + this.cLight = (int) this.miscDyes[1].dye; + if (this.miscDyes[2] != null) + this.cMinecart = (int) this.miscDyes[2].dye; + if (this.miscDyes[3] != null) + this.cMount = (int) this.miscDyes[3].dye; + if (this.miscDyes[4] != null) + this.cGrapple = (int) this.miscDyes[4].dye; + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = index1 % 10; + if (this.dye[index2] != null && this.armor[index1].type > 0 && this.armor[index1].stack > 0 && (index1 / 10 >= 1 || !this.hideVisual[index2] || this.armor[index1].wingSlot > (sbyte) 0 || this.armor[index1].type == 934)) + { + if (this.armor[index1].handOnSlot > (sbyte) 0 && this.armor[index1].handOnSlot < (sbyte) 20) + this.cHandOn = (int) this.dye[index2].dye; + if (this.armor[index1].handOffSlot > (sbyte) 0 && this.armor[index1].handOffSlot < (sbyte) 12) + this.cHandOff = (int) this.dye[index2].dye; + if (this.armor[index1].backSlot > (sbyte) 0 && this.armor[index1].backSlot < (sbyte) 14) + this.cBack = (int) this.dye[index2].dye; + if (this.armor[index1].frontSlot > (sbyte) 0 && this.armor[index1].frontSlot < (sbyte) 5) + this.cFront = (int) this.dye[index2].dye; + if (this.armor[index1].shoeSlot > (sbyte) 0 && this.armor[index1].shoeSlot < (sbyte) 18) + this.cShoe = (int) this.dye[index2].dye; + if (this.armor[index1].waistSlot > (sbyte) 0 && this.armor[index1].waistSlot < (sbyte) 13) + this.cWaist = (int) this.dye[index2].dye; + if (this.armor[index1].shieldSlot > (sbyte) 0 && this.armor[index1].shieldSlot < (sbyte) 7) + this.cShield = (int) this.dye[index2].dye; + if (this.armor[index1].neckSlot > (sbyte) 0 && this.armor[index1].neckSlot < (sbyte) 10) + this.cNeck = (int) this.dye[index2].dye; + if (this.armor[index1].faceSlot > (sbyte) 0 && this.armor[index1].faceSlot < (sbyte) 9) + this.cFace = (int) this.dye[index2].dye; + if (this.armor[index1].balloonSlot > (sbyte) 0 && this.armor[index1].balloonSlot < (sbyte) 18) + this.cBalloon = (int) this.dye[index2].dye; + if (this.armor[index1].wingSlot > (sbyte) 0 && this.armor[index1].wingSlot < (sbyte) 40) + this.cWings = (int) this.dye[index2].dye; + if (this.armor[index1].type == 934) + this.cCarpet = (int) this.dye[index2].dye; + } + } + this.cYorai = this.cPet; + } + + 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 index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i) + ++this.ownedProjectileCounts[Main.projectile[index].type]; + } + for (int index1 = 0; index1 < 22; ++index1) + { + if (this.buffType[index1] > 0 && this.buffTime[index1] > 0) + { + if (this.whoAmI == Main.myPlayer && this.buffType[index1] != 28) + --this.buffTime[index1]; + if (this.buffType[index1] == 1) + { + this.lavaImmune = true; + this.fireWalk = true; + this.buffImmune[24] = true; + } + else if (this.buffType[index1] == 158) + this.manaRegenBonus += 2; + else if (this.buffType[index1] == 159 && this.inventory[this.selectedItem].melee) + this.armorPenetration = 4; + 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] == 88) + this.chaosState = 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; + this.thrownCrit += 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] && (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.ByPlayer(this.whoAmI); + NetMessage.SendPlayerHurt(playerTargetIndex, reason, num2, 0, false, true, 0); + } + } + } + } + } + } + } + else if (this.buffType[index1] == 117) + { + this.thrownDamage += 0.1f; + 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] == 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 += 10 * 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; + this.thrownDamage += 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] == 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] == 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] == 118) + { + this.mount.SetMount(6, this, true); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 138) + { + this.mount.SetMount(6, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 167) + { + this.mount.SetMount(11, this, true); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 166) + { + this.mount.SetMount(11, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 184) + { + this.mount.SetMount(13, this, true); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 185) + { + this.mount.SetMount(13, 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] == 37) + { + if (Main.wof >= 0 && Main.npc[Main.wof].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.CommonPetBuffHandle(index1, ref this.companionCube, 653); + else if (this.buffType[index1] == 202) + this.CommonPetBuffHandle(index1, ref this.petFlagDD2Dragon, 701); + else if (this.buffType[index1] == 200) + this.CommonPetBuffHandle(index1, ref this.petFlagDD2Gato, 703); + else if (this.buffType[index1] == 201) + this.CommonPetBuffHandle(index1, ref this.petFlagDD2Ghost, 702); + 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.thrownDamage += 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 index4 = 0; index4 < 1000; ++index4) + { + if (Main.projectile[index4].active && Main.projectile[index4].owner == this.whoAmI && Main.projectile[index4].type == 226) + { + if (!flag) + Main.projectile[index4].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; + 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] == 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.noKnockback = true; + this.grappling[0] = -1; + this.grapCount = 0; + for (int index5 = 0; index5 < 1000; ++index5) + { + if (Main.projectile[index5].active && Main.projectile[index5].owner == this.whoAmI && Main.projectile[index5].aiStyle == 7) + Main.projectile[index5].Kill(); + } + } + 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.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.thrownCrit += 2; + this.thrownDamage += 0.05f; + this.minionDamage += 0.05f; + this.minionKB += 0.5f; + this.moveSpeed += 0.2f; + } + 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; + } + } + } + + private void CommonPetBuffHandle(int buffIndex, ref bool petBool, int petProjID) + { + this.buffTime[buffIndex] = 18000; + 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); + } + + 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 spinningpoint1 = new Vector2((float) (3 * this.direction - (this.direction == 1 ? 1 : 0)), -11.5f * this.gravDir) + Vector2.UnitY * this.gfxOffY + this.Size / 2f + Main.OffsetsPlayerHeadgear[index]; + Vector2 spinningpoint2 = new Vector2((float) (3 * this.shadowDirection[1] - (this.direction == 1 ? 1 : 0)), -11.5f * this.gravDir) + this.Size / 2f + Main.OffsetsPlayerHeadgear[index]; + Vector2 vector2_1 = Vector2.Zero; + if (this.mount.Active && this.mount.Cart) + { + int num = Math.Sign(this.velocity.X); + if (num == 0) + num = this.direction; + vector2_1 = 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_1 *= 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; + if (this.mount.Active) + num1 = (float) this.mount.PlayerOffset; + Vector2 vector2_2 = this.position + spinningpoint1 + vector2_1; + Vector2 vector2_3 = this.oldPosition + spinningpoint2 + vector2_1; + vector2_3.Y -= num1 / 2f; + vector2_2.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.PerLinePoint(DelegateMethods.CastLightOpen)); + else + Utils.PlotTileLine(this.Left, this.Right, 4f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + } + int num3 = (int) Vector2.Distance(vector2_2, vector2_3) / 3 + 1; + if ((double) Vector2.Distance(vector2_2, vector2_3) % 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_3, vector2_2, 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 void UpdateEquips(int i) + { + 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; + } + for (int index1 = 0; index1 < 8 + this.extraAccessorySlots; ++index1) + { + if (!this.armor[index1].expertOnly || Main.expertMode) + { + int type = this.armor[index1].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[index1].type == 3017 && this.whoAmI == Main.myPlayer && (double) this.velocity.Y == 0.0 && this.grappling[0] == -1) + { + int index2 = (int) this.Center.X / 16; + int tileY = (int) ((double) this.position.Y + (double) this.height - 1.0) / 16; + if (Main.tile[index2, tileY] == null) + Main.tile[index2, tileY] = new Tile(); + if (!Main.tile[index2, tileY].active() && Main.tile[index2, tileY].liquid == (byte) 0 && Main.tile[index2, tileY + 1] != null && WorldGen.SolidTile(index2, tileY + 1)) + { + Main.tile[index2, tileY].frameY = (short) 0; + Main.tile[index2, tileY].slope((byte) 0); + Main.tile[index2, tileY].halfBrick(false); + if (Main.tile[index2, tileY + 1].type == (ushort) 2) + { + if (Main.rand.Next(2) == 0) + { + Main.tile[index2, tileY].active(true); + Main.tile[index2, tileY].type = (ushort) 3; + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(6, 11)); + while (Main.tile[index2, tileY].frameX == (short) 144) + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(6, 11)); + } + else + { + Main.tile[index2, tileY].active(true); + Main.tile[index2, tileY].type = (ushort) 73; + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(6, 21)); + while (Main.tile[index2, tileY].frameX == (short) 144) + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(6, 21)); + } + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index2, tileY, 1); + } + else if (Main.tile[index2, tileY + 1].type == (ushort) 109) + { + if (Main.rand.Next(2) == 0) + { + Main.tile[index2, tileY].active(true); + Main.tile[index2, tileY].type = (ushort) 110; + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(4, 7)); + while (Main.tile[index2, tileY].frameX == (short) 90) + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(4, 7)); + } + else + { + Main.tile[index2, tileY].active(true); + Main.tile[index2, tileY].type = (ushort) 113; + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(2, 8)); + while (Main.tile[index2, tileY].frameX == (short) 90) + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(2, 8)); + } + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index2, tileY, 1); + } + else if (Main.tile[index2, tileY + 1].type == (ushort) 60) + { + Main.tile[index2, tileY].active(true); + Main.tile[index2, tileY].type = (ushort) 74; + Main.tile[index2, tileY].frameX = (short) (18 * Main.rand.Next(9, 17)); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index2, tileY, 1); + } + } + } + this.statDefense += this.armor[index1].defense; + this.lifeRegen += this.armor[index1].lifeRegen; + if (this.armor[index1].shieldSlot > (sbyte) 0) + this.hasRaisableShield = true; + switch (this.armor[index1].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 += 8; + 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 += 16; + 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[index1].type == 268) + this.accDivingHelm = true; + if (this.armor[index1].type == 238) + this.magicDamage += 0.15f; + if (this.armor[index1].type == 3770) + this.slowFall = true; + if (this.armor[index1].type == 3776) + { + this.magicDamage += 0.15f; + this.minionDamage += 0.15f; + } + if (this.armor[index1].type == 3777) + this.statManaMax2 += 80; + if (this.armor[index1].type == 3778) + this.maxMinions += 2; + if (this.armor[index1].type == 3212) + this.armorPenetration += 5; + if (this.armor[index1].type == 2277) + { + this.magicDamage += 0.05f; + this.meleeDamage += 0.05f; + this.rangedDamage += 0.05f; + this.thrownDamage += 0.05f; + this.magicCrit += 5; + this.rangedCrit += 5; + this.meleeCrit += 5; + this.thrownCrit += 5; + this.meleeSpeed += 0.1f; + this.moveSpeed += 0.1f; + } + if (this.armor[index1].type == 2279) + { + this.magicDamage += 0.06f; + this.magicCrit += 6; + this.manaCost -= 0.1f; + } + if (this.armor[index1].type == 3109) + this.nightVision = true; + if (this.armor[index1].type == 256) + this.thrownVelocity += 0.15f; + if (this.armor[index1].type == 257) + this.thrownDamage += 0.15f; + if (this.armor[index1].type == 258) + this.thrownCrit += 10; + if (this.armor[index1].type == 3374) + this.thrownVelocity += 0.2f; + if (this.armor[index1].type == 3375) + this.thrownDamage += 0.2f; + if (this.armor[index1].type == 3376) + this.thrownCrit += 15; + if (this.armor[index1].type == 2275) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + } + if (this.armor[index1].type == 123 || this.armor[index1].type == 124 || this.armor[index1].type == 125) + this.magicDamage += 0.07f; + if (this.armor[index1].type == 151 || this.armor[index1].type == 152 || this.armor[index1].type == 153 || this.armor[index1].type == 959) + this.rangedDamage += 0.05f; + if (this.armor[index1].type == 111 || this.armor[index1].type == 228 || this.armor[index1].type == 229 || this.armor[index1].type == 230 || this.armor[index1].type == 960 || this.armor[index1].type == 961 || this.armor[index1].type == 962) + this.statManaMax2 += 20; + if (this.armor[index1].type == 228 || this.armor[index1].type == 960) + this.statManaMax2 += 20; + if (this.armor[index1].type == 228 || this.armor[index1].type == 229 || this.armor[index1].type == 230 || this.armor[index1].type == 960 || this.armor[index1].type == 961 || this.armor[index1].type == 962) + this.magicCrit += 4; + if (this.armor[index1].type == 100 || this.armor[index1].type == 101 || this.armor[index1].type == 102) + this.meleeSpeed += 0.07f; + if (this.armor[index1].type == 956 || this.armor[index1].type == 957 || this.armor[index1].type == 958) + this.meleeSpeed += 0.07f; + if (this.armor[index1].type == 792 || this.armor[index1].type == 793 || this.armor[index1].type == 794) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + this.thrownDamage += 0.02f; + } + if (this.armor[index1].type == 371) + { + this.magicCrit += 9; + this.statManaMax2 += 40; + } + if (this.armor[index1].type == 372) + { + this.moveSpeed += 0.07f; + this.meleeSpeed += 0.12f; + } + if (this.armor[index1].type == 373) + { + this.rangedDamage += 0.1f; + this.rangedCrit += 6; + } + if (this.armor[index1].type == 374) + { + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[index1].type == 375) + this.moveSpeed += 0.1f; + if (this.armor[index1].type == 376) + { + this.magicDamage += 0.15f; + this.statManaMax2 += 60; + } + if (this.armor[index1].type == 377) + { + this.meleeCrit += 5; + this.meleeDamage += 0.1f; + } + if (this.armor[index1].type == 378) + { + this.rangedDamage += 0.12f; + this.rangedCrit += 7; + } + if (this.armor[index1].type == 379) + { + this.rangedDamage += 0.05f; + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + } + if (this.armor[index1].type == 380) + { + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[index1].type >= 2367 && this.armor[index1].type <= 2369) + this.fishingSkill += 5; + if (this.armor[index1].type == 400) + { + this.magicDamage += 0.11f; + this.magicCrit += 11; + this.statManaMax2 += 80; + } + if (this.armor[index1].type == 401) + { + this.meleeCrit += 7; + this.meleeDamage += 0.14f; + } + if (this.armor[index1].type == 402) + { + this.rangedDamage += 0.14f; + this.rangedCrit += 8; + } + if (this.armor[index1].type == 403) + { + this.rangedDamage += 0.06f; + this.meleeDamage += 0.06f; + this.magicDamage += 0.06f; + } + if (this.armor[index1].type == 404) + { + this.magicCrit += 4; + this.meleeCrit += 4; + this.rangedCrit += 4; + this.moveSpeed += 0.05f; + } + if (this.armor[index1].type == 1205) + { + this.meleeDamage += 0.08f; + this.meleeSpeed += 0.12f; + } + if (this.armor[index1].type == 1206) + { + this.rangedDamage += 0.09f; + this.rangedCrit += 9; + } + if (this.armor[index1].type == 1207) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + this.statManaMax2 += 60; + } + if (this.armor[index1].type == 1208) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.magicCrit += 2; + this.meleeCrit += 2; + this.rangedCrit += 2; + } + if (this.armor[index1].type == 1209) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + ++this.magicCrit; + ++this.meleeCrit; + ++this.rangedCrit; + } + if (this.armor[index1].type == 1210) + { + this.meleeDamage += 0.07f; + this.meleeSpeed += 0.07f; + this.moveSpeed += 0.07f; + } + if (this.armor[index1].type == 1211) + { + this.rangedCrit += 15; + this.moveSpeed += 0.08f; + } + if (this.armor[index1].type == 1212) + { + this.magicCrit += 18; + this.statManaMax2 += 80; + } + if (this.armor[index1].type == 1213) + { + this.magicCrit += 6; + this.meleeCrit += 6; + this.rangedCrit += 6; + } + if (this.armor[index1].type == 1214) + this.moveSpeed += 0.11f; + if (this.armor[index1].type == 1215) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + this.meleeSpeed += 0.08f; + } + if (this.armor[index1].type == 1216) + { + this.rangedDamage += 0.16f; + this.rangedCrit += 7; + } + if (this.armor[index1].type == 1217) + { + this.magicDamage += 0.16f; + this.magicCrit += 7; + this.statManaMax2 += 100; + } + if (this.armor[index1].type == 1218) + { + this.meleeDamage += 0.04f; + this.rangedDamage += 0.04f; + this.magicDamage += 0.04f; + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[index1].type == 1219) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + this.moveSpeed += 0.06f; + } + if (this.armor[index1].type == 558) + { + this.magicDamage += 0.12f; + this.magicCrit += 12; + this.statManaMax2 += 100; + } + if (this.armor[index1].type == 559) + { + this.meleeCrit += 10; + this.meleeDamage += 0.1f; + this.meleeSpeed += 0.1f; + } + if (this.armor[index1].type == 553) + { + this.rangedDamage += 0.15f; + this.rangedCrit += 8; + } + if (this.armor[index1].type == 551) + { + this.magicCrit += 7; + this.meleeCrit += 7; + this.rangedCrit += 7; + } + if (this.armor[index1].type == 552) + { + this.rangedDamage += 0.07f; + this.meleeDamage += 0.07f; + this.magicDamage += 0.07f; + this.moveSpeed += 0.08f; + } + if (this.armor[index1].type == 1001) + { + this.meleeDamage += 0.16f; + this.meleeCrit += 6; + } + if (this.armor[index1].type == 1002) + { + this.rangedDamage += 0.16f; + this.ammoCost80 = true; + } + if (this.armor[index1].type == 1003) + { + this.statManaMax2 += 80; + this.manaCost -= 0.17f; + this.magicDamage += 0.16f; + } + if (this.armor[index1].type == 1004) + { + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.rangedDamage += 0.05f; + this.magicCrit += 7; + this.meleeCrit += 7; + this.rangedCrit += 7; + } + if (this.armor[index1].type == 1005) + { + this.magicCrit += 8; + this.meleeCrit += 8; + this.rangedCrit += 8; + this.moveSpeed += 0.05f; + } + if (this.armor[index1].type == 2189) + { + this.statManaMax2 += 60; + this.manaCost -= 0.13f; + this.magicDamage += 0.05f; + this.magicCrit += 5; + } + if (this.armor[index1].type == 1503) + this.magicDamage -= 0.4f; + if (this.armor[index1].type == 1504) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + } + if (this.armor[index1].type == 1505) + { + this.magicDamage += 0.08f; + this.moveSpeed += 0.08f; + } + if (this.armor[index1].type == 1546) + { + this.rangedCrit += 5; + this.arrowDamage += 0.15f; + } + if (this.armor[index1].type == 1547) + { + this.rangedCrit += 5; + this.bulletDamage += 0.15f; + } + if (this.armor[index1].type == 1548) + { + this.rangedCrit += 5; + this.rocketDamage += 0.15f; + } + if (this.armor[index1].type == 1549) + { + this.rangedCrit += 13; + this.rangedDamage += 0.13f; + this.ammoCost80 = true; + } + if (this.armor[index1].type == 1550) + { + this.rangedCrit += 7; + this.moveSpeed += 0.12f; + } + if (this.armor[index1].type == 1282) + { + this.statManaMax2 += 20; + this.manaCost -= 0.05f; + } + if (this.armor[index1].type == 1283) + { + this.statManaMax2 += 40; + this.manaCost -= 0.07f; + } + if (this.armor[index1].type == 1284) + { + this.statManaMax2 += 40; + this.manaCost -= 0.09f; + } + if (this.armor[index1].type == 1285) + { + this.statManaMax2 += 60; + this.manaCost -= 0.11f; + } + if (this.armor[index1].type == 1286) + { + this.statManaMax2 += 60; + this.manaCost -= 0.13f; + } + if (this.armor[index1].type == 1287) + { + this.statManaMax2 += 80; + this.manaCost -= 0.15f; + } + if (this.armor[index1].type == 1316 || this.armor[index1].type == 1317 || this.armor[index1].type == 1318) + this.aggro += 250; + if (this.armor[index1].type == 1316) + this.meleeDamage += 0.06f; + if (this.armor[index1].type == 1317) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + } + if (this.armor[index1].type == 1318) + this.meleeCrit += 4; + if (this.armor[index1].type == 2199 || this.armor[index1].type == 2202) + this.aggro += 250; + if (this.armor[index1].type == 2201) + this.aggro += 400; + if (this.armor[index1].type == 2199) + this.meleeDamage += 0.06f; + if (this.armor[index1].type == 2200) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + this.meleeSpeed += 0.06f; + this.moveSpeed += 0.06f; + } + if (this.armor[index1].type == 2201) + { + this.meleeDamage += 0.05f; + this.meleeCrit += 5; + } + if (this.armor[index1].type == 2202) + { + this.meleeSpeed += 0.06f; + this.moveSpeed += 0.06f; + } + if (this.armor[index1].type == 684) + { + this.rangedDamage += 0.16f; + this.meleeDamage += 0.16f; + } + if (this.armor[index1].type == 685) + { + this.meleeCrit += 11; + this.rangedCrit += 11; + } + if (this.armor[index1].type == 686) + { + this.moveSpeed += 0.08f; + this.meleeSpeed += 0.07f; + } + if (this.armor[index1].type == 2361) + { + ++this.maxMinions; + this.minionDamage += 0.04f; + } + if (this.armor[index1].type == 2362) + { + ++this.maxMinions; + this.minionDamage += 0.04f; + } + if (this.armor[index1].type == 2363) + this.minionDamage += 0.05f; + if (this.armor[index1].type >= 1158 && this.armor[index1].type <= 1161) + ++this.maxMinions; + if (this.armor[index1].type >= 1159 && this.armor[index1].type <= 1161) + this.minionDamage += 0.1f; + if (this.armor[index1].type >= 2370 && this.armor[index1].type <= 2371) + { + this.minionDamage += 0.05f; + ++this.maxMinions; + } + if (this.armor[index1].type == 2372) + { + this.minionDamage += 0.06f; + ++this.maxMinions; + } + if (this.armor[index1].type == 3381 || this.armor[index1].type == 3382 || this.armor[index1].type == 3383) + { + if (this.armor[index1].type != 3381) + ++this.maxMinions; + ++this.maxMinions; + this.minionDamage += 0.22f; + } + if (this.armor[index1].type == 2763) + { + this.aggro += 300; + this.meleeCrit += 17; + } + if (this.armor[index1].type == 2764) + { + this.aggro += 300; + this.meleeDamage += 0.22f; + } + if (this.armor[index1].type == 2765) + { + this.aggro += 300; + this.meleeSpeed += 0.15f; + this.moveSpeed += 0.15f; + } + if (this.armor[index1].type == 2757) + { + this.rangedCrit += 7; + this.rangedDamage += 0.16f; + } + if (this.armor[index1].type == 2758) + { + this.ammoCost75 = true; + this.rangedCrit += 12; + this.rangedDamage += 0.12f; + } + if (this.armor[index1].type == 2759) + { + this.rangedCrit += 8; + this.rangedDamage += 0.08f; + this.moveSpeed += 0.1f; + } + if (this.armor[index1].type == 2760) + { + this.statManaMax2 += 60; + this.manaCost -= 0.15f; + this.magicCrit += 7; + this.magicDamage += 0.07f; + } + if (this.armor[index1].type == 2761) + { + this.magicDamage += 0.09f; + this.magicCrit += 9; + } + if (this.armor[index1].type == 2762) + { + this.moveSpeed += 0.1f; + this.magicDamage += 0.1f; + } + if (this.armor[index1].type >= 1832 && this.armor[index1].type <= 1834) + ++this.maxMinions; + if (this.armor[index1].type >= 1832 && this.armor[index1].type <= 1834) + this.minionDamage += 0.11f; + if (this.armor[index1].prefix == (byte) 62) + ++this.statDefense; + if (this.armor[index1].prefix == (byte) 63) + this.statDefense += 2; + if (this.armor[index1].prefix == (byte) 64) + this.statDefense += 3; + if (this.armor[index1].prefix == (byte) 65) + this.statDefense += 4; + if (this.armor[index1].prefix == (byte) 66) + this.statManaMax2 += 20; + if (this.armor[index1].prefix == (byte) 67) + { + this.meleeCrit += 2; + this.rangedCrit += 2; + this.magicCrit += 2; + this.thrownCrit += 2; + } + if (this.armor[index1].prefix == (byte) 68) + { + this.meleeCrit += 4; + this.rangedCrit += 4; + this.magicCrit += 4; + this.thrownCrit += 4; + } + if (this.armor[index1].prefix == (byte) 69) + { + this.meleeDamage += 0.01f; + this.rangedDamage += 0.01f; + this.magicDamage += 0.01f; + this.minionDamage += 0.01f; + this.thrownDamage += 0.01f; + } + if (this.armor[index1].prefix == (byte) 70) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + this.minionDamage += 0.02f; + this.thrownDamage += 0.02f; + } + if (this.armor[index1].prefix == (byte) 71) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.minionDamage += 0.03f; + this.thrownDamage += 0.03f; + } + if (this.armor[index1].prefix == (byte) 72) + { + this.meleeDamage += 0.04f; + this.rangedDamage += 0.04f; + this.magicDamage += 0.04f; + this.minionDamage += 0.04f; + this.thrownDamage += 0.04f; + } + if (this.armor[index1].prefix == (byte) 73) + this.moveSpeed += 0.01f; + if (this.armor[index1].prefix == (byte) 74) + this.moveSpeed += 0.02f; + if (this.armor[index1].prefix == (byte) 75) + this.moveSpeed += 0.03f; + if (this.armor[index1].prefix == (byte) 76) + this.moveSpeed += 0.04f; + if (this.armor[index1].prefix == (byte) 77) + this.meleeSpeed += 0.01f; + if (this.armor[index1].prefix == (byte) 78) + this.meleeSpeed += 0.02f; + if (this.armor[index1].prefix == (byte) 79) + this.meleeSpeed += 0.03f; + if (this.armor[index1].prefix == (byte) 80) + this.meleeSpeed += 0.04f; + } + } + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + for (int index = 3; index < 8 + this.extraAccessorySlots; ++index) + { + if (!this.armor[index].expertOnly || Main.expertMode) + { + if (this.armor[index].type == 3810 || this.armor[index].type == 3809 || this.armor[index].type == 3812 || this.armor[index].type == 3811) + this.dd2Accessory = true; + if (this.armor[index].type == 3015) + { + this.aggro -= 400; + this.meleeCrit += 5; + this.magicCrit += 5; + this.rangedCrit += 5; + this.thrownCrit += 5; + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.rangedDamage += 0.05f; + this.thrownDamage += 0.05f; + this.minionDamage += 0.05f; + } + if (this.armor[index].type == 3016) + this.aggro += 400; + if (this.armor[index].type == 2373) + this.accFishingLine = true; + if (this.armor[index].type == 2374) + this.fishingSkill += 10; + if (this.armor[index].type == 2375) + this.accTackleBox = true; + if (this.armor[index].type == 3721) + { + this.accFishingLine = true; + this.accTackleBox = true; + this.fishingSkill += 10; + } + if (this.armor[index].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 (this.armor[index].stringColor > 0) + this.yoyoString = true; + if (this.armor[index].type == 3366) + { + this.counterWeight = 556 + Main.rand.Next(6); + this.yoyoGlove = true; + this.yoyoString = true; + } + if (this.armor[index].type >= 3309 && this.armor[index].type <= 3314) + this.counterWeight = 556 + this.armor[index].type - 3309; + if (this.armor[index].type == 3334) + this.yoyoGlove = true; + if (this.armor[index].type == 3337) + this.shinyStone = true; + if (this.armor[index].type == 3336) + { + this.SporeSac(); + this.sporeSac = true; + } + if (this.armor[index].type == 2423) + { + this.autoJump = true; + this.jumpSpeedBoost += 2.4f; + this.extraFall += 15; + } + if (this.armor[index].type == 857) + this.doubleJumpSandstorm = true; + if (this.armor[index].type == 983) + { + this.doubleJumpSandstorm = true; + this.jumpBoost = true; + } + if (this.armor[index].type == 987) + this.doubleJumpBlizzard = true; + if (this.armor[index].type == 1163) + { + this.doubleJumpBlizzard = true; + this.jumpBoost = true; + } + if (this.armor[index].type == 1724) + this.doubleJumpFart = true; + if (this.armor[index].type == 1863) + { + this.doubleJumpFart = true; + this.jumpBoost = true; + } + if (this.armor[index].type == 1164) + { + this.doubleJumpCloud = true; + this.doubleJumpSandstorm = true; + this.doubleJumpBlizzard = true; + this.jumpBoost = true; + } + if (this.armor[index].type == 1250) + { + this.jumpBoost = true; + this.doubleJumpCloud = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 1252) + { + this.doubleJumpSandstorm = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 1251) + { + this.doubleJumpBlizzard = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 3250) + { + this.doubleJumpFart = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 3252) + { + this.doubleJumpSail = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 3251) + { + this.jumpBoost = true; + this.bee = true; + this.noFallDmg = true; + } + if (this.armor[index].type == 1249) + { + this.jumpBoost = true; + this.bee = true; + } + if (this.armor[index].type == 3241) + { + this.jumpBoost = true; + this.doubleJumpSail = true; + } + if (this.armor[index].type == 1253 && (double) this.statLife <= (double) this.statLifeMax2 * 0.5) + this.AddBuff(62, 5); + if (this.armor[index].type == 1290) + this.panic = true; + if ((this.armor[index].type == 1300 || this.armor[index].type == 1858) && (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 (this.armor[index].type == 1858) + { + this.rangedCrit += 10; + this.rangedDamage += 0.1f; + } + if (this.armor[index].type == 1303 && this.wet) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.2f, 0.6f); + if (this.armor[index].type == 1301) + { + this.meleeCrit += 8; + this.rangedCrit += 8; + this.magicCrit += 8; + this.thrownCrit += 8; + this.meleeDamage += 0.1f; + this.rangedDamage += 0.1f; + this.magicDamage += 0.1f; + this.minionDamage += 0.1f; + this.thrownDamage += 0.1f; + } + if (this.armor[index].type == 982) + { + this.statManaMax2 += 20; + ++this.manaRegenDelayBonus; + this.manaRegenBonus += 25; + } + if (this.armor[index].type == 1595) + { + this.statManaMax2 += 20; + this.magicCuffs = true; + } + if (this.armor[index].type == 2219) + this.manaMagnet = true; + if (this.armor[index].type == 2220) + { + this.manaMagnet = true; + this.magicDamage += 0.15f; + } + if (this.armor[index].type == 2221) + { + this.manaMagnet = true; + this.magicCuffs = true; + } + if (this.whoAmI == Main.myPlayer && this.armor[index].type == 1923) + { + ++Player.tileRangeX; + ++Player.tileRangeY; + } + if (this.armor[index].type == 1247) + { + this.starCloak = true; + this.bee = true; + } + if (this.armor[index].type == 1248) + { + this.meleeCrit += 10; + this.rangedCrit += 10; + this.magicCrit += 10; + this.thrownCrit += 10; + } + if (this.armor[index].type == 854) + this.discount = true; + if (this.armor[index].type == 855) + this.coins = true; + if (this.armor[index].type == 3033) + this.goldRing = true; + if (this.armor[index].type == 3034) + { + this.goldRing = true; + this.coins = true; + } + if (this.armor[index].type == 3035) + { + this.goldRing = true; + this.coins = true; + this.discount = true; + } + if (this.armor[index].type == 53) + this.doubleJumpCloud = true; + if (this.armor[index].type == 3201) + this.doubleJumpSail = true; + if (this.armor[index].type == 54) + this.accRunSpeed = 6f; + if (this.armor[index].type == 3068) + this.cordage = true; + if (this.armor[index].type == 1579) + { + this.accRunSpeed = 6f; + this.coldDash = true; + } + if (this.armor[index].type == 3200) + { + this.accRunSpeed = 6f; + this.sailDash = true; + } + if (this.armor[index].type == 128) + this.rocketBoots = 1; + if (this.armor[index].type == 156) + this.noKnockback = true; + if (this.armor[index].type == 158) + this.noFallDmg = true; + if (this.armor[index].type == 934) + this.carpet = true; + if (this.armor[index].type == 953) + ++this.spikedBoots; + if (this.armor[index].type == 975) + ++this.spikedBoots; + if (this.armor[index].type == 976) + this.spikedBoots += 2; + if (this.armor[index].type == 977) + this.dash = 1; + if (this.armor[index].type == 3097) + this.dash = 2; + if (this.armor[index].type == 963) + this.blackBelt = true; + if (this.armor[index].type == 984) + { + this.blackBelt = true; + this.dash = 1; + this.spikedBoots = 2; + } + if (this.armor[index].type == 1131) + this.gravControl2 = true; + if (this.armor[index].type == 1132) + this.bee = true; + if (this.armor[index].type == 1578) + { + this.bee = true; + this.panic = true; + } + if (this.armor[index].type == 3224) + this.endurance += 0.17f; + if (this.armor[index].type == 3223) + this.brainOfConfusion = true; + if (this.armor[index].type == 950) + this.iceSkate = true; + if (this.armor[index].type == 159) + this.jumpBoost = true; + if (this.armor[index].type == 3225) + this.jumpBoost = true; + if (this.armor[index].type == 187) + this.accFlipper = true; + if (this.armor[index].type == 211) + this.meleeSpeed += 0.12f; + if (this.armor[index].type == 223) + this.manaCost -= 0.06f; + if (this.armor[index].type == 285) + this.moveSpeed += 0.05f; + if (this.armor[index].type == 212) + this.moveSpeed += 0.1f; + if (this.armor[index].type == 267) + this.killGuide = true; + if (this.armor[index].type == 1307) + this.killClothier = true; + if (this.armor[index].type == 193) + this.fireWalk = true; + if (this.armor[index].type == 861) + { + this.accMerman = true; + this.wolfAcc = true; + if (this.hideVisual[index]) + { + this.hideMerman = true; + this.hideWolf = true; + } + } + if (this.armor[index].type == 862) + { + this.starCloak = true; + this.longInvince = true; + } + if (this.armor[index].type == 860) + this.pStone = true; + if (this.armor[index].type == 863) + this.waterWalk2 = true; + if (this.armor[index].type == 907) + { + this.waterWalk2 = true; + this.fireWalk = true; + } + if (this.armor[index].type == 908) + { + this.waterWalk = true; + this.fireWalk = true; + this.lavaMax += 420; + } + if (this.armor[index].type == 906) + this.lavaMax += 420; + if (this.armor[index].type == 485) + { + this.wolfAcc = true; + if (this.hideVisual[index]) + this.hideWolf = true; + } + if (this.armor[index].type == 486) + this.rulerLine = true; + if (this.armor[index].type == 2799) + this.rulerGrid = true; + if (this.armor[index].type == 394) + { + this.accFlipper = true; + this.accDivingHelm = true; + } + if (this.armor[index].type == 396) + { + this.noFallDmg = true; + this.fireWalk = true; + } + if (this.armor[index].type == 397) + { + this.noKnockback = true; + this.fireWalk = true; + } + if (this.armor[index].type == 399) + { + this.jumpBoost = true; + this.doubleJumpCloud = true; + } + if (this.armor[index].type == 405) + { + this.accRunSpeed = 6f; + this.rocketBoots = 2; + } + if (this.armor[index].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 (this.armor[index].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 (this.armor[index].type == 2214) + flag2 = true; + if (this.armor[index].type == 2215) + flag3 = true; + if (this.armor[index].type == 2216) + this.autoPaint = true; + if (this.armor[index].type == 2217) + flag1 = true; + if (this.armor[index].type == 3061) + { + flag1 = true; + flag2 = true; + this.autoPaint = true; + flag3 = true; + } + if (this.armor[index].type == 3624) + this.autoActuator = true; + if (this.armor[index].type == 897) + { + this.kbGlove = true; + this.meleeSpeed += 0.12f; + } + if (this.armor[index].type == 1343) + { + this.kbGlove = true; + this.meleeSpeed += 0.1f; + this.meleeDamage += 0.1f; + this.magmaStone = true; + } + if (this.armor[index].type == 1167) + { + this.minionKB += 2f; + this.minionDamage += 0.15f; + } + if (this.armor[index].type == 1864) + { + this.minionKB += 2f; + this.minionDamage += 0.15f; + ++this.maxMinions; + } + if (this.armor[index].type == 1845) + { + this.minionDamage += 0.1f; + ++this.maxMinions; + } + if (this.armor[index].type == 1321) + { + this.magicQuiver = true; + this.arrowDamage += 0.1f; + } + if (this.armor[index].type == 1322) + this.magmaStone = true; + if (this.armor[index].type == 1323) + this.lavaRose = true; + if (this.armor[index].type == 3333) + this.strongBees = true; + if (this.armor[index].type == 938) + { + this.noKnockback = true; + if ((double) this.statLife > (double) this.statLifeMax2 * 0.25) + { + this.hasPaladinShield = true; + if (i != 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 (this.armor[index].type == 936) + { + this.kbGlove = true; + this.meleeSpeed += 0.12f; + this.meleeDamage += 0.12f; + } + if (this.armor[index].type == 898) + { + this.accRunSpeed = 6.75f; + this.rocketBoots = 2; + this.moveSpeed += 0.08f; + } + if (this.armor[index].type == 1862) + { + this.accRunSpeed = 6.75f; + this.rocketBoots = 3; + this.moveSpeed += 0.08f; + this.iceSkate = true; + } + if (this.armor[index].type == 3110) + { + this.accMerman = true; + this.wolfAcc = true; + if (this.hideVisual[index]) + { + this.hideMerman = true; + this.hideWolf = true; + } + } + if (this.armor[index].type == 1865 || this.armor[index].type == 3110) + { + 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; + this.thrownDamage += 0.1f; + this.thrownCrit += 2; + } + if (this.armor[index].type == 899 && Main.dayTime) + { + 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; + this.thrownDamage += 0.1f; + this.thrownCrit += 2; + } + if (this.armor[index].type == 900 && (!Main.dayTime || Main.eclipse)) + { + 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; + this.thrownDamage += 0.1f; + this.thrownCrit += 2; + } + if (this.armor[index].type == 407) + this.blockRange = 1; + if (this.armor[index].type == 489) + this.magicDamage += 0.15f; + if (this.armor[index].type == 490) + this.meleeDamage += 0.15f; + if (this.armor[index].type == 491) + this.rangedDamage += 0.15f; + if (this.armor[index].type == 2998) + this.minionDamage += 0.15f; + if (this.armor[index].type == 935) + { + this.magicDamage += 0.12f; + this.meleeDamage += 0.12f; + this.rangedDamage += 0.12f; + this.minionDamage += 0.12f; + this.thrownDamage += 0.12f; + } + if (this.armor[index].type == 492) + this.wingTimeMax = 100; + if (this.armor[index].type == 493) + this.wingTimeMax = 100; + if (this.armor[index].type == 748) + this.wingTimeMax = 115; + if (this.armor[index].type == 749) + this.wingTimeMax = 130; + if (this.armor[index].type == 761) + this.wingTimeMax = 130; + if (this.armor[index].type == 785) + this.wingTimeMax = 140; + if (this.armor[index].type == 786) + this.wingTimeMax = 140; + if (this.armor[index].type == 821) + this.wingTimeMax = 160; + if (this.armor[index].type == 822) + this.wingTimeMax = 160; + if (this.armor[index].type == 823) + this.wingTimeMax = 160; + if (this.armor[index].type == 2280) + this.wingTimeMax = 160; + if (this.armor[index].type == 2494) + this.wingTimeMax = 100; + if (this.armor[index].type == 2609) + { + this.wingTimeMax = 180; + this.ignoreWater = true; + } + if (this.armor[index].type == 948) + this.wingTimeMax = 180; + if (this.armor[index].type == 1162) + this.wingTimeMax = 160; + if (this.armor[index].type == 1165) + this.wingTimeMax = 140; + if (this.armor[index].type == 1515) + this.wingTimeMax = 130; + if (this.armor[index].type == 665) + this.wingTimeMax = 150; + if (this.armor[index].type == 1583) + this.wingTimeMax = 150; + if (this.armor[index].type == 1584) + this.wingTimeMax = 150; + if (this.armor[index].type == 1585) + this.wingTimeMax = 150; + if (this.armor[index].type == 1586) + this.wingTimeMax = 150; + if (this.armor[index].type == 3228) + this.wingTimeMax = 150; + if (this.armor[index].type == 3580) + this.wingTimeMax = 150; + if (this.armor[index].type == 3582) + this.wingTimeMax = 150; + if (this.armor[index].type == 3588) + this.wingTimeMax = 150; + if (this.armor[index].type == 3592) + this.wingTimeMax = 150; + if (this.armor[index].type == 3924) + this.wingTimeMax = 150; + if (this.armor[index].type == 3928) + this.wingTimeMax = 150; + if (this.armor[index].type == 1797) + this.wingTimeMax = 180; + if (this.armor[index].type == 1830) + this.wingTimeMax = 180; + if (this.armor[index].type == 1866) + this.wingTimeMax = 170; + if (this.armor[index].type == 1871) + this.wingTimeMax = 170; + if (this.armor[index].type == 2770) + this.wingTimeMax = 160; + if (this.armor[index].type == 3468) + this.wingTimeMax = 180; + if (this.armor[index].type == 3469) + this.wingTimeMax = 160; + if (this.armor[index].type == 3470) + this.wingTimeMax = 160; + if (this.armor[index].type == 3471) + this.wingTimeMax = 180; + if (this.armor[index].type == 3883) + this.wingTimeMax = 150; + if (this.armor[index].type == 885) + this.buffImmune[30] = true; + if (this.armor[index].type == 886) + this.buffImmune[36] = true; + if (this.armor[index].type == 887) + this.buffImmune[20] = true; + if (this.armor[index].type == 888) + this.buffImmune[22] = true; + if (this.armor[index].type == 889) + this.buffImmune[32] = true; + if (this.armor[index].type == 890) + this.buffImmune[35] = true; + if (this.armor[index].type == 891) + this.buffImmune[23] = true; + if (this.armor[index].type == 892) + this.buffImmune[33] = true; + if (this.armor[index].type == 893) + this.buffImmune[31] = true; + if (this.armor[index].type == 3781) + this.buffImmune[156] = true; + if (this.armor[index].type == 901) + { + this.buffImmune[33] = true; + this.buffImmune[36] = true; + } + if (this.armor[index].type == 902) + { + this.buffImmune[30] = true; + this.buffImmune[20] = true; + } + if (this.armor[index].type == 903) + { + this.buffImmune[32] = true; + this.buffImmune[31] = true; + } + if (this.armor[index].type == 904) + { + this.buffImmune[35] = true; + this.buffImmune[23] = true; + } + if (this.armor[index].type == 1921) + { + this.buffImmune[46] = true; + this.buffImmune[47] = true; + } + if (this.armor[index].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 (this.armor[index].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 (this.armor[index].type == 497) + { + this.accMerman = true; + if (this.hideVisual[index]) + this.hideMerman = true; + } + if (this.armor[index].type == 535) + this.pStone = true; + if (this.armor[index].type == 536) + this.kbGlove = true; + if (this.armor[index].type == 532) + this.starCloak = true; + if (this.armor[index].type == 554) + this.longInvince = true; + if (this.armor[index].type == 555) + { + this.manaFlower = true; + this.manaCost -= 0.08f; + } + if (Main.myPlayer == this.whoAmI) + { + if (this.armor[index].type == 576 && Main.rand.Next(10800) == 0 && Main.curMusic > 0 && Main.curMusic <= 41) + { + int num = 0; + 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) + this.armor[index].SetDefaults(1963); + else if (Main.curMusic == 29) + this.armor[index].SetDefaults(1610); + else if (Main.curMusic == 30) + this.armor[index].SetDefaults(1963); + else if (Main.curMusic == 31) + this.armor[index].SetDefaults(1964); + else if (Main.curMusic == 32) + this.armor[index].SetDefaults(1965); + else if (Main.curMusic == 33) + this.armor[index].SetDefaults(2742); + else if (Main.curMusic == 34) + this.armor[index].SetDefaults(3370); + else if (Main.curMusic == 35) + this.armor[index].SetDefaults(3236); + else if (Main.curMusic == 36) + this.armor[index].SetDefaults(3237); + else if (Main.curMusic == 37) + this.armor[index].SetDefaults(3235); + else if (Main.curMusic == 38) + this.armor[index].SetDefaults(3044); + else if (Main.curMusic == 39) + this.armor[index].SetDefaults(3371); + else if (Main.curMusic == 40) + this.armor[index].SetDefaults(3796); + else if (Main.curMusic == 41) + this.armor[index].SetDefaults(3869); + else if (Main.curMusic > 13) + this.armor[index].SetDefaults(1596 + Main.curMusic - 14); + else + this.armor[index].SetDefaults(num + 562); + } + if (this.armor[index].type >= 562 && this.armor[index].type <= 574) + Main.musicBox2 = this.armor[index].type - 562; + if (this.armor[index].type >= 1596 && this.armor[index].type <= 1609) + Main.musicBox2 = this.armor[index].type - 1596 + 13; + if (this.armor[index].type == 1610) + Main.musicBox2 = 27; + if (this.armor[index].type == 1963) + Main.musicBox2 = 28; + if (this.armor[index].type == 1964) + Main.musicBox2 = 29; + if (this.armor[index].type == 1965) + Main.musicBox2 = 30; + if (this.armor[index].type == 2742) + Main.musicBox2 = 31; + if (this.armor[index].type == 3044) + Main.musicBox2 = 32; + if (this.armor[index].type == 3235) + Main.musicBox2 = 33; + if (this.armor[index].type == 3236) + Main.musicBox2 = 34; + if (this.armor[index].type == 3237) + Main.musicBox2 = 35; + if (this.armor[index].type == 3370) + Main.musicBox2 = 36; + if (this.armor[index].type == 3371) + Main.musicBox2 = 37; + if (this.armor[index].type == 3796) + Main.musicBox2 = 38; + if (this.armor[index].type == 3869) + Main.musicBox2 = 39; + } + } + } + if (this.dd2Accessory) + { + this.minionDamage += 0.1f; + ++this.maxTurrets; + } + for (int index = 3; index < 8 + this.extraAccessorySlots; ++index) + { + if (this.armor[index].wingSlot > (sbyte) 0) + { + if (!this.hideVisual[index] || (double) this.velocity.Y != 0.0 && !this.mount.Active) + this.wings = (int) this.armor[index].wingSlot; + this.wingsLogic = (int) this.armor[index].wingSlot; + } + } + for (int index = 13; index < 18 + this.extraAccessorySlots; ++index) + { + int type = this.armor[index].type; + if (this.armor[index].wingSlot > (sbyte) 0) + this.wings = (int) this.armor[index].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.Type != 3 ? 1 : 0))) != 0 || !this.forceWerewolf) && (type == 861 || type == 3110 || type == 497)) + { + this.hideMerman = false; + this.forceMerman = true; + } + } + if (this.whoAmI == Main.myPlayer && Main.clock && this.accWatch < 3) + ++this.accWatch; + if (flag2) + this.tileSpeed += 0.5f; + if (flag1) + this.wallSpeed += 0.5f; + if (flag3 && 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) + return; + this.dpsStarted = false; + this.dpsEnd = DateTime.Now; + } + + 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 == 188 && this.body == 189 && this.legs == 129) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Fossil"); + this.thrownCost50 = true; + } + 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.thrownDamage += 0.1f; + } + if (this.head == 22 && this.body == 14 && this.legs == 14) + { + this.thrownCost33 = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Ninja"); + } + 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.setBonus = Language.GetTextValue("ArmorSetBonus.Wizard"); + this.magicCrit += 10; + } + if (this.head == 159 && (this.body >= 58 && this.body <= 63 || this.body == 167)) + { + 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.frostArmor = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Frost"); + this.frostBurn = true; + } + if ((this.head == 75 || this.head == 7) && this.body == 7 && this.legs == 7) + { + this.boneArmor = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Bone"); + this.ammoCost80 = 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 == 78 || this.head == 79 || this.head == 80) && 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.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 && (this.head == 89 || this.head == 90 || this.head == 91)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Titanium"); + this.onHitDodge = true; + } + if (this.body == 24 && this.legs == 23) + { + if (this.head == 42) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HallowCaster"); + this.manaCost -= 0.2f; + } + else if (this.head == 43) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HallowMelee"); + this.meleeSpeed += 0.19f; + this.moveSpeed += 0.19f; + } + else if (this.head == 41) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HallowRanged"); + this.ammoCost75 = true; + } + } + 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.setSolar = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Solar"); + ++this.solarCounter; + int num = 240; + 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.dash = 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) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, -1f, 623, 0, 0.0f, Main.myPlayer); + } + } + 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) + return; + this.setBonus = Language.GetTextValue("ArmorSetBonus.MonkTier3"); + this.setMonkT3 = true; + this.setMonkT2 = true; + ++this.maxTurrets; + } + + 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; + } + } + this.teleportTime -= 0.005f; + } + + public void UpdateBiomes() + { + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + this.ZoneDungeon = false; + if (Main.dungeonTiles >= 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.wallDungeon[(int) Main.tile[index1, index2].wall]) + this.ZoneDungeon = true; + } + Tile tileSafely = Framing.GetTileSafely(this.Center); + if (tileSafely != null) + this.behindBackWall = tileSafely.wall > (byte) 0; + if (Main.sandTiles > 1000 && (double) this.Center.Y > 3200.0) + { + if (WallID.Sets.Conversion.Sandstone[(int) tileSafely.wall] || WallID.Sets.Conversion.HardenedSand[(int) tileSafely.wall]) + this.ZoneUndergroundDesert = true; + } + else + this.ZoneUndergroundDesert = false; + this.ZoneCorrupt = Main.evilTiles >= 200; + this.ZoneHoly = Main.holyTiles >= 100; + this.ZoneMeteor = Main.meteorTiles >= 50; + this.ZoneJungle = Main.jungleTiles >= 80; + this.ZoneSnow = Main.snowTiles >= 300; + this.ZoneCrimson = Main.bloodTiles >= 200; + this.ZoneWaterCandle = Main.waterCandles > 0; + this.ZonePeaceCandle = Main.peaceCandles > 0; + this.ZoneDesert = Main.sandTiles > 1000; + this.ZoneGlowshroom = Main.shroomTiles > 100; + this.ZoneUnderworldHeight = tileCoordinates1.Y > Main.maxTilesY - 200; + this.ZoneRockLayerHeight = tileCoordinates1.Y <= Main.maxTilesY - 200 && (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 = this.ZoneOverworldHeight && (tileCoordinates1.X < 380 || tileCoordinates1.X > Main.maxTilesX - 380); + 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); + 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 (!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.windSpeed) * 1f + MathHelper.Clamp(Main.maxRaining, 0.0f, 1f) * 1.5f + (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 (flag1) + { + ActiveSound activeSound1 = Main.GetActiveSound(Player._strongBlizzardSound); + ActiveSound activeSound2 = Main.GetActiveSound(Player._insideBlizzardSound); + if (activeSound1 == null) + Player._strongBlizzardSound = Main.PlayTrackedSound((SoundStyle) SoundID.BlizzardStrongLoop); + if (activeSound2 == null) + Player._insideBlizzardSound = Main.PlayTrackedSound((SoundStyle) SoundID.BlizzardInsideBuildingLoop); + Main.GetActiveSound(Player._strongBlizzardSound); + Main.GetActiveSound(Player._insideBlizzardSound); + 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); + } + Player._blizzardSoundVolume = !flag1 ? Math.Max(Player._blizzardSoundVolume - 0.01f, 0.0f) : Math.Min(Player._blizzardSoundVolume + 0.01f, 1f); + float num4 = Math.Min(1f, Main.cloudAlpha * 2f) * this._stormShaderObstruction; + ActiveSound activeSound3 = Main.GetActiveSound(Player._strongBlizzardSound); + ActiveSound activeSound4 = Main.GetActiveSound(Player._insideBlizzardSound); + if ((double) Player._blizzardSoundVolume > 0.0) + { + if (activeSound3 == null) + { + Player._strongBlizzardSound = Main.PlayTrackedSound((SoundStyle) SoundID.BlizzardStrongLoop); + activeSound3 = Main.GetActiveSound(Player._strongBlizzardSound); + } + activeSound3.Volume = num4 * Player._blizzardSoundVolume; + if (activeSound4 == null) + { + Player._insideBlizzardSound = Main.PlayTrackedSound((SoundStyle) SoundID.BlizzardInsideBuildingLoop); + activeSound4 = Main.GetActiveSound(Player._insideBlizzardSound); + } + activeSound4.Volume = (1f - num4) * 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; + } + if (!this.dead) + { + Point tileCoordinates2 = this.Center.ToTileCoordinates(); + if (WorldGen.InWorld(tileCoordinates2.X, tileCoordinates2.Y, 1)) + { + int num5 = 0; + if (Main.tile[tileCoordinates2.X, tileCoordinates2.Y] != null) + num5 = (int) Main.tile[tileCoordinates2.X, tileCoordinates2.Y].wall; + switch (num5) + { + case 62: + AchievementsHelper.HandleSpecialEvent(this, 13); + break; + case 86: + AchievementsHelper.HandleSpecialEvent(this, 12); + break; + } + } + if (this._funkytownCheckCD > 0) + --this._funkytownCheckCD; + if ((double) this.position.Y / 16.0 > (double) (Main.maxTilesY - 200)) + { + AchievementsHelper.HandleSpecialEvent(this, 14); + } + else + { + if (this._funkytownCheckCD != 0 || (double) this.position.Y / 16.0 >= Main.worldSurface || Main.shroomTiles < 200) + return; + AchievementsHelper.HandleSpecialEvent(this, 15); + } + } + else + this._funkytownCheckCD = 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 UpdateDead() + { + this._portalPhysicsTime = 0; + this.MountFishronSpecialCounter = 0.0f; + this.gem = -1; + this.ownedLargeGems = (BitsByte) (byte) 0; + this.slippy = false; + this.slippy2 = false; + this.powerrun = false; + 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.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.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; + } + this.grappling[0] = -1; + this.grappling[1] = -1; + this.grappling[2] = -1; + this.sign = -1; + this.talkNPC = -1; + Main.npcChatCornerItem = 0; + this.statLife = 0; + this.channel = false; + this.potionDelay = 0; + this.chest = -1; + 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; + } + else + { + if (this.whoAmI != Main.myPlayer && Main.netMode != 2) + return; + this.ghost = true; + } + } + else + { + --this.respawnTimer; + if (this.respawnTimer > 0 || Main.myPlayer != this.whoAmI) + return; + if (Main.mouseItem.type > 0) + Main.playerInventory = true; + this.Spawn(); + } + } + + 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.cEd || this.FindBuffIndex(buffType) != -1) + return; + this.AddBuff(buffType, 3600); + Main.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.cEd) + 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); + Main.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 void SmartCursorLookup() + { + if (this.whoAmI != Main.myPlayer) + return; + Main.SmartCursorShowing = false; + if (!Main.SmartCursorEnabled) + return; + Item obj = this.inventory[this.selectedItem]; + Vector2 mouse = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + if ((double) this.gravDir == -1.0) + mouse.Y = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY; + int index1 = Player.tileTargetX; + int index2 = Player.tileTargetY; + if (index1 < 10) + index1 = 10; + if (index1 > Main.maxTilesX - 10) + index1 = Main.maxTilesX - 10; + if (index2 < 10) + index2 = 10; + if (index2 > Main.maxTilesY - 10) + index2 = Main.maxTilesY - 10; + bool flag1 = false; + if (Main.tile[index1, index2] == null) + return; + if (Main.tile[index1, index2].active()) + { + switch (Main.tile[index1, index2].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: + flag1 = true; + break; + case 314: + if ((double) this.gravDir == 1.0) + { + flag1 = true; + break; + } + break; + } + } + int tileBoost = obj.tileBoost; + int num1 = 0; + if (obj.type == 1071 || obj.type == 1543 || obj.type == 1072 || obj.type == 1544) + { + for (int index3 = 0; index3 < 58; ++index3) + { + if (this.inventory[index3].stack > 0 && this.inventory[index3].paint > (byte) 0) + { + num1 = (int) this.inventory[index3].paint; + break; + } + } + } + int num2 = (int) ((double) this.position.X / 16.0) - Player.tileRangeX - tileBoost + 1; + int num3 = (int) (((double) this.position.X + (double) this.width) / 16.0) + Player.tileRangeX + tileBoost - 1; + int num4 = (int) ((double) this.position.Y / 16.0) - Player.tileRangeY - tileBoost + 1; + int num5 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + Player.tileRangeY + tileBoost - 2; + int num6 = Utils.Clamp(num2, 10, Main.maxTilesX - 10); + 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); + if (flag1 && index1 >= num6 && index1 <= num7 && index2 >= num8 && index2 <= num9) + return; + List> ignoreTargets = new List>(); + for (int index4 = 0; index4 < this.grapCount; ++index4) + { + Projectile projectile = Main.projectile[this.grappling[index4]]; + int num10 = (int) projectile.Center.X / 16; + int num11 = (int) projectile.Center.Y / 16; + ignoreTargets.Add(new Tuple(num10, num11)); + } + int fX = -1; + int fY = -1; + if (!Player.SmartCursorSettings.SmartAxeAfterPickaxe) + Player.SmartCursor_Axe(obj, ref mouse, num6, num7, num8, num9, ref fX, ref fY); + if (obj.pick > 0 && fX == -1 && fY == -1) + { + 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) + mouse = this.Center + new Vector2((float) (this.direction * 1000), 0.0f); + } + Vector2 vector2 = mouse - this.Center; + int num12 = Math.Sign(vector2.X); + int num13 = Math.Sign(vector2.Y); + if ((double) Math.Abs(vector2.X) > (double) Math.Abs(vector2.Y) * 3.0) + { + num13 = 0; + mouse.Y = this.Center.Y; + } + if ((double) Math.Abs(vector2.Y) > (double) Math.Abs(vector2.X) * 3.0) + { + num12 = 0; + mouse.X = this.Center.X; + } + int num14 = (int) this.Center.X / 16; + int num15 = (int) this.Center.Y / 16; + List> tupleList1 = new List>(); + List> tupleList2 = new List>(); + int num16 = 1; + if (num13 == -1 && num12 != 0) + num16 = -1; + int index5 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) ((this.width / 2 - 1) * num12)) / 16.0); + int index6 = (int) (((double) this.position.Y + 0.1) / 16.0); + if (num16 == -1) + index6 = (int) (((double) this.position.Y + (double) this.height - 1.0) / 16.0); + int num17 = this.width / 16 + (this.width % 16 == 0 ? 0 : 1); + int num18 = this.height / 16 + (this.height % 16 == 0 ? 0 : 1); + if (num12 != 0) + { + for (int index7 = 0; index7 < num18; ++index7) + { + if (Main.tile[index5, index6 + index7 * num16] == null) + return; + tupleList1.Add(new Tuple(index5, index6 + index7 * num16)); + } + } + if (num13 != 0) + { + for (int index8 = 0; index8 < num17; ++index8) + { + if (Main.tile[(int) ((double) this.position.X / 16.0) + index8, index6] == null) + return; + tupleList1.Add(new Tuple((int) ((double) this.position.X / 16.0) + index8, index6)); + } + } + int index9 = (int) (((double) mouse.X + (double) ((this.width / 2 - 1) * num12)) / 16.0); + int index10 = (int) (((double) mouse.Y + 0.1 - (double) (this.height / 2 + 1)) / 16.0); + if (num16 == -1) + index10 = (int) (((double) mouse.Y + (double) (this.height / 2) - 1.0) / 16.0); + if ((double) this.gravDir == -1.0 && num13 == 0) + ++index10; + if (index10 < 10) + index10 = 10; + if (index10 > Main.maxTilesY - 10) + index10 = Main.maxTilesY - 10; + int num19 = this.width / 16 + (this.width % 16 == 0 ? 0 : 1); + int num20 = this.height / 16 + (this.height % 16 == 0 ? 0 : 1); + if (num12 != 0) + { + for (int index11 = 0; index11 < num20; ++index11) + { + if (Main.tile[index9, index10 + index11 * num16] == null) + return; + tupleList2.Add(new Tuple(index9, index10 + index11 * num16)); + } + } + if (num13 != 0) + { + for (int index12 = 0; index12 < num19; ++index12) + { + if (Main.tile[(int) (((double) mouse.X - (double) (this.width / 2)) / 16.0) + index12, index10] == null) + return; + tupleList2.Add(new Tuple((int) (((double) mouse.X - (double) (this.width / 2)) / 16.0) + index12, index10)); + } + } + List> tupleList3 = new List>(); + while (tupleList1.Count > 0) + { + Tuple tuple1 = tupleList1[0]; + Tuple tuple2 = tupleList2[0]; + Tuple col; + if (!Collision.TupleHitLine(tuple1.Item1, tuple1.Item2, tuple2.Item1, tuple2.Item2, num12 * (int) this.gravDir, -num13 * (int) this.gravDir, ignoreTargets, out col)) + { + tupleList1.Remove(tuple1); + tupleList2.Remove(tuple2); + } + else + { + if (col.Item1 != tuple2.Item1 || col.Item2 != tuple2.Item2) + tupleList3.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] && !ignoreTargets.Contains(col)) + tupleList3.Add(col); + tupleList1.Remove(tuple1); + tupleList2.Remove(tuple2); + } + } + List> tupleList4 = new List>(); + for (int index13 = 0; index13 < tupleList3.Count; ++index13) + { + if (!WorldGen.CanKillTile(tupleList3[index13].Item1, tupleList3[index13].Item2)) + tupleList4.Add(tupleList3[index13]); + } + for (int index14 = 0; index14 < tupleList4.Count; ++index14) + tupleList3.Remove(tupleList4[index14]); + tupleList4.Clear(); + if (tupleList3.Count > 0) + { + float num21 = -1f; + Tuple tuple = tupleList3[0]; + for (int index15 = 0; index15 < tupleList3.Count; ++index15) + { + float num22 = Vector2.Distance(new Vector2((float) tupleList3[index15].Item1, (float) tupleList3[index15].Item2) * 16f + Vector2.One * 8f, this.Center); + if ((double) num21 == -1.0 || (double) num22 < (double) num21) + { + num21 = num22; + tuple = tupleList3[index15]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList1.Clear(); + tupleList2.Clear(); + tupleList3.Clear(); + } + if (Player.SmartCursorSettings.SmartAxeAfterPickaxe) + Player.SmartCursor_Axe(obj, ref mouse, num6, num7, num8, num9, ref fX, ref fY); + if ((obj.type == 509 || obj.type == 850 || obj.type == 851 || obj.type == 3612) && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + int num23 = 0; + if (obj.type == 509) + num23 = 1; + if (obj.type == 850) + num23 = 2; + if (obj.type == 851) + num23 = 3; + if (obj.type == 3612) + num23 = 4; + bool flag2 = false; + if (Main.tile[index1, index2].wire() && num23 == 1) + flag2 = true; + if (Main.tile[index1, index2].wire2() && num23 == 2) + flag2 = true; + if (Main.tile[index1, index2].wire3() && num23 == 3) + flag2 = true; + if (Main.tile[index1, index2].wire4() && num23 == 4) + flag2 = true; + if (!flag2) + { + for (int index16 = num6; index16 <= num7; ++index16) + { + for (int index17 = num8; index17 <= num9; ++index17) + { + Tile tile = Main.tile[index16, index17]; + if (tile.wire() && num23 == 1 || tile.wire2() && num23 == 2 || tile.wire3() && num23 == 3 || tile.wire4() && num23 == 4) + { + if (num23 == 1) + { + if (!Main.tile[index16 - 1, index17].wire()) + tupleList.Add(new Tuple(index16 - 1, index17)); + if (!Main.tile[index16 + 1, index17].wire()) + tupleList.Add(new Tuple(index16 + 1, index17)); + if (!Main.tile[index16, index17 - 1].wire()) + tupleList.Add(new Tuple(index16, index17 - 1)); + if (!Main.tile[index16, index17 + 1].wire()) + tupleList.Add(new Tuple(index16, index17 + 1)); + } + if (num23 == 2) + { + if (!Main.tile[index16 - 1, index17].wire2()) + tupleList.Add(new Tuple(index16 - 1, index17)); + if (!Main.tile[index16 + 1, index17].wire2()) + tupleList.Add(new Tuple(index16 + 1, index17)); + if (!Main.tile[index16, index17 - 1].wire2()) + tupleList.Add(new Tuple(index16, index17 - 1)); + if (!Main.tile[index16, index17 + 1].wire2()) + tupleList.Add(new Tuple(index16, index17 + 1)); + } + if (num23 == 3) + { + if (!Main.tile[index16 - 1, index17].wire3()) + tupleList.Add(new Tuple(index16 - 1, index17)); + if (!Main.tile[index16 + 1, index17].wire3()) + tupleList.Add(new Tuple(index16 + 1, index17)); + if (!Main.tile[index16, index17 - 1].wire3()) + tupleList.Add(new Tuple(index16, index17 - 1)); + if (!Main.tile[index16, index17 + 1].wire3()) + tupleList.Add(new Tuple(index16, index17 + 1)); + } + if (num23 == 4) + { + if (!Main.tile[index16 - 1, index17].wire4()) + tupleList.Add(new Tuple(index16 - 1, index17)); + if (!Main.tile[index16 + 1, index17].wire4()) + tupleList.Add(new Tuple(index16 + 1, index17)); + if (!Main.tile[index16, index17 - 1].wire4()) + tupleList.Add(new Tuple(index16, index17 - 1)); + if (!Main.tile[index16, index17 + 1].wire4()) + tupleList.Add(new Tuple(index16, index17 + 1)); + } + } + } + } + } + if (tupleList.Count > 0) + { + float num24 = -1f; + Tuple tuple = tupleList[0]; + for (int index18 = 0; index18 < tupleList.Count; ++index18) + { + float num25 = Vector2.Distance(new Vector2((float) tupleList[index18].Item1, (float) tupleList[index18].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num24 == -1.0 || (double) num25 < (double) num24) + { + num24 = num25; + tuple = tupleList[index18]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 3625 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + WiresUI.Settings.MultiToolMode toolMode1 = WiresUI.Settings.ToolMode; + WiresUI.Settings.MultiToolMode multiToolMode = (WiresUI.Settings.MultiToolMode) 0; + if (Main.tile[index1, index2].wire()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Red; + if (Main.tile[index1, index2].wire2()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Blue; + if (Main.tile[index1, index2].wire3()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Green; + if (Main.tile[index1, index2].wire4()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Yellow; + int num26 = (toolMode1 & ~WiresUI.Settings.MultiToolMode.Cutter) == multiToolMode ? 1 : 0; + WiresUI.Settings.MultiToolMode toolMode2 = WiresUI.Settings.ToolMode; + if (num26 == 0) + { + bool flag3 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red); + bool flag4 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue); + bool flag5 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green); + bool flag6 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow); + bool flag7 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter); + for (int index19 = num6; index19 <= num7; ++index19) + { + for (int index20 = num8; index20 <= num9; ++index20) + { + Tile tile = Main.tile[index19, index20]; + if (flag7) + { + if (tile.wire() & flag3 || tile.wire2() & flag4 || tile.wire3() & flag5 || tile.wire4() & flag6) + tupleList.Add(new Tuple(index19, index20)); + } + else if (tile.wire() & flag3 || tile.wire2() & flag4 || tile.wire3() & flag5 || tile.wire4() & flag6) + { + if (flag3) + { + if (!Main.tile[index19 - 1, index20].wire()) + tupleList.Add(new Tuple(index19 - 1, index20)); + if (!Main.tile[index19 + 1, index20].wire()) + tupleList.Add(new Tuple(index19 + 1, index20)); + if (!Main.tile[index19, index20 - 1].wire()) + tupleList.Add(new Tuple(index19, index20 - 1)); + if (!Main.tile[index19, index20 + 1].wire()) + tupleList.Add(new Tuple(index19, index20 + 1)); + } + if (flag4) + { + if (!Main.tile[index19 - 1, index20].wire2()) + tupleList.Add(new Tuple(index19 - 1, index20)); + if (!Main.tile[index19 + 1, index20].wire2()) + tupleList.Add(new Tuple(index19 + 1, index20)); + if (!Main.tile[index19, index20 - 1].wire2()) + tupleList.Add(new Tuple(index19, index20 - 1)); + if (!Main.tile[index19, index20 + 1].wire2()) + tupleList.Add(new Tuple(index19, index20 + 1)); + } + if (flag5) + { + if (!Main.tile[index19 - 1, index20].wire3()) + tupleList.Add(new Tuple(index19 - 1, index20)); + if (!Main.tile[index19 + 1, index20].wire3()) + tupleList.Add(new Tuple(index19 + 1, index20)); + if (!Main.tile[index19, index20 - 1].wire3()) + tupleList.Add(new Tuple(index19, index20 - 1)); + if (!Main.tile[index19, index20 + 1].wire3()) + tupleList.Add(new Tuple(index19, index20 + 1)); + } + if (flag6) + { + if (!Main.tile[index19 - 1, index20].wire4()) + tupleList.Add(new Tuple(index19 - 1, index20)); + if (!Main.tile[index19 + 1, index20].wire4()) + tupleList.Add(new Tuple(index19 + 1, index20)); + if (!Main.tile[index19, index20 - 1].wire4()) + tupleList.Add(new Tuple(index19, index20 - 1)); + if (!Main.tile[index19, index20 + 1].wire4()) + tupleList.Add(new Tuple(index19, index20 + 1)); + } + } + } + } + } + if (tupleList.Count > 0) + { + float num27 = -1f; + Tuple tuple = tupleList[0]; + for (int index21 = 0; index21 < tupleList.Count; ++index21) + { + float num28 = Vector2.Distance(new Vector2((float) tupleList[index21].Item1, (float) tupleList[index21].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num27 == -1.0 || (double) num28 < (double) num27) + { + num27 = num28; + tuple = tupleList[index21]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.hammer > 0 && fX == -1 && fY == -1) + { + Vector2 vector2 = mouse - this.Center; + int num29 = Math.Sign(vector2.X); + int num30 = Math.Sign(vector2.Y); + if ((double) Math.Abs(vector2.X) > (double) Math.Abs(vector2.Y) * 3.0) + { + num30 = 0; + mouse.Y = this.Center.Y; + } + if ((double) Math.Abs(vector2.Y) > (double) Math.Abs(vector2.X) * 3.0) + { + num29 = 0; + mouse.X = this.Center.X; + } + int num31 = (int) this.Center.X / 16; + int num32 = (int) this.Center.Y / 16; + List> tupleList5 = new List>(); + List> tupleList6 = new List>(); + int num33 = 1; + if (num30 == -1 && num29 != 0) + num33 = -1; + int index22 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) ((this.width / 2 - 1) * num29)) / 16.0); + int index23 = (int) (((double) this.position.Y + 0.1) / 16.0); + if (num33 == -1) + index23 = (int) (((double) this.position.Y + (double) this.height - 1.0) / 16.0); + int num34 = this.width / 16 + (this.width % 16 == 0 ? 0 : 1); + int num35 = this.height / 16 + (this.height % 16 == 0 ? 0 : 1); + if (num29 != 0) + { + for (int index24 = 0; index24 < num35; ++index24) + { + if (Main.tile[index22, index23 + index24 * num33] == null) + return; + tupleList5.Add(new Tuple(index22, index23 + index24 * num33)); + } + } + if (num30 != 0) + { + for (int index25 = 0; index25 < num34; ++index25) + { + if (Main.tile[(int) ((double) this.position.X / 16.0) + index25, index23] == null) + return; + tupleList5.Add(new Tuple((int) ((double) this.position.X / 16.0) + index25, index23)); + } + } + int index26 = (int) (((double) mouse.X + (double) ((this.width / 2 - 1) * num29)) / 16.0); + int index27 = (int) (((double) mouse.Y + 0.1 - (double) (this.height / 2 + 1)) / 16.0); + if (num33 == -1) + index27 = (int) (((double) mouse.Y + (double) (this.height / 2) - 1.0) / 16.0); + if ((double) this.gravDir == -1.0 && num30 == 0) + ++index27; + if (index27 < 10) + index27 = 10; + if (index27 > Main.maxTilesY - 10) + index27 = Main.maxTilesY - 10; + int num36 = this.width / 16 + (this.width % 16 == 0 ? 0 : 1); + int num37 = this.height / 16 + (this.height % 16 == 0 ? 0 : 1); + if (num29 != 0) + { + for (int index28 = 0; index28 < num37; ++index28) + { + if (Main.tile[index26, index27 + index28 * num33] == null) + return; + tupleList6.Add(new Tuple(index26, index27 + index28 * num33)); + } + } + if (num30 != 0) + { + for (int index29 = 0; index29 < num36; ++index29) + { + if (Main.tile[(int) (((double) mouse.X - (double) (this.width / 2)) / 16.0) + index29, index27] == null) + return; + tupleList6.Add(new Tuple((int) (((double) mouse.X - (double) (this.width / 2)) / 16.0) + index29, index27)); + } + } + List> tupleList7 = new List>(); + while (tupleList5.Count > 0) + { + Tuple tuple3 = tupleList5[0]; + Tuple tuple4 = tupleList6[0]; + Tuple tuple5 = Collision.TupleHitLineWall(tuple3.Item1, tuple3.Item2, tuple4.Item1, tuple4.Item2); + if (tuple5.Item1 == -1 || tuple5.Item2 == -1) + { + tupleList5.Remove(tuple3); + tupleList6.Remove(tuple4); + } + else + { + if (tuple5.Item1 != tuple4.Item1 || tuple5.Item2 != tuple4.Item2) + tupleList7.Add(tuple5); + Tile tile = Main.tile[tuple5.Item1, tuple5.Item2]; + if (Collision.HitWallSubstep(tuple5.Item1, tuple5.Item2)) + tupleList7.Add(tuple5); + tupleList5.Remove(tuple3); + tupleList6.Remove(tuple4); + } + } + if (tupleList7.Count > 0) + { + float num38 = -1f; + Tuple tuple = tupleList7[0]; + for (int index30 = 0; index30 < tupleList7.Count; ++index30) + { + float num39 = Vector2.Distance(new Vector2((float) tupleList7[index30].Item1, (float) tupleList7[index30].Item2) * 16f + Vector2.One * 8f, this.Center); + if ((double) num38 == -1.0 || (double) num39 < (double) num38) + { + num38 = num39; + tuple = tupleList7[index30]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + this.poundRelease = false; + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList7.Clear(); + tupleList5.Clear(); + tupleList6.Clear(); + } + if (obj.hammer > 0 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int x = num6; x <= num7; ++x) + { + for (int y = num8; y <= num9; ++y) + { + if (Main.tile[x, y].wall > (byte) 0 && Collision.HitWallSubstep(x, y)) + tupleList.Add(new Tuple(x, y)); + } + } + if (tupleList.Count > 0) + { + float num40 = -1f; + Tuple tuple = tupleList[0]; + for (int index31 = 0; index31 < tupleList.Count; ++index31) + { + float num41 = Vector2.Distance(new Vector2((float) tupleList[index31].Item1, (float) tupleList[index31].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num40 == -1.0 || (double) num41 < (double) num40) + { + num40 = num41; + tuple = tupleList[index31]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + this.poundRelease = false; + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 3620 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index32 = num6; index32 <= num7; ++index32) + { + for (int index33 = num8; index33 <= num9; ++index33) + { + Tile tile = Main.tile[index32, index33]; + if (tile.active() && tile.actuator() && (!this.ActuationRodLock || this.ActuationRodLockSetting == tile.inActive())) + tupleList.Add(new Tuple(index32, index33)); + } + } + if (tupleList.Count > 0) + { + float num42 = -1f; + Tuple tuple = tupleList[0]; + for (int index34 = 0; index34 < tupleList.Count; ++index34) + { + float num43 = Vector2.Distance(new Vector2((float) tupleList[index34].Item1, (float) tupleList[index34].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num42 == -1.0 || (double) num43 < (double) num42) + { + num42 = num43; + tuple = tupleList[index34]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 510 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index35 = num6; index35 <= num7; ++index35) + { + for (int index36 = num8; index36 <= num9; ++index36) + { + Tile tile = Main.tile[index35, index36]; + if (tile.wire() || tile.wire2() || tile.wire3() || tile.wire4() || tile.actuator()) + tupleList.Add(new Tuple(index35, index36)); + } + } + if (tupleList.Count > 0) + { + float num44 = -1f; + Tuple tuple = tupleList[0]; + for (int index37 = 0; index37 < tupleList.Count; ++index37) + { + float num45 = Vector2.Distance(new Vector2((float) tupleList[index37].Item1, (float) tupleList[index37].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num44 == -1.0 || (double) num45 < (double) num44) + { + num44 = num45; + tuple = tupleList[index37]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile >= 0 && TileID.Sets.Platforms[obj.createTile] && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag8 = false; + if (Main.tile[index1, index2].active() && TileID.Sets.Platforms[(int) Main.tile[index1, index2].type]) + flag8 = true; + if (!flag8) + { + for (int index38 = num6; index38 <= num7; ++index38) + { + for (int index39 = num8; index39 <= num9; ++index39) + { + Tile tile1 = Main.tile[index38, index39]; + if (tile1.active() && TileID.Sets.Platforms[(int) tile1.type]) + { + int num46 = (int) tile1.slope(); + if (num46 != 2 && !Main.tile[index38 - 1, index39 - 1].active()) + tupleList.Add(new Tuple(index38 - 1, index39 - 1)); + if (!Main.tile[index38 - 1, index39].active()) + tupleList.Add(new Tuple(index38 - 1, index39)); + if (num46 != 1 && !Main.tile[index38 - 1, index39 + 1].active()) + tupleList.Add(new Tuple(index38 - 1, index39 + 1)); + if (num46 != 1 && !Main.tile[index38 + 1, index39 - 1].active()) + tupleList.Add(new Tuple(index38 + 1, index39 - 1)); + if (!Main.tile[index38 + 1, index39].active()) + tupleList.Add(new Tuple(index38 + 1, index39)); + if (num46 != 2 && !Main.tile[index38 + 1, index39 + 1].active()) + tupleList.Add(new Tuple(index38 + 1, index39 + 1)); + } + if (!tile1.active()) + { + int num47 = 0; + int num48 = 1; + Tile tile2 = Main.tile[index38 + num47, index39 + num48]; + if (tile2.active() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type]) + tupleList.Add(new Tuple(index38, index39)); + int num49 = -1; + int num50 = 0; + Tile tile3 = Main.tile[index38 + num49, index39 + num50]; + if (tile3.active() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + tupleList.Add(new Tuple(index38, index39)); + int num51 = 1; + int num52 = 0; + Tile tile4 = Main.tile[index38 + num51, index39 + num52]; + if (tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type]) + tupleList.Add(new Tuple(index38, index39)); + } + } + } + } + if (tupleList.Count > 0) + { + float num53 = -1f; + Tuple tuple = tupleList[0]; + for (int index40 = 0; index40 < tupleList.Count; ++index40) + { + float num54 = Vector2.Distance(new Vector2((float) tupleList[index40].Item1, (float) tupleList[index40].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num53 == -1.0 || (double) num54 < (double) num53) + { + num53 = num54; + tuple = tupleList[index40]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if ((obj.type == 2340 || obj.type == 2739) && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag9 = false; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 314) + flag9 = true; + if (!flag9) + { + for (int index41 = num6; index41 <= num7; ++index41) + { + for (int index42 = num8; index42 <= num9; ++index42) + { + Tile tile = Main.tile[index41, index42]; + if (tile.active() && tile.type == (ushort) 314) + { + bool flag10 = Main.tile[index41 + 1, index42 + 1].active() && Main.tile[index41 + 1, index42 + 1].type == (ushort) 314; + bool flag11 = Main.tile[index41 + 1, index42 - 1].active() && Main.tile[index41 + 1, index42 - 1].type == (ushort) 314; + bool flag12 = Main.tile[index41 - 1, index42 + 1].active() && Main.tile[index41 - 1, index42 + 1].type == (ushort) 314; + bool flag13 = Main.tile[index41 - 1, index42 - 1].active() && Main.tile[index41 - 1, index42 - 1].type == (ushort) 314; + if ((!Main.tile[index41 - 1, index42 - 1].active() || Main.tileCut[(int) Main.tile[index41 - 1, index42 - 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 - 1, index42 - 1].type]) && !(!flag10 & flag11)) + tupleList.Add(new Tuple(index41 - 1, index42 - 1)); + if (!Main.tile[index41 - 1, index42].active() || Main.tileCut[(int) Main.tile[index41 - 1, index42].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 - 1, index42].type]) + tupleList.Add(new Tuple(index41 - 1, index42)); + if ((!Main.tile[index41 - 1, index42 + 1].active() || Main.tileCut[(int) Main.tile[index41 - 1, index42 + 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 - 1, index42 + 1].type]) && !(!flag11 & flag10)) + tupleList.Add(new Tuple(index41 - 1, index42 + 1)); + if ((!Main.tile[index41 + 1, index42 - 1].active() || Main.tileCut[(int) Main.tile[index41 + 1, index42 - 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 + 1, index42 - 1].type]) && !(!flag12 & flag13)) + tupleList.Add(new Tuple(index41 + 1, index42 - 1)); + if (!Main.tile[index41 + 1, index42].active() || Main.tileCut[(int) Main.tile[index41 + 1, index42].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 + 1, index42].type]) + tupleList.Add(new Tuple(index41 + 1, index42)); + if ((!Main.tile[index41 + 1, index42 + 1].active() || Main.tileCut[(int) Main.tile[index41 + 1, index42 + 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index41 + 1, index42 + 1].type]) && !(!flag13 & flag12)) + tupleList.Add(new Tuple(index41 + 1, index42 + 1)); + } + } + } + } + if (tupleList.Count > 0) + { + float num55 = -1f; + Tuple tuple = tupleList[0]; + for (int index43 = 0; index43 < tupleList.Count; ++index43) + { + if ((!Main.tile[tupleList[index43].Item1, tupleList[index43].Item2 - 1].active() || Main.tile[tupleList[index43].Item1, tupleList[index43].Item2 - 1].type != (ushort) 314) && (!Main.tile[tupleList[index43].Item1, tupleList[index43].Item2 + 1].active() || Main.tile[tupleList[index43].Item1, tupleList[index43].Item2 + 1].type != (ushort) 314)) + { + float num56 = Vector2.Distance(new Vector2((float) tupleList[index43].Item1, (float) tupleList[index43].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num55 == -1.0 || (double) num56 < (double) num55) + { + num55 = num56; + tuple = tupleList[index43]; + } + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9) && (double) num55 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 2492 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag14 = false; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 314) + flag14 = true; + if (!flag14) + { + for (int index44 = num6; index44 <= num7; ++index44) + { + for (int index45 = num8; index45 <= num9; ++index45) + { + Tile tile = Main.tile[index44, index45]; + if (tile.active() && tile.type == (ushort) 314) + { + if (!Main.tile[index44 - 1, index45].active() || Main.tileCut[(int) Main.tile[index44 - 1, index45].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index44 - 1, index45].type]) + tupleList.Add(new Tuple(index44 - 1, index45)); + if (!Main.tile[index44 + 1, index45].active() || Main.tileCut[(int) Main.tile[index44 + 1, index45].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index44 + 1, index45].type]) + tupleList.Add(new Tuple(index44 + 1, index45)); + } + } + } + } + if (tupleList.Count > 0) + { + float num57 = -1f; + Tuple tuple = tupleList[0]; + for (int index46 = 0; index46 < tupleList.Count; ++index46) + { + if ((!Main.tile[tupleList[index46].Item1, tupleList[index46].Item2 - 1].active() || Main.tile[tupleList[index46].Item1, tupleList[index46].Item2 - 1].type != (ushort) 314) && (!Main.tile[tupleList[index46].Item1, tupleList[index46].Item2 + 1].active() || Main.tile[tupleList[index46].Item1, tupleList[index46].Item2 + 1].type != (ushort) 314)) + { + float num58 = Vector2.Distance(new Vector2((float) tupleList[index46].Item1, (float) tupleList[index46].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num57 == -1.0 || (double) num58 < (double) num57) + { + num57 = num58; + tuple = tupleList[index46]; + } + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9) && (double) num57 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createWall > 0 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int x = num6; x <= num7; ++x) + { + for (int y = num8; y <= num9; ++y) + { + Tile tile = Main.tile[x, y]; + if (tile.wall == (byte) 0 && (!tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]) && Collision.CanHitWithCheck(this.position, this.width, this.height, new Vector2((float) x, (float) y) * 16f, 16, 16, new Utils.PerLinePoint(DelegateMethods.NotDoorStand))) + { + bool flag15 = false; + if (Main.tile[x - 1, y].active() || Main.tile[x - 1, y].wall > (byte) 0) + flag15 = true; + if (Main.tile[x + 1, y].active() || Main.tile[x + 1, y].wall > (byte) 0) + flag15 = true; + if (Main.tile[x, y - 1].active() || Main.tile[x, y - 1].wall > (byte) 0) + flag15 = true; + if (Main.tile[x, y + 1].active() || Main.tile[x, y + 1].wall > (byte) 0) + flag15 = true; + if (WorldGen.IsOpenDoorAnchorFrame(x, y)) + flag15 = false; + if (flag15) + tupleList.Add(new Tuple(x, y)); + } + } + } + if (tupleList.Count > 0) + { + float num59 = -1f; + Tuple tuple = tupleList[0]; + for (int index47 = 0; index47 < tupleList.Count; ++index47) + { + float num60 = Vector2.Distance(new Vector2((float) tupleList[index47].Item1, (float) tupleList[index47].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num59 == -1.0 || (double) num60 < (double) num59) + { + num59 = num60; + tuple = tupleList[index47]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 254 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index48 = num6; index48 <= num7; ++index48) + { + for (int index49 = num8; index49 <= num9; ++index49) + { + Tile tile5 = Main.tile[index48, index49 + 1]; + Tile tile6 = Main.tile[index48 - 1, index49 + 1]; + if ((double) index49 <= Main.worldSurface - 2.0) + { + bool flag16 = true; + if (!tile6.active() || !tile5.active()) + flag16 = false; + if (tile6.slope() > (byte) 0 || tile5.slope() > (byte) 0 || tile6.halfBrick() || tile5.halfBrick()) + flag16 = false; + if (tile6.type != (ushort) 2 && tile6.type != (ushort) 109) + flag16 = false; + if (tile5.type != (ushort) 2 && tile5.type != (ushort) 109) + flag16 = false; + for (int x = index48 - 1; x <= index48; ++x) + { + for (int y = index49 - 1; y <= index49; ++y) + { + if (Main.tile[x, y].active() && !WorldGen.CanCutTile(x, y, TileCuttingContext.AttackMelee)) + flag16 = false; + } + } + if (flag16) + tupleList.Add(new Tuple(index48, index49)); + } + else + break; + } + } + if (tupleList.Count > 0) + { + float num61 = -1f; + Tuple tuple = tupleList[0]; + for (int index50 = 0; index50 < tupleList.Count; ++index50) + { + float num62 = Vector2.Distance(new Vector2((float) tupleList[index50].Item1, (float) tupleList[index50].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num61 == -1.0 || (double) num62 < (double) num61) + { + num61 = num62; + tuple = tupleList[index50]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 454 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index51 = num6; index51 <= num7; ++index51) + { + for (int index52 = num8; index52 <= num9 && (double) index52 <= Main.worldSurface - 2.0; ++index52) + { + bool flag17 = true; + for (int index53 = index51 - 2; index53 <= index51 + 1; ++index53) + { + for (int index54 = index52 - 1; index54 <= index52 + 2; ++index54) + { + Tile testTile = Main.tile[index53, index54]; + if (index54 == index52 - 1) + { + if (!WorldGen.SolidTile(testTile)) + flag17 = false; + } + else if (testTile.active() && (!Main.tileCut[(int) testTile.type] || testTile.type == (ushort) 454)) + flag17 = false; + } + } + if (flag17) + tupleList.Add(new Tuple(index51, index52)); + } + } + if (tupleList.Count > 0) + { + float num63 = -1f; + Tuple tuple = tupleList[0]; + for (int index55 = 0; index55 < tupleList.Count; ++index55) + { + float num64 = Vector2.Distance(new Vector2((float) tupleList[index55].Item1, (float) tupleList[index55].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num63 == -1.0 || (double) num64 < (double) num63) + { + num63 = num64; + tuple = tupleList[index55]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 138 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index56 = num6; index56 <= num7; ++index56) + { + for (int index57 = num8; index57 <= num9; ++index57) + { + Tile tile7 = Main.tile[index56, index57 + 1]; + Tile tile8 = Main.tile[index56 - 1, index57 + 1]; + bool flag18 = true; + if (!tile8.nactive() || !tile7.nactive()) + flag18 = false; + if (tile8.slope() > (byte) 0 || tile7.slope() > (byte) 0 || tile8.halfBrick() || tile7.halfBrick()) + flag18 = false; + if (Main.tileNoAttach[(int) tile8.type] || Main.tileNoAttach[(int) tile7.type]) + flag18 = false; + for (int index58 = index56 - 1; index58 <= index56; ++index58) + { + for (int index59 = index57 - 1; index59 <= index57; ++index59) + { + Tile tile9 = Main.tile[index58, index59]; + if (tile9.active() && !Main.tileCut[(int) tile9.type]) + flag18 = false; + } + } + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(index56 * 16 - 16, index57 * 16 - 16, 32, 32); + for (int index60 = 0; index60 < (int) byte.MaxValue; ++index60) + { + Player player = Main.player[index60]; + if (player.active && !player.dead && player.Hitbox.Intersects(rectangle)) + { + flag18 = false; + break; + } + } + if (flag18) + tupleList.Add(new Tuple(index56, index57)); + } + } + if (tupleList.Count > 0) + { + float num65 = -1f; + Tuple tuple = tupleList[0]; + for (int index61 = 0; index61 < tupleList.Count; ++index61) + { + float num66 = Vector2.Distance(new Vector2((float) tupleList[index61].Item1, (float) tupleList[index61].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num65 == -1.0 || (double) num66 < (double) num65) + { + num65 = num66; + tuple = tupleList[index61]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + Player.SmartCursor_Torch(obj, ref mouse, num6, num7, num8, num9, ref fX, ref fY, index1, index2); + Player.SmartCursor_Filling(obj, ref mouse, num6, num7, num8, num9, ref fX, ref fY, index1, index2); + if (Player.SmartCursorSettings.SmartBlocksEnabled && obj.createTile > -1 && obj.type != 213 && Main.tileSolid[obj.createTile] && !Main.tileSolidTop[obj.createTile] && !Main.tileFrameImportant[obj.createTile] && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag19 = false; + if (Main.tile[index1, index2].active()) + flag19 = true; + if (!Collision.InTileBounds(index1, index2, num6, num8, num7, num9)) + flag19 = true; + if (!flag19) + { + for (int index62 = num6; index62 <= num7; ++index62) + { + for (int index63 = num8; index63 <= num9; ++index63) + { + Tile tile = Main.tile[index62, index63]; + if (!tile.active() || Main.tileCut[(int) tile.type] || TileID.Sets.BreakableWhenPlacing[(int) tile.type]) + { + bool flag20 = false; + if (Main.tile[index62 - 1, index63].active() && Main.tileSolid[(int) Main.tile[index62 - 1, index63].type] && !Main.tileSolidTop[(int) Main.tile[index62 - 1, index63].type]) + flag20 = true; + if (Main.tile[index62 + 1, index63].active() && Main.tileSolid[(int) Main.tile[index62 + 1, index63].type] && !Main.tileSolidTop[(int) Main.tile[index62 + 1, index63].type]) + flag20 = true; + if (Main.tile[index62, index63 - 1].active() && Main.tileSolid[(int) Main.tile[index62, index63 - 1].type] && !Main.tileSolidTop[(int) Main.tile[index62, index63 - 1].type]) + flag20 = true; + if (Main.tile[index62, index63 + 1].active() && Main.tileSolid[(int) Main.tile[index62, index63 + 1].type] && !Main.tileSolidTop[(int) Main.tile[index62, index63 + 1].type]) + flag20 = true; + if (flag20) + tupleList.Add(new Tuple(index62, index63)); + } + } + } + } + if (tupleList.Count > 0) + { + float num67 = -1f; + Tuple tuple = tupleList[0]; + for (int index64 = 0; index64 < tupleList.Count; ++index64) + { + if (Collision.EmptyTile(tupleList[index64].Item1, tupleList[index64].Item2)) + { + float num68 = Vector2.Distance(new Vector2((float) tupleList[index64].Item1, (float) tupleList[index64].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num67 == -1.0 || (double) num68 < (double) num67) + { + num67 = num68; + tuple = tupleList[index64]; + } + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9) && (double) num67 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if ((obj.type == 1072 || obj.type == 1544) && num1 != 0 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index65 = num6; index65 <= num7; ++index65) + { + for (int index66 = num8; index66 <= num9; ++index66) + { + Tile tile = Main.tile[index65, index66]; + if (tile.wall > (byte) 0 && (int) tile.wallColor() != num1 && (!tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type])) + tupleList.Add(new Tuple(index65, index66)); + } + } + if (tupleList.Count > 0) + { + float num69 = -1f; + Tuple tuple = tupleList[0]; + for (int index67 = 0; index67 < tupleList.Count; ++index67) + { + float num70 = Vector2.Distance(new Vector2((float) tupleList[index67].Item1, (float) tupleList[index67].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num69 == -1.0 || (double) num70 < (double) num69) + { + num69 = num70; + tuple = tupleList[index67]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if ((obj.type == 1071 || obj.type == 1543) && num1 != 0 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index68 = num6; index68 <= num7; ++index68) + { + for (int index69 = num8; index69 <= num9; ++index69) + { + Tile tile = Main.tile[index68, index69]; + if (tile.active() && (int) tile.color() != num1) + tupleList.Add(new Tuple(index68, index69)); + } + } + if (tupleList.Count > 0) + { + float num71 = -1f; + Tuple tuple = tupleList[0]; + for (int index70 = 0; index70 < tupleList.Count; ++index70) + { + float num72 = Vector2.Distance(new Vector2((float) tupleList[index70].Item1, (float) tupleList[index70].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num71 == -1.0 || (double) num72 < (double) num71) + { + num71 = num72; + tuple = tupleList[index70]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if ((obj.type == 1100 || obj.type == 1545) && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index71 = num6; index71 <= num7; ++index71) + { + for (int index72 = num8; index72 <= num9; ++index72) + { + Tile tile = Main.tile[index71, index72]; + if (tile.active() && tile.color() > (byte) 0 || tile.wall > (byte) 0 && tile.wallColor() > (byte) 0) + tupleList.Add(new Tuple(index71, index72)); + } + } + if (tupleList.Count > 0) + { + float num73 = -1f; + Tuple tuple = tupleList[0]; + for (int index73 = 0; index73 < tupleList.Count; ++index73) + { + float num74 = Vector2.Distance(new Vector2((float) tupleList[index73].Item1, (float) tupleList[index73].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num73 == -1.0 || (double) num74 < (double) num73) + { + num73 = num74; + tuple = tupleList[index73]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 27 && fX == -1 && fY == -1 && num8 > 20) + { + List> tupleList8 = new List>(); + for (int index74 = num6; index74 <= num7; ++index74) + { + for (int endY = num8; endY <= num9; ++endY) + { + Tile tile10 = Main.tile[index74, endY]; + Tile tile11 = Main.tile[index74, endY - 1]; + Tile testTile = Main.tile[index74, endY + 1]; + Tile tile12 = Main.tile[index74 - 1, endY]; + Tile tile13 = Main.tile[index74 + 1, endY]; + Tile tile14 = Main.tile[index74 - 2, endY]; + Tile tile15 = Main.tile[index74 + 2, endY]; + Tile tile16 = Main.tile[index74 - 3, endY]; + Tile tile17 = Main.tile[index74 + 3, endY]; + if ((!tile10.active() || Main.tileCut[(int) tile10.type] || TileID.Sets.BreakableWhenPlacing[(int) tile10.type]) && (!tile11.active() || Main.tileCut[(int) tile11.type] || TileID.Sets.BreakableWhenPlacing[(int) tile11.type]) && (!tile12.active() || tile12.type != (ushort) 20) && (!tile13.active() || tile13.type != (ushort) 20) && (!tile14.active() || tile14.type != (ushort) 20) && (!tile15.active() || tile15.type != (ushort) 20) && (!tile16.active() || tile16.type != (ushort) 20) && (!tile17.active() || tile17.type != (ushort) 20) && 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: + if (tile12.liquid == (byte) 0 && tile10.liquid == (byte) 0 && tile13.liquid == (byte) 0 && WorldGen.EmptyTileCheck(index74 - 2, index74 + 2, endY - 20, endY, 20)) + { + tupleList8.Add(new Tuple(index74, endY)); + continue; + } + continue; + case 60: + if (WorldGen.EmptyTileCheck(index74 - 2, index74 + 2, endY - 20, endY, 20)) + { + tupleList8.Add(new Tuple(index74, endY)); + continue; + } + continue; + default: + continue; + } + } + } + } + List> tupleList9 = new List>(); + for (int index75 = 0; index75 < tupleList8.Count; ++index75) + { + bool flag21 = false; + for (int index76 = -1; index76 < 2; index76 += 2) + { + Tile tile = Main.tile[tupleList8[index75].Item1 + index76, tupleList8[index75].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: + flag21 = true; + continue; + default: + continue; + } + } + } + if (!flag21) + tupleList9.Add(tupleList8[index75]); + } + for (int index77 = 0; index77 < tupleList9.Count; ++index77) + tupleList8.Remove(tupleList9[index77]); + tupleList9.Clear(); + if (tupleList8.Count > 0) + { + float num75 = -1f; + Tuple tuple = tupleList8[0]; + for (int index78 = 0; index78 < tupleList8.Count; ++index78) + { + float num76 = Vector2.Distance(new Vector2((float) tupleList8[index78].Item1, (float) tupleList8[index78].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num75 == -1.0 || (double) num76 < (double) num75) + { + num75 = num76; + tuple = tupleList8[index78]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList8.Clear(); + } + if (obj.type == 205 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index79 = num6; index79 <= num7; ++index79) + { + for (int index80 = num8; index80 <= num9; ++index80) + { + Tile tile = Main.tile[index79, index80]; + if (tile.liquid > (byte) 0) + { + int num77 = (int) tile.liquidType(); + int num78 = 0; + for (int index81 = index79 - 1; index81 <= index79 + 1; ++index81) + { + for (int index82 = index80 - 1; index82 <= index80 + 1; ++index82) + { + if ((int) Main.tile[index81, index82].liquidType() == num77) + num78 += (int) Main.tile[index81, index82].liquid; + } + } + if (num78 > 100) + tupleList.Add(new Tuple(index79, index80)); + } + } + } + if (tupleList.Count > 0) + { + float num79 = -1f; + Tuple tuple = tupleList[0]; + for (int index83 = 0; index83 < tupleList.Count; ++index83) + { + float num80 = Vector2.Distance(new Vector2((float) tupleList[index83].Item1, (float) tupleList[index83].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num79 == -1.0 || (double) num80 < (double) num79) + { + num79 = num80; + tuple = tupleList[index83]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 849 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index84 = num6; index84 <= num7; ++index84) + { + for (int index85 = num8; index85 <= num9; ++index85) + { + Tile tile = Main.tile[index84, index85]; + if ((tile.wire() || tile.wire2() || tile.wire3() || tile.wire4()) && !tile.actuator() && tile.active()) + tupleList.Add(new Tuple(index84, index85)); + } + } + if (tupleList.Count > 0) + { + float num81 = -1f; + Tuple tuple = tupleList[0]; + for (int index86 = 0; index86 < tupleList.Count; ++index86) + { + float num82 = Vector2.Distance(new Vector2((float) tupleList[index86].Item1, (float) tupleList[index86].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num81 == -1.0 || (double) num82 < (double) num81) + { + num81 = num82; + tuple = tupleList[index86]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 82 && fX == -1 && fY == -1) + { + int placeStyle = obj.placeStyle; + List> tupleList = new List>(); + for (int index87 = num6; index87 <= num7; ++index87) + { + for (int index88 = num8; index88 <= num9; ++index88) + { + Tile tile18 = Main.tile[index87, index88]; + Tile tile19 = Main.tile[index87, index88 + 1]; + if ((!tile18.active() || TileID.Sets.BreakableWhenPlacing[(int) tile18.type] || Main.tileCut[(int) tile18.type] && tile18.type != (ushort) 82 && tile18.type != (ushort) 83) && tile19.nactive() && !tile19.halfBrick() && tile19.slope() == (byte) 0) + { + switch (placeStyle) + { + case 0: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 2 && tile19.type != (ushort) 109 || tile18.liquid > (byte) 0) + continue; + break; + case 1: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 60 || tile18.liquid > (byte) 0) + continue; + break; + case 2: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 0 && tile19.type != (ushort) 59 || tile18.liquid > (byte) 0) + continue; + break; + case 3: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 203 && tile19.type != (ushort) 199 && tile19.type != (ushort) 23 && tile19.type != (ushort) 25 || tile18.liquid > (byte) 0) + continue; + break; + case 4: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 53 && tile19.type != (ushort) 116 || tile18.liquid > (byte) 0 && tile18.lava()) + continue; + break; + case 5: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 57 || tile18.liquid > (byte) 0 && !tile18.lava()) + continue; + break; + case 6: + if (tile19.type != (ushort) 78 && tile19.type != (ushort) 380 && tile19.type != (ushort) 147 && tile19.type != (ushort) 161 && tile19.type != (ushort) 163 && tile19.type != (ushort) 164 && tile19.type != (ushort) 200 || tile18.liquid > (byte) 0 && tile18.lava()) + continue; + break; + } + tupleList.Add(new Tuple(index87, index88)); + } + } + } + if (tupleList.Count > 0) + { + float num83 = -1f; + Tuple tuple = tupleList[0]; + for (int index89 = 0; index89 < tupleList.Count; ++index89) + { + float num84 = Vector2.Distance(new Vector2((float) tupleList[index89].Item1, (float) tupleList[index89].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num83 == -1.0 || (double) num84 < (double) num83) + { + num83 = num84; + tuple = tupleList[index89]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 380 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag22 = false; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 380) + flag22 = true; + if (!flag22) + { + for (int index90 = num6; index90 <= num7; ++index90) + { + for (int index91 = num8; index91 <= num9; ++index91) + { + Tile tile = Main.tile[index90, index91]; + if (tile.active() && tile.type == (ushort) 380) + { + if (!Main.tile[index90 - 1, index91].active() || Main.tileCut[(int) Main.tile[index90 - 1, index91].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index90 - 1, index91].type]) + tupleList.Add(new Tuple(index90 - 1, index91)); + if (!Main.tile[index90 + 1, index91].active() || Main.tileCut[(int) Main.tile[index90 + 1, index91].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[index90 + 1, index91].type]) + tupleList.Add(new Tuple(index90 + 1, index91)); + } + } + } + } + if (tupleList.Count > 0) + { + float num85 = -1f; + Tuple tuple = tupleList[0]; + for (int index92 = 0; index92 < tupleList.Count; ++index92) + { + float num86 = Vector2.Distance(new Vector2((float) tupleList[index92].Item1, (float) tupleList[index92].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num85 == -1.0 || (double) num86 < (double) num85) + { + num85 = num86; + tuple = tupleList[index92]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9) && (double) num85 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.createTile == 78 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + bool flag23 = false; + if (Main.tile[index1, index2].active()) + flag23 = true; + if (!Collision.InTileBounds(index1, index2, num6, num8, num7, num9)) + flag23 = true; + if (!flag23) + { + for (int index93 = num6; index93 <= num7; ++index93) + { + for (int index94 = num8; index94 <= num9; ++index94) + { + Tile tile20 = Main.tile[index93, index94]; + Tile tile21 = Main.tile[index93, index94 + 1]; + if ((!tile20.active() || Main.tileCut[(int) tile20.type] || TileID.Sets.BreakableWhenPlacing[(int) tile20.type]) && tile21.nactive() && !tile21.halfBrick() && tile21.slope() == (byte) 0 && Main.tileSolid[(int) tile21.type]) + tupleList.Add(new Tuple(index93, index94)); + } + } + } + if (tupleList.Count > 0) + { + float num87 = -1f; + Tuple tuple = tupleList[0]; + for (int index95 = 0; index95 < tupleList.Count; ++index95) + { + if (Collision.EmptyTile(tupleList[index95].Item1, tupleList[index95].Item2, true)) + { + float num88 = Vector2.Distance(new Vector2((float) tupleList[index95].Item1, (float) tupleList[index95].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num87 == -1.0 || (double) num88 < (double) num87) + { + num87 = num88; + tuple = tupleList[index95]; + } + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9) && (double) num87 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (obj.type == 213 && fX == -1 && fY == -1) + { + List> tupleList = new List>(); + for (int index96 = num6; index96 <= num7; ++index96) + { + for (int index97 = num8; index97 <= num9; ++index97) + { + Tile tile = Main.tile[index96, index97]; + bool flag24 = !Main.tile[index96 - 1, index97].active() || !Main.tile[index96, index97 + 1].active() || !Main.tile[index96 + 1, index97].active() || !Main.tile[index96, index97 - 1].active(); + bool flag25 = !Main.tile[index96 - 1, index97 - 1].active() || !Main.tile[index96 - 1, index97 + 1].active() || !Main.tile[index96 + 1, index97 + 1].active() || !Main.tile[index96 + 1, index97 - 1].active(); + if (tile.active() && !tile.inActive() && (tile.type == (ushort) 0 || tile.type == (ushort) 1) && (flag24 || tile.type == (ushort) 0 & flag25)) + tupleList.Add(new Tuple(index96, index97)); + } + } + if (tupleList.Count > 0) + { + float num89 = -1f; + Tuple tuple = tupleList[0]; + for (int index98 = 0; index98 < tupleList.Count; ++index98) + { + float num90 = Vector2.Distance(new Vector2((float) tupleList[index98].Item1, (float) tupleList[index98].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num89 == -1.0 || (double) num90 < (double) num89) + { + num89 = num90; + tuple = tupleList[index98]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, num6, num8, num7, num9)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + if (fX != -1 && fY != -1) + { + Main.SmartCursorX = Player.tileTargetX = fX; + Main.SmartCursorY = Player.tileTargetY = fY; + Main.SmartCursorShowing = true; + } + ignoreTargets.Clear(); + } + + public void SmartInteractLookup() + { + if (this.whoAmI != Main.myPlayer) + return; + Main.SmartInteractShowingGenuine = false; + Main.SmartInteractShowingFake = false; + Main.SmartInteractNPC = -1; + Main.SmartInteractNPCsNearby.Clear(); + Main.SmartInteractTileCoords.Clear(); + Main.SmartInteractTileCoordsSelected.Clear(); + int num1; + Main.TileInteractionHY = num1 = -1; + Main.TileInteractionLY = num1; + Main.TileInteractionHX = num1; + Main.TileInteractionLX = num1; + bool smartCursorEnabled = Main.SmartCursorEnabled; + if (!smartCursorEnabled && !PlayerInput.UsingGamepad) + return; + Item obj = this.inventory[this.selectedItem]; + 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; + int index1 = Player.tileTargetX; + int index2 = Player.tileTargetY; + if (index1 < 10) + index1 = 10; + if (index1 > Main.maxTilesX - 10) + index1 = Main.maxTilesX - 10; + if (index2 < 10) + index2 = 10; + if (index2 > Main.maxTilesY - 10) + index2 = Main.maxTilesY - 10; + bool flag1 = false; + if (Main.tile[index1, index2] == null) + return; + if (Main.tile[index1, index2].active()) + { + switch (Main.tile[index1, index2].type) + { + case 4: + case 33: + case 334: + case 395: + case 410: + case 455: + flag1 = true; + break; + } + } + if (flag1) + return; + int num2 = 0; + int num3 = (int) ((double) this.position.X / 16.0) - Player.tileRangeX - num2 + 1; + int num4 = (int) (((double) this.position.X + (double) this.width) / 16.0) + Player.tileRangeX + num2 - 1; + int num5 = (int) ((double) this.position.Y / 16.0) - Player.tileRangeY - num2 + 1; + int num6 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + Player.tileRangeY + num2 - 2; + int lx1 = Utils.Clamp(num3, 10, Main.maxTilesX - 10); + int hx = Utils.Clamp(num4, 10, Main.maxTilesX - 10); + int ly1 = Utils.Clamp(num5, 10, Main.maxTilesY - 10); + int hy = Utils.Clamp(num6, 10, Main.maxTilesY - 10); + List> tupleList1 = new List>(); + for (int index3 = 0; index3 < this.grapCount; ++index3) + { + Projectile projectile = Main.projectile[this.grappling[index3]]; + int num7 = (int) projectile.Center.X / 16; + int num8 = (int) projectile.Center.Y / 16; + tupleList1.Add(new Tuple(num7, num8)); + } + int x1 = -1; + int y1 = -1; + int index4 = -1; + Vector2 point1 = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition; + if (x1 == -1 && y1 == -1) + { + List> tupleList2 = new List>(); + for (int index5 = lx1; index5 <= hx; ++index5) + { + for (int index6 = ly1; index6 <= hy; ++index6) + { + Tile tile = Main.tile[index5, index6]; + if (tile.active()) + { + ushort type = tile.type; + if (type <= (ushort) 209) + { + if (type <= (ushort) 97) + { + if (type <= (ushort) 55) + { + if (type <= (ushort) 21) + { + if ((uint) type - 10U > 1U && type != (ushort) 21) + continue; + } + else if (type != (ushort) 29 && type != (ushort) 55) + continue; + } + else if (type <= (ushort) 85) + { + if (type != (ushort) 79 && type != (ushort) 85) + continue; + } + else if (type != (ushort) 88 && type != (ushort) 97) + continue; + } + else if (type <= (ushort) 136) + { + if (type <= (ushort) 125) + { + if (type != (ushort) 104 && type != (ushort) 125) + continue; + } + else if (type != (ushort) 132 && type != (ushort) 136) + continue; + } + else if (type <= (ushort) 144) + { + if (type != (ushort) 139 && type != (ushort) 144) + continue; + } + else if (type != (ushort) 207 && type != (ushort) 209) + continue; + } + else if (type <= (ushort) 356) + { + if (type <= (ushort) 287) + { + if (type <= (ushort) 216) + { + if (type != (ushort) 212) + { + if ((uint) type - 215U > 1U) + continue; + } + else + { + if (this.HasItem(949)) + { + tupleList2.Add(new Tuple(index5, index6)); + continue; + } + continue; + } + } + else if (type != (ushort) 237) + { + if (type != (ushort) 287) + continue; + } + else + { + if (this.HasItem(1293)) + { + tupleList2.Add(new Tuple(index5, index6)); + continue; + } + continue; + } + } + else if (type <= (ushort) 338) + { + if (type != (ushort) 335 && type != (ushort) 338) + continue; + } + else if (type != (ushort) 354) + { + if (type == (ushort) 356 && !Main.fastForwardTime && (Main.netMode == 1 || Main.sundialCooldown == 0)) + { + tupleList2.Add(new Tuple(index5, index6)); + continue; + } + continue; + } + } + else if (type <= (ushort) 425) + { + if (type <= (ushort) 389) + { + if (type != (ushort) 377 && (uint) type - 386U > 3U) + continue; + } + else if ((uint) type - 410U > 1U && type != (ushort) 425) + continue; + } + else if (type <= (ushort) 455) + { + if (type != (ushort) 441 && type != (ushort) 455) + continue; + } + else if (type != (ushort) 463 && (uint) type - 467U > 1U) + continue; + tupleList2.Add(new Tuple(index5, index6)); + } + } + } + if (tupleList2.Count > 0) + { + float num9 = -1f; + Tuple tuple = tupleList2[0]; + for (int index7 = 0; index7 < tupleList2.Count; ++index7) + { + float num10 = Vector2.Distance(new Vector2((float) tupleList2[index7].Item1, (float) tupleList2[index7].Item2) * 16f + Vector2.One * 8f, vector2); + if ((double) num9 == -1.0 || (double) num10 < (double) num9) + { + num9 = num10; + tuple = tupleList2[index7]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, lx1, ly1, hx, hy)) + { + x1 = tuple.Item1; + y1 = tuple.Item2; + } + } + bool flag2 = false; + for (int index8 = 0; index8 < tupleList2.Count; ++index8) + { + int index9 = tupleList2[index8].Item1; + int index10 = tupleList2[index8].Item2; + Tile tile = Main.tile[index9, index10]; + int num11 = 0; + int num12 = 0; + int num13 = 18; + int num14 = 18; + int num15 = 0; + int num16 = 2; + switch (tile.type) + { + case 10: + num11 = 1; + num12 = 3; + num16 = 0; + break; + case 11: + case 356: + case 410: + num11 = 2; + num12 = 3; + num16 = 0; + 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: + num11 = 2; + num12 = 2; + break; + case 29: + case 387: + num11 = 2; + num12 = 1; + break; + case 79: + num11 = 4; + num12 = 2; + num16 = 0; + break; + case 88: + num11 = 3; + num12 = 1; + num16 = 0; + break; + case 104: + num11 = 2; + num12 = 5; + break; + case 136: + case 144: + num11 = 1; + num12 = 1; + num16 = 0; + break; + case 139: + num11 = 2; + num12 = 2; + num16 = 0; + break; + case 207: + num11 = 2; + num12 = 4; + num16 = 0; + break; + case 209: + num11 = 4; + num12 = 3; + num16 = 0; + break; + case 212: + num11 = 4; + num12 = 3; + break; + case 215: + case 237: + case 377: + num11 = 3; + num12 = 2; + break; + case 216: + case 338: + num11 = 1; + num12 = 2; + break; + case 354: + case 455: + num11 = 3; + num12 = 3; + num16 = 0; + break; + case 388: + case 389: + num11 = 1; + num12 = 5; + break; + case 463: + num11 = 3; + num12 = 4; + break; + } + if (num11 != 0 && num12 != 0) + { + int lx2 = index9 - (int) tile.frameX % (num13 * num11 + num15) / num13; + int ly2 = index10 - (int) tile.frameY % (num14 * num12 + num16) / num14; + bool flag3 = Collision.InTileBounds(x1, y1, lx2, ly2, lx2 + num11 - 1, ly2 + num12 - 1); + if (!smartCursorEnabled) + flag3 = flag3 && Collision.InTileBounds((int) vector2.X / 16, (int) vector2.Y / 16, lx2, ly2, lx2 + num11 - 1, ly2 + num12 - 1); + if (flag2) + flag3 = false; + if (!flag2 & flag3) + flag2 = true; + for (int x2 = lx2; x2 < lx2 + num11; ++x2) + { + for (int y2 = ly2; y2 < ly2 + num12; ++y2) + { + Point point2 = new Point(x2, y2); + if (!Main.SmartInteractTileCoords.Contains(point2)) + { + if (flag3) + Main.SmartInteractTileCoordsSelected.Add(point2); + if (flag3 | smartCursorEnabled) + Main.SmartInteractTileCoords.Add(point2); + } + } + } + } + } + tupleList2.Clear(); + } + if (index4 == -1 & smartCursorEnabled) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(lx1 * 16, ly1 * 16, (hx - lx1) * 16 + 16, (hy - ly1) * 16 + 16); + bool flag4 = false; + for (int index11 = 0; index11 < 200; ++index11) + { + NPC npc = Main.npc[index11]; + if (npc.active && npc.townNPC && npc.Hitbox.Intersects(rectangle)) + { + Main.SmartInteractNPCsNearby.Add(index11); + if (!flag4) + { + float num17 = npc.Hitbox.Distance(point1); + if ((index4 == -1 ? 1 : ((double) Main.npc[index4].Hitbox.Distance(point1) > (double) num17 ? 1 : 0)) != 0) + index4 = index11; + if ((double) num17 == 0.0) + { + flag4 = true; + index4 = index11; + break; + } + } + } + } + if (flag4) + { + x1 = y1 = -1; + Main.SmartInteractTileCoordsSelected.Clear(); + } + } + if (x1 != -1 && y1 != -1 && index4 != -1) + { + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(x1 * 16, y1 * 16, 16, 16); + Microsoft.Xna.Framework.Rectangle hitbox = Main.npc[index4].Hitbox; + Vector2 point3 = point1; + if ((double) r.Distance(point3) < (double) hitbox.Distance(point1)) + { + index4 = -1; + } + else + { + x1 = y1 = -1; + Main.SmartInteractTileCoordsSelected.Clear(); + } + } + if (UILinkPointNavigator.InUse || PlayerInput.UsingGamepad && Main.HoveringOverAnNPC) + Main.SmartInteractTileCoordsSelected.Clear(); + if (PlayerInput.UsingGamepad && !Main.SmartCursorEnabled) + { + if (x1 != -1 && y1 != -1) + { + Main.TileInteractionLX = lx1 - 10; + Main.TileInteractionLY = ly1 - 10; + Main.TileInteractionHX = hx + 10; + Main.TileInteractionHY = hy + 10; + Main.SmartInteractShowingFake = Main.SmartInteractTileCoords.Count > 0; + } + } + else + { + if (x1 != -1 && y1 != -1) + { + Main.SmartInteractX = x1; + Main.SmartInteractY = y1; + Main.SmartInteractShowingGenuine = true; + Main.TileInteractionLX = lx1 - 10; + Main.TileInteractionLY = ly1 - 10; + Main.TileInteractionHX = hx + 10; + Main.TileInteractionHY = hy + 10; + } + if (index4 != -1) + { + Main.SmartInteractNPC = index4; + Main.SmartInteractShowingGenuine = true; + } + } + tupleList1.Clear(); + } + + private static void SmartCursor_Axe( + Item item, + ref Vector2 mouse, + int LX, + int HX, + int LY, + int HY, + ref int fX, + ref int fY) + { + if (item.axe <= 0 || fX != -1 || fY != -1) + return; + float num1 = -1f; + for (int index1 = LX; index1 <= HX; ++index1) + { + for (int index2 = LY; index2 <= HY; ++index2) + { + if (Main.tile[index1, index2].active()) + { + Tile tile = Main.tile[index1, index2]; + if (Main.tileAxe[(int) tile.type]) + { + int x = index1; + int y = index2; + if (tile.type == (ushort) 5) + { + if (Collision.InTileBounds(x + 1, y, LX, LY, HX, HY)) + { + 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, LX, LY, HX, HY)) + { + 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() && Main.tile[x, y].type == (ushort) 5 && Main.tile[x, y + 1].type == (ushort) 5 && Collision.InTileBounds(x, y + 1, LX, LY, HX, HY)) + ++y; + } + if (tile.type == (ushort) 80) + { + if (Collision.InTileBounds(x + 1, y, LX, LY, HX, HY)) + { + 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, LX, LY, HX, HY)) + { + 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, LX, LY, HX, HY)) + ++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, LX, LY, HX, HY)) + ++y; + } + float num2 = Vector2.Distance(new Vector2((float) x, (float) y) * 16f + Vector2.One * 8f, mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + fX = x; + fY = y; + } + } + } + } + } + } + + private static void SmartCursor_Filling( + Item item, + ref Vector2 mouse, + int LX, + int HX, + int LY, + int HY, + ref int fX, + ref int fY, + int tX, + int tY) + { + if (Player.SmartCursorSettings.SmartBlocksEnabled || item.createTile <= -1 || item.type == 213 || !Main.tileSolid[item.createTile] || Main.tileSolidTop[item.createTile] || Main.tileFrameImportant[item.createTile] || fX != -1 || fY != -1) + return; + List> tupleList = new List>(); + bool flag1 = false; + if (Main.tile[tX, tY].active()) + flag1 = true; + if (!Collision.InTileBounds(tX, tY, LX, LY, HX, HY)) + flag1 = true; + if (!flag1) + { + for (int index1 = LX; index1 <= HX; ++index1) + { + for (int index2 = LY; index2 <= HY; ++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) + tupleList.Add(new Tuple(index1, index2)); + } + } + } + } + if (tupleList.Count > 0) + { + float num1 = -1f; + float num2 = float.PositiveInfinity; + Tuple tuple = tupleList[0]; + for (int index = 0; index < tupleList.Count; ++index) + { + if (Collision.EmptyTile(tupleList[index].Item1, tupleList[index].Item2, true)) + { + Vector2 vector2 = new Vector2((float) tupleList[index].Item1, (float) tupleList[index].Item2) * 16f + Vector2.One * 8f - 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; + tuple = tupleList[index]; + } + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, LX, LY, HX, HY) && (double) num1 != -1.0) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + + private static void SmartCursor_Torch( + Item item, + ref Vector2 mouse, + int LX, + int HX, + int LY, + int HY, + ref int fX, + ref int fY, + int tX, + int tY) + { + if (item.createTile != 4 || fX != -1 || fY != -1) + return; + List> tupleList = new List>(); + bool flag1 = item.type != 1333 && item.type != 523; + for (int index1 = LX; index1 <= HX; ++index1) + { + for (int index2 = LY; index2 <= HY; ++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 - 7; index3 <= index1 + 7; ++index3) + { + for (int index4 = index2 - 7; index4 <= index2 + 7; ++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 > (byte) 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] || tile2.type == (ushort) 124 || tile2.type == (ushort) 5 && Main.tile[index1 - 1, index2 - 1].type == (ushort) 5 && Main.tile[index1 - 1, index2 + 1].type == (ushort) 5) || 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] || tile3.type == (ushort) 124 || tile3.type == (ushort) 5 && Main.tile[index1 + 1, index2 - 1].type == (ushort) 5 && Main.tile[index1 + 1, index2 + 1].type == (ushort) 5) || 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) + tupleList.Add(new Tuple(index1, index2)); + } + } + } + if (tupleList.Count > 0) + { + float num1 = -1f; + Tuple tuple = tupleList[0]; + for (int index = 0; index < tupleList.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) tupleList[index].Item1, (float) tupleList[index].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + tuple = tupleList[index]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, LX, LY, HX, HY)) + { + fX = tuple.Item1; + fY = tuple.Item2; + } + } + tupleList.Clear(); + } + + public void SmartSelectLookup() + { + if (this.controlTorch && this.itemAnimation == 0) + { + int num1 = 0; + int index1 = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + int index2 = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) this.gravDir == -1.0) + index2 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + int num2 = -10; + int num3 = -10; + int num4 = -10; + int num5 = -10; + int num6 = -10; + for (int index3 = 0; index3 < 50; ++index3) + { + if (this.inventory[index3].pick > 0 && num2 == -10) + num2 = this.inventory[index3].tileBoost; + if (this.inventory[index3].axe > 0 && num3 == -10) + num3 = this.inventory[index3].tileBoost; + if (this.inventory[index3].hammer > 0 && num4 == -10) + num4 = this.inventory[index3].tileBoost; + if ((this.inventory[index3].type == 929 || this.inventory[index3].type == 1338 || this.inventory[index3].type == 1345) && num5 == -10) + num5 = this.inventory[index3].tileBoost; + if ((this.inventory[index3].type == 424 || this.inventory[index3].type == 1103) && num6 == -10) + num6 = this.inventory[index3].tileBoost; + } + int num7 = 0; + int num8 = 0; + if ((double) this.position.X / 16.0 >= (double) index1) + num7 = (int) ((double) this.position.X / 16.0) - index1; + if (((double) this.position.X + (double) this.width) / 16.0 <= (double) index1) + num7 = index1 - (int) (((double) this.position.X + (double) this.width) / 16.0); + if ((double) this.position.Y / 16.0 >= (double) index2) + num8 = (int) ((double) this.position.Y / 16.0) - index2; + if (((double) this.position.Y + (double) this.height) / 16.0 <= (double) index2) + num8 = index2 - (int) (((double) this.position.Y + (double) this.height) / 16.0); + bool flag1 = false; + bool flag2 = false; + try + { + flag2 = Main.tile[index1, index2].liquid > (byte) 0; + if (Main.tile[index1, index2].active()) + { + int type = (int) Main.tile[index1, index2].type; + if (type == 219 && num7 <= num6 + Player.tileRangeX && num8 <= num6 + Player.tileRangeY) + { + num1 = 7; + flag1 = true; + } + else if (type == 209 && num7 <= num5 + Player.tileRangeX && num8 <= num5 + Player.tileRangeY) + { + num1 = 6; + flag1 = true; + } + else if (Main.tileHammer[type] && num7 <= num4 + Player.tileRangeX && num8 <= num4 + Player.tileRangeY) + { + num1 = 1; + flag1 = true; + } + else if (Main.tileAxe[type] && num7 <= num3 + Player.tileRangeX && num8 <= num3 + Player.tileRangeY) + { + num1 = 2; + flag1 = true; + } + else if (num7 <= num2 + Player.tileRangeX) + { + if (num8 <= num2 + Player.tileRangeY) + { + num1 = 3; + flag1 = true; + } + } + } + else if (flag2) + { + if (this.wet) + { + num1 = 4; + flag1 = true; + } + } + } + catch + { + } + if (!flag1 && this.wet) + num1 = 4; + if (num1 == 0 || num1 == 4) + { + double num9 = (double) Math.Abs((float) ((double) Main.mouseX + (double) Main.screenPosition.X - ((double) this.position.X + (double) (this.width / 2)))); + float num10 = Math.Abs((float) ((double) Main.mouseY + (double) Main.screenPosition.Y - ((double) this.position.Y + (double) (this.height / 2)))) * 1.3f; + if (Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) > 200.0) + num1 = 5; + } + for (int index4 = 0; index4 < 50; ++index4) + { + int type = this.inventory[index4].type; + switch (num1) + { + case 0: + switch (type) + { + case 8: + case 427: + case 428: + case 429: + case 430: + case 431: + case 432: + case 433: + case 523: + case 974: + case 1245: + case 1333: + case 2274: + case 3004: + case 3045: + case 3114: + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + case 282: + case 286: + case 3002: + case 3112: + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + continue; + default: + continue; + } + case 1: + if (this.inventory[index4].hammer > 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + case 2: + if (this.inventory[index4].axe > 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + case 3: + if (this.inventory[index4].pick > 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + case 4: + if (this.inventory[index4].type != 282 && this.inventory[index4].type != 286 && this.inventory[index4].type != 3002 && this.inventory[index4].type != 3112 && this.inventory[index4].type != 930 && (type == 8 || type == 427 || type == 428 || type == 429 || type == 430 || type == 431 || type == 432 || type == 433 || type == 974 || type == 1245 || type == 2274 || type == 3004 || type == 3045 || type == 3114)) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + if (this.inventory[this.selectedItem].createTile != 4) + { + this.selectedItem = index4; + break; + } + break; + } + if (((type == 282 || type == 286 || type == 3002 ? 1 : (type == 3112 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + if (type == 930 & flag2) + { + bool flag3 = false; + for (int index5 = 57; index5 >= 0; --index5) + { + if (this.inventory[index5].ammo == this.inventory[index4].useAmmo) + { + flag3 = true; + break; + } + } + if (flag3) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + } + if (type == 1333 || type == 523) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + case 5: + switch (type) + { + case 8: + case 427: + case 428: + case 429: + case 430: + case 431: + case 432: + case 433: + case 523: + case 974: + case 1245: + case 1333: + case 2274: + case 3004: + case 3045: + case 3114: + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + if (this.inventory[this.selectedItem].createTile != 4) + { + this.selectedItem = index4; + continue; + } + continue; + case 282: + case 286: + case 3002: + case 3112: + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + case 930: + bool flag4 = false; + for (int index6 = 57; index6 >= 0; --index6) + { + if (this.inventory[index6].ammo == this.inventory[index4].useAmmo) + { + flag4 = true; + break; + } + } + if (flag4) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + continue; + default: + continue; + } + case 6: + int num11 = 929; + if (Main.tile[index1, index2].frameX >= (short) 144) + num11 = 1345; + else if (Main.tile[index1, index2].frameX >= (short) 72) + num11 = 1338; + if (type == num11) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + case 7: + if (ItemID.Sets.ExtractinatorMode[type] >= 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = index4; + return; + } + break; + } + } + } + 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; + } + 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; + } + else + { + if (this.nonTorch <= -1 || this.itemAnimation != 0) + return; + this.selectedItem = this.nonTorch; + this.nonTorch = -1; + } + } + + public void ResetEffects() + { + this.extraAccessorySlots = !this.extraAccessory || !Main.expertMode && !Main.gameMenu ? 0 : 1; + 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.lifeRegen = 0; + this.manaCost = 1f; + this.meleeSpeed = 1f; + this.meleeDamage = 1f; + this.rangedDamage = 1f; + this.thrownDamage = 1f; + this.magicDamage = 1f; + this.minionDamage = 1f; + this.meleeCrit = 4; + this.rangedCrit = 4; + this.magicCrit = 4; + this.thrownCrit = 4; + this.thrownVelocity = 1f; + 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.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.thorns = 0.0f; + this.aggro = 0; + this.waterWalk = false; + this.waterWalk2 = false; + this.detectCreature = false; + this.gravControl = false; + this.bee = false; + this.gravControl2 = false; + this.statLifeMax2 = this.statLifeMax; + this.statManaMax2 = this.statManaMax; + this.ammoCost80 = false; + this.ammoCost75 = false; + this.thrownCost50 = false; + this.thrownCost33 = false; + this.manaRegenBuff = false; + this.arrowDamage = 1f; + this.bulletDamage = 1f; + this.rocketDamage = 1f; + this.yoraiz0rEye = 0; + this.yoraiz0rDarkness = 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.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.maxMinions = 1; + this.maxTurrets = 1; + this.ammoBox = false; + this.ammoPotion = false; + this.penguin = false; + this.sporeSac = false; + this.shinyStone = 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.lifeForce = false; + this.dangerSense = false; + 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.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.petFlagDD2Gato = false; + this.petFlagDD2Dragon = false; + this.petFlagDD2Ghost = false; + this.companionCube = 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.sailDash = false; + this.cordage = false; + this.magicQuiver = 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.stardustGuardian = false; + this.stardustDragon = false; + this.UFOMinion = false; + this.DeadlySphereMinion = false; + this.chilled = 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.dash = 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.burned = false; + this.suffocating = false; + this.onFire2 = false; + this.onFrostBurn = false; + this.frostBurn = false; + this.noItems = false; + this.blockRange = 0; + this.pickSpeed = 1f; + this.wereWolf = false; + this.rulerGrid = false; + this.rulerLine = false; + 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.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.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.doubleJumpSail = false; + this.doubleJumpSandstorm = false; + this.doubleJumpBlizzard = false; + this.doubleJumpFart = false; + this.doubleJumpUnicorn = false; + this.defendedByPaladin = false; + this.hasPaladinShield = false; + this.autoJump = false; + this.justJumped = false; + this.jumpSpeedBoost = 0.0f; + this.extraFall = 0; + if (this.phantasmTime > 0) + --this.phantasmTime; + 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; + for (int index = 0; index < this.ownedProjectileCounts.Length; ++index) + this.ownedProjectileCounts[index] = 0; + if (this.whoAmI == Main.myPlayer) + { + Player.tileRangeX = 5; + Player.tileRangeY = 4; + } + this.mount.CheckMountBuff(this); + } + + 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 -= 12; + } + 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 -= 12; + } + 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.campfire) + ++this.lifeRegen; + if (this.whoAmI == Main.myPlayer && Main.heartLantern) + 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; + } + 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.campfire) + 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) + { + Main.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.wereWolf) + { + Player.jumpHeight += 2; + Player.jumpSpeed += 0.2f; + } + 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.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 (this.windPushed && ((!this.mount.Active ? 0 : ((double) this.velocity.Y == 0.0 ? 1 : 0)) & (flag2 ? 1 : 0)) == 0) + { + num2 = (float) Math.Sign(Main.windSpeed) * 0.07f; + if ((double) Math.Abs(Main.windSpeed) > 0.5) + num2 *= 1.37f; + if ((double) this.velocity.Y != 0.0) + num2 *= 1.5f; + if (flag2) + num2 *= 0.8f; + 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) + { + Main.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.MinecartDust, this.position + this.velocity * 0.66f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.MinecartDust, this.position + this.velocity * 0.33f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.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.MinecartDust, this.position + this.velocity * 0.5f, this.width, this.height, 1); + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.MinecartDust, this.position, this.width, this.height, 1); + } + else + Minecart.WheelSparks(this.mount.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) + { + Main.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.MinecartDust, this.position + this.velocity * 0.66f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.MinecartDust, this.position + this.velocity * 0.33f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.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.MinecartDust, this.position + this.velocity * 0.5f, this.width, this.height, 1); + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.MinecartDust, this.position, this.width, this.height, 1); + } + else + Minecart.WheelSparks(this.mount.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) + { + int num3 = 0; + if ((double) this.gravDir == -1.0) + num3 -= this.height; + if (this.runSoundDelay == 0 && (double) this.velocity.Y == 0.0) + { + Main.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) num3), 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) num3), 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.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 + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num3), 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); + } + } + } + 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) + { + int num4 = 0; + if ((double) this.gravDir == -1.0) + num4 -= this.height; + if (this.runSoundDelay == 0 && (double) this.velocity.Y == 0.0) + { + Main.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 index7 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num4), this.width + 8, 4, 186, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.5f); + Main.dust[index7].velocity *= 0.025f; + Main.dust[index7].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + int index8 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num4), this.width + 8, 4, 186, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.5f); + Main.dust[index8].velocity *= 0.2f; + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + else if (this.sailDash) + { + for (int index9 = 0; index9 < 4; ++index9) + { + int index10 = 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[index10].noGravity = true; + Main.dust[index10].velocity.X *= 0.2f; + Main.dust[index10].velocity.Y *= 0.2f; + Main.dust[index10].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + Main.dust[index10].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.coldDash) + { + for (int index11 = 0; index11 < 2; ++index11) + { + int index12 = index11 != 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[index12].scale *= (float) (1.0 + (double) Main.rand.Next(20, 40) * 0.00999999977648258); + Main.dust[index12].noGravity = true; + Main.dust[index12].noLight = true; + Main.dust[index12].velocity *= 1f / 1000f; + Main.dust[index12].velocity.Y -= 3f / 1000f; + Main.dust[index12].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) num4), 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); + } + } + } + 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; + } + } + if (this.mount.Active && this.mount.Type == 10 && (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); + float Damage = 80f * 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 != 14 || (double) Math.Abs(this.velocity.X) <= (double) this.mount.RunSpeed / 2.0) + return; + Microsoft.Xna.Framework.Rectangle rect1 = this.getRect(); + if (this.direction == 1) + rect1.Offset(this.width - 1, 0); + rect1.Width = 2; + rect1.Inflate(6, 12); + float Damage1 = 90f * this.minionDamage; + float Knockback1 = 10f; + int NPCImmuneTime1 = 30; + int PlayerImmuneTime1 = 6; + this.CollideWithNPCs(rect1, Damage1, Knockback1, NPCImmuneTime1, PlayerImmuneTime1); + } + + 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) + { + 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.immune = true; + this.immuneNoBlink = true; + this.immuneTime = PlayerImmuneTime; + ++num; + break; + } + } + } + return num; + } + + public void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit) + { + npc.StrikeNPC(damage, knockback, direction, crit); + if (Main.netMode != 0) + NetMessage.SendData(28, number: npc.whoAmI, number2: ((float) damage), number3: knockback, number4: ((float) direction), number5: crit.ToInt()); + int num = Item.NPCtoBanner(npc.BannerID()); + if (num < 0) + return; + this.lastCreatureHit = num; + } + + public bool SlimeDontHyperJump => this.mount.Active && this.mount.Type == 3 && this.wetSlime > (byte) 0 && !this.controlJump; + + public void JumpMovement() + { + if (this.mount.Active && this.mount.Type == 3 && 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) + { + 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.immune = true; + this.immuneNoBlink = true; + this.immuneTime = 6; + break; + } + } + } + } + if (this.controlJump) + { + bool flag1 = false; + if (this.mount.Active && this.mount.Type == 3 && this.wetSlime > (byte) 0) + flag1 = 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.jumpAgainCloud || this.jumpAgainSandstorm || this.jumpAgainBlizzard || this.jumpAgainFart || this.jumpAgainSail || this.jumpAgainUnicorn || this.wet && this.accFlipper && (!this.mount.Active || !this.mount.Cart)) && (this.releaseJump || this.autoJump && ((double) this.velocity.Y == 0.0 || this.sliding))) + { + if (this.sliding || (double) this.velocity.Y == 0.0) + this.justJumped = true; + bool flag2 = false; + if (this.wet && this.accFlipper) + { + if (this.swimTime == 0) + this.swimTime = 30; + flag2 = true; + } + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + if (!flag1) + { + if (this.jumpAgainUnicorn) + { + flag7 = true; + this.jumpAgainUnicorn = false; + } + else if (this.jumpAgainSandstorm) + { + flag3 = true; + this.jumpAgainSandstorm = false; + } + else if (this.jumpAgainBlizzard) + { + flag4 = true; + this.jumpAgainBlizzard = false; + } + else if (this.jumpAgainFart) + { + this.jumpAgainFart = false; + flag5 = true; + } + else if (this.jumpAgainSail) + { + this.jumpAgainSail = false; + flag6 = true; + } + else + this.jumpAgainCloud = false; + } + this.canRocket = false; + this.rocketRelease = false; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpCloud) + this.jumpAgainCloud = true; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpSandstorm) + this.jumpAgainSandstorm = true; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpBlizzard) + this.jumpAgainBlizzard = true; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpFart) + this.jumpAgainFart = true; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpSail) + this.jumpAgainSail = true; + if (((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) && this.doubleJumpUnicorn) + this.jumpAgainUnicorn = true; + if ((((double) this.velocity.Y == 0.0 | flag2 ? 1 : (this.sliding ? 1 : 0)) | (flag1 ? 1 : 0)) != 0) + { + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight; + if (this.sliding) + this.velocity.X = (float) (3 * -this.slideDir); + } + else if (flag3) + { + this.dJumpEffectSandstorm = true; + int height = this.height; + double gravDir = (double) this.gravDir; + Main.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 3; + } + else if (flag4) + { + this.dJumpEffectBlizzard = true; + int height = this.height; + double gravDir = (double) this.gravDir; + Main.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 (flag6) + { + this.dJumpEffectSail = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + Main.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 (flag5) + { + this.dJumpEffectFart = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + Main.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 (flag7) + { + this.dJumpEffectUnicorn = true; + int height = this.height; + double gravDir = (double) this.gravDir; + Main.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 + { + this.dJumpEffectCloud = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + Main.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 index8 = 0; index8 < 10; ++index8) + { + int index9 = 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[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); + } + int index10 = 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[index10].velocity.X = (float) ((double) Main.gore[index10].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index10].velocity.Y = (float) ((double) Main.gore[index10].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index11 = 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[index11].velocity.X = (float) ((double) Main.gore[index11].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index11].velocity.Y = (float) ((double) Main.gore[index11].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index12 = 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[index12].velocity.X = (float) ((double) Main.gore[index12].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index12].velocity.Y = (float) ((double) Main.gore[index12].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.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) + { + if (Main.npc[index].active && !Main.npc[index].dontTakeDamage && !Main.npc[index].friendly) + { + NPC npc = Main.npc[index]; + 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.immune = true; + this.immuneNoBlink = true; + this.immuneTime = 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) + { + if (Main.npc[index1].active && !Main.npc[index1].dontTakeDamage && !Main.npc[index1].friendly && Main.npc[index1].immune[this.whoAmI] <= 0) + { + NPC npc = Main.npc[index1]; + 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.immune = true; + this.immuneNoBlink = true; + this.immuneTime = 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) + { + 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); + Main.dust[index4].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + } + 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); + Main.dust[index6].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + 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].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + 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.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); + Main.dust[index12].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + 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); + Main.dust[index16].shader = GameShaders.Armor.GetSecondaryShader(this.cShield, this); + } + } + 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.controlUp ? 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.jumpAgainCloud && !this.jumpAgainSandstorm && !this.jumpAgainBlizzard && !this.jumpAgainFart && !this.jumpAgainSail && !this.jumpAgainUnicorn && 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.dJumpEffectCloud && this.doubleJumpCloud && !this.jumpAgainCloud && (this.jumpAgainSandstorm || !this.doubleJumpSandstorm) && ((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.dJumpEffectSandstorm && this.doubleJumpSandstorm && !this.jumpAgainSandstorm && ((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.dJumpEffectFart && this.doubleJumpFart && !this.jumpAgainFart && ((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.dJumpEffectUnicorn && this.doubleJumpUnicorn && !this.jumpAgainUnicorn && ((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.dJumpEffectSail && this.doubleJumpSail && !this.jumpAgainSail && ((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.dJumpEffectBlizzard || !this.doubleJumpBlizzard || this.jumpAgainBlizzard || ((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.controlUp) + { + 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 == 37) + { + num2 = 0.75f; + num5 = 0.15f; + num4 = 1f; + num3 = 2.5f; + num1 = 0.125f; + } + 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 = 2f; + 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.controlDown && !this.controlLeft && !this.controlRight) + this.wingTime -= 0.5f; + else + --this.wingTime; + } + } + + 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.wof < 0 || !Main.npc[Main.wof].active) + return; + float num1 = Main.npc[Main.wof].position.X + 40f; + if (Main.npc[Main.wof].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; + this.Hurt(PlayerDeathReason.LegacyDefault(), 50, Main.npc[Main.wof].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); + Main.PlaySound(4, (int) Main.npc[Main.wof].position.X, (int) Main.npc[Main.wof].position.Y, 10); + } + if (this.gross) + { + if ((double) this.position.Y < (double) ((Main.maxTilesY - 200) * 16)) + this.AddBuff(38, 10); + if (Main.npc[Main.wof].direction < 0) + { + if ((double) this.position.X + (double) (this.width / 2) > (double) Main.npc[Main.wof].position.X + (double) (Main.npc[Main.wof].width / 2) + 40.0) + this.AddBuff(38, 10); + } + else if ((double) this.position.X + (double) (this.width / 2) < (double) Main.npc[Main.wof].position.X + (double) (Main.npc[Main.wof].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.wof].position.X + (double) (Main.npc[Main.wof].width / 2) - (double) center.X; + float num3 = Main.npc[Main.wof].position.Y + (float) (Main.npc[Main.wof].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.wof].position.X >= 608.0 && (double) Main.npc[Main.wof].position.X <= (double) ((Main.maxTilesX - 38) * 16)) + return; + this.KillMe(PlayerDeathReason.ByOther(12), 1000.0, 0); + } + } + + public void StatusPlayer(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, 481)); + if (npc.type == 159 || npc.type == 158) + this.AddBuff(30, Main.rand.Next(300, 600)); + if (npc.type == 525) + this.AddBuff(39, 420); + 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) && 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) && 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) && 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, 480); + if ((npc.type == 79 || npc.type == 103) && 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; + 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.wingTime = (float) this.wingTimeMax; + this.rocketTime = this.rocketTimeMax; + this.rocketDelay = 0; + this.rocketFrame = false; + this.canRocket = false; + this.rocketRelease = false; + this.fallStart = (int) ((double) this.position.Y / 16.0); + int index1 = -1; + float num1 = 0.0f; + float num2 = 0.0f; + for (int index2 = 0; index2 < this.grapCount; ++index2) + { + Projectile projectile = Main.projectile[this.grappling[index2]]; + num1 += projectile.position.X + (float) (projectile.width / 2); + num2 += projectile.position.Y + (float) (projectile.height / 2); + if (projectile.type == 403) + index1 = index2; + else if (projectile.type == 446) + { + Vector2 vector2_1 = new Vector2((float) (this.controlRight.ToInt() - this.controlLeft.ToInt()), (float) (this.controlDown.ToInt() - this.controlUp.ToInt()) * this.gravDir); + if (vector2_1 != Vector2.Zero) + vector2_1.Normalize(); + vector2_1 *= 100f; + Vector2 vector2_2 = Vector2.Normalize(this.Center - projectile.Center + vector2_1); + if (float.IsNaN(vector2_2.X) || float.IsNaN(vector2_2.Y)) + vector2_2 = -Vector2.UnitY; + float num3 = 200f; + num1 += vector2_2.X * num3; + num2 += vector2_2.Y * num3; + } + else if (projectile.type == 652) + { + Vector2 vector2_3 = new Vector2((float) (this.controlRight.ToInt() - this.controlLeft.ToInt()), (float) (this.controlDown.ToInt() - this.controlUp.ToInt()) * this.gravDir); + if (vector2_3 != Vector2.Zero) + vector2_3.Normalize(); + Vector2 vector2_4 = projectile.Center - this.Center; + Vector2 vector2_5 = vector2_4; + if (vector2_5 != Vector2.Zero) + vector2_5.Normalize(); + Vector2 vector2_6 = Vector2.Zero; + if (vector2_3 != Vector2.Zero) + vector2_6 = vector2_5 * Vector2.Dot(vector2_5, vector2_3); + float num4 = 6f; + if ((double) Vector2.Dot(vector2_6, vector2_4) < 0.0 && (double) vector2_4.Length() >= 600.0) + num4 = 0.0f; + num1 += (float) (-(double) vector2_4.X + (double) vector2_6.X * (double) num4); + num2 += (float) (-(double) vector2_4.Y + (double) vector2_6.Y * (double) num4); + } + } + float num5 = num1 / (float) this.grapCount; + float num6 = num2 / (float) this.grapCount; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num7 = num5 - vector2.X; + float num8 = num6 - vector2.Y; + float num9 = (float) Math.Sqrt((double) num7 * (double) num7 + (double) num8 * (double) num8); + float num10 = 11f; + if (Main.projectile[this.grappling[0]].type == 315) + num10 = 16f; + if (Main.projectile[this.grappling[0]].type >= 646 && Main.projectile[this.grappling[0]].type <= 649) + num10 = 13f; + float num11 = (double) num9 <= (double) num10 ? 1f : num10 / num9; + float num12 = num7 * num11; + float num13 = num8 * num11; + if ((double) num13 > 0.0) + this.GoingDownWithGrapple = true; + this.velocity.X = num12; + this.velocity.Y = num13; + 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.grappling[0] = -1; + this.grapCount = 0; + for (int index3 = 0; index3 < 1000; ++index3) + { + if (Main.projectile[index3].active && Main.projectile[index3].owner == this.whoAmI && Main.projectile[index3].aiStyle == 7) + Main.projectile[index3].Kill(); + } + int num14 = 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)) + num14 = this.miscEquips[2].mountType; + int Height = this.height + Mount.GetHeightBoost(num14); + 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(num14, this, this.minecartLeft); + Minecart.WheelSparks(this.mount.MinecartDust, this.position, this.width, this.height, 25); + } + } + } + } + if (this.itemAnimation == 0) + { + 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; + } + if (this.doubleJumpCloud) + this.jumpAgainCloud = true; + if (this.doubleJumpSandstorm) + this.jumpAgainSandstorm = true; + if (this.doubleJumpBlizzard) + this.jumpAgainBlizzard = true; + if (this.doubleJumpFart) + this.jumpAgainFart = true; + if (this.doubleJumpSail) + this.jumpAgainSail = true; + if (this.doubleJumpUnicorn) + this.jumpAgainUnicorn = true; + this.grappling[0] = 0; + this.grapCount = 0; + for (int index4 = 0; index4 < 1000; ++index4) + { + if (Main.projectile[index4].active && Main.projectile[index4].owner == this.whoAmI && Main.projectile[index4].aiStyle == 7) + Main.projectile[index4].Kill(); + } + } + else + this.releaseJump = true; + } + + public void StickyMovement() + { + bool flag = false; + if (this.mount.Type == 6 && (double) Math.Abs(this.velocity.X) > 5.0) + flag = true; + if (this.mount.Type == 13 && (double) Math.Abs(this.velocity.X) > 5.0) + flag = true; + if (this.mount.Type == 11 && (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.Y > 1.0) + this.velocity.Y = 1f; + if ((double) this.velocity.Y < -5.0) + this.velocity.Y = -5f; + 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.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 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 void QuickStackAllChests() + { + if (this.IsStackingItems()) + return; + 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].type < 71 || this.inventory[number].type > 74)) + { + 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) + { + 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; + Main.PlaySound(7); + } + } + + public void CheckDrowning() + { + bool flag = Collision.DrownCollision(this.position, this.width, this.height, this.gravDir); + if (this.armor[0].type == 250) + flag = true; + if (this.inventory[this.selectedItem].type == 186) + { + 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].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_13; + } + flag = false; + } + } + catch + { + } + } +label_13: + if (this.gills) + flag = false; + if (Main.myPlayer == this.whoAmI) + { + if (this.merman) + flag = false; + if (flag) + { + ++this.breathCD; + int num = 7; + if (this.inventory[this.selectedItem].type == 186) + num *= 2; + if (this.accDivingHelm) + num *= 4; + if (this.breathCD >= num) + { + this.breathCD = 0; + --this.breath; + if (this.breath == 0) + Main.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 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; ++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; + } + + 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; + 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); + 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) + { + if (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 index1 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int index2 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + if ((double) this.gravDir == -1.0) + index2 = (int) ((double) this.position.Y - 0.100000001490116) / 16; + int type = -1; + if (Main.tile[index1 - 1, index2] == null) + Main.tile[index1 - 1, index2] = new Tile(); + if (Main.tile[index1 + 1, index2] == null) + Main.tile[index1 + 1, index2] = new Tile(); + 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]) + type = (int) Main.tile[index1, index2].type; + else if (Main.tile[index1 - 1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1 - 1, index2].type]) + type = (int) Main.tile[index1 - 1, index2].type; + else if (Main.tile[index1 + 1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1 + 1, index2].type]) + type = (int) Main.tile[index1 + 1, index2].type; + if (type <= -1) + { + this.slippy = false; + this.slippy2 = false; + this.sticky = false; + this.powerrun = false; + } + 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; + if (Main.tile[index1 - 1, index2].slope() != (byte) 0 || Main.tile[index1, index2].slope() != (byte) 0 || Main.tile[index1 + 1, index2].slope() != (byte) 0) + type = -1; + if ((this.wet ? 0 : (!this.mount.Cart ? 1 : 0)) == 0) + return; + this.MakeFloorDust(Falling, type); + } + } + + 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) + 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 == 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) + { + 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) + { + 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 && NPC.TypeToHeadIndex(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 Update(int i) + { + // ISSUE: unable to decompile the method. + } + + private 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; + } + 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); + } + + private void Update_NPCCollision() + { + 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; + } + if ((specialHitSetter != -1 || !this.immune) && (this.dash != 2 || index != this.eocHit || this.eocDash <= 0) && !this.npcTypeNoAggro[Main.npc[index].type]) + { + float damageMultiplier = 1f; + 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) && !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 = 1f; + 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); + int banner = Item.NPCtoBanner(Main.npc[index].BannerID()); + if (banner > 0 && this.NPCBannerBuff[banner]) + Damage = !Main.expertMode ? (int) ((double) Damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].NormalDamageReceived) : (int) ((double) Damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].ExpertDamageReceived); + if (this.whoAmI == Main.myPlayer && (double) num2 > 0.0 && !this.immune && !Main.npc[index].dontTakeDamage) + { + int damage = (int) ((double) Damage * (double) num2); + 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.StatusPlayer(Main.npc[index]); + if (flag1) + this.Hurt(PlayerDeathReason.ByNPC(index), Damage, hitDirection, cooldownCounter: specialHitSetter); + if (num1 != 0) + { + this.immune = true; + this.immuneNoBlink = true; + this.immuneTime = 30; + if (this.longInvince) + this.immuneTime = 60; + this.AddBuff(198, 300, false); + } + } + } + } + } + } + + 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 == -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; + if (theGeneralCheck && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3384) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (theGeneralCheck && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3858) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (theGeneralCheck && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3852 && this.itemAnimation == 0 && this.CheckMana(20, true)) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (theGeneralCheck && this.altFunctionUse == 0 && this.inventory[this.selectedItem].shoot > 0 && ProjectileID.Sets.TurretFeature[this.inventory[this.selectedItem].shoot]) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (theGeneralCheck && 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 flag = false; + if (theGeneralCheck && this.inventory[this.selectedItem].type == 3823 && this.hasRaisableShield && !this.mount.Active && (this.itemAnimation == 0 || PlayerInput.Triggers.JustPressed.MouseRight)) + flag = true; + if (this.shield_parry_cooldown > 0) + { + --this.shield_parry_cooldown; + if (this.shield_parry_cooldown == 0) + { + Main.PlaySound(25); + 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; + if (flag != this.shieldRaised) + { + this.shieldRaised = flag; + 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) + this.attackCD = 20; + } + } + int num = this.shieldRaised ? 1 : 0; + } + + 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) + { + LockOnHelper.SetUP(); + int stack = this.inventory[this.selectedItem].stack; + if (Main.ignoreErrors) + { + try + { + this.ItemCheck(i); + } + catch + { + } + } + else + this.ItemCheck(i); + if (stack != this.inventory[this.selectedItem].stack) + Recipe.FindRecipes(); + LockOnHelper.SetDOWN(); + } + + public void ScrollHotbar(int Offset) + { + while (Offset > 9) + Offset -= 10; + while (Offset < 0) + Offset += 10; + this.selectedItem += Offset; + if (Offset != 0) + { + Main.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) + Main.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 void OldInput() + { + bool flag1 = false; + bool flag2 = false; + Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + for (int index = 0; index < pressedKeys.Length; ++index) + { + if (pressedKeys[index] == Keys.LeftShift || pressedKeys[index] == Keys.RightShift) + flag1 = true; + else if (pressedKeys[index] == Keys.LeftAlt || pressedKeys[index] == Keys.RightAlt) + flag2 = true; + } + string blockKey = Main.blockKey; + Keys keys = Keys.None; + string str1 = keys.ToString(); + if (blockKey != str1) + { + bool flag3 = false; + for (int index = 0; index < pressedKeys.Length; ++index) + { + if (pressedKeys[index].ToString() == Main.blockKey) + { + pressedKeys[index] = Keys.None; + flag3 = true; + } + } + if (!flag3) + { + keys = Keys.None; + Main.blockKey = keys.ToString(); + } + } + for (int index = 0; index < pressedKeys.Length; ++index) + { + string str2 = string.Concat((object) pressedKeys[index]); + if (pressedKeys[index] != Keys.Tab || ((!flag1 ? 0 : (SocialAPI.Mode == SocialMode.Steam ? 1 : 0)) | (flag2 ? 1 : 0)) == 0) + { + if (str2 == Main.cUp) + this.controlUp = true; + if (str2 == Main.cLeft) + this.controlLeft = true; + if (str2 == Main.cDown) + this.controlDown = true; + if (str2 == Main.cRight) + this.controlRight = true; + if (str2 == Main.cJump) + this.controlJump = true; + if (str2 == Main.cThrowItem) + this.controlThrow = true; + if (str2 == Main.cInv) + this.controlInv = true; + if (str2 == Main.cBuff) + this.QuickBuff(); + if (str2 == Main.cHeal) + this.controlQuickHeal = true; + if (str2 == Main.cMana) + this.controlQuickMana = true; + if (str2 == Main.cHook) + this.controlHook = true; + if (str2 == Main.cTorch) + this.controlTorch = true; + if (str2 == Main.cSmart) + this.controlSmart = true; + if (str2 == Main.cMount) + this.controlMount = true; + if (Main.mapEnabled) + { + if (str2 == Main.cMapZoomIn) + this.mapZoomIn = true; + if (str2 == Main.cMapZoomOut) + this.mapZoomOut = true; + if (str2 == Main.cMapAlphaUp) + this.mapAlphaUp = true; + if (str2 == Main.cMapAlphaDown) + this.mapAlphaDown = true; + if (str2 == Main.cMapFull) + this.mapFullScreen = true; + if (str2 == Main.cMapStyle) + this.mapStyle = true; + } + } + } + if (Main.gamePad) + { + GamePadState state = GamePad.GetState(PlayerIndex.One); + GamePadDPad dpad = state.DPad; + if (dpad.Up == ButtonState.Pressed) + this.controlUp = true; + dpad = state.DPad; + if (dpad.Down == ButtonState.Pressed) + this.controlDown = true; + dpad = state.DPad; + if (dpad.Left == ButtonState.Pressed) + this.controlLeft = true; + dpad = state.DPad; + if (dpad.Right == ButtonState.Pressed) + this.controlRight = true; + GamePadTriggers triggers = state.Triggers; + if ((double) triggers.Left > 0.0) + this.controlJump = true; + triggers = state.Triggers; + if ((double) triggers.Right > 0.0) + this.controlUseItem = true; + Main.mouseX = (int) ((double) (Main.screenWidth / 2) + (double) state.ThumbSticks.Right.X * (double) Player.tileRangeX * 16.0); + Main.mouseY = (int) ((double) (Main.screenHeight / 2) - (double) state.ThumbSticks.Right.Y * (double) Player.tileRangeX * 16.0); + if ((double) state.ThumbSticks.Right.X == 0.0) + Main.mouseX = Main.screenWidth / 2 + this.direction * 2; + } + if (Main.mouseLeft) + { + if (!Main.blockMouse && !this.mouseInterface) + this.controlUseItem = true; + } + else + Main.blockMouse = false; + if (!Main.mouseRight || this.mouseInterface || Main.blockMouse) + return; + this.controlUseTile = true; + } + + private void LookForTileInteractions() + { + if (Main.mapFullscreen) + return; + int myX = Player.tileTargetX; + int myY = Player.tileTargetY; + if (Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == -1) + { + myX = Main.SmartInteractX; + myY = Main.SmartInteractY; + } + bool flag = this.controlUseTile; + if (PlayerInput.UsingGamepad && Main.HoveringOverAnNPC) + flag = false; + if (this.releaseUseTile) + this.tileInteractionHappened = false; + this.tileInteractAttempted = flag; + if ((double) this.position.X / 16.0 - (double) Player.tileRangeX <= (double) myX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX - 1.0 >= (double) myX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY <= (double) myY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY - 2.0 >= (double) myY) + { + this.TileInteractionsCheckLongDistance(Player.tileTargetX, Player.tileTargetY); + this.TileInteractionsCheck(myX, myY); + } + else + this.TileInteractionsCheckLongDistance(myX, myY); + } + + 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 (Main.tile[myX, myY] == null) + Main.tile[myX, myY] = new Tile(); + if (Main.tile[myX, myY].type == (ushort) 21) + { + this.TileInteractionsMouseOver_Containers(myX, myY); + if (this.showItemIconText == "") + { + this.showItemIcon = false; + this.showItemIcon2 = 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.showItemIcon2 = -1; + if (chest < 0) + { + this.showItemIconText = Lang.dresserType[0].Value; + } + else + { + this.showItemIconText = !(Main.chest[chest].name != "") ? Lang.dresserType[(int) tile.frameX / 54].Value : Main.chest[chest].name; + if (this.showItemIconText == Lang.dresserType[(int) tile.frameX / 54].Value) + { + this.showItemIcon2 = Chest.dresserTypeToIcon[(int) tile.frameX / 54]; + this.showItemIconText = ""; + } + } + this.noThrow = 2; + this.showItemIcon = true; + if (this.showItemIconText == "") + { + this.showItemIcon = false; + this.showItemIcon2 = 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); + if (num7 == -1) + return; + Main.signHover = num7; + this.showItemIcon = false; + this.showItemIcon2 = -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; + Main.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; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, KnockBack, Main.myPlayer); + } + } + 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) 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; + Main.PlaySound(28, myX * 16, myY * 16, 0); + WorldGen.SwitchMB(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 215) + { + flag1 = true; + Main.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 index4 = myX - num16; + int index5 = myY - num17; + int num18 = 36; + if (Main.tile[index4, index5].frameY >= (short) 36) + num18 = -36; + for (int index6 = index4; index6 < index4 + 3; ++index6) + { + for (int index7 = index5; index7 < index5 + 2; ++index7) + Main.tile[index6, index7].frameY += (short) num18; + } + NetMessage.SendTileSquare(-1, index4 + 1, index5 + 1, 3); + } + else if (Main.tile[myX, myY].type == (ushort) 207) + { + flag1 = true; + Main.PlaySound(28, myX * 16, myY * 16, 0); + WorldGen.SwitchFountain(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 410) + { + flag1 = true; + Main.PlaySound(28, myX * 16, myY * 16, 0); + this.GamepadEnableGrappleCooldown(); + WorldGen.SwitchMonolith(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 455) + { + flag1 = true; + Main.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; + 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) 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) 338) + { + flag1 = true; + int index8 = myX; + int index9 = myY; + if (Main.tile[index8, index9].frameY == (short) 18) + --index9; + bool flag4 = false; + for (int index10 = 0; index10 < 1000; ++index10) + { + if (Main.projectile[index10].active && Main.projectile[index10].aiStyle == 73 && (double) Main.projectile[index10].ai[0] == (double) index8 && (double) Main.projectile[index10].ai[1] == (double) index9) + { + flag4 = true; + break; + } + } + if (!flag4) + Projectile.NewProjectile((float) (index8 * 16 + 8), (float) (index9 * 16 + 2), 0.0f, 0.0f, 419 + Main.rand.Next(4), 0, 0.0f, this.whoAmI, (float) index8, (float) index9); + } + else if (Main.tile[myX, myY].type == (ushort) 4 || Main.tile[myX, myY].type == (ushort) 13 || Main.tile[myX, myY].type == (ushort) 33 || Main.tile[myX, myY].type == (ushort) 49 || Main.tile[myX, myY].type == (ushort) 50 && Main.tile[myX, myY].frameX == (short) 90 || Main.tile[myX, myY].type == (ushort) 174) + { + flag1 = true; + WorldGen.KillTile(myX, myY); + this.GamepadEnableGrappleCooldown(); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) myX), number3: ((float) myY)); + } + 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; + if (this.ItemFitsItemFrame(this.inventory[this.selectedItem]) && !this.inventory[this.selectedItem].favorited) + { + this.GamepadEnableGrappleCooldown(); + this.PlaceItemInFrame(myX, myY); + } + else + { + int x = myX; + int index = myY; + if ((int) Main.tile[x, index].frameX % 36 != 0) + --x; + if ((int) Main.tile[x, index].frameY % 36 != 0) + --index; + int key = TEItemFrame.Find(x, index); + if (key != -1 && ((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + this.GamepadEnableGrappleCooldown(); + WorldGen.KillTile(myX, index, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) myX), number3: ((float) index), number4: 1f); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 125) + { + flag1 = true; + this.AddBuff(29, 36000); + Main.PlaySound(SoundID.Item4, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 377) + { + flag1 = true; + this.AddBuff(159, 36000); + Main.PlaySound(SoundID.Item37, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 354) + { + flag1 = true; + this.AddBuff(150, 36000); + Main.PlaySound(SoundID.Item4, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 287) + { + flag1 = true; + this.AddBuff(93, 36000); + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + } + else if (Main.tile[myX, myY].type == (ushort) 356) + { + flag1 = true; + if (!Main.fastForwardTime && (Main.netMode == 1 || Main.sundialCooldown == 0)) + { + Main.Sundialing(); + Main.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; + 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) == this.sign) + { + this.sign = -1; + Main.npcChatText = ""; + Main.editSign = false; + Main.PlaySound(11); + flag6 = false; + } + if (flag6) + { + if (Main.netMode == 0) + { + this.talkNPC = -1; + Main.npcChatCornerItem = 0; + Main.playerInventory = false; + Main.editSign = false; + Main.PlaySound(10); + int index = Sign.ReadSign(myX, myY); + 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 str1 = "AM"; + 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) + str1 = "PM"; + int num36 = (int) num35; + double num37 = (double) (int) ((num35 - (double) num36) * 60.0); + string str2 = string.Concat((object) num37); + if (num37 < 10.0) + str2 = "0" + str2; + if (num36 > 12) + num36 -= 12; + if (num36 == 0) + num36 = 12; + Main.NewText(Language.GetTextValue("Game.Time", (object) (num36.ToString() + ":" + str2 + " " + str1)), 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) + { + Main.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); + 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; + if (Main.tile[myX, myY].frameY == (short) 0) + { + Main.CancelClothesWindow(true); + Main.mouseRightRelease = false; + int num41 = (int) Main.tile[myX, myY].frameX / 18 % 3; + int num42 = myX - num41; + int Y = myY - (int) Main.tile[myX, myY].frameY / 18; + if (this.sign > -1) + { + Main.PlaySound(11); + this.sign = -1; + Main.editSign = false; + Main.npcChatText = string.Empty; + } + if (Main.editChest) + { + Main.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 && Y == this.chestY && this.chest != -1) + { + this.chest = -1; + Recipe.FindRecipes(); + Main.PlaySound(11); + } + else + { + NetMessage.SendData(31, number: num42, number2: ((float) Y)); + Main.stackSplit = 600; + } + } + else + { + this.flyingPigChest = -1; + int chest = Chest.FindChest(num42, Y); + if (chest != -1) + { + Main.stackSplit = 600; + if (chest == this.chest) + { + this.chest = -1; + Recipe.FindRecipes(); + Main.PlaySound(11); + } + else if (chest != this.chest && this.chest == -1) + { + this.chest = chest; + Main.playerInventory = true; + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + Main.recBigList = false; + Main.PlaySound(10); + this.chestX = num42; + this.chestY = Y; + } + else + { + this.chest = chest; + Main.playerInventory = true; + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + Main.recBigList = false; + Main.PlaySound(12); + this.chestX = num42; + this.chestY = Y; + } + Recipe.FindRecipes(); + } + } + } + else + { + Main.playerInventory = false; + this.chest = -1; + Recipe.FindRecipes(); + Main.dresserX = myX; + Main.dresserY = myY; + Main.OpenClothesWindow(); + } + } + else if (Main.tile[myX, myY].type == (ushort) 209) + { + flag1 = true; + Tile tile = Main.tile[myX, myY]; + int num43 = (int) tile.frameX % 72 / 18; + int num44 = (int) tile.frameY % 54 / 18; + int x = myX - num43; + int y = myY - num44; + int angle = (int) tile.frameY / 54; + int num45 = (int) tile.frameX / 72; + int num46 = -1; + if (num43 == 1 || num43 == 2) + num46 = num44; + int num47 = 0; + if (num43 == 3 || num43 == 2 && num45 != 3 && num45 != 4) + num47 = -54; + if (num43 == 0 || num43 == 1 && num45 != 3 && num45 != 4) + num47 = 54; + if (angle >= 8 && num47 > 0) + num47 = 0; + if (angle == 0 && num47 < 0) + num47 = 0; + bool flag8 = false; + if (num47 != 0) + { + for (int index11 = x; index11 < x + 4; ++index11) + { + for (int index12 = y; index12 < y + 3; ++index12) + Main.tile[index11, index12].frameY += (short) num47; + } + flag8 = true; + } + if ((num45 == 3 || num45 == 4) && (num46 == 1 || num46 == 0)) + { + int num48 = num45 == 3 ? 72 : -72; + for (int index13 = x; index13 < x + 4; ++index13) + { + for (int index14 = y; index14 < y + 3; ++index14) + Main.tile[index13, index14].frameX += (short) num48; + } + flag8 = true; + } + if (flag8) + NetMessage.SendTileSquare(-1, x + 1, y + 1, 4); + if (num46 != -1) + { + bool flag9 = false; + if ((num45 == 3 || num45 == 4) && num46 == 2) + flag9 = true; + if (flag9) + WorldGen.ShootFromCannon(x, y, angle, num45 + 1, 0, 0.0f, this.whoAmI); + } + } + 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) && this.talkNPC == -1) + { + flag1 = true; + Main.mouseRightRelease = false; + int num49 = 0; + int num50 = (int) Main.tile[myX, myY].frameX / 18; + while (num50 > 1) + num50 -= 2; + int index15 = myX - num50; + int index16 = myY - (int) Main.tile[myX, myY].frameY / 18; + if (Main.tile[myX, myY].type == (ushort) 29) + num49 = 1; + else if (Main.tile[myX, myY].type == (ushort) 97) + num49 = 2; + else if (Main.tile[myX, myY].type == (ushort) 463) + { + num49 = 3; + if (Main.tile[myX, myY].frameX == (short) 36) + --index15; + else + ++index15; + index16 += 2; + } + if (this.sign > -1) + { + Main.PlaySound(11); + this.sign = -1; + Main.editSign = false; + Main.npcChatText = string.Empty; + } + if (Main.editChest) + { + Main.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 && num49 == 0 && (Main.tile[index15, index16].frameX < (short) 72 || Main.tile[index15, index16].frameX > (short) 106) && (Main.tile[index15, index16].frameX < (short) 144 || Main.tile[index15, index16].frameX > (short) 178) && (Main.tile[index15, index16].frameX < (short) 828 || Main.tile[index15, index16].frameX > (short) 1006) && (Main.tile[index15, index16].frameX < (short) 1296 || Main.tile[index15, index16].frameX > (short) 1330) && (Main.tile[index15, index16].frameX < (short) 1368 || Main.tile[index15, index16].frameX > (short) 1402) && (Main.tile[index15, index16].frameX < (short) 1440 || Main.tile[index15, index16].frameX > (short) 1474)) + { + if (index15 == this.chestX && index16 == this.chestY && this.chest != -1) + { + this.chest = -1; + Recipe.FindRecipes(); + Main.PlaySound(11); + } + else + { + NetMessage.SendData(31, number: index15, number2: ((float) index16)); + Main.stackSplit = 600; + } + } + else + { + int num51 = -1; + switch (num49) + { + case 1: + num51 = -2; + break; + case 2: + num51 = -3; + break; + case 3: + num51 = -4; + break; + default: + bool flag10 = false; + if (Chest.isLocked(index15, index16)) + { + int num52 = 327; + if (Main.tile[index15, index16].frameX >= (short) 144 && Main.tile[index15, index16].frameX <= (short) 178) + num52 = 329; + if (Main.tile[index15, index16].frameX >= (short) 828 && Main.tile[index15, index16].frameX <= (short) 1006) + { + int num53 = (int) Main.tile[index15, index16].frameX / 18; + int num54 = 0; + while (num53 >= 2) + { + num53 -= 2; + ++num54; + } + num52 = 1533 + (num54 - 23); + } + flag10 = true; + for (int index17 = 0; index17 < 58; ++index17) + { + if (this.inventory[index17].type == num52 && this.inventory[index17].stack > 0 && Chest.Unlock(index15, index16)) + { + if (num52 != 329) + { + --this.inventory[index17].stack; + if (this.inventory[index17].stack <= 0) + this.inventory[index17] = new Item(); + } + if (Main.netMode == 1) + NetMessage.SendData(52, number: this.whoAmI, number2: 1f, number3: ((float) index15), number4: ((float) index16)); + } + } + } + if (!flag10) + { + num51 = Chest.FindChest(index15, index16); + break; + } + break; + } + if (num51 != -1) + { + Main.stackSplit = 600; + if (num51 == this.chest) + { + this.chest = -1; + Main.PlaySound(11); + } + else if (num51 != this.chest && this.chest == -1) + { + this.chest = num51; + Main.playerInventory = true; + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + Main.recBigList = false; + Main.PlaySound(10); + this.chestX = index15; + this.chestY = index16; + if (Main.tile[index15, index16].frameX >= (short) 36 && Main.tile[index15, index16].frameX < (short) 72) + AchievementsHelper.HandleSpecialEvent(this, 16); + } + else + { + this.chest = num51; + Main.playerInventory = true; + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + Main.recBigList = false; + Main.PlaySound(12); + this.chestX = index15; + this.chestY = index16; + } + Recipe.FindRecipes(); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 314 && (double) this.gravDir == 1.0) + { + flag1 = true; + bool flag11 = true; + if (this.mount.Active) + { + if (this.mount.Cart) + flag11 = false; + else + this.mount.Dismount(this); + } + if (flag11) + this.LaunchMinecartHook(myX, myY); + } + } + if (!flag1) + return; + this.tileInteractionHappened = true; + } + + 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.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(); + } + Projectile.NewProjectile(vector2.X, vector2.Y, 0.0f, 0.0f, 403, 0, 0.0f, this.whoAmI); + } + + 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) + { + this.noThrow = 2; + this.showItemIcon = true; + int num = (int) Main.tile[myX, myY].frameY / 36; + this.showItemIcon2 = 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 ? 646 : 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) 33) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 105; + int num = (int) Main.tile[myX, myY].frameY / 22; + if (num == 1) + this.showItemIcon2 = 1405; + if (num == 2) + this.showItemIcon2 = 1406; + if (num == 3) + this.showItemIcon2 = 1407; + if (num >= 4 && num <= 13) + this.showItemIcon2 = 2045 + num - 4; + if (num >= 14 && num <= 16) + this.showItemIcon2 = 2153 + num - 14; + if (num == 17) + this.showItemIcon2 = 2236; + if (num == 18) + this.showItemIcon2 = 2523; + if (num == 19) + this.showItemIcon2 = 2542; + if (num == 20) + this.showItemIcon2 = 2556; + if (num == 21) + this.showItemIcon2 = 2571; + if (num == 22) + this.showItemIcon2 = 2648; + if (num == 23) + this.showItemIcon2 = 2649; + if (num == 24) + this.showItemIcon2 = 2650; + if (num == 25) + this.showItemIcon2 = 2651; + else if (num == 26) + this.showItemIcon2 = 2818; + else if (num == 27) + this.showItemIcon2 = 3171; + else if (num == 28) + this.showItemIcon2 = 3173; + else if (num == 29) + this.showItemIcon2 = 3172; + else if (num == 30) + this.showItemIcon2 = 3890; + } + 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.showItemIcon2 = -1; + this.showItemIcon2 = Chest.chestTypeToIcon[(int) tile.frameX / 36]; + this.noThrow = 2; + this.showItemIcon = 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.showItemIcon2 = -1; + this.showItemIcon2 = Chest.chestTypeToIcon2[(int) tile.frameX / 36]; + this.noThrow = 2; + this.showItemIcon = 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.showItemIcon2 = -1; + if (chest < 0) + { + this.showItemIconText = Lang.dresserType[0].Value; + } + else + { + this.showItemIconText = !(Main.chest[chest].name != "") ? Lang.dresserType[(int) tile.frameX / 54].Value : Main.chest[chest].name; + if (this.showItemIconText == Lang.dresserType[(int) tile.frameX / 54].Value) + { + this.showItemIcon2 = Chest.dresserTypeToIcon[(int) tile.frameX / 54]; + this.showItemIconText = ""; + } + } + this.noThrow = 2; + this.showItemIcon = true; + if (Main.tile[myX, myY].frameY > (short) 0) + this.showItemIcon2 = 269; + } + 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.showItemIcon = 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.showItemIcon2 = 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 < 4 || num > 8 ? 649 + num : 812 + num) : 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.showItemIcon = true; + switch ((int) Main.tile[myX, myY].frameX / 36) + { + case 0: + this.showItemIcon2 = 359; + break; + case 1: + this.showItemIcon2 = 2237; + break; + case 2: + this.showItemIcon2 = 2238; + break; + case 3: + this.showItemIcon2 = 2239; + break; + case 4: + this.showItemIcon2 = 2240; + break; + case 5: + this.showItemIcon2 = 2241; + break; + case 6: + this.showItemIcon2 = 2560; + break; + case 7: + this.showItemIcon2 = 2575; + break; + case 8: + this.showItemIcon2 = 2591; + break; + case 9: + this.showItemIcon2 = 2592; + break; + case 10: + this.showItemIcon2 = 2593; + break; + case 11: + this.showItemIcon2 = 2594; + break; + case 12: + this.showItemIcon2 = 2595; + break; + case 13: + this.showItemIcon2 = 2596; + break; + case 14: + this.showItemIcon2 = 2597; + break; + case 15: + this.showItemIcon2 = 2598; + break; + case 16: + this.showItemIcon2 = 2599; + break; + case 17: + this.showItemIcon2 = 2600; + break; + case 18: + this.showItemIcon2 = 2601; + break; + case 19: + this.showItemIcon2 = 2602; + break; + case 20: + this.showItemIcon2 = 2603; + break; + case 21: + this.showItemIcon2 = 2604; + break; + case 22: + this.showItemIcon2 = 2605; + break; + case 23: + this.showItemIcon2 = 2606; + break; + case 24: + this.showItemIcon2 = 2809; + break; + case 25: + this.showItemIcon2 = 3126; + break; + case 26: + this.showItemIcon2 = 3128; + break; + case 27: + this.showItemIcon2 = 3127; + break; + case 28: + this.showItemIcon2 = 3898; + break; + case 29: + this.showItemIcon2 = 3899; + break; + case 30: + this.showItemIcon2 = 3900; + break; + case 31: + this.showItemIcon2 = 3901; + break; + case 32: + this.showItemIcon2 = 3902; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 356) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3064; + } + if (Main.tile[myX, myY].type == (ushort) 377) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3198; + } + if (Main.tile[myX, myY].type == (ushort) 209) + { + this.noThrow = 2; + this.showItemIcon = true; + if (Main.tile[myX, myY].frameX < (short) 72) + this.showItemIcon2 = 928; + else if (Main.tile[myX, myY].frameX < (short) 144) + this.showItemIcon2 = 1337; + else if (Main.tile[myX, myY].frameX < (short) 216) + this.showItemIcon2 = 3369; + else if (Main.tile[myX, myY].frameX < (short) 360) + this.showItemIcon2 = 3664; + int num = (int) Main.tile[myX, myY].frameX / 18; + while (num >= 4) + num -= 4; + this.showItemIconR = num < 2; + } + if (Main.tile[myX, myY].type == (ushort) 216) + { + this.noThrow = 2; + this.showItemIcon = true; + int frameY = (int) Main.tile[myX, myY].frameY; + int num = 0; + while (frameY >= 40) + { + frameY -= 40; + ++num; + } + this.showItemIcon2 = 970 + num; + } + if (Main.tile[myX, myY].type == (ushort) 387 || Main.tile[myX, myY].type == (ushort) 386) + { + this.noThrow = 2; + this.showItemIcon = 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.showItemIcon2 = 3239; + } + if (Main.tile[myX, myY].type == (ushort) 389 || Main.tile[myX, myY].type == (ushort) 388) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3240; + } + if (Main.tile[myX, myY].type == (ushort) 335) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 2700; + } + if (Main.tile[myX, myY].type == (ushort) 410) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3536 + Math.Min((int) Main.tile[myX, myY].frameX / 36, 3); + } + if (Main.tile[myX, myY].type == (ushort) 463) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3813; + } + if (Main.tile[myX, myY].type == (ushort) 411 && Main.tile[myX, myY].frameX < (short) 36) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3545; + } + if (Main.tile[myX, myY].type == (ushort) 338) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 2738; + } + if (Main.tile[myX, myY].type == (ushort) 455) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 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.showItemIcon = true; + this.showItemIcon2 = this.inventory[this.selectedItem].type; + } + if (Main.tile[myX, myY].type == (ushort) 212) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 949; + } + if (Main.tile[myX, myY].type == (ushort) 314 && (double) this.gravDir == 1.0) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 2343; + } + if (Main.tile[myX, myY].type == (ushort) 215) + { + this.noThrow = 2; + this.showItemIcon = true; + int num = (int) Main.tile[myX, myY].frameX / 54; + switch (num) + { + case 0: + this.showItemIcon2 = 966; + break; + case 5: + this.showItemIcon2 = 3050; + break; + case 6: + this.showItemIcon2 = 3723; + break; + case 7: + this.showItemIcon2 = 3724; + break; + default: + this.showItemIcon2 = 3046 + num - 1; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 4) + { + this.noThrow = 2; + this.showItemIcon = true; + int num = (int) Main.tile[myX, myY].frameY / 22; + switch (num) + { + case 0: + this.showItemIcon2 = 8; + break; + case 8: + this.showItemIcon2 = 523; + break; + case 9: + this.showItemIcon2 = 974; + break; + case 10: + this.showItemIcon2 = 1245; + break; + case 11: + this.showItemIcon2 = 1333; + break; + case 12: + this.showItemIcon2 = 2274; + break; + case 13: + this.showItemIcon2 = 3004; + break; + case 14: + this.showItemIcon2 = 3045; + break; + case 15: + this.showItemIcon2 = 3114; + break; + default: + this.showItemIcon2 = 426 + num; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 13) + { + this.noThrow = 2; + this.showItemIcon = true; + switch ((int) Main.tile[myX, myY].frameX / 18) + { + case 1: + this.showItemIcon2 = 28; + break; + case 2: + this.showItemIcon2 = 110; + break; + case 3: + this.showItemIcon2 = 350; + break; + case 4: + this.showItemIcon2 = 351; + break; + case 5: + this.showItemIcon2 = 2234; + break; + case 6: + this.showItemIcon2 = 2244; + break; + case 7: + this.showItemIcon2 = 2257; + break; + case 8: + this.showItemIcon2 = 2258; + break; + default: + this.showItemIcon2 = 31; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 29) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 87; + } + if (Main.tile[myX, myY].type == (ushort) 97) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 346; + } + if (Main.tile[myX, myY].type == (ushort) 49) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 148; + } + if (Main.tile[myX, myY].type == (ushort) 174) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 713; + } + if (Main.tile[myX, myY].type == (ushort) 50) + { + this.noThrow = 2; + if (Main.tile[myX, myY].frameX == (short) 90) + { + this.showItemIcon = true; + this.showItemIcon2 = 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.showItemIcon = true; + this.showItemIcon2 = 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 < 13 ? 562 + num : 1596 + num - 13) : 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.showItemIcon = true; + switch (num) + { + case 0: + this.showItemIcon2 = 909; + break; + case 1: + this.showItemIcon2 = 910; + break; + case 2: + this.showItemIcon2 = 940; + break; + case 3: + this.showItemIcon2 = 941; + break; + case 4: + this.showItemIcon2 = 942; + break; + case 5: + this.showItemIcon2 = 943; + break; + case 6: + this.showItemIcon2 = 944; + break; + case 7: + this.showItemIcon2 = 945; + 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.showItemIcon = false; + this.showItemIcon2 = -1; + } + } + if (Main.tile[myX, myY].type == (ushort) 237) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 1293; + } + if (Main.tile[myX, myY].type == (ushort) 466) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 3828; + } + if (Main.tile[myX, myY].type == (ushort) 125) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 487; + } + if (Main.tile[myX, myY].type == (ushort) 354) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 2999; + } + if (Main.tile[myX, myY].type == (ushort) 287) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 2177; + } + if (Main.tile[myX, myY].type == (ushort) 132) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 513; + } + if (Main.tile[myX, myY].type == (ushort) 136) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 538; + } + if (Main.tile[myX, myY].type == (ushort) 144) + { + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = 583 + (int) Main.tile[myX, myY].frameX / 18; + } + if (Main.tile[myX, myY].type != (ushort) 440) + return; + 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)) + return; + this.noThrow = 2; + this.showItemIcon = true; + this.showItemIcon2 = type; + } + + 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.showItemIcon2 = -1; + if (chest < 0) + { + this.showItemIconText = localizedTextArray[0].Value; + } + else + { + this.showItemIconText = !(Main.chest[chest].name != "") ? localizedTextArray[(int) tile.frameX / 36].Value : Main.chest[chest].name; + if (this.showItemIconText == localizedTextArray[(int) tile.frameX / 36].Value) + { + this.showItemIcon2 = numArray[(int) tile.frameX / 36]; + this.showItemIconText = ""; + } + } + this.noThrow = 2; + this.showItemIcon = 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) + { + if ((double) this.velocity.Y < 5.0 && (double) this.velocity.Y > -5.0 || this.wet) + return; + int num = 0; + bool flag = false; + foreach (Point touchedTile in this.TouchedTiles) + { + Tile tile = Main.tile[touchedTile.X, touchedTile.Y]; + if (tile != null && tile.active() && tile.nactive() && Main.tileBouncy[(int) tile.type]) + { + flag = true; + num = touchedTile.Y; + break; + } + } + if (!flag) + return; + this.velocity.Y *= -0.8f; + if (this.controlJump) + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -13f, 13f); + this.position.Y = (float) (num * 16 - ((double) this.velocity.Y < 0.0 ? this.height : -16)); + this.FloorVisuals(Falling); + 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 void GrabItems(int i) + { + for (int number = 0; number < 400; ++number) + { + if (Main.item[number].active && Main.item[number].noGrabDelay == 0 && Main.item[number].owner == i) + { + int defaultItemGrabRange = Player.defaultItemGrabRange; + if (this.goldRing && Main.item[number].type >= 71 && Main.item[number].type <= 74) + defaultItemGrabRange += Item.coinGrabRange; + if (this.manaMagnet && (Main.item[number].type == 184 || Main.item[number].type == 1735 || Main.item[number].type == 1868)) + defaultItemGrabRange += Item.manaGrabRange; + if (this.lifeMagnet && (Main.item[number].type == 58 || Main.item[number].type == 1734 || Main.item[number].type == 1867)) + defaultItemGrabRange += Item.lifeGrabRange; + if (Main.item[number].type == 3822) + defaultItemGrabRange += 50; + if (ItemID.Sets.NebulaPickup[Main.item[number].type]) + defaultItemGrabRange += 100; + 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) Main.item[number].position.X, (int) Main.item[number].position.Y, Main.item[number].width, Main.item[number].height))) + { + if (i == Main.myPlayer && (this.inventory[this.selectedItem].type != 0 || this.itemAnimation <= 0)) + { + if (ItemID.Sets.NebulaPickup[Main.item[number].type]) + { + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + int buffType = Main.item[number].buffType; + Main.item[number] = new Item(); + if (Main.netMode == 1) + { + NetMessage.SendData(102, number: i, number2: ((float) buffType), number3: this.Center.X, number4: this.Center.Y); + NetMessage.SendData(21, number: number); + } + else + this.NebulaLevelup(buffType); + } + if (Main.item[number].type == 58 || Main.item[number].type == 1734 || Main.item[number].type == 1867) + { + Main.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; + Main.item[number] = new Item(); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + else if (Main.item[number].type == 184 || Main.item[number].type == 1735 || Main.item[number].type == 1868) + { + Main.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; + Main.item[number] = new Item(); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + else + { + Main.item[number] = this.GetItem(i, Main.item[number]); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + } + } + else if (new Microsoft.Xna.Framework.Rectangle((int) this.position.X - defaultItemGrabRange, (int) this.position.Y - defaultItemGrabRange, this.width + defaultItemGrabRange * 2, this.height + defaultItemGrabRange * 2).Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.item[number].position.X, (int) Main.item[number].position.Y, Main.item[number].width, Main.item[number].height)) && this.ItemSpace(Main.item[number])) + { + Main.item[number].beingGrabbed = true; + if (this.manaMagnet && (Main.item[number].type == 184 || Main.item[number].type == 1735 || Main.item[number].type == 1868)) + { + Vector2 vector2 = new Vector2(Main.item[number].position.X + (float) (Main.item[number].width / 2), Main.item[number].position.Y + (float) (Main.item[number].height / 2)); + float num1 = this.Center.X - vector2.X; + float num2 = this.Center.Y - vector2.Y; + float num3 = (float) (12.0 / Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2)); + float num4 = num1 * num3; + float num5 = num2 * num3; + int num6 = 5; + Main.item[number].velocity.X = (Main.item[number].velocity.X * (float) (num6 - 1) + num4) / (float) num6; + Main.item[number].velocity.Y = (Main.item[number].velocity.Y * (float) (num6 - 1) + num5) / (float) num6; + } + else if (this.lifeMagnet && (Main.item[number].type == 58 || Main.item[number].type == 1734 || Main.item[number].type == 1867)) + { + Vector2 vector2 = new Vector2(Main.item[number].position.X + (float) (Main.item[number].width / 2), Main.item[number].position.Y + (float) (Main.item[number].height / 2)); + float num7 = this.Center.X - vector2.X; + float num8 = this.Center.Y - vector2.Y; + float num9 = (float) (15.0 / Math.Sqrt((double) num7 * (double) num7 + (double) num8 * (double) num8)); + float num10 = num7 * num9; + float num11 = num8 * num9; + int num12 = 5; + Main.item[number].velocity.X = (Main.item[number].velocity.X * (float) (num12 - 1) + num10) / (float) num12; + Main.item[number].velocity.Y = (Main.item[number].velocity.Y * (float) (num12 - 1) + num11) / (float) num12; + } + else if (this.goldRing && Main.item[number].type >= 71 && Main.item[number].type <= 74) + { + Vector2 vector2 = new Vector2(Main.item[number].position.X + (float) (Main.item[number].width / 2), Main.item[number].position.Y + (float) (Main.item[number].height / 2)); + float num13 = this.Center.X - vector2.X; + float num14 = this.Center.Y - vector2.Y; + float num15 = (float) (12.0 / Math.Sqrt((double) num13 * (double) num13 + (double) num14 * (double) num14)); + float num16 = num13 * num15; + float num17 = num14 * num15; + int num18 = 5; + Main.item[number].velocity.X = (Main.item[number].velocity.X * (float) (num18 - 1) + num16) / (float) num18; + Main.item[number].velocity.Y = (Main.item[number].velocity.Y * (float) (num18 - 1) + num17) / (float) num18; + } + else if (ItemID.Sets.NebulaPickup[Main.item[number].type]) + { + Vector2 vector2 = new Vector2(Main.item[number].position.X + (float) (Main.item[number].width / 2), Main.item[number].position.Y + (float) (Main.item[number].height / 2)); + float num19 = this.Center.X - vector2.X; + float num20 = this.Center.Y - vector2.Y; + float num21 = (float) (12.0 / Math.Sqrt((double) num19 * (double) num19 + (double) num20 * (double) num20)); + float num22 = num19 * num21; + float num23 = num20 * num21; + int num24 = 5; + Main.item[number].velocity.X = (Main.item[number].velocity.X * (float) (num24 - 1) + num22) / (float) num24; + Main.item[number].velocity.Y = (Main.item[number].velocity.Y * (float) (num24 - 1) + num23) / (float) num24; + } + else + { + if ((double) this.position.X + (double) this.width * 0.5 > (double) Main.item[number].position.X + (double) Main.item[number].width * 0.5) + { + if ((double) Main.item[number].velocity.X < (double) Player.itemGrabSpeedMax + (double) this.velocity.X) + Main.item[number].velocity.X += Player.itemGrabSpeed; + if ((double) Main.item[number].velocity.X < 0.0) + Main.item[number].velocity.X += Player.itemGrabSpeed * 0.75f; + } + else + { + if ((double) Main.item[number].velocity.X > -(double) Player.itemGrabSpeedMax + (double) this.velocity.X) + Main.item[number].velocity.X -= Player.itemGrabSpeed; + if ((double) Main.item[number].velocity.X > 0.0) + Main.item[number].velocity.X -= Player.itemGrabSpeed * 0.75f; + } + if ((double) this.position.Y + (double) this.height * 0.5 > (double) Main.item[number].position.Y + (double) Main.item[number].height * 0.5) + { + if ((double) Main.item[number].velocity.Y < (double) Player.itemGrabSpeedMax) + Main.item[number].velocity.Y += Player.itemGrabSpeed; + if ((double) Main.item[number].velocity.Y < 0.0) + Main.item[number].velocity.Y += Player.itemGrabSpeed * 0.75f; + } + else + { + if ((double) Main.item[number].velocity.Y > -(double) Player.itemGrabSpeedMax) + Main.item[number].velocity.Y -= Player.itemGrabSpeed; + if ((double) Main.item[number].velocity.Y > 0.0) + Main.item[number].velocity.Y -= Player.itemGrabSpeed * 0.75f; + } + } + } + } + } + } + + public bool SellItem(int price, int stack) + { + if (price <= 0) + return false; + Item[] objArray = new Item[58]; + for (int index = 0; index < 58; ++index) + { + objArray[index] = new Item(); + objArray[index] = this.inventory[index].Clone(); + } + int num1 = price / 5; + if (num1 < 1) + num1 = 1; + int num2 = num1 * stack; + bool flag = false; + while (num2 >= 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 && num2 >= 1000000) + { + ++this.inventory[i].stack; + num2 -= 1000000; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num2 >= 1000000) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(74); + num2 -= 1000000; + } + } + } + while (num2 >= 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 && num2 >= 10000) + { + ++this.inventory[i].stack; + num2 -= 10000; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num2 >= 10000) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(73); + num2 -= 10000; + } + } + } + while (num2 >= 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 && num2 >= 100) + { + ++this.inventory[i].stack; + num2 -= 100; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num2 >= 100) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(72); + num2 -= 100; + } + } + } + while (num2 >= 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 && num2 >= 1) + { + ++this.inventory[i].stack; + --num2; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num2 >= 1) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(71); + --num2; + } + } + } + if (!flag) + return true; + for (int index = 0; index < 58; ++index) + this.inventory[index] = objArray[index].Clone(); + return false; + } + + 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); + if (Utils.CoinsCombineStacks(out overFlowing, num1, num2, num3, num4) < (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(); + inv.Add(this.inventory); + inv.Add(this.bank.item); + inv.Add(this.bank2.item); + inv.Add(this.bank3.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].type >= 71 && inv[index][y].type <= 74) + slotCoins.Add(new Point(index, y)); + } + } + int num5 = 0; + for (int y = inv[num5].Length - 1; y >= 0; --y) + { + if (!dictionary[num5].Contains(y) && (inv[num5][y].type == 0 || inv[num5][y].stack == 0)) + slotsEmpty.Add(new Point(num5, y)); + } + int num6 = 1; + 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)) + slotEmptyBank.Add(new Point(num6, y)); + } + int num7 = 2; + 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)) + slotEmptyBank2.Add(new Point(num7, y)); + } + int num8 = 3; + 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)) + slotEmptyBank3.Add(new Point(num8, y)); + } + return !Player.TryPurchasing(price, inv, slotCoins, slotsEmpty, slotEmptyBank, slotEmptyBank2, slotEmptyBank3); + } + + private static bool TryPurchasing( + int price, + List inv, + List slotCoins, + List slotsEmpty, + List slotEmptyBank, + List slotEmptyBank2, + List slotEmptyBank3) + { + 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 (--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 (--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)); + } + else + { + foreach (KeyValuePair keyValuePair in dictionary) + inv[keyValuePair.Key.X][keyValuePair.Key.Y] = keyValuePair.Value.Clone(); + flag = true; + break; + } + } + } + return flag; + } + + public bool BuyItemOld(int price) + { + if (price == 0) + return true; + long num1 = 0; + Item[] objArray = new Item[54]; + for (int index = 0; index < 54; ++index) + { + objArray[index] = new Item(); + objArray[index] = this.inventory[index].Clone(); + if (this.inventory[index].type == 71) + num1 += (long) this.inventory[index].stack; + if (this.inventory[index].type == 72) + num1 += (long) (this.inventory[index].stack * 100); + if (this.inventory[index].type == 73) + num1 += (long) (this.inventory[index].stack * 10000); + if (this.inventory[index].type == 74) + num1 += (long) (this.inventory[index].stack * 1000000); + } + if (num1 < (long) price) + return false; + int num2 = price; + while (num2 > 0) + { + if (num2 >= 1000000) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].type == 74) + { + while (this.inventory[index].stack > 0 && num2 >= 1000000) + { + num2 -= 1000000; + --this.inventory[index].stack; + if (this.inventory[index].stack == 0) + this.inventory[index].type = 0; + } + } + } + } + if (num2 >= 10000) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].type == 73) + { + while (this.inventory[index].stack > 0 && num2 >= 10000) + { + num2 -= 10000; + --this.inventory[index].stack; + if (this.inventory[index].stack == 0) + this.inventory[index].type = 0; + } + } + } + } + if (num2 >= 100) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].type == 72) + { + while (this.inventory[index].stack > 0 && num2 >= 100) + { + num2 -= 100; + --this.inventory[index].stack; + if (this.inventory[index].stack == 0) + this.inventory[index].type = 0; + } + } + } + } + if (num2 >= 1) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].type == 71) + { + while (this.inventory[index].stack > 0 && num2 >= 1) + { + --num2; + --this.inventory[index].stack; + if (this.inventory[index].stack == 0) + this.inventory[index].type = 0; + } + } + } + } + if (num2 > 0) + { + int index1 = -1; + for (int index2 = 53; index2 >= 0; --index2) + { + if (this.inventory[index2].type == 0 || this.inventory[index2].stack == 0) + { + index1 = index2; + break; + } + } + if (index1 >= 0) + { + bool flag = true; + if (num2 >= 10000) + { + for (int index3 = 0; index3 < 58; ++index3) + { + if (this.inventory[index3].type == 74 && this.inventory[index3].stack >= 1) + { + --this.inventory[index3].stack; + if (this.inventory[index3].stack == 0) + this.inventory[index3].type = 0; + this.inventory[index1].SetDefaults(73); + this.inventory[index1].stack = 100; + flag = false; + break; + } + } + } + else if (num2 >= 100) + { + for (int index4 = 0; index4 < 54; ++index4) + { + if (this.inventory[index4].type == 73 && this.inventory[index4].stack >= 1) + { + --this.inventory[index4].stack; + if (this.inventory[index4].stack == 0) + this.inventory[index4].type = 0; + this.inventory[index1].SetDefaults(72); + this.inventory[index1].stack = 100; + flag = false; + break; + } + } + } + else if (num2 >= 1) + { + for (int index5 = 0; index5 < 54; ++index5) + { + if (this.inventory[index5].type == 72 && this.inventory[index5].stack >= 1) + { + --this.inventory[index5].stack; + if (this.inventory[index5].stack == 0) + this.inventory[index5].type = 0; + this.inventory[index1].SetDefaults(71); + this.inventory[index1].stack = 100; + flag = false; + break; + } + } + } + if (flag) + { + if (num2 < 10000) + { + for (int index6 = 0; index6 < 54; ++index6) + { + if (this.inventory[index6].type == 73 && this.inventory[index6].stack >= 1) + { + --this.inventory[index6].stack; + if (this.inventory[index6].stack == 0) + this.inventory[index6].type = 0; + this.inventory[index1].SetDefaults(72); + this.inventory[index1].stack = 100; + flag = false; + break; + } + } + } + if (flag && num2 < 1000000) + { + for (int index7 = 0; index7 < 54; ++index7) + { + if (this.inventory[index7].type == 74 && this.inventory[index7].stack >= 1) + { + --this.inventory[index7].stack; + if (this.inventory[index7].stack == 0) + this.inventory[index7].type = 0; + this.inventory[index1].SetDefaults(73); + this.inventory[index1].stack = 100; + break; + } + } + } + } + } + else + { + for (int index8 = 0; index8 < 54; ++index8) + this.inventory[index8] = objArray[index8].Clone(); + return false; + } + } + } + return true; + } + + public void AdjTiles() + { + int num1 = 4; + int num2 = 3; + for (int index = 0; index < 470; ++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; + if (Main.tile[index1, index2].type == (ushort) 302) + this.adjTile[17] = true; + if (Main.tile[index1, index2].type == (ushort) 77) + this.adjTile[17] = true; + if (Main.tile[index1, index2].type == (ushort) 133) + { + this.adjTile[17] = true; + this.adjTile[77] = true; + } + if (Main.tile[index1, index2].type == (ushort) 134) + this.adjTile[16] = true; + if (Main.tile[index1, index2].type == (ushort) 354 || Main.tile[index1, index2].type == (ushort) 469) + this.adjTile[14] = true; + if (Main.tile[index1, index2].type == (ushort) 355) + { + this.adjTile[13] = true; + this.adjTile[14] = true; + this.alchemyTable = true; + } + } + 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 < 470; ++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 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; + for (int index = 3; index < 8 + this.extraAccessorySlots; ++index) + { + if (this.armor[index].shieldSlot == (sbyte) 5 && this.eocDash > 0 && this.shield == (sbyte) -1) + this.shield = this.armor[index].shieldSlot; + if (this.shieldRaised && this.shield == (sbyte) -1 && this.armor[index].shieldSlot != (sbyte) -1) + this.shield = this.armor[index].shieldSlot; + if ((this.shield <= (sbyte) 0 || this.armor[index].frontSlot < (sbyte) 1 || this.armor[index].frontSlot > (sbyte) 4) && (this.front < (sbyte) 1 || this.front > (sbyte) 4 || this.armor[index].shieldSlot <= (sbyte) 0)) + { + if (this.armor[index].wingSlot > (sbyte) 0) + { + if (!this.hideVisual[index] || (double) this.velocity.Y != 0.0 && !this.mount.Active) + this.wings = (int) this.armor[index].wingSlot; + else + continue; + } + if (!this.hideVisual[index]) + { + if (this.armor[index].stringColor > 0) + this.stringColor = this.armor[index].stringColor; + if (this.armor[index].handOnSlot > (sbyte) 0) + this.handon = this.armor[index].handOnSlot; + if (this.armor[index].handOffSlot > (sbyte) 0) + this.handoff = this.armor[index].handOffSlot; + if (this.armor[index].backSlot > (sbyte) 0) + { + this.back = this.armor[index].backSlot; + this.front = (sbyte) -1; + } + if (this.armor[index].frontSlot > (sbyte) 0) + this.front = this.armor[index].frontSlot; + if (this.armor[index].shoeSlot > (sbyte) 0) + this.shoe = this.armor[index].shoeSlot; + if (this.armor[index].waistSlot > (sbyte) 0) + this.waist = this.armor[index].waistSlot; + if (this.armor[index].shieldSlot > (sbyte) 0) + this.shield = this.armor[index].shieldSlot; + if (this.armor[index].neckSlot > (sbyte) 0) + this.neck = this.armor[index].neckSlot; + if (this.armor[index].faceSlot > (sbyte) 0) + this.face = this.armor[index].faceSlot; + if (this.armor[index].balloonSlot > (sbyte) 0) + this.balloon = this.armor[index].balloonSlot; + if (this.armor[index].type == 3580) + this.yoraiz0rEye = index - 2; + if (this.armor[index].type == 3581) + this.yoraiz0rDarkness = true; + if (this.armor[index].type == 3929) + this.leinforsHair = true; + } + } + } + for (int index = 13; index < 18 + this.extraAccessorySlots; ++index) + { + if (this.armor[index].stringColor > 0) + this.stringColor = this.armor[index].stringColor; + if (this.armor[index].handOnSlot > (sbyte) 0) + this.handon = this.armor[index].handOnSlot; + if (this.armor[index].handOffSlot > (sbyte) 0) + this.handoff = this.armor[index].handOffSlot; + if (this.armor[index].backSlot > (sbyte) 0) + { + this.back = this.armor[index].backSlot; + this.front = (sbyte) -1; + } + if (this.armor[index].frontSlot > (sbyte) 0) + this.front = this.armor[index].frontSlot; + if (this.armor[index].shoeSlot > (sbyte) 0) + this.shoe = this.armor[index].shoeSlot; + if (this.armor[index].waistSlot > (sbyte) 0) + this.waist = this.armor[index].waistSlot; + if (this.armor[index].shieldSlot > (sbyte) 0) + this.shield = this.armor[index].shieldSlot; + if (this.armor[index].neckSlot > (sbyte) 0) + this.neck = this.armor[index].neckSlot; + if (this.armor[index].faceSlot > (sbyte) 0) + this.face = this.armor[index].faceSlot; + if (this.armor[index].balloonSlot > (sbyte) 0) + this.balloon = this.armor[index].balloonSlot; + if (this.armor[index].wingSlot > (sbyte) 0) + this.wings = (int) this.armor[index].wingSlot; + if (this.armor[index].type == 3580) + this.yoraiz0rEye = index - 2; + if (this.armor[index].type == 3581) + this.yoraiz0rDarkness = true; + if (this.armor[index].type == 3929) + this.leinforsHair = true; + } + 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.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 == 206 && this.back == (sbyte) -1) + this.back = (sbyte) 12; + if (this.body == 207 && this.back == (sbyte) -1) + this.back = (sbyte) 13; + if (this.body == 205 && this.back == (sbyte) -1) + this.back = (sbyte) 11; + 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 flag = this.wet && !this.lavaWet && (!this.mount.Active || this.mount.Type != 3); + if (this.merman || this.forceMerman) + { + if (!this.hideMerman) + { + this.head = 39; + this.legs = 21; + this.body = 22; + } + if (flag) + 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.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; + if ((this.head == 75 || this.head == 7) && this.body == 7 && this.legs == 7) + this.boneArmor = true; + if (this.legs == 140) + { + this.hermesStepSound.SoundType = 2; + this.hermesStepSound.SoundStyle = 24; + this.hermesStepSound.IntendedCooldown = 6; + } + if (this.wings > 0) + { + 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.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) + { + 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.legs == 23 && (this.head == 42 || this.head == 43 || this.head == 41) && (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) + { + this.frostArmor = true; + if ((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); + } + } + } + if (this.mount.Active) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * 6; + 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.UpdateFrame(this, 3, this.velocity); + } + else if (this.wet) + this.mount.UpdateFrame(this, 4, this.velocity); + else + this.mount.UpdateFrame(this, 2, this.velocity); + } + else if ((double) this.velocity.X == 0.0 || (this.slippy || this.slippy2 || this.windPushed) && !this.controlLeft && !this.controlRight) + this.mount.UpdateFrame(this, 0, this.velocity); + else + this.mount.UpdateFrame(this, 1, this.velocity); + } + else if (this.legs == 140) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * ((double) this.velocity.Y != 0.0).ToInt(); + if (this.wings == 22 || this.wings == 28) + this.legFrame.Y = 0; + } + else 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.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.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.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; + } + if (this.itemAnimation > 0 && this.inventory[this.selectedItem].useStyle != 10) + { + if (this.inventory[this.selectedItem].useStyle == 1 || this.inventory[this.selectedItem].type == 0) + { + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.333) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.666) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + else + this.bodyFrame.Y = this.bodyFrame.Height; + } + else if (this.inventory[this.selectedItem].useStyle == 2) + { + if ((double) this.itemAnimation > (double) this.itemAnimationMax * 0.5) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else if (this.inventory[this.selectedItem].useStyle == 3) + { + if ((double) this.itemAnimation > (double) this.itemAnimationMax * 0.666) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else + this.bodyFrame.Y = 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 != 5) + return; + if (this.inventory[this.selectedItem].type == 281 || this.inventory[this.selectedItem].type == 986) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else + { + double num4 = (double) this.itemRotation * (double) this.direction; + this.bodyFrame.Y = this.bodyFrame.Height * 3; + if (num4 < -0.75) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + if ((double) this.gravDir == -1.0) + this.bodyFrame.Y = this.bodyFrame.Height * 4; + } + if (num4 <= 0.6) + return; + this.bodyFrame.Y = this.bodyFrame.Height * 4; + if ((double) this.gravDir != -1.0) + return; + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + } + } + else if (this.mount.Active) + { + this.bodyFrameCounter = 0.0; + this.bodyFrame.Y = this.bodyFrame.Height * this.mount.BodyFrame; + } + else if (this.pulley) + { + if (this.pulleyDir == (byte) 2) + this.bodyFrame.Y = this.bodyFrame.Height; + else + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else if (this.inventory[this.selectedItem].holdStyle == 1 && (!this.wet || !this.inventory[this.selectedItem].noWet)) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].holdStyle == 2 && (!this.wet || !this.inventory[this.selectedItem].noWet)) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + else if (this.inventory[this.selectedItem].holdStyle == 3) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (this.shieldRaised) + this.bodyFrame.Y = this.bodyFrame.Height * 10; + else if (this.grappling[0] >= 0) + { + this.sandStorm = false; + this.dJumpEffectCloud = false; + this.dJumpEffectSandstorm = false; + this.dJumpEffectBlizzard = false; + this.dJumpEffectFart = false; + this.dJumpEffectSail = false; + this.dJumpEffectUnicorn = false; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num5 = 0.0f; + float num6 = 0.0f; + for (int index = 0; index < this.grapCount; ++index) + { + num5 += Main.projectile[this.grappling[index]].position.X + (float) (Main.projectile[this.grappling[index]].width / 2); + num6 += Main.projectile[this.grappling[index]].position.Y + (float) (Main.projectile[this.grappling[index]].height / 2); + } + float num7 = num5 / (float) this.grapCount; + float num8 = num6 / (float) this.grapCount; + float num9 = num7 - vector2.X; + float num10 = num8 - vector2.Y; + if ((double) num10 < 0.0 && (double) Math.Abs(num10) > (double) Math.Abs(num9)) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + if ((double) this.gravDir != -1.0) + return; + this.bodyFrame.Y = this.bodyFrame.Height * 4; + } + else if ((double) num10 > 0.0 && (double) Math.Abs(num10) > (double) Math.Abs(num9)) + { + this.bodyFrame.Y = this.bodyFrame.Height * 4; + if ((double) this.gravDir != -1.0) + return; + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else + this.bodyFrame.Y = this.bodyFrame.Height * 3; + } + 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 ? 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) + return; + 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; + } + } + + 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 == 14 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.RunSpeed / 2.0) + this.armorEffectDrawShadowBasilisk = 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.legs == 23 && (drawPlayer.head == 41 || drawPlayer.head == 42 || drawPlayer.head == 43)) + { + 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 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; + } + 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; + } + } + return num; + } + + public void Teleport(Vector2 newPos, int Style = 0, int extraInfo = 0) + { + try + { + 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(); + } + int extraInfo1 = 0; + if (Style == 4) + extraInfo1 = this.lastPortalColorIndex; + float dustCountMult = MathHelper.Clamp((float) (1.0 - (double) this.teleportTime * 0.990000009536743), 0.01f, 1f); + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult); + float num = Vector2.Distance(this.position, newPos); + PressurePlateHelper.UpdatePlayerPosition(this); + this.position = 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 + { + Main.BlackFadeIn = (int) byte.MaxValue; + Lighting.BlackOut(); + 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.quickBG = 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); + for (int index = 0; index < 3; ++index) + this.UpdateSocialShadow(); + this.oldPosition = this.position + this.BlehOldPositionFixer; + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult); + this.teleportTime = 1f; + this.teleportStyle = Style; + } + catch + { + } + } + + public void Spawn() + { + Main.InitLifeBytes(); + if (this.whoAmI == Main.myPlayer) + { + if (Main.mapTime < 5) + Main.mapTime = 5; + Main.quickBG = 10; + this.FindSpawn(); + if (!Player.CheckSpawn(this.SpawnX, this.SpawnY)) + { + this.SpawnX = -1; + this.SpawnY = -1; + } + Main.maxQ = true; + } + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer) + { + NetMessage.SendData(12, number: Main.myPlayer); + Main.gameMenu = false; + } + 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.lavaTime = this.lavaMax; + 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; + if (this.SpawnX >= 0 && this.SpawnY >= 0) + { + this.position.X = (float) (this.SpawnX * 16 + 8 - this.width / 2); + this.position.Y = (float) (this.SpawnY * 16 - this.height); + } + else + { + this.position.X = (float) (Main.spawnTileX * 16 + 8 - this.width / 2); + this.position.Y = (float) (Main.spawnTileY * 16 - this.height); + for (int i = Main.spawnTileX - 1; i < Main.spawnTileX + 2; ++i) + { + for (int j = Main.spawnTileY - 3; j < Main.spawnTileY; ++j) + { + if (Main.tile[i, j] != null) + { + if (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); + } + } + } + } + } + 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; + for (int index = 0; index < 3; ++index) + this.UpdateSocialShadow(); + this.oldPosition = this.position + this.BlehOldPositionFixer; + this.talkNPC = -1; + if (this.whoAmI == Main.myPlayer) + Main.npcChatCornerItem = 0; + if (this.pvpDeath) + { + this.pvpDeath = false; + this.immuneTime = 300; + this.statLife = this.statLifeMax; + } + else + this.immuneTime = 60; + if (this.whoAmI != Main.myPlayer) + return; + Main.BlackFadeIn = (int) byte.MaxValue; + Main.renderNow = true; + if (Main.netMode == 1) + Netplay.newRecent(); + 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); + } + + public void ShadowDodge() + { + this.immune = true; + this.immuneTime = 80; + if (this.longInvince) + this.immuneTime += 40; + for (int index = 0; index < this.hurtCooldowns.Length; ++index) + this.hurtCooldowns[index] = this.immuneTime; + 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 NinjaDodge() + { + this.immune = true; + this.immuneTime = 80; + if (this.longInvince) + this.immuneTime += 40; + for (int index = 0; index < this.hurtCooldowns.Length; ++index) + this.hurtCooldowns[index] = this.immuneTime; + 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 double HurtOld( + int Damage, + int hitDirection, + bool pvp = false, + bool quiet = false, + string deathText = " was slain...", + bool Crit = false, + int cooldownCounter = -1) + { + return 0.0; + } + + public double Hurt( + PlayerDeathReason damageSource, + int Damage, + int hitDirection, + bool pvp = false, + bool quiet = false, + bool Crit = false, + int cooldownCounter = -1) + { + 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 (!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.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.CalculatePlayerDamage(Damage1, this.statDefense); + if (Crit) + Damage1 *= 2; + if (dmg >= 1.0) + { + 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.300000011920929) * 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].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) + { + 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; + if (dmg == 1.0) + { + this.immuneTime = 20; + if (this.longInvince) + this.immuneTime += 20; + } + else + { + this.immuneTime = 40; + if (this.longInvince) + this.immuneTime += 40; + } + if (pvp) + { + this.immuneTime = 8; + break; + } + break; + case 0: + this.hurtCooldowns[cooldownCounter] = dmg != 1.0 ? (this.longInvince ? 80 : 40) : (this.longInvince ? 40 : 20); + break; + case 1: + this.hurtCooldowns[cooldownCounter] = dmg != 1.0 ? (this.longInvince ? 80 : 40) : (this.longInvince ? 40 : 20); + break; + } + this.lifeRegenTime = 0; + 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 index2 = Projectile.NewProjectile(num8, num9, SpeedX, SpeedY, 92, 30, 5f, this.whoAmI); + Main.projectile[index2].ai[1] = this.position.Y; + } + } + if (this.bee) + { + 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.velocity.X = num14 * (float) hitDirection; + this.velocity.Y = num15; + } + } + else if (!this.noKnockback && hitDirection != 0 && (!this.mount.Active || !this.mount.Cart)) + { + this.velocity.X = 4.5f * (float) hitDirection; + this.velocity.Y = -3.5f; + } + if (this.stoned) + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + else if (this.frostArmor) + Main.PlaySound(SoundID.Item27, this.position); + else if ((this.wereWolf || this.forceWerewolf) && !this.hideWolf) + Main.PlaySound(3, (int) this.position.X, (int) this.position.Y, 6); + else if (this.boneArmor) + Main.PlaySound(3, (int) this.position.X, (int) this.position.Y, 2); + else if (!this.Male) + Main.PlaySound(20, (int) this.position.X, (int) this.position.Y); + else + Main.PlaySound(1, (int) this.position.X, (int) this.position.Y); + 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.CalculateDamage(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 KillMeOld(double dmg, int hitDirection, bool pvp = false, string deathText = " was slain...") + { + } + + public void KillMe(PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp = false) + { + if (this.dead) + return; + if (pvp) + this.pvpDeath = true; + if (this.trapDebuffSource) + AchievementsHelper.HandleSpecialEvent(this, 4); + 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) + { + 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(); + } + } + Main.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; + 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: + NetMessage.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) + { + 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); + Main.projectile[index].miscText = deathText.ToString(); + } + + public bool ItemSpace(Item newItem) + { + if (newItem.uniqueStack && this.HasItem(newItem.type)) + return false; + if (newItem.type == 58 || newItem.type == 184 || newItem.type == 1734 || newItem.type == 1735 || newItem.type == 1867 || newItem.type == 1868 || ItemID.Sets.NebulaPickup[newItem.type]) + return true; + int num = 50; + if (newItem.type == 71 || newItem.type == 72 || newItem.type == 73 || newItem.type == 74) + num = 54; + for (int index = 0; index < num; ++index) + { + if (this.inventory[index].type == 0) + return true; + } + for (int index = 0; index < num; ++index) + { + if (this.inventory[index].type > 0 && this.inventory[index].stack < this.inventory[index].maxStack && newItem.IsTheSameAs(this.inventory[index])) + return true; + } + if (newItem.ammo > 0 && !newItem.notAmmo) + { + if (newItem.type != 75 && newItem.type != 169 && newItem.type != 23 && newItem.type != 408 && newItem.type != 370 && newItem.type != 1246) + { + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].type == 0) + return 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 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 true; + } + return false; + } + + 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, bool noText = false) + { + 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])) + { + Main.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 (!noText) + ItemText.NewText(newItem, obj.stack); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + return new Item(); + } + obj.stack -= this.inventory[i].maxStack - this.inventory[i].stack; + if (!noText) + ItemText.NewText(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(); + } + } + if (obj.bait <= 0 && obj.type != 169 && obj.type != 75 && obj.type != 23 && obj.type != 408 && obj.type != 370 && obj.type != 1246 && obj.type != 154 && !obj.notAmmo) + { + for (int i = 54; i < 58; ++i) + { + if (this.inventory[i].type == 0) + { + this.inventory[i] = obj; + if (!noText) + ItemText.NewText(newItem, newItem.stack); + this.DoCoins(i); + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + return new Item(); + } + } + } + return obj; + } + + public Item GetItem(int plr, Item newItem, bool longText = false, bool noText = false) + { + bool flag = newItem.type >= 71 && newItem.type <= 74; + Item newItem1 = newItem; + int num1 = 50; + if (newItem.noGrabDelay > 0) + return newItem1; + int num2 = 0; + if (newItem.uniqueStack && this.HasItem(newItem.type)) + return newItem1; + if (newItem.type == 71 || newItem.type == 72 || newItem.type == 73 || newItem.type == 74) + { + num2 = -4; + num1 = 54; + } + if ((newItem1.ammo > 0 || newItem1.bait > 0) && !newItem1.notAmmo || newItem1.type == 530) + { + newItem1 = this.FillAmmo(plr, newItem1, noText); + if (newItem1.type == 0 || newItem1.stack == 0) + return new Item(); + } + for (int index = num2; index < 50; ++index) + { + int i = index; + if (i < 0) + i = 54 + index; + if (this.inventory[i].type > 0 && this.inventory[i].stack < this.inventory[i].maxStack && newItem1.IsTheSameAs(this.inventory[i])) + { + if (flag) + Main.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (newItem1.stack + this.inventory[i].stack <= this.inventory[i].maxStack) + { + this.inventory[i].stack += newItem1.stack; + if (!noText) + ItemText.NewText(newItem, newItem1.stack, longText: longText); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, newItem1); + return new Item(); + } + AchievementsHelper.NotifyItemPickup(this, newItem1, this.inventory[i].maxStack - this.inventory[i].stack); + newItem1.stack -= this.inventory[i].maxStack - this.inventory[i].stack; + if (!noText) + ItemText.NewText(newItem, this.inventory[i].maxStack - this.inventory[i].stack, longText: longText); + this.inventory[i].stack = this.inventory[i].maxStack; + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + } + } + if (newItem.type != 71 && newItem.type != 72 && newItem.type != 73 && newItem.type != 74 && newItem.useStyle > 0) + { + for (int i = 0; i < 10; ++i) + { + if (this.inventory[i].type == 0) + { + this.inventory[i] = newItem1; + if (!noText) + ItemText.NewText(newItem, newItem.stack, longText: longText); + this.DoCoins(i); + if (flag) + Main.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, newItem1); + return new Item(); + } + } + } + if (newItem.favorited) + { + for (int i = 0; i < num1; ++i) + { + if (this.inventory[i].type == 0) + { + this.inventory[i] = newItem1; + if (!noText) + ItemText.NewText(newItem, newItem.stack, longText: longText); + this.DoCoins(i); + if (flag) + Main.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, newItem1); + return new Item(); + } + } + } + else + { + for (int i = num1 - 1; i >= 0; --i) + { + if (this.inventory[i].type == 0) + { + this.inventory[i] = newItem1; + if (!noText) + ItemText.NewText(newItem, newItem.stack, longText: longText); + this.DoCoins(i); + if (flag) + Main.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + Main.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, newItem1); + return new Item(); + } + } + } + return newItem1; + } + + public void PlaceThing() + { + 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) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] != null && Main.tile[tileTargetX, tileTargetY].active()) + { + this.showItemIcon = true; + if (this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + int num1 = -1; + int num2 = -1; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].paint > (byte) 0) + { + num1 = (int) this.inventory[index].paint; + num2 = index; + break; + } + } + if (num1 > 0 && (int) Main.tile[tileTargetX, tileTargetY].color() != num1 && WorldGen.paintTile(tileTargetX, tileTargetY, (byte) num1, true)) + { + int index = num2; + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index].SetDefaults(); + this.itemTime = this.inventory[this.selectedItem].useTime; + } + } + } + } + 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) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] != null && Main.tile[tileTargetX, tileTargetY].wall > (byte) 0) + { + this.showItemIcon = true; + if (this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + int num3 = -1; + int num4 = -1; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].paint > (byte) 0) + { + num3 = (int) this.inventory[index].paint; + num4 = index; + break; + } + } + if (num3 > 0 && (int) Main.tile[tileTargetX, tileTargetY].wallColor() != num3 && WorldGen.paintWall(tileTargetX, tileTargetY, (byte) num3, true)) + { + int index = num4; + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index].SetDefaults(); + this.itemTime = this.inventory[this.selectedItem].useTime; + } + } + } + } + if ((this.inventory[this.selectedItem].type == 1100 || this.inventory[this.selectedItem].type == 1545) && (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) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] != null && (Main.tile[tileTargetX, tileTargetY].wallColor() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].wall > (byte) 0 || Main.tile[tileTargetX, tileTargetY].color() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].active())) + { + this.showItemIcon = true; + if (this.itemTime == 0 && 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.itemTime = this.inventory[this.selectedItem].useTime; + else if (Main.tile[tileTargetX, tileTargetY].wallColor() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].wall > (byte) 0 && WorldGen.paintWall(tileTargetX, tileTargetY, (byte) 0, true)) + this.itemTime = this.inventory[this.selectedItem].useTime; + } + } + } + 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) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY].active() && Main.tile[tileTargetX, tileTargetY].type == (ushort) 209) + this.ShootFromCannon(tileTargetX, tileTargetY); + } + 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.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + 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) + { + this.itemTime = this.inventory[this.selectedItem].useTime; + 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) + { + this.itemTime = this.inventory[this.selectedItem].useTime; + 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) + { + this.itemTime = this.inventory[this.selectedItem].useTime; + 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) + { + int style = type - 1894; + if (WorldGen.checkXmasTreeDrop(Player.tileTargetX, Player.tileTargetY, 3) != style) + { + this.itemTime = this.inventory[this.selectedItem].useTime; + 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); + } + } + } + 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) + { + if ((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.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + this.itemTime = this.inventory[this.selectedItem].useTime; + Main.PlaySound(7); + Player.ExtractinatorUse(ItemID.Sets.ExtractinatorMode[this.inventory[this.selectedItem].type]); + } + } + else if (!this.noBuilding && this.inventory[this.selectedItem].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) + { + this.showItemIcon = true; + bool flag1 = 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]) + flag1 = true; + else if (!TileObjectData.CheckLiquidPlacement(this.inventory[this.selectedItem].createTile, this.inventory[this.selectedItem].placeStyle, Main.tile[Player.tileTargetX, Player.tileTargetY])) + flag1 = true; + } + bool flag2 = true; + if (PlayerInput.UsingGamepad && this.inventory[this.selectedItem].createTile == 4 && Main.SmartCursorEnabled && !Main.SmartCursorShowing) + flag2 = false; + if (this.inventory[this.selectedItem].tileWand > 0) + { + int tileWand = this.inventory[this.selectedItem].tileWand; + flag2 = false; + for (int index = 0; index < 58; ++index) + { + if (tileWand == this.inventory[index].type && this.inventory[index].stack > 0) + { + flag2 = true; + break; + } + } + } + if (Main.tileRope[this.inventory[this.selectedItem].createTile] && flag2 && 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) + { + flag2 = false; + tileTargetY = Player.tileTargetY; + } + } + if (!Main.tile[tileTargetX, tileTargetY].active()) + Player.tileTargetY = tileTargetY; + } + if (flag2 && (!Main.tile[Player.tileTargetX, Player.tileTargetY].active() && !flag1 || Main.tileCut[(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 || this.inventory[this.selectedItem].createTile == 199 || this.inventory[this.selectedItem].createTile == 23 || this.inventory[this.selectedItem].createTile == 2 || this.inventory[this.selectedItem].createTile == 109 || this.inventory[this.selectedItem].createTile == 60 || this.inventory[this.selectedItem].createTile == 70 || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) && this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + bool flag3 = false; + bool flag4 = false; + TileObject objectData = new TileObject(); + if (TileObjectData.CustomPlace(this.inventory[this.selectedItem].createTile, this.inventory[this.selectedItem].placeStyle) && this.inventory[this.selectedItem].createTile != 82) + { + flag4 = true; + flag3 = TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, (int) (ushort) this.inventory[this.selectedItem].createTile, this.inventory[this.selectedItem].placeStyle, this.direction, out objectData); + int width = 0; + int height = 0; + int x = 0; + int y = 0; + switch (objectData.type) + { + case 138: + width = 32; + height = 32; + x = objectData.xCoord * 16; + y = objectData.yCoord * 16; + break; + case 235: + width = 48; + height = 16; + x = objectData.xCoord * 16; + y = objectData.yCoord * 16; + break; + } + if (width != 0 && height != 0) + { + 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)) + { + flag3 = false; + break; + } + } + } + if (objectData.type == 454) + { + for (int index = -2; index < 2; ++index) + { + Tile tile = Main.tile[Player.tileTargetX + index, Player.tileTargetY]; + if (tile.active() && tile.type == (ushort) 454) + flag3 = false; + } + } + if (objectData.type == 254) + { + 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)) + flag3 = false; + } + } + } + } + else + { + 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) + flag3 = 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) + flag3 = true; + } + else if (this.inventory[this.selectedItem].createTile == 227) + flag3 = 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]) + flag3 = 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]) + flag3 = 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) + flag3 = true; + } + else if (this.inventory[this.selectedItem].createTile == 4 || this.inventory[this.selectedItem].createTile == 136) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].wall > (byte) 0) + { + flag3 = 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, Player.tileTargetY + 1].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) && !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, Player.tileTargetY + 1].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 index3 = (int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].halfBrick()) + index3 = -1; + int index4 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY].type; + int index5 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY].type; + int num5 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].type; + int num6 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY - 1].type; + int num7 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].type; + int num8 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY + 1].type; + if (!Main.tile[Player.tileTargetX, Player.tileTargetY + 1].nactive()) + index3 = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY].nactive()) + index4 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY].nactive()) + index5 = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].nactive()) + num5 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY - 1].nactive()) + num6 = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY + 1].nactive()) + num7 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY + 1].nactive()) + num8 = -1; + if (index3 >= 0 && Main.tileSolid[index3] && (!Main.tileNoAttach[index3] || index3 >= 0 && TileID.Sets.Platforms[index3])) + flag3 = true; + else if (index4 >= 0 && Main.tileSolid[index4] && !Main.tileNoAttach[index4] || index4 == 5 && num5 == 5 && num7 == 5 || index4 == 124) + flag3 = true; + else if (index5 >= 0 && Main.tileSolid[index5] && !Main.tileNoAttach[index5] || index5 == 5 && num6 == 5 && num8 == 5 || index5 == 124) + flag3 = 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])) + flag3 = 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)) + flag3 = 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]) + flag3 = true; + } + else if (this.inventory[this.selectedItem].createTile == 275 || this.inventory[this.selectedItem].createTile == 276 || this.inventory[this.selectedItem].createTile == 277) + flag3 = 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 > (byte) 0 || Main.tile[Player.tileTargetX - 1, Player.tileTargetY].active() || Main.tile[Player.tileTargetX - 1, Player.tileTargetY].wall > (byte) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].wall > (byte) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY - 1].active() || Main.tile[Player.tileTargetX, Player.tileTargetY - 1].wall > (byte) 0) + flag3 = true; + } + else if (this.inventory[this.selectedItem].createTile == 314) + { + for (int index6 = Player.tileTargetX - 1; index6 <= Player.tileTargetX + 1; ++index6) + { + for (int index7 = Player.tileTargetY - 1; index7 <= Player.tileTargetY + 1; ++index7) + { + Tile tile = Main.tile[index6, index7]; + if (tile.active() || tile.wall > (byte) 0) + { + flag3 = 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 > (byte) 0 || tile1.active() && (Main.tileSolid[(int) tile1.type] || Main.tileRope[(int) tile1.type] || tile1.type == (ushort) 314) || tile1.wall > (byte) 0 || tile4.active() && (Main.tileSolid[(int) tile4.type] || tile4.type == (ushort) 124 || Main.tileRope[(int) tile4.type] || tile4.type == (ushort) 314) || tile4.wall > (byte) 0 || tile3.active() && (Main.tileSolid[(int) tile3.type] || tile3.type == (ushort) 124 || Main.tileRope[(int) tile3.type] || tile3.type == (ushort) 314) || tile3.wall > (byte) 0) + flag3 = 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 flag5 = false; + int num = (int) Main.tile[tileTargetX, tileTargetY].frameX / 18; + if (num == 0 && Main.dayTime) + flag5 = true; + if (num == 1 && !Main.dayTime) + flag5 = true; + if (num == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0)) + flag5 = true; + if (num == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0)) + flag5 = true; + if (num == 5 && !Main.raining && Main.dayTime && Main.time > 40500.0) + flag5 = true; + if (flag5) + { + 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]) + flag3 = 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) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type != (ushort) 78 && Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type != (ushort) 380 || (Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 3 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 73) && Main.tileAlch[this.inventory[this.selectedItem].createTile]) + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (!Main.tile[Player.tileTargetX, Player.tileTargetY].active() && Main.netMode == 1) + NetMessage.SendData(17, number: 4, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else + flag3 = false; + } + else + flag3 = false; + } + if (!flag3 && this.inventory[this.selectedItem].createTile >= 0 && TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile]) + { + for (int index8 = Player.tileTargetX - 1; index8 <= Player.tileTargetX + 1; ++index8) + { + for (int index9 = Player.tileTargetY - 1; index9 <= Player.tileTargetY + 1; ++index9) + { + if (Main.tile[index8, index9].active()) + { + flag3 = true; + break; + } + } + } + } + } + if (flag3) + { + int num9 = this.inventory[this.selectedItem].placeStyle; + if (!flag4) + { + if (this.inventory[this.selectedItem].createTile == 36) + num9 = Main.rand.Next(7); + if (this.inventory[this.selectedItem].createTile == 212 && this.direction > 0) + num9 = 1; + if (this.inventory[this.selectedItem].createTile == 141) + num9 = Main.rand.Next(2); + if (this.inventory[this.selectedItem].createTile == 128 || this.inventory[this.selectedItem].createTile == 269 || this.inventory[this.selectedItem].createTile == 334) + num9 = this.direction >= 0 ? 1 : -1; + if (this.inventory[this.selectedItem].createTile == 241 && this.inventory[this.selectedItem].placeStyle == 0) + num9 = Main.rand.Next(0, 9); + if (this.inventory[this.selectedItem].createTile == 35 && this.inventory[this.selectedItem].placeStyle == 0) + num9 = Main.rand.Next(9); + } + if (this.inventory[this.selectedItem].createTile == 314 && num9 == 2 && this.direction == 1) + ++num9; + int[,] numArray = (int[,]) null; + if (this.autoPaint || this.autoActuator) + { + numArray = new int[11, 11]; + for (int index10 = 0; index10 < 11; ++index10) + { + for (int index11 = 0; index11 < 11; ++index11) + { + int index12 = Player.tileTargetX - 5 + index10; + int index13 = Player.tileTargetY - 5 + index11; + numArray[index10, index11] = !Main.tile[index12, index13].active() ? -1 : (int) Main.tile[index12, index13].type; + } + } + } + bool forced = false; + bool flag6; + if (flag4) + { + flag6 = TileObject.Place(objectData); + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + Main.PlaySound(0, Player.tileTargetX * 16, Player.tileTargetY * 16); + } + else + flag6 = WorldGen.PlaceTile(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createTile, forced: forced, plr: this.whoAmI, style: num9); + if (this.inventory[this.selectedItem].type == 213 && !flag6 && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 1 && Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + int num10 = 0; + int num11 = 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[6] + { + (ushort) 182, + (ushort) 180, + (ushort) 179, + (ushort) 183, + (ushort) 181, + (ushort) 381 + }).Output(resultsOutput)); + foreach (KeyValuePair keyValuePair in resultsOutput) + { + if (keyValuePair.Value > num11) + { + num11 = keyValuePair.Value; + num10 = (int) keyValuePair.Key; + } + } + if (num11 == 0) + num10 = Utils.SelectRandom(Main.rand, 182, 180, 179, 183, 181); + if (num10 != 0) + { + Main.tile[Player.tileTargetX, Player.tileTargetY].type = (ushort) num10; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + flag6 = true; + } + } + if (flag6) + { + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.tileSpeed); + if (flag4) + { + TileObjectData.CallPostPlacementPlayerHook(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createTile, num9, this.direction, objectData); + if (Main.netMode == 1 && !Main.tileContainer[this.inventory[this.selectedItem].createTile] && this.inventory[this.selectedItem].createTile != 423) + NetMessage.SendObjectPlacment(-1, Player.tileTargetX, Player.tileTargetY, objectData.type, objectData.style, objectData.alternate, objectData.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: num9); + if (this.inventory[this.selectedItem].createTile == 15) + { + 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) + NetMessage.SendTileSquare(-1, Player.tileTargetX - 1, Player.tileTargetY - 1, 3); + } + else if ((this.inventory[this.selectedItem].createTile == 79 || this.inventory[this.selectedItem].createTile == 90) && Main.netMode == 1) + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 5); + } + if (this.inventory[this.selectedItem].createTile == 137) + { + if (this.direction == 1) + Main.tile[Player.tileTargetX, Player.tileTargetY].frameX += (short) 18; + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + if (this.inventory[this.selectedItem].createTile == 419) + { + if (Main.netMode == 1) + NetMessage.SendData(17, number: 18, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + else + Wiring.PokeLogicGate(Player.tileTargetX, Player.tileTargetY); + } + if (this.inventory[this.selectedItem].createTile >= 0 && TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile] && Main.SmartCursorEnabled) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + int slope1 = -1; + int num12 = 0; + int num13 = 0; + bool flag7 = true; + for (int index14 = -1; index14 < 2; ++index14) + { + for (int index15 = -1; index15 < 2; ++index15) + { + if ((index14 != 0 || index15 != 0) && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + index14, tileTargetY + index15].type]) + flag7 = false; + } + } + if (!flag7) + { + Tile tile5 = Main.tile[tileTargetX - 1, tileTargetY - 1]; + if (tile5.active() && TileID.Sets.Platforms[(int) tile5.type] && tile5.slope() != (byte) 2) + ++num12; + Tile tile6 = Main.tile[tileTargetX - 1, tileTargetY + 1]; + if (tile6.active() && TileID.Sets.Platforms[(int) tile6.type] && tile6.slope() != (byte) 1) + ++num13; + Tile tile7 = Main.tile[tileTargetX + 1, tileTargetY - 1]; + if (tile7.active() && TileID.Sets.Platforms[(int) tile7.type] && tile7.slope() != (byte) 1) + ++num13; + Tile tile8 = Main.tile[tileTargetX + 1, tileTargetY + 1]; + if (tile8.active() && TileID.Sets.Platforms[(int) tile8.type] && tile8.slope() != (byte) 2) + ++num12; + Tile testTile1 = Main.tile[tileTargetX - 1, tileTargetY]; + if (WorldGen.SolidTile(testTile1)) + { + ++num12; + if (TileID.Sets.Platforms[(int) testTile1.type] && testTile1.slope() == (byte) 0) + ++num12; + } + Tile testTile2 = Main.tile[tileTargetX + 1, tileTargetY]; + if (WorldGen.SolidTile(testTile2)) + { + ++num13; + if (TileID.Sets.Platforms[(int) testTile2.type] && testTile2.slope() == (byte) 0) + ++num13; + } + if (num12 > num13) + slope1 = 1; + else if (num13 > num12) + slope1 = 2; + Tile tile9 = Main.tile[tileTargetX - 1, tileTargetY]; + if (tile9.active() && TileID.Sets.Platforms[(int) tile9.type]) + slope1 = 0; + Tile tile10 = Main.tile[tileTargetX + 1, tileTargetY]; + if (tile10.active() && TileID.Sets.Platforms[(int) tile10.type]) + slope1 = 0; + if (slope1 != -1) + { + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope1); + int num14 = (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) num14)); + int num15; + int num16; + if (slope1 == 1) + { + num15 = -1; + num16 = -1; + } + else + { + num15 = 1; + num16 = -1; + } + Tile tile11 = Main.tile[tileTargetX + num15, tileTargetY + num16]; + if (tile11.active() && TileID.Sets.Platforms[(int) tile11.type] && tile11.slope() == (byte) 0 && (!Main.tile[tileTargetX + num15 + num15, tileTargetY + num16].active() || !TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num15 + num15, tileTargetY + num16].type] || !Main.tile[tileTargetX + num15 + num15, tileTargetY + num16].halfBrick())) + { + WorldGen.SlopeTile(tileTargetX + num15, tileTargetY + num16, slope1); + int num17 = (int) tile11.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num15)), number3: ((float) (tileTargetY + num16)), number4: ((float) num17)); + } + int num18; + int num19; + if (slope1 == 1) + { + num18 = 1; + num19 = 1; + } + else + { + num18 = -1; + num19 = 1; + } + Tile tile12 = Main.tile[tileTargetX + num18, tileTargetY + num19]; + if (tile12.active() && TileID.Sets.Platforms[(int) tile12.type] && tile12.slope() == (byte) 0 && WorldGen.PlatformProperSides(tileTargetX + num18, tileTargetY + num19, true) <= 0) + { + WorldGen.SlopeTile(tileTargetX + num18, tileTargetY + num19, slope1); + int num20 = (int) tile12.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num18)), number3: ((float) (tileTargetY + num19)), number4: ((float) num20)); + } + } + else + { + int num21 = -1; + Tile tile13 = Main.tile[tileTargetX + num21, tileTargetY]; + if (tile13.active() && TileID.Sets.Platforms[(int) tile13.type] && tile13.slope() != (byte) 0) + { + int num22 = (tile13.slope() == (byte) 1).ToDirectionInt() * num21; + int slope2 = num22 == -1 ? 0 : (int) tile13.slope(); + bool flag8 = true; + if (Main.tile[tileTargetX + num21 * 2, tileTargetY + num22].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num21 * 2, tileTargetY].type] && slope2 == (int) Main.tile[tileTargetX + num21 * 2, tileTargetY + num22].slope()) + flag8 = false; + if (Main.tile[tileTargetX, tileTargetY - num22].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX, tileTargetY - num22].type] && (int) tile13.slope() == (int) Main.tile[tileTargetX, tileTargetY - num22].slope()) + flag8 = false; + if (flag8) + { + WorldGen.SlopeTile(tileTargetX + num21, tileTargetY, slope2); + int num23 = (int) tile13.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num21)), number3: ((float) tileTargetY), number4: ((float) num23)); + } + } + int num24 = 1; + int num25 = 0; + Tile tile14 = Main.tile[tileTargetX + num24, tileTargetY + num25]; + if (tile14.active() && TileID.Sets.Platforms[(int) tile14.type] && tile14.slope() != (byte) 0) + { + int num26 = (tile14.slope() == (byte) 1).ToDirectionInt() * num24; + int slope3 = num26 == -1 ? 0 : (int) tile14.slope(); + bool flag9 = true; + if (Main.tile[tileTargetX + num24 * 2, tileTargetY + num26].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num24 * 2, tileTargetY].type] && slope3 == (int) Main.tile[tileTargetX + num24 * 2, tileTargetY + num26].slope()) + flag9 = false; + if (Main.tile[tileTargetX, tileTargetY - num26].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX, tileTargetY - num26].type] && (int) tile14.slope() == (int) Main.tile[tileTargetX, tileTargetY - num26].slope()) + flag9 = false; + if (flag9) + { + WorldGen.SlopeTile(tileTargetX + num24, tileTargetY, slope3); + int num27 = (int) tile14.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num24)), number3: ((float) tileTargetY), number4: ((float) num27)); + } + } + if (num12 == num13 && WorldGen.PlatformProperSides(tileTargetX, tileTargetY) == 0) + { + Tile tile15 = Main.tile[tileTargetX, tileTargetY + 1]; + if (tile15.active() && !tile15.halfBrick() && tile15.slope() == (byte) 0 && Main.tileSolid[(int) tile15.type]) + { + int slope4 = this.direction == 1 ? 2 : 1; + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4); + int num28 = (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) num28)); + } + } + } + } + } + if (Main.tileSolid[this.inventory[this.selectedItem].createTile] && (this.inventory[this.selectedItem].createTile < 0 || !TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile])) + { + 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()) + { + WorldGen.SlopeTile(tileTargetX2, j2); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) tileTargetX2), number3: ((float) j2)); + } + } + if (Main.tileSolid[this.inventory[this.selectedItem].createTile]) + { + for (int i1 = Player.tileTargetX - 1; i1 <= Player.tileTargetX + 1; ++i1) + { + for (int j3 = Player.tileTargetY - 1; j3 <= Player.tileTargetY + 1; ++j3) + { + if (Main.tile[i1, j3].active() && this.inventory[this.selectedItem].createTile != (int) Main.tile[i1, j3].type && (Main.tile[i1, j3].type == (ushort) 2 || Main.tile[i1, j3].type == (ushort) 23 || Main.tile[i1, j3].type == (ushort) 60 || Main.tile[i1, j3].type == (ushort) 70 || Main.tile[i1, j3].type == (ushort) 109 || Main.tile[i1, j3].type == (ushort) 199)) + { + bool flag10 = true; + for (int i2 = i1 - 1; i2 <= i1 + 1; ++i2) + { + for (int j4 = j3 - 1; j4 <= j3 + 1; ++j4) + { + if (!WorldGen.SolidTile(i2, j4)) + flag10 = false; + } + } + if (flag10) + { + WorldGen.KillTile(i1, j3, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) i1), number3: ((float) j3), number4: 1f); + } + } + } + } + } + if (this.autoPaint || this.autoActuator) + { + int num29 = 0; + int num30 = 0; + int num31 = 11; + int num32 = 11; + if (!Main.tileFrameImportant[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + { + num29 = num30 = 5; + num31 = num32 = 6; + } + for (int index16 = num29; index16 < num31; ++index16) + { + for (int index17 = num30; index17 < num32; ++index17) + { + int index18 = Player.tileTargetX - 5 + index16; + int index19 = Player.tileTargetY - 5 + index17; + if ((Main.tile[index18, index19].active() || numArray[index16, index17] != -1) && (!Main.tile[index18, index19].active() || numArray[index16, index17] != (int) Main.tile[index18, index19].type && (int) Main.tile[index18, index19].type == this.inventory[this.selectedItem].createTile)) + { + if (this.autoPaint && this.builderAccStatus[3] == 0) + { + int num33 = -1; + int num34 = -1; + for (int index20 = 0; index20 < 58; ++index20) + { + if (this.inventory[index20].stack > 0 && this.inventory[index20].paint > (byte) 0) + { + num33 = (int) this.inventory[index20].paint; + num34 = index20; + break; + } + } + if (num33 > 0 && (int) Main.tile[index18, index19].color() != num33 && WorldGen.paintTile(index18, index19, (byte) num33, true)) + { + int index21 = num34; + --this.inventory[index21].stack; + if (this.inventory[index21].stack <= 0) + this.inventory[index21].SetDefaults(); + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.tileSpeed); + } + } + if (this.autoActuator && this.builderAccStatus[2] == 0) + { + bool flag11 = Main.tileSolid[(int) Main.tile[index18, index19].type] && !TileID.Sets.NotReallySolid[(int) Main.tile[index18, index19].type]; + switch (Main.tile[index18, index19].type) + { + case 314: + case 386: + case 387: + case 388: + case 389: + flag11 = false; + break; + } + if (flag11) + { + int index22 = this.FindItem(849); + if (index22 > -1 && WorldGen.PlaceActuator(index18, index19)) + { + NetMessage.SendData(17, number: 8, number2: ((float) index18), number3: ((float) index19)); + --this.inventory[index22].stack; + if (this.inventory[index22].stack <= 0) + this.inventory[index22].SetDefaults(); + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.tileSpeed); + } + } + } + } + } + } + } + if (PlayerInput.UsingGamepad && ItemID.Sets.SingleUseInGamepad[this.inventory[this.selectedItem].type] && Main.myPlayer == this.whoAmI && !Main.SmartCursorEnabled) + Main.blockMouse = true; + } + } + } + } + if (this.inventory[this.selectedItem].createWall < 0 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 < (double) Player.tileTargetY) + return; + this.showItemIcon = true; + if (this.itemTime != 0 || this.itemAnimation <= 0 || !this.controlUseItem || !Main.tile[Player.tileTargetX + 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX + 1, Player.tileTargetY].wall <= (byte) 0 && !Main.tile[Player.tileTargetX - 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX - 1, Player.tileTargetY].wall <= (byte) 0 && !Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY + 1].wall <= (byte) 0 && !Main.tile[Player.tileTargetX, Player.tileTargetY - 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY - 1].wall <= (byte) 0 || (int) Main.tile[Player.tileTargetX, Player.tileTargetY].wall == this.inventory[this.selectedItem].createWall) + return; + if (Player.SmartCursorSettings.SmartWallReplacement && Main.tile[Player.tileTargetX, Player.tileTargetY].wall != (byte) 0 && WorldGen.NearFriendlyWall(Player.tileTargetX, Player.tileTargetY)) + { + WorldGen.KillWall(Player.tileTargetX, Player.tileTargetY); + if (Main.tile[Player.tileTargetX, Player.tileTargetY].wall == (byte) 0 && Main.netMode == 1) + NetMessage.SendData(17, number: 2, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + if (this.inventory[this.selectedItem].consumable) + ++this.inventory[this.selectedItem].stack; + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.wallSpeed); + } + else + { + 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.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) 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)); + if (this.inventory[this.selectedItem].stack > 1) + { + int createWall = this.inventory[this.selectedItem].createWall; + for (int index23 = 0; index23 < 4; ++index23) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (index23 == 0) + --tileTargetX; + if (index23 == 1) + ++tileTargetX; + if (index23 == 2) + --tileTargetY; + if (index23 == 3) + ++tileTargetY; + if (Main.tile[tileTargetX, tileTargetY].wall == (byte) 0) + { + int num35 = 0; + for (int index24 = 0; index24 < 4; ++index24) + { + int index25 = tileTargetX; + int index26 = tileTargetY; + if (index24 == 0) + --index25; + if (index24 == 1) + ++index25; + if (index24 == 2) + --index26; + if (index24 == 3) + ++index26; + if ((int) Main.tile[index25, index26].wall == createWall) + ++num35; + } + if (num35 == 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) + { + int x = tileTargetX; + int y = tileTargetY; + int num36 = -1; + int num37 = -1; + for (int index27 = 0; index27 < 58; ++index27) + { + if (this.inventory[index27].stack > 0 && this.inventory[index27].paint > (byte) 0) + { + num36 = (int) this.inventory[index27].paint; + num37 = index27; + break; + } + } + if (num36 > 0 && (int) Main.tile[x, y].wallColor() != num36 && WorldGen.paintWall(x, y, (byte) num36, true)) + { + int index28 = num37; + --this.inventory[index28].stack; + if (this.inventory[index28].stack <= 0) + this.inventory[index28].SetDefaults(); + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.wallSpeed); + } + } + } + } + } + } + } + if (!this.autoPaint || this.builderAccStatus[3] != 0) + return; + int tileTargetX3 = Player.tileTargetX; + int tileTargetY1 = Player.tileTargetY; + int num38 = -1; + int num39 = -1; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].paint > (byte) 0) + { + num38 = (int) this.inventory[index].paint; + num39 = index; + break; + } + } + if (num38 <= 0 || (int) Main.tile[tileTargetX3, tileTargetY1].wallColor() == num38 || !WorldGen.paintWall(tileTargetX3, tileTargetY1, (byte) num38, true)) + return; + int index29 = num39; + --this.inventory[index29].stack; + if (this.inventory[index29].stack <= 0) + this.inventory[index29].SetDefaults(); + this.itemTime = (int) ((double) this.inventory[this.selectedItem].useTime * (double) this.wallSpeed); + } + } + + 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.showItemIcon = true; + if (this.itemTime != 0 || 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.itemTime = this.inventory[this.selectedItem].useTime; + WorldGen.ShootFromCannon(x1, y1, angle, ammo, this.inventory[this.selectedItem].damage, 8f, Main.myPlayer); + } + + private static void ExtractinatorUse(int extractType) + { + int maxValue1 = 5000; + int maxValue2 = 25; + int maxValue3 = 50; + int maxValue4 = -1; + if (extractType == 1) + { + maxValue1 /= 3; + maxValue2 *= 2; + maxValue3 /= 2; + 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; + 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 PutItemInInventory(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).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; + ItemText.NewText(newItem, 0); + } + } + } + + public bool SummonItemCheck() + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (this.inventory[this.selectedItem].type == 43 && Main.npc[index].type == 4 || this.inventory[this.selectedItem].type == 70 && Main.npc[index].type == 13 || this.inventory[this.selectedItem].type == 560 & Main.npc[index].type == 50 || this.inventory[this.selectedItem].type == 544 && Main.npc[index].type == 125 || this.inventory[this.selectedItem].type == 544 && Main.npc[index].type == 126 || this.inventory[this.selectedItem].type == 556 && Main.npc[index].type == 134 || this.inventory[this.selectedItem].type == 557 && Main.npc[index].type == (int) sbyte.MaxValue || this.inventory[this.selectedItem].type == 1133 && Main.npc[index].type == 222 || this.inventory[this.selectedItem].type == 1331 && Main.npc[index].type == 266)) + return false; + } + return true; + } + + public int FishingLevel() + { + int num1 = 0; + int fishingPole = this.inventory[this.selectedItem].fishingPole; + if (fishingPole == 0) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].fishingPole > fishingPole) + fishingPole = this.inventory[index].fishingPole; + } + } + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].bait > 0) + { + if (this.inventory[index].type == 2673) + return -1; + num1 = this.inventory[index].bait; + break; + } + } + if (num1 == 0 || fishingPole == 0) + return 0; + int num2 = num1 + fishingPole + this.fishingSkill; + if (Main.raining) + num2 = (int) ((double) num2 * 1.20000004768372); + if ((double) Main.cloudBGAlpha > 0.0) + num2 = (int) ((double) num2 * 1.10000002384186); + if (Main.dayTime && (Main.time < 5400.0 || Main.time > 48600.0)) + num2 = (int) ((double) num2 * 1.29999995231628); + if (Main.dayTime && Main.time > 16200.0 && Main.time < 37800.0) + num2 = (int) ((double) num2 * 0.800000011920929); + if (!Main.dayTime && Main.time > 6480.0 && Main.time < 25920.0) + num2 = (int) ((double) num2 * 0.800000011920929); + if (Main.moonPhase == 0) + num2 = (int) ((double) num2 * 1.10000002384186); + if (Main.moonPhase == 1 || Main.moonPhase == 7) + num2 = (int) ((double) num2 * 1.04999995231628); + if (Main.moonPhase == 3 || Main.moonPhase == 5) + num2 = (int) ((double) num2 * 0.949999988079071); + if (Main.moonPhase == 4) + num2 = (int) ((double) num2 * 0.899999976158142); + return num2; + } + + 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 > (byte) 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; + } + } + 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 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 void ItemCheck(int i) + { + if (this.webbed || this.frozen || this.stoned) + return; + bool flag1 = false; + float playerOffsetHitbox = (float) this.mount.PlayerOffsetHitbox; + Item sItem = this.inventory[this.selectedItem]; + if (this.mount.Active) + { + 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) + this.mount.Dismount(this); + } + int weaponDamage = this.GetWeaponDamage(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) + { + this.ApplyAnimation(sItem); + if (sItem.UseSound != null) + Main.PlaySound(sItem.UseSound, this.Center); + } + else + this.itemAnimation = 0; + } + } + if (sItem.fishingPole > 0) + { + sItem.holdStyle = 0; + if (this.itemTime == 0 && 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 (this.itemAnimation == 0 && this.reuseDelay > 0) + { + this.itemAnimation = this.reuseDelay; + this.itemTime = this.reuseDelay; + this.reuseDelay = 0; + } + if (this.controlUseItem && this.releaseUseItem && (sItem.headSlot > 0 || sItem.bodySlot > 0 || sItem.legSlot > 0)) + { + 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) + { + 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)) + { + 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)) + { + 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; + } + } + } + } + if (Main.myPlayer == i && this.itemAnimation == 0 && TileObjectData.CustomPlace(sItem.createTile, sItem.placeStyle)) + TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, sItem.createTile, sItem.placeStyle, this.direction, out TileObject _, true); + if (this.itemAnimation == 0 && this.altFunctionUse == 2) + this.altFunctionUse = 0; + if (this.controlUseItem && this.itemAnimation == 0 && this.releaseUseItem && sItem.useStyle > 0) + { + if (this.altFunctionUse == 1) + this.altFunctionUse = 2; + bool canUse = true; + if (sItem.shoot == 0) + this.itemRotation = 0.0f; + if (sItem.type == 3335 && (this.extraAccessory || !Main.expertMode)) + canUse = false; + if (this.pulley && sItem.fishingPole > 0) + 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 (this.whoAmI == Main.myPlayer && 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 && i == Main.myPlayer) + { + int worldX; + int worldY; + this.FindSentryRestingSpot(sItem.shoot, out worldX, out worldY, out int _); + if (Player.WouldSpotOverlapWithSentry(worldX, worldY)) + canUse = false; + } + if (sItem.shoot > -1 && ProjectileID.Sets.IsADD2Turret[sItem.shoot] && i == Main.myPlayer) + { + int worldX; + int worldY; + this.FindSentryRestingSpot(sItem.shoot, out worldX, out worldY, out int _); + if (WorldGen.SolidTile(worldX / 16, worldY / 16 - 1)) + 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.cEd) + canUse = false; + if (sItem.type == 1071 || sItem.type == 1072) + { + bool flag2 = false; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].paint > (byte) 0) + { + flag2 = true; + break; + } + } + if (!flag2) + 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.fishingPole > 0) + { + for (int index1 = 0; index1 < 1000; ++index1) + { + if (Main.projectile[index1].active && Main.projectile[index1].owner == this.whoAmI && Main.projectile[index1].bobber) + { + canUse = false; + if (this.whoAmI == Main.myPlayer && (double) Main.projectile[index1].ai[0] == 0.0) + { + Main.projectile[index1].ai[0] = 1f; + float num3 = -10f; + if (Main.projectile[index1].wet && (double) Main.projectile[index1].velocity.Y > (double) num3) + Main.projectile[index1].velocity.Y = num3; + Main.projectile[index1].netUpdate2 = true; + if ((double) Main.projectile[index1].ai[1] < 0.0 && (double) Main.projectile[index1].localAI[1] != 0.0) + { + bool flag3 = false; + int num4 = 0; + for (int index2 = 0; index2 < 58; ++index2) + { + if (this.inventory[index2].stack > 0 && this.inventory[index2].bait > 0) + { + bool flag4 = false; + int maxValue = 1 + this.inventory[index2].bait / 5; + if (maxValue < 1) + maxValue = 1; + if (this.accTackleBox) + ++maxValue; + if (Main.rand.Next(maxValue) == 0) + flag4 = true; + if ((double) Main.projectile[index1].localAI[1] < 0.0) + flag4 = true; + if ((double) Main.projectile[index1].localAI[1] > 0.0) + { + Item obj = new Item(); + obj.SetDefaults((int) Main.projectile[index1].localAI[1]); + if (obj.rare < 0) + flag4 = false; + } + if (flag4) + { + num4 = this.inventory[index2].type; + --this.inventory[index2].stack; + if (this.inventory[index2].stack <= 0) + this.inventory[index2].SetDefaults(); + } + flag3 = true; + break; + } + } + if (flag3) + { + if (num4 == 2673) + { + if (Main.netMode != 1) + NPC.SpawnOnPlayer(this.whoAmI, 370); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 370f); + Main.projectile[index1].ai[0] = 2f; + } + else if (Main.rand.Next(7) == 0 && !this.accFishingLine) + Main.projectile[index1].ai[0] = 2f; + else + Main.projectile[index1].ai[1] = Main.projectile[index1].localAI[1]; + Main.projectile[index1].netUpdate = true; + } + } + } + } + } + } + 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) + { + 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 & canUse) + { + if (this.potionDelay <= 0) + { + if (sItem.type == 227) + { + this.potionDelay = this.restorationDelayTime; + this.AddBuff(21, this.potionDelay); + } + else + { + this.potionDelay = this.potionDelayTime; + this.AddBuff(21, this.potionDelay); + } + } + else + canUse = false; + } + if (sItem.mana > 0 && this.silence) + canUse = false; + if (sItem.mana > 0 & canUse) + { + bool flag5 = false; + if (sItem.type == 2795) + flag5 = true; + if (sItem.shoot > 0 && ProjectileID.Sets.TurretFeature[sItem.shoot] && this.altFunctionUse == 2) + flag5 = true; + if (sItem.shoot > 0 && ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] && this.altFunctionUse == 2) + flag5 = true; + if (sItem.type != (int) sbyte.MaxValue || !this.spaceGun) + { + if (this.statMana >= (int) ((double) sItem.mana * (double) this.manaCost)) + { + if (!flag5) + this.statMana -= (int) ((double) sItem.mana * (double) this.manaCost); + } + else if (this.manaFlower) + { + this.QuickMana(); + if (this.statMana >= (int) ((double) sItem.mana * (double) this.manaCost)) + { + if (!flag5) + this.statMana -= (int) ((double) sItem.mana * (double) this.manaCost); + } + else + canUse = false; + } + else + canUse = false; + } + if (((this.whoAmI != Main.myPlayer || sItem.buffType == 0 ? 0 : ((uint) sItem.buffTime > 0U ? 1 : 0)) & (canUse ? 1 : 0)) != 0) + this.AddBuff(sItem.buffType, sItem.buffTime); + } + if ((sItem.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] ? 0 : (this.altFunctionUse == 2 ? 1 : 0)) == 0) + this.ItemCheck_ApplyPetBuffs(sItem); + if (this.whoAmI == Main.myPlayer && (double) this.gravDir == 1.0 && sItem.mountType != -1 && this.mount.CanMount(sItem.mountType, this)) + this.mount.SetMount(sItem.mountType, this); + 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 == 3601 && (!NPC.downedGolemBoss || !Main.hardMode || NPC.AnyDanger() || NPC.AnyoneNearCultists())) + canUse = false; + if (!this.SummonItemCheck()) + canUse = false; + if (sItem.shoot == 17 & canUse && i == Main.myPlayer) + { + 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; + Tile tile = Main.tile[i1, j]; + if (tile.active() && (tile.type == (ushort) 0 || tile.type == (ushort) 2 || tile.type == (ushort) 23 || tile.type == (ushort) 109 || tile.type == (ushort) 199)) + { + WorldGen.KillTile(i1, j, noItem: true); + if (!Main.tile[i1, j].active()) + { + if (Main.netMode == 1) + NetMessage.SendData(17, number: 4, number2: ((float) i1), number3: ((float) j)); + } + else + canUse = false; + } + else + canUse = false; + } + if (canUse) + canUse = this.HasAmmo(sItem, canUse); + if (canUse) + { + if (sItem.pick > 0 || sItem.axe > 0 || sItem.hammer > 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.ApplyAnimation(sItem); + if (sItem.UseSound != null) + Main.PlaySound(sItem.UseSound, this.Center); + } + if ((sItem.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] ? 0 : (this.altFunctionUse == 2 ? 1 : 0)) == 0 & canUse && this.whoAmI == Main.myPlayer && sItem.shoot >= 0 && sItem.shoot < 714 && (ProjectileID.Sets.LightPet[sItem.shoot] || Main.projPet[sItem.shoot])) + { + if (ProjectileID.Sets.MinionSacrificable[sItem.shoot]) + { + List intList = new List(); + float num5 = 0.0f; + for (int index3 = 0; index3 < 1000; ++index3) + { + if (Main.projectile[index3].active && Main.projectile[index3].owner == i && Main.projectile[index3].minion) + { + int index4; + for (index4 = 0; index4 < intList.Count; ++index4) + { + if ((double) Main.projectile[intList[index4]].minionSlots > (double) Main.projectile[index3].minionSlots) + { + intList.Insert(index4, index3); + break; + } + } + if (index4 == intList.Count) + intList.Add(index3); + num5 += Main.projectile[index3].minionSlots; + } + } + float num6 = (float) ItemID.Sets.StaffMinionSlotsRequired[sItem.type]; + float num7 = 0.0f; + int num8 = 388; + int index5 = -1; + for (int index6 = 0; index6 < intList.Count; ++index6) + { + int type = Main.projectile[intList[index6]].type; + if (type == 626) + { + intList.RemoveAt(index6); + --index6; + } + if (type == 627) + { + if (Main.projectile[(int) Main.projectile[intList[index6]].localAI[1]].type == 628) + index5 = intList[index6]; + intList.RemoveAt(index6); + --index6; + } + } + if (index5 != -1) + { + intList.Add(index5); + intList.Add(Projectile.GetByUUID(Main.projectile[index5].owner, Main.projectile[index5].ai[0])); + } + for (int index7 = 0; index7 < intList.Count && (double) num5 - (double) num7 > (double) this.maxMinions - (double) num6; ++index7) + { + int type = Main.projectile[intList[index7]].type; + if (type != num8 && type != 625 && type != 628 && type != 623) + { + if (type == 388 && num8 == 387) + num8 = 388; + if (type == 387 && num8 == 388) + num8 = 387; + num7 += Main.projectile[intList[index7]].minionSlots; + if (type == 626 || type == 627) + { + int byUuid = Projectile.GetByUUID(Main.projectile[intList[index7]].owner, Main.projectile[intList[index7]].ai[0]); + if (byUuid >= 0) + { + Projectile projectile1 = Main.projectile[byUuid]; + if (projectile1.type != 625) + projectile1.localAI[1] = Main.projectile[intList[index7]].localAI[1]; + Projectile projectile2 = Main.projectile[(int) Main.projectile[intList[index7]].localAI[1]]; + projectile2.ai[0] = Main.projectile[intList[index7]].ai[0]; + projectile2.ai[1] = 1f; + projectile2.netUpdate = true; + } + } + Main.projectile[intList[index7]].Kill(); + } + } + intList.Clear(); + if ((double) num5 + (double) num6 >= 9.0) + AchievementsHelper.HandleSpecialEvent(this, 6); + } + else + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i && Main.projectile[index].type == sItem.shoot) + Main.projectile[index].Kill(); + if (sItem.shoot == 72) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i && Main.projectile[index].type == 86) + Main.projectile[index].Kill(); + if (Main.projectile[index].active && Main.projectile[index].owner == i && Main.projectile[index].type == 87) + Main.projectile[index].Kill(); + } + } + } + } + } + if (!this.controlUseItem) + { + int num = this.channel ? 1 : 0; + this.channel = false; + } + if (this.itemAnimation > 0) + { + this.itemAnimationMax = !sItem.melee ? sItem.useAnimation : (int) ((double) sItem.useAnimation * (double) this.meleeSpeed); + if (sItem.mana > 0 && !flag1 && (sItem.type != (int) sbyte.MaxValue || !this.spaceGun)) + this.manaRegenDelay = (int) this.maxRegenDelay; + if (Main.dedServ) + { + this.itemHeight = sItem.height; + this.itemWidth = sItem.width; + } + else + { + this.itemHeight = Main.itemTexture[sItem.type].Height; + this.itemWidth = Main.itemTexture[sItem.type].Width; + } + --this.itemAnimation; + if (!Main.dedServ) + { + 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) Main.itemTexture[sItem.type].Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 26f + playerOffsetHitbox; + } + 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) Main.itemTexture[sItem.type].Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + playerOffsetHitbox; + } + else + { + float num = 6f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - ((double) Main.itemTexture[sItem.type].Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 20f + playerOffsetHitbox; + } + 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 (Main.itemTexture[sItem.type].Width > 32) + num = 14f; + if (Main.itemTexture[sItem.type].Width >= 52) + num = 24f; + if (Main.itemTexture[sItem.type].Width >= 64) + num = 28f; + if (Main.itemTexture[sItem.type].Width >= 92) + num = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num += 8f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) Main.itemTexture[sItem.type].Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + playerOffsetHitbox; + } + else if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.666) + { + float num9 = 10f; + if (Main.itemTexture[sItem.type].Width > 32) + num9 = 18f; + if (Main.itemTexture[sItem.type].Width >= 52) + num9 = 24f; + if (Main.itemTexture[sItem.type].Width >= 64) + num9 = 28f; + if (Main.itemTexture[sItem.type].Width >= 92) + num9 = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num9 += 4f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) Main.itemTexture[sItem.type].Width * 0.5 - (double) num9) * (double) this.direction); + float num10 = 10f; + if (Main.itemTexture[sItem.type].Height > 32) + num10 = 8f; + if (Main.itemTexture[sItem.type].Height > 52) + num10 = 12f; + if (Main.itemTexture[sItem.type].Height > 64) + num10 = 14f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num10 += 4f; + this.itemLocation.Y = this.position.Y + num10 + playerOffsetHitbox; + } + else + { + float num11 = 6f; + if (Main.itemTexture[sItem.type].Width > 32) + num11 = 14f; + if (Main.itemTexture[sItem.type].Width >= 48) + num11 = 18f; + if (Main.itemTexture[sItem.type].Width >= 52) + num11 = 24f; + if (Main.itemTexture[sItem.type].Width >= 64) + num11 = 28f; + if (Main.itemTexture[sItem.type].Width >= 92) + num11 = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num11 += 4f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - ((double) Main.itemTexture[sItem.type].Width * 0.5 - (double) num11) * (double) this.direction); + float num12 = 10f; + if (Main.itemTexture[sItem.type].Height > 32) + num12 = 10f; + if (Main.itemTexture[sItem.type].Height > 52) + num12 = 12f; + if (Main.itemTexture[sItem.type].Height > 64) + num12 = 14f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num12 += 4f; + this.itemLocation.Y = this.position.Y + num12 + playerOffsetHitbox; + } + 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) + { + 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.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) Main.itemTexture[sItem.type].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) + playerOffsetHitbox; + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) Main.itemTexture[sItem.type].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) + playerOffsetHitbox; + } + 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)); + } + } + 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) Main.itemTexture[sItem.type].Width * 0.5 - 4.0) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + playerOffsetHitbox; + float num = (float) ((double) this.itemAnimation / (double) this.itemAnimationMax * (double) Main.itemTexture[sItem.type].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 ((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)); + } + } + else if (sItem.useStyle == 4) + { + int num = 0; + if (sItem.type == 3601) + num = 10; + this.itemRotation = 0.0f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) Main.itemTexture[sItem.type].Width * 0.5 - 9.0 - (double) this.itemRotation * 14.0 * (double) this.direction - 4.0 - (double) num) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + (double) Main.itemTexture[sItem.type].Height * 0.5 + 4.0) + playerOffsetHitbox; + 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)); + } + } + 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 (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; + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - (double) Main.itemTexture[sItem.type].Width * 0.5) - (float) (this.direction * 2); + this.itemLocation.Y = this.MountedCenter.Y - (float) Main.itemTexture[sItem.type].Height * 0.5f; + } + } + } + } + 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 index8 = (int) ((double) this.itemLocation.X + (double) Main.itemTexture[sItem.type].Width * 0.800000011920929 * (double) this.direction) / 16; + int index9 = (int) ((double) this.itemLocation.Y + (double) playerOffsetHitbox + (double) (Main.itemTexture[sItem.type].Height / 2)) / 16; + if (Main.tile[index8, index9] == null) + Main.tile[index8, index9] = new Tile(); + if (Main.tile[index8, index9].active() && Main.tile[index8, index9].type == (ushort) 215 && Main.tile[index8, index9].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 index10 = 0; index10 < 58; ++index10) + { + if (this.inventory[index10].type == sItem.type && index10 != this.selectedItem && this.inventory[index10].stack < this.inventory[index10].maxStack) + { + Main.PlaySound(7); + ++this.inventory[index10].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) Main.itemTexture[sItem.type].Width * 0.180000007152557 * (double) this.direction); + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) Main.itemTexture[sItem.type].Width * 0.5 + 2.0) * (double) this.direction); + if (sItem.type == 282 || sItem.type == 286 || sItem.type == 3112) + { + 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 + playerOffsetHitbox; + if (sItem.type == 856) + this.itemLocation.Y = this.position.Y + 34f + playerOffsetHitbox; + if (sItem.type == 930) + this.itemLocation.Y = this.position.Y + 9f + playerOffsetHitbox; + 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 == 353) + { + this.itemLocation.X = this.Center.X + (float) (8 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + 11f; + } + this.itemRotation = 0.0f; + 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)) + playerOffsetHitbox; + if (sItem.type == 930) + this.itemLocation.Y -= 24f; + } + } + else if (sItem.holdStyle == 2 && !this.pulley) + { + if (sItem.type == 946) + { + 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 + playerOffsetHitbox; + 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.velocity.Y = -2f; + } + else if ((double) this.velocity.Y > 2.0) + 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 + playerOffsetHitbox; + this.itemRotation = 0.79f * (float) -this.direction; + 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)); + } + } + } + else if (sItem.holdStyle == 3 && !this.pulley && !Main.dedServ) + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - (double) Main.itemTexture[sItem.type].Width * 0.5) - (float) (this.direction * 2); + this.itemLocation.Y = this.MountedCenter.Y - (float) Main.itemTexture[sItem.type].Height * 0.5f; + this.itemRotation = 0.0f; + } + if (((sItem.type == 974 || sItem.type == 8 || sItem.type == 1245 || sItem.type == 2274 || sItem.type == 3004 || sItem.type == 3045 || sItem.type == 3114 || sItem.type >= 427 && sItem.type <= 433) && !this.wet || sItem.type == 523 || sItem.type == 1333) && !this.pulley) + { + float R = 1f; + float G = 0.95f; + float B = 0.8f; + int num13 = 0; + if (sItem.type == 523) + num13 = 8; + else if (sItem.type == 974) + num13 = 9; + else if (sItem.type == 1245) + num13 = 10; + else if (sItem.type == 1333) + num13 = 11; + else if (sItem.type == 2274) + num13 = 12; + else if (sItem.type == 3004) + num13 = 13; + else if (sItem.type == 3045) + num13 = 14; + else if (sItem.type == 3114) + num13 = 15; + else if (sItem.type >= 427) + num13 = sItem.type - 426; + switch (num13) + { + case 1: + R = 0.0f; + G = 0.1f; + B = 1.3f; + break; + case 2: + R = 1f; + G = 0.1f; + B = 0.1f; + break; + case 3: + R = 0.0f; + G = 1f; + B = 0.1f; + break; + case 4: + R = 0.9f; + G = 0.0f; + B = 0.9f; + break; + case 5: + R = 1.3f; + G = 1.3f; + B = 1.3f; + break; + case 6: + R = 0.9f; + G = 0.9f; + B = 0.0f; + break; + case 7: + 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 8: + B = 0.7f; + R = 0.85f; + G = 1f; + break; + case 9: + B = 1f; + R = 0.7f; + G = 0.85f; + break; + case 10: + B = 0.0f; + R = 1f; + G = 0.5f; + break; + case 11: + B = 0.8f; + R = 1.25f; + G = 1.25f; + break; + case 12: + R *= 0.75f; + G *= 1.35f; + B *= 1.5f; + break; + case 13: + R = 0.95f; + G = 0.65f; + B = 1.3f; + break; + case 14: + R = (float) Main.DiscoR / (float) byte.MaxValue; + G = (float) Main.DiscoG / (float) byte.MaxValue; + B = (float) Main.DiscoB / (float) byte.MaxValue; + break; + case 15: + R = 1f; + G = 0.0f; + B = 1f; + break; + } + int num14 = num13; + int Type; + switch (num14) + { + 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; + default: + Type = 58 + num14; + break; + } + 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; + int num15 = 30; + int num16 = (int) this.Center.X / 16; + int num17 = (int) this.Center.Y / 16; + for (int index11 = num16 - num15; index11 <= num16 + num15; ++index11) + { + for (int index12 = num17 - num15; index12 <= num17 + num15; ++index12) + { + if (Main.rand.Next(4) == 0 && (double) new Vector2((float) (num16 - index11), (float) (num17 - index12)).Length() < (double) num15 && index11 > 0 && index11 < Main.maxTilesX - 1 && index12 > 0 && index12 < Main.maxTilesY - 1 && Main.tile[index11, index12] != null && Main.tile[index11, index12].active()) + { + bool flag6 = false; + if (Main.tile[index11, index12].type == (ushort) 185 && Main.tile[index11, index12].frameY == (short) 18) + { + if (Main.tile[index11, index12].frameX >= (short) 576 && Main.tile[index11, index12].frameX <= (short) 882) + flag6 = true; + } + else if (Main.tile[index11, index12].type == (ushort) 186 && Main.tile[index11, index12].frameX >= (short) 864 && Main.tile[index11, index12].frameX <= (short) 1170) + flag6 = true; + if (flag6 || Main.tileSpelunker[(int) Main.tile[index11, index12].type] || Main.tileAlch[(int) Main.tile[index11, index12].type] && Main.tile[index11, index12].type != (ushort) 82) + { + int index13 = Dust.NewDust(new Vector2((float) (index11 * 16), (float) (index12 * 16)), 16, 16, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index13].fadeIn = 0.75f; + Main.dust[index13].velocity *= 0.1f; + Main.dust[index13].noLight = true; + } + } + } + } + } + } + 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); + } + this.releaseUseItem = !this.controlUseItem; + if (this.itemTime > 0) + { + --this.itemTime; + if (this.itemTime == 0 && this.whoAmI == Main.myPlayer) + { + switch (sItem.type) + { + case 65: + case 676: + case 723: + case 724: + case 989: + case 1226: + case 1227: + Main.PlaySound(25); + for (int index14 = 0; index14 < 5; ++index14) + { + int index15 = Dust.NewDust(this.position, this.width, this.height, 45, Alpha: ((int) byte.MaxValue), Scale: ((float) Main.rand.Next(20, 26) * 0.1f)); + Main.dust[index15].noLight = true; + Main.dust[index15].noGravity = true; + Main.dust[index15].velocity *= 0.5f; + } + break; + } + } + } + if (i == Main.myPlayer) + { + bool flag7 = true; + int type1 = sItem.type; + if ((type1 == 65 || type1 == 676 || type1 == 723 || type1 == 724 || type1 == 757 || type1 == 674 || type1 == 675 || type1 == 989 || type1 == 1226 || type1 == 1227) && this.itemAnimation != this.itemAnimationMax - 1) + flag7 = false; + if (type1 == 3852) + { + if (this.itemAnimation < this.itemAnimationMax - 12) + flag7 = false; + if (this.altFunctionUse == 2 && this.itemAnimation != this.itemAnimationMax - 1) + flag7 = false; + } + if (sItem.shoot > 0 && ProjectileID.Sets.TurretFeature[sItem.shoot] && this.altFunctionUse == 2 && flag7 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + 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(); + } + } + if (sItem.shoot > 0 && ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] && this.altFunctionUse == 2 && flag7 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + this.MinionNPCTargetAim(); + } + if (((sItem.shoot <= 0 || this.itemAnimation <= 0 ? 0 : (this.itemTime == 0 ? 1 : 0)) & (flag7 ? 1 : 0)) != 0) + { + int shoot = sItem.shoot; + float speed = sItem.shootSpeed; + if (this.inventory[this.selectedItem].thrown && (double) speed < 16.0) + { + speed *= this.thrownVelocity; + if ((double) speed > 16.0) + speed = 16f; + } + if (sItem.melee && shoot != 25 && shoot != 26 && shoot != 35) + speed /= this.meleeSpeed; + bool canShoot = false; + int Damage = weaponDamage; + float knockBack = sItem.knockBack; + if (shoot == 13 || shoot == 32 || shoot == 315 || shoot >= 230 && shoot <= 235 || shoot == 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 shoot, ref speed, ref canShoot, ref Damage, ref knockBack, ItemID.Sets.gunProj[sItem.type]); + else + canShoot = true; + if (ItemID.Sets.gunProj[sItem.type]) + { + knockBack = sItem.knockBack; + Damage = weaponDamage; + speed = sItem.shootSpeed; + } + if (sItem.type == 71) + canShoot = false; + if (sItem.type == 72) + canShoot = false; + if (sItem.type == 73) + canShoot = false; + if (sItem.type == 74) + canShoot = false; + if (sItem.type == 1254 && shoot == 14) + shoot = 242; + if (sItem.type == 1255 && shoot == 14) + shoot = 242; + if (sItem.type == 1265 && shoot == 14) + shoot = 242; + if (sItem.type == 3542) + { + if (Main.rand.Next(100) < 20) + { + ++shoot; + Damage *= 3; + } + else + --speed; + } + if (shoot == 73) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i) + { + if (Main.projectile[index].type == 73) + shoot = 74; + if (shoot == 74 && Main.projectile[index].type == 74) + canShoot = false; + } + } + } + if (canShoot) + { + float num18 = this.GetWeaponKnockback(sItem, knockBack); + if (shoot == 228) + num18 = 0.0f; + if (shoot == 1 && sItem.type == 120) + shoot = 2; + if (sItem.type == 682) + shoot = 117; + if (sItem.type == 725) + shoot = 120; + if (sItem.type == 2796) + shoot = 442; + if (sItem.type == 2223) + shoot = 357; + this.itemTime = sItem.useTime; + Vector2 vector2_1 = this.RotatedRelativePoint(this.MountedCenter); + bool flag8 = true; + if (sItem.type == 3611) + flag8 = false; + Vector2 vector2_2 = Vector2.UnitX.RotatedBy((double) this.fullRotation); + Vector2 v1 = Main.MouseWorld - vector2_1; + Vector2 vector2_3 = this.itemRotation.ToRotationVector2() * (float) this.direction; + if (sItem.type == 3852 && this.itemAnimation != this.itemAnimationMax - 1) + v1 = vector2_3; + if (v1 != Vector2.Zero) + v1.Normalize(); + Vector2 vector2_4 = v1; + float num19 = Vector2.Dot(vector2_2, vector2_4); + if (flag8) + { + if ((double) num19 > 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_5 = v1; + if (vector2_5 != Vector2.Zero) + vector2_5.Normalize(); + vector2_1 += vector2_5; + } + if (sItem.type == 3827) + vector2_1 += v1.SafeNormalize(Vector2.Zero).RotatedBy((double) this.direction * -1.57079637050629) * 24f; + if (shoot == 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); + num18 = 0.0f; + Damage *= 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 -= 1f * 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_6 = vector2_3; + f1 = vector2_6.X; + f2 = vector2_6.Y; + } + if ((double) this.gravDir == -1.0) + f2 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2_1.Y; + float num20 = (float) Math.Sqrt((double) f1 * (double) f1 + (double) f2 * (double) f2); + float num21 = num20; + float num22; + if (float.IsNaN(f1) && float.IsNaN(f2) || (double) f1 == 0.0 && (double) f2 == 0.0) + { + f1 = (float) this.direction; + f2 = 0.0f; + num22 = speed; + } + else + num22 = speed / num20; + if (sItem.type == 1929 || sItem.type == 2270) + { + f1 += (float) Main.rand.Next(-50, 51) * 0.03f / num22; + f2 += (float) Main.rand.Next(-50, 51) * 0.03f / num22; + } + float num23 = f1 * num22; + float num24 = f2 * num22; + if (sItem.type == 757) + Damage = (int) ((double) Damage * 1.25); + if (shoot == 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 (shoot == 12) + { + vector2_1.X += num23 * 3f; + vector2_1.Y += num24 * 3f; + } + if (sItem.useStyle == 5) + { + if (sItem.type == 3029) + { + Vector2 vector2_7 = new Vector2(num23, num24); + 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); + } + 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) num24 * (double) this.direction, (double) num23 * (double) this.direction) - this.fullRotation; + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + } + if (shoot == 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 (shoot == 76) + { + shoot += Main.rand.Next(3); + float num25 = num21 / (float) (Main.screenHeight / 2); + if ((double) num25 > 1.0) + num25 = 1f; + float num26 = num23 + (float) Main.rand.Next(-40, 41) * 0.01f; + float num27 = num24 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedX = num26 * (num25 + 0.25f); + float SpeedY = num27 * (num25 + 0.25f); + int number = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + Main.projectile[number].ai[1] = 1f; + float num28 = (float) ((double) num25 * 2.0 - 1.0); + if ((double) num28 < -1.0) + num28 = -1f; + if ((double) num28 > 1.0) + num28 = 1f; + Main.projectile[number].ai[0] = num28; + NetMessage.SendData(27, number: number); + } + else if (sItem.type == 3029) + { + int num29 = 3; + if (Main.rand.Next(3) == 0) + ++num29; + for (int index16 = 0; index16 < num29; ++index16) + { + 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 * index16); + float num30 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num31 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) num31 < 0.0) + num31 *= -1f; + if ((double) num31 < 20.0) + num31 = 20f; + float num32 = (float) Math.Sqrt((double) num30 * (double) num30 + (double) num31 * (double) num31); + float num33 = speed / num32; + float num34 = num30 * num33; + float num35 = num31 * num33; + float num36 = num34 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedY = num35 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedX = num36 * ((float) Main.rand.Next(75, 150) * 0.01f); + vector2_1.X += (float) Main.rand.Next(-50, 51); + int index17 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + Main.projectile[index17].noDropItem = true; + } + } + else if (sItem.type == 98 || sItem.type == 533) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedY = num24 + (float) Main.rand.Next(-40, 41) * 0.01f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 1319) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num24 + (float) Main.rand.Next(-40, 41) * 0.02f; + int index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + Main.projectile[index].ranged = true; + Main.projectile[index].thrown = false; + } + else if (sItem.type == 3107) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num24 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 3053) + { + Vector2 vector2_8 = new Vector2(num23, num24); + vector2_8.Normalize(); + Vector2 vector2_9 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_9.Normalize(); + Vector2 vector2_10 = vector2_8 * 4f + vector2_9; + vector2_10.Normalize(); + vector2_10 *= 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_10.X, vector2_10.Y, shoot, Damage, num18, i, ai0, ai1); + } + else if (sItem.type == 3019) + { + Vector2 vector2_11 = new Vector2(num23, num24); + float num37 = vector2_11.Length(); + vector2_11.X += (float) ((double) Main.rand.Next(-100, 101) * 0.00999999977648258 * (double) num37 * 0.150000005960464); + vector2_11.Y += (float) ((double) Main.rand.Next(-100, 101) * 0.00999999977648258 * (double) num37 * 0.150000005960464); + float num38 = num23 + (float) Main.rand.Next(-40, 41) * 0.03f; + float num39 = num24 + (float) Main.rand.Next(-40, 41) * 0.03f; + vector2_11.Normalize(); + Vector2 vector2_12 = vector2_11 * num37; + Vector2 vector2_13 = new Vector2(num38 * ((float) Main.rand.Next(50, 150) * 0.01f), num39 * ((float) Main.rand.Next(50, 150) * 0.01f)); + vector2_13.X += (float) Main.rand.Next(-100, 101) * 0.025f; + vector2_13.Y += (float) Main.rand.Next(-100, 101) * 0.025f; + vector2_13.Normalize(); + Vector2 vector2_14 = vector2_13 * num37; + float x = vector2_14.X; + float y = vector2_14.Y; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, x, y, shoot, Damage, num18, i, vector2_12.X, vector2_12.Y); + } + else if (sItem.type == 2797) + { + Vector2 vector2_15 = Vector2.Normalize(new Vector2(num23, num24)) * 40f * sItem.scale; + if (Collision.CanHit(vector2_1, 0, 0, vector2_1 + vector2_15, 0, 0)) + vector2_1 += vector2_15; + float rotation = new Vector2(num23, num24).ToRotation(); + float num40 = 2.094395f; + int num41 = Main.rand.Next(4, 5); + if (Main.rand.Next(4) == 0) + ++num41; + for (int index18 = 0; index18 < num41; ++index18) + { + float num42 = (float) (Main.rand.NextDouble() * 0.200000002980232 + 0.0500000007450581); + Vector2 vector2_16 = new Vector2(num23, num24).RotatedBy((double) num40 * Main.rand.NextDouble() - (double) num40 / 2.0) * num42; + int index19 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_16.X, vector2_16.Y, 444, Damage, num18, i, rotation); + Main.projectile[index19].localAI[0] = (float) shoot; + Main.projectile[index19].localAI[1] = speed; + } + } + else if (sItem.type == 2270) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num24 + (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, shoot, Damage, num18, i); + } + else if (sItem.type == 1930) + { + int num43 = 2 + Main.rand.Next(3); + for (int index = 0; index < num43; ++index) + { + float num44 = num23; + float num45 = num24; + float num46 = 0.025f * (float) index; + float num47 = num44 + (float) Main.rand.Next(-35, 36) * num46; + float num48 = num45 + (float) Main.rand.Next(-35, 36) * num46; + float num49 = (float) Math.Sqrt((double) num47 * (double) num47 + (double) num48 * (double) num48); + float num50 = speed / num49; + float SpeedX = num47 * num50; + float SpeedY = num48 * num50; + Projectile.NewProjectile(vector2_1.X + (float) ((double) num23 * (double) (num43 - index) * 1.75), vector2_1.Y + (float) ((double) num24 * (double) (num43 - index) * 1.75), SpeedX, SpeedY, shoot, Damage, num18, i, (float) Main.rand.Next(0, 10 * (index + 1))); + } + } + else if (sItem.type == 1931) + { + int num51 = 2; + for (int index = 0; index < num51; ++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 num52 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num53 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) num53 < 0.0) + num53 *= -1f; + if ((double) num53 < 20.0) + num53 = 20f; + float num54 = (float) Math.Sqrt((double) num52 * (double) num52 + (double) num53 * (double) num53); + float num55 = speed / num54; + float num56 = num52 * num55; + float num57 = num53 * num55; + float SpeedX = num56 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num57 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i, ai1: ((float) Main.rand.Next(5))); + } + } + else if (sItem.type == 2750) + { + int num58 = 1; + for (int index = 0; index < num58; ++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 num59 = (float) ((double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2_1.X + (double) Main.rand.Next(-40, 41) * 0.0299999993294477); + float num60 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) num60 < 0.0) + num60 *= -1f; + if ((double) num60 < 20.0) + num60 = 20f; + float num61 = (float) Math.Sqrt((double) num59 * (double) num59 + (double) num60 * (double) num60); + float num62 = speed / num61; + float num63 = num59 * num62; + float num64 = num60 * num62; + float num65 = num63; + float num66 = num64 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num65 * 0.75f, num66 * 0.75f, shoot + Main.rand.Next(3), Damage, num18, i, ai1: ((float) (0.5 + Main.rand.NextDouble() * 0.300000011920929))); + } + } + else if (sItem.type == 3570) + { + int num67 = 3; + for (int index = 0; index < num67; ++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 num68 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num69 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + float ai1 = num69 + vector2_1.Y; + if ((double) num69 < 0.0) + num69 *= -1f; + if ((double) num69 < 20.0) + num69 = 20f; + float num70 = (float) Math.Sqrt((double) num68 * (double) num68 + (double) num69 * (double) num69); + float num71 = speed / num70; + Vector2 vector2_17 = new Vector2(num68 * num71, num69 * num71) / 2f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_17.X, vector2_17.Y, shoot, Damage, num18, i, ai1: ai1); + } + } + else if (sItem.type == 3065) + { + Vector2 vector2_18 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + float ai1 = vector2_18.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_19 = vector2_18 - vector2_1; + if ((double) vector2_19.Y < 0.0) + vector2_19.Y *= -1f; + if ((double) vector2_19.Y < 20.0) + vector2_19.Y = 20f; + vector2_19.Normalize(); + Vector2 vector2_20 = vector2_19 * speed; + float x = vector2_20.X; + float y = vector2_20.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, shoot, Damage * 2, num18, i, ai1: ai1); + } + } + else if (sItem.type == 2624) + { + float num72 = 0.3141593f; + int num73 = 5; + Vector2 spinningpoint = new Vector2(num23, num24); + spinningpoint.Normalize(); + spinningpoint *= 40f; + bool flag9 = Collision.CanHit(vector2_1, 0, 0, vector2_1 + spinningpoint, 0, 0); + for (int index20 = 0; index20 < num73; ++index20) + { + float num74 = (float) index20 - (float) (((double) num73 - 1.0) / 2.0); + Vector2 vector2_21 = spinningpoint.RotatedBy((double) num72 * (double) num74); + if (!flag9) + vector2_21 -= spinningpoint; + int index21 = Projectile.NewProjectile(vector2_1.X + vector2_21.X, vector2_1.Y + vector2_21.Y, num23, num24, shoot, Damage, num18, i); + Main.projectile[index21].noDropItem = true; + } + } + else if (sItem.type == 1929) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedY = num24 + (float) Main.rand.Next(-40, 41) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 1553) + { + float SpeedX = num23 + (float) Main.rand.Next(-40, 41) * 0.005f; + float SpeedY = num24 + (float) Main.rand.Next(-40, 41) * 0.005f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 518) + { + float num75 = num23; + float num76 = num24; + float SpeedX = num75 + (float) Main.rand.Next(-40, 41) * 0.04f; + float SpeedY = num76 + (float) Main.rand.Next(-40, 41) * 0.04f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 1265) + { + float num77 = num23; + float num78 = num24; + float SpeedX = num77 + (float) Main.rand.Next(-30, 31) * 0.03f; + float SpeedY = num78 + (float) Main.rand.Next(-30, 31) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 534) + { + int num79 = Main.rand.Next(4, 6); + for (int index = 0; index < num79; ++index) + { + float num80 = num23; + float num81 = num24; + float SpeedX = num80 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num81 + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 2188) + { + int num82 = 4; + if (Main.rand.Next(3) == 0) + ++num82; + if (Main.rand.Next(4) == 0) + ++num82; + if (Main.rand.Next(5) == 0) + ++num82; + for (int index = 0; index < num82; ++index) + { + float num83 = num23; + float num84 = num24; + float num85 = 0.05f * (float) index; + float num86 = num83 + (float) Main.rand.Next(-35, 36) * num85; + float num87 = num84 + (float) Main.rand.Next(-35, 36) * num85; + float num88 = (float) Math.Sqrt((double) num86 * (double) num86 + (double) num87 * (double) num87); + float num89 = speed / num88; + float SpeedX = num86 * num89; + float SpeedY = num87 * num89; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 1308) + { + int num90 = 3; + if (Main.rand.Next(3) == 0) + ++num90; + for (int index = 0; index < num90; ++index) + { + float num91 = num23; + float num92 = num24; + float num93 = 0.05f * (float) index; + float num94 = num91 + (float) Main.rand.Next(-35, 36) * num93; + float num95 = num92 + (float) Main.rand.Next(-35, 36) * num93; + float num96 = (float) Math.Sqrt((double) num94 * (double) num94 + (double) num95 * (double) num95); + float num97 = speed / num96; + float SpeedX = num94 * num97; + float SpeedY = num95 * num97; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 1258) + { + float num98 = num23; + float num99 = num24; + float SpeedX = num98 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedY = num99 + (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, shoot, Damage, num18, i); + } + else if (sItem.type == 964) + { + int num100 = Main.rand.Next(3, 5); + for (int index = 0; index < num100; ++index) + { + float num101 = num23; + float num102 = num24; + float SpeedX = num101 + (float) Main.rand.Next(-35, 36) * 0.04f; + float SpeedY = num102 + (float) Main.rand.Next(-35, 36) * 0.04f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 1569) + { + int num103 = 4; + if (Main.rand.Next(2) == 0) + ++num103; + if (Main.rand.Next(4) == 0) + ++num103; + if (Main.rand.Next(8) == 0) + ++num103; + if (Main.rand.Next(16) == 0) + ++num103; + for (int index = 0; index < num103; ++index) + { + float num104 = num23; + float num105 = num24; + float num106 = 0.05f * (float) index; + float num107 = num104 + (float) Main.rand.Next(-35, 36) * num106; + float num108 = num105 + (float) Main.rand.Next(-35, 36) * num106; + float num109 = (float) Math.Sqrt((double) num107 * (double) num107 + (double) num108 * (double) num108); + float num110 = speed / num109; + float SpeedX = num107 * num110; + float SpeedY = num108 * num110; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 1572 || sItem.type == 2366 || sItem.type == 3571 || sItem.type == 3569) + { + int num111 = sItem.type == 3571 ? 1 : (sItem.type == 3569 ? 1 : 0); + int i2 = (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 (num111 == 0) + { + while (j < Main.maxTilesY - 10 && Main.tile[i2, j] != null && !WorldGen.SolidTile2(i2, j) && Main.tile[i2 - 1, j] != null && !WorldGen.SolidTile2(i2 - 1, j) && Main.tile[i2 + 1, j] != null && !WorldGen.SolidTile2(i2 + 1, j)) + ++j; + --j; + } + Projectile.NewProjectile((float) Main.mouseX + Main.screenPosition.X, (float) (j * 16 - 24), 0.0f, 15f, shoot, Damage, num18, i); + this.UpdateMaxTurrets(); + } + else if (sItem.type == 1244 || sItem.type == 1256) + { + int index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot, Damage, num18, 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 num112 = Main.rand.Next(2, 4); + if (Main.rand.Next(5) == 0) + ++num112; + for (int index22 = 0; index22 < num112; ++index22) + { + float SpeedX = num23; + float SpeedY = num24; + if (index22 > 0) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + if (index22 > 1) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + if (index22 > 2) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + int index23 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + Main.projectile[index23].noDropItem = true; + } + } + else if (sItem.type == 1121) + { + int num113 = Main.rand.Next(1, 4); + if (Main.rand.Next(6) == 0) + ++num113; + if (Main.rand.Next(6) == 0) + ++num113; + if (this.strongBees && Main.rand.Next(3) == 0) + ++num113; + for (int index24 = 0; index24 < num113; ++index24) + { + float num114 = num23; + float num115 = num24; + float SpeedX = num114 + (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedY = num115 + (float) Main.rand.Next(-35, 36) * 0.02f; + int index25 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, this.beeType(), this.beeDamage(Damage), this.beeKB(num18), i); + Main.projectile[index25].magic = true; + } + } + else if (sItem.type == 1155) + { + int num116 = Main.rand.Next(2, 5); + if (Main.rand.Next(5) == 0) + ++num116; + if (Main.rand.Next(5) == 0) + ++num116; + for (int index = 0; index < num116; ++index) + { + float num117 = num23; + float num118 = num24; + float SpeedX = num117 + (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedY = num118 + (float) Main.rand.Next(-35, 36) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 1801) + { + int num119 = Main.rand.Next(1, 4); + for (int index = 0; index < num119; ++index) + { + float num120 = num23; + float num121 = num24; + float SpeedX = num120 + (float) Main.rand.Next(-35, 36) * 0.05f; + float SpeedY = num121 + (float) Main.rand.Next(-35, 36) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 679) + { + for (int index = 0; index < 6; ++index) + { + float num122 = num23; + float num123 = num24; + float SpeedX = num122 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num123 + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 2623) + { + for (int index = 0; index < 3; ++index) + { + float num124 = num23; + float num125 = num24; + float SpeedX = num124 + (float) Main.rand.Next(-40, 41) * 0.1f; + float SpeedY = num125 + (float) Main.rand.Next(-40, 41) * 0.1f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + } + else if (sItem.type == 3210) + { + Vector2 vector2_22 = new Vector2(num23, num24); + vector2_22.X += (float) Main.rand.Next(-30, 31) * 0.04f; + vector2_22.Y += (float) Main.rand.Next(-30, 31) * 0.03f; + vector2_22.Normalize(); + Vector2 vector2_23 = vector2_22 * ((float) Main.rand.Next(70, 91) * 0.1f); + vector2_23.X += (float) Main.rand.Next(-30, 31) * 0.04f; + vector2_23.Y += (float) Main.rand.Next(-30, 31) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_23.X, vector2_23.Y, shoot, Damage, num18, i, (float) Main.rand.Next(20)); + } + else if (sItem.type == 434) + { + float SpeedX = num23; + float SpeedY = num24; + if (this.itemAnimation < 5) + { + float num126 = SpeedX + (float) Main.rand.Next(-40, 41) * 0.01f; + float num127 = SpeedY + (float) Main.rand.Next(-40, 41) * 0.01f; + SpeedX = num126 * 1.1f; + SpeedY = num127 * 1.1f; + } + else if (this.itemAnimation < 10) + { + float num128 = SpeedX + (float) Main.rand.Next(-20, 21) * 0.01f; + float num129 = SpeedY + (float) Main.rand.Next(-20, 21) * 0.01f; + SpeedX = num128 * 1.05f; + SpeedY = num129 * 1.05f; + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 1157) + { + shoot = Main.rand.Next(191, 195); + 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 index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + Main.projectile[index].localAI[0] = 30f; + } + else if (sItem.type == 1802) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 2364 || sItem.type == 2365) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 2535) + { + float x = 0.0f; + float y = 0.0f; + vector2_1.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_1.Y = (float) Main.mouseY + Main.screenPosition.Y; + Vector2 spinningpoint = new Vector2(x, y).RotatedBy(1.57079637050629); + Projectile.NewProjectile(vector2_1.X + spinningpoint.X, vector2_1.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, shoot, Damage, num18, i); + Vector2 vector2_24 = spinningpoint.RotatedBy(-3.14159274101257); + Projectile.NewProjectile(vector2_1.X + vector2_24.X, vector2_1.Y + vector2_24.Y, vector2_24.X, vector2_24.Y, shoot + 1, Damage, num18, i); + } + else if (sItem.type == 2551) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot + Main.rand.Next(3), Damage, num18, i); + } + else if (sItem.type == 2584) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot + Main.rand.Next(3), Damage, num18, i); + } + else if (sItem.type == 2621) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 2749 || sItem.type == 3249 || sItem.type == 3474) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + else if (sItem.type == 3531) + { + int num130 = -1; + int index26 = -1; + for (int index27 = 0; index27 < 1000; ++index27) + { + if (Main.projectile[index27].active && Main.projectile[index27].owner == Main.myPlayer) + { + if (num130 == -1 && Main.projectile[index27].type == 625) + num130 = index27; + if (index26 == -1 && Main.projectile[index27].type == 628) + index26 = index27; + if (num130 != -1 && index26 != -1) + break; + } + } + if (num130 == -1 && index26 == -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 num131 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + int num132 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot + 1, Damage, num18, i, (float) num131); + int index28 = num132; + int num133 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot + 2, Damage, num18, i, (float) num132); + Main.projectile[index28].localAI[1] = (float) num133; + int index29 = num133; + int num134 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot + 3, Damage, num18, i, (float) num133); + Main.projectile[index29].localAI[1] = (float) num134; + } + else if (num130 != -1 && index26 != -1) + { + int num135 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot + 1, Damage, num18, i, (float) Projectile.GetByUUID(Main.myPlayer, Main.projectile[index26].ai[0])); + int index30 = num135; + int index31 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot + 2, Damage, num18, i, (float) num135); + Main.projectile[index30].localAI[1] = (float) index31; + Main.projectile[index30].netUpdate = true; + Main.projectile[index30].ai[1] = 1f; + Main.projectile[index31].localAI[1] = (float) index26; + Main.projectile[index31].netUpdate = true; + Main.projectile[index31].ai[1] = 1f; + Main.projectile[index26].ai[0] = (float) Main.projectile[index31].projUUID; + Main.projectile[index26].netUpdate = true; + Main.projectile[index26].ai[1] = 1f; + } + } + else if (sItem.type == 1309) + { + 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; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, shoot, Damage, num18, i); + } + 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, num23, num24, shoot, Damage, num18, i); + } + else if (sItem.type == 3006) + { + Vector2 vector2_25; + vector2_25.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_25.Y = (float) Main.mouseY + Main.screenPosition.Y; + while (Collision.CanHitLine(this.position, this.width, this.height, vector2_1, 1, 1)) + { + vector2_1.X += num23; + vector2_1.Y += num24; + if ((double) (vector2_1 - vector2_25).Length() < 20.0 + (double) Math.Abs(num23) + (double) Math.Abs(num24)) + { + vector2_1 = vector2_25; + break; + } + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, 0.0f, 0.0f, shoot, Damage, num18, i); + } + else if (sItem.type == 3014) + { + Vector2 vector2_26; + vector2_26.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_26.Y = (float) Main.mouseY + Main.screenPosition.Y; + while (Collision.CanHitLine(this.position, this.width, this.height, vector2_1, 1, 1)) + { + vector2_1.X += num23; + vector2_1.Y += num24; + if ((double) (vector2_1 - vector2_26).Length() < 20.0 + (double) Math.Abs(num23) + (double) Math.Abs(num24)) + { + vector2_1 = vector2_26; + break; + } + } + bool flag10 = false; + int j1 = (int) vector2_1.Y / 16; + int i3 = (int) vector2_1.X / 16; + int num136 = j1; + while (j1 < Main.maxTilesY - 10 && j1 - num136 < 30 && !WorldGen.SolidTile(i3, j1) && !TileID.Sets.Platforms[(int) Main.tile[i3, j1].type]) + ++j1; + if (!WorldGen.SolidTile(i3, j1) && !TileID.Sets.Platforms[(int) Main.tile[i3, j1].type]) + flag10 = true; + float num137 = (float) (j1 * 16); + int j2 = num136; + while (j2 > 10 && num136 - j2 < 30 && !WorldGen.SolidTile(i3, j2)) + --j2; + float num138 = (float) (j2 * 16 + 16); + float ai1 = num137 - num138; + int num139 = 10; + if ((double) ai1 > (double) (16 * num139)) + ai1 = (float) (16 * num139); + float ai0 = num137 - ai1; + vector2_1.X = (float) ((int) ((double) vector2_1.X / 16.0) * 16); + if (!flag10) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, 0.0f, 0.0f, shoot, Damage, num18, i, ai0, ai1); + } + else if (sItem.type == 3384) + { + int num140 = this.altFunctionUse == 2 ? 1 : 0; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot, Damage, num18, i, ai1: ((float) num140)); + } + else if (sItem.type == 3473) + { + float ai1 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.785398185253143); + Vector2 vector2_27 = new Vector2(num23, num24); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_27.X, vector2_27.Y, shoot, Damage, num18, i, ai1: ai1); + } + else if (sItem.type == 3836) + { + float ai0 = (float) ((double) Main.rand.NextFloat() * (double) speed * 0.75) * (float) this.direction; + Vector2 velocity = new Vector2(num23, num24); + Projectile.NewProjectile(vector2_1, velocity, shoot, Damage, num18, i, ai0); + } + else if (sItem.type == 3858) + { + int num141 = this.altFunctionUse == 2 ? 1 : 0; + Vector2 velocity1 = new Vector2(num23, num24); + if (num141 != 0) + { + Vector2 velocity2 = velocity1 * 1.5f; + float ai0 = (float) ((0.300000011920929 + 0.699999988079071 * (double) Main.rand.NextFloat()) * (double) speed * 1.75) * (float) this.direction; + Projectile.NewProjectile(vector2_1, velocity2, 708, (int) ((double) Damage * 0.75), num18 + 4f, i, ai0); + } + else + Projectile.NewProjectile(vector2_1, velocity1, shoot, Damage, num18, i); + } + else if (sItem.type == 3859) + { + Vector2 vector2_28 = new Vector2(num23, num24); + shoot = 710; + Damage = (int) ((double) Damage * 0.699999988079071); + Vector2 v2 = vector2_28 * 0.8f; + Vector2 vector2_29 = v2.SafeNormalize(-Vector2.UnitY); + float num142 = (float) Math.PI / 180f * (float) -this.direction; + for (float num143 = -2.5f; (double) num143 < 3.0; ++num143) + Projectile.NewProjectile(vector2_1, (v2 + vector2_29 * num143 * 0.5f).RotatedBy((double) num143 * (double) num142), shoot, Damage, num18, i); + } + else if (sItem.type == 3870) + { + Vector2 vector2_30 = Vector2.Normalize(new Vector2(num23, num24)) * 40f * sItem.scale; + if (Collision.CanHit(vector2_1, 0, 0, vector2_1 + vector2_30, 0, 0)) + vector2_1 += vector2_30; + Vector2 v3 = new Vector2(num23, num24) * 0.8f; + Vector2 vector2_31 = v3.SafeNormalize(-Vector2.UnitY); + float num144 = (float) Math.PI / 180f * (float) -this.direction; + for (int index = 0; index <= 2; ++index) + Projectile.NewProjectile(vector2_1, (v3 + vector2_31 * (float) index * 1f).RotatedBy((double) index * (double) num144), shoot, Damage, num18, i); + } + else if (sItem.type == 3542) + { + float num145 = (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(num23, num24).RotatedBy((double) num145) * 100f, 0, 0); ++index) + num145 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.785398185253143 * 0.699999988079071); + Vector2 vector2_32 = new Vector2(num23, num24).RotatedBy((double) num145) * (float) (0.949999988079071 + (double) Main.rand.NextFloat() * 0.300000011920929); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_32.X, vector2_32.Y, shoot, Damage, num18, i); + } + else if (sItem.type == 3779) + { + float num146 = Main.rand.NextFloat() * 6.283185f; + for (int index = 0; index < 10 && !Collision.CanHit(vector2_1, 0, 0, vector2_1 + new Vector2(num23, num24).RotatedBy((double) num146) * 100f, 0, 0); ++index) + num146 = Main.rand.NextFloat() * 6.283185f; + Vector2 vector2_33 = new Vector2(num23, num24).RotatedBy((double) num146) * (float) (0.949999988079071 + (double) Main.rand.NextFloat() * 0.300000011920929); + Projectile.NewProjectile(vector2_1 + vector2_33 * 30f, Vector2.Zero, shoot, Damage, num18, i, -2f); + } + else if (sItem.type == 3787) + { + float f3 = Main.rand.NextFloat() * 6.283185f; + float num147 = 20f; + float num148 = 60f; + Vector2 position = vector2_1 + f3.ToRotationVector2() * MathHelper.Lerp(num147, num148, Main.rand.NextFloat()); + for (int index = 0; index < 50; ++index) + { + position = vector2_1 + f3.ToRotationVector2() * MathHelper.Lerp(num147, num148, 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 v4 = Main.MouseWorld - position; + Vector2 defaultValue = new Vector2(num23, num24).SafeNormalize(Vector2.UnitY) * speed; + Vector2 velocity = Vector2.Lerp(v4.SafeNormalize(defaultValue) * speed, defaultValue, 0.25f); + Projectile.NewProjectile(position, velocity, shoot, Damage, num18, i); + } + else if (sItem.type == 3788) + { + Vector2 v5 = new Vector2(num23, num24); + float num149 = 0.7853982f; + for (int index = 0; index < 2; ++index) + { + Projectile.NewProjectile(vector2_1, v5 + v5.SafeNormalize(Vector2.Zero).RotatedBy((double) num149 * ((double) Main.rand.NextFloat() * 0.5 + 0.5)) * Main.rand.NextFloatDirection() * 2f, shoot, Damage, num18, i); + Projectile.NewProjectile(vector2_1, v5 + v5.SafeNormalize(Vector2.Zero).RotatedBy(-(double) num149 * ((double) Main.rand.NextFloat() * 0.5 + 0.5)) * Main.rand.NextFloatDirection() * 2f, shoot, Damage, num18, i); + } + Projectile.NewProjectile(vector2_1, v5.SafeNormalize(Vector2.UnitX * (float) this.direction) * (speed * 1.3f), 661, Damage * 2, num18, i); + } + else if (sItem.type == 3475) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, 615, Damage, num18, i, (float) (5 * Main.rand.Next(0, 20))); + else if (sItem.type == 3540) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, 630, Damage, num18, i); + else if (sItem.type == 3854) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, 705, Damage, num18, i); + else if (sItem.type == 3546) + { + for (int index = 0; index < 2; ++index) + { + float num150 = num23; + float num151 = num24; + float num152 = num150 + (float) Main.rand.Next(-40, 41) * 0.05f; + float num153 = num151 + (float) Main.rand.Next(-40, 41) * 0.05f; + Vector2 vector2_34 = vector2_1 + Vector2.Normalize(new Vector2(num152, num153).RotatedBy(-1.57079637050629 * (double) this.direction)) * 6f; + Projectile.NewProjectile(vector2_34.X, vector2_34.Y, num152, num153, 167 + Main.rand.Next(4), Damage, num18, i, ai1: 1f); + } + } + else if (sItem.type == 3350) + { + float num154 = num23; + float num155 = num24; + float num156 = num154 + (float) Main.rand.Next(-1, 2) * 0.5f; + float num157 = num155 + (float) Main.rand.Next(-1, 2) * 0.5f; + if (Collision.CanHitLine(this.Center, 0, 0, vector2_1 + new Vector2(num156, num157) * 2f, 0, 0)) + vector2_1 += new Vector2(num156, num157); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y - this.gravDir * 4f, num156, num157, shoot, Damage, num18, 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 * speed, 0.0f, 704, Damage * 2, num18, i); + else + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot, Damage, num18, 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); + Projectile.NewProjectile((float) worldX, (float) (worldY - pushYUp), 0.0f, 0.0f, shoot, Damage, num18, i); + this.UpdateMaxTurrets(); + } + else + { + int index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num23, num24, shoot, Damage, num18, i); + if (sItem.type == 726) + Main.projectile[index].magic = true; + if (sItem.type == 724 || sItem.type == 676) + Main.projectile[index].melee = true; + if (shoot == 80) + { + Main.projectile[index].ai[0] = (float) Player.tileTargetX; + Main.projectile[index].ai[1] = (float) Player.tileTargetY; + } + if (shoot == 442) + { + Main.projectile[index].ai[0] = (float) Player.tileTargetX; + Main.projectile[index].ai[1] = (float) Player.tileTargetY; + } + if ((this.thrownCost50 || this.thrownCost33) && this.inventory[this.selectedItem].thrown) + Main.projectile[index].noDropItem = true; + if (Main.projectile[index].aiStyle == 99) + AchievementsHelper.HandleSpecialEvent(this, 7); + } + } + else if (sItem.useStyle == 5) + { + this.itemRotation = 0.0f; + NetMessage.SendData(41, number: this.whoAmI); + } + } + if (this.whoAmI == Main.myPlayer && (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) + { + if (!Main.GamepadDisableCursorItemIcon) + { + this.showItemIcon = true; + Main.ItemIconCacheUpdate(sItem.type); + } + if (this.itemAnimation > 0 && this.itemTime == 0 && this.controlUseItem) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (sItem.type == 509) + { + int index32 = -1; + for (int index33 = 0; index33 < 58; ++index33) + { + if (this.inventory[index33].stack > 0 && this.inventory[index33].type == 530) + { + index32 = index33; + break; + } + } + if (index32 >= 0 && WorldGen.PlaceWire(tileTargetX, tileTargetY)) + { + --this.inventory[index32].stack; + if (this.inventory[index32].stack <= 0) + this.inventory[index32].SetDefaults(); + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 5, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + else if (sItem.type == 850) + { + int index34 = -1; + for (int index35 = 0; index35 < 58; ++index35) + { + if (this.inventory[index35].stack > 0 && this.inventory[index35].type == 530) + { + index34 = index35; + break; + } + } + if (index34 >= 0 && WorldGen.PlaceWire2(tileTargetX, tileTargetY)) + { + --this.inventory[index34].stack; + if (this.inventory[index34].stack <= 0) + this.inventory[index34].SetDefaults(); + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 10, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + if (sItem.type == 851) + { + int index36 = -1; + for (int index37 = 0; index37 < 58; ++index37) + { + if (this.inventory[index37].stack > 0 && this.inventory[index37].type == 530) + { + index36 = index37; + break; + } + } + if (index36 >= 0 && WorldGen.PlaceWire3(tileTargetX, tileTargetY)) + { + --this.inventory[index36].stack; + if (this.inventory[index36].stack <= 0) + this.inventory[index36].SetDefaults(); + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 12, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + if (sItem.type == 3612) + { + int index38 = -1; + for (int index39 = 0; index39 < 58; ++index39) + { + if (this.inventory[index39].stack > 0 && this.inventory[index39].type == 530) + { + index38 = index39; + break; + } + } + if (index38 >= 0 && WorldGen.PlaceWire4(tileTargetX, tileTargetY)) + { + --this.inventory[index38].stack; + if (this.inventory[index38].stack <= 0) + this.inventory[index38].SetDefaults(); + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 16, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + else if (sItem.type == 510) + { + if (WorldGen.KillActuator(tileTargetX, tileTargetY)) + { + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 9, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire4(tileTargetX, tileTargetY)) + { + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire3(tileTargetX, tileTargetY)) + { + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 13, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire2(tileTargetX, tileTargetY)) + { + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 11, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire(tileTargetX, tileTargetY)) + { + this.itemTime = sItem.useTime; + 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.itemTime = sItem.useTime; + 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 flag11 = tile.inActive(); + if ((!this.ActuationRodLock || this.ActuationRodLockSetting == tile.inActive()) && Wiring.Actuate(tileTargetX, tileTargetY) && flag11 != tile.inActive()) + { + this.ActuationRodLock = true; + this.ActuationRodLockSetting = !tile.inActive(); + this.itemTime = sItem.useTime; + NetMessage.SendData(17, number: 19, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + } + if (sItem.type == 3625) + { + Point point = new Point(Player.tileTargetX, Player.tileTargetY); + this.itemTime = sItem.useTime; + 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; + } + } + } + if (this.itemAnimation > 0 && this.itemTime == 0 && (sItem.type == 507 || sItem.type == 508)) + { + this.itemTime = sItem.useTime; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num158 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2.X; + float num159 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + float num160 = (float) Math.Sqrt(num158 * num158 + (double) num159 * (double) num159) / (float) (Main.screenHeight / 2); + if ((double) num160 > 1.0) + num160 = 1f; + float number2 = (float) ((double) num160 * 2.0 - 1.0); + if ((double) number2 < -1.0) + number2 = -1f; + if ((double) number2 > 1.0) + number2 = 1f; + Main.harpNote = number2; + LegacySoundStyle type2 = SoundID.Item26; + if (sItem.type == 507) + type2 = SoundID.Item35; + Main.PlaySound(type2, this.position); + NetMessage.SendData(58, number: this.whoAmI, number2: number2); + } + if ((sItem.type >= 205 && sItem.type <= 207 || sItem.type == 1128 || sItem.type == 3031 || sItem.type == 3032) && !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) + { + if (!Main.GamepadDisableCursorItemIcon) + { + this.showItemIcon = true; + Main.ItemIconCacheUpdate(sItem.type); + } + if (this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + if (sItem.type == 205 || sItem.type == 3032 && Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() == (byte) 0) + { + int num161 = (int) Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(); + int num162 = 0; + for (int index40 = Player.tileTargetX - 1; index40 <= Player.tileTargetX + 1; ++index40) + { + for (int index41 = Player.tileTargetY - 1; index41 <= Player.tileTargetY + 1; ++index41) + { + if ((int) Main.tile[index40, index41].liquidType() == num161) + num162 += (int) Main.tile[index40, index41].liquid; + } + } + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid > (byte) 0 && (num162 > 100 || sItem.type == 3032)) + { + int liquidType = (int) Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(); + if (sItem.type != 3032) + { + if (!Main.tile[Player.tileTargetX, Player.tileTargetY].lava()) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].honey()) + { + --sItem.stack; + this.PutItemInInventory(1128, this.selectedItem); + } + else + { + --sItem.stack; + this.PutItemInInventory(206, this.selectedItem); + } + } + else + { + --sItem.stack; + this.PutItemInInventory(207, this.selectedItem); + } + } + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y); + this.itemTime = sItem.useTime; + 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 index42 = Player.tileTargetX - 1; index42 <= Player.tileTargetX + 1; ++index42) + { + for (int index43 = Player.tileTargetY - 1; index43 <= Player.tileTargetY + 1; ++index43) + { + if (liquid < 256 && (int) Main.tile[index42, index43].liquidType() == num161) + { + int num163 = (int) Main.tile[index42, index43].liquid; + if (num163 + liquid > (int) byte.MaxValue) + num163 = (int) byte.MaxValue - liquid; + liquid += num163; + Main.tile[index42, index43].liquid -= (byte) num163; + Main.tile[index42, index43].liquidType(liquidType); + if (Main.tile[index42, index43].liquid == (byte) 0) + { + Main.tile[index42, index43].lava(false); + Main.tile[index42, index43].honey(false); + } + WorldGen.SquareTileFrame(index42, index43, false); + if (Main.netMode == 1) + NetMessage.sendWater(index42, index43); + else + Liquid.AddWater(index42, index43); + } + } + } + } + } + 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])) + { + if (sItem.type == 207) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid == (byte) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() == (byte) 1) + { + Main.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); + --sItem.stack; + this.PutItemInInventory(205, this.selectedItem); + this.itemTime = sItem.useTime; + if (Main.netMode == 1) + 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) + { + Main.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.PutItemInInventory(205, this.selectedItem); + } + this.itemTime = sItem.useTime; + if (Main.netMode == 1) + 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)) + { + Main.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.PutItemInInventory(205, this.selectedItem); + this.itemTime = sItem.useTime; + if (Main.netMode == 1) + NetMessage.sendWater(Player.tileTargetX, Player.tileTargetY); + } + } + } + } + if (!this.channel) + { + this.toolTime = this.itemTime; + } + else + { + --this.toolTime; + if (this.toolTime < 0) + this.toolTime = sItem.pick <= 0 ? (int) ((double) sItem.useTime * (double) this.pickSpeed) : sItem.useTime; + } + if (sItem.pick > 0 || sItem.axe > 0 || sItem.hammer > 0) + { + bool flag12 = (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; + if (this.noBuilding) + flag12 = false; + if (flag12) + { + int damageAmount1 = 0; + bool flag13 = true; + if (!Main.GamepadDisableCursorItemIcon) + { + this.showItemIcon = true; + Main.ItemIconCacheUpdate(sItem.type); + } + if (this.toolTime == 0 && this.itemAnimation > 0 && this.controlUseItem && (!Main.tile[Player.tileTargetX, Player.tileTargetY].active() || !Main.tileHammer[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && !Main.tileSolid[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 314 && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 424 && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 442 && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 351)) + this.poundRelease = false; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + if (sItem.pick > 0 && !Main.tileAxe[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && !Main.tileHammer[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] || sItem.axe > 0 && Main.tileAxe[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] || sItem.hammer > 0 && Main.tileHammer[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + flag13 = false; + if (this.toolTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + int tileId = this.hitTile.HitObject(Player.tileTargetX, Player.tileTargetY, 1); + if (Main.tileNoFail[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + damageAmount1 = 100; + if (Main.tileHammer[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + { + flag13 = false; + if (sItem.hammer > 0) + { + damageAmount1 += sItem.hammer; + if (!WorldGen.CanKillTile(Player.tileTargetX, Player.tileTargetY)) + damageAmount1 = 0; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 26 && (sItem.hammer < 80 || !Main.hardMode)) + { + damageAmount1 = 0; + this.Hurt(PlayerDeathReason.ByOther(4), this.statLife / 2, -this.direction); + } + AchievementsHelper.CurrentlyMining = true; + if (this.hitTile.AddDamage(tileId, damageAmount1) >= 100) + { + this.hitTile.Clear(tileId); + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } + if (damageAmount1 != 0) + this.hitTile.Prune(); + this.itemTime = sItem.useTime; + AchievementsHelper.CurrentlyMining = false; + } + } + else if (Main.tileAxe[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 80) + damageAmount1 += sItem.axe * 3; + else + damageAmount1 += sItem.axe; + if (sItem.axe > 0) + { + AchievementsHelper.CurrentlyMining = true; + if (!WorldGen.CanKillTile(Player.tileTargetX, Player.tileTargetY)) + damageAmount1 = 0; + if (this.hitTile.AddDamage(tileId, damageAmount1) >= 100) + { + this.hitTile.Clear(tileId); + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } + if (damageAmount1 != 0) + this.hitTile.Prune(); + this.itemTime = sItem.useTime; + AchievementsHelper.CurrentlyMining = false; + } + } + else if (sItem.pick > 0) + { + this.PickTile(Player.tileTargetX, Player.tileTargetY, sItem.pick); + this.itemTime = (int) ((double) sItem.useTime * (double) this.pickSpeed); + } + if (sItem.pick > 0) + this.itemTime = (int) ((double) sItem.useTime * (double) this.pickSpeed); + if (sItem.hammer > 0 && Main.tile[Player.tileTargetX, Player.tileTargetY].active() && (Main.tileSolid[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 10 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 314 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 351 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 424 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 442) && this.poundRelease) + { + flag13 = false; + this.itemTime = sItem.useTime; + int num164 = damageAmount1 + (int) ((double) sItem.hammer * 1.25); + int damageAmount2 = 100; + if (Main.tile[Player.tileTargetX, Player.tileTargetY - 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY - 1].type == (ushort) 10) + damageAmount2 = 0; + if (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type == (ushort) 10) + damageAmount2 = 0; + if (this.hitTile.AddDamage(tileId, damageAmount2) >= 100) + { + this.hitTile.Clear(tileId); + if (this.poundRelease) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (TileID.Sets.Platforms[(int) Main.tile[tileTargetX, tileTargetY].type]) + { + if (Main.tile[tileTargetX, tileTargetY].halfBrick()) + { + WorldGen.PoundTile(tileTargetX, tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } + else + { + int slope1 = 1; + int slope2 = 2; + if (TileID.Sets.Platforms[(int) Main.tile[tileTargetX + 1, tileTargetY - 1].type] || TileID.Sets.Platforms[(int) Main.tile[tileTargetX - 1, tileTargetY + 1].type] || WorldGen.SolidTile(tileTargetX + 1, tileTargetY) && !WorldGen.SolidTile(tileTargetX - 1, tileTargetY)) + { + slope1 = 2; + slope2 = 1; + } + if (Main.tile[tileTargetX, tileTargetY].slope() == (byte) 0) + { + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope1); + int num165 = (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) num165)); + } + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope1) + { + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope2); + int num166 = (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) num166)); + } + else + { + WorldGen.SlopeTile(tileTargetX, tileTargetY); + int num167 = (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) num167)); + WorldGen.PoundTile(tileTargetX, tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } + } + } + else if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 314) + { + if (Minecart.FrameTrack(tileTargetX, tileTargetY, true) && Main.netMode == 1) + NetMessage.SendData(17, number: 15, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } + else if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 137) + { + int num168 = 0; + switch ((int) Main.tile[tileTargetX, tileTargetY].frameY / 18) + { + case 0: + case 1: + case 2: + switch ((int) Main.tile[tileTargetX, tileTargetY].frameX / 18) + { + case 0: + num168 = 2; + break; + case 1: + num168 = 3; + break; + case 2: + num168 = 4; + break; + case 3: + num168 = 5; + break; + case 4: + num168 = 1; + break; + case 5: + num168 = 0; + break; + } + break; + case 3: + case 4: + switch ((int) Main.tile[tileTargetX, tileTargetY].frameX / 18) + { + case 0: + case 1: + num168 = 3; + break; + case 2: + num168 = 4; + break; + case 3: + num168 = 2; + break; + case 4: + num168 = 0; + break; + } + break; + } + Main.tile[tileTargetX, tileTargetY].frameX = (short) (num168 * 18); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + else if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 424) + { + Main.tile[tileTargetX, tileTargetY].frameX = Main.tile[tileTargetX, tileTargetY].frameX != (short) 0 ? (Main.tile[tileTargetX, tileTargetY].frameX != (short) 18 ? (short) 0 : (short) 36) : (short) 18; + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + else if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 442) + { + Tile tile1 = Main.tile[tileTargetX, tileTargetY - 1]; + Tile tile2 = Main.tile[tileTargetX, tileTargetY + 1]; + Tile tile3 = Main.tile[tileTargetX - 1, tileTargetY]; + Tile tile4 = Main.tile[tileTargetX + 1, tileTargetY]; + Tile tile5 = Main.tile[tileTargetX - 1, tileTargetY + 1]; + Tile tile6 = Main.tile[tileTargetX + 1, tileTargetY + 1]; + Tile tile7 = Main.tile[tileTargetX - 1, tileTargetY - 1]; + Tile tile8 = Main.tile[tileTargetX + 1, tileTargetY - 1]; + int index44 = -1; + int index45 = -1; + int index46 = -1; + int index47 = -1; + int num169 = -1; + int num170 = -1; + int num171 = -1; + int num172 = -1; + if (tile1 != null && tile1.nactive() && !tile1.bottomSlope()) + index45 = (int) tile1.type; + if (tile2 != null && tile2.nactive() && !tile2.halfBrick() && !tile2.topSlope()) + index44 = (int) tile2.type; + if (tile3 != null && tile3.nactive() && (tile3.slope() == (byte) 0 || (int) tile3.slope() % 2 != 1)) + index46 = (int) tile3.type; + if (tile4 != null && tile4.nactive() && (tile4.slope() == (byte) 0 || (int) tile4.slope() % 2 != 0)) + index47 = (int) tile4.type; + if (tile5 != null && tile5.nactive()) + num169 = (int) tile5.type; + if (tile6 != null && tile6.nactive()) + num170 = (int) tile6.type; + if (tile7 != null && tile7.nactive()) + num171 = (int) tile7.type; + if (tile8 != null && tile8.nactive()) + num172 = (int) tile8.type; + bool flag14 = false; + bool flag15 = false; + bool flag16 = false; + bool flag17 = false; + if (index44 >= 0 && Main.tileSolid[index44] && (!Main.tileNoAttach[index44] || TileID.Sets.Platforms[index44]) && (tile2.bottomSlope() || tile2.slope() == (byte) 0) && !tile2.halfBrick()) + flag17 = true; + if (index45 >= 0 && Main.tileSolid[index45] && (!Main.tileNoAttach[index45] || TileID.Sets.Platforms[index45] && tile1.halfBrick()) && (tile1.topSlope() || tile1.slope() == (byte) 0 || tile1.halfBrick())) + flag14 = true; + if (index46 >= 0 && Main.tileSolid[index46] && !Main.tileNoAttach[index46] && (tile3.leftSlope() || tile3.slope() == (byte) 0) && !tile3.halfBrick() || index46 == 124 || index46 == 5 && num171 == 5 && num169 == 5) + flag15 = true; + if (index47 >= 0 && Main.tileSolid[index47] && !Main.tileNoAttach[index47] && (tile4.rightSlope() || tile4.slope() == (byte) 0) && !tile4.halfBrick() || index47 == 124 || index47 == 5 && num172 == 5 && num170 == 5) + flag16 = true; + int num173 = (int) Main.tile[tileTargetX, tileTargetY].frameX / 22; + short num174 = -2; + switch (num173) + { + case 0: + num174 = !flag15 ? (!flag14 ? (!flag16 ? (short) -1 : (short) 3) : (short) 1) : (short) 2; + break; + case 1: + num174 = !flag16 ? (!flag17 ? (!flag15 ? (short) -1 : (short) 2) : (short) 0) : (short) 3; + break; + case 2: + num174 = !flag14 ? (!flag16 ? (!flag17 ? (short) -1 : (short) 0) : (short) 3) : (short) 1; + break; + case 3: + num174 = !flag17 ? (!flag15 ? (!flag14 ? (short) -1 : (short) 1) : (short) 2) : (short) 0; + break; + } + switch (num174) + { + case -2: + num174 = (short) 0; + break; + case -1: + goto label_1392; + } + Main.tile[tileTargetX, tileTargetY].frameX = (short) (22 * (int) num174); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + else if ((Main.tile[tileTargetX, tileTargetY].halfBrick() || Main.tile[tileTargetX, tileTargetY].slope() != (byte) 0) && !Main.tileSolidTop[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + { + int num175 = 1; + int slope3 = 1; + int slope4 = 2; + if ((WorldGen.SolidTile(tileTargetX + 1, tileTargetY) || Main.tile[tileTargetX + 1, tileTargetY].slope() == (byte) 1 || Main.tile[tileTargetX + 1, tileTargetY].slope() == (byte) 3) && !WorldGen.SolidTile(tileTargetX - 1, tileTargetY)) + { + slope3 = 2; + slope4 = 1; + } + if (WorldGen.SolidTile(tileTargetX, tileTargetY - 1) && !WorldGen.SolidTile(tileTargetX, tileTargetY + 1)) + num175 = -1; + if (num175 == 1) + { + if (Main.tile[tileTargetX, tileTargetY].slope() == (byte) 0) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope3); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope3) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope4) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope3 + 2); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope3 + 2) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4 + 2); + else + WorldGen.SlopeTile(tileTargetX, tileTargetY); + } + else if (Main.tile[tileTargetX, tileTargetY].slope() == (byte) 0) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope3 + 2); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope3 + 2) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4 + 2); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope4 + 2) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope3); + else if ((int) Main.tile[tileTargetX, tileTargetY].slope() == slope3) + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4); + else + WorldGen.SlopeTile(tileTargetX, tileTargetY); + int num176 = (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) num176)); + } + else + { + WorldGen.PoundTile(tileTargetX, tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: 1f); + } +label_1392: + this.poundRelease = false; + } + } + else + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY, true, true); + Main.PlaySound(0, Player.tileTargetX * 16, Player.tileTargetY * 16); + } + } + else + this.poundRelease = false; + } + } + if (this.releaseUseItem) + this.poundRelease = true; + int index48 = Player.tileTargetX; + int index49 = Player.tileTargetY; + bool flag18 = true; + if (Main.tile[index48, index49].wall > (byte) 0) + { + if (!Main.wallHouse[(int) Main.tile[index48, index49].wall]) + { + for (int index50 = index48 - 1; index50 < index48 + 2; ++index50) + { + for (int index51 = index49 - 1; index51 < index49 + 2; ++index51) + { + if ((int) Main.tile[index50, index51].wall != (int) Main.tile[index48, index49].wall) + { + flag18 = false; + break; + } + } + } + } + else + flag18 = false; + } + if (flag18 && !Main.tile[index48, index49].active()) + { + int num177 = -1; + if (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0 < Math.Round(((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0)) + num177 = 0; + int num178 = -1; + if (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0 < Math.Round(((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0)) + num178 = 0; + for (int index52 = Player.tileTargetX + num177; index52 <= Player.tileTargetX + num177 + 1; ++index52) + { + for (int index53 = Player.tileTargetY + num178; index53 <= Player.tileTargetY + num178 + 1; ++index53) + { + if (flag18) + { + index48 = index52; + index49 = index53; + if (Main.tile[index48, index49].wall > (byte) 0) + { + if (!Main.wallHouse[(int) Main.tile[index48, index49].wall]) + { + for (int index54 = index48 - 1; index54 < index48 + 2; ++index54) + { + for (int index55 = index49 - 1; index55 < index49 + 2; ++index55) + { + if ((int) Main.tile[index54, index55].wall != (int) Main.tile[index48, index49].wall) + { + flag18 = false; + break; + } + } + } + } + else + flag18 = false; + } + } + } + } + } + if (flag13 && Main.tile[index48, index49].wall > (byte) 0 && (!Main.tile[index48, index49].active() || index48 != Player.tileTargetX || index49 != Player.tileTargetY || !Main.tileHammer[(int) Main.tile[index48, index49].type] && !this.poundRelease) && this.toolTime == 0 && this.itemAnimation > 0 && this.controlUseItem && sItem.hammer > 0) + { + bool flag19 = true; + if (!Main.wallHouse[(int) Main.tile[index48, index49].wall]) + { + flag19 = false; + for (int index56 = index48 - 1; index56 < index48 + 2; ++index56) + { + for (int index57 = index49 - 1; index57 < index49 + 2; ++index57) + { + if (Main.tile[index56, index57].wall == (byte) 0 || Main.wallHouse[(int) Main.tile[index56, index57].wall]) + { + flag19 = true; + break; + } + } + } + } + if (flag19) + { + int tileId = this.hitTile.HitObject(index48, index49, 2); + int damageAmount3 = (int) ((double) sItem.hammer * 1.5); + if (this.hitTile.AddDamage(tileId, damageAmount3) >= 100) + { + this.hitTile.Clear(tileId); + WorldGen.KillWall(index48, index49); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 2, number2: ((float) index48), number3: ((float) index49)); + } + else + { + WorldGen.KillWall(index48, index49, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 2, number2: ((float) index48), number3: ((float) index49), number4: 1f); + } + if (damageAmount3 != 0) + this.hitTile.Prune(); + this.itemTime = sItem.useTime / 2; + } + } + } + } + if (Main.myPlayer == this.whoAmI && sItem.type == 1326 && this.itemAnimation > 0 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + 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)) + { + int index58 = (int) ((double) vector2.X / 16.0); + int index59 = (int) ((double) vector2.Y / 16.0); + if ((Main.tile[index58, index59].wall != (byte) 87 || (double) index59 <= Main.worldSurface || NPC.downedPlantBoss) && !Collision.SolidCollision(vector2, this.width, this.height)) + { + 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); + } + } + } + if (sItem.type == 29 && this.itemAnimation > 0 && this.statLifeMax < 400 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + this.statLifeMax += 20; + this.statLifeMax2 += 20; + this.statLife += 20; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(20); + AchievementsHelper.HandleSpecialEvent(this, 0); + } + if (sItem.type == 1291 && this.itemAnimation > 0 && this.statLifeMax >= 400 && this.statLifeMax < 500 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + this.statLifeMax += 5; + this.statLifeMax2 += 5; + this.statLife += 5; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(5); + AchievementsHelper.HandleSpecialEvent(this, 2); + } + if (sItem.type == 109 && this.itemAnimation > 0 && this.statManaMax < 200 && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + this.statManaMax += 20; + this.statManaMax2 += 20; + this.statMana += 20; + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(20); + AchievementsHelper.HandleSpecialEvent(this, 1); + } + if (sItem.type == 3335 && this.itemAnimation > 0 && !this.extraAccessory && Main.expertMode && this.itemTime == 0) + { + this.itemTime = sItem.useTime; + this.extraAccessory = true; + NetMessage.SendData(4, number: this.whoAmI); + } + this.PlaceThing(); + } + if (sItem.type == 3542) + { + Vector2 vector2_35 = Main.OffsetsPlayerOnhand[this.bodyFrame.Y / 56] * 2f; + if (this.direction != 1) + vector2_35.X = (float) this.bodyFrame.Width - vector2_35.X; + if ((double) this.gravDir != 1.0) + vector2_35.Y = (float) this.bodyFrame.Height - vector2_35.Y; + Vector2 vector2_36 = this.RotatedRelativePoint(this.position + (vector2_35 - 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_36; + 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.damage >= 0 && sItem.type > 0 && !sItem.noMelee || sItem.type == 1450 || sItem.type == 1991 || sItem.type == 3183 || sItem.type == 3542 || sItem.type == 3779) && this.itemAnimation > 0) + { + bool flag20 = false; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle((int) this.itemLocation.X, (int) this.itemLocation.Y, 32, 32); + if (!Main.dedServ) + r = new Microsoft.Xna.Framework.Rectangle((int) this.itemLocation.X, (int) this.itemLocation.Y, Main.itemTexture[sItem.type].Width, Main.itemTexture[sItem.type].Height); + r.Width = (int) ((double) r.Width * (double) sItem.scale); + r.Height = (int) ((double) r.Height * (double) sItem.scale); + if (this.direction == -1) + r.X -= r.Width; + if ((double) this.gravDir == 1.0) + r.Y -= r.Height; + if (sItem.useStyle == 1) + { + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.333) + { + if (this.direction == -1) + r.X -= (int) ((double) r.Width * 1.4 - (double) r.Width); + r.Width = (int) ((double) r.Width * 1.4); + r.Y += (int) ((double) r.Height * 0.5 * (double) this.gravDir); + r.Height = (int) ((double) r.Height * 1.1); + } + else if ((double) this.itemAnimation >= (double) this.itemAnimationMax * 0.666) + { + if (this.direction == 1) + r.X -= (int) ((double) r.Width * 1.2); + r.Width *= 2; + r.Y -= (int) (((double) r.Height * 1.4 - (double) r.Height) * (double) this.gravDir); + r.Height = (int) ((double) r.Height * 1.4); + } + } + else if (sItem.useStyle == 3) + { + if ((double) this.itemAnimation > (double) this.itemAnimationMax * 0.666) + { + flag20 = true; + } + else + { + if (this.direction == -1) + r.X -= (int) ((double) r.Width * 1.4 - (double) r.Width); + r.Width = (int) ((double) r.Width * 1.4); + r.Y += (int) ((double) r.Height * 0.6); + r.Height = (int) ((double) r.Height * 0.6); + } + } + double gravDir = (double) this.gravDir; + if (sItem.type == 1450 && Main.rand.Next(3) == 0) + { + int index = -1; + float x = (float) (r.X + Main.rand.Next(r.Width)); + float y = (float) (r.Y + Main.rand.Next(r.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) + flag20 = true; + if (sItem.type == 3779) + { + flag20 = true; + Vector2 vector2_37 = this.itemLocation + new Vector2((float) (this.direction * 30), -8f); + int itemAnimation = this.itemAnimation; + int num = this.itemAnimationMax - 2; + Vector2 vector2_38 = vector2_37 - this.position; + for (float amount = 0.0f; (double) amount < 1.0; amount += 0.2f) + { + Vector2 vector2_39 = Vector2.Lerp(this.oldPosition + vector2_38 + new Vector2(0.0f, this.gfxOffY), vector2_37, amount); + Dust dust = Main.dust[Dust.NewDust(vector2_37 - Vector2.One * 8f, 16, 16, 27, SpeedY: -2f)]; + dust.noGravity = true; + dust.position = vector2_39; + dust.velocity = new Vector2(0.0f, (float) (-(double) this.gravDir * 2.0)); + dust.scale = 1.2f; + dust.alpha = 200; + } + } + if (!flag20) + { + 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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.Height, 14, (float) (this.direction * 2), Alpha: 150, Scale: 1.4f); + int index = Dust.NewDust(new Vector2((float) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.Height, 58, Alpha: 150, Scale: 1.2f); + if (Main.rand.Next(10) == 0) + Gore.NewGore(new Vector2((float) r.X, (float) r.Y), new Vector2(), Main.rand.Next(16, 18)); + } + if (sItem.type == 3065) + { + int index60 = Dust.NewDust(new Vector2((float) r.X, (float) r.Y), r.Width, r.Height, 58, Alpha: 150, Scale: 1.2f); + Main.dust[index60].velocity *= 0.5f; + if (Main.rand.Next(8) == 0) + { + int index61 = Gore.NewGore(new Vector2((float) r.Center.X, (float) r.Center.Y), new Vector2(), 16); + Main.gore[index61].velocity *= 0.5f; + Main.gore[index61].velocity += new Vector2((float) this.direction, 0.0f); + } + } + if (sItem.type == 190) + { + int index = Dust.NewDust(new Vector2((float) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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 index62 = 0; index62 < 2; ++index62) + { + int index63 = Dust.NewDust(new Vector2((float) r.X, (float) r.Y), r.Width, r.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index63].noGravity = true; + Main.dust[index63].velocity.X *= 2f; + Main.dust[index63].velocity.Y *= 2f; + } + } + if (sItem.type == 122 || sItem.type == 217) + { + int index = Dust.NewDust(new Vector2((float) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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(r.TopLeft(), r.Width, r.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(r.TopLeft(), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.Height, 43, Alpha: 254, Scale: 0.3f); + Main.dust[index].velocity *= 0.0f; + } + } + if (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.9f; + G *= 0.9f; + B *= 0.1f; + } + 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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.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) r.X, (float) r.Y), r.Width, r.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) r.X, (float) r.Y), r.Width, r.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; + } + if (Main.myPlayer == i && (sItem.type == 1991 || sItem.type == 3183)) + { + for (int i4 = 0; i4 < 200; ++i4) + { + if (Main.npc[i4].active && Main.npc[i4].catchItem > (short) 0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[i4].position.X, (int) Main.npc[i4].position.Y, Main.npc[i4].width, Main.npc[i4].height); + if (r.Intersects(rectangle) && (sItem.type == 3183 || Main.npc[i4].noTileCollide || this.CanHit((Entity) Main.npc[i4]))) + NPC.CatchNPC(i4, i); + } + } + } + if (Main.myPlayer == i && (sItem.damage > 0 || sItem.type == 3183)) + { + int num179 = sItem.damage; + if (sItem.melee) + num179 = (int) ((double) sItem.damage * (double) this.meleeDamage); + if (sItem.ranged) + num179 = (int) ((double) sItem.damage * (double) this.rangedDamage); + if (sItem.magic) + num179 = (int) ((double) sItem.damage * (double) this.magicDamage); + if (sItem.summon) + num179 = (int) ((double) sItem.damage * (double) this.minionDamage); + if (sItem.thrown) + num179 = (int) ((double) sItem.damage * (double) this.thrownDamage); + float knockBack = sItem.knockBack; + float num180 = 1f; + if (this.kbGlove) + ++num180; + if (this.kbBuff) + num180 += 0.5f; + float num181 = knockBack * num180; + if (this.inventory[this.selectedItem].type == 3106) + num181 += num181 * (1f - this.stealth); + List ushortList = (List) null; + if (sItem.type == 213) + ushortList = new List((IEnumerable) new ushort[17] + { + (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 + }); + int num182 = r.X / 16; + int num183 = (r.X + r.Width) / 16 + 1; + int num184 = r.Y / 16; + int num185 = (r.Y + r.Height) / 16 + 1; + for (int index64 = num182; index64 < num183; ++index64) + { + for (int index65 = num184; index65 < num185; ++index65) + { + if (Main.tile[index64, index65] != null && Main.tileCut[(int) Main.tile[index64, index65].type] && (ushortList == null || !ushortList.Contains(Main.tile[index64, index65].type)) && WorldGen.CanCutTile(index64, index65, TileCuttingContext.AttackMelee)) + { + if (sItem.type == 1786) + { + int type = (int) Main.tile[index64, index65].type; + WorldGen.KillTile(index64, index65); + if (!Main.tile[index64, index65].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(index64 * 16, index65 * 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) index64), number3: ((float) index65)); + } + else + { + WorldGen.KillTile(index64, index65); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index64), number3: ((float) index65)); + } + } + } + } + if (sItem.type != 3183) + { + for (int index66 = 0; index66 < 200; ++index66) + { + if (Main.npc[index66].active && Main.npc[index66].immune[i] == 0 && this.attackCD == 0) + { + if (!Main.npc[index66].dontTakeDamage) + { + if (!Main.npc[index66].friendly || Main.npc[index66].type == 22 && this.killGuide || Main.npc[index66].type == 54 && this.killClothier) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index66].position.X, (int) Main.npc[index66].position.Y, Main.npc[index66].width, Main.npc[index66].height); + if (r.Intersects(rectangle) && (Main.npc[index66].noTileCollide || this.CanHit((Entity) Main.npc[index66]))) + { + bool crit = false; + if (sItem.melee && Main.rand.Next(1, 101) <= this.meleeCrit) + crit = true; + if (sItem.ranged && Main.rand.Next(1, 101) <= this.rangedCrit) + crit = true; + if (sItem.magic && Main.rand.Next(1, 101) <= this.magicCrit) + crit = true; + if (sItem.thrown && Main.rand.Next(1, 101) <= this.thrownCrit) + crit = true; + int banner = Item.NPCtoBanner(Main.npc[index66].BannerID()); + if (banner > 0 && this.NPCBannerBuff[banner]) + num179 = !Main.expertMode ? (int) ((double) num179 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].NormalDamageDealt) : (int) ((double) num179 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].ExpertDamageDealt); + if (this.parryDamageBuff && sItem.melee) + { + num179 *= 5; + this.parryDamageBuff = false; + this.ClearBuff(198); + } + int num186 = Main.DamageVar((float) num179); + this.StatusNPC(sItem.type, index66); + this.OnHit(Main.npc[index66].Center.X, Main.npc[index66].Center.Y, (Entity) Main.npc[index66]); + if (this.armorPenetration > 0) + num186 += Main.npc[index66].checkArmorPenetration(this.armorPenetration); + int num187 = (int) Main.npc[index66].StrikeNPC(num186, num181, this.direction, crit); + if (this.inventory[this.selectedItem].type == 3211) + { + Vector2 vector2_40 = new Vector2((float) (this.direction * 100 + Main.rand.Next(-25, 26)), (float) Main.rand.Next(-75, 76)); + vector2_40.Normalize(); + vector2_40 *= (float) Main.rand.Next(30, 41) * 0.1f; + Vector2 vector2_41 = new Vector2((float) (r.X + Main.rand.Next(r.Width)), (float) (r.Y + Main.rand.Next(r.Height))); + vector2_41 = (vector2_41 + Main.npc[index66].Center * 2f) / 3f; + Projectile.NewProjectile(vector2_41.X, vector2_41.Y, vector2_40.X, vector2_40.Y, 524, (int) ((double) num179 * 0.7), num181 * 0.7f, this.whoAmI); + } + bool flag21 = !Main.npc[index66].immortal; + if (this.beetleOffense & flag21) + { + this.beetleCounter += (float) num187; + this.beetleCountdown = 0; + } + if (sItem.type == 1826 && ((double) Main.npc[index66].value > 0.0 || Main.npc[index66].damage > 0 && !Main.npc[index66].friendly)) + this.pumpkinSword(index66, (int) ((double) num179 * 1.5), num181); + if (this.meleeEnchant == (byte) 7) + Projectile.NewProjectile(Main.npc[index66].Center.X, Main.npc[index66].Center.Y, Main.npc[index66].velocity.X, Main.npc[index66].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 & flag21) + { + int num188 = Main.rand.Next(1, 4); + if (this.strongBees && Main.rand.Next(3) == 0) + ++num188; + for (int index67 = 0; index67 < num188; ++index67) + { + float num189 = (float) (this.direction * 2) + (float) Main.rand.Next(-35, 36) * 0.02f; + float num190 = (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedX = num189 * 0.2f; + float SpeedY = num190 * 0.2f; + Projectile.NewProjectile((float) (r.X + r.Width / 2), (float) (r.Y + r.Height / 2), SpeedX, SpeedY, this.beeType(), this.beeDamage(num186 / 3), this.beeKB(0.0f), i); + } + } + if ((double) Main.npc[index66].value > 0.0 && this.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) Main.npc[index66].position.X, (int) Main.npc[index66].position.Y, Main.npc[index66].width, Main.npc[index66].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) + NetMessage.SendData(21, number: number); + } + int num191 = Item.NPCtoBanner(Main.npc[index66].BannerID()); + if (num191 >= 0) + this.lastCreatureHit = num191; + if (Main.netMode != 0) + { + if (crit) + NetMessage.SendData(28, number: index66, number2: ((float) num186), number3: num181, number4: ((float) this.direction), number5: 1); + else + NetMessage.SendData(28, number: index66, number2: ((float) num186), number3: num181, number4: ((float) this.direction)); + } + if (this.accDreamCatcher) + this.addDPS(num186); + Main.npc[index66].immune[i] = this.itemAnimation; + this.attackCD = (int) ((double) this.itemAnimationMax * 0.33); + } + } + } + else if (Main.npc[index66].type == 63 || Main.npc[index66].type == 64 || Main.npc[index66].type == 103 || Main.npc[index66].type == 242) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index66].position.X, (int) Main.npc[index66].position.Y, Main.npc[index66].width, Main.npc[index66].height); + if (r.Intersects(rectangle) && (Main.npc[index66].noTileCollide || this.CanHit((Entity) Main.npc[index66]))) + { + this.Hurt(PlayerDeathReason.LegacyDefault(), (int) ((double) Main.npc[index66].damage * 1.3), -this.direction); + Main.npc[index66].immune[i] = this.itemAnimation; + this.attackCD = (int) ((double) this.itemAnimationMax * 0.33); + } + } + } + } + if (this.hostile) + { + for (int index68 = 0; index68 < (int) byte.MaxValue; ++index68) + { + if ((index68 == i || !Main.player[index68].active || !Main.player[index68].hostile || Main.player[index68].immune ? 0 : (!Main.player[index68].dead ? 1 : 0)) != 0 && (Main.player[i].team == 0 || Main.player[i].team != Main.player[index68].team)) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.player[index68].position.X, (int) Main.player[index68].position.Y, Main.player[index68].width, Main.player[index68].height); + if (r.Intersects(rectangle) && this.CanHit((Entity) Main.player[index68])) + { + bool flag22 = false; + if (Main.rand.Next(1, 101) <= 10) + flag22 = true; + int num192 = Main.DamageVar((float) num179); + this.StatusPvP(sItem.type, index68); + this.OnHit(Main.player[index68].Center.X, Main.player[index68].Center.Y, (Entity) Main.player[index68]); + PlayerDeathReason playerDeathReason = PlayerDeathReason.ByPlayer(this.whoAmI); + int num193 = (int) Main.player[index68].Hurt(playerDeathReason, num192, this.direction, true, Crit: flag22); + if (this.inventory[this.selectedItem].type == 3211) + { + Vector2 vector2_42 = new Vector2((float) (this.direction * 100 + Main.rand.Next(-25, 26)), (float) Main.rand.Next(-75, 76)); + vector2_42.Normalize(); + vector2_42 *= (float) Main.rand.Next(30, 41) * 0.1f; + Vector2 vector2_43 = new Vector2((float) (r.X + Main.rand.Next(r.Width)), (float) (r.Y + Main.rand.Next(r.Height))); + vector2_43 = (vector2_43 + Main.player[index68].Center * 2f) / 3f; + Projectile.NewProjectile(vector2_43.X, vector2_43.Y, vector2_42.X, vector2_42.Y, 524, (int) ((double) num179 * 0.7), num181 * 0.7f, this.whoAmI); + } + if (this.beetleOffense) + { + this.beetleCounter += (float) num193; + this.beetleCountdown = 0; + } + if (this.meleeEnchant == (byte) 7) + Projectile.NewProjectile(Main.player[index68].Center.X, Main.player[index68].Center.Y, Main.player[index68].velocity.X, Main.player[index68].velocity.Y, 289, 0, 0.0f, this.whoAmI); + if (sItem.type == 1123) + { + int num194 = Main.rand.Next(1, 4); + if (this.strongBees && Main.rand.Next(3) == 0) + ++num194; + for (int index69 = 0; index69 < num194; ++index69) + { + float num195 = (float) (this.direction * 2) + (float) Main.rand.Next(-35, 36) * 0.02f; + float num196 = (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedX = num195 * 0.2f; + float SpeedY = num196 * 0.2f; + Projectile.NewProjectile((float) (r.X + r.Width / 2), (float) (r.Y + r.Height / 2), SpeedX, SpeedY, this.beeType(), this.beeDamage(num192 / 3), this.beeKB(0.0f), i); + } + } + 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[index68].value > 0.0) + this.pumpkinSword(index68, (int) ((double) num179 * 1.5), num181); + if (Main.netMode != 0) + NetMessage.SendPlayerHurt(index68, playerDeathReason, num192, this.direction, flag22, true, -1); + this.attackCD = (int) ((double) this.itemAnimationMax * 0.33); + } + } + } + } + if (sItem.type == 787 && (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.1) || this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.3) || this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.5) || this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.7) || this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.9))) + { + float num197 = 0.0f; + float num198 = 0.0f; + float num199 = 0.0f; + float num200 = 0.0f; + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.9)) + num197 = -7f; + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.7)) + { + num197 = -6f; + num198 = 2f; + } + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.5)) + { + num197 = -4f; + num198 = 4f; + } + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.3)) + { + num197 = -2f; + num198 = 6f; + } + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.1)) + num198 = 7f; + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.7)) + num200 = 26f; + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.3)) + { + num200 -= 4f; + num199 -= 20f; + } + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.1)) + num199 += 6f; + if (this.direction == -1) + { + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.9)) + num200 -= 8f; + if (this.itemAnimation == (int) ((double) this.itemAnimationMax * 0.7)) + num200 -= 6f; + } + float num201 = num197 * 1.5f; + float num202 = num198 * 1.5f; + float num203 = num200 * (float) this.direction; + float num204 = num199 * this.gravDir; + Projectile.NewProjectile((float) (r.X + r.Width / 2) + num203, (float) (r.Y + r.Height / 2) + num204, (float) this.direction * num202, num201 * this.gravDir, 131, num179 / 2, 0.0f, i); + } + } + } + } + } + if (this.itemTime == 0 && this.itemAnimation > 0) + { + if (sItem.hairDye >= (short) 0) + { + this.itemTime = sItem.useTime; + if (this.whoAmI == Main.myPlayer) + { + this.hairDye = (byte) sItem.hairDye; + NetMessage.SendData(4, number: this.whoAmI); + } + } + if (sItem.healLife > 0) + { + this.statLife += sItem.healLife; + this.itemTime = sItem.useTime; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(sItem.healLife); + } + if (sItem.healMana > 0) + { + this.statMana += sItem.healMana; + this.itemTime = sItem.useTime; + if (Main.myPlayer == this.whoAmI) + { + this.AddBuff(94, Player.manaSickTime); + this.ManaEffect(sItem.healMana); + } + } + if (sItem.buffType > 0) + { + if (this.whoAmI == Main.myPlayer && sItem.buffType != 90 && sItem.buffType != 27) + this.AddBuff(sItem.buffType, sItem.buffTime); + this.itemTime = sItem.useTime; + } + if (sItem.type == 678) + { + this.itemTime = sItem.useTime; + 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 (this.whoAmI == Main.myPlayer) + { + if (this.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 361 && Main.CanStartInvasion(ignoreDelay: true)) + { + this.itemTime = sItem.useTime; + Main.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.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 602 && Main.CanStartInvasion(2, true)) + { + this.itemTime = sItem.useTime; + Main.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.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 1315 && Main.CanStartInvasion(3, true)) + { + this.itemTime = sItem.useTime; + Main.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.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 1844 && !Main.dayTime && !Main.pumpkinMoon && !Main.snowMoon && !DD2Event.Ongoing) + { + this.itemTime = sItem.useTime; + Main.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.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 2767 && Main.dayTime && !Main.eclipse) + { + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + this.itemTime = sItem.useTime; + 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.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 3601 && NPC.downedGolemBoss && Main.hardMode && !NPC.AnyDanger() && !NPC.AnyoneNearCultists()) + { + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + this.itemTime = sItem.useTime; + if (Main.netMode == 0) + WorldGen.StartImpendingDoom(); + else + NetMessage.SendData(61, number: this.whoAmI, number2: -8f); + } + if (this.itemTime == 0 && this.itemAnimation > 0 && sItem.type == 1958 && !Main.dayTime && !Main.pumpkinMoon && !Main.snowMoon && !DD2Event.Ongoing) + { + this.itemTime = sItem.useTime; + Main.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); + } + if (this.itemTime == 0 && this.itemAnimation > 0 && sItem.makeNPC > (short) 0 && this.controlUseItem && (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.itemTime = sItem.useTime; + if (!WorldGen.SolidTile(x / 16, y / 16)) + NPC.ReleaseNPC(x, y, (int) sItem.makeNPC, sItem.placeStyle, this.whoAmI); + } + if (this.itemTime == 0 && 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) && this.SummonItemCheck()) + { + if (sItem.type == 560) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 50); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 50f); + } + else if (sItem.type == 43) + { + if (!Main.dayTime) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 4); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 4f); + } + } + else if (sItem.type == 70) + { + if (this.ZoneCorrupt) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 13); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 13f); + } + } + else if (sItem.type == 544) + { + if (!Main.dayTime) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + NPC.SpawnOnPlayer(i, 125); + NPC.SpawnOnPlayer(i, 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) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 134); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 134f); + } + } + else if (sItem.type == 557) + { + if (!Main.dayTime) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, (int) sbyte.MaxValue); + else + NetMessage.SendData(61, number: this.whoAmI, number2: ((float) sbyte.MaxValue)); + } + } + else if (sItem.type == 1133) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 222); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 222f); + } + else if (sItem.type == 1331 && this.ZoneCrimson) + { + this.itemTime = sItem.useTime; + Main.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(i, 266); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 266f); + } + } + } + if ((sItem.type == 50 || sItem.type == 3124 || sItem.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.itemTime == 0) + this.itemTime = sItem.useTime; + else if (this.itemTime == sItem.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.grappling[0] = -1; + this.grapCount = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i && Main.projectile[index].aiStyle == 7) + Main.projectile[index].Kill(); + } + this.Spawn(); + for (int index = 0; index < 70; ++index) + Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 150, Scale: 1.5f); + } + } + if (sItem.type == 2350 && this.itemAnimation > 0) + { + if (this.itemTime == 0) + this.itemTime = sItem.useTime; + else if (this.itemTime == 2) + { + 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.grappling[0] = -1; + this.grapCount = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i && Main.projectile[index].aiStyle == 7) + Main.projectile[index].Kill(); + } + bool immune = this.immune; + int immuneTime = this.immuneTime; + this.Spawn(); + 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 (sItem.stack > 0) + --sItem.stack; + } + } + if (sItem.type == 2351 && this.itemAnimation > 0) + { + if (this.itemTime == 0) + this.itemTime = sItem.useTime; + 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 (sItem.stack > 0) + --sItem.stack; + } + } + if (sItem.type == 2756 && this.itemAnimation > 0) + { + if (this.itemTime == 0) + this.itemTime = sItem.useTime; + 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 (sItem.stack > 0) + --sItem.stack; + } + else + { + float useTime = (float) sItem.useTime; + float num205 = (useTime - (float) this.itemTime) / useTime; + float num206 = 44f; + Vector2 vector2 = new Vector2(15f, 0.0f).RotatedBy(9.42477798461914 * (double) num205); + vector2.X *= (float) this.direction; + for (int index70 = 0; index70 < 2; ++index70) + { + int Type = 221; + if (index70 == 1) + { + vector2.X *= -1f; + Type = 219; + } + Vector2 Position = new Vector2(vector2.X, num206 * (1f - num205) - num206 + (float) (this.height / 2)); + Position += this.Center; + int index71 = Dust.NewDust(Position, 0, 0, Type, Alpha: 100); + Main.dust[index71].position = Position; + Main.dust[index71].noGravity = true; + Main.dust[index71].velocity = Vector2.Zero; + Main.dust[index71].scale = 1.3f; + Main.dust[index71].customData = (object) this; + } + } + } + if (i != Main.myPlayer) + return; + if (this.itemTime == (int) ((double) sItem.useTime * (double) this.tileSpeed) && sItem.tileWand > 0) + { + int tileWand = sItem.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.itemTime == (sItem.createTile < 0 ? (sItem.createWall <= 0 ? sItem.useTime : (int) ((double) sItem.useTime * (double) this.wallSpeed)) : (int) ((double) sItem.useTime * (double) this.tileSpeed)) && sItem.consumable) + { + bool flag23 = true; + if (sItem.type == 2350 || sItem.type == 2351) + flag23 = false; + if (sItem.type == 2756) + flag23 = false; + if (sItem.ranged) + { + if (this.ammoCost80 && Main.rand.Next(5) == 0) + flag23 = false; + if (this.ammoCost75 && Main.rand.Next(4) == 0) + flag23 = false; + } + if (sItem.thrown) + { + if (this.thrownCost50 && Main.rand.Next(100) < 50) + flag23 = false; + if (this.thrownCost33 && Main.rand.Next(100) < 33) + flag23 = false; + } + if (sItem.type >= 71 && sItem.type <= 74) + flag23 = true; + if (flag23) + { + if (sItem.stack > 0) + --sItem.stack; + if (sItem.stack <= 0) + { + this.itemTime = this.itemAnimation; + Main.blockMouse = true; + } + } + } + if (sItem.stack <= 0 && this.itemAnimation == 0) + this.inventory[this.selectedItem] = new Item(); + if (this.selectedItem != 58 || this.itemAnimation == 0) + return; + Main.mouseItem = sItem.Clone(); + } + + public static bool WouldSpotOverlapWithSentry(int worldX, int worldY) + { + 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 (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.cEd) + 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 && sItem.type == 2535) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2551) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2584) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2587) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2621) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2749) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3249) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3474) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3531) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI != Main.myPlayer) + return; + switch (sItem.type) + { + case 3855: + case 3856: + case 3857: + this.AddBuff(sItem.buffType, 3600); + break; + } + } + + 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 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.thrown) + num = (int) ((double) num * (double) this.thrownDamage + 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; + } + + private void ApplyAnimation(Item sItem) + { + if (sItem.melee) + { + this.itemAnimation = (int) ((double) sItem.useAnimation * (double) this.meleeSpeed); + this.itemAnimationMax = (int) ((double) sItem.useAnimation * (double) this.meleeSpeed); + } + else if (sItem.createTile >= 0) + { + this.itemAnimation = (int) ((double) sItem.useAnimation * (double) this.tileSpeed); + this.itemAnimationMax = (int) ((double) sItem.useAnimation * (double) this.tileSpeed); + } + else if (sItem.createWall >= 0) + { + this.itemAnimation = (int) ((double) sItem.useAnimation * (double) this.wallSpeed); + this.itemAnimationMax = (int) ((double) sItem.useAnimation * (double) this.wallSpeed); + } + else + { + this.itemAnimation = sItem.useAnimation; + this.itemAnimationMax = sItem.useAnimation; + this.reuseDelay = sItem.reuseDelay; + } + } + + 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; + } + + public void PickAmmo( + Item sItem, + ref int shoot, + 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; + if (sItem.type == 1946) + shoot = 338 + obj.type - 771; + else if (sItem.useAmmo == AmmoID.Rocket) + shoot += obj.shoot; + else if (sItem.useAmmo == 780) + shoot += obj.shoot; + else if (obj.shoot > 0) + shoot = obj.shoot; + if (sItem.type == 3019 && shoot == 1) + shoot = 485; + if (sItem.type == 3052) + shoot = 495; + if (sItem.type == 3245 && shoot == 21) + shoot = 532; + if (shoot == 42) + { + if (obj.type == 370) + { + shoot = 65; + Damage += 5; + } + else if (obj.type == 408) + { + shoot = 68; + Damage += 5; + } + else if (obj.type == 1246) + { + shoot = 354; + Damage += 5; + } + } + if (this.inventory[this.selectedItem].type == 2888 && shoot == 1) + shoot = 469; + 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 && 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) + { + if (Main.rand.Next(3) == 0) + flag2 = true; + else if (this.thrownCost33 && Main.rand.Next(100) < 33) + flag2 = true; + else if (this.thrownCost50 && Main.rand.Next(100) < 50) + flag2 = true; + } + if (sItem.type == 3475 && Main.rand.Next(3) != 0) + flag2 = true; + if (sItem.type == 3540 && Main.rand.Next(3) != 0) + flag2 = true; + if (this.magicQuiver && sItem.useAmmo == AmmoID.Arrow && 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(2) == 0) + flag2 = true; + if (sItem.type == 434 && this.itemAnimation < sItem.useAnimation - 2) + flag2 = true; + if (this.ammoCost80 && Main.rand.Next(5) == 0) + flag2 = true; + if (this.ammoCost75 && Main.rand.Next(4) == 0) + flag2 = true; + if (shoot == 85 && this.itemAnimation < this.itemAnimationMax - 6) + flag2 = true; + if ((shoot == 145 || shoot == 146 || shoot == 147 || shoot == 148 || shoot == 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 PickTile(int x, int y, int pickPower) + { + int num1 = 0; + int tileId = this.hitTile.HitObject(x, y, 1); + Tile tile = Main.tile[x, y]; + if (Main.tileNoFail[(int) tile.type]) + num1 = 100; + int damageAmount = Main.tileDungeon[(int) tile.type] || tile.type == (ushort) 25 || tile.type == (ushort) 58 || tile.type == (ushort) 117 || tile.type == (ushort) 203 ? num1 + pickPower / 2 : (tile.type == (ushort) 48 || tile.type == (ushort) 232 ? num1 + pickPower / 4 : (tile.type != (ushort) 226 ? (tile.type == (ushort) 107 || tile.type == (ushort) 221 ? num1 + pickPower / 2 : (tile.type == (ushort) 108 || tile.type == (ushort) 222 ? num1 + pickPower / 3 : (tile.type == (ushort) 111 || tile.type == (ushort) 223 ? num1 + pickPower / 4 : (tile.type != (ushort) 211 ? num1 + pickPower : num1 + pickPower / 5)))) : num1 + pickPower / 4)); + if (tile.type == (ushort) 211 && pickPower < 200) + damageAmount = 0; + if ((tile.type == (ushort) 25 || tile.type == (ushort) 203) && pickPower < 65) + damageAmount = 0; + else if (tile.type == (ushort) 117 && pickPower < 65) + damageAmount = 0; + else if (tile.type == (ushort) 37 && pickPower < 50) + damageAmount = 0; + else if (tile.type == (ushort) 404 && pickPower < 65) + damageAmount = 0; + else if ((tile.type == (ushort) 22 || tile.type == (ushort) 204) && (double) y > Main.worldSurface && pickPower < 55) + damageAmount = 0; + else if (tile.type == (ushort) 56 && pickPower < 65) + damageAmount = 0; + else if (tile.type == (ushort) 58 && pickPower < 65) + damageAmount = 0; + else if ((tile.type == (ushort) 226 || tile.type == (ushort) 237) && pickPower < 210) + damageAmount = 0; + else if (Main.tileDungeon[(int) tile.type] && pickPower < 65) + { + if ((double) x < (double) Main.maxTilesX * 0.35 || (double) x > (double) Main.maxTilesX * 0.65) + damageAmount = 0; + } + else if (tile.type == (ushort) 107 && pickPower < 100) + damageAmount = 0; + else if (tile.type == (ushort) 108 && pickPower < 110) + damageAmount = 0; + else if (tile.type == (ushort) 111 && pickPower < 150) + damageAmount = 0; + else if (tile.type == (ushort) 221 && pickPower < 100) + damageAmount = 0; + else if (tile.type == (ushort) 222 && pickPower < 110) + damageAmount = 0; + else if (tile.type == (ushort) 223 && pickPower < 150) + damageAmount = 0; + if (tile.type == (ushort) 147 || tile.type == (ushort) 0 || tile.type == (ushort) 40 || tile.type == (ushort) 53 || tile.type == (ushort) 57 || tile.type == (ushort) 59 || tile.type == (ushort) 123 || tile.type == (ushort) 224 || tile.type == (ushort) 397) + damageAmount += pickPower; + if (tile.type == (ushort) 165 || Main.tileRope[(int) tile.type] || tile.type == (ushort) 199 || Main.tileMoss[(int) tile.type]) + damageAmount = 100; + if (this.hitTile.AddDamage(tileId, damageAmount, false) >= 100 && (tile.type == (ushort) 2 || tile.type == (ushort) 23 || tile.type == (ushort) 60 || tile.type == (ushort) 70 || tile.type == (ushort) 109 || tile.type == (ushort) 199 || Main.tileMoss[(int) tile.type])) + damageAmount = 0; + if (tile.type == (ushort) 128 || tile.type == (ushort) 269) + { + if (tile.frameX == (short) 18 || tile.frameX == (short) 54) + { + --x; + tile = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + if (tile.frameX >= (short) 100) + { + damageAmount = 0; + Main.blockMouse = true; + } + } + if (tile.type == (ushort) 334) + { + if (tile.frameY == (short) 0) + { + ++y; + tile = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + if (tile.frameY == (short) 36) + { + --y; + tile = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + int frameX1 = (int) tile.frameX; + bool flag1 = frameX1 >= 5000; + bool flag2 = false; + if (!flag1) + { + int num2 = frameX1 / 18 % 3; + x -= num2; + tile = Main.tile[x, y]; + if (tile.frameX >= (short) 5000) + flag1 = true; + } + if (flag1) + { + int frameX2 = (int) tile.frameX; + int num3 = 0; + while (frameX2 >= 5000) + { + frameX2 -= 5000; + ++num3; + } + if (num3 != 0) + flag2 = true; + } + if (flag2) + { + damageAmount = 0; + Main.blockMouse = true; + } + } + if (!WorldGen.CanKillTile(x, y)) + damageAmount = 0; + if (this.hitTile.AddDamage(tileId, damageAmount) >= 100) + { + AchievementsHelper.CurrentlyMining = true; + this.hitTile.Clear(tileId); + if (Main.netMode == 1 && Main.tileContainer[(int) Main.tile[x, y].type]) + { + 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 num4 = Main.tile[x, j].active() ? 1 : 0; + WorldGen.KillTile(x, j); + if (num4 != 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); + } + if (damageAmount == 0) + return; + this.hitTile.Prune(); + } + + 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 void PlaceItemInFrame(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) this.selectedItem), number4: ((float) this.whoAmI)); + else + TEItemFrame.TryPlacing(x, y, this.inventory[this.selectedItem].netID, (int) this.inventory[this.selectedItem].prefix, this.inventory[this.selectedItem].stack); + --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 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].type >= 71 && this.inventory[index].type <= 74) + { + 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); + 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 && this.inventory[index].Name != "Copper Pickaxe" && this.inventory[index].Name != "Copper Axe" && this.inventory[index].Name != "Copper Shortsword") + { + 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] = new Item(); + 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] = new Item(); + } + 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] = new Item(); + } + 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] = new Item(); + } + } + 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 = new Item(); + } + + public object Clone() => this.MemberwiseClone(); + + public object clientClone() + { + Player player = new Player(); + player.zone1 = this.zone1; + player.zone2 = this.zone2; + player.zone3 = this.zone3; + player.zone4 = this.zone4; + 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.chest = this.chest; + player.talkNPC = this.talkNPC; + player.hideVisual = this.hideVisual; + player.hideMisc = this.hideMisc; + 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(); + } + 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; + 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; + } + + public static void SavePlayer(PlayerFileData playerFile, bool skipMapSave = false) + { + Main.Achievements.Save(); + string path = playerFile.Path; + Player player = playerFile.Player; + bool isCloudSave = playerFile.IsCloudSave; + if (!skipMapSave) + { + if (!string.IsNullOrEmpty(Main.playerPathName)) + { + try + { + if (Main.mapEnabled) + Main.Map.Save(); + } + catch + { + } + try + { + if (!isCloudSave) + Directory.CreateDirectory(Main.PlayerPath); + } + catch + { + } + } + } + if (Main.ServerSideCharacter || 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(194); + 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.hideVisual[key]; + writer.Write((byte) bitsByte1); + BitsByte bitsByte2 = (BitsByte) (byte) 0; + for (int key = 0; key < 2; ++key) + bitsByte2[key] = player.hideVisual[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.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 < 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.Flush(); + cryptoStream.FlushFinalBlock(); + stream.Flush(); + if (!isCloudSave || SocialAPI.Cloud == null) + return; + SocialAPI.Cloud.Write(playerFile.Path, ((MemoryStream) stream).ToArray()); + } + } + } + } + + 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 release = binaryReader.ReadInt32(); + if (release >= 135) + playerFileData.Metadata = FileMetadata.Read(binaryReader, FileType.Player); + else + playerFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.Player); + if (release > 194) + { + player1.loadStatus = 1; + player1.name = binaryReader.ReadString(); + playerFileData.Player = player1; + return playerFileData; + } + player1.name = binaryReader.ReadString(); + if (release >= 10) + { + if (release >= 17) + player1.difficulty = binaryReader.ReadByte(); + else if (binaryReader.ReadBoolean()) + player1.difficulty = (byte) 2; + } + if (release >= 138) + playerFileData.SetPlayTime(new TimeSpan(binaryReader.ReadInt64())); + else + playerFileData.SetPlayTime(TimeSpan.Zero); + player1.hair = binaryReader.ReadInt32(); + if (release >= 82) + player1.hairDye = binaryReader.ReadByte(); + if (release >= 124) + { + BitsByte bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 8; ++key) + player1.hideVisual[key] = bitsByte[key]; + bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 2; ++key) + player1.hideVisual[key + 8] = bitsByte[key]; + } + else if (release >= 83) + { + BitsByte bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 8; ++key) + player1.hideVisual[key] = bitsByte[key]; + } + if (release >= 119) + player1.hideMisc = (BitsByte) binaryReader.ReadByte(); + if (release <= 17) + player1.Male = player1.hair != 5 && player1.hair != 6 && player1.hair != 9 && player1.hair != 11; + else if (release < 107) + player1.Male = binaryReader.ReadBoolean(); + else + player1.skinVariant = (int) binaryReader.ReadByte(); + if (release < 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 (release >= 125) + player1.extraAccessory = binaryReader.ReadBoolean(); + if (release >= 182) + player1.downedDD2EventAnyDifficulty = binaryReader.ReadBoolean(); + if (release >= 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 (release >= 38) + { + if (release < 124) + { + int num = 11; + if (release >= 81) + num = 16; + for (int index1 = 0; index1 < num; ++index1) + { + int index2 = index1; + if (index2 >= 8) + index2 += 2; + player1.armor[index2].netDefaults(binaryReader.ReadInt32()); + player1.armor[index2].Prefix((int) binaryReader.ReadByte()); + } + } + else + { + int num = 20; + for (int index = 0; index < num; ++index) + { + player1.armor[index].netDefaults(binaryReader.ReadInt32()); + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + } + if (release >= 47) + { + int num = 3; + if (release >= 81) + num = 8; + if (release >= 124) + num = 10; + for (int index3 = 0; index3 < num; ++index3) + { + int index4 = index3; + player1.dye[index4].netDefaults(binaryReader.ReadInt32()); + player1.dye[index4].Prefix((int) binaryReader.ReadByte()); + } + } + if (release >= 58) + { + for (int index = 0; index < 58; ++index) + { + int type = binaryReader.ReadInt32(); + if (type >= 3930) + { + player1.inventory[index].netDefaults(0); + binaryReader.ReadInt32(); + int num = (int) binaryReader.ReadByte(); + if (release >= 114) + binaryReader.ReadBoolean(); + } + else + { + player1.inventory[index].netDefaults(type); + player1.inventory[index].stack = binaryReader.ReadInt32(); + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + if (release >= 114) + player1.inventory[index].favorited = binaryReader.ReadBoolean(); + } + } + } + else + { + for (int index = 0; index < 48; ++index) + { + int type = binaryReader.ReadInt32(); + if (type >= 3930) + { + player1.inventory[index].netDefaults(0); + binaryReader.ReadInt32(); + int num = (int) binaryReader.ReadByte(); + } + else + { + player1.inventory[index].netDefaults(type); + player1.inventory[index].stack = binaryReader.ReadInt32(); + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + if (release >= 117) + { + if (release < 136) + { + for (int index = 0; index < 5; ++index) + { + if (index != 1) + { + int type1 = binaryReader.ReadInt32(); + if (type1 >= 3930) + { + player1.miscEquips[index].netDefaults(0); + int num = (int) binaryReader.ReadByte(); + } + else + { + player1.miscEquips[index].netDefaults(type1); + player1.miscEquips[index].Prefix((int) binaryReader.ReadByte()); + } + int type2 = binaryReader.ReadInt32(); + if (type2 >= 3930) + { + player1.miscDyes[index].netDefaults(0); + int num = (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 >= 3930) + { + player1.miscEquips[index].netDefaults(0); + int num = (int) binaryReader.ReadByte(); + } + else + { + player1.miscEquips[index].netDefaults(type3); + player1.miscEquips[index].Prefix((int) binaryReader.ReadByte()); + } + int type4 = binaryReader.ReadInt32(); + if (type4 >= 3930) + { + player1.miscDyes[index].netDefaults(0); + int num = (int) binaryReader.ReadByte(); + } + else + { + player1.miscDyes[index].netDefaults(type4); + player1.miscDyes[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + } + if (release >= 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 (release >= 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()); + } + } + } + else + { + for (int index = 0; index < 8; ++index) + { + player1.armor[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), release)); + if (release >= 36) + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + if (release >= 6) + { + for (int index = 8; index < 11; ++index) + { + player1.armor[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), release)); + if (release >= 36) + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + } + for (int index = 0; index < 44; ++index) + { + player1.inventory[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), release)); + player1.inventory[index].stack = binaryReader.ReadInt32(); + if (release >= 36) + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + } + if (release >= 15) + { + for (int index = 44; index < 48; ++index) + { + player1.inventory[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), release)); + player1.inventory[index].stack = binaryReader.ReadInt32(); + if (release >= 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(), release)); + player1.bank.item[index].stack = binaryReader.ReadInt32(); + if (release >= 36) + player1.bank.item[index].Prefix((int) binaryReader.ReadByte()); + } + if (release >= 20) + { + for (int index = 0; index < 20; ++index) + { + player1.bank2.item[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), release)); + player1.bank2.item[index].stack = binaryReader.ReadInt32(); + if (release >= 36) + player1.bank2.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + if (release < 58) + { + for (int index = 40; index < 48; ++index) + { + player1.inventory[index + 10] = player1.inventory[index].Clone(); + player1.inventory[index].SetDefaults(); + } + } + if (release >= 11) + { + int num = 22; + if (release < 74) + num = 10; + for (int index = 0; index < num; ++index) + { + player1.buffType[index] = binaryReader.ReadInt32(); + player1.buffTime[index] = binaryReader.ReadInt32(); + if (player1.buffType[index] == 0) + { + --index; + --num; + } + } + } + for (int index = 0; index < 200; ++index) + { + int num = binaryReader.ReadInt32(); + if (num != -1) + { + player1.spX[index] = num; + player1.spY[index] = binaryReader.ReadInt32(); + player1.spI[index] = binaryReader.ReadInt32(); + player1.spN[index] = binaryReader.ReadString(); + } + else + break; + } + if (release >= 16) + player1.hbLocked = binaryReader.ReadBoolean(); + if (release >= 115) + { + int num = 13; + for (int index = 0; index < num; ++index) + player1.hideInfo[index] = binaryReader.ReadBoolean(); + } + if (release >= 98) + player1.anglerQuestsFinished = binaryReader.ReadInt32(); + if (release >= 162) + { + for (int index = 0; index < 4; ++index) + player1.DpadRadial.Bindings[index] = binaryReader.ReadInt32(); + } + if (release >= 164) + { + int num = 8; + if (release >= 167) + num = 10; + for (int index = 0; index < num; ++index) + player1.builderAccStatus[index] = binaryReader.ReadInt32(); + } + if (release >= 181) + player1.bartenderQuestLog = binaryReader.ReadInt32(); + player1.skinVariant = (int) MathHelper.Clamp((float) player1.skinVariant, 0.0f, 9f); + for (int index = 3; index < 8 + player1.extraAccessorySlots; ++index) + { + int type = player1.armor[index].type; + if (type == 908) + player1.lavaMax += 420; + if (type == 906) + player1.lavaMax += 420; + if (player1.wingsLogic == 0 && player1.armor[index].wingSlot >= (sbyte) 0) + player1.wingsLogic = (int) player1.armor[index].wingSlot; + if (type == 158 || type == 396 || type == 1250 || type == 1251 || type == 1252) + player1.noFallDmg = true; + player1.lavaTime = player1.lavaMax; + } + } + } + } + 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; + } + + 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; + 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(); + } + 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.grappling[0] = -1; + this.inventory[0].SetDefaults(3507); + this.inventory[1].SetDefaults(3509); + this.inventory[2].SetDefaults(3506); + this.statManaMax = 20; + this.extraAccessory = false; + if (Main.cEd) + this.inventory[3].SetDefaults(603); + for (int index = 0; index < 470; ++index) + { + this.adjTile[index] = false; + this.oldAdjTile[index] = false; + } + this.hitTile = new HitTile(); + this.mount = new Mount(); + } + + public void TeleportationPotion() + { + bool canSpawn = false; + int teleportStartX = 100; + int teleportRangeX = Main.maxTilesX - 200; + int teleportStartY = 100; + int teleportRangeY = Main.maxTilesY - 200; + Vector2 vector2 = this.TestTeleport(ref canSpawn, teleportStartX, teleportRangeX, teleportStartY, teleportRangeY); + if (!canSpawn) + return; + 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: 3); + } + + private Vector2 TestTeleport( + ref bool canSpawn, + int teleportStartX, + int teleportRangeX, + int teleportStartY, + int teleportRangeY) + { + 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 < 1000) + { + ++num1; + int index1 = teleportStartX + Main.rand.Next(teleportRangeX); + int index2 = teleportStartY + Main.rand.Next(teleportRangeY); + 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 ((Main.tile[index1, index2].wall != (byte) 87 || (double) index2 <= Main.worldSurface || NPC.downedPlantBoss) && (!Main.wallDungeon[(int) Main.tile[index1, index2].wall] || (double) index2 <= Main.worldSurface || NPC.downedBoss3)) + { + int num4 = 0; + while (num4 < 100) + { + if (Main.tile[index1, index2 + num4] == null) + Main.tile[index1, index2 + num4] = new Tile(); + Tile tile = Main.tile[index1, index2 + num4]; + Position = new Vector2((float) index1, (float) (index2 + num4)) * 16f + new Vector2((float) (-width / 2 + 8), (float) -this.height); + Vector4 vector4 = Collision.SlopeCollision(Position, this.velocity, width, this.height, this.gravDir); + int num5 = !Collision.SolidCollision(Position, width, this.height) ? 1 : 0; + int num6 = (double) vector4.Z != (double) this.velocity.X || (double) vector4.Y != (double) this.velocity.Y || (double) vector4.X != (double) Position.X ? 0 : ((double) vector4.Y == (double) Position.Y ? 1 : 0); + if (num5 != 0) + ++num4; + else if (!tile.active() || tile.inActive() || !Main.tileSolid[(int) tile.type]) + ++num4; + else + break; + } + if (!Collision.LavaCollision(Position, width, this.height) && (double) Collision.HurtTiles(Position, this.velocity, width, this.height).Y <= 0.0) + { + Collision.SlopeCollision(Position, this.velocity, width, this.height, this.gravDir); + if (Collision.SolidCollision(Position, width, this.height) && num4 < 99) + { + 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 num7 = index2 + num4; + break; + } + } + } + } + } + } + } + } + } + return Position; + } + + public void GetAnglerReward() + { + Item newItem1 = new Item(); + newItem1.type = 0; + float num1 = 1f; + if (this.anglerQuestsFinished <= 50) + num1 -= (float) this.anglerQuestsFinished * 0.01f; + else if (this.anglerQuestsFinished <= 100) + num1 = (float) (0.5 - (double) (this.anglerQuestsFinished - 50) * 0.00499999988824129); + else if (this.anglerQuestsFinished <= 150) + num1 = (float) (0.25 - (double) (this.anglerQuestsFinished - 100) * (1.0 / 500.0)); + if (this.anglerQuestsFinished == 5) + newItem1.SetDefaults(2428); + else if (this.anglerQuestsFinished == 10) + newItem1.SetDefaults(2367); + else if (this.anglerQuestsFinished == 15) + newItem1.SetDefaults(2368); + else if (this.anglerQuestsFinished == 20) + newItem1.SetDefaults(2369); + else if (this.anglerQuestsFinished == 30) + newItem1.SetDefaults(2294); + else if (this.anglerQuestsFinished > 75 && Main.rand.Next((int) (250.0 * (double) num1)) == 0) + newItem1.SetDefaults(2294); + else if (Main.hardMode && this.anglerQuestsFinished > 25 && Main.rand.Next((int) (100.0 * (double) num1)) == 0) + newItem1.SetDefaults(2422); + else if (Main.hardMode && this.anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num1)) == 0) + newItem1.SetDefaults(2494); + else if (Main.hardMode && this.anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num1)) == 0) + newItem1.SetDefaults(3031); + else if (Main.hardMode && this.anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num1)) == 0) + newItem1.SetDefaults(3032); + else if (Main.rand.Next((int) (80.0 * (double) num1)) == 0) + newItem1.SetDefaults(3183); + else if (Main.rand.Next((int) (60.0 * (double) num1)) == 0) + newItem1.SetDefaults(2360); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(2373); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(2374); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(2375); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(3120); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(3037); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(3096); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + newItem1.SetDefaults(2417); + else if (Main.rand.Next((int) (40.0 * (double) num1)) == 0) + { + newItem1.SetDefaults(2498); + } + else + { + 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 11: + newItem1.SetDefaults(2435); + newItem1.stack = Main.rand.Next(50, 151); + 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; + } + } + newItem1.position = this.Center; + Item obj1 = this.GetItem(this.whoAmI, newItem1, true); + 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, true); + 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, true); + 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, true); + 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, true); + 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 num2 = (int) ((double) (int) ((double) ((this.anglerQuestsFinished + 50) / 2 * Main.rand.Next(50, 201)) * 0.0149999996647239) * 1.5); + if (Main.expertMode) + num2 *= 2; + if (num2 > 100) + { + int num3 = num2 / 100; + if (num3 > 10) + num3 = 10; + if (num3 < 1) + num3 = 1; + newItem6.SetDefaults(73); + newItem6.stack = num3; + } + else + { + if (num2 > 99) + num2 = 99; + if (num2 < 1) + num2 = 1; + newItem6.SetDefaults(72); + newItem6.stack = num2; + } + newItem6.position = this.Center; + Item obj6 = this.GetItem(this.whoAmI, newItem6, true); + 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) num1)) > 50) + return; + Item newItem7 = new Item(); + if (Main.rand.Next((int) (15.0 * (double) num1)) == 0) + newItem7.SetDefaults(2676); + else if (Main.rand.Next((int) (5.0 * (double) num1)) == 0) + newItem7.SetDefaults(2675); + else + newItem7.SetDefaults(2674); + if (Main.rand.Next(25) <= this.anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(50) <= this.anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(100) <= this.anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(150) <= this.anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(200) <= this.anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(250) <= this.anglerQuestsFinished) + ++newItem7.stack; + newItem7.position = this.Center; + Item obj7 = this.GetItem(this.whoAmI, newItem7, true); + 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 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, true); + 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) + return; + PortalHelper.TryGoingThroughPortals((Entity) this); + } + + public bool ConsumeSolarFlare() + { + if (!this.setSolar || this.solarShields <= 0) + return false; + if (Main.netMode == 1 && this.whoAmI != Main.myPlayer) + return true; + --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.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.setStardust) + this.MinionRestTargetAim(); + 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 vector2_1 = this.MinionRestTargetPoint; + if (num1 != 0) + vector2_1 = center; + bool flag2 = false; + float[] samples = new float[10]; + Vector2 v = vector2_1 - center; + Collision.LaserScan(center, v.SafeNormalize(Vector2.Zero), 60f, v.Length(), samples); + float num2 = 0.0f; + for (int index = 0; index < samples.Length; ++index) + { + if ((double) samples[index] > (double) num2) + num2 = samples[index]; + } + foreach (float num3 in samples) + { + if ((double) Math.Abs(num3 - v.Length()) < 10.0) + { + flag2 = true; + break; + } + } + if (intList.Count <= 1) + { + Vector2 Position1 = center + v.SafeNormalize(Vector2.Zero) * num2; + Vector2 vector2_2 = Position1 - center; + if ((double) vector2_2.Length() > 0.0) + { + for (float num4 = 0.0f; (double) num4 < (double) vector2_2.Length(); num4 += 15f) + { + Vector2 Position2 = center + vector2_2 * (num4 / vector2_2.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() + { + 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) + 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) + { + 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); + } + } + if (this.MinionAttackTargetNPC == -1) + return; + Vector2 center = Main.npc[this.MinionAttackTargetNPC].Center; + float num3 = (float) this.miscCounter / 60f; + float num4 = 2.094395f; + for (int index3 = 0; index3 < 3; ++index3) + { + int index4 = Dust.NewDust(center, 0, 0, 272, Alpha: 100, Scale: 0.5f); + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity = Vector2.Zero; + Main.dust[index4].noLight = true; + Main.dust[index4].position = center + ((float) ((double) num3 * 6.28318548202515 + (double) num4 * (double) index3)).ToRotationVector2() * 12f; + } + } + + public void NebulaLevelup(int type) + { + if (this.whoAmI != Main.myPlayer) + return; + int time1 = 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, time1); + break; + case 176: + this.nebulaLevelMana = (int) MathHelper.Clamp((float) (this.nebulaLevelMana + 1), 0.0f, 3f); + this.AddBuff(type + this.nebulaLevelMana - 1, time1); + break; + case 179: + this.nebulaLevelDamage = (int) MathHelper.Clamp((float) (this.nebulaLevelDamage + 1), 0.0f, 3f); + this.AddBuff(type + this.nebulaLevelDamage - 1, time1); + 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 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 = false; + public static bool SmartWallReplacement = true; + public static bool SmartAxeAfterPickaxe = false; + } + + 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 = 3; + 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 void NewMessage(string message, int displayTime) + { + this.chatText = message; + this.snippets = ChatManager.ParseMessage(this.chatText, Color.White).ToArray(); + this.messageSize = ChatManager.GetStringSize(Main.fontMouseText, this.snippets, Vector2.One); + this.timeLeft = displayTime; + } + } + } +} diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..49e44db --- /dev/null +++ b/Program.cs @@ -0,0 +1,197 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Program +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Runtime.ExceptionServices; +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 static Dictionary LaunchParameters = new Dictionary(); + private static int ThingsToLoad = 0; + private static int ThingsLoaded = 0; + public static bool LoadedEverything = false; + 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) + ThreadPool.QueueUserWorkItem(new WaitCallback(Program.ForceLoadThread)); + 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") ? 1 : 0) != 0) + { + string launchParameter = Program.LaunchParameters["-logfile"]; + ConsoleOutputMirror.ToFile(launchParameter == null || launchParameter.Trim() == "" ? Path.Combine(Main.SavePath, "Logs", string.Format("Log_{0}.log", (object) DateTime.Now.ToString("yyyyMMddHHmmssfff"))) : Path.Combine(launchParameter, string.Format("Log_{0}.log", (object) DateTime.Now.ToString("yyyyMMddHHmmssfff")))); + } + if (!Program.LaunchParameters.ContainsKey("-logerrors")) + return; + Program.HookAllExceptions(); + } + + private static void HookAllExceptions() + { + bool useMiniDumps = Program.LaunchParameters.ContainsKey("-minidump"); + bool useFullDumps = Program.LaunchParameters.ContainsKey("-fulldump"); + Console.WriteLine("Error Logging Enabled."); + CrashDump.Options dumpOptions = CrashDump.Options.WithFullMemory; + if (useFullDumps) + Console.WriteLine("Full Dump logs enabled."); + AppDomain.CurrentDomain.FirstChanceException += (EventHandler) ((sender, exceptionArgs) => + { + Console.Write("================\r\n" + string.Format("{0}: First-Chance Exception\r\nCulture: {1}\r\nException: {2}\r\n", (object) DateTime.Now, (object) Thread.CurrentThread.CurrentCulture.Name, (object) exceptionArgs.Exception.ToString()) + "================\r\n\r\n"); + if (!useMiniDumps) + return; + CrashDump.WriteException(CrashDump.Options.WithIndirectlyReferencedMemory, Path.Combine(Main.SavePath, "Dumps")); + }); + AppDomain.CurrentDomain.UnhandledException += (UnhandledExceptionEventHandler) ((sender, exceptionArgs) => + { + Console.Write("================\r\n" + string.Format("{0}: Unhandled Exception\r\nCulture: {1}\r\nException: {2}\r\n", (object) DateTime.Now, (object) Thread.CurrentThread.CurrentCulture.Name, (object) exceptionArgs.ExceptionObject.ToString()) + "================\r\n"); + if (!useFullDumps) + return; + CrashDump.WriteException(dumpOptions, Path.Combine(Main.SavePath, "Dumps")); + }); + } + + 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) + { + 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.English); + Program.SetupLogging(); + using (Main game = new Main()) + { + try + { + Program.InitializeConsoleOutput(); + 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 + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) e); + streamWriter.WriteLine(""); + } + int num = (int) MessageBox.Show(e.ToString(), "Terraria: Error"); + } + catch + { + } + } + } +} diff --git a/Projectile.cs b/Projectile.cs new file mode 100644 index 0000000..36ffe70 --- /dev/null +++ b/Projectile.cs @@ -0,0 +1,25753 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Projectile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.Localization; +using Terraria.World.Generation; + +namespace Terraria +{ + public class Projectile : Entity + { + public static uint[][] perIDStaticNPCImmunity = new uint[714][]; + public static int SentryLifeTime = 7200; + 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 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 thrown; + public bool magic; + public bool coldDamage; + public bool noEnchantments; + public bool trap; + public bool npcProj; + public int frameCounter; + public int frame; + public bool manualDirectionChange; + public int projUUID = -1; + public int localNPCHitCooldown = -2; + public int idStaticNPCHitCooldown = -1; + 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[714][]; + 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 < 714; ++index1) + { + for (int index2 = 0; index2 < 200; ++index2) + Projectile.perIDStaticNPCImmunity[index1][index2] = 0U; + } + } + + public static bool IsNPCImmune(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.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; + for (int index = 0; index < 200; ++index) + this.localNPCImmunity[index] = 0; + this.noDropItem = false; + this.minion = false; + this.minionSlots = 0.0f; + this.soundDelay = 0; + this.spriteDirection = 1; + this.melee = false; + this.ranged = false; + this.thrown = 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.knockBack = 0.0f; + this.miscText = ""; + this.coldDamage = false; + this.noEnchantments = false; + this.trap = false; + this.npcProj = 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; + } + 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; + } + else if (this.type == 3) + { + this.width = 22; + this.height = 22; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 4; + this.thrown = 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; + } + 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.timeLeft = 120; + this.alpha = 100; + this.ignoreWater = true; + this.ranged = true; + this.extraUpdates = 1; + } + 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 = 16; + this.height = 16; + 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 = 10; + this.height = 10; + 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.thrown = 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.thrown = true; + } + else if (this.type == 25) + { + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + } + else if (this.type == 26) + { + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + } + 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.thrown = 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.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 = 14; + this.height = 14; + this.aiStyle = 9; + this.friendly = true; + this.light = 0.8f; + this.alpha = 100; + this.penetrate = 1; + this.magic = true; + } + else if (this.type == 35) + { + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + } + 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.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.thrown = 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.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.thrown = 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.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + } + 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.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.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.ranged = true; + this.alpha = 100; + this.light = 0.3f; + this.penetrate = -1; + this.timeLeft = 180; + this.magic = true; + } + else if (this.type == 79) + { + this.width = 10; + this.height = 10; + this.aiStyle = 9; + this.friendly = true; + this.light = 0.8f; + this.alpha = (int) byte.MaxValue; + this.magic = true; + } + 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; + this.ranged = true; + } + else if (this.type == 82) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + this.ranged = 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; + } + else if (this.type == 92) + { + 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.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.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; + } + 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.thrown = 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + } + 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; + } + 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; + } + 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.ranged = true; + 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.ranged = true; + this.timeLeft = 180; + this.thrown = 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 = 4; + 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; + } + 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; + } + 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.penetrate = 2; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + } + 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.scale = 1.1f; + this.penetrate = -1; + } + else if (this.type == 229) + { + this.width = 30; + this.height = 30; + this.aiStyle = 44; + this.friendly = true; + this.penetrate = -1; + this.light = 0.2f; + } + 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.width = 34; + this.height = 34; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + } + 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; + } + 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; + } + 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 = 4; + } + 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; + } + 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.friendly = true; + this.magic = 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; + } + 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; + } + 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; + } + 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 = Projectile.SentryLifeTime; + 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; + } + 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; + } + else if (this.type == 318) + { + this.width = 12; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.thrown = 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; + } + 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.thrown = 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 = 2; + 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; + } + 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; + } + else if (this.type == 349) + { + this.aiStyle = 1; + this.width = 12; + this.height = 12; + this.hostile = true; + this.penetrate = -1; + this.coldDamage = true; + } + 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.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 = 7; + } + 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.width = 14; + this.height = 14; + this.aiStyle = 61; + this.penetrate = -1; + 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.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 = Projectile.SentryLifeTime; + 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; + } + 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; + } + 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 = 0.75f; + int type = this.type; + if (this.type != 392) + ; + } + 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; + int type = this.type; + if (this.type != 395) + ; + } + else if (this.type == 396) + { + 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.thrown = 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.thrown = 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; + } + 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; + } + 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; + } + 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; + } + 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 = 20; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 2700; + } + else if (this.type == 483) + { + this.arrow = true; + this.width = 14; + this.height = 14; + this.aiStyle = 14; + this.friendly = true; + this.melee = true; + } + else if (this.type == 484) + { + this.arrow = true; + 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; + } + 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.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; + } + 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.magic = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 2; + } + else if (this.type == 507) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.friendly = true; + this.melee = 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.thrown = 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.thrown = 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; + } + 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.thrown = 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; + } + 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.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.thrown = 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.melee = 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.thrown = 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; + } + 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; + } + 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; + } + 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; + } + 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 = Projectile.SentryLifeTime; + 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 = Projectile.SentryLifeTime; + 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.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.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 = Projectile.SentryLifeTime; + 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; + } + 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.thrown = 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 = Projectile.SentryLifeTime; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + this.sentry = 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.thrown = 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.usesLocalNPCImmunity = true; + this.timeLeft = Projectile.SentryLifeTime; + this.localNPCHitCooldown = 3; + this.tileCollide = false; + this.penetrate = -1; + this.sentry = true; + } + else if (this.type == 691 || this.type == 692 || this.type == 693) + { + this.width = 16; + this.height = 16; + this.aiStyle = 138; + this.friendly = true; + this.timeLeft = Projectile.SentryLifeTime; + this.tileCollide = false; + this.penetrate = -1; + this.hide = true; + this.sentry = true; + } + else if (this.type == 694 || this.type == 695 || this.type == 696) + { + this.width = 16; + this.height = 16; + 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 = 0.85f; + 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 + 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; + } + + 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 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) + return number; + 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 < 714) + { + 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 (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 == 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 == 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 == 249) + projectile.frame = Main.rand.Next(5); + return number; + } + + public void StatusNPC(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.npc[i].AddBuff(70, 60 * Main.rand.Next(5, 10)); + if (meleeEnchant == 2) + Main.npc[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 3) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 5) + Main.npc[i].AddBuff(69, 60 * Main.rand.Next(10, 20)); + if (meleeEnchant == 6) + Main.npc[i].AddBuff(31, 60 * Main.rand.Next(1, 4)); + if (meleeEnchant == 8) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(5, 10)); + if (meleeEnchant == 4) + Main.npc[i].AddBuff(72, 120); + } + if (this.type == 195) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(70, 60 * Main.rand.Next(10, 21)); + else + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(10, 21)); + } + if (this.type == 664 && Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 6)); + if (this.type == 666 && Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 9)); + if (this.type == 668 && Main.rand.Next(3) != 0) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(6, 9)); + if (this.type == 567 || this.type == 568) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(5, 11)); + if (this.type == 598) + Main.npc[i].AddBuff(169, 900); + if (this.type == 636) + Main.npc[i].AddBuff(189, 300); + if (this.type == 611) + Main.npc[i].AddBuff(189, 300); + if (this.type == 612) + Main.npc[i].AddBuff(189, 300); + if (this.type == 711) + Main.npc[i].AddBuff(203, 600); + if (this.type == 706) + Main.npc[i].AddBuff(24, 480); + if (this.type == 614) + Main.npc[i].AddBuff(183, 900); + if (this.type == 585) + Main.npc[i].AddBuff(153, 60 * Main.rand.Next(5, 11)); + if (this.type == 583) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(3, 6)); + if (this.type == 524) + Main.npc[i].AddBuff(69, 60 * Main.rand.Next(3, 8)); + if (this.type == 504 && Main.rand.Next(3) == 0) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, Main.rand.Next(60, 180)); + else + Main.npc[i].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) + Main.npc[i].AddBuff(204, Main.rand.Next(8, 18) * 30); + if (this.type == 545 && Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, Main.rand.Next(60, 240)); + if (this.type == 553) + Main.npc[i].AddBuff(24, Main.rand.Next(180, 480)); + if (this.type == 552 && Main.rand.Next(3) != 0) + Main.npc[i].AddBuff(44, Main.rand.Next(120, 320)); + if (this.type == 495) + Main.npc[i].AddBuff(153, Main.rand.Next(120, 300)); + if (this.type == 497) + Main.npc[i].AddBuff(153, Main.rand.Next(60, 180)); + if (this.type == 496) + Main.npc[i].AddBuff(153, Main.rand.Next(240, 480)); + if (this.type == 476) + Main.npc[i].AddBuff(151, 30); + if (this.type == 523) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(10, 30)); + if (this.type == 478 || this.type == 480) + Main.npc[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (this.type == 479) + Main.npc[i].AddBuff(69, 60 * Main.rand.Next(7, 15)); + if (this.type == 379) + Main.npc[i].AddBuff(70, 60 * Main.rand.Next(4, 7)); + if (this.type >= 390 && this.type <= 392) + Main.npc[i].AddBuff(70, 60 * Main.rand.Next(2, 5)); + if (this.type == 374) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(4, 7)); + if (this.type == 376) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type >= 399 && this.type <= 402) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type == 295 || this.type == 296) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(8, 16)); + if ((this.melee || this.ranged) && Main.player[this.owner].frostBurn && !this.noEnchantments) + Main.npc[i].AddBuff(44, 60 * Main.rand.Next(5, 15)); + if (this.melee && Main.player[this.owner].magmaStone && !this.noEnchantments) + { + if (Main.rand.Next(7) == 0) + Main.npc[i].AddBuff(24, 360); + else if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, 120); + else + Main.npc[i].AddBuff(24, 60); + } + if (this.type == 287) + Main.npc[i].AddBuff(72, 120); + if (this.type == 285) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(31, 180); + else + Main.npc[i].AddBuff(31, 60); + } + if (this.type == 2 && Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, 180); + if (this.type == 172) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(44, 180); + } + else if (this.type == 15) + { + if (Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(24, 300); + } + else if (this.type == 253) + { + if (Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(44, 480); + } + else if (this.type == 19) + { + if (Main.rand.Next(5) == 0) + Main.npc[i].AddBuff(24, 180); + } + else if (this.type == 33) + { + if (Main.rand.Next(5) == 0) + Main.npc[i].AddBuff(20, 420); + } + else if (this.type == 34) + { + if (Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(24, Main.rand.Next(240, 480)); + } + else if (this.type == 35) + { + if (Main.rand.Next(4) == 0) + Main.npc[i].AddBuff(24, 180); + } + else if (this.type == 54) + { + if (Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(20, 600); + } + else if (this.type == 267) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(20, 3600); + else + Main.npc[i].AddBuff(20, 1800); + } + else if (this.type == 63) + { + if (Main.rand.Next(5) != 0) + Main.npc[i].AddBuff(31, 60 * Main.rand.Next(2, 5)); + } + else if (this.type == 85 || this.type == 188) + Main.npc[i].AddBuff(24, 1200); + else if (this.type == 95 || this.type == 103 || this.type == 104) + Main.npc[i].AddBuff(39, 420); + else if (this.type == 278 || this.type == 279 || this.type == 280) + Main.npc[i].AddBuff(69, 600); + else if (this.type == 282 || this.type == 283) + Main.npc[i].AddBuff(70, 600); + if (this.type == 163 || this.type == 310) + { + if (Main.rand.Next(3) == 0) + Main.npc[i].AddBuff(24, 600); + else + Main.npc[i].AddBuff(24, 300); + } + else if (this.type == 98) + Main.npc[i].AddBuff(20, 600); + else if (this.type == 184) + Main.npc[i].AddBuff(20, 900); + else if (this.type == 265) + { + Main.npc[i].AddBuff(20, 1800); + } + else + { + if (this.type != 355) + return; + Main.npc[i].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)); + if (meleeEnchant == 2) + Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 3) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 5) + Main.player[i].AddBuff(69, 60 * Main.rand.Next(10, 20)); + if (meleeEnchant == 6) + Main.player[i].AddBuff(31, 60 * Main.rand.Next(1, 4)); + if (meleeEnchant == 8) + Main.player[i].AddBuff(20, 60 * Main.rand.Next(5, 10)); + } + if (this.type == 295 || this.type == 296) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(8, 16)); + if (this.type == 478 || this.type == 480) + Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + 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); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(24, 240); + else + Main.player[i].AddBuff(24, 120); + } + 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); + else + Main.player[i].AddBuff(20, 1800); + } + else if (this.type == 63) + { + if (Main.rand.Next(3) != 0) + Main.player[i].AddBuff(31, 120); + } + 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) + Main.player[i].AddBuff(39, 420); + else if (this.type == 278 || this.type == 279 || this.type == 280) + Main.player[i].AddBuff(69, 900); + else if (this.type == 282 || this.type == 283) + Main.player[i].AddBuff(70, 600); + if (this.type == 163 || this.type == 310) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 600); + else + Main.player[i].AddBuff(24, 300); + } + else if (this.type == 265) + { + Main.player[i].AddBuff(20, 1200); + } + else + { + if (this.type != 355) + return; + Main.player[i].AddBuff(70, 1800); + } + } + + public void ghostHurt(int dmg, Vector2 Position) + { + if (!this.magic) + return; + int Damage = this.damage / 2; + if (dmg / 2 <= 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 (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) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type == 55) + { + 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 == 82 && Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 420); + if (this.type == 285) + { + 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, 480); + else if (Main.rand.Next(4) == 0) + Main.player[i].AddBuff(39, 300); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(39, 180); + } + else if (this.type == 288) + Main.player[i].AddBuff(69, 900); + else if (this.type == 253 && Main.rand.Next(2) == 0) + 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 CanHit(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 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 == 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.aiStyle == 137 && (double) this.ai[0] != 0.0 || this.aiStyle == 138 || 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)) + 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 && this.type != 338 && this.type != 339 && this.type != 340 && this.type != 341 && (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.CanHit((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); + this.StatusPlayer(player); + Main.player[player].Hurt(PlayerDeathReason.ByProjectile(this.owner, this.whoAmI), Damage, this.direction, true); + if (this.trap) + { + Main.player[player].trapDebuffSource = true; + if (Main.player[player].dead) + AchievementsHelper.HandleSpecialEvent(Main.player[player], 4); + } + } + } + } + this.CutTiles(); + } + if (this.owner == Main.myPlayer) + { + if (this.damage > 0) + { + for (int index1 = 0; index1 < 200; ++index1) + { + bool flag1 = !this.usesLocalNPCImmunity && !this.usesIDStaticNPCImmunity || this.usesLocalNPCImmunity && this.localNPCImmunity[index1] == 0 || this.usesIDStaticNPCImmunity && Projectile.IsNPCImmune(this.type, index1); + if (((!Main.npc[index1].active ? 0 : (!Main.npc[index1].dontTakeDamage ? 1 : 0)) & (flag1 ? 1 : 0)) != 0 && (this.friendly && (!Main.npc[index1].friendly || this.type == 318 || Main.npc[index1].type == 22 && this.owner < (int) byte.MaxValue && Main.player[this.owner].killGuide || Main.npc[index1].type == 54 && this.owner < (int) byte.MaxValue && Main.player[this.owner].killClothier) || this.hostile && Main.npc[index1].friendly && !Main.npc[index1].dontTakeDamageFromHostiles) && (this.owner < 0 || Main.npc[index1].immune[this.owner] == 0 || this.maxPenetrate == 1)) + { + bool flag2 = false; + if (this.type == 11 && (Main.npc[index1].type == 47 || Main.npc[index1].type == 57)) + flag2 = true; + else if (this.type == 31 && Main.npc[index1].type == 69) + flag2 = true; + else if (Main.npc[index1].trapImmune && this.trap) + flag2 = true; + else if (Main.npc[index1].immortal && this.npcProj) + flag2 = true; + if (!flag2 && (Main.npc[index1].noTileCollide || !this.ownerHitCheck || this.CanHit((Entity) Main.npc[index1]))) + { + bool flag3; + if (Main.npc[index1].type == 414) + { + Microsoft.Xna.Framework.Rectangle rect = Main.npc[index1].getRect(); + int num = 8; + rect.X -= num; + rect.Y -= num; + rect.Width += num * 2; + rect.Height += num * 2; + flag3 = this.Colliding(myRect, rect); + } + else + flag3 = this.Colliding(myRect, Main.npc[index1].getRect()); + if (flag3) + { + if (this.type == 604) + Main.player[this.owner].Counterweight(Main.npc[index1].Center, this.damage, this.knockBack); + if (Main.npc[index1].reflectingProjectiles && this.CanReflect()) + { + Main.npc[index1].ReflectProjectile(this.whoAmI); + return; + } + int num1 = this.damage; + if (this.type > 0 && this.type < 714 && ProjectileID.Sets.StardustDragon[this.type]) + { + float num2 = Utils.Clamp((float) (((double) this.scale - 1.0) * 100.0), 0.0f, 50f); + num1 = (int) ((double) num1 * (1.0 + (double) num2 * 0.230000004172325)); + } + int Damage1 = Main.DamageVar((float) num1); + bool flag4 = !this.npcProj && !this.trap; + if (this.trap && NPCID.Sets.BelongsToInvasionOldOnesArmy[Main.npc[index1].type]) + Damage1 /= 2; + if (this.type == 604) + { + this.friendly = false; + this.ai[1] = 1000f; + } + if ((this.type == 400 || this.type == 401 || this.type == 402) && Main.npc[index1].type >= 13 && Main.npc[index1].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) new Conditions.IsSolid()), 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) + { + 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) + { + 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 num3 = 1f; + if ((double) Main.npc[index1].knockBackResist > 0.0) + num3 = 1f / Main.npc[index1].knockBackResist; + this.knockBack = 4f * num3; + if ((double) Main.npc[index1].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) Main.npc[index1].position.X + (double) (Main.npc[index1].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) Main.npc[index1].position.X + (double) (Main.npc[index1].width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + else if (this.aiStyle == 50) + { + if ((double) Main.npc[index1].position.X + (double) (Main.npc[index1].width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + if (this.type == 509) + { + int num4 = Main.rand.Next(2, 6); + for (int index2 = 0; index2 < num4; ++index2) + { + 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 = (Main.npc[index1].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) && Main.npc[index1].type != 68 && Main.npc[index1].defense < 999) + Damage1 += Main.npc[index1].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; + bool crit = false; + if (flag4) + { + 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; + if (this.thrown && Main.rand.Next(1, 101) <= Main.player[this.owner].thrownCrit) + 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 (this.aiStyle == 99) + { + Main.player[this.owner].Counterweight(Main.npc[index1].Center, this.damage, this.knockBack); + if ((double) Main.npc[index1].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 - Main.npc[index1].Center; + vector2.Normalize(); + float num5 = 16f; + this.velocity = this.velocity * -0.5f; + this.velocity = this.velocity + vector2 * num5; + 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.aiStyle == 93) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[1] = 0.0f; + this.ai[0] = (float) (-index1 - 1); + this.velocity = Main.npc[index1].Center - this.Center; + } + Damage1 = (double) this.ai[0] != 2.0 ? (int) ((double) Damage1 * 0.15) : (int) ((double) Damage1 * 1.35); + } + if (flag4) + { + int num6 = Item.NPCtoBanner(Main.npc[index1].BannerID()); + if (num6 >= 0) + Main.player[Main.myPlayer].lastCreatureHit = num6; + } + if (Main.netMode != 2 & flag4) + { + int banner = Item.NPCtoBanner(Main.npc[index1].BannerID()); + if (banner > 0 && Main.player[this.owner].NPCBannerBuff[banner]) + Damage1 = !Main.expertMode ? (int) ((double) Damage1 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].NormalDamageDealt) : (int) ((double) Damage1 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(banner)].ExpertDamageDealt); + } + if (Main.expertMode) + { + if ((this.type == 30 || this.type == 28 || this.type == 29 || this.type == 470 || this.type == 517 || this.type == 588 || this.type == 637) && Main.npc[index1].type >= 13 && Main.npc[index1].type <= 15) + Damage1 /= 5; + if (this.type == 280 && (Main.npc[index1].type >= 134 && Main.npc[index1].type <= 136 || Main.npc[index1].type == 139)) + Damage1 = (int) ((double) Damage1 * 0.75); + } + if (Main.netMode != 2 && Main.npc[index1].type == 439 && this.type >= 0 && this.type <= 714 && ProjectileID.Sets.Homing[this.type]) + Damage1 = (int) ((double) Damage1 * 0.75); + if (this.type == 497 && this.penetrate != 1) + { + this.ai[0] = 25f; + float num7 = this.velocity.Length(); + Vector2 vector2 = Main.npc[index1].Center - this.Center; + vector2.Normalize(); + this.velocity = -(vector2 * num7) * 0.9f; + this.netUpdate = true; + } + if (this.type == 323 && (Main.npc[index1].type == 158 || Main.npc[index1].type == 159)) + Damage1 *= 10; + if (this.type == 294) + this.damage = (int) ((double) this.damage * 0.8); + if (this.type == 477 && this.penetrate > 1) + { + int[] numArray = new int[10]; + int maxValue = 0; + int num8 = 700; + int num9 = 20; + for (int index3 = 0; index3 < 200; ++index3) + { + if (index3 != index1 && Main.npc[index3].CanBeChasedBy((object) this)) + { + float num10 = (this.Center - Main.npc[index3].Center).Length(); + if ((double) num10 > (double) num9 && (double) num10 < (double) num8 && Collision.CanHitLine(this.Center, 1, 1, Main.npc[index3].Center, 1, 1)) + { + numArray[maxValue] = index3; + ++maxValue; + if (maxValue >= 9) + break; + } + } + } + if (maxValue > 0) + { + int index4 = Main.rand.Next(maxValue); + Vector2 vector2 = Main.npc[numArray[index4]].Center - this.Center; + float num11 = this.velocity.Length(); + vector2.Normalize(); + this.velocity = vector2 * num11; + this.netUpdate = true; + } + } + if (this.type == 261) + { + float num12 = (float) Math.Sqrt((double) this.velocity.X * (double) this.velocity.X + (double) this.velocity.Y * (double) this.velocity.Y); + if ((double) num12 < 1.0) + num12 = 1f; + Damage1 = (int) ((double) Damage1 * (double) num12 / 8.0); + } + if (flag4 && this.melee && Main.player[this.owner].parryDamageBuff) + { + Damage1 *= 5; + Main.player[this.owner].parryDamageBuff = false; + Main.player[this.owner].ClearBuff(198); + } + this.StatusNPC(index1); + if (flag4 && this.type != 221 && this.type != 227 && this.type != 614) + Main.player[this.owner].OnHit(Main.npc[index1].Center.X, Main.npc[index1].Center.Y, (Entity) Main.npc[index1]); + 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) Main.npc[index1].Center.X ? 1 : -1; + if (flag4 && !this.hostile && Main.player[this.owner].armorPenetration > 0) + Damage1 += Main.npc[index1].checkArmorPenetration(Main.player[this.owner].armorPenetration); + int dmg = !flag4 ? (int) Main.npc[index1].StrikeNPCNoInteraction(Damage1, this.knockBack, hitDirection, crit) : (int) Main.npc[index1].StrikeNPC(Damage1, this.knockBack, hitDirection, crit); + if (flag4 && Main.player[this.owner].accDreamCatcher) + Main.player[this.owner].addDPS(dmg); + if (flag4 && !Main.npc[index1].immortal) + { + if (this.type == 304 && dmg > 0 && Main.npc[index1].lifeMax > 5 && !Main.player[this.owner].moonLeech) + this.vampireHeal(dmg, new Vector2(Main.npc[index1].Center.X, Main.npc[index1].Center.Y)); + if ((double) Main.npc[index1].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) Main.npc[index1].position.X, (int) Main.npc[index1].position.Y, Main.npc[index1].width, Main.npc[index1].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) + NetMessage.SendData(21, number: number); + } + if (dmg > 0 && Main.npc[index1].lifeMax > 5 && this.friendly && !this.hostile && this.aiStyle != 59) + { + if (Main.npc[index1].canGhostHeal) + { + if (Main.player[this.owner].ghostHeal && !Main.player[this.owner].moonLeech) + this.ghostHeal(dmg, new Vector2(Main.npc[index1].Center.X, Main.npc[index1].Center.Y)); + if (Main.player[this.owner].ghostHurt) + this.ghostHurt(dmg, new Vector2(Main.npc[index1].Center.X, Main.npc[index1].Center.Y)); + if (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) Main.npc[index1].position.X, (int) Main.npc[index1].position.Y, Main.npc[index1].width, Main.npc[index1].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) this.direction; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + } + if (this.melee && Main.player[this.owner].beetleOffense && !Main.npc[index1].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 = Main.npc[index1].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); + } + } + } + if (flag4 && this.melee && Main.player[this.owner].meleeEnchant == (byte) 7) + Projectile.NewProjectile(Main.npc[index1].Center.X, Main.npc[index1].Center.Y, Main.npc[index1].velocity.X, Main.npc[index1].velocity.Y, 289, 0, 0.0f, this.owner); + if (Main.netMode != 0) + { + if (crit) + NetMessage.SendData(28, number: index1, number2: ((float) Damage1), number3: this.knockBack, number4: ((float) this.direction), number5: 1); + else + NetMessage.SendData(28, number: index1, number2: ((float) Damage1), number3: this.knockBack, number4: ((float) this.direction)); + } + if (this.type >= 390 && this.type <= 392) + this.localAI[1] = 20f; + if (this.usesIDStaticNPCImmunity) + { + Main.npc[index1].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 num13 = 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[num13++] = new Point(x, Main.projectile[x].timeLeft); + if (num13 >= pointArray.Length) + break; + } + } + if (num13 >= pointArray.Length) + { + int index5 = 0; + for (int index6 = 1; index6 < pointArray.Length; ++index6) + { + if (pointArray[index6].Y < pointArray[index5].Y) + index5 = index6; + } + Main.projectile[pointArray[index5].X].Kill(); + } + } + else if (this.type == 632) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type == 514) + Main.npc[index1].immune[this.owner] = 1; + else if (this.type == 611) + { + if ((double) this.localAI[1] <= 0.0) + Projectile.NewProjectile(Main.npc[index1].Center.X, Main.npc[index1].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) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type >= 625 && this.type <= 628) + Main.npc[index1].immune[this.owner] = 6; + else if (this.type == 286) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type == 514) + Main.npc[index1].immune[this.owner] = 3; + else if (this.type == 443) + Main.npc[index1].immune[this.owner] = 8; + else if (this.type >= 424 && this.type <= 426) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type == 634 || this.type == 635) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type == 659) + Main.npc[index1].immune[this.owner] = 5; + else if (this.type == 246) + Main.npc[index1].immune[this.owner] = 7; + else if (this.type == 249) + Main.npc[index1].immune[this.owner] = 7; + else if (this.type == 190) + Main.npc[index1].immune[this.owner] = 8; + else if (this.type == 409) + Main.npc[index1].immune[this.owner] = 6; + else if (this.type == 407) + Main.npc[index1].immune[this.owner] = 20; + else if (this.type == 311) + Main.npc[index1].immune[this.owner] = 7; + else if (this.type == 582) + { + Main.npc[index1].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; + break; + } + if (this.type == 661) + { + this.localNPCImmunity[index1] = 8; + Main.npc[index1].immune[this.owner] = 0; + } + else if (this.usesLocalNPCImmunity && this.localNPCHitCooldown != -2) + { + Main.npc[index1].immune[this.owner] = 0; + this.localNPCImmunity[index1] = this.localNPCHitCooldown; + } + else if (this.penetrate != 1) + Main.npc[index1].immune[this.owner] = 10; + } + if (this.type == 710) + this.BetsySharpnel(index1); + if (this.penetrate > 0 && this.type != 317) + { + if (this.type == 357) + this.damage = (int) ((double) this.damage * 0.9); + --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; + } + 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) + { + this.localNPCImmunity[index1] = -1; + Main.npc[index1].immune[this.owner] = 0; + this.damage = (int) ((double) this.damage * 0.96); + } + else if (this.type == 617) + { + this.localNPCImmunity[index1] = 8; + Main.npc[index1].immune[this.owner] = 0; + } + else if (this.type == 656) + { + this.localNPCImmunity[index1] = 8; + Main.npc[index1].immune[this.owner] = 0; + ++this.localAI[0]; + } + else if (this.type == 618) + { + this.localNPCImmunity[index1] = 20; + Main.npc[index1].immune[this.owner] = 0; + } + else if (this.type == 642) + { + this.localNPCImmunity[index1] = 10; + Main.npc[index1].immune[this.owner] = 0; + } + else if (this.type == 611 || this.type == 612) + { + this.localNPCImmunity[index1] = 6; + Main.npc[index1].immune[this.owner] = 4; + } + else if (this.type == 645) + { + this.localNPCImmunity[index1] = -1; + Main.npc[index1].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); + } + } + } + } + } + if (this.damage > 0 && Main.player[Main.myPlayer].hostile) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != this.owner && Main.player[index].active && !Main.player[index].dead && !Main.player[index].immune && Main.player[index].hostile && this.playerImmune[index] <= 0 && (Main.player[Main.myPlayer].team == 0 || Main.player[Main.myPlayer].team != Main.player[index].team) && (!this.ownerHitCheck || this.CanHit((Entity) Main.player[index])) && this.Colliding(myRect, Main.player[index].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) Main.player[index].position.X + (double) (Main.player[index].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) Main.player[index].position.X + (double) (Main.player[index].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 flag = false; + if (this.melee && Main.rand.Next(1, 101) <= Main.player[this.owner].meleeCrit) + flag = true; + int num = Main.DamageVar((float) this.damage); + if (!Main.player[index].immune) + this.StatusPvP(index); + if (this.type != 221 && this.type != 227 && this.type != 614) + Main.player[this.owner].OnHit(Main.player[index].Center.X, Main.player[index].Center.Y, (Entity) Main.player[index]); + int dmg = (int) Main.player[index].Hurt(playerDeathReason, num, this.direction, true, Crit: flag); + if (dmg > 0 && Main.player[this.owner].ghostHeal && this.friendly && !this.hostile) + this.ghostHeal(dmg, new Vector2(Main.player[index].Center.X, Main.player[index].Center.Y)); + if (this.type == 304 && dmg > 0) + this.vampireHeal(dmg, new Vector2(Main.player[index].Center.X, Main.player[index].Center.Y)); + if (this.melee && Main.player[this.owner].meleeEnchant == (byte) 7) + Projectile.NewProjectile(Main.player[index].Center.X, Main.player[index].Center.Y, Main.player[index].velocity.X, Main.player[index].velocity.Y, 289, 0, 0.0f, this.owner); + if (Main.netMode != 0) + NetMessage.SendPlayerHurt(index, playerDeathReason, num, this.direction, flag, true, 0); + 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; + if (this.type == 455 || this.type == 452 || this.type == 454 || this.type == 462) + cooldownCounter = 1; + int player1 = Main.myPlayer; + if (!Main.player[player1].active || Main.player[player1].dead || Main.player[player1].immune && cooldownCounter == -1 || !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 num = Main.DamageVar((float) this.damage); + if (!Main.player[player1].immune) + this.StatusPlayer(player1); + if (Main.player[player1].resistCold && this.coldDamage) + num = (int) ((double) num * 0.699999988079071); + if (Main.expertMode) + num = (int) ((double) num * (double) Main.expertDamage); + Main.player[player1].Hurt(PlayerDeathReason.ByProjectile(-1, this.whoAmI), num * 2, 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 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; + 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; + AchievementsHelper.CurrentlyMining = true; + 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)); + } + } + } + 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.PerLinePoint(DelegateMethods.CutTiles)); + } + else if (this.type == 611) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity, (float) this.width * this.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + } + else if (this.type == 697 || this.type == 707) + { + float num5 = 40f; + if (this.type == 707) + num5 = 60f; + float f = this.rotation - 0.7853982f * (float) Math.Sign(this.velocity.X); + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center + f.ToRotationVector2() * -num5, this.Center + f.ToRotationVector2() * num5, (float) this.width * this.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + } + AchievementsHelper.CurrentlyMining = false; + } + + private bool CanCutTiles() + { + if (this.aiStyle == 45 || this.aiStyle == 137 || this.aiStyle == 92 || this.aiStyle == 105 || this.aiStyle == 106 || 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) + return false; + return this.type < 625 || this.type > 628; + } + + public bool Colliding(Microsoft.Xna.Framework.Rectangle myRect, Microsoft.Xna.Framework.Rectangle targetRect) + { + if (this.type == 598 && targetRect.Width > 8 && targetRect.Height > 8) + targetRect.Inflate(-targetRect.Width / 8, -targetRect.Height / 8); + else if (this.type == 614 && targetRect.Width > 8 && targetRect.Height > 8) + targetRect.Inflate(-targetRect.Width / 8, -targetRect.Height / 8); + 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; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint)) + return true; + } + else 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; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center + f.ToRotationVector2() * -num, this.Center + f.ToRotationVector2() * num, 23f * this.scale, ref collisionPoint)) + return true; + } + else 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; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + f.ToRotationVector2() * num, 23f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 642) + { + float collisionPoint = 0.0f; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 30f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 632) + { + float collisionPoint = 0.0f; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 455) + { + float collisionPoint = 0.0f; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 36f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 611) + { + float collisionPoint = 0.0f; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity, 16f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 684) + { + float collisionPoint = 0.0f; + Vector2 vector2 = this.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(-1.57079637050629) * this.scale; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center - vector2 * 40f, this.Center + vector2 * 40f, 16f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 537) + { + float collisionPoint = 0.0f; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint)) + return true; + } + else if (this.type == 687) + { + float collisionPoint = 0.0f; + float num1 = this.ai[0] / 25f; + if ((double) num1 > 1.0) + num1 = 1f; + float num2 = (float) (((double) this.ai[0] - 38.0) / 40.0); + if ((double) num2 < 0.0) + num2 = 0.0f; + Vector2 lineStart = this.Center + this.rotation.ToRotationVector2() * 400f * num2; + Vector2 lineEnd = this.Center + this.rotation.ToRotationVector2() * 400f * num1; + if (Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), lineStart, lineEnd, 40f * this.scale, ref collisionPoint)) + return true; + } + else 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; + } + } + else 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 == 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 == 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; + 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.type != 344 && !this.npcProj) + { + 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].meleeEnchant > (byte) 0 && !this.noEnchantments) + { + 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) + { + 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) + { + 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) + { + 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) + { + 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) + { + 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) + { + 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) + { + int Type = Main.rand.Next(276, 283); + int index = Gore.NewGore(this.position, 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 (Main.player[this.owner].meleeEnchant == (byte) 8 && Main.rand.Next(4) == 0) + { + 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; + } + } + 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.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) + { + 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 velocity1 = 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.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 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; + } + Main.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 = 1.3f; + Main.dust[index4].alpha = 100; + Main.dust[index4].noGravity = true; + } + Main.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, 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; + } + Main.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 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; + } + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index9 = 0; index9 < 10; ++index9) + { + int index10 = Dust.NewDust(new Vector2(this.position.X - 6f, this.position.Y + (float) (this.height / 2)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index10].velocity.Y -= 4f; + Main.dust[index10].velocity.X *= 2.5f; + Main.dust[index10].scale = 1.3f; + Main.dust[index10].alpha = 100; + Main.dust[index10].noGravity = true; + } + Main.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, (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; + } + Main.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(velocity1, out int _, out int _); + if ((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) + { + 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 == 444)) + 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 num2 = (float) ((double) this.rotation + 1.57079637050629 + (Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num3 = (float) (Main.rand.NextDouble() * 2.0 + 2.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num2) * num3, (float) Math.Sin((double) num2) * num3); + 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 num4 = (float) ((double) this.rotation + 1.57079637050629 + (Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num5 = (float) (Main.rand.NextDouble() * 2.0 + 2.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num4) * num5, (float) Math.Sin((double) num4) * num5); + 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; + } + 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 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; + } + if (this.aiStyle == 29 || this.type == 28 || this.aiStyle == 49) + { + 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) + { + 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) + { + 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) + { + 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 == 582 || this.type == 634 || this.type == 635) + { + overrideWidth = 8; + overrideHeight = 8; + } + else if (this.type == 617) + { + overrideWidth = (int) (20.0 * (double) this.scale); + overrideHeight = (int) (20.0 * (double) this.scale); + } + 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 == 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.AnyCollision(this.position, this.velocity, this.width, this.height, true); + } + 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; + } + } + 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 ((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; + zero3 += Position + vector2_4 - this.position; + 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 ((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 ((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.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 (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 num8 = 1f; + bool flag8 = false; + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = velocity1.X * -num8; + flag8 = true; + } + if ((double) this.velocity.Y != (double) velocity1.Y || (double) this.velocity.Y == 0.0) + { + this.velocity.Y = (float) ((double) velocity1.Y * -(double) num8 * 0.5); + flag8 = true; + } + if (flag8) + { + float num9 = velocity1.Length() / this.velocity.Length(); + if ((double) num9 == 0.0) + num9 = 1f; + this.velocity = this.velocity / num9; + 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]; + Main.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 num10 = (float) (10.0 + (double) this.ai[0] * 4.0); + Vector2 vector2 = new Vector2(1.05f, 1f); + for (float num11 = 0.0f; (double) num11 < (double) num10; ++num11) + { + 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) num11 / (double) num10) * vector2 * (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + Main.dust[index].color = Main.hslToRgb(num11 / num10, 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 == 653) + { + if ((double) this.velocity.Y != (double) velocity1.Y && (double) this.velocity.Y == 0.0 && (double) velocity1.Y > 1.0 && (double) velocity1.Y < 4.0) + this.velocity.Y = (float) (-(double) velocity1.Y * 2.0); + } + 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.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 (!Main.projPet[this.type] && this.type != 500 && this.type != 650) + { + 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 == 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.penetrate > 0) + { + this.velocity.X = -velocity1.X; + this.velocity.Y = -velocity1.Y; + --this.penetrate; + } + 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: + NetMessage.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 num12 = 700; + int num13 = 20; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num14 = (this.Center - Main.npc[index].Center).Length(); + if ((double) num14 > (double) num13 && (double) num14 < (double) num12 && 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 num15 = this.velocity.Length(); + vector2.Normalize(); + this.velocity = vector2 * num15; + 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) + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < 2.0 || (double) this.ai[1] == 2.0) + { + this.ai[1] = 2f; + } + 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); + Main.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 == 444) + { + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 5.0) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.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); + Main.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) + { + bool flag10 = false; + if ((double) velocity1.X != (double) this.velocity.X) + { + if ((double) Math.Abs(velocity1.X) > 4.0) + flag10 = true; + this.position.X += this.velocity.X; + this.velocity.X = (float) (-(double) velocity1.X * 0.200000002980232); + } + if ((double) velocity1.Y != (double) this.velocity.Y) + { + if ((double) Math.Abs(velocity1.Y) > 4.0) + flag10 = true; + this.position.Y += this.velocity.Y; + this.velocity.Y = (float) (-(double) velocity1.Y * 0.200000002980232); + } + this.ai[0] = 1f; + if (flag10) + { + this.netUpdate = true; + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + if (this.wet) + wetVelocity = this.velocity; + } + 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; + Main.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) + { + 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; + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + else if (this.aiStyle == 8 && this.type != 96) + { + Main.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 == 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))) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(0, (int) this.Center.X, (int) this.Center.Y); + } + 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 == 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.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; + } + else if (this.aiStyle != 9 || this.owner == Main.myPlayer) + { + 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 UpdatePosition(Vector2 wetVelocity) + { + if (this.aiStyle == 4 || this.aiStyle == 38 || this.aiStyle == 84 || 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) + 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() + { + int index = (int) ((double) this.Center.X / 16.0); + int j1 = (int) ((double) this.Center.Y / 16.0); + if (Main.tile[index, j1].liquid < (byte) 0) + ++j1; + bool flag1 = false; + bool flag2 = false; + int i1 = index; + int i2 = index; + while (i1 > 10 && Main.tile[i1, j1].liquid > (byte) 0 && !WorldGen.SolidTile(i1, j1)) + --i1; + while (i2 < Main.maxTilesX - 10 && Main.tile[i2, j1].liquid > (byte) 0 && !WorldGen.SolidTile(i2, j1)) + ++i2; + int num1 = 0; + for (int i3 = i1; i3 <= i2; ++i3) + { + int j2 = j1; + while (Main.tile[i3, j2].liquid > (byte) 0 && !WorldGen.SolidTile(i3, j2) && j2 < Main.maxTilesY - 10) + { + ++num1; + ++j2; + if (Main.tile[i3, j2].lava()) + flag1 = true; + else if (Main.tile[i3, j2].honey()) + flag2 = true; + } + } + if (flag2) + num1 = (int) ((double) num1 * 1.5); + if (num1 < 75) + { + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.NotEnoughWater"); + } + else + { + int num2 = Main.player[this.owner].FishingLevel(); + if (num2 == 0) + return; + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FishingPower", (object) num2); + if (num2 < 0) + { + if (num2 != -1) + return; + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FishingWarning"); + if (index >= 380 && index <= Main.maxTilesX - 380 || num1 <= 1000 || NPC.AnyNPCs(370)) + return; + this.ai[1] = (float) (Main.rand.Next(-180, -60) - 100); + this.localAI[1] = (float) num2; + this.netUpdate = true; + } + else + { + int num3 = 300; + float num4 = (float) (Main.maxTilesX / 4200); + float num5 = (float) (((double) this.position.Y / 16.0 - (60.0 + 10.0 * (double) (num4 * num4))) / (Main.worldSurface / 6.0)); + if ((double) num5 < 0.25) + num5 = 0.25f; + if ((double) num5 > 1.0) + num5 = 1f; + int num6 = (int) ((double) num3 * (double) num5); + float num7 = (float) num1 / (float) num6; + if ((double) num7 < 1.0) + num2 = (int) ((double) num2 * (double) num7); + float num8 = 1f - num7; + if (num1 < num6) + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FullFishingPower", (object) num2, (object) -Math.Round((double) num8 * 100.0)); + int num9 = (num2 + 75) / 2; + if (Main.player[this.owner].wet || Main.rand.Next(100) > num9) + return; + int Type = 0; + int num10 = (double) j1 >= Main.worldSurface * 0.5 ? ((double) j1 >= Main.worldSurface ? ((double) j1 >= Main.rockLayer ? (j1 >= Main.maxTilesY - 300 ? 4 : 3) : 2) : 1) : 0; + int num11 = 150; + int maxValue1 = num11 / num2; + int maxValue2 = num11 * 2 / num2; + int maxValue3 = num11 * 7 / num2; + int maxValue4 = num11 * 15 / num2; + int maxValue5 = num11 * 30 / num2; + 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; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + if (Main.rand.Next(maxValue1) == 0) + flag3 = true; + if (Main.rand.Next(maxValue2) == 0) + flag4 = true; + if (Main.rand.Next(maxValue3) == 0) + flag5 = true; + if (Main.rand.Next(maxValue4) == 0) + flag6 = true; + if (Main.rand.Next(maxValue5) == 0) + flag7 = true; + int num12 = 10; + if (Main.player[this.owner].cratePotion) + num12 += 10; + int type = Main.anglerQuestItemNetIDs[Main.anglerQuest]; + if (Main.player[this.owner].HasItem(type)) + type = -1; + if (Main.anglerQuestFinished) + type = -1; + if (flag1) + { + if (!ItemID.Sets.CanFishInLava[Main.player[this.owner].HeldItem.type]) + return; + if (flag7) + Type = 2331; + else if (flag6) + Type = 2312; + else if (flag5) + Type = 2315; + } + else if (flag2) + { + if (flag5 || flag4 && Main.rand.Next(2) == 0) + Type = 2314; + else if (flag4 && type == 2451) + Type = 2451; + } + else if (Main.rand.Next(50) > num2 && Main.rand.Next(50) > num2 && num1 < num6) + Type = Main.rand.Next(2337, 2340); + else if (Main.rand.Next(100) < num12) + Type = !(flag6 | flag7) ? (!flag5 || !Main.player[this.owner].ZoneCorrupt ? (!flag5 || !Main.player[this.owner].ZoneCrimson ? (!flag5 || !Main.player[this.owner].ZoneHoly ? (!flag5 || !Main.player[this.owner].ZoneDungeon ? (!flag5 || !Main.player[this.owner].ZoneJungle ? (!flag5 || num10 != 0 ? (!flag4 ? 2334 : 2335) : 3206) : 3208) : 3205) : 3207) : 3204) : 3203) : 2336; + else if (flag7 && Main.rand.Next(5) == 0) + Type = 2423; + else if (flag7 && Main.rand.Next(5) == 0) + Type = 3225; + else if (flag7 && Main.rand.Next(10) == 0) + Type = 2420; + else if (((flag7 ? 0 : (!flag6 ? 1 : 0)) & (flag4 ? 1 : 0)) != 0 && Main.rand.Next(5) == 0) + { + Type = 3196; + } + else + { + bool flag8 = Main.player[this.owner].ZoneCorrupt; + bool flag9 = Main.player[this.owner].ZoneCrimson; + if (flag8 & flag9) + { + if (Main.rand.Next(2) == 0) + flag9 = false; + else + flag8 = false; + } + if (flag8) + { + if (flag7 && Main.hardMode && Main.player[this.owner].ZoneSnow && num10 == 3 && Main.rand.Next(3) != 0) + Type = 2429; + else if (flag7 && Main.hardMode && Main.rand.Next(2) == 0) + Type = 3210; + else if (flag5) + Type = 2330; + else if (flag4 && type == 2454) + Type = 2454; + else if (flag4 && type == 2485) + Type = 2485; + else if (flag4 && type == 2457) + Type = 2457; + else if (flag4) + Type = 2318; + } + else if (flag9) + { + if (flag7 && Main.hardMode && Main.player[this.owner].ZoneSnow && num10 == 3 && Main.rand.Next(3) != 0) + Type = 2429; + else if (flag7 && Main.hardMode && Main.rand.Next(2) == 0) + Type = 3211; + else if (flag4 && type == 2477) + Type = 2477; + else if (flag4 && type == 2463) + Type = 2463; + else if (flag4) + Type = 2319; + else if (flag3) + Type = 2305; + } + else if (Main.player[this.owner].ZoneHoly) + { + if (flag7 && Main.hardMode && Main.player[this.owner].ZoneSnow && num10 == 3 && Main.rand.Next(3) != 0) + Type = 2429; + else if (flag7 && Main.hardMode && Main.rand.Next(2) == 0) + Type = 3209; + else if (num10 > 1 & flag6) + Type = 2317; + else if (num10 > 1 & flag5 && type == 2465) + Type = 2465; + else if (num10 < 2 & flag5 && type == 2468) + Type = 2468; + else if (flag5) + Type = 2310; + else if (flag4 && type == 2471) + Type = 2471; + else if (flag4) + Type = 2307; + } + if (Type == 0 && Main.player[this.owner].ZoneSnow) + { + if (num10 < 2 & flag4 && type == 2467) + Type = 2467; + else if (num10 == 1 & flag4 && type == 2470) + Type = 2470; + else if (num10 >= 2 & flag4 && type == 2484) + Type = 2484; + else if (num10 > 1 & flag4 && type == 2466) + Type = 2466; + else if (flag3 && Main.rand.Next(12) == 0 || flag4 && Main.rand.Next(6) == 0) + Type = 3197; + else if (flag4) + Type = 2306; + else if (flag3) + Type = 2299; + else if (num10 > 1 && Main.rand.Next(3) == 0) + Type = 2309; + } + if (Type == 0 && Main.player[this.owner].ZoneJungle) + { + if (num10 == 1 & flag4 && type == 2452) + Type = 2452; + else if (num10 == 1 & flag4 && type == 2483) + Type = 2483; + else if (num10 == 1 & flag4 && type == 2488) + Type = 2488; + else if (num10 >= 1 & flag4 && type == 2486) + Type = 2486; + else if (num10 > 1 & flag4) + Type = 2311; + else if (flag4) + Type = 2313; + else if (flag3) + Type = 2302; + } + if (Type == 0 && Main.shroomTiles > 200 && flag4 && type == 2475) + Type = 2475; + if (Type == 0) + { + if (num10 <= 1 && (index < 380 || index > Main.maxTilesX - 380) && num1 > 1000) + { + Type = !flag6 || Main.rand.Next(2) != 0 ? (!flag6 ? (!flag5 || Main.rand.Next(5) != 0 ? (!flag5 || Main.rand.Next(2) != 0 ? (!flag4 || type != 2480 ? (!flag4 || type != 2481 ? (!flag4 ? (!flag3 || Main.rand.Next(2) != 0 ? (!flag3 ? 2297 : 2300) : 2301) : 2316) : 2481) : 2480) : 2332) : 2438) : 2342) : 2341; + } + else + { + int sandTiles = Main.sandTiles; + } + } + if (Type == 0) + Type = !(num10 < 2 & flag4) || type != 2461 ? (!(num10 == 0 & flag4) || type != 2453 ? (!(num10 == 0 & flag4) || type != 2473 ? (!(num10 == 0 & flag4) || type != 2476 ? (!(num10 < 2 & flag4) || type != 2458 ? (!(num10 < 2 & flag4) || type != 2459 ? (!(num10 == 0 & flag4) ? (((num10 <= 0 ? 0 : (num10 < 3 ? 1 : 0)) & (flag4 ? 1 : 0)) == 0 || type != 2455 ? (!(num10 == 1 & flag4) || type != 2479 ? (!(num10 == 1 & flag4) || type != 2456 ? (!(num10 == 1 & flag4) || type != 2474 ? (!(num10 > 1 & flag5) || Main.rand.Next(5) != 0 ? (!(num10 > 1 & flag7) ? (!(num10 > 1 & flag6) || Main.rand.Next(2) != 0 ? (!(num10 > 1 & flag5) ? (!(num10 > 1 & flag4) || type != 2478 ? (!(num10 > 1 & flag4) || type != 2450 ? (!(num10 > 1 & flag4) || type != 2464 ? (!(num10 > 1 & flag4) || type != 2469 ? (!(num10 > 2 & flag4) || type != 2462 ? (!(num10 > 2 & flag4) || type != 2482 ? (!(num10 > 2 & flag4) || type != 2472 ? (!(num10 > 2 & flag4) || type != 2460 ? (!(num10 > 1 & flag4) || Main.rand.Next(4) == 0 ? (num10 <= 1 || !(flag4 | flag3) && Main.rand.Next(4) != 0 ? (!flag4 || type != 2487 ? (!(num1 > 1000 & flag3) ? 2290 : 2298) : 2487) : (Main.rand.Next(4) != 0 ? 2309 : 2303)) : 2303) : 2460) : 2472) : 2482) : 2462) : 2469) : 2464) : 2450) : 2478) : 2321) : 2320) : 2308) : (!Main.hardMode || Main.rand.Next(2) != 0 ? 2436 : 2437)) : 2474) : 2456) : 2479) : 2455) : 2304) : 2459) : 2458) : 2476) : 2473) : 2453) : 2461; + } + if (Type <= 0) + return; + if (Main.player[this.owner].sonarPotion) + { + Item newItem = new Item(); + newItem.SetDefaults(Type); + newItem.position = this.position; + ItemText.NewText(newItem, 1, true); + } + float num13 = (float) num2; + this.ai[1] = (float) Main.rand.Next(-240, -90) - num13; + this.localAI[1] = (float) Type; + this.netUpdate = true; + } + } + } + + public bool CanReflect() => 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 float GetPrismHue(float indexing) + { + if (Main.player[this.owner].active) + { + switch (Main.player[this.owner].name) + { + case "Aeroblop": + return (float) (0.25 + Math.Cos(Main.time / 180.0 * 6.28318548202515) * 0.100000001490116); + case "Arkhalis": + case "Darkhalis": + return (float) (0.75 + Math.Cos(Main.time / 180.0 * 6.28318548202515) * 0.0700000002980232); + case "Devalaous": + return (float) (0.660000026226044 + Math.Cos(Main.time / 180.0 * 6.28318548202515) * 0.100000001490116); + case "Doylee": + return 0.0f; + case "Ghostar": + return 0.33f; + case "Grox The Great": + return (float) (0.310000002384186 + Math.Cos(Main.time / 120.0 * 6.28318548202515) * 0.0299999993294477); + case "Leinfors": + return 0.77f; + case "Nike Leon": + return (float) (0.0750000029802322 + Math.Cos(Main.time / 180.0 * 6.28318548202515) * 0.0700000002980232); + case "Random": + return Main.rand.NextFloat(); + case "Suweeka": + return (float) (0.5 + Math.Cos(Main.time / 180.0 * 6.28318548202515) * 0.180000007152557); + case "Tsuki": + case "Yoraiz0r": + return 0.85f; + case "W1K": + return (float) (0.75 + Math.Cos(Main.time / 120.0 * 6.28318548202515) * 0.0500000007450581); + } + } + return (float) (int) indexing / 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 void AI() + { + // ISSUE: The method is too long to display (80533 instructions) + } + + private void AI_061_FishingBobber() + { + this.timeLeft = 60; + if (Main.player[this.owner].inventory[Main.player[this.owner].selectedItem].fishingPole == 0 || Main.player[this.owner].CCed || Main.player[this.owner].noItems) + this.Kill(); + else if (Main.player[this.owner].inventory[Main.player[this.owner].selectedItem].shoot != this.type) + this.Kill(); + else if (Main.player[this.owner].pulley) + this.Kill(); + else if (Main.player[this.owner].dead) + this.Kill(); + if ((double) this.ai[1] > 0.0 && (double) this.localAI[1] >= 0.0) + { + this.localAI[1] = -1f; + if (!this.lavaWet && !this.honeyWet) + { + 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; + } + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + if ((double) this.ai[0] >= 1.0) + { + if ((double) this.ai[0] == 2.0) + { + ++this.ai[0]; + Main.PlaySound(SoundID.Item17, this.position); + if (!this.lavaWet && !this.honeyWet) + { + for (int index3 = 0; index3 < 100; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 6f, this.position.Y - 10f), 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; + } + Main.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + if ((double) this.localAI[0] < 100.0) + ++this.localAI[0]; + 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 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num3 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].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; + if (Main.myPlayer == this.owner && new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height).Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.player[this.owner].position.X, (int) Main.player[this.owner].position.Y, Main.player[this.owner].width, Main.player[this.owner].height))) + { + if ((double) this.ai[1] > 0.0 && (double) this.ai[1] < 3930.0) + { + int Type = (int) this.ai[1]; + Item newItem = new Item(); + newItem.SetDefaults(Type); + if (Type == 3196) + { + int num8 = Main.player[this.owner].FishingLevel(); + int minValue = (num8 / 20 + 3) / 2; + int num9 = (num8 / 10 + 6) / 2; + if (Main.rand.Next(50) < num8) + ++num9; + if (Main.rand.Next(100) < num8) + ++num9; + if (Main.rand.Next(150) < num8) + ++num9; + if (Main.rand.Next(200) < num8) + ++num9; + int num10 = Main.rand.Next(minValue, num9 + 1); + newItem.stack = num10; + } + if (Type == 3197) + { + int num11 = Main.player[this.owner].FishingLevel(); + int minValue = (num11 / 4 + 15) / 2; + int num12 = (num11 / 2 + 30) / 2; + if (Main.rand.Next(50) < num11) + num12 += 4; + if (Main.rand.Next(100) < num11) + num12 += 4; + if (Main.rand.Next(150) < num11) + num12 += 4; + if (Main.rand.Next(200) < num11) + num12 += 4; + int num13 = Main.rand.Next(minValue, num12 + 1); + newItem.stack = num13; + } + newItem.newAndShiny = true; + if (Main.player[this.owner].GetItem(this.owner, newItem).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) + 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; + ItemText.NewText(newItem, 0); + } + } + this.Kill(); + } + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + else + { + bool flag = false; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num14 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num15 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y; + this.rotation = (float) Math.Atan2((double) num15, (double) num14) + 1.57f; + if (Math.Sqrt((double) num14 * (double) num14 + (double) num15 * (double) num15) > 900.0) + this.ai[0] = 1f; + if (this.wet) + { + this.rotation = 0.0f; + this.velocity.X *= 0.9f; + int index5 = (int) ((double) this.Center.X + (double) ((this.width / 2 + 8) * this.direction)) / 16; + int index6 = (int) ((double) this.Center.Y / 16.0); + double num16 = (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; + int index8 = (int) ((double) this.Center.X / 16.0); + int index9 = (int) ((double) this.Center.Y / 16.0); + float num17 = this.position.Y + (float) this.height; + if (Main.tile[index8, index9 - 1] == null) + Main.tile[index8, index9 - 1] = new Tile(); + if (Main.tile[index8, index9] == null) + Main.tile[index8, index9] = new Tile(); + if (Main.tile[index8, index9 + 1] == null) + Main.tile[index8, index9 + 1] = new Tile(); + if (Main.tile[index8, index9 - 1].liquid > (byte) 0) + num17 = (float) (index9 * 16) - (float) ((int) Main.tile[index8, index9 - 1].liquid / 16); + else if (Main.tile[index8, index9].liquid > (byte) 0) + num17 = (float) ((index9 + 1) * 16) - (float) ((int) Main.tile[index8, index9].liquid / 16); + else if (Main.tile[index8, index9 + 1].liquid > (byte) 0) + num17 = (float) ((index9 + 2) * 16) - (float) ((int) Main.tile[index8, index9 + 1].liquid / 16); + if ((double) this.Center.Y > (double) num17) + { + 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) num17) + this.velocity.Y = num17 - this.Center.Y; + } + else + this.velocity.Y = num17 - this.Center.Y; + if ((double) this.velocity.Y >= -0.01 && (double) this.velocity.Y <= 0.01) + flag = 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) + { + int num18 = Main.player[this.owner].FishingLevel(); + if (num18 < 0 && num18 == -1) + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FishingWarning"); + } + if ((double) this.ai[1] != 0.0) + flag = true; + if (!flag) + return; + if ((double) this.ai[1] == 0.0 && Main.myPlayer == this.owner) + { + int num19 = Main.player[this.owner].FishingLevel(); + if (num19 == -9000) + { + this.localAI[1] += 5f; + this.localAI[1] += (float) Main.rand.Next(1, 3); + if ((double) this.localAI[1] <= 660.0) + return; + this.localAI[1] = 0.0f; + this.FishingCheck(); + } + else + { + if (Main.rand.Next(300) < num19) + this.localAI[1] += (float) Main.rand.Next(1, 3); + this.localAI[1] += (float) (num19 / 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) this.velocity.Y >= -0.01 && (double) this.velocity.Y <= 0.01) + { + 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 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); + Projectile projectile = Main.projectile[index2]; + for (int index3 = 0; index3 < this.localNPCImmunity.Length; ++index3) + projectile.localNPCImmunity[index3] = this.localNPCImmunity[index3]; + } + } + + 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]; + } + } + 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; + Main.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; + Main.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; + Main.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; + Main.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); + Main.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) + Main.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; + Main.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; + Main.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; + Main.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) + { + 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; + Main.PlaySound(SoundID.Item17, this.position); + } + } + else if (this.type == 605) + { + if (this.alpha == 0 && Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(this.position - this.velocity * 3f, this.width, this.height, 4, Alpha: 50, newColor: new Color(78, 136, (int) byte.MaxValue, 150), Scale: 1.2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity += this.velocity * 0.3f; + Main.dust[index].noGravity = true; + } + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, 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; + Main.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(2) == 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.79999995231628 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + } + 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) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].velocity *= 0.05f; + } + } + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.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(2) == 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.79999995231628 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + } + 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) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].velocity *= 0.05f; + } + } + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.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; + Main.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 408 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.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; + Main.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 110 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 302 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 438 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 593 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 592 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.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) + Main.PlaySound(SoundID.Item124, this.position); + else + Main.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; + Main.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 389 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 257 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 100 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 98 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 184 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 195 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 275 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 276 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, this.position); + } + else if ((this.type == 81 || this.type == 82) && (double) this.ai[1] == 0.0) + { + Main.PlaySound(SoundID.Item5, this.position); + this.ai[1] = 1f; + } + else if (this.type == 180 && (double) this.ai[1] == 0.0) + { + Main.PlaySound(SoundID.Item11, this.position); + this.ai[1] = 1f; + } + else if (this.type == 248 && (double) this.ai[1] == 0.0) + { + Main.PlaySound(SoundID.Item17, this.position); + this.ai[1] = 1f; + } + else if (this.type == 576 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 577 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + Main.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 == 374) + { + if ((double) this.localAI[0] == 0.0) + { + Main.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) + Main.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.PerLinePoint(DelegateMethods.CastLightOpen)); + if (this.alpha > 0) + { + Main.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.PerLinePoint(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 = Main.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 = Main.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.PerLinePoint(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 == 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_608; + } + else if (type != 36 && type != 38 && type != 55) + goto label_608; + } + else if (type <= 98) + { + if ((uint) (type - 83) > 1U && (uint) (type - 88) > 1U && type != 98) + goto label_608; + } + else if (type <= 104) + { + if (type != 100 && type != 104) + goto label_608; + } + else if (type != 110 && (uint) (type - 158) > 3U) + goto label_608; + } + else if (type <= 259) + { + if (type <= 242) + { + if (type != 180 && type != 184 && type != 242) + goto label_608; + } + else if (type != 248 && type != 257 && type != 259) + goto label_608; + } + else if (type <= 279) + { + if (type != 265 && type != 270 && type != 279) + goto label_608; + } + else if (type <= 299) + { + if ((uint) (type - 283) > 4U && type != 299) + goto label_608; + } + else if (type != 302 && type != 323) + goto label_608; + } + else if (type <= 485) + { + if (type <= 389) + { + if (type <= 355) + { + if (type != 325 && (uint) (type - 348) > 2U && type != 355) + goto label_608; + } + else if (type != 374 && type != 376 && type != 389) + goto label_608; + } + 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_608; + default: + if (type == 449 || type == 459) + break; + goto label_608; + } + } + else if (type <= 469) + { + if (type != 462 && (uint) (type - 467) > 2U) + goto label_608; + } + else if (type != 472 && (uint) (type - 483) > 2U) + goto label_608; + } + else if (type <= 606) + { + if (type <= 585) + { + if (type != 498 && (uint) (type - 576) > 1U && type != 585) + goto label_608; + } + else if ((uint) (type - 592) > 1U && type != 601 && type != 606) + goto label_608; + } + else if (type <= 639) + { + if (type != 616 && (uint) (type - 634) > 1U && (uint) (type - 638) > 1U) + goto label_608; + } + else if (type <= 682) + { + if ((uint) (type - 660) > 1U && type != 682) + goto label_608; + } + else if (type != 684) + { + switch (type - 706) + { + case 0: + case 3: + case 4: + case 6: + break; + default: + goto label_608; + } + } + flag1 = false; +label_608: + 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.ai[0] < 0.0) + { + if ((double) this.velocity.Length() < 18.0) + this.velocity = this.velocity * 1.02f; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + Main.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; + } + } + this.friendly = false; + this.hostile = true; + } + } + if (this.type == 585) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + Main.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) + { + Main.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; + Main.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; + Main.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; + Main.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 == 675) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + Main.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; + Main.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; + Main.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) + { + Main.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) + { + if ((double) this.ai[0] < 0.0) + 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 ((double) this.ai[0] < 0.0) + { + 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) + { + if (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; + 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) + { + 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.windSpeed * 0.2f; + this.velocity.X += Main.windSpeed * 0.1f; + } + else if (this.type == 336 || this.type == 345) + { + if (this.type == 345 && (double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + Main.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; + } + } + 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]; + Main.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 == 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.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 == 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 != 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_026() + { + if (!Main.player[this.owner].active) + { + this.active = false; + } + else + { + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + int num1 = 85; + bool flag5 = this.type >= 191 && this.type <= 194; + if (this.type == 324) + num1 = 120; + if (this.type == 112) + num1 = 100; + if (this.type == (int) sbyte.MaxValue) + num1 = 50; + if (flag5) + { + if (this.lavaWet) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + } + num1 = 60 + 30 * this.minionPos; + } + else if (this.type == 266) + num1 = 60 + 30 * this.minionPos; + if (this.type == 111) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].bunny = false; + if (Main.player[this.owner].bunny) + this.timeLeft = 2; + } + if (this.type == 112) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].penguin = false; + if (Main.player[this.owner].penguin) + this.timeLeft = 2; + } + if (this.type == 334) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].puppy = false; + if (Main.player[this.owner].puppy) + this.timeLeft = 2; + } + if (this.type == 353) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].grinch = false; + if (Main.player[this.owner].grinch) + this.timeLeft = 2; + } + if (this.type == (int) sbyte.MaxValue) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].turtle = false; + if (Main.player[this.owner].turtle) + this.timeLeft = 2; + } + if (this.type == 175) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].eater = false; + if (Main.player[this.owner].eater) + this.timeLeft = 2; + } + if (this.type == 197) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].skeletron = false; + if (Main.player[this.owner].skeletron) + this.timeLeft = 2; + } + if (this.type == 198) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].hornet = false; + if (Main.player[this.owner].hornet) + this.timeLeft = 2; + } + if (this.type == 199) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].tiki = false; + if (Main.player[this.owner].tiki) + this.timeLeft = 2; + } + if (this.type == 200) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].lizard = false; + if (Main.player[this.owner].lizard) + this.timeLeft = 2; + } + if (this.type == 208) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].parrot = false; + if (Main.player[this.owner].parrot) + this.timeLeft = 2; + } + if (this.type == 209) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].truffle = false; + if (Main.player[this.owner].truffle) + this.timeLeft = 2; + } + if (this.type == 210) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].sapling = false; + if (Main.player[this.owner].sapling) + this.timeLeft = 2; + } + if (this.type == 324) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].cSapling = false; + if (Main.player[this.owner].cSapling) + this.timeLeft = 2; + } + if (this.type == 313) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].spider = false; + if (Main.player[this.owner].spider) + this.timeLeft = 2; + } + if (this.type == 314) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].squashling = false; + if (Main.player[this.owner].squashling) + this.timeLeft = 2; + } + if (this.type == 211) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].wisp = false; + if (Main.player[this.owner].wisp) + this.timeLeft = 2; + } + if (this.type == 236) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].dino = false; + if (Main.player[this.owner].dino) + this.timeLeft = 2; + } + if (this.type == 499) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].babyFaceMonster = false; + if (Main.player[this.owner].babyFaceMonster) + this.timeLeft = 2; + } + if (this.type == 266) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].slime = false; + if (Main.player[this.owner].slime) + this.timeLeft = 2; + } + if (this.type == 268) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].eyeSpring = false; + if (Main.player[this.owner].eyeSpring) + this.timeLeft = 2; + } + if (this.type == 269) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].snowman = false; + if (Main.player[this.owner].snowman) + this.timeLeft = 2; + } + if (this.type == 319) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].blackCat = false; + if (Main.player[this.owner].blackCat) + this.timeLeft = 2; + } + if (this.type == 380) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].zephyrfish = false; + if (Main.player[this.owner].zephyrfish) + this.timeLeft = 2; + } + if (flag5) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].pygmy = false; + if (Main.player[this.owner].pygmy) + this.timeLeft = Main.rand.Next(2, 10); + } + if (this.type >= 390 && this.type <= 392) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].spiderMinion = false; + if (Main.player[this.owner].spiderMinion) + this.timeLeft = 2; + } + if (this.type == 398) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].miniMinotaur = false; + if (Main.player[this.owner].miniMinotaur) + this.timeLeft = 2; + } + if (flag5 || this.type == 266 || this.type >= 390 && this.type <= 392) + { + int num2 = 10; + int num3 = 40 * (this.minionPos + 1) * Main.player[this.owner].direction; + if ((double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) < (double) this.position.X + (double) (this.width / 2) - (double) num2 + (double) num3) + flag1 = true; + else if ((double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) > (double) this.position.X + (double) (this.width / 2) + (double) num2 + (double) num3) + flag2 = true; + } + else if ((double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) < (double) this.position.X + (double) (this.width / 2) - (double) num1) + flag1 = true; + else if ((double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) > (double) this.position.X + (double) (this.width / 2) + (double) num1) + flag2 = true; + if (this.type == 175) + { + float num4 = 0.1f; + this.tileCollide = false; + int num5 = 300; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num6 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num7 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y; + if (this.type == (int) sbyte.MaxValue) + num7 = Main.player[this.owner].position.Y - vector2.Y; + float num8 = (float) Math.Sqrt((double) num6 * (double) num6 + (double) num7 * (double) num7); + float num9 = 7f; + if ((double) num8 < (double) num5 && (double) Main.player[this.owner].velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + if ((double) num8 < 150.0) + { + if ((double) Math.Abs(this.velocity.X) > 2.0 || (double) Math.Abs(this.velocity.Y) > 2.0) + this.velocity = this.velocity * 0.99f; + num4 = 0.01f; + if ((double) num6 < -2.0) + num6 = -2f; + if ((double) num6 > 2.0) + num6 = 2f; + if ((double) num7 < -2.0) + num7 = -2f; + if ((double) num7 > 2.0) + num7 = 2f; + } + else + { + if ((double) num8 > 300.0) + num4 = 0.2f; + float num10 = num9 / num8; + num6 *= num10; + num7 *= num10; + } + if ((double) Math.Abs(num6) > (double) Math.Abs(num7) || (double) num4 == 0.0500000007450581) + { + if ((double) this.velocity.X < (double) num6) + { + this.velocity.X += num4; + if ((double) num4 > 0.0500000007450581 && (double) this.velocity.X < 0.0) + this.velocity.X += num4; + } + if ((double) this.velocity.X > (double) num6) + { + this.velocity.X -= num4; + if ((double) num4 > 0.0500000007450581 && (double) this.velocity.X > 0.0) + this.velocity.X -= num4; + } + } + if ((double) Math.Abs(num6) <= (double) Math.Abs(num7) || (double) num4 == 0.0500000007450581) + { + if ((double) this.velocity.Y < (double) num7) + { + this.velocity.Y += num4; + if ((double) num4 > 0.0500000007450581 && (double) this.velocity.Y < 0.0) + this.velocity.Y += num4; + } + if ((double) this.velocity.Y > (double) num7) + { + this.velocity.Y -= num4; + if ((double) num4 > 0.0500000007450581 && (double) this.velocity.Y > 0.0) + this.velocity.Y -= num4; + } + } + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) - 1.57f; + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame <= 1) + return; + this.frame = 0; + } + else if (this.type == 197) + { + float num11 = 0.1f; + this.tileCollide = false; + int num12 = 300; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num13 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num14 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y; + if (this.type == (int) sbyte.MaxValue) + num14 = Main.player[this.owner].position.Y - vector2.Y; + float num15 = (float) Math.Sqrt((double) num13 * (double) num13 + (double) num14 * (double) num14); + float num16 = 3f; + if ((double) num15 > 500.0) + this.localAI[0] = 10000f; + if ((double) this.localAI[0] >= 10000.0) + num16 = 14f; + if ((double) num15 < (double) num12 && (double) Main.player[this.owner].velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + if ((double) num15 < 150.0) + { + if ((double) Math.Abs(this.velocity.X) > 2.0 || (double) Math.Abs(this.velocity.Y) > 2.0) + this.velocity = this.velocity * 0.99f; + num11 = 0.01f; + if ((double) num13 < -2.0) + num13 = -2f; + if ((double) num13 > 2.0) + num13 = 2f; + if ((double) num14 < -2.0) + num14 = -2f; + if ((double) num14 > 2.0) + num14 = 2f; + } + else + { + if ((double) num15 > 300.0) + num11 = 0.2f; + float num17 = num16 / num15; + num13 *= num17; + num14 *= num17; + } + if ((double) this.velocity.X < (double) num13) + { + this.velocity.X += num11; + if ((double) num11 > 0.0500000007450581 && (double) this.velocity.X < 0.0) + this.velocity.X += num11; + } + if ((double) this.velocity.X > (double) num13) + { + this.velocity.X -= num11; + if ((double) num11 > 0.0500000007450581 && (double) this.velocity.X > 0.0) + this.velocity.X -= num11; + } + if ((double) this.velocity.Y < (double) num14) + { + this.velocity.Y += num11; + if ((double) num11 > 0.0500000007450581 && (double) this.velocity.Y < 0.0) + this.velocity.Y += num11; + } + if ((double) this.velocity.Y > (double) num14) + { + this.velocity.Y -= num11; + if ((double) num11 > 0.0500000007450581 && (double) this.velocity.Y > 0.0) + this.velocity.Y -= num11; + } + this.localAI[0] += (float) Main.rand.Next(10); + if ((double) this.localAI[0] > 10000.0) + { + if ((double) this.localAI[1] == 0.0) + this.localAI[1] = (double) this.velocity.X >= 0.0 ? 1f : -1f; + this.rotation += 0.25f * this.localAI[1]; + if ((double) this.localAI[0] > 12000.0) + this.localAI[0] = 0.0f; + } + else + { + this.localAI[1] = 0.0f; + float num18 = this.velocity.X * 0.1f; + if ((double) this.rotation > (double) num18) + { + this.rotation -= (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00999999977648258); + if ((double) this.rotation < (double) num18) + this.rotation = num18; + } + if ((double) this.rotation < (double) num18) + { + this.rotation += (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00999999977648258); + if ((double) this.rotation > (double) num18) + this.rotation = num18; + } + } + if ((double) this.rotation > 6.28) + this.rotation -= 6.28f; + if ((double) this.rotation >= -6.28) + return; + this.rotation += 6.28f; + } + else if (this.type == 198 || this.type == 380) + { + float num19 = 0.4f; + if (this.type == 380) + num19 = 0.3f; + this.tileCollide = false; + int num20 = 100; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num21 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num22 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y + (float) Main.rand.Next(-10, 21); + float num23 = num21 + (float) Main.rand.Next(-10, 21) + (float) (60 * -Main.player[this.owner].direction); + float num24 = num22 - 60f; + if (this.type == (int) sbyte.MaxValue) + num24 = Main.player[this.owner].position.Y - vector2.Y; + float num25 = (float) Math.Sqrt((double) num23 * (double) num23 + (double) num24 * (double) num24); + float num26 = 14f; + if (this.type == 380) + num26 = 6f; + if ((double) num25 < (double) num20 && (double) Main.player[this.owner].velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + if ((double) num25 < 50.0) + { + if ((double) Math.Abs(this.velocity.X) > 2.0 || (double) Math.Abs(this.velocity.Y) > 2.0) + this.velocity = this.velocity * 0.99f; + num19 = 0.01f; + } + else + { + if (this.type == 380) + { + if ((double) num25 < 100.0) + num19 = 0.1f; + if ((double) num25 > 300.0) + num19 = 0.4f; + } + else if (this.type == 198) + { + if ((double) num25 < 100.0) + num19 = 0.1f; + if ((double) num25 > 300.0) + num19 = 0.6f; + } + float num27 = num26 / num25; + num23 *= num27; + num24 *= num27; + } + if ((double) this.velocity.X < (double) num23) + { + this.velocity.X += num19; + if ((double) num19 > 0.0500000007450581 && (double) this.velocity.X < 0.0) + this.velocity.X += num19; + } + if ((double) this.velocity.X > (double) num23) + { + this.velocity.X -= num19; + if ((double) num19 > 0.0500000007450581 && (double) this.velocity.X > 0.0) + this.velocity.X -= num19; + } + if ((double) this.velocity.Y < (double) num24) + { + this.velocity.Y += num19; + if ((double) num19 > 0.0500000007450581 && (double) this.velocity.Y < 0.0) + this.velocity.Y += num19 * 2f; + } + if ((double) this.velocity.Y > (double) num24) + { + this.velocity.Y -= num19; + if ((double) num19 > 0.0500000007450581 && (double) this.velocity.Y > 0.0) + this.velocity.Y -= num19 * 2f; + } + if ((double) this.velocity.X > 0.25) + this.direction = -1; + else if ((double) this.velocity.X < -0.25) + this.direction = 1; + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.05f; + ++this.frameCounter; + int num28 = 2; + if (this.type == 380) + num28 = 5; + if (this.frameCounter > num28) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame <= 3) + return; + this.frame = 0; + } + else if (this.type == 211) + { + float num29 = 0.2f; + float num30 = 5f; + this.tileCollide = false; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num31 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num32 = Main.player[this.owner].position.Y + Main.player[this.owner].gfxOffY + (float) (Main.player[this.owner].height / 2) - vector2.Y; + if (Main.player[this.owner].controlLeft) + num31 -= 120f; + else if (Main.player[this.owner].controlRight) + num31 += 120f; + float num33; + if (Main.player[this.owner].controlDown) + { + num33 = num32 + 120f; + } + else + { + if (Main.player[this.owner].controlUp) + num32 -= 120f; + num33 = num32 - 60f; + } + float num34 = (float) Math.Sqrt((double) num31 * (double) num31 + (double) num33 * (double) num33); + if ((double) num34 > 1000.0) + { + this.position.X += num31; + this.position.Y += num33; + } + if ((double) this.localAI[0] == 1.0) + { + if ((double) num34 < 10.0 && (double) Math.Abs(Main.player[this.owner].velocity.X) + (double) Math.Abs(Main.player[this.owner].velocity.Y) < (double) num30 && (double) Main.player[this.owner].velocity.Y == 0.0) + this.localAI[0] = 0.0f; + float num35 = 12f; + if ((double) num34 < (double) num35) + { + this.velocity.X = num31; + this.velocity.Y = num33; + } + else + { + float num36 = num35 / num34; + this.velocity.X = num31 * num36; + this.velocity.Y = num33 * num36; + } + if ((double) this.velocity.X > 0.5) + this.direction = -1; + else if ((double) this.velocity.X < -0.5) + this.direction = 1; + this.spriteDirection = this.direction; + this.rotation -= (float) (0.200000002980232 + (double) Math.Abs(this.velocity.X) * 0.025000000372529) * (float) this.direction; + ++this.frameCounter; + if (this.frameCounter > 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 5) + this.frame = 5; + if (this.frame > 9) + this.frame = 5; + for (int index1 = 0; index1 < 2; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X + 3f, this.position.Y + 4f), 14, 14, 156); + Main.dust[index2].velocity *= 0.2f; + Main.dust[index2].noGravity = true; + Main.dust[index2].scale = 1.25f; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cLight, Main.player[this.owner]); + } + } + else + { + if ((double) num34 > 200.0) + this.localAI[0] = 1f; + if ((double) this.velocity.X > 0.5) + this.direction = -1; + else if ((double) this.velocity.X < -0.5) + this.direction = 1; + this.spriteDirection = this.direction; + if ((double) num34 < 10.0) + { + this.velocity.X = num31; + this.velocity.Y = num33; + this.rotation = this.velocity.X * 0.05f; + if ((double) num34 < (double) num30) + { + this.position = this.position + this.velocity; + this.velocity = this.velocity * 0.0f; + num29 = 0.0f; + } + this.direction = -Main.player[this.owner].direction; + } + float num37 = num30 / num34; + float num38 = num31 * num37; + float num39 = num33 * num37; + if ((double) this.velocity.X < (double) num38) + { + this.velocity.X += num29; + if ((double) this.velocity.X < 0.0) + this.velocity.X *= 0.99f; + } + if ((double) this.velocity.X > (double) num38) + { + this.velocity.X -= num29; + if ((double) this.velocity.X > 0.0) + this.velocity.X *= 0.99f; + } + if ((double) this.velocity.Y < (double) num39) + { + this.velocity.Y += num29; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.99f; + } + if ((double) this.velocity.Y > (double) num39) + { + this.velocity.Y -= num29; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.99f; + } + if ((double) this.velocity.X != 0.0 || (double) this.velocity.Y != 0.0) + this.rotation = this.velocity.X * 0.05f; + ++this.frameCounter; + if (this.frameCounter > 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame <= 4) + return; + this.frame = 0; + } + } + else if (this.type == 199) + { + float num40 = 0.1f; + this.tileCollide = false; + int num41 = 200; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num42 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + float num43 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y - 60f; + float num44 = num42 - 2f; + if (this.type == (int) sbyte.MaxValue) + num43 = Main.player[this.owner].position.Y - vector2.Y; + float num45 = (float) Math.Sqrt((double) num44 * (double) num44 + (double) num43 * (double) num43); + float num46 = 4f; + double num47 = (double) num45; + if ((double) num45 < (double) num41 && (double) Main.player[this.owner].velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + if ((double) num45 < 4.0) + { + this.velocity.X = num44; + this.velocity.Y = num43; + num40 = 0.0f; + } + else + { + if ((double) num45 > 350.0) + { + num40 = 0.2f; + num46 = 10f; + } + float num48 = num46 / num45; + num44 *= num48; + num43 *= num48; + } + if ((double) this.velocity.X < (double) num44) + { + this.velocity.X += num40; + if ((double) this.velocity.X < 0.0) + this.velocity.X += num40; + } + if ((double) this.velocity.X > (double) num44) + { + this.velocity.X -= num40; + if ((double) this.velocity.X > 0.0) + this.velocity.X -= num40; + } + if ((double) this.velocity.Y < (double) num43) + { + this.velocity.Y += num40; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += num40; + } + if ((double) this.velocity.Y > (double) num43) + { + this.velocity.Y -= num40; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= num40; + } + this.direction = -Main.player[this.owner].direction; + this.spriteDirection = 1; + this.rotation = this.velocity.Y * 0.05f * (float) -this.direction; + if (num47 >= 50.0) + { + ++this.frameCounter; + if (this.frameCounter <= 6) + return; + this.frameCounter = 0; + if ((double) this.velocity.X < 0.0) + { + if (this.frame < 2) + ++this.frame; + if (this.frame <= 2) + return; + --this.frame; + } + else + { + if (this.frame < 6) + ++this.frame; + if (this.frame <= 6) + return; + --this.frame; + } + } + else + { + ++this.frameCounter; + if (this.frameCounter > 6) + { + this.frame += this.direction; + this.frameCounter = 0; + } + if (this.frame > 7) + this.frame = 0; + if (this.frame >= 0) + return; + this.frame = 7; + } + } + else + { + if ((double) this.ai[1] == 0.0) + { + int num49 = 500; + if (this.type == (int) sbyte.MaxValue) + num49 = 200; + if (this.type == 208) + num49 = 300; + if (flag5 || this.type == 266 || this.type >= 390 && this.type <= 392) + { + num49 += 40 * this.minionPos; + if ((double) this.localAI[0] > 0.0) + num49 += 500; + if (this.type == 266 && (double) this.localAI[0] > 0.0) + num49 += 100; + if (this.type >= 390 && this.type <= 392 && (double) this.localAI[0] > 0.0) + num49 += 400; + } + if (Main.player[this.owner].rocketDelay2 > 0) + this.ai[0] = 1f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num50 = (double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) - (double) vector2.X; + float num51 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y; + float num52 = (float) Math.Sqrt(num50 * num50 + (double) num51 * (double) num51); + if ((double) num52 > 2000.0) + { + this.position.X = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - (float) (this.width / 2); + this.position.Y = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - (float) (this.height / 2); + } + else if ((double) num52 > (double) num49 || (double) Math.Abs(num51) > 300.0 && (!flag5 && this.type != 266 && (this.type < 390 || this.type > 392) || (double) this.localAI[0] <= 0.0)) + { + if (this.type != 324) + { + if ((double) num51 > 0.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y = 0.0f; + if ((double) num51 < 0.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y = 0.0f; + } + this.ai[0] = 1f; + } + } + if (this.type == 209 && (double) this.ai[0] != 0.0) + { + if ((double) Main.player[this.owner].velocity.Y == 0.0 && this.alpha >= 100) + { + this.position.X = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - (float) (this.width / 2); + this.position.Y = Main.player[this.owner].position.Y + (float) Main.player[this.owner].height - (float) this.height; + this.ai[0] = 0.0f; + } + else + { + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + this.alpha += 5; + if (this.alpha <= (int) byte.MaxValue) + return; + this.alpha = (int) byte.MaxValue; + } + } + else if ((double) this.ai[0] != 0.0) + { + float num53 = 0.2f; + int num54 = 200; + if (this.type == (int) sbyte.MaxValue) + num54 = 100; + if (flag5) + { + num53 = 0.5f; + num54 = 100; + } + this.tileCollide = false; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num55 = Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - vector2.X; + if (flag5 || this.type == 266 || this.type >= 390 && this.type <= 392) + { + num55 -= (float) (40 * Main.player[this.owner].direction); + float num56 = 700f; + if (flag5) + num56 += 100f; + bool flag6 = false; + int num57 = -1; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num58 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num59 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + if ((double) Math.Abs(Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2) - num58) + (double) Math.Abs(Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - num59) < (double) num56) + { + if (Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + num57 = index; + flag6 = true; + break; + } + } + } + if (!flag6) + num55 -= (float) (40 * this.minionPos * Main.player[this.owner].direction); + if (flag6 && num57 >= 0) + this.ai[0] = 0.0f; + } + float num60 = Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2) - vector2.Y; + if (this.type == (int) sbyte.MaxValue) + num60 = Main.player[this.owner].position.Y - vector2.Y; + float num61 = (float) Math.Sqrt((double) num55 * (double) num55 + (double) num60 * (double) num60); + float num62 = 10f; + float num63 = num61; + if (this.type == 111) + num62 = 11f; + if (this.type == (int) sbyte.MaxValue) + num62 = 9f; + if (this.type == 324) + num62 = 20f; + if (flag5) + { + num53 = 0.4f; + num62 = 12f; + if ((double) num62 < (double) Math.Abs(Main.player[this.owner].velocity.X) + (double) Math.Abs(Main.player[this.owner].velocity.Y)) + num62 = Math.Abs(Main.player[this.owner].velocity.X) + Math.Abs(Main.player[this.owner].velocity.Y); + } + if (this.type == 208 && (double) Math.Abs(Main.player[this.owner].velocity.X) + (double) Math.Abs(Main.player[this.owner].velocity.Y) > 4.0) + num54 = -1; + if ((double) num61 < (double) num54 && (double) Main.player[this.owner].velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + float num64; + float num65; + if ((double) num61 < 60.0) + { + num64 = this.velocity.X; + num65 = this.velocity.Y; + } + else + { + float num66 = num62 / num61; + num64 = num55 * num66; + num65 = num60 * num66; + } + if (this.type == 324) + { + if ((double) num63 > 1000.0) + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num62 - 1.25) + this.velocity = this.velocity * 1.025f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num62 + 1.25) + this.velocity = this.velocity * 0.975f; + } + else if ((double) num63 > 600.0) + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num62 - 1.0) + this.velocity = this.velocity * 1.05f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num62 + 1.0) + this.velocity = this.velocity * 0.95f; + } + else if ((double) num63 > 400.0) + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num62 - 0.5) + this.velocity = this.velocity * 1.075f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num62 + 0.5) + this.velocity = this.velocity * 0.925f; + } + else + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num62 - 0.25) + this.velocity = this.velocity * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num62 + 0.25) + this.velocity = this.velocity * 0.9f; + } + this.velocity.X = (float) (((double) this.velocity.X * 34.0 + (double) num64) / 35.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 34.0 + (double) num65) / 35.0); + } + else + { + if ((double) this.velocity.X < (double) num64) + { + this.velocity.X += num53; + if ((double) this.velocity.X < 0.0) + this.velocity.X += num53 * 1.5f; + } + if ((double) this.velocity.X > (double) num64) + { + this.velocity.X -= num53; + if ((double) this.velocity.X > 0.0) + this.velocity.X -= num53 * 1.5f; + } + if ((double) this.velocity.Y < (double) num65) + { + this.velocity.Y += num53; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += num53 * 1.5f; + } + if ((double) this.velocity.Y > (double) num65) + { + this.velocity.Y -= num53; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= num53 * 1.5f; + } + } + if (this.type == 111) + this.frame = 7; + if (this.type == 112) + this.frame = 2; + if (flag5 && this.frame < 12) + { + this.frame = Main.rand.Next(12, 18); + this.frameCounter = 0; + } + if (this.type != 313) + { + if ((double) this.velocity.X > 0.5) + this.spriteDirection = -1; + else if ((double) this.velocity.X < -0.5) + this.spriteDirection = 1; + } + if (this.type == 398) + { + if ((double) this.velocity.X > 0.5) + this.spriteDirection = 1; + else if ((double) this.velocity.X < -0.5) + this.spriteDirection = -1; + } + if (this.type == 112) + this.rotation = this.spriteDirection != -1 ? (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f : (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + else if (this.type >= 390 && this.type <= 392) + { + int index3 = (int) ((double) this.Center.X / 16.0); + int index4 = (int) ((double) this.Center.Y / 16.0); + if (Main.tile[index3, index4] != null && Main.tile[index3, index4].wall > (byte) 0) + { + this.rotation = this.velocity.ToRotation() + 1.570796f; + this.frameCounter += (int) ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)); + if (this.frameCounter > 5) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 7) + this.frame = 4; + if (this.frame < 4) + this.frame = 7; + } + else + { + ++this.frameCounter; + if (this.frameCounter > 2) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 8 || this.frame > 10) + this.frame = 8; + this.rotation = this.velocity.X * 0.1f; + } + } + else if (this.type == 334) + { + ++this.frameCounter; + if (this.frameCounter > 1) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 7 || this.frame > 10) + this.frame = 7; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type == 353) + { + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 10 || this.frame > 13) + this.frame = 10; + this.rotation = this.velocity.X * 0.05f; + } + else if (this.type == (int) sbyte.MaxValue) + { + this.frameCounter += 3; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame <= 5 || this.frame > 15) + this.frame = 6; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type == 269) + { + if (this.frame == 6) + this.frameCounter = 0; + else if (this.frame < 4 || this.frame > 6) + { + this.frameCounter = 0; + this.frame = 4; + } + else + { + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + } + this.rotation = this.velocity.X * 0.05f; + } + else if (this.type == 266) + { + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 2 || this.frame > 5) + this.frame = 2; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type == 324) + { + ++this.frameCounter; + if (this.frameCounter > 1) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 6 || this.frame > 9) + this.frame = 6; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.58f; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.6f, 0.2f); + for (int index5 = 0; index5 < 2; ++index5) + { + int num67 = 4; + int index6 = Dust.NewDust(new Vector2(this.Center.X - (float) num67, this.Center.Y - (float) num67) - this.velocity * 0.0f, num67 * 2, num67 * 2, 6, Alpha: 100); + Main.dust[index6].scale *= (float) (1.79999995231628 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index6].velocity *= 0.2f; + if (index5 == 1) + Main.dust[index6].position -= this.velocity * 0.5f; + Main.dust[index6].noGravity = true; + int index7 = Dust.NewDust(new Vector2(this.Center.X - (float) num67, this.Center.Y - (float) num67) - this.velocity * 0.0f, num67 * 2, num67 * 2, 31, Alpha: 100, Scale: 0.5f); + Main.dust[index7].fadeIn = (float) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index7].velocity *= 0.05f; + if (index5 == 1) + Main.dust[index7].position -= this.velocity * 0.5f; + } + } + else if (this.type == 268) + { + ++this.frameCounter; + if (this.frameCounter > 4) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 6 || this.frame > 7) + this.frame = 6; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.58f; + } + else if (this.type == 200) + { + this.frameCounter += 3; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame <= 5 || this.frame > 9) + this.frame = 6; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type == 208) + { + this.rotation = this.velocity.X * 0.075f; + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 4) + this.frame = 1; + if (this.frame < 1) + this.frame = 1; + } + else if (this.type == 236) + { + this.rotation = this.velocity.Y * 0.05f * (float) this.direction; + if ((double) this.velocity.Y < 0.0) + this.frameCounter += 2; + else + ++this.frameCounter; + if (this.frameCounter >= 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 12) + this.frame = 9; + if (this.frame < 9) + this.frame = 9; + } + else if (this.type == 499) + { + this.rotation = this.velocity.Y * 0.05f * (float) this.direction; + if ((double) this.velocity.Y < 0.0) + this.frameCounter += 2; + else + ++this.frameCounter; + if (this.frameCounter >= 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 12) + this.frame = 8; + if (this.frame < 8) + this.frame = 8; + } + else if (this.type == 314) + { + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.58f; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 12) + this.frame = 7; + if (this.frame < 7) + this.frame = 7; + } + else if (this.type == 319) + { + this.rotation = this.velocity.X * 0.05f; + ++this.frameCounter; + if (this.frameCounter >= 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 10) + this.frame = 6; + if (this.frame < 6) + this.frame = 6; + } + else if (this.type == 210) + { + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.58f; + this.frameCounter += 3; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 11) + this.frame = 7; + if (this.frame < 7) + this.frame = 7; + } + else if (this.type == 313) + { + this.position.Y += (float) this.height; + this.height = 54; + this.position.Y -= (float) this.height; + this.position.X += (float) (this.width / 2); + this.width = 54; + this.position.X -= (float) (this.width / 2); + this.rotation += this.velocity.X * 0.01f; + this.frameCounter = 0; + this.frame = 11; + } + else if (this.type == 398) + { + ++this.frameCounter; + if (this.frameCounter > 1) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 6 || this.frame > 9) + this.frame = 6; + this.rotation = this.velocity.X * 0.1f; + } + else + this.rotation = this.spriteDirection != -1 ? (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 3.14f : (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + if (flag5 || this.type == 499 || this.type == 398 || this.type == 390 || this.type == 391 || this.type == 392 || this.type == (int) sbyte.MaxValue || this.type == 200 || this.type == 208 || this.type == 210 || this.type == 236 || this.type == 266 || this.type == 268 || this.type == 269 || this.type == 313 || this.type == 314 || this.type == 319 || this.type == 324 || this.type == 334 || this.type == 353) + return; + int index8 = Dust.NewDust(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 4.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 4.0)) - this.velocity, 8, 8, 16, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.7f); + Main.dust[index8].velocity.X *= 0.2f; + Main.dust[index8].velocity.Y *= 0.2f; + Main.dust[index8].noGravity = true; + } + else + { + if (flag5) + { + float num68 = (float) (40 * this.minionPos); + int num69 = 30; + int num70 = 60; + --this.localAI[0]; + if ((double) this.localAI[0] < 0.0) + this.localAI[0] = 0.0f; + if ((double) this.ai[1] > 0.0) + { + --this.ai[1]; + } + else + { + float num71 = this.position.X; + float num72 = this.position.Y; + float num73 = 100000f; + float num74 = num73; + int num75 = -1; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + float num76 = minionAttackTargetNpc.position.X + (float) (minionAttackTargetNpc.width / 2); + float num77 = minionAttackTargetNpc.position.Y + (float) (minionAttackTargetNpc.height / 2); + float num78 = Math.Abs(this.position.X + (float) (this.width / 2) - num76) + Math.Abs(this.position.Y + (float) (this.height / 2) - num77); + if ((double) num78 < (double) num73) + { + if (num75 == -1 && (double) num78 <= (double) num74) + { + num74 = num78; + num71 = num76; + num72 = num77; + } + if (Collision.CanHit(this.position, this.width, this.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) + { + num73 = num78; + num71 = num76; + num72 = num77; + num75 = minionAttackTargetNpc.whoAmI; + } + } + } + if (num75 == -1) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num79 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num80 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num81 = Math.Abs(this.position.X + (float) (this.width / 2) - num79) + Math.Abs(this.position.Y + (float) (this.height / 2) - num80); + if ((double) num81 < (double) num73) + { + if (num75 == -1 && (double) num81 <= (double) num74) + { + num74 = num81; + num71 = num79; + num72 = num80; + } + if (Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num73 = num81; + num71 = num79; + num72 = num80; + num75 = index; + } + } + } + } + } + if (num75 == -1 && (double) num74 < (double) num73) + num73 = num74; + float num82 = 400f; + if ((double) this.position.Y > Main.worldSurface * 16.0) + num82 = 200f; + if ((double) num73 < (double) num82 + (double) num68 && num75 == -1) + { + float num83 = num71 - (this.position.X + (float) (this.width / 2)); + if ((double) num83 < -5.0) + { + flag1 = true; + flag2 = false; + } + else if ((double) num83 > 5.0) + { + flag2 = true; + flag1 = false; + } + } + else if (num75 >= 0 && (double) num73 < 800.0 + (double) num68) + { + this.localAI[0] = (float) num70; + float num84 = num71 - (this.position.X + (float) (this.width / 2)); + if ((double) num84 > 300.0 || (double) num84 < -300.0) + { + if ((double) num84 < -50.0) + { + flag1 = true; + flag2 = false; + } + else if ((double) num84 > 50.0) + { + flag2 = true; + flag1 = false; + } + } + else if (this.owner == Main.myPlayer) + { + this.ai[1] = (float) num69; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)); + float num85 = num71 - vector2.X + (float) Main.rand.Next(-20, 21); + float num86 = (float) ((double) (Math.Abs(num85) * 0.1f) * (double) Main.rand.Next(0, 100) * (1.0 / 1000.0)); + float num87 = num72 - vector2.Y + (float) Main.rand.Next(-20, 21) - num86; + float num88 = (float) (12.0 / Math.Sqrt((double) num85 * (double) num85 + (double) num87 * (double) num87)); + float SpeedX = num85 * num88; + float SpeedY = num87 * num88; + int damage = this.damage; + int Type = 195; + int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, damage, this.knockBack, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + if ((double) SpeedX < 0.0) + this.direction = -1; + if ((double) SpeedX > 0.0) + this.direction = 1; + this.netUpdate = true; + } + } + } + } + bool flag7 = false; + Vector2 vector2_1 = Vector2.Zero; + bool flag8 = false; + if (this.type == 266 || this.type >= 390 && this.type <= 392) + { + float num89 = (float) (40 * this.minionPos); + int num90 = 60; + --this.localAI[0]; + if ((double) this.localAI[0] < 0.0) + this.localAI[0] = 0.0f; + if ((double) this.ai[1] > 0.0) + { + --this.ai[1]; + } + else + { + float x1 = this.position.X; + float y1 = this.position.Y; + float num91 = 100000f; + float num92 = num91; + int index9 = -1; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + float x2 = minionAttackTargetNpc.Center.X; + float y2 = minionAttackTargetNpc.Center.Y; + float num93 = Math.Abs(this.position.X + (float) (this.width / 2) - x2) + Math.Abs(this.position.Y + (float) (this.height / 2) - y2); + if ((double) num93 < (double) num91) + { + if (index9 == -1 && (double) num93 <= (double) num92) + { + num92 = num93; + x1 = x2; + y1 = y2; + } + if (Collision.CanHit(this.position, this.width, this.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) + { + num91 = num93; + x1 = x2; + y1 = y2; + index9 = minionAttackTargetNpc.whoAmI; + } + } + } + if (index9 == -1) + { + for (int index10 = 0; index10 < 200; ++index10) + { + if (Main.npc[index10].CanBeChasedBy((object) this)) + { + float num94 = Main.npc[index10].position.X + (float) (Main.npc[index10].width / 2); + float num95 = Main.npc[index10].position.Y + (float) (Main.npc[index10].height / 2); + float num96 = Math.Abs(this.position.X + (float) (this.width / 2) - num94) + Math.Abs(this.position.Y + (float) (this.height / 2) - num95); + if ((double) num96 < (double) num91) + { + if (index9 == -1 && (double) num96 <= (double) num92) + { + num92 = num96; + x1 = num94; + y1 = num95; + } + if (Collision.CanHit(this.position, this.width, this.height, Main.npc[index10].position, Main.npc[index10].width, Main.npc[index10].height)) + { + num91 = num96; + x1 = num94; + y1 = num95; + index9 = index10; + } + } + } + } + } + if (this.type >= 390 && this.type <= 392 && !Collision.SolidCollision(this.position, this.width, this.height)) + this.tileCollide = true; + if (index9 == -1 && (double) num92 < (double) num91) + num91 = num92; + else if (index9 >= 0) + { + flag7 = true; + vector2_1 = new Vector2(x1, y1) - this.Center; + if (this.type >= 390 && this.type <= 392) + { + if ((double) Main.npc[index9].position.Y > (double) this.position.Y + (double) this.height) + { + int index11 = (int) ((double) this.Center.X / 16.0); + int index12 = (int) (((double) this.position.Y + (double) this.height + 1.0) / 16.0); + if (Main.tile[index11, index12] != null && Main.tile[index11, index12].active() && TileID.Sets.Platforms[(int) Main.tile[index11, index12].type]) + this.tileCollide = false; + } + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index9].position.X, (int) Main.npc[index9].position.Y, Main.npc[index9].width, Main.npc[index9].height); + int num97 = 10; + rectangle2.X -= num97; + rectangle2.Y -= num97; + rectangle2.Width += num97 * 2; + rectangle2.Height += num97 * 2; + if (rectangle1.Intersects(rectangle2)) + { + flag8 = true; + Vector2 v = Main.npc[index9].Center - this.Center; + if ((double) this.velocity.Y > 0.0 && (double) v.Y < 0.0) + this.velocity.Y *= 0.5f; + if ((double) this.velocity.Y < 0.0 && (double) v.Y > 0.0) + this.velocity.Y *= 0.5f; + if ((double) this.velocity.X > 0.0 && (double) v.X < 0.0) + this.velocity.X *= 0.5f; + if ((double) this.velocity.X < 0.0 && (double) v.X > 0.0) + this.velocity.X *= 0.5f; + if ((double) v.Length() > 14.0) + { + v.Normalize(); + v *= 14f; + } + this.rotation = (float) (((double) this.rotation * 5.0 + (double) v.ToRotation() + 1.57079637050629) / 6.0); + this.velocity = (this.velocity * 9f + v) / 10f; + for (int index13 = 0; index13 < 1000; ++index13) + { + if (this.whoAmI != index13 && this.owner == Main.projectile[index13].owner && Main.projectile[index13].type >= 390 && Main.projectile[index13].type <= 392 && (double) (Main.projectile[index13].Center - this.Center).Length() < 15.0) + { + float num98 = 0.5f; + if ((double) this.Center.Y > (double) Main.projectile[index13].Center.Y) + { + Main.projectile[index13].velocity.Y -= num98; + this.velocity.Y += num98; + } + else + { + Main.projectile[index13].velocity.Y += num98; + this.velocity.Y -= num98; + } + if ((double) this.Center.X > (double) Main.projectile[index13].Center.X) + { + this.velocity.X += num98; + Main.projectile[index13].velocity.X -= num98; + } + else + { + this.velocity.X -= num98; + Main.projectile[index13].velocity.Y += num98; + } + } + } + } + } + } + float num99 = 300f; + if ((double) this.position.Y > Main.worldSurface * 16.0) + num99 = 150f; + if (this.type >= 390 && this.type <= 392) + { + num99 = 500f; + if ((double) this.position.Y > Main.worldSurface * 16.0) + num99 = 250f; + } + if ((double) num91 < (double) num99 + (double) num89 && index9 == -1) + { + float num100 = x1 - (this.position.X + (float) (this.width / 2)); + if ((double) num100 < -5.0) + { + flag1 = true; + flag2 = false; + } + else if ((double) num100 > 5.0) + { + flag2 = true; + flag1 = false; + } + } + bool flag9 = false; + if (this.type >= 390 && this.type <= 392 && (double) this.localAI[1] > 0.0) + { + flag9 = true; + --this.localAI[1]; + } + if (index9 >= 0 && (double) num91 < 800.0 + (double) num89) + { + this.friendly = true; + this.localAI[0] = (float) num90; + float num101 = x1 - (this.position.X + (float) (this.width / 2)); + if ((double) num101 < -10.0) + { + flag1 = true; + flag2 = false; + } + else if ((double) num101 > 10.0) + { + flag2 = true; + flag1 = false; + } + if ((double) y1 < (double) this.Center.Y - 100.0 && (double) num101 > -50.0 && (double) num101 < 50.0 && (double) this.velocity.Y == 0.0) + { + float num102 = Math.Abs(y1 - this.Center.Y); + if ((double) num102 < 120.0) + this.velocity.Y = -10f; + else if ((double) num102 < 210.0) + this.velocity.Y = -13f; + else if ((double) num102 < 270.0) + this.velocity.Y = -15f; + else if ((double) num102 < 310.0) + this.velocity.Y = -17f; + else if ((double) num102 < 380.0) + this.velocity.Y = -18f; + } + if (flag9) + { + this.friendly = false; + if ((double) this.velocity.X < 0.0) + flag1 = true; + else if ((double) this.velocity.X > 0.0) + flag2 = true; + } + } + else + this.friendly = false; + } + } + if ((double) this.ai[1] != 0.0) + { + flag1 = false; + flag2 = false; + } + else if (flag5 && (double) this.localAI[0] == 0.0) + this.direction = Main.player[this.owner].direction; + else if (this.type >= 390 && this.type <= 392) + { + int index14 = (int) ((double) this.Center.X / 16.0); + int index15 = (int) ((double) this.Center.Y / 16.0); + if (Main.tile[index14, index15] != null && Main.tile[index14, index15].wall > (byte) 0) + flag1 = flag2 = false; + } + if (this.type == (int) sbyte.MaxValue) + { + if ((double) this.rotation > -0.1 && (double) this.rotation < 0.1) + this.rotation = 0.0f; + else if ((double) this.rotation < 0.0) + this.rotation += 0.1f; + else + this.rotation -= 0.1f; + } + else if (this.type != 313 && !flag8) + this.rotation = 0.0f; + if (this.type < 390 || this.type > 392) + this.tileCollide = true; + float num103 = 0.08f; + float num104 = 6.5f; + if (this.type == (int) sbyte.MaxValue) + { + num104 = 2f; + num103 = 0.04f; + } + if (this.type == 112) + { + num104 = 6f; + num103 = 0.06f; + } + if (this.type == 334) + { + num104 = 8f; + num103 = 0.08f; + } + if (this.type == 268) + { + num104 = 8f; + num103 = 0.4f; + } + if (this.type == 324) + { + num103 = 0.1f; + num104 = 3f; + } + if (flag5 || this.type == 266 || this.type >= 390 && this.type <= 392) + { + num104 = 6f; + num103 = 0.2f; + if ((double) num104 < (double) Math.Abs(Main.player[this.owner].velocity.X) + (double) Math.Abs(Main.player[this.owner].velocity.Y)) + { + num104 = Math.Abs(Main.player[this.owner].velocity.X) + Math.Abs(Main.player[this.owner].velocity.Y); + num103 = 0.3f; + } + } + if (this.type >= 390 && this.type <= 392) + num103 *= 2f; + if (flag1) + { + if ((double) this.velocity.X > -3.5) + this.velocity.X -= num103; + else + this.velocity.X -= num103 * 0.25f; + } + else if (flag2) + { + if ((double) this.velocity.X < 3.5) + this.velocity.X += num103; + else + this.velocity.X += num103 * 0.25f; + } + else + { + this.velocity.X *= 0.9f; + if ((double) this.velocity.X >= -(double) num103 && (double) this.velocity.X <= (double) num103) + this.velocity.X = 0.0f; + } + if (this.type == 208) + { + this.velocity.X *= 0.95f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + flag1 = false; + flag2 = false; + } + if (flag1 | flag2) + { + int num105 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (this.type == 236) + num105 += this.direction; + if (flag1) + --num105; + if (flag2) + ++num105; + if (WorldGen.SolidTile(num105 + (int) this.velocity.X, j)) + flag4 = true; + } + if ((double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height - 8.0 > (double) this.position.Y + (double) this.height) + flag3 = true; + if (this.type == 268 && this.frameCounter < 10) + flag4 = false; + Collision.StepUp(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY); + if ((double) this.velocity.Y == 0.0 || this.type == 200) + { + if (!flag3 && ((double) this.velocity.X < 0.0 || (double) this.velocity.X > 0.0)) + { + int i = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16 + 1; + if (flag1) + --i; + if (flag2) + ++i; + WorldGen.SolidTile(i, j); + } + if (flag4) + { + int i1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) this.height) / 16 + 1; + if (WorldGen.SolidTile(i1, j) || Main.tile[i1, j].halfBrick() || Main.tile[i1, j].slope() > (byte) 0 || this.type == 200) + { + if (this.type == 200) + { + this.velocity.Y = -3.1f; + } + else + { + try + { + int num106 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num107 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (flag1) + --num106; + if (flag2) + ++num106; + int i2 = num106 + (int) this.velocity.X; + if (!WorldGen.SolidTile(i2, num107 - 1) && !WorldGen.SolidTile(i2, num107 - 2)) + this.velocity.Y = -5.1f; + else if (!WorldGen.SolidTile(i2, num107 - 2)) + this.velocity.Y = -7.1f; + else if (WorldGen.SolidTile(i2, num107 - 5)) + this.velocity.Y = -11.1f; + else if (WorldGen.SolidTile(i2, num107 - 4)) + this.velocity.Y = -10.1f; + else + this.velocity.Y = -9.1f; + } + catch + { + this.velocity.Y = -9.1f; + } + } + if (this.type == (int) sbyte.MaxValue) + this.ai[0] = 1f; + } + } + else if (this.type == 266 && flag1 | flag2) + this.velocity.Y -= 6f; + } + if ((double) this.velocity.X > (double) num104) + this.velocity.X = num104; + if ((double) this.velocity.X < -(double) num104) + this.velocity.X = -num104; + 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 > (double) num103 & flag2) + this.direction = 1; + if ((double) this.velocity.X < -(double) num103 & flag1) + this.direction = -1; + if (this.type != 313) + { + if (this.direction == -1) + this.spriteDirection = 1; + if (this.direction == 1) + this.spriteDirection = -1; + } + if (this.type == 398) + this.spriteDirection = this.direction; + if (flag5) + { + if ((double) this.ai[1] > 0.0) + { + if ((double) this.localAI[1] == 0.0) + { + this.localAI[1] = 1f; + this.frame = 1; + } + if (this.frame != 0) + { + ++this.frameCounter; + if (this.frameCounter > 4) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame == 4) + this.frame = 0; + } + } + else if ((double) this.velocity.Y == 0.0) + { + this.localAI[1] = 0.0f; + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 5) + this.frame = 5; + if (this.frame >= 11) + this.frame = 5; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 4; + } + else if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0; + this.frame = 4; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y > 10.0) + this.velocity.Y = 10f; + Vector2 velocity = this.velocity; + } + else if (this.type == 268) + { + if ((double) this.velocity.Y == 0.0) + { + if (this.frame > 5) + this.frameCounter = 0; + if ((double) this.velocity.X == 0.0) + { + int num108 = 3; + ++this.frameCounter; + if (this.frameCounter < num108) + this.frame = 0; + else if (this.frameCounter < num108 * 2) + this.frame = 1; + else if (this.frameCounter < num108 * 3) + this.frame = 2; + else if (this.frameCounter < num108 * 4) + this.frame = 3; + else + this.frameCounter = num108 * 4; + } + else + { + this.velocity.X *= 0.8f; + ++this.frameCounter; + int num109 = 3; + if (this.frameCounter < num109) + this.frame = 0; + else if (this.frameCounter < num109 * 2) + this.frame = 1; + else if (this.frameCounter < num109 * 3) + this.frame = 2; + else if (this.frameCounter < num109 * 4) + this.frame = 3; + else if (flag1 | flag2) + { + this.velocity.X *= 2f; + this.frame = 4; + this.velocity.Y = -6.1f; + this.frameCounter = 0; + for (int index16 = 0; index16 < 4; ++index16) + { + int index17 = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), this.width, 4, 5); + Main.dust[index17].velocity += this.velocity; + Main.dust[index17].velocity *= 0.4f; + } + } + else + this.frameCounter = num109 * 4; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 5; + } + else + { + this.frame = 4; + this.frameCounter = 3; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 269) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + int index = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), this.width, 6, 76); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLight = true; + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 3) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 2; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 313) + { + int index18 = (int) ((double) this.Center.X / 16.0); + int index19 = (int) ((double) this.Center.Y / 16.0); + if (Main.tile[index18, index19] != null && Main.tile[index18, index19].wall > (byte) 0) + { + this.position.Y += (float) this.height; + this.height = 34; + this.position.Y -= (float) this.height; + this.position.X += (float) (this.width / 2); + this.width = 34; + this.position.X -= (float) (this.width / 2); + Vector2 vector2_2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num110 = Main.player[this.owner].Center.X - vector2_2.X; + float num111 = Main.player[this.owner].Center.Y - vector2_2.Y; + float num112 = (float) Math.Sqrt((double) num110 * (double) num110 + (double) num111 * (double) num111); + float num113 = (float) (4.0 / (double) num112); + float num114 = num110 * num113; + float num115 = num111 * num113; + if ((double) num112 < 120.0) + { + this.velocity.X *= 0.9f; + this.velocity.Y *= 0.9f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < 0.1) + this.velocity = this.velocity * 0.0f; + } + else + { + this.velocity.X = (float) (((double) this.velocity.X * 9.0 + (double) num114) / 10.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 9.0 + (double) num115) / 10.0); + } + if ((double) num112 >= 120.0) + { + this.spriteDirection = this.direction; + this.rotation = (float) Math.Atan2((double) this.velocity.Y * (double) -this.direction, (double) this.velocity.X * (double) -this.direction); + } + this.frameCounter += (int) ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)); + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 10) + this.frame = 5; + if (this.frame >= 5) + return; + this.frame = 10; + } + else + { + this.rotation = 0.0f; + if (this.direction == -1) + this.spriteDirection = 1; + if (this.direction == 1) + this.spriteDirection = -1; + this.position.Y += (float) this.height; + this.height = 30; + this.position.Y -= (float) this.height; + this.position.X += (float) (this.width / 2); + this.width = 30; + this.position.X -= (float) (this.width / 2); + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 3) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 4; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + } + else if (this.type >= 390 && this.type <= 392) + { + int index20 = (int) ((double) this.Center.X / 16.0); + int index21 = (int) ((double) this.Center.Y / 16.0); + if (Main.tile[index20, index21] != null && Main.tile[index20, index21].wall > (byte) 0) + { + this.position.Y += (float) this.height; + this.height = 34; + this.position.Y -= (float) this.height; + this.position.X += (float) (this.width / 2); + this.width = 34; + this.position.X -= (float) (this.width / 2); + float num116 = 9f; + float num117 = (float) (40 * (this.minionPos + 1)); + Vector2 v = Main.player[this.owner].Center - this.Center; + if (flag7) + { + v = vector2_1; + num117 = 10f; + } + else if (!Collision.CanHitLine(this.Center, 1, 1, Main.player[this.owner].Center, 1, 1)) + this.ai[0] = 1f; + if ((double) v.Length() < (double) num117) + { + this.velocity = this.velocity * 0.9f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < 0.1) + this.velocity = this.velocity * 0.0f; + } + else if ((double) v.Length() < 800.0 || !flag7) + this.velocity = (this.velocity * 9f + Vector2.Normalize(v) * num116) / 10f; + if ((double) v.Length() >= (double) num117) + { + this.spriteDirection = this.direction; + this.rotation = this.velocity.ToRotation() + 1.570796f; + } + else + this.rotation = v.ToRotation() + 1.570796f; + this.frameCounter += (int) ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)); + if (this.frameCounter > 5) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 7) + this.frame = 4; + if (this.frame >= 4) + return; + this.frame = 7; + } + else + { + if (!flag8) + this.rotation = 0.0f; + if (this.direction == -1) + this.spriteDirection = 1; + if (this.direction == 1) + this.spriteDirection = -1; + this.position.Y += (float) this.height; + this.height = 30; + this.position.Y -= (float) this.height; + this.position.X += (float) (this.width / 2); + this.width = 30; + this.position.X -= (float) (this.width / 2); + if (!flag7 && !Collision.CanHitLine(this.Center, 1, 1, Main.player[this.owner].Center, 1, 1)) + this.ai[0] = 1f; + if (!flag8 && this.frame >= 4 && this.frame <= 7) + { + Vector2 vector2_3 = Main.player[this.owner].Center - this.Center; + if (flag7) + vector2_3 = vector2_1; + float num118 = -vector2_3.Y; + if ((double) vector2_3.Y <= 0.0) + { + if ((double) num118 < 120.0) + this.velocity.Y = -10f; + else if ((double) num118 < 210.0) + this.velocity.Y = -13f; + else if ((double) num118 < 270.0) + this.velocity.Y = -15f; + else if ((double) num118 < 310.0) + this.velocity.Y = -17f; + else if ((double) num118 < 380.0) + this.velocity.Y = -18f; + } + } + if (flag8) + { + ++this.frameCounter; + if (this.frameCounter > 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 8) + this.frame = 4; + if (this.frame <= 3) + this.frame = 7; + } + else if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 5) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 2) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 3; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + } + else if (this.type == 314) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 6) + this.frame = 1; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 7; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 319) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 8) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 5) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 1; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 236) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + if (this.frame < 2) + this.frame = 2; + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 8) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 1; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 499) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + if (this.frame < 2) + this.frame = 2; + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 8) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 1; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 266) + { + if ((double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 0.8) + { + if ((double) this.velocity.X == 0.0) + ++this.frameCounter; + else + this.frameCounter += 3; + } + else + this.frameCounter += 5; + if (this.frameCounter >= 20) + { + this.frameCounter -= 20; + ++this.frame; + } + if (this.frame > 1) + this.frame = 0; + if (this.wet && (double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height < (double) this.position.Y + (double) this.height && (double) this.localAI[0] == 0.0) + { + if ((double) this.velocity.Y > -4.0) + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.95f; + } + else + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 334) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + if (this.frame > 0) + { + this.frameCounter += 2; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 7) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs((double) this.velocity.X * 0.75); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 7 || this.frame < 1) + this.frame = 1; + } + else if (this.frame > 0) + { + this.frameCounter += 2; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 7) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 2; + } + else if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0; + this.frame = 4; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 353) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 9) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 1; + } + else if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0; + this.frame = 1; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 111) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 7) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 4; + } + else if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0; + this.frame = 6; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 112) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 3) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0; + this.frame = 2; + } + else if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0; + this.frame = 2; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == (int) sbyte.MaxValue) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 5) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 200) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 5) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if ((double) this.velocity.Y < 0.0) + this.frameCounter += 2; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 9) + this.frame = 6; + if (this.frame < 6) + this.frame = 6; + } + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y <= 4.0) + return; + this.velocity.Y = 4f; + } + else if (this.type == 208) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X == 0.0) + { + 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 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; + this.rotation = 0.0f; + this.frame = 0; + } + else + { + this.rotation = this.velocity.X * 0.075f; + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 4) + this.frame = 1; + if (this.frame < 1) + this.frame = 1; + } + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y <= 4.0) + return; + this.velocity.Y = 4f; + } + else if (this.type == 209) + { + if (this.alpha > 0) + { + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + } + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 11) + this.frame = 2; + if (this.frame < 2) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frame = 1; + this.frameCounter = 0; + this.rotation = 0.0f; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else if (this.type == 324) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 5) + this.frame = 2; + if (this.frame < 2) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.frameCounter = 0; + this.frame = 1; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 14.0) + return; + this.velocity.Y = 14f; + } + else if (this.type == 210) + { + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 6) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else + { + this.rotation = this.velocity.X * 0.05f; + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 11) + this.frame = 7; + if (this.frame < 7) + this.frame = 7; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else + { + if (this.type != 398) + return; + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) this.velocity.X < -0.8 || (double) this.velocity.X > 0.8) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 5) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0; + this.frame = 5; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + } + } + } + } + + 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] > (double) Main.rand.Next(180, 900)) + { + 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; + ++this.ai[1]; + if (Main.myPlayer != this.owner) + return; + Vector2 vector2_20 = vector2_1 - this.Center; + 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); + if (this.type == 439) + { + ++this.ai[0]; + int num2 = 0; + if ((double) this.ai[0] >= 40.0) + ++num2; + if ((double) this.ai[0] >= 80.0) + ++num2; + if ((double) this.ai[0] >= 120.0) + ++num2; + int num3 = 24; + int num4 = 6; + ++this.ai[1]; + bool flag = false; + if ((double) this.ai[1] >= (double) (num3 - num4 * num2)) + { + this.ai[1] = 0.0f; + flag = true; + } + this.frameCounter += 1 + num2; + if (this.frameCounter >= 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= 6) + this.frame = 0; + } + if (this.soundDelay <= 0) + { + this.soundDelay = num3 - num4 * num2; + if ((double) this.ai[0] != 1.0) + Main.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 num5 = 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 * num5; + 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 num6 = 14f; + int num7 = 7; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_7 = this.Center + new Vector2((float) Main.rand.Next(-num7, num7 + 1), (float) Main.rand.Next(-num7, num7 + 1)); + Vector2 vector2_8 = (Vector2.Normalize(this.velocity) * num6).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) + { + ++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 num8 = this.localAI[0] / 60f; + if ((double) num8 > 0.5) + num8 = 1f - num8; + Vector3 vector3 = Vector3.Lerp(new Vector3(0.0f, 1f, 0.7f), new Vector3(0.0f, 0.7f, 1f), (float) (1.0 - (double) num8 * 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.PerLinePoint(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 num9 = 30f; + if ((double) vector2_13.Length() < (double) num9) + vector2_13 = Vector2.Normalize(vector2_13) * num9; + int tileBoost = player.inventory[player.selectedItem].tileBoost; + int num10 = -Player.tileRangeX - tileBoost + 1; + int num11 = Player.tileRangeX + tileBoost - 1; + int num12 = -Player.tileRangeY - tileBoost; + int num13 = Player.tileRangeY + tileBoost - 1; + int num14 = 12; + bool flag = false; + if ((double) vector2_13.X < (double) (num10 * 16 - num14)) + flag = true; + if ((double) vector2_13.Y < (double) (num12 * 16 - num14)) + flag = true; + if ((double) vector2_13.X > (double) (num11 * 16 + num14)) + flag = true; + if ((double) vector2_13.Y > (double) (num13 * 16 + num14)) + flag = true; + if (flag) + { + Vector2 vector2_14 = Vector2.Normalize(vector2_13); + float num15 = -1f; + if ((double) vector2_14.X < 0.0 && ((double) (num10 * 16 - num14) / (double) vector2_14.X < (double) num15 || (double) num15 == -1.0)) + num15 = (float) (num10 * 16 - num14) / vector2_14.X; + if ((double) vector2_14.X > 0.0 && ((double) (num11 * 16 + num14) / (double) vector2_14.X < (double) num15 || (double) num15 == -1.0)) + num15 = (float) (num11 * 16 + num14) / vector2_14.X; + if ((double) vector2_14.Y < 0.0 && ((double) (num12 * 16 - num14) / (double) vector2_14.Y < (double) num15 || (double) num15 == -1.0)) + num15 = (float) (num12 * 16 - num14) / vector2_14.Y; + if ((double) vector2_14.Y > 0.0 && ((double) (num13 * 16 + num14) / (double) vector2_14.Y < (double) num15 || (double) num15 == -1.0)) + num15 = (float) (num13 * 16 + num14) / vector2_14.Y; + vector2_13 = vector2_14 * num15; + } + 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 num16 = 0; + if ((double) this.ai[0] >= 60.0) + ++num16; + if ((double) this.ai[0] >= 180.0) + ++num16; + bool flag1 = false; + if ((double) this.ai[0] == 60.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 num17 = 10; + if (!flag2) + ++this.ai[1]; + bool flag3 = false; + if (flag2 && (double) this.ai[0] % 20.0 == 0.0) + flag3 = true; + if ((double) this.ai[1] >= (double) num17 && !flag2) + { + this.ai[1] = 0.0f; + flag3 = true; + if (!flag2) + { + float num18 = 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 * num18; + 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 = num17 - num16; + this.soundDelay *= 2; + if ((double) this.ai[0] != 1.0) + Main.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 < num16 + 1; ++index3) + { + int Type = 226; + float num19 = 0.4f; + if (index3 % 2 == 1) + { + Type = 226; + num19 = 0.65f; + } + Vector2 vector2_20 = vector2_19 + ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2() * (12f - (float) (num16 * 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) num16 * 2.0) / 10f; + Main.dust[index4].noGravity = true; + Main.dust[index4].scale = num19; + Main.dust[index4].customData = (object) player; + } + } + 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_21 = Vector2.Normalize(this.velocity); + if (float.IsNaN(vector2_21.X) || float.IsNaN(vector2_21.Y)) + vector2_21 = -Vector2.UnitY; + int Damage = (int) ((double) this.damage * 3.0); + this.ai[1] = (float) Projectile.NewProjectile(center.X, center.Y, vector2_21.X, vector2_21.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 + { + if (!flag2) + { + int Type = 459; + float num20 = 10f; + Vector2 center = this.Center; + Vector2 vector2_22 = Vector2.Normalize(this.velocity) * num20; + if (float.IsNaN(vector2_22.X) || float.IsNaN(vector2_22.Y)) + vector2_22 = -Vector2.UnitY; + float ai1 = (float) (0.699999988079071 + (double) num16 * 0.300000011920929); + int Damage = (double) ai1 < 1.0 ? this.damage : (int) ((double) this.damage * 2.0); + Projectile.NewProjectile(center.X, center.Y, vector2_22.X, vector2_22.Y, Type, Damage, this.knockBack, this.owner, ai1: ai1); + } + this.Kill(); + } + } + } + if (this.type == 633) + { + float num21 = 30f; + if ((double) this.ai[0] > 90.0) + num21 = 15f; + if ((double) this.ai[0] > 120.0) + num21 = 5f; + this.damage = (int) ((double) player.inventory[player.selectedItem].damage * (double) player.magicDamage); + ++this.ai[0]; + ++this.ai[1]; + bool flag5 = false; + if ((double) this.ai[0] % (double) num21 == 0.0) + flag5 = true; + int num22 = 10; + bool flag6 = false; + if ((double) this.ai[0] % (double) num21 == 0.0) + flag6 = true; + if ((double) this.ai[1] >= 1.0) + { + this.ai[1] = 0.0f; + flag6 = true; + if (Main.myPlayer == this.owner) + { + float num23 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_23 = vector2_1; + Vector2 vector2_24 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_23; + if ((double) player.gravDir == -1.0) + vector2_24.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_23.Y; + Vector2 vector2_25 = Vector2.Normalize(vector2_24); + if (float.IsNaN(vector2_25.X) || float.IsNaN(vector2_25.Y)) + vector2_25 = -Vector2.UnitY; + Vector2 vector2_26 = Vector2.Normalize(Vector2.Lerp(vector2_25, Vector2.Normalize(this.velocity), 0.92f)) * num23; + if ((double) vector2_26.X != (double) this.velocity.X || (double) vector2_26.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_26; + } + } + ++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 = num22; + this.soundDelay *= 2; + if ((double) this.ai[0] != 1.0) + Main.PlaySound(SoundID.Item15, this.position); + } + if (flag6 && Main.myPlayer == this.owner) + { + bool flag7 = !flag5 || player.CheckMana(player.inventory[player.selectedItem].mana, true); + if ((!(player.channel & flag7) || player.noItems ? 0 : (!player.CCed ? 1 : 0)) != 0) + { + if ((double) this.ai[0] == 1.0) + { + Vector2 center = this.Center; + Vector2 vector2_27 = Vector2.Normalize(this.velocity); + if (float.IsNaN(vector2_27.X) || float.IsNaN(vector2_27.Y)) + vector2_27 = -Vector2.UnitY; + int damage = this.damage; + for (int index = 0; index < 6; ++index) + Projectile.NewProjectile(center.X, center.Y, vector2_27.X, vector2_27.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) + { + Main.PlaySound(SoundID.Item1, this.Center); + this.soundDelay = 12; + } + if (Main.myPlayer == this.owner) + { + if (player.channel && !player.noItems && !player.CCed) + { + float num24 = 1f; + if (player.inventory[player.selectedItem].shoot == this.type) + num24 = 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 *= num24; + 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 == 600) + { + if ((double) this.ai[0] == 0.0) + { + if ((double) this.ai[1] != 0.0) + Main.PlaySound(SoundID.Item114, this.position); + else + Main.PlaySound(SoundID.Item115, this.position); + } + ++this.ai[0]; + if (Main.myPlayer == this.owner && (double) this.ai[0] == 1.0) + { + float num25 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_28 = vector2_1; + Vector2 vector2_29 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_28; + if ((double) player.gravDir == -1.0) + vector2_29.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_28.Y; + Vector2 vector2_30 = Vector2.Normalize(vector2_29); + if (float.IsNaN(vector2_30.X) || float.IsNaN(vector2_30.Y)) + vector2_30 = -Vector2.UnitY; + Vector2 vector2_31 = vector2_30 * num25; + if ((double) vector2_31.X != (double) this.velocity.X || (double) vector2_31.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_31; + int Type = 601; + float num26 = 3f; + Vector2 center = this.Center; + Vector2 vector2_32 = Vector2.Normalize(this.velocity) * num26; + if (float.IsNaN(vector2_32.X) || float.IsNaN(vector2_32.Y)) + vector2_32 = -Vector2.UnitY; + Projectile.NewProjectile(center.X, center.Y, vector2_32.X, vector2_32.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 ((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 num27 = (double) this.localAI[0].ToRotationVector2().X >= 0.0 ? 1f : -1f; + if ((double) this.ai[1] <= 0.0) + num27 *= -1f; + Vector2 rotationVector2 = (num27 * (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_33 = rotationVector2.RotatedBy((double) this.localAI[0]); + ++this.ai[0]; + if ((double) this.ai[0] < 30.0) + this.velocity = this.velocity + 48f * vector2_33; + else + this.Kill(); + } + if (this.type == 615) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int num28 = 0; + if ((double) this.ai[0] >= 40.0) + ++num28; + if ((double) this.ai[0] >= 80.0) + ++num28; + if ((double) this.ai[0] >= 120.0) + ++num28; + int num29 = 5; + int num30 = 0; + --this.ai[1]; + bool flag = false; + int num31 = -1; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) (num29 - num30 * num28); + flag = true; + if ((int) this.ai[0] / (num29 - num30 * num28) % 7 == 0) + num31 = 0; + } + this.frameCounter += 1 + num28; + 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 = num29 - num30 * num28; + if ((double) this.ai[0] != 1.0) + Main.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 shoot = 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 shoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + float num32 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_34 = vector2_1; + Vector2 vector2_35 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_34; + if ((double) player.gravDir == -1.0) + vector2_35.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_34.Y; + Vector2 vector2_36 = Vector2.Normalize(vector2_35); + if (float.IsNaN(vector2_36.X) || float.IsNaN(vector2_36.Y)) + vector2_36 = -Vector2.UnitY; + Vector2 vector2_37 = (vector2_36 * num32).RotatedBy(Main.rand.NextDouble() * 0.130899697542191 - 0.0654498487710953); + if ((double) vector2_37.X != (double) this.velocity.X || (double) vector2_37.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_37; + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_38 = (Vector2.Normalize(this.velocity) * speed).RotatedBy(Main.rand.NextDouble() * 0.196349546313286 - 0.0981747731566429); + if (float.IsNaN(vector2_38.X) || float.IsNaN(vector2_38.Y)) + vector2_38 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_34.X, vector2_34.Y, vector2_38.X, vector2_38.Y, shoot, weaponDamage, weaponKnockback, this.owner); + } + if (num31 == 0) + { + shoot = 616; + float num33 = 8f; + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_39 = (Vector2.Normalize(this.velocity) * num33).RotatedBy(Main.rand.NextDouble() * 0.392699092626572 - 0.196349546313286); + if (float.IsNaN(vector2_39.X) || float.IsNaN(vector2_39.Y)) + vector2_39 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_34.X, vector2_34.Y, vector2_39.X, vector2_39.Y, shoot, weaponDamage + 20, weaponKnockback * 1.25f, this.owner); + } + } + } + else + this.Kill(); + } + } + if (this.type == 630) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int num34 = 0; + if ((double) this.ai[0] >= 40.0) + ++num34; + if ((double) this.ai[0] >= 80.0) + ++num34; + if ((double) this.ai[0] >= 120.0) + ++num34; + int num35 = 24; + int num36 = 2; + --this.ai[1]; + bool flag = false; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) (num35 - num36 * num34); + flag = true; + int num37 = (int) this.ai[0] / (num35 - num36 * num34); + } + 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 = num35 - num36 * num34; + if ((double) this.ai[0] != 1.0) + Main.PlaySound(SoundID.Item5, this.position); + this.localAI[0] = 12f; + } + player.phantasmTime = 2; + if (flag && Main.myPlayer == this.owner) + { + int shoot = 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 shoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + float num38 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_40 = vector2_1; + Vector2 vector2_41 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_40; + if ((double) player.gravDir == -1.0) + vector2_41.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_40.Y; + Vector2 vector2_42 = Vector2.Normalize(vector2_41); + if (float.IsNaN(vector2_42.X) || float.IsNaN(vector2_42.Y)) + vector2_42 = -Vector2.UnitY; + Vector2 vector2_43 = vector2_42 * num38; + if ((double) vector2_43.X != (double) this.velocity.X || (double) vector2_43.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_43 * 0.55f; + for (int index5 = 0; index5 < 4; ++index5) + { + Vector2 vector2_44 = Vector2.Normalize(this.velocity) * speed * (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.800000011920929); + if (float.IsNaN(vector2_44.X) || float.IsNaN(vector2_44.Y)) + vector2_44 = -Vector2.UnitY; + Vector2 vector2_45 = vector2_40 + Utils.RandomVector2(Main.rand, -15f, 15f); + int index6 = Projectile.NewProjectile(vector2_45.X, vector2_45.Y, vector2_44.X, vector2_44.Y, shoot, weaponDamage, weaponKnockback, this.owner); + Main.projectile[index6].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) + Main.PlaySound(SoundID.Item5, this.position); + this.localAI[0] = 12f; + } + if (flag && Main.myPlayer == this.owner) + { + int shoot = 14; + float speed = 12f; + int weaponDamage = player.GetWeaponDamage(player.inventory[player.selectedItem]); + float knockBack = player.inventory[player.selectedItem].knockBack; + int num39 = 2; + float max = 1.5f; + if (canShoot) + { + player.PickAmmo(player.inventory[player.selectedItem], ref shoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + if (shoot == 1) + shoot = 2; + if (++player.phantomPhoneixCounter >= 4) + { + player.phantomPhoneixCounter = 0; + num39 = 1; + weaponDamage *= 2; + max = 0.0f; + this.ai[1] *= 1.5f; + shoot = 706; + speed = 16f; + } + float num40 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_46 = vector2_1; + Vector2 vector2_47 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_46; + if ((double) player.gravDir == -1.0) + vector2_47.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_46.Y; + Vector2 vector2_48 = Vector2.Normalize(vector2_47); + if (float.IsNaN(vector2_48.X) || float.IsNaN(vector2_48.Y)) + vector2_48 = -Vector2.UnitY; + Vector2 vector2_49 = vector2_48 * num40; + if ((double) vector2_49.X != (double) this.velocity.X || (double) vector2_49.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_49 * 0.55f; + for (int index7 = 0; index7 < num39; ++index7) + { + Vector2 vector2_50 = Vector2.Normalize(this.velocity) * speed + Main.rand.NextVector2Square(-max, max); + if (float.IsNaN(vector2_50.X) || float.IsNaN(vector2_50.Y)) + vector2_50 = -Vector2.UnitY; + Vector2 vector2_51 = vector2_46; + int index8 = Projectile.NewProjectile(vector2_51.X, vector2_51.Y, vector2_50.X, vector2_50.Y, shoot, weaponDamage, weaponKnockback, this.owner); + Main.projectile[index8].noDropItem = true; + } + } + else + this.Kill(); + } + } + this.position = player.RotatedRelativePoint(player.MountedCenter) - 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.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction); + if (this.type == 460 || this.type == 611) + { + Vector2 vector2_52 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f; + if (player.direction != 1) + vector2_52.X = (float) player.bodyFrame.Width - vector2_52.X; + if ((double) player.gravDir != 1.0) + vector2_52.Y = (float) player.bodyFrame.Height - vector2_52.Y; + Vector2 vector2_53 = vector2_52 - new Vector2((float) (player.bodyFrame.Width - player.width), (float) (player.bodyFrame.Height - 42)) / 2f; + this.Center = player.RotatedRelativePoint(player.position + vector2_53) - this.velocity; + } + if (this.type == 615) + this.position.Y += player.gravDir * 2f; + if (this.type != 611 || this.alpha != 0) + return; + 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 num41 = 18f; + for (int index = 0; (double) index < (double) num41; ++index) + { + if (Main.rand.Next(4) == 0) + { + Vector2 Position = this.position + this.velocity + this.velocity * ((float) index / num41); + 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; + } + } + } + + 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].itemAnimation = 2; + Main.player[this.owner].itemTime = 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; + if ((double) vec.Length() < 40.0 || vec.HasNaNs()) + { + this.Kill(); + } + else + { + float num15 = num6 * 1.5f; + if (this.type == 546) + num15 *= 1.5f; + if (this.type == 554) + num15 *= 1.25f; + if (this.type == 555) + num15 *= 1.35f; + if (this.type == 562) + num15 *= 1.25f; + float num16 = 12f; + vec.Normalize(); + vec *= num15; + this.velocity = (this.velocity * (num16 - 1f) + vec) / num16; + } + } + } + } + + 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].itemAnimation = 2; + Main.player[this.owner].itemTime = 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 num10 = num8 / (float) ((1.0 + (double) Main.player[this.owner].meleeSpeed * 3.0) / 4.0); + float num11 = (float) (14.0 - (double) num10 / 2.0); + float num12 = (float) (5.0 + (double) num10 / 2.0); + if (flag1) + num12 += 20f; + if ((double) this.ai[0] >= 0.0) + { + if ((double) this.velocity.Length() > (double) num10) + 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) + { + num11 /= 2f; + num10 *= 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; + double num13 = (double) this.velocity.Length(); + float num14 = vector2_13.Length(); + if ((double) num14 > (double) num12) + { + vector2_13.Normalize(); + float num15 = (double) num14 > (double) num10 * 2.0 ? num10 : num14 / 2f; + vector2_13 *= num15; + this.velocity = (this.velocity * (num11 - 1f) + vector2_13) / num11; + } + else if (flag1) + { + if ((double) this.velocity.Length() < (double) num10 * 0.6) + { + vector2_13 = this.velocity; + vector2_13.Normalize(); + vector2_13 *= num10 * 0.6f; + this.velocity = (this.velocity * (num11 - 1f) + vector2_13) / num11; + } + } + else + this.velocity = this.velocity * 0.8f; + if (flag1 && !flag3 && (double) this.velocity.Length() < (double) num10 * 0.6) + { + this.velocity.Normalize(); + this.velocity = this.velocity * (num10 * 0.6f); + } + } + } + else + { + float num16 = (float) (int) ((double) num11 * 0.8); + float num17 = num10 * 1.5f; + this.tileCollide = false; + Vector2 vector2 = Main.player[this.owner].position - this.Center; + float num18 = vector2.Length(); + if ((double) num18 < (double) num17 + 10.0 || (double) num18 == 0.0) + { + this.Kill(); + } + else + { + vector2.Normalize(); + vector2 *= num17; + this.velocity = (this.velocity * (num16 - 1f) + vector2) / num16; + } + } + 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, true)) + { + 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, true)) + { + 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; + Main.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) + { + Main.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() + { + ++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, 40f, Utils.InverseLerp(0.0f, 9f, this.ai[0])); + this.Center = this.position; + Point tileCoordinates1 = this.TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = this.BottomRight.ToTileCoordinates(); + int num1 = tileCoordinates1.X / 2 + tileCoordinates2.X / 2; + int num2 = this.width / 2; + if ((int) this.ai[0] % 3 != 0) + return; + int num3 = (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) 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 index = 0; index < tileDustAmount; ++index) + { + 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 index = 0; index < tileDustAmount - 1; ++index) + { + 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) / 20f; + 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)); + } + } + } + } + } + } + } + } + + 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.PerLinePoint(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.PerLinePoint(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.PerLinePoint(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) + Main.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(); + Point result1; + if (!WorldUtils.Find(tileCoordinates, Searches.Chain((GenSearch) new Searches.Down(500), (GenCondition) new Conditions.IsSolid()), 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) new Conditions.IsSolid()), out result2)) + result2 = new Point(tileCoordinates.X, tileCoordinates.Y - maxDistance - 1); + Vector2 worldCoordinates1 = result1.ToWorldCoordinates(autoAddY: 0.0f); + 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.PerLinePoint(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, true) && rectangle.Intersects(npc.Hitbox)) + { + flag = true; + break; + } + } + if (flag) + { + Main.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.PerLinePoint(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 * 2; + 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) new Conditions.IsSolid()), out Point _)) + { + Main.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); + Main.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.itemTime = 2; + player.itemAnimation = 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 flag = false; + int num3 = 4; + for (int x = tileCoordinates1.X; x <= tileCoordinates2.X; ++x) + { + for (int y = tileCoordinates1.Y; y <= tileCoordinates2.Y; ++y) + { + if ((double) Vector2.Distance(this.Bottom, new Vector2((float) (x * 16), (float) (y * 16))) <= (double) width) + { + 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 num4 = WorldGen.KillTile_GetTileDustAmount(true, tileSafely1) * 6; + for (int index = 0; index < num4; ++index) + { + 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 index = 0; index < num4 - 1; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= 1f + (float) num3; + dust.velocity.Y *= Main.rand.NextFloat(); + } + } + if (num4 > 0) + flag = true; + } + } + } + } + } + Vector2 bottom = this.Bottom; + Vector2 spinningpoint = new Vector2(7f, 0.0f); + Vector2 vector2_1 = new Vector2(1f, 0.7f); + Color color = new Color(20, (int) byte.MaxValue, 100, 200); + for (float num5 = 0.0f; (double) num5 < 25.0; ++num5) + { + Vector2 vector2_2 = spinningpoint.RotatedBy((double) num5 * 6.28318548202515 / 25.0) * vector2_1; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55); + dust.alpha = 0; + if (!flag) + dust.alpha = 50; + dust.color = color; + dust.position = bottom + vector2_2; + dust.velocity.Y -= 3f; + dust.velocity.X *= 0.5f; + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 0.5); + dust.noLight = true; + } + if (flag) + return; + for (float num6 = 0.0f; (double) num6 < 25.0; ++num6) + { + Vector2 vector2_3 = spinningpoint.RotatedBy((double) num6 * 6.28318548202515 / 25.0) * vector2_1; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55); + dust.alpha = 100; + dust.color = color; + dust.position = bottom + vector2_3; + 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 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; + 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 Destination = vector2_1 + spinningpoint1.RotatedBy((double) rotation) + new Vector2((float) ((double) x + (double) num2 + 40.0), 0.0f).RotatedBy((double) rotation); + this.rotation = player.AngleTo(Destination) + 0.7853982f * (float) player.direction; + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + player.DirectionTo(this.Center); + Vector2 vector2_2 = player.DirectionTo(Destination); + 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 = player.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 = player.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 Destination = vector2_1 + spinningpoint3.RotatedBy((double) rotation) + new Vector2((float) ((double) x + (double) num5 + 40.0), 0.0f).RotatedBy((double) rotation); + this.rotation = player.AngleTo(Destination) + 0.7853982f * (float) player.direction; + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + player.DirectionTo(this.Center); + player.DirectionTo(Destination); + Vector2 spinningpoint4 = this.velocity.SafeNormalize(Vector2.UnitY); + if ((player.itemAnimation == 2 || player.itemAnimation == 6 || player.itemAnimation == 10) && this.owner == Main.myPlayer) + { + Vector2 vector2_3 = (spinningpoint4 + Main.rand.NextVector2Square(-0.2f, 0.2f)) * 12f; + switch (player.itemAnimation) + { + case 2: + vector2_3 = spinningpoint4.RotatedBy(0.383972465991974); + break; + case 6: + vector2_3 = spinningpoint4.RotatedBy(-0.383972465991974); + break; + case 10: + vector2_3 = spinningpoint4.RotatedBy(0.0); + break; + } + Projectile.NewProjectile(this.Center, vector2_3 * (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 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_GhastlyGlaiveImpactGhost, this.Center); + double num = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num; + } + ActiveSound activeSound = Main.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; + Vector2 vector2_1 = new Vector2((float) (player.direction * 30), -20f); + if (player.dead) + { + this.Kill(); + } + else + { + bool flag = true; + switch (this.type) + { + case 701: + if (Main.myPlayer == this.owner && player.petFlagDD2Dragon) + { + this.timeLeft = 2; + break; + } + break; + case 702: + if (Main.myPlayer == this.owner && player.petFlagDD2Ghost) + this.timeLeft = 2; + vector2_1.Y += (float) Math.Cos((double) this.localAI[0] * 0.0523598790168762) * 2f; + num3 = 4; + num2 = 10; + flag = false; + num1 = 6f; + Vector2 vector2_2 = new Vector2(this.spriteDirection == -1 ? -6f : -2f, -20f).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.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(this.Left, this.Right, 20f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 40f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(player.Left, player.Right, 40f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + break; + case 703: + if (Main.myPlayer == this.owner && 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; + } + if (flag && (player.suspiciouslookingTentacle || player.petFlagDD2Ghost)) + vector2_1.X += (float) (-player.direction * 64); + this.direction = this.spriteDirection = player.direction; + Vector2 vector2_3 = player.MountedCenter + vector2_1; + double num6 = (double) Vector2.Distance(this.Center, vector2_3); + if (num6 > 1000.0) + this.Center = player.Center + vector2_1; + Vector2 vector2_4 = vector2_3 - this.Center; + if (num6 < (double) num1) + this.velocity = this.velocity * 0.25f; + if (vector2_4 != Vector2.Zero) + { + if ((double) vector2_4.Length() < (double) num1 * 0.5) + this.velocity = vector2_4; + else + this.velocity = vector2_4 * 0.1f; + } + if ((double) this.velocity.Length() > 6.0) + { + float num7 = (float) ((double) this.velocity.X * 0.0799999982118607 + (double) this.velocity.Y * (double) this.spriteDirection * 0.0199999995529652); + if ((double) Math.Abs(this.rotation - num7) >= 3.14159274101257) + { + if ((double) num7 < (double) this.rotation) + this.rotation -= 6.283185f; + else + this.rotation += 6.283185f; + } + float num8 = 12f; + this.rotation = (this.rotation * (num8 - 1f) + num7) / num8; + 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; + } + } + ++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 = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_BookStaffTwisterLoop, this.Center); + double num2 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num2; + } + ActiveSound activeSound = Main.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; + } + + public void Kill() + { + if (!this.active) + return; + Main.projectileIdentity[this.owner, this.identity] = -1; + int timeLeft = this.timeLeft; + this.timeLeft = 0; + if (this.type == 686) + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyFireballImpact, this.Center); + else if (this.type == 711) + Main.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsysWrathImpact, this.Center); + else if (this.type == 704) + { + ActiveSound activeSound = Main.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound != null) + { + activeSound.Volume = 0.0f; + activeSound.Stop(); + } + } + if (this.type == 710) + { + this.ai[1] = -1f; + this.position = this.Center; + this.width = this.height = 40; + this.Center = this.position; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index1 = 0; index1 < 2; ++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 < 10; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.5f); + 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 *= 2f; + } + for (int index5 = 0; index5 < 5; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index6].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index6].noGravity = true; + Main.dust[index6].velocity *= 2f; + } + } + else if (this.type == 711) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index7 = 0; index7 < this.oldPos.Length / 2; index7 += 2) + { + hitbox.X = (int) this.oldPos[index7].X; + hitbox.Y = (int) this.oldPos[index7].Y; + for (int index8 = 0; index8 < 2; ++index8) + { + int Type = Utils.SelectRandom(Main.rand, 6, 55, 158); + int index9 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index9].alpha = 200; + Main.dust[index9].velocity *= 2.4f; + Main.dust[index9].scale += Main.rand.NextFloat(); + Main.dust[index9].scale -= 0.5f; + if (Main.dust[index9].type == 55) + Main.dust[index9].color = Color.Lerp(new Color(128, 0, 180, 128), Color.Gold, Main.rand.NextFloat()); + Main.dust[index9].noLight = true; + } + } + for (int index10 = 10; index10 < this.oldPos.Length; index10 += 2) + { + hitbox.X = (int) this.oldPos[index10].X; + hitbox.Y = (int) this.oldPos[index10].Y; + for (int index11 = 0; index11 < 2; ++index11) + { + if (Main.rand.Next(3) != 0) + { + int Type = Utils.SelectRandom(Main.rand, 55); + int index12 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index12].alpha = 120; + Main.dust[index12].velocity *= 2.4f; + Main.dust[index12].scale += Main.rand.NextFloat() * 0.7f; + Main.dust[index12].scale -= 0.5f; + if (Main.dust[index12].type == 55) + Main.dust[index12].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat()); + Main.dust[index12].noLight = true; + } + } + } + for (int index13 = 5; index13 < this.oldPos.Length; ++index13) + { + hitbox.X = (int) this.oldPos[index13].X; + hitbox.Y = (int) this.oldPos[index13].Y; + for (int index14 = 0; index14 < 1; ++index14) + { + if (Main.rand.Next(3) != 0) + { + int Type = Utils.SelectRandom(Main.rand, 55); + int index15 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index15].alpha = 80; + Main.dust[index15].velocity *= 0.3f; + Main.dust[index15].velocity += this.velocity * 0.5f; + Main.dust[index15].scale += Main.rand.NextFloat() * 0.7f; + Main.dust[index15].scale -= 0.5f; + if (Main.dust[index15].type == 55) + Main.dust[index15].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat()); + Main.dust[index15].noLight = true; + } + } + } + for (int index = 0; index < 20; ++index) + { + if (Main.rand.Next(3) != 0) + { + int Type = 228; + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 1.5f; + dust.velocity *= 6f; + dust.noLight = true; + } + } + for (int index = 0; index < 20; ++index) + { + if (Main.rand.Next(3) != 0) + { + int Type = 55; + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 1.5f; + dust.velocity *= 6f; + dust.noLight = true; + dust.color = new Color(0, 0, 220, 128); + } + } + if (this.owner == Main.myPlayer) + { + this.position = this.Center; + this.Size = new Vector2(140f); + this.Center = this.position; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.Damage(); + } + } + else if (this.type == 662 || this.type == 685) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + Vector2 vector2 = this.oldVelocity.SafeNormalize(Vector2.Zero); + Vector2 Position = this.position + vector2 * 16f; + for (int index = 0; index < 16; ++index) + { + if (Main.rand.Next(2) == 0) + { + Position -= vector2 * 8f; + } + else + { + Dust dust = Dust.NewDustDirect(Position, this.width, this.height, 11); + dust.position = (dust.position + this.Center) / 2f; + dust.velocity += this.oldVelocity * 0.4f; + dust.velocity *= 0.5f; + dust.noGravity = true; + Position -= vector2 * 8f; + } + } + } + if (this.type == 680) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + Vector2 vector2 = this.oldVelocity.SafeNormalize(Vector2.Zero); + Vector2 Position = this.position + vector2 * 16f; + for (int index = 0; index < 16; ++index) + { + if (Main.rand.Next(2) == 0) + { + Position -= vector2 * 8f; + } + else + { + Dust dust = Dust.NewDustDirect(Position, this.width, this.height, 11); + dust.position = (dust.position + this.Center) / 2f; + dust.velocity += this.oldVelocity * 0.4f; + dust.velocity *= 0.5f; + dust.noGravity = true; + Position -= vector2 * 8f; + } + } + Dust.NewDustDirect(this.position, this.width, this.height, 11, newColor: Color.Red, Scale: 1.6f).noGravity = true; + } + if (this.type == 664 || this.type == 666 || this.type == 668 || this.type == 706) + { + int num1 = 4; + int num2 = 20; + int num3 = 10; + int num4 = 20; + int num5 = 20; + int num6 = 4; + float num7 = 1.5f; + int num8 = 6; + int Type = 6; + if (Main.player[this.owner].setApprenticeT3) + { + num1 += 4; + num5 += 10; + num2 += 20; + num4 += 30; + num3 /= 2; + num6 += 4; + num7 += 0.5f; + num8 += 7; + Type = 270; + } + this.position = this.Center; + this.width = this.height = 16 * num8; + this.Center = this.position; + this.Damage(); + Main.PlaySound(SoundID.Item100, this.position); + for (int index16 = 0; index16 < num1; ++index16) + { + int index17 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index17].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index = 0; index < num2; ++index) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 2.5f); + dust.position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 10f; + dust.velocity *= 16f; + if ((double) dust.velocity.Y > -2.0) + dust.velocity.Y *= -0.4f; + dust.noLight = true; + dust.noGravity = true; + } + for (int index = 0; index < num4; ++index) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type, Alpha: 100, Scale: 1.5f); + dust.position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + dust.velocity *= 2f; + dust.noGravity = true; + dust.fadeIn = num7; + } + for (int index18 = 0; index18 < num3; ++index18) + { + int index19 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index19].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index19].noGravity = true; + Main.dust[index19].velocity *= 3f; + } + for (int index20 = 0; index20 < num5; ++index20) + { + int index21 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index21].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index21].noGravity = true; + Main.dust[index21].velocity *= 3f; + } + for (int index22 = 0; index22 < num6; ++index22) + { + int index23 = 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[index23].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index23].position -= Vector2.One * 16f; + if (Main.rand.Next(2) == 0) + Main.gore[index23].position.Y -= 30f; + Main.gore[index23].velocity *= 0.3f; + Main.gore[index23].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index23].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + else if (this.type == 681) + { + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + Main.PlaySound(SoundID.DD2_GoblinBomb, this.position); + this.width = 22; + this.height = 22; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index24 = 0; index24 < 10; ++index24) + { + int index25 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index25].velocity *= 1.4f; + int index26 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index26].velocity *= 1.4f; + Main.dust[index26].noGravity = true; + Main.dust[index26].fadeIn = 2f; + } + for (int index27 = 0; index27 < 10; ++index27) + { + int index28 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index28].noGravity = true; + Main.dust[index28].velocity *= 5f; + int index29 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index29].velocity *= 3f; + } + int index30 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index30].velocity *= 0.4f; + ++Main.gore[index30].velocity.X; + ++Main.gore[index30].velocity.Y; + int index31 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index31].velocity *= 0.4f; + --Main.gore[index31].velocity.X; + ++Main.gore[index31].velocity.Y; + int index32 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index32].velocity *= 0.4f; + ++Main.gore[index32].velocity.X; + --Main.gore[index32].velocity.Y; + int index33 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index33].velocity *= 0.4f; + --Main.gore[index33].velocity.X; + --Main.gore[index33].velocity.Y; + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 80; + this.height = 80; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.Damage(); + } + if (this.type == 669) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + Vector2 vector2 = new Vector2(20f, 20f); + for (int index = 0; index < 10; ++index) + Dust.NewDustDirect(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 4, Alpha: 100, newColor: new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 110), Scale: 1.1f).velocity *= 1.4f; + for (int index = 0; index < 40; ++index) + { + Dust dust = Dust.NewDustDirect(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 4, Alpha: 50, newColor: new Color(245, 200, 30, 155), Scale: 1.2f); + dust.noGravity = true; + dust.velocity *= 4f; + Dust.NewDustDirect(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 4, Alpha: 50, newColor: new Color(245, 200, 30, 155), Scale: 0.8f).velocity *= 2f; + } + } + if (this.type == 634 || this.type == 635) + { + int num9 = Utils.SelectRandom(Main.rand, 242, 73, 72, 71, (int) byte.MaxValue); + int Type1 = (int) byte.MaxValue; + int Type2 = (int) byte.MaxValue; + int num10 = 50; + float Scale1 = 1.7f; + float Scale2 = 0.8f; + float Scale3 = 2f; + Vector2 vector2 = (this.rotation - 1.570796f).ToRotationVector2() * this.velocity.Length() * (float) this.MaxUpdates; + if (this.type == 635) + { + Type1 = 88; + Type2 = 88; + num9 = Utils.SelectRandom(Main.rand, 242, 59, 88); + Scale1 = 3.7f; + Scale2 = 1.5f; + Scale3 = 2.2f; + vector2 *= 0.5f; + } + Main.PlaySound(SoundID.Item14, this.position); + this.position = this.Center; + this.width = this.height = num10; + this.Center = this.position; + this.maxPenetrate = -1; + this.penetrate = -1; + this.Damage(); + for (int index34 = 0; index34 < 40; ++index34) + { + int Type3 = Utils.SelectRandom(Main.rand, 242, 73, 72, 71, (int) byte.MaxValue); + if (this.type == 635) + Type3 = Utils.SelectRandom(Main.rand, 242, 59, 88); + int index35 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type3, Alpha: 200, Scale: Scale1); + Main.dust[index35].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index35].noGravity = true; + Main.dust[index35].velocity *= 3f; + Main.dust[index35].velocity += vector2 * Main.rand.NextFloat(); + int index36 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type1, Alpha: 100, Scale: Scale2); + Main.dust[index36].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index36].velocity *= 2f; + Main.dust[index36].noGravity = true; + Main.dust[index36].fadeIn = 1f; + Main.dust[index36].color = Color.Crimson * 0.5f; + Main.dust[index36].velocity += vector2 * Main.rand.NextFloat(); + } + for (int index37 = 0; index37 < 20; ++index37) + { + int index38 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type2, Scale: Scale3); + Main.dust[index38].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 3f; + Main.dust[index38].noGravity = true; + Main.dust[index38].velocity *= 0.5f; + Main.dust[index38].velocity += vector2 * (float) (0.600000023841858 + 0.600000023841858 * (double) Main.rand.NextFloat()); + } + } + else if (this.type == 651) + { + if ((double) this.localAI[0] == 1.0 && this.owner == Main.myPlayer) + { + Player master = Main.player[this.owner]; + Point point = new Vector2(this.ai[0], this.ai[1]).ToPoint(); + Point tileCoordinates = this.Center.ToTileCoordinates(); + if (Main.netMode == 1) + NetMessage.SendData(109, number: point.X, number2: ((float) point.Y), number3: ((float) tileCoordinates.X), number4: ((float) tileCoordinates.Y), number5: ((int) WiresUI.Settings.ToolMode)); + else + Wiring.MassWireOperation(point, tileCoordinates, master); + } + } + else if (this.type == 641) + { + if (this.owner == Main.myPlayer) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == 642) + Main.projectile[index].Kill(); + } + } + } + else if (this.type == 643) + { + if (this.owner == Main.myPlayer) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == 644) + Main.projectile[index].Kill(); + } + } + } + else if (this.type == 645) + { + bool flag = WorldGen.SolidTile(Framing.GetTileSafely((int) this.position.X / 16, (int) this.position.Y / 16)); + 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 index39 = 0; index39 < 4; ++index39) + { + int index40 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Scale: 2.5f); + Main.dust[index40].noGravity = true; + Main.dust[index40].velocity *= 3f; + if (flag) + Main.dust[index40].noLight = true; + int index41 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Alpha: 100, Scale: 1.5f); + Main.dust[index41].velocity *= 2f; + Main.dust[index41].noGravity = true; + if (flag) + Main.dust[index41].noLight = true; + } + for (int index42 = 0; index42 < 1; ++index42) + { + int index43 = 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[index43].velocity *= 0.3f; + Main.gore[index43].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index43].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + else if (this.type == 636) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index44 = 0; index44 < 6; index44 += 3) + { + hitbox.X = (int) this.oldPos[index44].X; + hitbox.Y = (int) this.oldPos[index44].Y; + for (int index45 = 0; index45 < 5; ++index45) + { + int Type = Utils.SelectRandom(Main.rand, 6, 259, 158); + int index46 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, 2.5f * (float) this.direction, -2.5f); + Main.dust[index46].alpha = 200; + Main.dust[index46].velocity *= 2.4f; + Main.dust[index46].scale += Main.rand.NextFloat(); + } + } + } + else if (this.type == 614) + { + for (int index = 0; index < 10; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.velocity *= 3f; + } + } + if (this.type == 644) + { + Vector2 spinningpoint = new Vector2(0.0f, -3f).RotatedByRandom(3.14159274101257); + float num11 = (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 num12 = 0.0f; (double) num12 < (double) num11; ++num12) + { + 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) num12 / (double) num11) * 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; + 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 num13 = 0.0f; (double) num13 < (double) num11; ++num13) + { + 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) num13 / (double) num11) * 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; + 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); + } + if (Main.myPlayer == this.owner) + { + this.friendly = true; + int width = this.width; + int height = this.height; + int penetrate = this.penetrate; + this.position = this.Center; + this.width = this.height = 60; + this.Center = this.position; + this.penetrate = -1; + this.maxPenetrate = -1; + this.Damage(); + this.penetrate = penetrate; + this.position = this.Center; + this.width = width; + this.height = height; + this.Center = this.position; + } + } + if (this.type == 608) + { + this.maxPenetrate = -1; + this.penetrate = -1; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index47 = 0; index47 < 4; ++index47) + { + int index48 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index48].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index49 = 0; index49 < 30; ++index49) + { + int index50 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 3.7f); + Main.dust[index50].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index50].noGravity = true; + Main.dust[index50].velocity *= 3f; + Main.dust[index50].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].ArmorSetDye(), Main.player[this.owner]); + int index51 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index51].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index51].velocity *= 2f; + Main.dust[index51].noGravity = true; + Main.dust[index51].fadeIn = 2.5f; + Main.dust[index51].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].ArmorSetDye(), Main.player[this.owner]); + } + for (int index52 = 0; index52 < 10; ++index52) + { + int index53 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index53].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index53].noGravity = true; + Main.dust[index53].velocity *= 3f; + Main.dust[index53].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].ArmorSetDye(), Main.player[this.owner]); + } + for (int index54 = 0; index54 < 10; ++index54) + { + int index55 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index55].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index55].noGravity = true; + Main.dust[index55].velocity *= 3f; + } + for (int index56 = 0; index56 < 2; ++index56) + { + int index57 = 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[index57].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index57].velocity *= 0.3f; + Main.gore[index57].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index57].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + else if (this.type == 661) + { + this.position = this.Center; + this.width = this.height = 160; + this.Center = this.position; + this.maxPenetrate = -1; + this.penetrate = -1; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + Vector2 Position = this.Center + Vector2.One * -20f; + int Width = 40; + int Height = Width; + for (int index58 = 0; index58 < 4; ++index58) + { + int index59 = Dust.NewDust(Position, Width, Height, 240, Alpha: 100, Scale: 1.5f); + Main.dust[index59].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) Width / 2f; + } + for (int index60 = 0; index60 < 20; ++index60) + { + int index61 = Dust.NewDust(Position, Width, Height, 62, Alpha: 200, Scale: 3.7f); + Main.dust[index61].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) Width / 2f; + Main.dust[index61].noGravity = true; + Main.dust[index61].noLight = true; + Main.dust[index61].velocity *= 3f; + Main.dust[index61].velocity += this.DirectionTo(Main.dust[index61].position) * (float) (2.0 + (double) Main.rand.NextFloat() * 4.0); + int index62 = Dust.NewDust(Position, Width, Height, 62, Alpha: 100, Scale: 1.5f); + Main.dust[index62].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) Width / 2f; + Main.dust[index62].velocity *= 2f; + Main.dust[index62].noGravity = true; + Main.dust[index62].fadeIn = 1f; + Main.dust[index62].color = Color.Crimson * 0.5f; + Main.dust[index62].noLight = true; + Main.dust[index62].velocity += this.DirectionTo(Main.dust[index62].position) * 8f; + } + for (int index63 = 0; index63 < 20; ++index63) + { + int index64 = Dust.NewDust(Position, Width, Height, 62, Scale: 2.7f); + Main.dust[index64].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) Width / 2f; + Main.dust[index64].noGravity = true; + Main.dust[index64].noLight = true; + Main.dust[index64].velocity *= 3f; + Main.dust[index64].velocity += this.DirectionTo(Main.dust[index64].position) * 2f; + } + for (int index65 = 0; index65 < 70; ++index65) + { + int index66 = Dust.NewDust(Position, Width, Height, 240, Scale: 1.5f); + Main.dust[index66].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) Width / 2f; + Main.dust[index66].noGravity = true; + Main.dust[index66].velocity *= 3f; + Main.dust[index66].velocity += this.DirectionTo(Main.dust[index66].position) * 3f; + } + } + else if (this.type == 617) + { + this.position = this.Center; + this.width = this.height = 176; + this.Center = this.position; + this.maxPenetrate = -1; + this.penetrate = -1; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index67 = 0; index67 < 4; ++index67) + { + int index68 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 240, Alpha: 100, Scale: 1.5f); + Main.dust[index68].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index69 = 0; index69 < 30; ++index69) + { + int index70 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 62, Alpha: 200, Scale: 3.7f); + Main.dust[index70].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index70].noGravity = true; + Main.dust[index70].velocity *= 3f; + int index71 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 90, Alpha: 100, Scale: 1.5f); + Main.dust[index71].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index71].velocity *= 2f; + Main.dust[index71].noGravity = true; + Main.dust[index71].fadeIn = 1f; + Main.dust[index71].color = Color.Crimson * 0.5f; + } + for (int index72 = 0; index72 < 10; ++index72) + { + int index73 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 62, Scale: 2.7f); + Main.dust[index73].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index73].noGravity = true; + Main.dust[index73].velocity *= 3f; + } + for (int index74 = 0; index74 < 10; ++index74) + { + int index75 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 240, Scale: 1.5f); + Main.dust[index75].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index75].noGravity = true; + Main.dust[index75].velocity *= 3f; + } + for (int index76 = 0; index76 < 2; ++index76) + { + int index77 = 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[index77].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index77].velocity *= 0.3f; + Main.gore[index77].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index77].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + if (Main.myPlayer == this.owner) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].type == 618 && (double) Main.projectile[index].ai[1] == (double) this.whoAmI) + Main.projectile[index].Kill(); + } + int num14 = Main.rand.Next(5, 9); + int num15 = Main.rand.Next(5, 9); + int num16 = Utils.SelectRandom(Main.rand, 86, 90); + int num17 = num16 == 86 ? 90 : 86; + for (int index = 0; index < num14; ++index) + { + Vector2 vector2_1 = this.Center + Utils.RandomVector2(Main.rand, -30f, 30f); + Vector2 vector2_2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + while ((double) vector2_2.X == 0.0 && (double) vector2_2.Y == 0.0) + vector2_2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_2.Normalize(); + if ((double) vector2_2.Y > 0.200000002980232) + vector2_2.Y *= -1f; + vector2_2 *= (float) Main.rand.Next(70, 101) * 0.1f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_2.X, vector2_2.Y, 620, (int) ((double) this.damage * 0.65), this.knockBack * 0.8f, this.owner, (float) num16); + } + for (int index = 0; index < num15; ++index) + { + Vector2 vector2_3 = this.Center + Utils.RandomVector2(Main.rand, -30f, 30f); + Vector2 vector2_4 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + while ((double) vector2_4.X == 0.0 && (double) vector2_4.Y == 0.0) + vector2_4 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_4.Normalize(); + if ((double) vector2_4.Y > 0.400000005960464) + vector2_4.Y *= -1f; + vector2_4 *= (float) Main.rand.Next(40, 81) * 0.1f; + Projectile.NewProjectile(vector2_3.X, vector2_3.Y, vector2_4.X, vector2_4.Y, 620, (int) ((double) this.damage * 0.65), this.knockBack * 0.8f, this.owner, (float) num17); + } + } + } + else if (this.type == 658) + { + for (int index78 = 0; index78 < 10; ++index78) + { + int index79 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 269, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.5f); + if (Main.rand.Next(3) == 0) + { + Main.dust[index79].fadeIn = (float) (0.75 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index79].scale = (float) (0.25 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129); + ++Main.dust[index79].type; + } + else + Main.dust[index79].scale = (float) (1.0 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index79].noGravity = true; + Main.dust[index79].velocity *= 1.25f; + Main.dust[index79].velocity -= this.oldVelocity / 10f; + } + } + else if (this.type == 620 || this.type == 618) + { + if (this.type == 618) + this.ai[0] = 86f; + for (int index80 = 0; index80 < 10; ++index80) + { + int index81 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, (int) this.ai[0], this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.5f); + if (Main.rand.Next(3) == 0) + { + Main.dust[index81].fadeIn = (float) (0.75 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index81].scale = (float) (0.25 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129); + ++Main.dust[index81].type; + } + else + Main.dust[index81].scale = (float) (1.0 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index81].noGravity = true; + Main.dust[index81].velocity *= 1.25f; + Main.dust[index81].velocity -= this.oldVelocity / 10f; + } + } + else if (this.type == 619) + { + Main.PlaySound(SoundID.Item50, this.position); + for (int index82 = 0; index82 < 20; ++index82) + { + int index83 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, (int) this.ai[0], this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.5f); + if (Main.rand.Next(3) == 0) + { + Main.dust[index83].fadeIn = (float) (1.10000002384186 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index83].scale = (float) (0.349999994039536 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + ++Main.dust[index83].type; + } + else + Main.dust[index83].scale = (float) (1.20000004768372 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index83].noGravity = true; + Main.dust[index83].velocity *= 2.5f; + Main.dust[index83].velocity -= this.oldVelocity / 10f; + } + if (Main.myPlayer == this.owner) + { + int num = Main.rand.Next(3, 6); + for (int index = 0; index < num; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + while ((double) vector2.X == 0.0 && (double) vector2.Y == 0.0) + vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(70, 101) * 0.1f; + Projectile.NewProjectile(this.oldPosition.X + (float) (this.width / 2), this.oldPosition.Y + (float) (this.height / 2), vector2.X, vector2.Y, 620, (int) ((double) this.damage * 0.8), this.knockBack * 0.8f, this.owner, this.ai[0]); + } + } + } + if (this.type == 601) + { + Color portalColor = PortalHelper.GetPortalColor(this.owner, (int) this.ai[0]); + portalColor.A = byte.MaxValue; + for (int index = 0; index < 6; ++index) + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * (3f * Main.rand.NextFloat()); + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 263)]; + dust.position = this.Center; + dust.velocity = vector2 + this.velocity / 5f; + dust.color = portalColor; + dust.scale = 2f; + dust.noLight = true; + dust.noGravity = true; + } + } + if (this.type == 596) + { + this.position = this.Center; + this.width = this.height = 60; + this.Center = this.position; + int num = 40; + if (Main.expertMode) + num = 30; + this.damage = num; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index84 = 0; index84 < 4; ++index84) + { + int index85 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index85].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index86 = 0; index86 < 20; ++index86) + { + int index87 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Scale: 2.5f); + Main.dust[index87].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index87].noGravity = true; + Main.dust[index87].velocity *= 2f; + } + for (int index88 = 0; index88 < 10; ++index88) + { + int index89 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index89].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index89].noGravity = true; + Main.dust[index89].velocity *= 2f; + } + } + if (this.type == 659) + { + if ((double) this.ai[0] >= 0.0) + { + this.position = this.Center; + this.width = this.height = 40; + this.Center = this.position; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index90 = 0; index90 < 2; ++index90) + { + int index91 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index91].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index92 = 0; index92 < 10; ++index92) + { + int index93 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Scale: 2.5f); + Main.dust[index93].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index93].noGravity = true; + Main.dust[index93].velocity *= 2f; + } + for (int index94 = 0; index94 < 5; ++index94) + { + int index95 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index95].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index95].noGravity = true; + Main.dust[index95].velocity *= 2f; + } + } + } + else if (this.type >= 625 && this.type <= 628) + { + for (int index96 = 0; index96 < 6; ++index96) + { + int index97 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100, Scale: 2f); + Main.dust[index97].noGravity = true; + Main.dust[index97].noLight = true; + } + } + if (this.type == 631) + { + int num = Main.rand.Next(5, 10); + for (int index98 = 0; index98 < num; ++index98) + { + int index99 = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100); + Main.dust[index99].velocity *= 1.6f; + --Main.dust[index99].velocity.Y; + Main.dust[index99].position -= Vector2.One * 4f; + Main.dust[index99].position = Vector2.Lerp(Main.dust[index99].position, this.Center, 0.5f); + Main.dust[index99].noGravity = true; + } + } + if (this.type == 539) + { + this.position = this.Center; + this.width = this.height = 80; + this.Center = this.position; + this.Damage(); + Main.PlaySound(4, (int) this.position.X, (int) this.position.Y, 7); + for (int index100 = 0; index100 < 4; ++index100) + { + int index101 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index101].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index102 = 0; index102 < 20; ++index102) + { + int index103 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 176, Alpha: 200, Scale: 3.7f); + Main.dust[index103].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index103].noGravity = true; + Main.dust[index103].velocity *= 3f; + } + for (int index104 = 0; index104 < 20; ++index104) + { + int index105 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 180, Scale: 2.7f); + Main.dust[index105].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index105].noGravity = true; + Main.dust[index105].velocity *= 3f; + } + for (int index106 = 0; index106 < 10; ++index106) + { + int index107 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index107].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index107].noGravity = true; + Main.dust[index107].velocity *= 3f; + } + } + else if (this.type == 585) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y, 27); + for (int index108 = 0; index108 < 20; ++index108) + { + int index109 = Dust.NewDust(this.position, this.width, this.height, 26, Alpha: 100); + Main.dust[index109].noGravity = true; + Main.dust[index109].velocity *= 1.2f; + Main.dust[index109].scale = 1.3f; + Main.dust[index109].velocity -= this.oldVelocity * 0.3f; + int index110 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 27, Alpha: 100, Scale: 2f); + Main.dust[index110].noGravity = true; + Main.dust[index110].velocity *= 3f; + } + } + else if (this.type == 590) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y, 27); + for (int index111 = 0; index111 < 10; ++index111) + { + int index112 = Dust.NewDust(this.position, this.width, this.height, 165, Alpha: 50, Scale: 1.5f); + Main.dust[index112].velocity *= 2f; + Main.dust[index112].noGravity = true; + } + float Scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.400000005960464); + int index113 = Gore.NewGore(this.position, Vector2.Zero, 375, Scale); + Main.gore[index113].velocity *= 0.3f; + int index114 = Gore.NewGore(this.position, Vector2.Zero, 376, Scale); + Main.gore[index114].velocity *= 0.3f; + int index115 = Gore.NewGore(this.position, Vector2.Zero, 377, Scale); + Main.gore[index115].velocity *= 0.3f; + } + else if (this.type == 587) + { + Color rgb = Main.hslToRgb(this.ai[1], 1f, 0.5f); + rgb.A = (byte) 200; + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index116 = 0; index116 < 10; ++index116) + { + int index117 = Dust.NewDust(this.position, this.width, this.height, 76, newColor: rgb); + Main.dust[index117].noGravity = true; + Main.dust[index117].velocity *= 1.2f; + Main.dust[index117].scale = 0.9f; + Main.dust[index117].velocity -= this.oldVelocity * 0.3f; + int index118 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 76, newColor: rgb, Scale: 1.1f); + Main.dust[index118].noGravity = true; + Main.dust[index118].velocity *= 2f; + } + } + else if (this.type == 572) + { + for (int index119 = 0; index119 < 15; ++index119) + { + int index120 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 40, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 100); + Main.dust[index120].velocity *= 3f; + Main.dust[index120].noGravity = true; + Main.dust[index120].scale = 1.25f; + Main.dust[index120].position = (this.Center + this.position) / 2f; + } + } + else if (this.type == 581) + { + for (int index = 0; index < 30; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 229, 229, 161); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 0.25f; + dust.velocity *= 2f; + dust.noLight = true; + } + } + else if (this.type == 671) + { + for (int index = 0; index < 30; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 27, 27, 62); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 0.25f; + dust.velocity *= 2f; + dust.noLight = true; + } + } + else if (this.type == 675) + { + for (int index = 0; index < 40; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 27, 242, 73, 72, 71, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 0.25f; + dust.velocity *= 3f; + dust.noLight = true; + } + } + else if (this.type == 676) + { + for (int index = 0; index < 120; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 4, 256); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type, Alpha: 100)]; + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust.fadeIn = 0.5f; + dust.velocity *= 4.5f; + dust.noLight = true; + if ((double) dust.velocity.Y > 0.0) + dust.velocity *= -0.5f; + if (dust.type == 4) + dust.color = new Color(80, 170, 40, 120); + } + for (int index = 0; index < 10; ++index) + Gore.NewGoreDirect(this.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (float) (-(double) Main.rand.NextFloat() * 5.0)), 1024); + for (int index = 0; index < 10; ++index) + Gore.NewGoreDirect(this.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (float) (-(double) Main.rand.NextFloat() * 5.0)), 1025); + for (int index = 0; index < 10; ++index) + Gore.NewGoreDirect(this.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (float) (-(double) Main.rand.NextFloat() * 5.0)), 1026); + for (int index = 0; index < 20; ++index) + Gore.NewGoreDirect(this.Center, new Vector2(MathHelper.Lerp(-0.5f, 0.5f, Main.rand.NextFloat()), (float) (-(double) Main.rand.NextFloat() * 2.0)), 1026); + if (Main.netMode != 2) + { + Player player = Main.player[Main.myPlayer]; + if (!player.dead && player.active && (double) (player.Center - this.Center).Length() < 300.0) + player.AddBuff(197, 900, false); + } + } + else if (this.type == 686) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index121 = 0; index121 < this.oldPos.Length / 2; index121 += 2) + { + hitbox.X = (int) this.oldPos[index121].X; + hitbox.Y = (int) this.oldPos[index121].Y; + for (int index122 = 0; index122 < 3; ++index122) + { + int Type = Utils.SelectRandom(Main.rand, 6, 55, 158); + int index123 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index123].alpha = 200; + Main.dust[index123].velocity *= 2.4f; + Main.dust[index123].scale += Main.rand.NextFloat(); + Main.dust[index123].scale -= 0.5f; + if (Main.dust[index123].type == 55) + Main.dust[index123].color = Color.Lerp(Color.Red, Color.Gold, Main.rand.NextFloat()); + Main.dust[index123].noLight = true; + } + } + for (int index124 = 10; index124 < this.oldPos.Length; index124 += 2) + { + hitbox.X = (int) this.oldPos[index124].X; + hitbox.Y = (int) this.oldPos[index124].Y; + for (int index125 = 0; index125 < 2; ++index125) + { + int Type = Utils.SelectRandom(Main.rand, 55); + int index126 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index126].alpha = 120; + Main.dust[index126].velocity *= 2.4f; + Main.dust[index126].scale += Main.rand.NextFloat() * 0.7f; + Main.dust[index126].scale -= 0.5f; + if (Main.dust[index126].type == 55) + Main.dust[index126].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat()); + Main.dust[index126].noLight = true; + } + } + for (int index127 = 5; index127 < this.oldPos.Length; ++index127) + { + hitbox.X = (int) this.oldPos[index127].X; + hitbox.Y = (int) this.oldPos[index127].Y; + for (int index128 = 0; index128 < 1; ++index128) + { + int Type = Utils.SelectRandom(Main.rand, 55); + int index129 = Dust.NewDust(hitbox.TopLeft(), this.width, this.height, Type, (float) this.direction, -2.5f); + Main.dust[index129].alpha = 80; + Main.dust[index129].velocity *= 0.3f; + Main.dust[index129].velocity += this.velocity * 0.5f; + Main.dust[index129].scale += Main.rand.NextFloat() * 0.7f; + Main.dust[index129].scale -= 0.5f; + if (Main.dust[index129].type == 55) + Main.dust[index129].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat()); + Main.dust[index129].noLight = true; + } + } + for (int index = 0; index < 30; ++index) + { + int Type = 228; + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = 1.25f + Main.rand.NextFloat(); + dust.fadeIn = 1.5f; + dust.velocity *= 6f; + dust.noLight = true; + } + } + if (this.type == 405) + { + Main.PlaySound(SoundID.Item54, this.position); + Vector2 center = this.Center; + for (int index130 = 0; index130 < 20; ++index130) + { + int num = 10; + int index131 = Dust.NewDust(this.Center - Vector2.One * (float) num, num * 2, num * 2, 212); + Dust dust = Main.dust[index131]; + Vector2 vector2 = Vector2.Normalize(dust.position - this.Center); + dust.position = this.Center + vector2 * (float) num * this.scale; + dust.velocity = index130 >= 30 ? vector2 * (float) Main.rand.Next(45, 91) / 10f : vector2 * dust.velocity.Length(); + dust.color = Main.hslToRgb((float) (0.400000005960464 + Main.rand.NextDouble() * 0.200000002980232), 0.9f, 0.5f); + dust.color = Color.Lerp(dust.color, Color.White, 0.3f); + dust.noGravity = true; + dust.scale = 0.7f; + } + } + if (this.type == 501) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + int num18 = 20; + this.position.X -= (float) num18; + this.position.Y -= (float) num18; + this.width += num18 * 2; + this.height += num18 * 2; + int num19 = num18 + 20; + for (int index132 = 0; index132 < 20; ++index132) + { + int index133 = Dust.NewDust(this.position, this.width, this.height, 188, Alpha: 100, Scale: 1.5f); + Main.dust[index133].velocity *= 0.5f; + } + for (int index134 = 0; index134 < 5; ++index134) + { + int index135 = Gore.NewGore(new Vector2(this.position.X + (float) Main.rand.Next(this.width), this.position.Y + (float) Main.rand.Next(this.height)), new Vector2(), Main.rand.Next(435, 438)); + Main.gore[index135].velocity *= 0.5f; + if (index134 == 0) + { + ++Main.gore[index135].velocity.X; + ++Main.gore[index135].velocity.Y; + } + else if (index134 == 1) + { + --Main.gore[index135].velocity.X; + ++Main.gore[index135].velocity.Y; + } + else if (index134 == 2) + { + ++Main.gore[index135].velocity.X; + --Main.gore[index135].velocity.Y; + } + else + { + --Main.gore[index135].velocity.X; + --Main.gore[index135].velocity.Y; + } + Main.gore[index135].velocity *= 0.5f; + } + this.position.X -= (float) num19; + this.position.Y -= (float) num19; + this.width += num19 * 2; + this.height += num19 * 2; + this.Damage(); + } + if (this.type == 410) + { + Main.PlaySound(SoundID.Item54, this.position); + Vector2 center = this.Center; + for (int index136 = 0; index136 < 10; ++index136) + { + int num = (int) (10.0 * (double) this.ai[1]); + int index137 = Dust.NewDust(this.Center - Vector2.One * (float) num, num * 2, num * 2, 212); + Dust dust = Main.dust[index137]; + Vector2 vector2 = Vector2.Normalize(dust.position - this.Center); + dust.position = this.Center + vector2 * (float) num * this.scale; + dust.velocity = index136 >= 30 ? vector2 * (float) Main.rand.Next(45, 91) / 10f : vector2 * dust.velocity.Length(); + dust.color = Main.hslToRgb((float) (0.400000005960464 + Main.rand.NextDouble() * 0.200000002980232), 0.9f, 0.5f); + dust.color = Color.Lerp(dust.color, Color.White, 0.3f); + dust.noGravity = true; + dust.scale = 0.7f; + } + } + if (this.type == 629 && Main.netMode != 1) + { + switch (Main.npc[(int) this.ai[0]].type) + { + case 422: + if (NPC.ShieldStrengthTowerVortex != 0) + Main.npc[(int) this.ai[0]].ai[3] = 1f; + NPC.ShieldStrengthTowerVortex = (int) MathHelper.Clamp((float) (NPC.ShieldStrengthTowerVortex - 1), 0.0f, (float) NPC.ShieldStrengthTowerMax); + break; + case 493: + if (NPC.ShieldStrengthTowerStardust != 0) + Main.npc[(int) this.ai[0]].ai[3] = 1f; + NPC.ShieldStrengthTowerStardust = (int) MathHelper.Clamp((float) (NPC.ShieldStrengthTowerStardust - 1), 0.0f, (float) NPC.ShieldStrengthTowerMax); + break; + case 507: + if (NPC.ShieldStrengthTowerNebula != 0) + Main.npc[(int) this.ai[0]].ai[3] = 1f; + NPC.ShieldStrengthTowerNebula = (int) MathHelper.Clamp((float) (NPC.ShieldStrengthTowerNebula - 1), 0.0f, (float) NPC.ShieldStrengthTowerMax); + break; + case 517: + if (NPC.ShieldStrengthTowerSolar != 0) + Main.npc[(int) this.ai[0]].ai[3] = 1f; + NPC.ShieldStrengthTowerSolar = (int) MathHelper.Clamp((float) (NPC.ShieldStrengthTowerSolar - 1), 0.0f, (float) NPC.ShieldStrengthTowerMax); + break; + } + Main.npc[(int) this.ai[0]].netUpdate = true; + NetMessage.SendData(101); + } + if (this.aiStyle == 105 && this.owner == Main.myPlayer && (double) this.ai[1] == 0.0) + { + Vector2 vector2_5 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_5.Normalize(); + Vector2 vector2_6 = vector2_5 * 0.3f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_6.X, vector2_6.Y, Main.rand.Next(569, 572), this.damage, 0.0f, this.owner); + } + if (this.type == 452) + { + Main.PlaySound(29, (int) this.position.X, (int) this.position.Y, 103); + this.position = this.Center; + this.width = this.height = 144; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + 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 index138 = 0; index138 < 40; ++index138) + { + int index139 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Scale: 2.5f); + Main.dust[index139].noGravity = true; + Main.dust[index139].velocity *= 3f; + int index140 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Alpha: 100, Scale: 1.5f); + Main.dust[index140].velocity *= 2f; + Main.dust[index140].noGravity = true; + } + for (int index141 = 0; index141 < 1; ++index141) + { + int index142 = 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[index142].velocity *= 0.3f; + Main.gore[index142].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index142].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + this.Damage(); + } + if (this.type == 454) + { + Main.PlaySound(4, (int) this.position.X, (int) this.position.Y, 6); + this.position = this.Center; + this.width = this.height = 208; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index143 = 0; index143 < 7; ++index143) + { + int index144 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index144].position = new Vector2((float) (this.width / 2), 0.0f).RotatedBy(6.28318548202515 * Main.rand.NextDouble()) * (float) Main.rand.NextDouble() + this.Center; + } + for (int index145 = 0; index145 < 60; ++index145) + { + int index146 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Scale: 2.5f); + Main.dust[index146].position = new Vector2((float) (this.width / 2), 0.0f).RotatedBy(6.28318548202515 * Main.rand.NextDouble()) * (float) Main.rand.NextDouble() + this.Center; + Main.dust[index146].noGravity = true; + Main.dust[index146].velocity *= 1f; + int index147 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Alpha: 100, Scale: 1.5f); + Main.dust[index147].position = new Vector2((float) (this.width / 2), 0.0f).RotatedBy(6.28318548202515 * Main.rand.NextDouble()) * (float) Main.rand.NextDouble() + this.Center; + Main.dust[index147].velocity *= 1f; + Main.dust[index147].noGravity = true; + } + for (int index148 = 0; index148 < 3; ++index148) + { + int index149 = 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[index149].velocity *= 0.3f; + Main.gore[index149].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index149].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + this.Damage(); + } + if (this.type == 467) + { + this.position = this.Center; + this.width = this.height = 176; + this.Center = this.position; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index150 = 0; index150 < 4; ++index150) + { + int index151 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index151].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index152 = 0; index152 < 30; ++index152) + { + int index153 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 3.7f); + Main.dust[index153].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index153].noGravity = true; + Main.dust[index153].velocity *= 3f; + int index154 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index154].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index154].velocity *= 2f; + Main.dust[index154].noGravity = true; + Main.dust[index154].fadeIn = 2.5f; + } + for (int index155 = 0; index155 < 10; ++index155) + { + int index156 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index156].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index156].noGravity = true; + Main.dust[index156].velocity *= 3f; + } + for (int index157 = 0; index157 < 10; ++index157) + { + int index158 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index158].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index158].noGravity = true; + Main.dust[index158].velocity *= 3f; + } + for (int index159 = 0; index159 < 2; ++index159) + { + int index160 = 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[index160].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index160].velocity *= 0.3f; + Main.gore[index160].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index160].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + if (this.type == 468) + { + this.position = this.Center; + this.width = this.height = 176; + this.Center = this.position; + this.Damage(); + Main.PlaySound(SoundID.Item14, this.position); + for (int index161 = 0; index161 < 4; ++index161) + { + int index162 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index162].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index163 = 0; index163 < 20; ++index163) + { + int index164 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Alpha: 200, Scale: 3.7f); + Main.dust[index164].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index164].noGravity = true; + Main.dust[index164].velocity *= 3f; + int index165 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Alpha: 100, Scale: 1.5f); + Main.dust[index165].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index165].velocity *= 2f; + Main.dust[index165].noGravity = true; + Main.dust[index165].fadeIn = 2.5f; + } + for (int index166 = 0; index166 < 10; ++index166) + { + int index167 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Scale: 2.7f); + Main.dust[index167].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index167].noGravity = true; + Main.dust[index167].velocity *= 3f; + } + for (int index168 = 0; index168 < 10; ++index168) + { + int index169 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index169].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index169].noGravity = true; + Main.dust[index169].velocity *= 3f; + } + for (int index170 = 0; index170 < 2; ++index170) + { + int index171 = 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[index171].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index171].velocity *= 0.3f; + Main.gore[index171].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index171].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + if (this.type == 485) + { + for (int index172 = 0; index172 < 15; ++index172) + { + int index173 = Dust.NewDust(this.position, this.width, this.height, 6); + Main.dust[index173].noGravity = true; + Main.dust[index173].velocity -= this.oldVelocity * (float) Main.rand.Next(20, 60) * 0.01f; + } + } + else if (this.type == 484) + { + for (int index174 = 0; index174 < 5; ++index174) + { + int index175 = Dust.NewDust(this.position, this.width, this.height, 78); + Main.dust[index175].noGravity = true; + Main.dust[index175].velocity -= this.oldVelocity / 5f; + Main.dust[index175].scale = 0.85f; + } + } + else if (this.type == 483) + { + Main.PlaySound(SoundID.Item14, this.position); + if (this.owner == Main.myPlayer) + { + int length = Main.rand.Next(4, 8); + int[] numArray = new int[length]; + int maxValue = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this, true) && Collision.CanHitLine(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + numArray[maxValue] = index; + ++maxValue; + if (maxValue == length) + break; + } + } + if (maxValue > 1) + { + for (int index176 = 0; index176 < 100; ++index176) + { + int index177 = Main.rand.Next(maxValue); + int index178 = index177; + while (index178 == index177) + index178 = Main.rand.Next(maxValue); + int num = numArray[index177]; + numArray[index177] = numArray[index178]; + numArray[index178] = num; + } + } + Vector2 vector2_7 = new Vector2(-1f, -1f); + for (int index = 0; index < maxValue; ++index) + { + Vector2 vector2_8 = Main.npc[numArray[index]].Center - this.Center; + vector2_8.Normalize(); + vector2_7 += vector2_8; + } + vector2_7.Normalize(); + for (int index = 0; index < length; ++index) + { + float num = (float) Main.rand.Next(8, 15); + Vector2 vector2_9 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_9.Normalize(); + if (maxValue > 0) + { + vector2_9 += vector2_7; + vector2_9.Normalize(); + } + vector2_9 *= num; + if (maxValue > 0) + { + --maxValue; + vector2_9 = Main.npc[numArray[maxValue]].Center - this.Center; + vector2_9.Normalize(); + vector2_9 *= num; + } + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_9.X, vector2_9.Y, 484, (int) ((double) this.damage * 0.7), this.knockBack * 0.7f, this.owner); + } + } + for (int index179 = 0; index179 < 20; ++index179) + { + int index180 = Dust.NewDust(this.position, this.width, this.height, 78); + Main.dust[index180].noGravity = true; + Main.dust[index180].velocity *= 4f; + } + for (int index181 = 0; index181 < 7; ++index181) + { + int index182 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index182].velocity *= 0.9f; + Main.dust[index182].scale = 0.9f; + } + for (int index183 = 0; index183 < 3; ++index183) + { + int index184 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index184].noGravity = true; + Main.dust[index184].velocity *= 3f; + int index185 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index185].velocity *= 2f; + } + int index186 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index186].velocity *= 0.3f; + Main.gore[index186].velocity.X += (float) Main.rand.Next(-1, 2); + Main.gore[index186].velocity.Y += (float) Main.rand.Next(-1, 2); + if (this.owner == Main.myPlayer) + { + int num = 100; + this.position.X -= (float) (num / 2); + this.position.Y -= (float) (num / 2); + this.width += num; + ++this.height; + this.penetrate = -1; + this.Damage(); + } + } + if (this.type == 523) + { + Main.PlaySound(SoundID.Item54, this.position); + for (int index187 = 0; index187 < 25; ++index187) + { + int index188 = Dust.NewDust(this.position, this.width, this.height, 256); + Main.dust[index188].noGravity = true; + Main.dust[index188].position = (Main.dust[index188].position + this.position) / 2f; + Main.dust[index188].velocity = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + Main.dust[index188].velocity.Normalize(); + Main.dust[index188].velocity *= (float) Main.rand.Next(1, 30) * 0.1f; + Main.dust[index188].alpha = this.alpha; + } + } + else if (this.type == 522) + { + Main.PlaySound(SoundID.Item118, this.position); + for (int index189 = 0; index189 < 10; ++index189) + { + int index190 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 254, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.5f); + if (Main.rand.Next(3) == 0) + { + Main.dust[index190].fadeIn = (float) (0.75 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index190].scale = (float) (0.25 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129); + ++Main.dust[index190].type; + } + else + Main.dust[index190].scale = (float) (1.0 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index190].noGravity = true; + Main.dust[index190].velocity *= 1.25f; + Main.dust[index190].velocity -= this.oldVelocity / 10f; + } + } + else if (this.type == 521) + { + Main.PlaySound(SoundID.Item110, this.position); + for (int index191 = 0; index191 < 20; ++index191) + { + int index192 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 254, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.5f); + if (Main.rand.Next(3) == 0) + { + Main.dust[index192].fadeIn = (float) (1.10000002384186 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index192].scale = (float) (0.349999994039536 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + ++Main.dust[index192].type; + } + else + Main.dust[index192].scale = (float) (1.20000004768372 + (double) Main.rand.Next(-10, 11) * 0.00999999977648258); + Main.dust[index192].noGravity = true; + Main.dust[index192].velocity *= 2.5f; + Main.dust[index192].velocity -= this.oldVelocity / 10f; + } + if (Main.myPlayer == this.owner) + { + int num = Main.rand.Next(3, 6); + for (int index = 0; index < num; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + while ((double) vector2.X == 0.0 && (double) vector2.Y == 0.0) + vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(70, 101) * 0.1f; + Projectile.NewProjectile(this.oldPosition.X + (float) (this.width / 2), this.oldPosition.Y + (float) (this.height / 2), vector2.X, vector2.Y, 522, (int) ((double) this.damage * 0.8), this.knockBack * 0.8f, this.owner); + } + } + } + if (this.type == 520) + { + Main.PlaySound(SoundID.Item50, this.position); + for (int index193 = 0; index193 < 10; ++index193) + { + int index194 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 252, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.75f); + Main.dust[index194].noGravity = true; + Main.dust[index194].velocity -= this.oldVelocity / 3f; + } + } + if (this.type == 459 || this.type == 709) + { + int num20 = 3; + int num21 = 10; + int num22 = 0; + if ((double) this.scale >= 1.0) + { + this.position = this.Center; + this.width = this.height = 144; + this.Center = this.position; + num20 = 7; + num21 = 30; + num22 = 2; + this.Damage(); + } + for (int index195 = 0; index195 < num20; ++index195) + { + int index196 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index196].position = new Vector2((float) (this.width / 2), 0.0f).RotatedBy(6.28318548202515 * Main.rand.NextDouble()) * (float) Main.rand.NextDouble() + this.Center; + } + for (int index197 = 0; index197 < num21; ++index197) + { + int index198 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 226, Scale: 1.5f); + Main.dust[index198].position = new Vector2((float) (this.width / 2), 0.0f).RotatedBy(6.28318548202515 * Main.rand.NextDouble()) * (float) Main.rand.NextDouble() + this.Center; + Main.dust[index198].noGravity = true; + Main.dust[index198].velocity *= 1f; + } + for (int index199 = 0; index199 < num22; ++index199) + { + int index200 = 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[index200].velocity *= 0.3f; + Main.gore[index200].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index200].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + if (this.type == 709 && Main.myPlayer == this.owner) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) this.Center.X - 40, (int) this.Center.Y - 40, 80, 80); + 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 == 443 && Main.projectile[index].getRect().Intersects(rectangle)) + { + Main.projectile[index].ai[1] = 1f; + Main.projectile[index].velocity = (this.Center - Main.projectile[index].Center) / 5f; + Main.projectile[index].netUpdate = true; + } + } + int index201 = Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 443, this.damage, 0.0f, this.owner); + Main.projectile[index201].timeLeft = 30 * Main.rand.Next(2, 6); + float[] localAi = Main.projectile[index201].localAI; + SlotId slotId = Main.PlayTrackedSound((SoundStyle) SoundID.DD2_SkyDragonsFuryCircle, this.Center); + double num23 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[0] = (float) num23; + } + } + if (this.owner != Main.myPlayer && this.type == 453 && Main.player[this.owner].mount.AbilityActive) + Main.player[this.owner].mount.UseAbility(Main.player[this.owner], this.position, false); + if (this.type == 441) + Main.player[this.owner].mount.StopAbilityCharge(); + if (this.type == 444) + { + Main.PlaySound(SoundID.Item96, this.position); + int num = Main.rand.Next(5, 9); + for (int index202 = 0; index202 < num; ++index202) + { + int index203 = Dust.NewDust(this.Center, 0, 0, 171, Alpha: 100, Scale: 1.4f); + Main.dust[index203].velocity *= 0.8f; + Main.dust[index203].position = Vector2.Lerp(Main.dust[index203].position, this.Center, 0.5f); + Main.dust[index203].noGravity = true; + } + if (this.owner == Main.myPlayer) + { + Vector2 vector2_10 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + if ((double) Main.player[this.owner].gravDir == -1.0) + vector2_10.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y; + Vector2 vector2_11 = Vector2.Normalize(vector2_10 - this.Center) * this.localAI[1]; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_11.X, vector2_11.Y, (int) this.localAI[0], this.damage, this.knockBack, this.owner); + } + } + if (this.type == 472) + { + for (int index204 = 0; index204 < 20; ++index204) + { + int index205 = Dust.NewDust(this.position, this.width, this.height, 30); + Main.dust[index205].noGravity = true; + Main.dust[index205].velocity *= 0.45f; + Main.dust[index205].velocity += this.velocity * 0.9f; + } + } + if (this.type == 639 || this.type == 640) + { + int num24 = Main.rand.Next(5, 10); + for (int index206 = 0; index206 < num24; ++index206) + { + int index207 = Dust.NewDust(this.Center, 0, 0, 220, Alpha: 100, Scale: 0.5f); + Main.dust[index207].velocity *= 1.6f; + --Main.dust[index207].velocity.Y; + Main.dust[index207].position = Vector2.Lerp(Main.dust[index207].position, this.Center, 0.5f); + Main.dust[index207].noGravity = true; + } + if (this.owner == Main.myPlayer && this.type == 639) + { + int num25 = timeLeft + 1; + int nextSlot = Projectile.GetNextSlot(); + if (Main.ProjectileUpdateLoopIndex < nextSlot && Main.ProjectileUpdateLoopIndex != -1) + ++num25; + Vector2 vector2 = new Vector2(this.ai[0], this.ai[1]); + Projectile.NewProjectile(this.localAI[0], this.localAI[1], vector2.X, vector2.Y, 640, this.damage, this.knockBack, this.owner, ai1: ((float) num25)); + } + } + if (this.type == 684) + { + int num = Main.rand.Next(15, 25); + for (int index208 = 0; index208 < num; ++index208) + { + int index209 = Dust.NewDust(this.Center, 0, 0, 60, Alpha: 100, newColor: new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), Scale: 1.3f); + Main.dust[index209].velocity *= (float) (8.0 * (0.300000011920929 + 0.699999988079071 * (double) Main.rand.NextFloat())); + Main.dust[index209].fadeIn = (float) (1.29999995231628 + (double) Main.rand.NextFloat() * 0.200000002980232); + Main.dust[index209].noLight = true; + Main.dust[index209].noGravity = true; + Main.dust[index209].position += Main.dust[index209].velocity * 4f; + } + } + if (this.type == 435) + { + int num = Main.rand.Next(5, 10); + for (int index210 = 0; index210 < num; ++index210) + { + int index211 = Dust.NewDust(this.Center, 0, 0, 226, Alpha: 100, Scale: 0.5f); + Main.dust[index211].velocity *= 1.6f; + --Main.dust[index211].velocity.Y; + Main.dust[index211].position = Vector2.Lerp(Main.dust[index211].position, this.Center, 0.5f); + Main.dust[index211].noGravity = true; + } + } + if (this.type == 682) + { + int num = 22; + for (int index212 = 0; index212 < num; ++index212) + { + int index213 = Dust.NewDust(this.Center, 0, 0, 272, Scale: 0.5f); + Main.dust[index213].velocity *= 1.6f; + --Main.dust[index213].velocity.Y; + Main.dust[index213].position = Vector2.Lerp(Main.dust[index213].position, this.Center, 0.5f); + } + } + if (this.type == 436) + { + int num = Main.rand.Next(5, 10); + for (int index214 = 0; index214 < num; ++index214) + { + int index215 = Dust.NewDust(this.Center, 0, 0, 220, Alpha: 100, Scale: 0.5f); + Main.dust[index215].velocity *= 1.6f; + --Main.dust[index215].velocity.Y; + Main.dust[index215].position = Vector2.Lerp(Main.dust[index215].position, this.Center, 0.5f); + Main.dust[index215].noGravity = true; + } + } + if (this.type == 462) + { + int num = Main.rand.Next(5, 10); + for (int index216 = 0; index216 < num; ++index216) + { + int index217 = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100, Scale: 0.5f); + Main.dust[index217].velocity *= 1.6f; + --Main.dust[index217].velocity.Y; + Main.dust[index217].position -= Vector2.One * 4f; + Main.dust[index217].position = Vector2.Lerp(Main.dust[index217].position, this.Center, 0.5f); + Main.dust[index217].noGravity = true; + } + } + if (this.type == 442) + { + Main.PlaySound(SoundID.Item94, this.position); + int num = Main.rand.Next(3, 7); + for (int index218 = 0; index218 < num; ++index218) + { + int index219 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100, Scale: 2.1f); + Main.dust[index219].velocity *= 2f; + Main.dust[index219].noGravity = true; + } + if (Main.myPlayer == this.owner) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) this.Center.X - 40, (int) this.Center.Y - 40, 80, 80); + 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 == 443 && Main.projectile[index].getRect().Intersects(rectangle)) + { + Main.projectile[index].ai[1] = 1f; + Main.projectile[index].velocity = (this.Center - Main.projectile[index].Center) / 5f; + Main.projectile[index].netUpdate = true; + } + } + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 443, this.damage, 0.0f, this.owner); + } + } + if (this.type == 440) + { + int num = Main.rand.Next(3, 7); + for (int index220 = 0; index220 < num; ++index220) + { + int index221 = Dust.NewDust(this.Center - this.velocity / 2f, 0, 0, 135, Alpha: 100, Scale: 2.1f); + Main.dust[index221].velocity *= 2f; + Main.dust[index221].noGravity = true; + } + } + if (this.type == 606) + { + int num = Main.rand.Next(3, 7); + for (int index222 = 0; index222 < num; ++index222) + { + int index223 = Dust.NewDust(this.Center - this.velocity / 2f, 0, 0, 182, Alpha: 100, Scale: 1.6f); + Main.dust[index223].velocity *= 1.5f; + Main.dust[index223].noGravity = true; + } + } + if (this.type == 449) + { + int num = Main.rand.Next(3, 7); + for (int index224 = 0; index224 < num; ++index224) + { + int index225 = Dust.NewDust(this.Center - this.velocity / 2f, 0, 0, 228, Alpha: 100, Scale: 2.1f); + Main.dust[index225].velocity *= 2f; + Main.dust[index225].noGravity = true; + } + } + if (this.type == 495) + { + for (int index226 = 0; index226 < 15; ++index226) + { + int index227 = Dust.NewDust(this.Center, 10, 10, 27); + Main.dust[index227].noGravity = true; + Main.dust[index227].velocity -= this.oldVelocity * 0.3f; + } + } + if (this.type == 497) + { + for (int index228 = 0; index228 < 15; ++index228) + { + int index229 = Dust.NewDust(this.Center, 10, 10, 27); + Main.dust[index229].noGravity = true; + Main.dust[index229].velocity *= 2f; + Main.dust[index229].velocity -= this.oldVelocity * 0.3f; + Main.dust[index229].scale += (float) Main.rand.Next(150) * (1f / 1000f); + } + } + if (this.type == 448) + { + Main.PlaySound(SoundID.Item14, this.position); + this.position = this.Center; + this.width = this.height = 112; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + 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 index230 = 0; index230 < 40; ++index230) + { + int index231 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Scale: 2.5f); + Main.dust[index231].noGravity = true; + Main.dust[index231].velocity *= 3f; + int index232 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 100, Scale: 1.5f); + Main.dust[index232].velocity *= 2f; + Main.dust[index232].noGravity = true; + } + for (int index233 = 0; index233 < 1; ++index233) + { + int index234 = 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[index234].velocity *= 0.3f; + Main.gore[index234].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index234].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + this.Damage(); + } + if (this.type == 616) + { + Main.PlaySound(SoundID.Item14, this.position); + this.position = this.Center; + this.width = this.height = 80; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + 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 index235 = 0; index235 < 40; ++index235) + { + int index236 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Alpha: 200, Scale: 2.5f); + Main.dust[index236].noGravity = true; + Main.dust[index236].velocity *= 2f; + int index237 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229, Alpha: 200, Scale: 1.5f); + Main.dust[index237].velocity *= 1.2f; + Main.dust[index237].noGravity = true; + } + for (int index238 = 0; index238 < 1; ++index238) + { + int index239 = 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[index239].velocity *= 0.3f; + Main.gore[index239].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index239].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + this.Damage(); + } + if (this.type == 502) + { + Vector2 vector2 = new Vector2((float) this.width, (float) this.height) / 2f; + for (int index240 = 0; index240 < this.oldPos.Length; ++index240) + { + if (!(this.oldPos[index240] == Vector2.Zero)) + { + int index241 = Dust.NewDust(this.oldPos[index240] + vector2, 0, 0, 66, Alpha: 150, newColor: Color.Transparent, Scale: 0.7f); + Main.dust[index241].color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f); + Main.dust[index241].noGravity = true; + } + } + } + if (this.type == 510) + { + Main.PlaySound(SoundID.Item107, this.position); + Gore.NewGore(this.Center, -this.oldVelocity * 0.2f, 704); + Gore.NewGore(this.Center, -this.oldVelocity * 0.2f, 705); + if (this.owner == Main.myPlayer) + { + int num = Main.rand.Next(20, 31); + for (int index = 0; index < num; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(10, 201) * 0.01f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2.X, vector2.Y, 511 + Main.rand.Next(3), this.damage, 1f, this.owner, ai1: ((float) Main.rand.Next(-45, 1))); + } + } + } + if (this.type == 408) + { + for (int index242 = 0; index242 < 15; ++index242) + { + int index243 = Dust.NewDust(this.Center - Vector2.One * 10f, 50, 50, 5, SpeedY: -2f); + Main.dust[index243].velocity /= 2f; + } + int num = 10; + int index244 = Gore.NewGore(this.Center, this.velocity * 0.8f, 584); + Main.gore[index244].timeLeft /= num; + int index245 = Gore.NewGore(this.Center, this.velocity * 0.9f, 585); + Main.gore[index245].timeLeft /= num; + int index246 = Gore.NewGore(this.Center, this.velocity * 1f, 586); + Main.gore[index246].timeLeft /= num; + } + if (this.type == 385) + { + Main.PlaySound(4, (int) this.Center.X, (int) this.Center.Y, 19); + int num26 = 36; + for (int index247 = 0; index247 < num26; ++index247) + { + Vector2 vector2_12 = (Vector2.Normalize(this.velocity) * new Vector2((float) this.width / 2f, (float) this.height) * 0.75f).RotatedBy((double) (index247 - (num26 / 2 - 1)) * 6.28318548202515 / (double) num26) + this.Center; + Vector2 vector2_13 = vector2_12 - this.Center; + int index248 = Dust.NewDust(vector2_12 + vector2_13, 0, 0, 172, vector2_13.X * 2f, vector2_13.Y * 2f, 100, Scale: 1.4f); + Main.dust[index248].noGravity = true; + Main.dust[index248].noLight = true; + Main.dust[index248].velocity = vector2_13; + } + if (this.owner == Main.myPlayer) + { + if ((double) this.ai[1] < 1.0) + { + int index = Projectile.NewProjectile(this.Center.X - (float) (this.direction * 30), this.Center.Y - 4f, (float) -this.direction * 0.01f, 0.0f, 384, Main.expertMode ? 25 : 40, 4f, this.owner, 16f, 15f); + Main.projectile[index].netUpdate = true; + } + else + { + int num27 = (int) ((double) this.Center.Y / 16.0); + int index249 = (int) ((double) this.Center.X / 16.0); + int num28 = 100; + if (index249 < 10) + index249 = 10; + if (index249 > Main.maxTilesX - 10) + index249 = Main.maxTilesX - 10; + if (num27 < 10) + num27 = 10; + if (num27 > Main.maxTilesY - num28 - 10) + num27 = Main.maxTilesY - num28 - 10; + for (int index250 = num27; index250 < num27 + num28; ++index250) + { + Tile tile = Main.tile[index249, index250]; + if (tile.active() && (Main.tileSolid[(int) tile.type] || tile.liquid != (byte) 0)) + { + num27 = index250; + break; + } + } + int Damage = Main.expertMode ? 50 : 80; + int index251 = Projectile.NewProjectile((float) (index249 * 16 + 8), (float) (num27 * 16 - 24), 0.0f, 0.0f, 386, Damage, 4f, Main.myPlayer, 16f, 24f); + Main.projectile[index251].netUpdate = true; + } + } + } + else if (this.type >= 424 && this.type <= 426) + { + Main.PlaySound(SoundID.Item89, this.position); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = (int) (128.0 * (double) this.scale); + this.height = (int) (128.0 * (double) this.scale); + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index = 0; index < 8; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index252 = 0; index252 < 32; ++index252) + { + int index253 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index253].noGravity = true; + Main.dust[index253].velocity *= 3f; + int index254 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index254].velocity *= 2f; + Main.dust[index254].noGravity = true; + } + for (int index255 = 0; index255 < 2; ++index255) + { + int index256 = 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[index256].velocity *= 0.3f; + Main.gore[index256].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index256].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + if (this.owner == Main.myPlayer) + { + this.localAI[1] = -1f; + this.maxPenetrate = 0; + this.Damage(); + } + for (int index257 = 0; index257 < 5; ++index257) + { + int index258 = Dust.NewDust(this.position, this.width, this.height, Utils.SelectRandom(Main.rand, 6, 259, 158), 2.5f * (float) this.direction, -2.5f); + Main.dust[index258].alpha = 200; + Main.dust[index258].velocity *= 2.4f; + Main.dust[index258].scale += Main.rand.NextFloat(); + } + } + if (this.type == 399) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + Vector2 vector2 = new Vector2(20f, 20f); + for (int index = 0; index < 5; ++index) + Dust.NewDust(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 12, newColor: Color.Red); + for (int index259 = 0; index259 < 10; ++index259) + { + int index260 = Dust.NewDust(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index260].velocity *= 1.4f; + } + for (int index261 = 0; index261 < 20; ++index261) + { + int index262 = Dust.NewDust(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index262].noGravity = true; + Main.dust[index262].velocity *= 5f; + int index263 = Dust.NewDust(this.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index263].velocity *= 3f; + } + if (Main.myPlayer == this.owner) + { + for (int index = 0; index < 6; ++index) + { + float SpeedX = (float) (-(double) this.velocity.X * (double) Main.rand.Next(20, 50) * 0.00999999977648258 + (double) Main.rand.Next(-20, 21) * 0.400000005960464); + float SpeedY = (float) (-(double) Math.Abs(this.velocity.Y) * (double) Main.rand.Next(30, 50) * 0.00999999977648258 + (double) Main.rand.Next(-20, 5) * 0.400000005960464); + Projectile.NewProjectile(this.Center.X + SpeedX, this.Center.Y + SpeedY, SpeedX, SpeedY, 400 + Main.rand.Next(3), (int) ((double) this.damage * 0.5), 0.0f, this.owner); + } + } + } + if (this.type == 384 || this.type == 386) + { + for (int index264 = 0; index264 < 20; ++index264) + { + int index265 = Dust.NewDust(this.position, this.width, this.height, 212, (float) (this.direction * 2), Alpha: 100, Scale: 1.4f); + Dust dust = Main.dust[index265]; + dust.color = Color.CornflowerBlue; + dust.color = Color.Lerp(dust.color, Color.White, 0.3f); + dust.noGravity = true; + } + } + if (this.type == 507 || this.type == 508) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + Vector2 position = this.position; + Vector2 oldVelocity = this.oldVelocity; + oldVelocity.Normalize(); + Vector2 Position = position + oldVelocity * 16f; + for (int index266 = 0; index266 < 20; ++index266) + { + int index267 = Dust.NewDust(Position, this.width, this.height, 81); + Main.dust[index267].position = (Main.dust[index267].position + this.Center) / 2f; + Main.dust[index267].velocity += this.oldVelocity * 0.4f; + Main.dust[index267].velocity *= 0.5f; + Main.dust[index267].noGravity = true; + Position -= oldVelocity * 8f; + } + } + if (this.type == 598) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + Vector2 position = this.position; + Vector2 rotationVector2 = (this.rotation - 1.570796f).ToRotationVector2(); + Vector2 Position = position + rotationVector2 * 16f; + for (int index268 = 0; index268 < 20; ++index268) + { + int index269 = Dust.NewDust(Position, this.width, this.height, 81); + Main.dust[index269].position = (Main.dust[index269].position + this.Center) / 2f; + Main.dust[index269].velocity += rotationVector2 * 2f; + Main.dust[index269].velocity *= 0.5f; + Main.dust[index269].noGravity = true; + Position -= rotationVector2 * 8f; + } + } + if (this.type == 1 || this.type == 81 || this.type == 98) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 7); + } + if (this.type == 336 || this.type == 345) + { + for (int index270 = 0; index270 < 6; ++index270) + { + int index271 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 196); + Main.dust[index271].noGravity = true; + Main.dust[index271].scale = this.scale; + } + } + if (this.type == 358) + { + this.velocity = this.oldVelocity * 0.2f; + for (int index272 = 0; index272 < 100; ++index272) + { + int index273 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 211, Alpha: 75, Scale: 1.2f); + if (Main.rand.Next(2) == 0) + Main.dust[index273].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index273].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index273].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index273].scale = 0.6f; + else + Main.dust[index273].noGravity = true; + Main.dust[index273].velocity *= 0.3f; + Main.dust[index273].velocity += this.velocity; + Main.dust[index273].velocity *= (float) (1.0 + (double) Main.rand.Next(-100, 101) * 0.00999999977648258); + Main.dust[index273].velocity.X += (float) Main.rand.Next(-50, 51) * 0.015f; + Main.dust[index273].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.015f; + Main.dust[index273].position = this.Center; + } + } + if (this.type == 406) + { + int Alpha = 175; + Color newColor = new Color(0, 80, (int) byte.MaxValue, 100); + this.velocity = this.oldVelocity * 0.2f; + for (int index274 = 0; index274 < 40; ++index274) + { + int index275 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 4, Alpha: Alpha, newColor: newColor, Scale: 1.6f); + if (Main.rand.Next(2) == 0) + Main.dust[index275].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index275].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index275].alpha += 25; + if (Main.rand.Next(2) == 0) + Main.dust[index275].scale = 0.6f; + else + Main.dust[index275].noGravity = true; + Main.dust[index275].velocity *= 0.3f; + Main.dust[index275].velocity += this.velocity; + Main.dust[index275].velocity *= (float) (1.0 + (double) Main.rand.Next(-100, 101) * 0.00999999977648258); + Main.dust[index275].velocity.X += (float) Main.rand.Next(-50, 51) * 0.015f; + Main.dust[index275].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.015f; + Main.dust[index275].position = this.Center; + } + } + if (this.type == 344) + { + for (int index276 = 0; index276 < 3; ++index276) + { + int index277 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 197); + Main.dust[index277].noGravity = true; + Main.dust[index277].scale = this.scale; + } + } + else if (this.type == 343) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index278 = 4; index278 < 31; ++index278) + { + int index279 = Dust.NewDust(new Vector2(this.oldPosition.X - this.oldVelocity.X * (30f / (float) index278), this.oldPosition.Y - this.oldVelocity.Y * (30f / (float) index278)), 8, 8, 197, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.2f); + Main.dust[index279].noGravity = true; + Main.dust[index279].velocity *= 0.5f; + } + } + else if (this.type == 349) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index280 = 0; index280 < 3; ++index280) + { + int index281 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 76); + Main.dust[index281].noGravity = true; + Main.dust[index281].noLight = true; + Main.dust[index281].scale = 0.7f; + } + } + if (this.type == 323) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index282 = 0; index282 < 20; ++index282) + { + int index283 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 7); + if (Main.rand.Next(2) == 0) + { + Main.dust[index283].noGravity = true; + Main.dust[index283].scale = 1.3f; + Main.dust[index283].velocity *= 1.5f; + Main.dust[index283].velocity -= this.oldVelocity * 0.5f; + Main.dust[index283].velocity *= 1.5f; + } + else + { + Main.dust[index283].velocity *= 0.75f; + Main.dust[index283].velocity -= this.oldVelocity * 0.25f; + Main.dust[index283].scale = 0.8f; + } + } + } + if (this.type == 589) + { + Main.PlaySound(SoundID.Item27, this.position); + Color newColor = Color.Red; + if ((double) this.ai[1] == 1.0) + newColor = Color.Green; + if ((double) this.ai[1] == 2.0) + newColor = Color.Purple; + if ((double) this.ai[1] == 3.0) + newColor = Color.Gold; + if ((double) this.ai[1] == 4.0) + newColor = Color.White; + newColor.A = (byte) 100; + for (int index284 = 0; index284 < 30; ++index284) + { + int index285 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 11, newColor: newColor); + Main.dust[index285].velocity *= (float) (1.0 + (double) Main.rand.NextFloat() * 1.0); + if (index284 < 10) + { + Main.dust[index285].noGravity = true; + Main.dust[index285].velocity *= 0.5f; + } + } + } + if (this.type == 346) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index286 = 0; index286 < 10; ++index286) + { + int Type = 10; + if ((double) this.ai[1] == 1.0) + Type = 4; + int index287 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type); + Main.dust[index287].noGravity = true; + } + } + if (this.type == 335) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index288 = 0; index288 < 10; ++index288) + { + int index289 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 90 - (int) this.ai[1]); + Main.dust[index289].noLight = true; + Main.dust[index289].scale = 0.8f; + } + } + if (this.type == 318) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index290 = 0; index290 < 10; ++index290) + { + int index291 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 30); + if (Main.rand.Next(2) == 0) + Main.dust[index291].noGravity = true; + } + } + if (this.type == 378) + { + for (int index292 = 0; index292 < 10; ++index292) + { + int index293 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 30); + if (Main.rand.Next(2) == 0) + Main.dust[index293].noGravity = true; + } + } + else if (this.type == 311) + { + for (int index294 = 0; index294 < 5; ++index294) + { + int index295 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 189); + Main.dust[index295].scale = 0.85f; + Main.dust[index295].noGravity = true; + Main.dust[index295].velocity += this.velocity * 0.5f; + } + } + else if (this.type == 316) + { + for (int index296 = 0; index296 < 5; ++index296) + { + int index297 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 195); + Main.dust[index297].scale = 0.85f; + Main.dust[index297].noGravity = true; + Main.dust[index297].velocity += this.velocity * 0.5f; + } + } + else if (this.type == 184 || this.type == 195) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 7); + } + else if (this.type == 275 || this.type == 276) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 7); + } + else if (this.type == 291) + { + if (this.owner == Main.myPlayer) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 292, this.damage, this.knockBack, this.owner); + } + else if (this.type == 295) + { + if (this.owner == Main.myPlayer) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 296, (int) ((double) this.damage * 0.65), this.knockBack, this.owner); + } + else if (this.type == 270) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y, 27); + if ((double) this.ai[0] < 0.0) + { + for (int index298 = 0; index298 < 20; ++index298) + { + int index299 = Dust.NewDust(this.position, this.width, this.height, 26, Alpha: 100); + Main.dust[index299].noGravity = true; + Main.dust[index299].velocity *= 1.2f; + Main.dust[index299].scale = 1.3f; + Main.dust[index299].velocity -= this.oldVelocity * 0.3f; + int index300 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 5, Alpha: 100, Scale: 1.5f); + Main.dust[index300].noGravity = true; + Main.dust[index300].velocity *= 3f; + } + } + else + { + for (int index301 = 0; index301 < 20; ++index301) + { + int index302 = Dust.NewDust(this.position, this.width, this.height, 26, Alpha: 100); + Main.dust[index302].noGravity = true; + Main.dust[index302].velocity *= 1.2f; + Main.dust[index302].scale = 1.3f; + Main.dust[index302].velocity -= this.oldVelocity * 0.3f; + int index303 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 6, Alpha: 100, Scale: 2f); + Main.dust[index303].noGravity = true; + Main.dust[index303].velocity *= 3f; + } + } + } + else if (this.type == 265) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y, 27); + for (int index304 = 0; index304 < 15; ++index304) + { + int index305 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 163, Alpha: 100, Scale: 1.2f); + Main.dust[index305].noGravity = true; + Main.dust[index305].velocity *= 1.2f; + Main.dust[index305].velocity -= this.oldVelocity * 0.3f; + } + } + else if (this.type == 355) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y, 27); + for (int index306 = 0; index306 < 15; ++index306) + { + int index307 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 205, Alpha: 100, Scale: 1.2f); + Main.dust[index307].noGravity = true; + Main.dust[index307].velocity *= 1.2f; + Main.dust[index307].velocity -= this.oldVelocity * 0.3f; + } + } + else if (this.type == 304) + { + for (int index308 = 0; index308 < 3; ++index308) + { + int index309 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 182, Alpha: 100, Scale: 0.8f); + Main.dust[index309].noGravity = true; + Main.dust[index309].velocity *= 1.2f; + Main.dust[index309].velocity -= this.oldVelocity * 0.3f; + } + } + else if (this.type == 263) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index310 = 0; index310 < 15; ++index310) + { + int index311 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 92, this.velocity.X, this.velocity.Y, Main.rand.Next(0, 101), Scale: ((float) (1.0 + (double) Main.rand.Next(40) * 0.00999999977648258))); + Main.dust[index311].noGravity = true; + Main.dust[index311].velocity *= 2f; + } + } + else if (this.type == 261) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 148); + } + else if (this.type == 229) + { + for (int index312 = 0; index312 < 25; ++index312) + { + int index313 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 157); + Main.dust[index313].noGravity = true; + Main.dust[index313].velocity *= 1.5f; + Main.dust[index313].scale = 1.5f; + } + } + else if (this.type == 239) + { + int index = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), 2, 2, 154); + Main.dust[index].position.X -= 2f; + Main.dust[index].alpha = 38; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity += -this.oldVelocity * 0.25f; + Main.dust[index].scale = 0.95f; + } + else if (this.type == 245) + { + int index = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), 2, 2, 114); + Main.dust[index].noGravity = true; + Main.dust[index].position.X -= 2f; + Main.dust[index].alpha = 38; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity += -this.oldVelocity * 0.25f; + Main.dust[index].scale = 0.95f; + } + else if (this.type == 264) + { + int index = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), 2, 2, 54); + Main.dust[index].noGravity = true; + Main.dust[index].position.X -= 2f; + Main.dust[index].alpha = 38; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity += -this.oldVelocity * 0.25f; + Main.dust[index].scale = 0.95f; + } + else if (this.type == 206 || this.type == 225) + { + Main.PlaySound(6, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 40); + } + else if (this.type == 227) + { + Main.PlaySound(6, (int) this.position.X, (int) this.position.Y); + for (int index314 = 0; index314 < 15; ++index314) + { + int index315 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 157); + Main.dust[index315].noGravity = true; + Main.dust[index315].velocity += this.oldVelocity; + Main.dust[index315].scale = 1.5f; + } + } + else if (this.type == 237 && this.owner == Main.myPlayer) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 238, this.damage, this.knockBack, this.owner); + else if (this.type == 243 && this.owner == Main.myPlayer) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 244, this.damage, this.knockBack, this.owner); + else if (this.type == 120) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index316 = 0; index316 < 10; ++index316) + { + int index317 = 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); + if (index316 < 5) + Main.dust[index317].noGravity = true; + Main.dust[index317].velocity *= 0.2f; + } + } + else if (this.type == 181 || this.type == 189 || this.type == 566) + { + for (int index318 = 0; index318 < 6; ++index318) + { + int index319 = Dust.NewDust(this.position, this.width, this.height, 150, this.velocity.X, this.velocity.Y, 50); + Main.dust[index319].noGravity = true; + Main.dust[index319].scale = 1f; + } + } + else if (this.type == 178) + { + for (int index320 = 0; index320 < 85; ++index320) + { + int index321 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Main.rand.Next(139, 143), this.velocity.X, this.velocity.Y, Scale: 1.2f); + Main.dust[index321].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index321].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index321].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index321].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index321].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index321].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index321].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + } + for (int index322 = 0; index322 < 40; ++index322) + { + int index323 = Gore.NewGore(this.position, this.velocity, Main.rand.Next(276, 283)); + Main.gore[index323].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index323].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index323].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index323].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index323].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index323].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index323].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + } + } + else if (this.type == 289) + { + for (int index324 = 0; index324 < 30; ++index324) + { + int index325 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Main.rand.Next(139, 143), this.velocity.X, this.velocity.Y, Scale: 1.2f); + Main.dust[index325].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index325].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index325].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index325].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index325].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index325].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index325].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + } + for (int index326 = 0; index326 < 15; ++index326) + { + int index327 = Gore.NewGore(this.position, this.velocity, Main.rand.Next(276, 283)); + Main.gore[index327].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index327].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index327].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index327].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index327].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index327].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index327].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + } + } + else if (this.type == 475 || this.type == 505 || this.type == 506) + { + if ((double) this.ai[1] == 0.0) + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + if ((double) this.ai[1] < 10.0) + { + Vector2 Position = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num29 = -this.velocity.X; + float num30 = -this.velocity.Y; + float num31 = 1f; + if ((double) this.ai[0] <= 17.0) + num31 = this.ai[0] / 17f; + int num32 = (int) (30.0 * (double) num31); + float num33 = 1f; + if ((double) this.ai[0] <= 30.0) + num33 = this.ai[0] / 30f; + float num34 = 0.4f * num33; + float num35 = num34; + float num36 = num30 + num35; + for (int index328 = 0; index328 < num32; ++index328) + { + float num37 = (float) Math.Sqrt((double) num29 * (double) num29 + (double) num36 * (double) num36); + float num38 = 5.6f; + if ((double) Math.Abs(num29) + (double) Math.Abs(num36) < 1.0) + num38 *= Math.Abs(num29) + Math.Abs(num36) / 1f; + float num39 = num38 / num37; + float num40 = num29 * num39; + float num41 = num36 * num39; + Math.Atan2((double) num41, (double) num40); + int Type = 3; + if (this.type == 506) + Type = 30; + if (this.type == 505) + Type = 239; + if ((double) index328 > (double) this.ai[1]) + { + for (int index329 = 0; index329 < 4; ++index329) + { + int index330 = Dust.NewDust(Position, this.width, this.height, Type); + Main.dust[index330].noGravity = true; + Main.dust[index330].velocity *= 0.3f; + } + } + Position.X += num40; + Position.Y += num41; + num29 = -this.velocity.X; + float num42 = -this.velocity.Y; + num35 += num34; + num36 = num42 + num35; + } + } + } + else if (this.type == 171) + { + if ((double) this.ai[1] == 0.0) + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + if ((double) this.ai[1] < 10.0) + { + Vector2 Position = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num43 = -this.velocity.X; + float num44 = -this.velocity.Y; + float num45 = 1f; + if ((double) this.ai[0] <= 17.0) + num45 = this.ai[0] / 17f; + int num46 = (int) (30.0 * (double) num45); + float num47 = 1f; + if ((double) this.ai[0] <= 30.0) + num47 = this.ai[0] / 30f; + float num48 = 0.4f * num47; + float num49 = num48; + float num50 = num44 + num49; + for (int index331 = 0; index331 < num46; ++index331) + { + float num51 = (float) Math.Sqrt((double) num43 * (double) num43 + (double) num50 * (double) num50); + float num52 = 5.6f; + if ((double) Math.Abs(num43) + (double) Math.Abs(num50) < 1.0) + num52 *= Math.Abs(num43) + Math.Abs(num50) / 1f; + float num53 = num52 / num51; + float num54 = num43 * num53; + float num55 = num50 * num53; + Math.Atan2((double) num55, (double) num54); + if ((double) index331 > (double) this.ai[1]) + { + for (int index332 = 0; index332 < 4; ++index332) + { + int index333 = Dust.NewDust(Position, this.width, this.height, 129); + Main.dust[index333].noGravity = true; + Main.dust[index333].velocity *= 0.3f; + } + } + Position.X += num54; + Position.Y += num55; + num43 = -this.velocity.X; + float num56 = -this.velocity.Y; + num49 += num48; + num50 = num56 + num49; + } + } + } + else if (this.type == 117) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 26); + } + else if (this.type == 166) + { + Main.PlaySound(SoundID.Item51, this.position); + for (int index334 = 0; index334 < 10; ++index334) + { + int index335 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 76); + Main.dust[index335].noGravity = true; + Main.dust[index335].velocity -= this.oldVelocity * 0.25f; + } + } + else if (this.type == 158) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index336 = 0; index336 < 10; ++index336) + { + int index337 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 9); + Main.dust[index337].noGravity = true; + Main.dust[index337].velocity -= this.velocity * 0.5f; + } + } + else if (this.type == 159) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index338 = 0; index338 < 10; ++index338) + { + int index339 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 11); + Main.dust[index339].noGravity = true; + Main.dust[index339].velocity -= this.velocity * 0.5f; + } + } + else if (this.type == 160) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index340 = 0; index340 < 10; ++index340) + { + int index341 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 19); + Main.dust[index341].noGravity = true; + Main.dust[index341].velocity -= this.velocity * 0.5f; + } + } + else if (this.type == 161) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index342 = 0; index342 < 10; ++index342) + { + int index343 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 11); + Main.dust[index343].noGravity = true; + Main.dust[index343].velocity -= this.velocity * 0.5f; + } + } + else if (this.type >= 191 && this.type <= 194) + { + int index = Gore.NewGore(new Vector2(this.position.X - (float) (this.width / 2), this.position.Y - (float) (this.height / 2)), new Vector2(0.0f, 0.0f), Main.rand.Next(61, 64), this.scale); + Main.gore[index].velocity *= 0.1f; + } + else if (!Main.projPet[this.type]) + { + if (this.type == 93) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index344 = 0; index344 < 10; ++index344) + { + int index345 = Dust.NewDust(this.position, this.width, this.height, 57, Alpha: 100, Scale: 0.5f); + Main.dust[index345].velocity.X *= 2f; + Main.dust[index345].velocity.Y *= 2f; + } + } + else if (this.type == 99) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index346 = 0; index346 < 30; ++index346) + { + int index347 = Dust.NewDust(this.position, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Main.dust[index347].scale *= 1.4f; + this.velocity = this.velocity * 1.9f; + } + } + else if (this.type == 655) + { + Main.PlaySound(4, (int) this.position.X, (int) this.position.Y); + for (int index348 = 0; index348 < 30; ++index348) + { + int index349 = Dust.NewDust(this.position, this.width, this.height, 147); + if (Main.rand.Next(2) == 0) + Main.dust[index349].scale *= 1.4f; + this.velocity = this.velocity * 1.9f; + } + if (Main.netMode != 1 && !this.wet) + { + int num = 2; + if (Main.rand.Next(3) == 0) + ++num; + if (Main.rand.Next(3) == 0) + ++num; + if (Main.rand.Next(3) == 0) + ++num; + for (int index350 = 0; index350 < num; ++index350) + { + int index351 = NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, Main.rand.Next(210, 212), 1); + Main.npc[index351].velocity.X = (float) Main.rand.Next(-200, 201) * (1f / 500f); + Main.npc[index351].velocity.Y = (float) Main.rand.Next(-200, 201) * (1f / 500f); + Main.npc[index351].netUpdate = true; + } + if (Main.rand.Next(4) == 0) + { + int index = NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 42, 1); + Main.npc[index].SetDefaults(-16); + Main.npc[index].velocity.X = (float) Main.rand.Next(-200, 201) * (1f / 1000f); + Main.npc[index].velocity.Y = (float) Main.rand.Next(-200, 201) * (1f / 1000f); + Main.npc[index].netUpdate = true; + } + } + } + else if (this.type == 91 || this.type == 92) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index = 0; index < 10; ++index) + Dust.NewDust(this.position, this.width, this.height, 58, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 150, Scale: 1.2f); + for (int index = 0; index < 3; ++index) + Gore.NewGore(this.position, new Vector2(this.velocity.X * 0.05f, this.velocity.Y * 0.05f), Main.rand.Next(16, 18)); + if (this.type == 12 && this.damage < 500) + { + for (int index = 0; index < 10; ++index) + Dust.NewDust(this.position, this.width, this.height, 57, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 150, Scale: 1.2f); + for (int index = 0; index < 3; ++index) + Gore.NewGore(this.position, new Vector2(this.velocity.X * 0.05f, this.velocity.Y * 0.05f), Main.rand.Next(16, 18)); + } + if ((this.type == 91 || this.type == 92 && (double) this.ai[0] > 0.0) && this.owner == Main.myPlayer) + { + float num57 = this.position.X + (float) Main.rand.Next(-400, 400); + float num58 = this.position.Y - (float) Main.rand.Next(600, 900); + Vector2 vector2 = new Vector2(num57, num58); + float num59 = this.position.X + (float) (this.width / 2) - vector2.X; + float num60 = this.position.Y + (float) (this.height / 2) - vector2.Y; + float num61 = 22f / (float) Math.Sqrt((double) num59 * (double) num59 + (double) num60 * (double) num60); + float SpeedX = num59 * num61; + float SpeedY = num60 * num61; + int damage = this.damage; + int index = Projectile.NewProjectile(num57, num58, SpeedX, SpeedY, 92, damage, this.knockBack, this.owner); + if (this.type == 91) + { + Main.projectile[index].ai[1] = this.position.Y; + Main.projectile[index].ai[0] = 1f; + } + else + Main.projectile[index].ai[1] = this.position.Y; + } + } + else if (this.type == 89) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index352 = 0; index352 < 5; ++index352) + { + int index353 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 68); + Main.dust[index353].noGravity = true; + Main.dust[index353].velocity *= 1.5f; + Main.dust[index353].scale *= 0.9f; + } + if (this.type == 89 && this.owner == Main.myPlayer) + { + for (int index = 0; index < 3; ++index) + { + float SpeedX = (float) (-(double) this.velocity.X * (double) Main.rand.Next(40, 70) * 0.00999999977648258 + (double) Main.rand.Next(-20, 21) * 0.400000005960464); + float SpeedY = (float) (-(double) this.velocity.Y * (double) Main.rand.Next(40, 70) * 0.00999999977648258 + (double) Main.rand.Next(-20, 21) * 0.400000005960464); + Projectile.NewProjectile(this.position.X + SpeedX, this.position.Y + SpeedY, SpeedX, SpeedY, 90, (int) ((double) this.damage * 0.5), 0.0f, this.owner); + } + } + } + else if (this.type == 177) + { + for (int index354 = 0; index354 < 20; ++index354) + { + int index355 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 137, Alpha: Main.rand.Next(0, 101), Scale: ((float) (1.0 + (double) Main.rand.Next(-20, 40) * 0.00999999977648258))); + Main.dust[index355].velocity -= this.oldVelocity * 0.2f; + if (Main.rand.Next(3) == 0) + { + Main.dust[index355].scale *= 0.8f; + Main.dust[index355].velocity *= 0.5f; + } + else + Main.dust[index355].noGravity = true; + } + } + else if (this.type == 119 || this.type == 118 || this.type == 128 || this.type == 359) + { + int num = 10; + if (this.type == 119 || this.type == 359) + num = 20; + Main.PlaySound(SoundID.Item27, this.position); + for (int index356 = 0; index356 < num; ++index356) + { + int index357 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 92); + if (Main.rand.Next(3) != 0) + { + Main.dust[index357].velocity *= 2f; + Main.dust[index357].noGravity = true; + Main.dust[index357].scale *= 1.75f; + } + else + Main.dust[index357].scale *= 0.5f; + } + } + else if (this.type == 309) + { + int num = 10; + Main.PlaySound(SoundID.Item27, this.position); + for (int index358 = 0; index358 < num; ++index358) + { + int index359 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 185); + if (Main.rand.Next(2) == 0) + { + Main.dust[index359].velocity *= 2f; + Main.dust[index359].noGravity = true; + Main.dust[index359].scale *= 1.75f; + } + } + } + else if (this.type == 308) + { + int num = 80; + Main.PlaySound(SoundID.Item27, this.position); + for (int index360 = 0; index360 < num; ++index360) + { + int index361 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + 16f), this.width, this.height - 16, 185); + Main.dust[index361].velocity *= 2f; + Main.dust[index361].noGravity = true; + Main.dust[index361].scale *= 1.15f; + } + } + else if (this.aiStyle == 29 && this.type <= 126) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + int Type = this.type - 121 + 86; + for (int index362 = 0; index362 < 15; ++index362) + { + int index363 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type, this.oldVelocity.X, this.oldVelocity.Y, 50, Scale: 1.2f); + Main.dust[index363].noGravity = true; + Main.dust[index363].scale *= 1.25f; + Main.dust[index363].velocity *= 0.5f; + } + } + else if (this.type == 597) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index364 = 0; index364 < 15; ++index364) + { + int index365 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 262, this.oldVelocity.X, this.oldVelocity.Y, 50, Scale: 1.2f); + Main.dust[index365].noGravity = true; + Main.dust[index365].scale *= 1.25f; + Main.dust[index365].velocity *= 0.5f; + } + } + else if (this.type == 337) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index366 = 0; index366 < 10; ++index366) + { + int index367 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 197); + Main.dust[index367].noGravity = true; + } + } + else if (this.type == 379 || this.type == 377) + { + for (int index368 = 0; index368 < 5; ++index368) + { + int index369 = Dust.NewDust(this.position, this.width, this.height, 171, Alpha: 100); + Main.dust[index369].scale = (float) Main.rand.Next(1, 10) * 0.1f; + Main.dust[index369].noGravity = true; + Main.dust[index369].fadeIn = 1.5f; + Main.dust[index369].velocity *= 0.75f; + } + } + else if (this.type == 80) + { + if ((double) this.ai[0] >= 0.0) + { + Main.PlaySound(SoundID.Item27, this.position); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 67); + } + int i = (int) this.position.X / 16; + int j = (int) this.position.Y / 16; + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + if (Main.tile[i, j].type == (ushort) sbyte.MaxValue && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + else if (this.type == 76 || this.type == 77 || this.type == 78) + { + for (int index370 = 0; index370 < 5; ++index370) + { + int index371 = Dust.NewDust(this.position, this.width, this.height, 27, Alpha: 80, Scale: 1.5f); + Main.dust[index371].noGravity = true; + } + } + else if (this.type == 55) + { + for (int index372 = 0; index372 < 5; ++index372) + { + int index373 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 18, Scale: 1.5f); + Main.dust[index373].noGravity = true; + } + } + else if (this.type == 51 || this.type == 267) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 0, Scale: 0.7f); + } + else if (this.type == 478) + { + if (this.owner == Main.myPlayer) + 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 == 477 || this.type == 479) + { + int num = 0; + while (num < 5) + ++num; + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + } + else if (this.type == 2 || this.type == 82) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100); + } + else if (this.type == 474) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 20; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 26, Scale: 0.9f); + } + else if (this.type == 172) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 20; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 135, Alpha: 100); + } + else if (this.type == 103) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index374 = 0; index374 < 20; ++index374) + { + int index375 = 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[index375].scale *= 2.5f; + Main.dust[index375].noGravity = true; + Main.dust[index375].velocity *= 5f; + } + } + } + else if (this.type == 278) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index376 = 0; index376 < 20; ++index376) + { + int index377 = 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[index377].scale *= 1.5f; + Main.dust[index377].noGravity = true; + Main.dust[index377].velocity *= 5f; + } + } + } + else if (this.type == 3 || this.type == 48 || this.type == 54 || this.type == 599) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 1, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.75f); + } + else if (this.type == 330) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 0, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, Scale: 0.75f); + } + else if (this.type == 4) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + 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) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index = 0; index < 60; ++index) + { + 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.5f); + } + } + else if (this.type == 9 || this.type == 12 || this.type == 503) + { + Main.PlaySound(SoundID.Item10, this.position); + int num62 = 10; + int num63 = 3; + if (this.type == 503) + { + num62 = 40; + num63 = 2; + this.velocity = this.velocity / 2f; + } + for (int index = 0; index < num62; ++index) + Dust.NewDust(this.position, this.width, this.height, 58, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 150, Scale: 1.2f); + for (int index = 0; index < num63; ++index) + { + int Type = Main.rand.Next(16, 18); + if (this.type == 503) + Type = 16; + Gore.NewGore(this.position, new Vector2(this.velocity.X * 0.05f, this.velocity.Y * 0.05f), Type); + } + if (this.type == 12 && this.damage < 100) + { + for (int index = 0; index < 10; ++index) + Dust.NewDust(this.position, this.width, this.height, 57, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 150, Scale: 1.2f); + for (int index = 0; index < 3; ++index) + Gore.NewGore(this.position, new Vector2(this.velocity.X * 0.05f, this.velocity.Y * 0.05f), Main.rand.Next(16, 18)); + } + } + else if (this.type == 281) + { + Main.PlaySound(4, (int) this.position.X, (int) this.position.Y); + int index378 = Gore.NewGore(this.position, new Vector2((float) Main.rand.Next(-20, 21) * 0.2f, (float) Main.rand.Next(-20, 21) * 0.2f), 76); + Main.gore[index378].velocity -= this.velocity * 0.5f; + int index379 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2((float) Main.rand.Next(-20, 21) * 0.2f, (float) Main.rand.Next(-20, 21) * 0.2f), 77); + Main.gore[index379].velocity -= this.velocity * 0.5f; + Main.PlaySound(SoundID.Item14, this.position); + for (int index380 = 0; index380 < 20; ++index380) + { + int index381 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index381].velocity *= 1.4f; + } + for (int index382 = 0; index382 < 10; ++index382) + { + int index383 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index383].noGravity = true; + Main.dust[index383].velocity *= 5f; + int index384 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index384].velocity *= 3f; + } + int index385 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index385].velocity *= 0.4f; + ++Main.gore[index385].velocity.X; + ++Main.gore[index385].velocity.Y; + int index386 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index386].velocity *= 0.4f; + --Main.gore[index386].velocity.X; + ++Main.gore[index386].velocity.Y; + int index387 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index387].velocity *= 0.4f; + ++Main.gore[index387].velocity.X; + --Main.gore[index387].velocity.Y; + int index388 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index388].velocity *= 0.4f; + --Main.gore[index388].velocity.X; + --Main.gore[index388].velocity.Y; + 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(); + } + else if (this.type == 162) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index389 = 0; index389 < 20; ++index389) + { + int index390 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index390].velocity *= 1.4f; + } + for (int index391 = 0; index391 < 10; ++index391) + { + int index392 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index392].noGravity = true; + Main.dust[index392].velocity *= 5f; + int index393 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index393].velocity *= 3f; + } + int index394 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index394].velocity *= 0.4f; + ++Main.gore[index394].velocity.X; + ++Main.gore[index394].velocity.Y; + int index395 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index395].velocity *= 0.4f; + --Main.gore[index395].velocity.X; + ++Main.gore[index395].velocity.Y; + int index396 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index396].velocity *= 0.4f; + ++Main.gore[index396].velocity.X; + --Main.gore[index396].velocity.Y; + int index397 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index397].velocity *= 0.4f; + --Main.gore[index397].velocity.X; + --Main.gore[index397].velocity.Y; + 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(); + } + else if (this.type == 240) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index398 = 0; index398 < 20; ++index398) + { + int index399 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index399].velocity *= 1.4f; + } + for (int index400 = 0; index400 < 10; ++index400) + { + int index401 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index401].noGravity = true; + Main.dust[index401].velocity *= 5f; + int index402 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index402].velocity *= 3f; + } + int index403 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index403].velocity *= 0.4f; + ++Main.gore[index403].velocity.X; + ++Main.gore[index403].velocity.Y; + int index404 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index404].velocity *= 0.4f; + --Main.gore[index404].velocity.X; + ++Main.gore[index404].velocity.Y; + int index405 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index405].velocity *= 0.4f; + ++Main.gore[index405].velocity.X; + --Main.gore[index405].velocity.Y; + int index406 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index406].velocity *= 0.4f; + --Main.gore[index406].velocity.X; + --Main.gore[index406].velocity.Y; + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 96; + this.height = 96; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.Damage(); + } + else + { + int type = this.type; + if (this.type == 283 || this.type == 282) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index407 = 0; index407 < 10; ++index407) + { + int index408 = Dust.NewDust(this.position, this.width, this.height, 171, Alpha: 100); + Main.dust[index408].scale = (float) Main.rand.Next(1, 10) * 0.1f; + Main.dust[index408].noGravity = true; + Main.dust[index408].fadeIn = 1.5f; + Main.dust[index408].velocity *= 0.75f; + } + } + else if (this.type == 284) + { + for (int index409 = 0; index409 < 10; ++index409) + { + int index410 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Main.rand.Next(139, 143), (float) (-(double) this.velocity.X * 0.300000011920929), (float) (-(double) this.velocity.Y * 0.300000011920929), Scale: 1.2f); + Main.dust[index410].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index410].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index410].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index410].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index410].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index410].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index410].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + } + for (int index411 = 0; index411 < 5; ++index411) + { + int index412 = Gore.NewGore(this.position, -this.velocity * 0.3f, Main.rand.Next(276, 283)); + Main.gore[index412].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index412].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index412].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index412].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index412].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index412].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index412].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + } + } + else if (this.type == 286) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index = 0; index < 7; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index413 = 0; index413 < 3; ++index413) + { + int index414 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index414].noGravity = true; + Main.dust[index414].velocity *= 3f; + int index415 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index415].velocity *= 2f; + } + int index416 = Gore.NewGore(new Vector2(this.position.X - 10f, this.position.Y - 10f), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index416].velocity *= 0.3f; + Main.gore[index416].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index416].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + if (this.owner == Main.myPlayer) + { + this.localAI[1] = -1f; + this.maxPenetrate = 0; + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 80; + this.height = 80; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.Damage(); + } + } + else if (this.type == 14 || this.type == 20 || this.type == 36 || this.type == 83 || this.type == 84 || this.type == 389 || this.type == 104 || this.type == 279 || this.type == 100 || this.type == 110 || this.type == 180 || this.type == 207 || this.type == 357 || this.type == 242 || this.type == 302 || this.type == 257 || this.type == 259 || this.type == 285 || this.type == 287 || this.type == 576 || this.type == 577) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(SoundID.Item10, this.position); + } + else if (this.type == 660) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(SoundID.Item10, this.position); + int num = Main.rand.Next(4, 10); + for (int index417 = 0; index417 < num; ++index417) + { + int index418 = Dust.NewDust(this.Center, 0, 0, 180, Alpha: 100); + Main.dust[index418].velocity *= 1.6f; + --Main.dust[index418].velocity.Y; + Main.dust[index418].velocity += -this.velocity * (float) ((double) Main.rand.NextFloat() * 2.0 - 1.0) * 0.5f; + Main.dust[index418].scale = 2f; + Main.dust[index418].fadeIn = 0.5f; + Main.dust[index418].noGravity = true; + } + } + else if (this.type == 712) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(SoundID.Item10, this.position); + int num = Main.rand.Next(6, 12); + for (int index419 = 0; index419 < num; ++index419) + { + int index420 = Dust.NewDust(this.Center, 0, 0, 15, Alpha: 100); + Main.dust[index420].velocity *= 1.6f; + --Main.dust[index420].velocity.Y; + Main.dust[index420].velocity += -this.velocity * (float) ((double) Main.rand.NextFloat() * 2.0 - 1.0) * 0.5f; + Main.dust[index420].scale = 1f; + Main.dust[index420].fadeIn = 1.5f; + Main.dust[index420].noGravity = true; + Main.dust[index420].color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.3f; + Main.dust[index420].velocity *= 0.7f; + Main.dust[index420].position += Main.dust[index420].velocity * 5f; + } + for (int index = 0; index < 3; ++index) + Gore.NewGoreDirect(this.position, Vector2.Zero, 1008, (float) (1.0 + (double) Main.rand.NextFloatDirection() * 0.200000002980232)).velocity *= 4f; + } + else if (this.type == 638) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + Main.PlaySound(SoundID.Item10, this.position); + int num = Main.rand.Next(2, 5); + for (int index421 = 0; index421 < num; ++index421) + { + int index422 = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100); + Main.dust[index422].velocity *= 1.6f; + --Main.dust[index422].velocity.Y; + Main.dust[index422].position -= Vector2.One * 4f; + Main.dust[index422].position = Vector2.Lerp(Main.dust[index422].position, this.Center, 0.5f); + Main.dust[index422].noGravity = true; + } + } + else if (this.type == 15 || this.type == 34 || this.type == 321) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index423 = 0; index423 < 20; ++index423) + { + int index424 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100, Scale: 2f); + Main.dust[index424].noGravity = true; + Main.dust[index424].velocity *= 2f; + int index425 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100); + Main.dust[index425].velocity *= 2f; + } + } + else if (this.type == 253) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index426 = 0; index426 < 20; ++index426) + { + int index427 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 135, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100, Scale: 2f); + Main.dust[index427].noGravity = true; + Main.dust[index427].velocity *= 2f; + int index428 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 135, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100); + Main.dust[index428].velocity *= 2f; + } + } + else if (this.type == 95 || this.type == 96) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index429 = 0; index429 < 20; ++index429) + { + int index430 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 75, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100, Scale: (2f * this.scale)); + Main.dust[index430].noGravity = true; + Main.dust[index430].velocity *= 2f; + int index431 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 75, (float) (-(double) this.velocity.X * 0.200000002980232), (float) (-(double) this.velocity.Y * 0.200000002980232), 100, Scale: (1f * this.scale)); + Main.dust[index431].velocity *= 2f; + } + } + else if (this.type == 79) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index432 = 0; index432 < 20; ++index432) + { + int index433 = 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: 2f); + Main.dust[index433].noGravity = true; + Main.dust[index433].velocity *= 4f; + } + } + else if (this.type == 16) + { + if (this.type == 16 && this.penetrate == 1) + { + this.maxPenetrate = -1; + this.penetrate = -1; + int num = 60; + this.position.X -= (float) (num / 2); + this.position.Y -= (float) (num / 2); + this.width += num; + this.height += num; + this.tileCollide = false; + this.velocity = this.velocity * 0.01f; + this.Damage(); + this.scale = 0.01f; + } + this.position.X += (float) (this.width / 2); + this.width = 10; + this.position.X -= (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.height = 10; + this.position.Y -= (float) (this.height / 2); + Main.PlaySound(SoundID.Item10, this.position); + for (int index434 = 0; index434 < 20; ++index434) + { + int index435 = Dust.NewDust(new Vector2(this.position.X - this.velocity.X, this.position.Y - this.velocity.Y), this.width, this.height, 15, Alpha: 100, Scale: 2f); + Main.dust[index435].noGravity = true; + Main.dust[index435].velocity *= 2f; + Dust.NewDust(new Vector2(this.position.X - this.velocity.X, this.position.Y - this.velocity.Y), this.width, this.height, 15, Alpha: 100); + } + } + else if (this.type == 17) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 0); + } + else if (this.type == 31 || this.type == 42) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index436 = 0; index436 < 5; ++index436) + { + int index437 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 32); + Main.dust[index437].velocity *= 0.6f; + } + } + else if (this.type >= 411 && this.type <= 414) + { + int Type = 9; + if (this.type == 412 || this.type == 414) + Type = 11; + if (this.type == 413) + Type = 19; + for (int index438 = 0; index438 < 5; ++index438) + { + int index439 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type, SpeedY: (this.velocity.Y / 2f)); + Main.dust[index439].noGravity = true; + Main.dust[index439].velocity -= this.velocity * 0.5f; + } + } + else if (this.type == 109) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index440 = 0; index440 < 5; ++index440) + { + int index441 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 51, Scale: 0.6f); + Main.dust[index441].velocity *= 0.6f; + } + } + else if (this.type == 39) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index442 = 0; index442 < 5; ++index442) + { + int index443 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 38); + Main.dust[index443].velocity *= 0.6f; + } + } + else if (this.type == 71) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index444 = 0; index444 < 5; ++index444) + { + int index445 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 53); + Main.dust[index445].velocity *= 0.6f; + } + } + else if (this.type == 40) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index446 = 0; index446 < 5; ++index446) + { + int index447 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 36); + Main.dust[index447].velocity *= 0.6f; + } + } + else if (this.type == 21 || this.type == 471 || this.type == 532) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 26, Scale: 0.8f); + } + else if (this.type == 583) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 4, Alpha: 100, newColor: new Color(20, 250, 20, 240), Scale: 0.8f); + } + else if (this.type == 584) + { + Main.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 4, Alpha: 100, newColor: new Color(250, 20, 120, 240), Scale: 0.8f); + } + else if (this.type == 24) + { + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 1, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, Scale: 0.75f); + } + else if (this.type == 27) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index448 = 0; index448 < 30; ++index448) + { + int index449 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 172, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 100); + Main.dust[index449].noGravity = true; + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 172, this.velocity.X * 0.1f, this.velocity.Y * 0.1f, 100, Scale: 0.5f); + } + } + else if (this.type == 38) + { + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 42, this.velocity.X * 0.1f, this.velocity.Y * 0.1f); + } + else if (this.type == 44 || this.type == 45) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index450 = 0; index450 < 30; ++index450) + { + int index451 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, this.velocity.X, this.velocity.Y, 100, Scale: 1.7f); + Main.dust[index451].noGravity = true; + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, this.velocity.X, this.velocity.Y, 100); + } + } + else if (this.type == 41) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index = 0; index < 10; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index452 = 0; index452 < 5; ++index452) + { + int index453 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index453].noGravity = true; + Main.dust[index453].velocity *= 3f; + int index454 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index454].velocity *= 2f; + } + int index455 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index455].velocity *= 0.4f; + Main.gore[index455].velocity.X += (float) Main.rand.Next(-10, 11) * 0.1f; + Main.gore[index455].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.1f; + int index456 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index456].velocity *= 0.4f; + Main.gore[index456].velocity.X += (float) Main.rand.Next(-10, 11) * 0.1f; + Main.gore[index456].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.1f; + if (this.owner == Main.myPlayer) + { + this.penetrate = -1; + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 64; + this.height = 64; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.Damage(); + } + } + else if (this.type == 514) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index457 = 0; index457 < 10; ++index457) + { + int index458 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.3f); + Main.dust[index458].velocity *= 1.4f; + } + for (int index459 = 0; index459 < 6; ++index459) + { + int index460 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.1f); + Main.dust[index460].noGravity = true; + Main.dust[index460].velocity *= 4.6f; + int index461 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.3f); + Main.dust[index461].velocity *= 3.3f; + if (Main.rand.Next(2) == 0) + { + int index462 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.1f); + Main.dust[index462].velocity *= 2.7f; + } + } + if (this.owner == Main.myPlayer) + { + this.penetrate = -1; + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 112; + this.height = 112; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.ai[0] = 2f; + this.Damage(); + } + } + else if (this.type == 306) + { + Main.PlaySound(3, (int) this.position.X, (int) this.position.Y); + for (int index463 = 0; index463 < 20; ++index463) + { + int index464 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 184); + Main.dust[index464].scale *= 1.1f; + Main.dust[index464].noGravity = true; + } + for (int index465 = 0; index465 < 30; ++index465) + { + int index466 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 184); + Main.dust[index466].velocity *= 2.5f; + Main.dust[index466].scale *= 0.8f; + Main.dust[index466].noGravity = true; + } + if (this.owner == Main.myPlayer) + { + int num = 2; + if (Main.rand.Next(10) == 0) + ++num; + if (Main.rand.Next(10) == 0) + ++num; + if (Main.rand.Next(10) == 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 * 10f, (float) Main.rand.Next(-35, 36) * 0.02f * 10f, 307, (int) ((double) this.damage * 0.7), (float) (int) ((double) this.knockBack * 0.35), Main.myPlayer); + } + } + else if (this.type == 469) + { + if (this.owner == Main.myPlayer) + { + int num64 = 6; + for (int index467 = 0; index467 < num64; ++index467) + { + if (index467 % 2 != 1 || Main.rand.Next(3) == 0) + { + Vector2 position = this.position; + Vector2 oldVelocity = this.oldVelocity; + oldVelocity.Normalize(); + oldVelocity *= 8f; + float num65 = (float) Main.rand.Next(-35, 36) * 0.01f; + float num66 = (float) Main.rand.Next(-35, 36) * 0.01f; + Vector2 vector2 = position - oldVelocity * (float) index467; + float SpeedX = num65 + this.oldVelocity.X / 6f; + float SpeedY = num66 + this.oldVelocity.Y / 6f; + int index468 = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Main.player[this.owner].beeType(), Main.player[this.owner].beeDamage(this.damage / 3), Main.player[this.owner].beeKB(0.0f), Main.myPlayer); + Main.projectile[index468].magic = false; + Main.projectile[index468].ranged = true; + Main.projectile[index468].penetrate = 2; + } + } + } + } + else if (this.type == 183) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index469 = 0; index469 < 20; ++index469) + { + int index470 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index470].velocity *= 1f; + } + int index471 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + ++Main.gore[index471].velocity.X; + ++Main.gore[index471].velocity.Y; + Main.gore[index471].velocity *= 0.3f; + int index472 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + --Main.gore[index472].velocity.X; + ++Main.gore[index472].velocity.Y; + Main.gore[index472].velocity *= 0.3f; + int index473 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + ++Main.gore[index473].velocity.X; + --Main.gore[index473].velocity.Y; + Main.gore[index473].velocity *= 0.3f; + int index474 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + --Main.gore[index474].velocity.X; + --Main.gore[index474].velocity.Y; + Main.gore[index474].velocity *= 0.3f; + if (this.owner == Main.myPlayer) + { + int num = Main.rand.Next(15, 25); + for (int index475 = 0; index475 < num; ++index475) + Projectile.NewProjectile(this.position.X, this.position.Y, (float) Main.rand.Next(-35, 36) * 0.02f, (float) Main.rand.Next(-35, 36) * 0.02f, Main.player[this.owner].beeType(), Main.player[this.owner].beeDamage(this.damage), Main.player[this.owner].beeKB(0.0f), Main.myPlayer); + } + } + else if (this.aiStyle == 34) + { + if (this.owner != Main.myPlayer) + this.timeLeft = 60; + Main.PlaySound(SoundID.Item14, this.position); + if (this.type == 167) + { + for (int index476 = 0; index476 < 400; ++index476) + { + float num67 = 16f; + if (index476 < 300) + num67 = 12f; + if (index476 < 200) + num67 = 8f; + if (index476 < 100) + num67 = 4f; + int index477 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 130, Alpha: 100); + float num68 = Main.dust[index477].velocity.X; + float y = Main.dust[index477].velocity.Y; + if ((double) num68 == 0.0 && (double) y == 0.0) + num68 = 1f; + float num69 = (float) Math.Sqrt((double) num68 * (double) num68 + (double) y * (double) y); + float num70 = num67 / num69; + float num71 = num68 * num70; + float num72 = y * num70; + Main.dust[index477].velocity *= 0.5f; + Main.dust[index477].velocity.X += num71; + Main.dust[index477].velocity.Y += num72; + Main.dust[index477].scale = 1.3f; + Main.dust[index477].noGravity = true; + } + } + if (this.type == 168) + { + for (int index478 = 0; index478 < 400; ++index478) + { + float num73 = (float) (2.0 * ((double) index478 / 100.0)); + if (index478 > 100) + num73 = 10f; + if (index478 > 250) + num73 = 13f; + int index479 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 131, Alpha: 100); + float num74 = Main.dust[index479].velocity.X; + float y = Main.dust[index479].velocity.Y; + if ((double) num74 == 0.0 && (double) y == 0.0) + num74 = 1f; + float num75 = (float) Math.Sqrt((double) num74 * (double) num74 + (double) y * (double) y); + float num76 = num73 / num75; + float num77; + float num78; + if (index478 <= 200) + { + num77 = num74 * num76; + num78 = y * num76; + } + else + { + num77 = (float) ((double) num74 * (double) num76 * 1.25); + num78 = (float) ((double) y * (double) num76 * 0.75); + } + Main.dust[index479].velocity *= 0.5f; + Main.dust[index479].velocity.X += num77; + Main.dust[index479].velocity.Y += num78; + if (index478 > 100) + { + Main.dust[index479].scale = 1.3f; + Main.dust[index479].noGravity = true; + } + } + } + if (this.type == 169) + { + Vector2 spinningpoint = ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2(); + float num79 = (float) Main.rand.Next(5, 9); + float num80 = (float) Main.rand.Next(12, 17); + float num81 = (float) Main.rand.Next(3, 7); + float num82 = 20f; + for (float num83 = 0.0f; (double) num83 < (double) num79; ++num83) + { + for (int index480 = 0; index480 < 2; ++index480) + { + Vector2 vector2_14 = spinningpoint.RotatedBy((index480 == 0 ? 1.0 : -1.0) * 6.28318548202515 / ((double) num79 * 2.0)); + for (float num84 = 0.0f; (double) num84 < (double) num82; ++num84) + { + Vector2 vector2_15 = Vector2.Lerp(spinningpoint, vector2_14, num84 / num82); + float num85 = MathHelper.Lerp(num80, num81, num84 / num82); + int index481 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 133, Alpha: 100, Scale: 1.3f); + Main.dust[index481].velocity *= 0.1f; + Main.dust[index481].noGravity = true; + Main.dust[index481].velocity += vector2_15 * num85; + } + } + spinningpoint = spinningpoint.RotatedBy(6.28318548202515 / (double) num79); + } + for (float num86 = 0.0f; (double) num86 < (double) num79; ++num86) + { + for (int index482 = 0; index482 < 2; ++index482) + { + Vector2 vector2_16 = spinningpoint.RotatedBy((index482 == 0 ? 1.0 : -1.0) * 6.28318548202515 / ((double) num79 * 2.0)); + for (float num87 = 0.0f; (double) num87 < (double) num82; ++num87) + { + Vector2 vector2_17 = Vector2.Lerp(spinningpoint, vector2_16, num87 / num82); + float num88 = MathHelper.Lerp(num80, num81, num87 / num82) / 2f; + int index483 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 133, Alpha: 100, Scale: 1.3f); + Main.dust[index483].velocity *= 0.1f; + Main.dust[index483].noGravity = true; + Main.dust[index483].velocity += vector2_17 * num88; + } + } + spinningpoint = spinningpoint.RotatedBy(6.28318548202515 / (double) num79); + } + for (int index484 = 0; index484 < 100; ++index484) + { + float num89 = num80; + int index485 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 132, Alpha: 100); + float num90 = Main.dust[index485].velocity.X; + float y = Main.dust[index485].velocity.Y; + if ((double) num90 == 0.0 && (double) y == 0.0) + num90 = 1f; + float num91 = (float) Math.Sqrt((double) num90 * (double) num90 + (double) y * (double) y); + float num92 = num89 / num91; + float num93 = num90 * num92; + float num94 = y * num92; + Main.dust[index485].velocity *= 0.5f; + Main.dust[index485].velocity.X += num93; + Main.dust[index485].velocity.Y += num94; + Main.dust[index485].scale = 1.3f; + Main.dust[index485].noGravity = true; + } + } + if (this.type == 170) + { + for (int index486 = 0; index486 < 400; ++index486) + { + int Type = 133; + float num95 = 16f; + if (index486 > 100) + num95 = 11f; + if (index486 > 100) + Type = 134; + if (index486 > 200) + num95 = 8f; + if (index486 > 200) + Type = 133; + if (index486 > 300) + num95 = 5f; + if (index486 > 300) + Type = 134; + int index487 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, Type, Alpha: 100); + float num96 = Main.dust[index487].velocity.X; + float y = Main.dust[index487].velocity.Y; + if ((double) num96 == 0.0 && (double) y == 0.0) + num96 = 1f; + float num97 = (float) Math.Sqrt((double) num96 * (double) num96 + (double) y * (double) y); + float num98 = num95 / num97; + float num99; + float num100; + if (index486 > 300) + { + num99 = (float) ((double) num96 * (double) num98 * 0.699999988079071); + num100 = y * num98; + } + else if (index486 > 200) + { + num99 = num96 * num98; + num100 = (float) ((double) y * (double) num98 * 0.699999988079071); + } + else if (index486 > 100) + { + num99 = (float) ((double) num96 * (double) num98 * 0.699999988079071); + num100 = y * num98; + } + else + { + num99 = num96 * num98; + num100 = (float) ((double) y * (double) num98 * 0.699999988079071); + } + Main.dust[index487].velocity *= 0.5f; + Main.dust[index487].velocity.X += num99; + Main.dust[index487].velocity.Y += num100; + if (Main.rand.Next(3) != 0) + { + Main.dust[index487].scale = 1.3f; + Main.dust[index487].noGravity = true; + } + } + } + if (this.type == 415) + { + Vector2 spinningpoint = ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2(); + float num101 = (float) Main.rand.Next(5, 9); + float num102 = (float) Main.rand.Next(10, 15) * 0.66f; + float num103 = (float) Main.rand.Next(4, 7) / 2f; + int num104 = 30; + for (int index488 = 0; (double) index488 < (double) num104 * (double) num101; ++index488) + { + if (index488 % num104 == 0) + spinningpoint = spinningpoint.RotatedBy(6.28318548202515 / (double) num101); + float num105 = MathHelper.Lerp(num103, num102, (float) (index488 % num104) / (float) num104); + int index489 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 130, Alpha: 100); + Main.dust[index489].velocity *= 0.1f; + Main.dust[index489].velocity += spinningpoint * num105; + Main.dust[index489].scale = 1.3f; + Main.dust[index489].noGravity = true; + } + for (int index490 = 0; index490 < 100; ++index490) + { + float num106 = num102; + if (index490 < 30) + num106 = (float) (((double) num103 + (double) num102) / 2.0); + int index491 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 130, Alpha: 100); + float num107 = Main.dust[index491].velocity.X; + float y = Main.dust[index491].velocity.Y; + if ((double) num107 == 0.0 && (double) y == 0.0) + num107 = 1f; + float num108 = (float) Math.Sqrt((double) num107 * (double) num107 + (double) y * (double) y); + float num109 = num106 / num108; + float num110 = num107 * num109; + float num111 = y * num109; + Main.dust[index491].velocity *= 0.5f; + Main.dust[index491].velocity.X += num110; + Main.dust[index491].velocity.Y += num111; + Main.dust[index491].scale = 1.3f; + Main.dust[index491].noGravity = true; + } + } + if (this.type == 416) + { + Vector2 spinningpoint1 = ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2(); + Vector2 spinningpoint2 = spinningpoint1; + float num112 = (float) (Main.rand.Next(3, 6) * 2); + int num113 = 20; + float num114 = Main.rand.Next(2) == 0 ? 1f : -1f; + bool flag = true; + for (int index492 = 0; (double) index492 < (double) num113 * (double) num112; ++index492) + { + if (index492 % num113 == 0) + { + spinningpoint2 = spinningpoint2.RotatedBy((double) num114 * (6.28318548202515 / (double) num112)); + spinningpoint1 = spinningpoint2; + flag = !flag; + } + else + { + float num115 = 6.283185f / ((float) num113 * num112); + spinningpoint1 = spinningpoint1.RotatedBy((double) num115 * (double) num114 * 3.0); + } + float num116 = MathHelper.Lerp(1f, 8f, (float) (index492 % num113) / (float) num113); + int index493 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 131, Alpha: 100, Scale: 1.4f); + Main.dust[index493].velocity *= 0.1f; + Main.dust[index493].velocity += spinningpoint1 * num116; + if (flag) + Main.dust[index493].scale = 0.9f; + Main.dust[index493].noGravity = true; + } + } + if (this.type == 417) + { + float num117 = (float) Main.rand.NextDouble() * 6.283185f; + float num118 = (float) Main.rand.NextDouble() * 6.283185f; + float num119 = (float) (4.0 + Main.rand.NextDouble() * 3.0); + float num120 = (float) (4.0 + Main.rand.NextDouble() * 3.0); + float num121 = num119; + if ((double) num120 > (double) num121) + num121 = num120; + for (int index494 = 0; index494 < 150; ++index494) + { + int Type = 132; + float num122 = num121; + if (index494 > 50) + num122 = num120; + if (index494 > 50) + Type = 133; + if (index494 > 100) + num122 = num119; + if (index494 > 100) + Type = 132; + int index495 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, Type, Alpha: 100); + Vector2 velocity = Main.dust[index495].velocity; + velocity.Normalize(); + Vector2 spinningpoint = velocity * num122; + if (index494 > 100) + { + spinningpoint.X *= 0.5f; + spinningpoint = spinningpoint.RotatedBy((double) num117); + } + else if (index494 > 50) + { + spinningpoint.Y *= 0.5f; + spinningpoint = spinningpoint.RotatedBy((double) num118); + } + Main.dust[index495].velocity *= 0.2f; + Main.dust[index495].velocity += spinningpoint; + if (index494 <= 200) + { + Main.dust[index495].scale = 1.3f; + Main.dust[index495].noGravity = true; + } + } + } + if (this.type == 418) + { + Vector2 spinningpoint = ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2(); + float num123 = (float) Main.rand.Next(5, 12); + float num124 = (float) Main.rand.Next(9, 14) * 0.66f; + float num125 = (float) Main.rand.Next(2, 4) * 0.66f; + float num126 = 15f; + for (float num127 = 0.0f; (double) num127 < (double) num123; ++num127) + { + for (int index496 = 0; index496 < 2; ++index496) + { + Vector2 vector2_18 = spinningpoint.RotatedBy((index496 == 0 ? 1.0 : -1.0) * 6.28318548202515 / ((double) num123 * 2.0)); + for (float num128 = 0.0f; (double) num128 < (double) num126; ++num128) + { + Vector2 vector2_19 = Vector2.SmoothStep(spinningpoint, vector2_18, num128 / num126); + float num129 = MathHelper.SmoothStep(num124, num125, num128 / num126); + int index497 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, 134, Alpha: 100, Scale: 1.3f); + Main.dust[index497].velocity *= 0.1f; + Main.dust[index497].noGravity = true; + Main.dust[index497].velocity += vector2_19 * num129; + } + } + spinningpoint = spinningpoint.RotatedBy(6.28318548202515 / (double) num123); + } + for (int index498 = 0; index498 < 120; ++index498) + { + float num130 = num124; + int Type = 133; + if (index498 < 80) + num130 = num125 - 0.5f; + else + Type = 131; + int index499 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), 6, 6, Type, Alpha: 100); + float num131 = Main.dust[index499].velocity.X; + float y = Main.dust[index499].velocity.Y; + if ((double) num131 == 0.0 && (double) y == 0.0) + num131 = 1f; + float num132 = (float) Math.Sqrt((double) num131 * (double) num131 + (double) y * (double) y); + float num133 = num130 / num132; + float num134 = num131 * num133; + float num135 = y * num133; + Main.dust[index499].velocity *= 0.2f; + Main.dust[index499].velocity.X += num134; + Main.dust[index499].velocity.Y += num135; + Main.dust[index499].scale = 1.3f; + Main.dust[index499].noGravity = true; + } + } + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 192; + this.height = 192; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.penetrate = -1; + this.Damage(); + } + else if (this.type == 312) + { + Main.PlaySound(SoundID.Item14, this.position); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 22; + this.height = 22; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index500 = 0; index500 < 30; ++index500) + { + int index501 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index501].velocity *= 1.4f; + } + for (int index502 = 0; index502 < 20; ++index502) + { + int index503 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 3.5f); + Main.dust[index503].noGravity = true; + Main.dust[index503].velocity *= 7f; + int index504 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index504].velocity *= 3f; + } + for (int index505 = 0; index505 < 2; ++index505) + { + float num = 0.4f; + if (index505 == 1) + num = 0.8f; + int index506 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index506].velocity *= num; + ++Main.gore[index506].velocity.X; + ++Main.gore[index506].velocity.Y; + int index507 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index507].velocity *= num; + --Main.gore[index507].velocity.X; + ++Main.gore[index507].velocity.Y; + int index508 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index508].velocity *= num; + ++Main.gore[index508].velocity.X; + --Main.gore[index508].velocity.Y; + int index509 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index509].velocity *= num; + --Main.gore[index509].velocity.X; + --Main.gore[index509].velocity.Y; + } + 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(); + } + else if (this.type == 133 || this.type == 134 || this.type == 135 || this.type == 136 || this.type == 137 || this.type == 138 || this.type == 303 || this.type == 338 || this.type == 339) + { + if (this.type == 30 || this.type == 133 || this.type == 136 || this.type == 139) + Main.PlaySound(SoundID.Item62, this.position); + else + Main.PlaySound(SoundID.Item14, this.position); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 22; + this.height = 22; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index510 = 0; index510 < 30; ++index510) + { + int index511 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index511].velocity *= 1.4f; + } + for (int index512 = 0; index512 < 20; ++index512) + { + int index513 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 3.5f); + Main.dust[index513].noGravity = true; + Main.dust[index513].velocity *= 7f; + int index514 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index514].velocity *= 3f; + } + for (int index515 = 0; index515 < 2; ++index515) + { + float num = 0.4f; + if (index515 == 1) + num = 0.8f; + int index516 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index516].velocity *= num; + ++Main.gore[index516].velocity.X; + ++Main.gore[index516].velocity.Y; + int index517 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index517].velocity *= num; + --Main.gore[index517].velocity.X; + ++Main.gore[index517].velocity.Y; + int index518 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index518].velocity *= num; + ++Main.gore[index518].velocity.X; + --Main.gore[index518].velocity.Y; + int index519 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index519].velocity *= num; + --Main.gore[index519].velocity.X; + --Main.gore[index519].velocity.Y; + } + } + 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) + { + if (this.type == 30 || this.type == 133 || this.type == 136 || this.type == 139) + Main.PlaySound(SoundID.Item62, this.position); + else + Main.PlaySound(SoundID.Item14, this.position); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 80; + this.height = 80; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index520 = 0; index520 < 40; ++index520) + { + int index521 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 2f); + Main.dust[index521].velocity *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[index521].scale = 0.5f; + Main.dust[index521].fadeIn = (float) (1.0 + (double) Main.rand.Next(10) * 0.100000001490116); + } + } + for (int index522 = 0; index522 < 70; ++index522) + { + int index523 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 3f); + Main.dust[index523].noGravity = true; + Main.dust[index523].velocity *= 5f; + int index524 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index524].velocity *= 2f; + } + for (int index525 = 0; index525 < 3; ++index525) + { + float num = 0.33f; + if (index525 == 1) + num = 0.66f; + if (index525 == 2) + num = 1f; + int index526 = 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[index526].velocity *= num; + ++Main.gore[index526].velocity.X; + ++Main.gore[index526].velocity.Y; + int index527 = 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[index527].velocity *= num; + --Main.gore[index527].velocity.X; + ++Main.gore[index527].velocity.Y; + int index528 = 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[index528].velocity *= num; + ++Main.gore[index528].velocity.X; + --Main.gore[index528].velocity.Y; + int index529 = 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[index529].velocity *= num; + --Main.gore[index529].velocity.X; + --Main.gore[index529].velocity.Y; + } + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 10; + this.height = 10; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + } + else if (this.type == 246) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index530 = 0; index530 < 10; ++index530) + { + int index531 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index531].velocity *= 0.9f; + } + for (int index532 = 0; index532 < 5; ++index532) + { + int index533 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index533].noGravity = true; + Main.dust[index533].velocity *= 3f; + int index534 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index534].velocity *= 2f; + } + int index535 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index535].velocity *= 0.3f; + Main.gore[index535].velocity.X += (float) Main.rand.Next(-1, 2); + Main.gore[index535].velocity.Y += (float) Main.rand.Next(-1, 2); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 150; + this.height = 150; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.penetrate = -1; + this.maxPenetrate = 0; + this.Damage(); + if (this.owner == Main.myPlayer) + { + int num136 = Main.rand.Next(2, 6); + for (int index536 = 0; index536 < num136; ++index536) + { + float num137 = (float) Main.rand.Next(-100, 101) + 0.01f; + float num138 = (float) Main.rand.Next(-100, 101); + float num139 = num137 - 0.01f; + float num140 = 8f / (float) Math.Sqrt((double) num139 * (double) num139 + (double) num138 * (double) num138); + int index537 = Projectile.NewProjectile(this.Center.X - this.oldVelocity.X, this.Center.Y - this.oldVelocity.Y, num139 * num140, num138 * num140, 249, this.damage, this.knockBack, this.owner); + Main.projectile[index537].maxPenetrate = 0; + } + } + } + else if (this.type == 249) + { + Main.PlaySound(SoundID.Item14, this.position); + for (int index538 = 0; index538 < 7; ++index538) + { + int index539 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index539].velocity *= 0.8f; + } + for (int index540 = 0; index540 < 2; ++index540) + { + int index541 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index541].noGravity = true; + Main.dust[index541].velocity *= 2.5f; + int index542 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index542].velocity *= 1.5f; + } + int index = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index].velocity *= 0.2f; + Main.gore[index].velocity.X += (float) Main.rand.Next(-1, 2); + Main.gore[index].velocity.Y += (float) Main.rand.Next(-1, 2); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 100; + this.height = 100; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.penetrate = -1; + this.Damage(); + } + else if (this.type == 588) + { + Main.PlaySound(SoundID.Item14, this.position); + this.position = this.Center; + this.width = this.height = 22; + this.Center = this.position; + for (int index543 = 0; index543 < 8; ++index543) + { + int index544 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 219 + Main.rand.Next(5)); + Main.dust[index544].velocity *= 1.4f; + Main.dust[index544].fadeIn = 1f; + Main.dust[index544].noGravity = true; + } + for (int index545 = 0; index545 < 15; ++index545) + { + int index546 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 139 + Main.rand.Next(4), Scale: 1.6f); + Main.dust[index546].noGravity = true; + Main.dust[index546].velocity *= 5f; + int index547 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 139 + Main.rand.Next(4), Scale: 1.9f); + Main.dust[index547].velocity *= 3f; + } + if (Main.rand.Next(2) == 0) + { + int index = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(276, 283)); + Main.gore[index].velocity *= 0.4f; + ++Main.gore[index].velocity.X; + ++Main.gore[index].velocity.Y; + } + if (Main.rand.Next(2) == 0) + { + int index = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(276, 283)); + Main.gore[index].velocity *= 0.4f; + --Main.gore[index].velocity.X; + ++Main.gore[index].velocity.Y; + } + if (Main.rand.Next(2) == 0) + { + int index = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(276, 283)); + Main.gore[index].velocity *= 0.4f; + ++Main.gore[index].velocity.X; + --Main.gore[index].velocity.Y; + } + if (Main.rand.Next(2) == 0) + { + int index = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(276, 283)); + Main.gore[index].velocity *= 0.4f; + --Main.gore[index].velocity.X; + --Main.gore[index].velocity.Y; + } + } + else if (this.type == 28 || this.type == 30 || this.type == 37 || this.type == 75 || this.type == 102 || this.type == 164 || this.type == 397 || this.type == 517 || this.type == 516 || this.type == 519) + { + Main.PlaySound(SoundID.Item14, this.position); + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 22; + this.height = 22; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + for (int index548 = 0; index548 < 20; ++index548) + { + int index549 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index549].velocity *= 1.4f; + } + for (int index550 = 0; index550 < 10; ++index550) + { + int index551 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2.5f); + Main.dust[index551].noGravity = true; + Main.dust[index551].velocity *= 5f; + int index552 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index552].velocity *= 3f; + } + int index553 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index553].velocity *= 0.4f; + ++Main.gore[index553].velocity.X; + ++Main.gore[index553].velocity.Y; + int index554 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index554].velocity *= 0.4f; + --Main.gore[index554].velocity.X; + ++Main.gore[index554].velocity.Y; + int index555 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index555].velocity *= 0.4f; + ++Main.gore[index555].velocity.X; + --Main.gore[index555].velocity.Y; + int index556 = Gore.NewGore(new Vector2(this.position.X, this.position.Y), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index556].velocity *= 0.4f; + --Main.gore[index556].velocity.X; + --Main.gore[index556].velocity.Y; + if (this.type == 102) + { + 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.Damage(); + } + } + else if (this.type == 29 || this.type == 108 || this.type == 470 || this.type == 637) + { + Main.PlaySound(SoundID.Item14, this.position); + if (this.type == 29) + { + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 200; + this.height = 200; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + } + for (int index557 = 0; index557 < 50; ++index557) + { + int index558 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 2f); + Main.dust[index558].velocity *= 1.4f; + } + for (int index559 = 0; index559 < 80; ++index559) + { + int index560 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 3f); + Main.dust[index560].noGravity = true; + Main.dust[index560].velocity *= 5f; + int index561 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index561].velocity *= 3f; + } + for (int index562 = 0; index562 < 2; ++index562) + { + int index563 = 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[index563].scale = 1.5f; + Main.gore[index563].velocity.X += 1.5f; + Main.gore[index563].velocity.Y += 1.5f; + int index564 = 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[index564].scale = 1.5f; + Main.gore[index564].velocity.X -= 1.5f; + Main.gore[index564].velocity.Y += 1.5f; + int index565 = 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[index565].scale = 1.5f; + Main.gore[index565].velocity.X += 1.5f; + Main.gore[index565].velocity.Y -= 1.5f; + int index566 = 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[index566].scale = 1.5f; + Main.gore[index566].velocity.X -= 1.5f; + Main.gore[index566].velocity.Y -= 1.5f; + } + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 10; + this.height = 10; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + } + else if (this.type == 69) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 13); + for (int index567 = 0; index567 < 30; ++index567) + { + int index568 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 33, SpeedY: -2f, Scale: 1.1f); + Main.dust[index568].alpha = 100; + Main.dust[index568].velocity.X *= 1.5f; + Main.dust[index568].velocity *= 3f; + } + } + else if (this.type == 70) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 13); + for (int index569 = 0; index569 < 30; ++index569) + { + int index570 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 52, SpeedY: -2f, Scale: 1.1f); + Main.dust[index570].alpha = 100; + Main.dust[index570].velocity.X *= 1.5f; + Main.dust[index570].velocity *= 3f; + } + } + else if (this.type == 621) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 13); + for (int index571 = 0; index571 < 30; ++index571) + { + int index572 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 266, SpeedY: -2f, Scale: 1.1f); + Main.dust[index572].alpha = 100; + Main.dust[index572].velocity.X *= 1.5f; + Main.dust[index572].velocity *= 3f; + } + } + else if (this.type == 114 || this.type == 115) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index573 = 4; index573 < 31; ++index573) + { + float num141 = this.oldVelocity.X * (30f / (float) index573); + float num142 = this.oldVelocity.Y * (30f / (float) index573); + int index574 = Dust.NewDust(new Vector2(this.position.X - num141, this.position.Y - num142), 8, 8, 27, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.4f); + Main.dust[index574].noGravity = true; + Main.dust[index574].velocity *= 0.5f; + int index575 = Dust.NewDust(new Vector2(this.position.X - num141, this.position.Y - num142), 8, 8, 27, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 0.9f); + Main.dust[index575].velocity *= 0.5f; + } + } + else if (this.type == 116) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index576 = 4; index576 < 31; ++index576) + { + float num143 = this.oldVelocity.X * (30f / (float) index576); + float num144 = this.oldVelocity.Y * (30f / (float) index576); + int index577 = Dust.NewDust(new Vector2(this.position.X - num143, this.position.Y - num144), 8, 8, 64, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.8f); + Main.dust[index577].noGravity = true; + int index578 = Dust.NewDust(new Vector2(this.position.X - num143, this.position.Y - num144), 8, 8, 64, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.4f); + Main.dust[index578].noGravity = true; + } + } + else if (this.type == 173) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index579 = 4; index579 < 24; ++index579) + { + float num145 = this.oldVelocity.X * (30f / (float) index579); + float num146 = this.oldVelocity.Y * (30f / (float) index579); + int Type; + switch (Main.rand.Next(3)) + { + case 0: + Type = 15; + break; + case 1: + Type = 57; + break; + default: + Type = 58; + break; + } + int index580 = Dust.NewDust(new Vector2(this.position.X - num145, this.position.Y - num146), 8, 8, Type, this.oldVelocity.X * 0.2f, this.oldVelocity.Y * 0.2f, 100, Scale: 1.8f); + Main.dust[index580].velocity *= 1.5f; + Main.dust[index580].noGravity = true; + } + } + else if (this.type == 132) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index581 = 4; index581 < 31; ++index581) + { + float num147 = this.oldVelocity.X * (30f / (float) index581); + float num148 = this.oldVelocity.Y * (30f / (float) index581); + int index582 = Dust.NewDust(new Vector2(this.oldPosition.X - num147, this.oldPosition.Y - num148), 8, 8, 107, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.8f); + Main.dust[index582].noGravity = true; + Main.dust[index582].velocity *= 0.5f; + int index583 = Dust.NewDust(new Vector2(this.oldPosition.X - num147, this.oldPosition.Y - num148), 8, 8, 107, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.4f); + Main.dust[index583].velocity *= 0.05f; + } + } + else if (this.type == 156) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index584 = 4; index584 < 31; ++index584) + { + float num149 = this.oldVelocity.X * (30f / (float) index584); + float num150 = this.oldVelocity.Y * (30f / (float) index584); + int index585 = Dust.NewDust(new Vector2(this.oldPosition.X - num149, this.oldPosition.Y - num150), 8, 8, 73, this.oldVelocity.X, this.oldVelocity.Y, (int) byte.MaxValue, Scale: 1.8f); + Main.dust[index585].noGravity = true; + Main.dust[index585].velocity *= 0.5f; + int index586 = Dust.NewDust(new Vector2(this.oldPosition.X - num149, this.oldPosition.Y - num150), 8, 8, 73, this.oldVelocity.X, this.oldVelocity.Y, (int) byte.MaxValue, Scale: 1.4f); + Main.dust[index586].velocity *= 0.05f; + Main.dust[index586].noGravity = true; + } + } + else if (this.type == 157) + { + Main.PlaySound(SoundID.Item10, this.position); + for (int index587 = 4; index587 < 31; ++index587) + { + int index588 = Dust.NewDust(this.position, this.width, this.height, 107, this.oldVelocity.X, this.oldVelocity.Y, 100, Scale: 1.8f); + Main.dust[index588].noGravity = true; + Main.dust[index588].velocity *= 0.5f; + } + } + else if (this.type == 370) + { + Main.PlaySound(SoundID.Item4, this.position); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 13); + for (int index589 = 0; index589 < 30; ++index589) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2.Normalize(); + int index590 = Gore.NewGore(this.Center + vector2 * 10f, vector2 * (float) Main.rand.Next(4, 9) * 0.66f + Vector2.UnitY * 1.5f, 331, (float) Main.rand.Next(40, 141) * 0.01f); + Main.gore[index590].sticky = false; + } + } + else if (this.type == 371) + { + Main.PlaySound(13, (int) this.position.X, (int) this.position.Y); + Main.PlaySound(SoundID.Item16, this.position); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 13); + for (int index591 = 0; index591 < 30; ++index591) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2.Normalize(); + vector2 *= 0.4f; + int index592 = Gore.NewGore(this.Center + vector2 * 10f, vector2 * (float) Main.rand.Next(4, 9) * 0.66f + Vector2.UnitY * 1.5f, Main.rand.Next(435, 438), (float) Main.rand.Next(20, 100) * 0.01f); + Main.gore[index592].sticky = false; + } + } + } + } + if (this.owner == Main.myPlayer && (this.type == 370 || this.type == 371)) + { + float num = 80f; + int type = 119; + if (this.type == 371) + type = 120; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead && (double) Vector2.Distance(this.Center, player.Center) < (double) num) + player.AddBuff(type, 1800, false); + } + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.life > 0 && (double) Vector2.Distance(this.Center, npc.Center) < (double) num) + npc.AddBuff(type, 1800); + } + } + if (this.owner == Main.myPlayer) + { + if (this.type == 28 || this.type == 29 || this.type == 37 || this.type == 108 || this.type == 136 || this.type == 137 || this.type == 138 || this.type == 142 || this.type == 143 || this.type == 144 || this.type == 339 || this.type == 341 || this.type == 470 || this.type == 516 || this.type == 519 || this.type == 637) + { + int num151 = 3; + if (this.type == 28 || this.type == 37 || this.type == 516 || this.type == 519) + num151 = 4; + if (this.type == 29 || this.type == 470 || this.type == 637) + num151 = 7; + if (this.type == 142 || this.type == 143 || this.type == 144 || this.type == 341) + num151 = 5; + if (this.type == 108) + num151 = 10; + int num152 = (int) ((double) this.position.X / 16.0 - (double) num151); + int num153 = (int) ((double) this.position.X / 16.0 + (double) num151); + int num154 = (int) ((double) this.position.Y / 16.0 - (double) num151); + int num155 = (int) ((double) this.position.Y / 16.0 + (double) num151); + if (num152 < 0) + num152 = 0; + if (num153 > Main.maxTilesX) + num153 = Main.maxTilesX; + if (num154 < 0) + num154 = 0; + if (num155 > Main.maxTilesY) + num155 = Main.maxTilesY; + bool flag1 = false; + for (int index593 = num152; index593 <= num153; ++index593) + { + for (int index594 = num154; index594 <= num155; ++index594) + { + float num156 = Math.Abs((float) index593 - this.position.X / 16f); + float num157 = Math.Abs((float) index594 - this.position.Y / 16f); + if (Math.Sqrt((double) num156 * (double) num156 + (double) num157 * (double) num157) < (double) num151 && Main.tile[index593, index594] != null && Main.tile[index593, index594].wall == (byte) 0) + { + flag1 = true; + break; + } + } + } + AchievementsHelper.CurrentlyMining = true; + for (int i1 = num152; i1 <= num153; ++i1) + { + for (int j1 = num154; j1 <= num155; ++j1) + { + float num158 = Math.Abs((float) i1 - this.position.X / 16f); + float num159 = Math.Abs((float) j1 - this.position.Y / 16f); + if (Math.Sqrt((double) num158 * (double) num158 + (double) num159 * (double) num159) < (double) num151) + { + bool flag2 = true; + if (Main.tile[i1, j1] != null && Main.tile[i1, j1].active()) + { + flag2 = true; + if (Main.tileDungeon[(int) Main.tile[i1, j1].type] || Main.tile[i1, j1].type == (ushort) 88 || TileID.Sets.BasicChest[(int) Main.tile[i1, j1].type] || Main.tile[i1, j1].type == (ushort) 26 || Main.tile[i1, j1].type == (ushort) 107 || Main.tile[i1, j1].type == (ushort) 108 || Main.tile[i1, j1].type == (ushort) 111 || Main.tile[i1, j1].type == (ushort) 226 || Main.tile[i1, j1].type == (ushort) 237 || Main.tile[i1, j1].type == (ushort) 221 || Main.tile[i1, j1].type == (ushort) 222 || Main.tile[i1, j1].type == (ushort) 223 || Main.tile[i1, j1].type == (ushort) 211 || Main.tile[i1, j1].type == (ushort) 404) + flag2 = false; + if (!Main.hardMode && Main.tile[i1, j1].type == (ushort) 58) + flag2 = false; + if (flag2) + { + WorldGen.KillTile(i1, j1); + if (!Main.tile[i1, j1].active() && Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) i1), number3: ((float) j1)); + } + } + if (flag2) + { + for (int i2 = i1 - 1; i2 <= i1 + 1; ++i2) + { + for (int j2 = j1 - 1; j2 <= j1 + 1; ++j2) + { + if (Main.tile[i2, j2] != null && Main.tile[i2, j2].wall > (byte) 0 && flag1) + { + WorldGen.KillWall(i2, j2); + if (Main.tile[i2, j2].wall == (byte) 0 && Main.netMode != 0) + NetMessage.SendData(17, number: 2, number2: ((float) i2), number3: ((float) j2)); + } + } + } + } + } + } + } + AchievementsHelper.CurrentlyMining = false; + } + if (Main.netMode != 0) + NetMessage.SendData(29, number: this.identity, number2: ((float) this.owner)); + if (!this.noDropItem) + { + int number = -1; + if (this.aiStyle == 10) + { + int i = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) (this.width / 2)) / 16; + int type = 0; + int Type = 2; + if (this.type == 109) + { + type = 147; + Type = 0; + } + if (this.type == 31) + { + type = 53; + Type = 0; + } + if (this.type == 42) + { + type = 53; + Type = 0; + } + if (this.type == 56) + { + type = 112; + Type = 0; + } + if (this.type == 65) + { + type = 112; + Type = 0; + } + if (this.type == 67) + { + type = 116; + Type = 0; + } + if (this.type == 68) + { + type = 116; + Type = 0; + } + if (this.type == 71) + { + type = 123; + Type = 0; + } + if (this.type == 39) + { + type = 59; + Type = 176; + } + if (this.type == 40) + { + type = 57; + Type = 172; + } + if (this.type == 179) + { + type = 224; + Type = 0; + } + if (this.type == 241) + { + type = 234; + Type = 0; + } + if (this.type == 354) + { + type = 234; + Type = 0; + } + if (this.type == 411) + { + type = 330; + Type = 71; + } + if (this.type == 412) + { + type = 331; + Type = 72; + } + if (this.type == 413) + { + type = 332; + Type = 73; + } + if (this.type == 414) + { + type = 333; + Type = 74; + } + if (this.type == 109) + { + int closest = (int) Player.FindClosest(this.position, this.width, this.height); + if ((double) (this.Center - Main.player[closest].Center).Length() > (double) Main.LogicCheckScreenWidth * 0.75) + { + type = -1; + Type = 593; + } + } + if (Main.tile[i, j].halfBrick() && (double) this.velocity.Y > 0.0 && (double) Math.Abs(this.velocity.Y) > (double) Math.Abs(this.velocity.X)) + --j; + if (!Main.tile[i, j].active() && type >= 0) + { + bool flag = false; + if (j < Main.maxTilesY - 2 && Main.tile[i, j + 1] != null && Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type == (ushort) 314) + flag = true; + if (!flag) + WorldGen.PlaceTile(i, j, type, forced: true); + if (!flag && Main.tile[i, j].active() && (int) Main.tile[i, j].type == type) + { + if (Main.tile[i, j + 1].halfBrick() || Main.tile[i, j + 1].slope() != (byte) 0) + { + WorldGen.SlopeTile(i, j + 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number: 14, number2: ((float) i), number3: ((float) (j + 1))); + } + if (Main.netMode != 0) + NetMessage.SendData(17, number: 1, number2: ((float) i), number3: ((float) j), number4: ((float) type)); + } + else if (Type > 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type); + } + else if (Type > 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type); + } + if (this.type == 1 && Main.rand.Next(3) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 40); + if (this.type == 474 && Main.rand.Next(3) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3003); + if (this.type == 103 && Main.rand.Next(6) == 0) + number = Main.rand.Next(3) != 0 ? Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 40) : Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 545); + if (this.type == 2 && Main.rand.Next(3) == 0) + number = Main.rand.Next(3) != 0 ? Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 40) : Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 41); + if (this.type == 172 && Main.rand.Next(3) == 0) + number = Main.rand.Next(3) != 0 ? Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 40) : Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 988); + if (this.type == 171) + { + if ((double) this.ai[1] == 0.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 985); + Main.item[number].noGrabDelay = 0; + } + else if ((double) this.ai[1] < 10.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 965, (int) (10.0 - (double) this.ai[1])); + Main.item[number].noGrabDelay = 0; + } + } + if (this.type == 475) + { + if ((double) this.ai[1] == 0.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3005); + Main.item[number].noGrabDelay = 0; + } + else if ((double) this.ai[1] < 10.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2996, (int) (10.0 - (double) this.ai[1])); + Main.item[number].noGrabDelay = 0; + } + } + if (this.type == 505) + { + if ((double) this.ai[1] == 0.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3079); + Main.item[number].noGrabDelay = 0; + } + else if ((double) this.ai[1] < 10.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3077, (int) (10.0 - (double) this.ai[1])); + Main.item[number].noGrabDelay = 0; + } + } + if (this.type == 506) + { + if ((double) this.ai[1] == 0.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3080); + Main.item[number].noGrabDelay = 0; + } + else if ((double) this.ai[1] < 10.0) + { + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3078, (int) (10.0 - (double) this.ai[1])); + Main.item[number].noGrabDelay = 0; + } + } + if (this.type == 91 && Main.rand.Next(6) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 516); + if (this.type == 50 && Main.rand.Next(3) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 282); + if (this.type == 515 && Main.rand.Next(3) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3112); + if (this.type == 53 && Main.rand.Next(3) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 286); + if (this.type == 48 && Main.rand.Next(2) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 279); + if (this.type == 54 && Main.rand.Next(2) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 287); + if (this.type == 3 && Main.rand.Next(2) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 42); + if (this.type == 4 && Main.rand.Next(4) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 47); + if (this.type == 12 && this.damage > 500) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 75); + if (this.type == 155) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 859); + if (this.type == 598 && Main.rand.Next(4) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3378); + if (this.type == 599 && Main.rand.Next(4) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3379); + if (this.type == 21 && Main.rand.Next(2) == 0) + number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 154); + if (Main.netMode == 1 && number >= 0) + NetMessage.SendData(21, number: number, number2: 1f); + } + if (this.type == 69 || this.type == 70 || this.type == 621) + { + int i = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (this.type == 69) + WorldGen.Convert(i, j, 2); + if (this.type == 70) + WorldGen.Convert(i, j, 1); + if (this.type == 621) + WorldGen.Convert(i, j, 4); + } + if (this.type == 378) + { + int num = Main.rand.Next(2, 4); + if (Main.rand.Next(5) == 0) + ++num; + for (int index = 0; index < num; ++index) + { + float x = this.velocity.X; + float y = this.velocity.Y; + Projectile.NewProjectile(this.Center.X, this.Center.Y, x * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258), y * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258), 379, this.damage, this.knockBack, this.owner); + } + } + } + this.active = false; + } + + public Color GetAlpha(Color newColor) + { + if (this.type == 270) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, Main.rand.Next(0, (int) byte.MaxValue)); + 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 == 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 == 573 || this.type == 578 || this.type == 579 || this.type == 617 || this.type == 641 || this.type == 707) + 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) + { + 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) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + 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) + return new Color(250, 250, 250, this.alpha); + if (this.type == 435) + { + 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 == 270 && (double) this.ai[0] >= 0.0) + return this.alpha > 0 ? Color.Transparent : new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + 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) + 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) + 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; + } +} diff --git a/Rain.cs b/Rain.cs new file mode 100644 index 0000000..05adcb5 --- /dev/null +++ b/Rain.cs @@ -0,0 +1,117 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Rain +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 MakeRain() + { + if ((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.windSpeed * 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 (Main.gameMenu || !WorldGen.SolidTile(i, j) && Main.tile[i, j].wall <= (byte) 0) + { + Vector2 Velocity = new Vector2(Main.windSpeed * 12f, 14f); + Rain.NewRain(Position, Velocity); + } + } + } + + public void Update() + { + this.position += this.velocity; + 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 Type = 154; + if (this.type == (byte) 3 || this.type == (byte) 4 || this.type == (byte) 5) + Type = 218; + int index = Dust.NewDust(this.position - this.velocity, 2, 2, Type); + Main.dust[index].position.X -= 2f; + Main.dust[index].alpha = 38; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity += -this.velocity * 0.025f; + Main.dust[index].scale = 0.75f; + } + + public 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; + float num3 = 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 = num3 * num3; + int num5 = (int) ((double) num1 * (double) num4); + float num6 = (float) ((1.0 + (double) Main.gfxQuality) / 2.0); + if ((double) num6 < 0.9) + num5 = (int) ((double) num5 * (double) num6); + float num7 = (float) (800 - Main.snowTiles); + if ((double) num7 < 0.0) + num7 = 0.0f; + float num8 = num7 / 800f; + int num9 = (int) ((double) num5 * (double) num8); + for (int index2 = 0; index2 < num9; ++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.rand.Next(3); + if (Main.bloodMoon) + rain.type += (byte) 3; + return index1; + } + } +} diff --git a/Recipe.cs b/Recipe.cs new file mode 100644 index 0000000..9541589 --- /dev/null +++ b/Recipe.cs @@ -0,0 +1,487 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Recipe +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +namespace Terraria +{ + public class Recipe + { + public static int maxRequirements = 15; + public static int maxRecipes = 2000; + public static int numRecipes = 0; + private static Recipe newRecipe = new Recipe(); + public Item createItem = new Item(); + public Item[] requiredItem = new Item[Recipe.maxRequirements]; + public int[] requiredTile = 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 List acceptedGroups = new List(); + + public void RequireGroup(string name) + { + int num; + if (!RecipeGroup.recipeGroupIDs.TryGetValue(name, out num)) + return; + this.acceptedGroups.Add(num); + } + + public bool ProcessGroupsForText(int type, out string theText) + { + foreach (int acceptedGroup in this.acceptedGroups) + { + if (RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(type)) + { + theText = RecipeGroup.recipeGroups[acceptedGroup].GetText(); + return true; + } + } + theText = ""; + return false; + } + + public bool AcceptedByItemGroups(int invType, int reqType) + { + foreach (int acceptedGroup in this.acceptedGroups) + { + if (RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(invType) && RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(reqType)) + return true; + } + return false; + } + + public Recipe() + { + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + this.requiredItem[index] = new Item(); + this.requiredTile[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; + 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) && this.anySand && (invType == 169 || invType == 408 || invType == 1246 || invType == 370 || invType == 3272); + + 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: + switch (invType) + { + case 529: + case 541: + case 542: + case 543: + case 852: + case 853: + case 1151: + return true; + default: + return false; + } + default: + return false; + } + } + + public static void FindRecipes() + { + 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; + for (int index = 0; index < 40; ++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; + } + } + } + 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 ? 1 : (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; + int num4 = flag3 ? 1 : 0; + if ((num3 & num4 & (flag4 ? 1 : 0) & (flag5 ? 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 + })); + } + + public static void SetupRecipes() + { + // ISSUE: The method is too long to display (51538 instructions) + } + + private static void PlatformReturn() + { + 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.newRecipe.createItem.SetDefaults(Main.recipe[index1].requiredItem[0].type); + Recipe.newRecipe.createItem.stack = Main.recipe[index1].requiredItem[0].stack; + Recipe.newRecipe.requiredItem[0].SetDefaults(Main.recipe[index1].createItem.type); + Recipe.newRecipe.requiredItem[0].stack = Main.recipe[index1].createItem.stack; + for (int index2 = 0; index2 < Recipe.newRecipe.requiredTile.Length; ++index2) + Recipe.newRecipe.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 WallReturn() + { + 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.newRecipe.createItem.SetDefaults(Main.recipe[index1].requiredItem[0].type); + Recipe.newRecipe.createItem.stack = Main.recipe[index1].requiredItem[0].stack; + Recipe.newRecipe.requiredItem[0].SetDefaults(Main.recipe[index1].createItem.type); + Recipe.newRecipe.requiredItem[0].stack = Main.recipe[index1].createItem.stack; + for (int index2 = 0; index2 < Recipe.newRecipe.requiredTile.Length; ++index2) + Recipe.newRecipe.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 AddRecipe() + { + if (Recipe.newRecipe.requiredTile[0] == 13) + Recipe.newRecipe.alchemy = true; + Main.recipe[Recipe.numRecipes] = Recipe.newRecipe; + Recipe.newRecipe = new Recipe(); + ++Recipe.numRecipes; + } + } +} diff --git a/RecipeGroup.cs b/RecipeGroup.cs new file mode 100644 index 0000000..6853cb0 --- /dev/null +++ b/RecipeGroup.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RecipeGroup +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 List ValidItems; + public int IconicItemIndex; + public static Dictionary recipeGroups = new Dictionary(); + public static Dictionary recipeGroupIDs = new Dictionary(); + public static int nextRecipeGroupIndex = 0; + + public RecipeGroup(Func getName, params int[] validItems) + { + this.GetText = getName; + this.ValidItems = new List((IEnumerable) validItems); + } + + 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..233e9c6 --- /dev/null +++ b/Ref`1.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Ref`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a251020 --- /dev/null +++ b/RemoteClient.cs @@ -0,0 +1,199 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RemoteClient +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +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 IsAnnouncementCompleted; + public bool IsReading; + 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; + + 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 sectionY1 = Netplay.GetSectionY((int) ((double) position.Y / 16.0)); + int num = 0; + for (int index2 = sectionX - fluff; index2 < sectionX + fluff + 1; ++index2) + { + for (int index3 = sectionY1 - fluff; index3 < sectionY1 + 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; + for (int index4 = sectionX - fluff; index4 < sectionX + fluff + 1; ++index4) + { + for (int sectionY2 = sectionY1 - fluff; sectionY2 < sectionY1 + fluff + 1; ++sectionY2) + { + if (index4 >= 0 && index4 < Main.maxSectionsX && sectionY2 >= 0 && sectionY2 < Main.maxSectionsY && !Netplay.Clients[index1].TileSections[index4, sectionY2]) + { + NetMessage.SendSection(index1, index4, sectionY2); + NetMessage.SendData(11, index1, number: index4, number2: ((float) sectionY2), number3: ((float) index4), number4: ((float) sectionY2)); + } + } + } + } + + 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.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 ServerReadCallBack(object state, int length) + { + if (!Netplay.disconnect) + { + int streamLength = length; + if (streamLength == 0) + this.PendingTermination = true; + else if (Main.ignoreErrors) + { + try + { + NetMessage.ReceiveBytes(this.ReadBuffer, streamLength, this.Id); + } + catch + { + } + } + else + NetMessage.ReceiveBytes(this.ReadBuffer, streamLength, this.Id); + } + this.IsReading = false; + } + } +} diff --git a/RemoteServer.cs b/RemoteServer.cs new file mode 100644 index 0000000..73b1c7e --- /dev/null +++ b/RemoteServer.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RemoteServer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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..6b58c98 --- /dev/null +++ b/ResolutionChangeEvent.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ResolutionChangeEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Server/Game.cs b/Server/Game.cs new file mode 100644 index 0000000..9c0fd46 --- /dev/null +++ b/Server/Game.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Server.Game +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Sign.cs b/Sign.cs new file mode 100644 index 0000000..15567b6 --- /dev/null +++ b/Sign.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Sign +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..4dcb3a5 --- /dev/null +++ b/Social/Base/AchievementsSocialModule.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.AchievementsSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5c13c5f --- /dev/null +++ b/Social/Base/CloudSocialModule.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.CloudSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..c17cadd --- /dev/null +++ b/Social/Base/FriendsSocialModule.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.FriendsSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..6aa1380 --- /dev/null +++ b/Social/Base/NetSocialModule.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.NetSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..6e3aed3 --- /dev/null +++ b/Social/Base/OverlaySocialModule.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.OverlaySocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/ISocialModule.cs b/Social/ISocialModule.cs new file mode 100644 index 0000000..6f12236 --- /dev/null +++ b/Social/ISocialModule.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.ISocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0196ad8 --- /dev/null +++ b/Social/SocialAPI.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.SocialAPI +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Social.Steam; + +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; + 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(); + if (SocialAPI.Mode == SocialMode.Steam) + SocialAPI.LoadSteam(); + 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 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(); + } + } +} diff --git a/Social/SocialMode.cs b/Social/SocialMode.cs new file mode 100644 index 0000000..cdb53e0 --- /dev/null +++ b/Social/SocialMode.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.SocialMode +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social +{ + public enum SocialMode + { + None, + Steam, + } +} diff --git a/Social/Steam/AchievementsSocialModule.cs b/Social/Steam/AchievementsSocialModule.cs new file mode 100644 index 0000000..073b477 --- /dev/null +++ b/Social/Steam/AchievementsSocialModule.cs @@ -0,0 +1,108 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.AchievementsSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..3747421 --- /dev/null +++ b/Social/Steam/CloudSocialModule.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.CloudSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..a250597 --- /dev/null +++ b/Social/Steam/CoreSocialModule.cs @@ -0,0 +1,98 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.CoreSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +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; + ThreadPool.QueueUserWorkItem(new WaitCallback(this.SteamCallbackLoop), (object) null); + ThreadPool.QueueUserWorkItem(new WaitCallback(this.SteamTickLoop), (object) null); + Main.OnTick += new Action(this.PulseSteamTick); + Main.OnTick += new Action(this.PulseSteamCallback); + } + } + + 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..32626bf --- /dev/null +++ b/Social/Steam/FriendsSocialModule.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.FriendsSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..da0f75d --- /dev/null +++ b/Social/Steam/Lobby.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.Lobby +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..6fc54c2 --- /dev/null +++ b/Social/Steam/LobbyState.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.LobbyState +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..16f394c --- /dev/null +++ b/Social/Steam/NetClientSocialModule.cs @@ -0,0 +1,227 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetClientSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +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; + CSteamID lobbySteamId = new CSteamID(result); + 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"); + // ISSUE: method pointer + this._lobby.Join(lobbySteamId, new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyEntered))); + })); + } + + public override void LaunchLocalServer(Process process, ServerMode mode) + { + 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) + { + if (this._lobby.State != LobbyState.Inactive) + this._lobby.Leave(); + string friendName = SteamFriends.GetFriendPersonaName((CSteamID) result.m_steamIDFriend); + 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) + { + 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) + { + 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) => this.Close((CSteamID) result.m_steamIDRemote); + + private void OnP2PSessionRequest(P2PSessionRequest_t result) + { + 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..5c9fc50 --- /dev/null +++ b/Social/Steam/NetServerSocialModule.cs @@ -0,0 +1,197 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetServerSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1737bc5 --- /dev/null +++ b/Social/Steam/NetSocialModule.cs @@ -0,0 +1,126 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetSocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..74a3031 --- /dev/null +++ b/Social/Steam/OverlaySocialModule.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.OverlaySocialModule +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..24b2ea4 --- /dev/null +++ b/Social/Steam/SteamP2PReader.cs @@ -0,0 +1,121 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.SteamP2PReader +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..b09fb78 --- /dev/null +++ b/Social/Steam/SteamP2PWriter.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.SteamP2PWriter +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/Star.cs b/Star.cs new file mode 100644 index 0000000..a8d0e35 --- /dev/null +++ b/Star.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Star +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +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 static void SpawnStars() + { + Main.numStars = Main.rand.Next(65, 130); + Main.numStars = 130; + for (int index = 0; index < Main.numStars; ++index) + { + Main.star[index] = new Star(); + Main.star[index].position.X = (float) Main.rand.Next(-12, Main.screenWidth + 1); + Main.star[index].position.Y = (float) Main.rand.Next(-12, Main.screenHeight); + Main.star[index].rotation = (float) Main.rand.Next(628) * 0.01f; + Main.star[index].scale = (float) Main.rand.Next(50, 120) * 0.01f; + Main.star[index].type = Main.rand.Next(0, 5); + Main.star[index].twinkle = (float) Main.rand.Next(101) * 0.01f; + Main.star[index].twinkleSpeed = (float) Main.rand.Next(40, 100) * 0.0001f; + if (Main.rand.Next(2) == 0) + Main.star[index].twinkleSpeed *= -1f; + Main.star[index].rotationSpeed = (float) Main.rand.Next(10, 40) * 0.0001f; + if (Main.rand.Next(2) == 0) + Main.star[index].rotationSpeed *= -1f; + } + } + + public static void UpdateStars() + { + for (int index = 0; index < Main.numStars; ++index) + { + Main.star[index].twinkle += Main.star[index].twinkleSpeed; + if ((double) Main.star[index].twinkle > 1.0) + { + Main.star[index].twinkle = 1f; + Main.star[index].twinkleSpeed *= -1f; + } + else if ((double) Main.star[index].twinkle < 0.5) + { + Main.star[index].twinkle = 0.5f; + Main.star[index].twinkleSpeed *= -1f; + } + Main.star[index].rotation += Main.star[index].rotationSpeed; + if ((double) Main.star[index].rotation > 6.28) + Main.star[index].rotation -= 6.28f; + if ((double) Main.star[index].rotation < 0.0) + Main.star[index].rotation += 6.28f; + } + } + } +} diff --git a/StrayMethods.cs b/StrayMethods.cs new file mode 100644 index 0000000..6c39724 --- /dev/null +++ b/StrayMethods.cs @@ -0,0 +1,162 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.StrayMethods +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..1bc7419 --- /dev/null +++ b/Terraria.csproj @@ -0,0 +1,553 @@ + + + + + Debug + AnyCPU + {2FFF7069-8A42-4F3C-9377-F5A328E80234} + WinExe + Terraria + v4.0 + Client + 1.3.5.3 + 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..cc88b1a Binary files /dev/null and b/Terraria.pdb differ diff --git a/Terraria.sln b/Terraria.sln new file mode 100644 index 0000000..15676bf --- /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", "{2FFF7069-8A42-4F3C-9377-F5A328E80234}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2FFF7069-8A42-4F3C-9377-F5A328E80234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FFF7069-8A42-4F3C-9377-F5A328E80234}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FFF7069-8A42-4F3C-9377-F5A328E80234}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FFF7069-8A42-4F3C-9377-F5A328E80234}.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..957be2c --- /dev/null +++ b/TestHighFPSIssues.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TestHighFPSIssues +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 = 0; + private static int conUH = 0; + private static int conD = 0; + private static int conDH = 0; + private static int race = 0; + + 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/TexturePackSupport.cs b/TexturePackSupport.cs new file mode 100644 index 0000000..8157568 --- /dev/null +++ b/TexturePackSupport.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TexturePackSupport +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Ionic.Zip; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; + +namespace Terraria +{ + public class TexturePackSupport + { + public static bool Enabled = false; + public static int ReplacedTextures = 0; + private static ZipFile texturePack; + private static Dictionary entries = new Dictionary(); + private static Stopwatch test = new Stopwatch(); + + public static bool FetchTexture(string path, out Texture2D tex) + { + ZipEntry zipEntry; + if (TexturePackSupport.entries.TryGetValue(path, out zipEntry)) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + zipEntry.Extract((Stream) memoryStream); + tex = TexturePackSupport.FromStreamSlow(Main.instance.GraphicsDevice, (Stream) memoryStream); + ++TexturePackSupport.ReplacedTextures; + return true; + } + } + else + { + tex = (Texture2D) null; + return false; + } + } + + public static Texture2D FromStreamSlow(GraphicsDevice graphicsDevice, Stream stream) + { + Texture2D texture2D = Texture2D.FromStream(graphicsDevice, stream); + Color[] data = new Color[texture2D.Width * texture2D.Height]; + texture2D.GetData(data); + for (int index = 0; index != data.Length; ++index) + data[index] = Color.FromNonPremultiplied(data[index].ToVector4()); + texture2D.SetData(data); + return texture2D; + } + + public static void FindTexturePack() + { + string path = Main.SavePath + "/Texture Pack.zip"; + if (!File.Exists(path)) + return; + TexturePackSupport.entries.Clear(); + TexturePackSupport.texturePack = ZipFile.Read((Stream) File.OpenRead(path)); + foreach (ZipEntry entry in (IEnumerable) TexturePackSupport.texturePack.Entries) + TexturePackSupport.entries.Add(entry.FileName.Replace("/", "\\"), entry); + } + } +} diff --git a/Tile.cs b/Tile.cs new file mode 100644 index 0000000..2d0a434 --- /dev/null +++ b/Tile.cs @@ -0,0 +1,433 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Tile +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria +{ + public class Tile + { + public ushort type; + public byte 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 = (byte) 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 = (byte) 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 = (byte) 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); + } + + 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 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) + { + if (wallColor > (byte) 30) + wallColor = (byte) 30; + 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) + { + if (color > (byte) 30) + color = (byte) 30; + 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 static void SmoothSlope(int x, int y, bool applyToNeighbors = true) + { + if (applyToNeighbors) + { + Tile.SmoothSlope(x + 1, y, false); + Tile.SmoothSlope(x - 1, y, false); + Tile.SmoothSlope(x, y + 1, false); + Tile.SmoothSlope(x, y - 1, false); + } + Tile tile = Main.tile[x, y]; + if (!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); + switch ((flag1 ? 1 : 0) << 3 | (flag3 ? 1 : 0) << 2 | (flag4 ? 1 : 0) << 1 | (flag5 ? 1 : 0)) + { + 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) + break; + tile.halfBrick(false); + tile.slope((byte) 4); + break; + case 10: + if (flag2) + break; + tile.halfBrick(false); + tile.slope((byte) 3); + break; + default: + tile.halfBrick(false); + tile.slope((byte) 0); + break; + } + } + + 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..fb2589d --- /dev/null +++ b/TileChangeReceivedEvent.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TileChangeReceivedEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..4bfef38 --- /dev/null +++ b/TileObject.cs @@ -0,0 +1,711 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TileObject +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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) == 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() && Main.tileCut[(int) tileSafely.type]) + WorldGen.KillTile(xCoord + index1, 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]) + 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() && num22 >= 0 && num22 <= 7 || num22 >= 12 && num22 <= 16 || num22 >= 25 && num22 <= 26) + 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 && tileSafely1.type == (ushort) 5) + { + flag7 = true; + if (index == 0) + { + ++num20; + Tile tileSafely2 = Framing.GetTileSafely(num7 + width, num8 + num25 - 1); + if (tileSafely2.nactive() && tileSafely2.type == (ushort) 5) + { + ++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() && tileSafely3.type == (ushort) 5) + { + ++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 && tileSafely4.type == (ushort) 5) + { + flag8 = true; + if (index == 0) + { + ++num20; + Tile tileSafely5 = Framing.GetTileSafely(num7 + num26, num8 + num27 - 1); + if (tileSafely5.nactive() && tileSafely5.type == (ushort) 5) + { + ++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() && tileSafely6.type == (ushort) 5) + { + ++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.HookCheck.hook != null) + { + if (tileData2.HookCheck.processedCoordinates) + { + Point16 origin1 = tileData2.Origin; + Point16 origin2 = tileData2.Origin; + } + if (tileData2.HookCheck.hook(x, y, type, style, dir) == tileData2.HookCheck.badReturn && tileData2.HookCheck.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 = Main.tileTexture[(int) op.Type]; + 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; + if (tileData.StyleWrapLimit > 0) + { + num1 = placementStyle / tileData.StyleWrapLimit * tileData.StyleLineSkip; + placementStyle %= tileData.StyleWrapLimit; + } + int num2; + int num3; + if (tileData.StyleHorizontal) + { + num2 = tileData.CoordinateFullWidth * placementStyle; + num3 = tileData.CoordinateFullHeight * num1; + } + else + { + num2 = tileData.CoordinateFullWidth * num1; + num3 = tileData.CoordinateFullHeight * placementStyle; + } + for (int x1 = 0; x1 < (int) op.Size.X; ++x1) + { + int x2 = num2 + (x1 - (int) op.ObjectStart.X) * (tileData.CoordinateWidth + tileData.CoordinatePadding); + int y1 = num3; + for (int y2 = 0; y2 < (int) op.Size.Y; ++y2) + { + int i = (int) coordinates.X + x1; + int num4 = (int) coordinates.Y + y2; + if (y2 == 0 && tileData.DrawStepDown != 0 && WorldGen.SolidTile(Framing.GetTileSafely(i, num4 - 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 && x1 % 2 == 1) + effects |= SpriteEffects.FlipHorizontally; + if (tileData.DrawFlipVertical && y2 % 2 == 1) + 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)), (float) (num4 * 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..22381df --- /dev/null +++ b/TimeLogger.cs @@ -0,0 +1,306 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TimeLogger +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/AchievementCompleteUI.cs b/UI/AchievementCompleteUI.cs new file mode 100644 index 0000000..0566f65 --- /dev/null +++ b/UI/AchievementCompleteUI.cs @@ -0,0 +1,155 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.AchievementCompleteUI +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; + +namespace Terraria.UI +{ + public class AchievementCompleteUI + { + private static Texture2D AchievementsTexture; + private static Texture2D AchievementsTextureBorder; + private static List caches = new List(); + + public static void LoadContent() + { + AchievementCompleteUI.AchievementsTexture = TextureManager.Load("Images/UI/Achievements"); + AchievementCompleteUI.AchievementsTextureBorder = TextureManager.Load("Images/UI/Achievement_Borders"); + } + + public static void Initialize() => Main.Achievements.OnAchievementCompleted += new Achievement.AchievementCompleted(AchievementCompleteUI.AddCompleted); + + public static void Draw(SpriteBatch sb) + { + float y = (float) (Main.screenHeight - 40); + if (PlayerInput.UsingGamepad) + y -= 25f; + Vector2 center = new Vector2((float) (Main.screenWidth / 2), y); + foreach (AchievementCompleteUI.DrawCache cach in AchievementCompleteUI.caches) + { + AchievementCompleteUI.DrawAchievement(sb, ref center, cach); + if ((double) center.Y < -100.0) + break; + } + } + + public static void AddCompleted(Achievement achievement) + { + if (Main.netMode == 2) + return; + AchievementCompleteUI.caches.Add(new AchievementCompleteUI.DrawCache(achievement)); + } + + public static void Clear() => AchievementCompleteUI.caches.Clear(); + + public static void Update() + { + foreach (AchievementCompleteUI.DrawCache cach in AchievementCompleteUI.caches) + cach.Update(); + for (int index = 0; index < AchievementCompleteUI.caches.Count; ++index) + { + if (AchievementCompleteUI.caches[index].TimeLeft == 0) + { + AchievementCompleteUI.caches.Remove(AchievementCompleteUI.caches[index]); + --index; + } + } + } + + private static void DrawAchievement( + SpriteBatch sb, + ref Vector2 center, + AchievementCompleteUI.DrawCache ach) + { + float alpha = ach.Alpha; + if ((double) alpha > 0.0) + { + string title = ach.Title; + Vector2 center1 = center; + Vector2 vector2 = Main.fontItemStack.MeasureString(title); + float num1 = ach.Scale * 1.1f; + Vector2 size = (vector2 + new Vector2(58f, 10f)) * num1; + Rectangle rectangle = Utils.CenteredRectangle(center1, 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; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor / 5, (int) Main.mouseTextColor); + Vector2 position = rectangle.Right() - Vector2.UnitX * num1 * (float) (12.0 + (double) scale * (double) ach.Frame.Width); + sb.Draw(AchievementCompleteUI.AchievementsTexture, position, new Rectangle?(ach.Frame), Color.White * alpha, 0.0f, new Vector2(0.0f, (float) (ach.Frame.Height / 2)), scale, SpriteEffects.None, 0.0f); + sb.Draw(AchievementCompleteUI.AchievementsTextureBorder, position, new Rectangle?(), Color.White * alpha, 0.0f, new Vector2(0.0f, (float) (ach.Frame.Height / 2)), scale, SpriteEffects.None, 0.0f); + Utils.DrawBorderString(sb, title, position - Vector2.UnitX * 10f, color * alpha, num1 * 0.9f, 1f, 0.4f); + if (num2 != 0 && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + IngameFancyUI.OpenAchievementsAndGoto(ach.theAchievement); + ach.TimeLeft = 0; + } + } + } + ach.ApplyHeight(ref center); + } + + public class DrawCache + { + public Achievement theAchievement; + private const int _iconSize = 64; + private const int _iconSizeWithSpace = 66; + private const int _iconsPerRow = 8; + public int IconIndex; + public Rectangle Frame; + public string Title; + public int TimeLeft; + + public void Update() + { + --this.TimeLeft; + if (this.TimeLeft >= 0) + return; + this.TimeLeft = 0; + } + + public DrawCache(Achievement achievement) + { + this.theAchievement = achievement; + this.Title = achievement.FriendlyName.Value; + int iconIndex = Main.Achievements.GetIconIndex(achievement.Name); + this.IconIndex = iconIndex; + this.Frame = new Rectangle(iconIndex % 8 * 66, iconIndex / 8 * 66, 64, 64); + this.TimeLeft = 300; + } + + public float Scale + { + get + { + if (this.TimeLeft < 30) + return MathHelper.Lerp(0.0f, 1f, (float) this.TimeLeft / 30f); + return this.TimeLeft > 285 ? MathHelper.Lerp(1f, 0.0f, (float) (((double) this.TimeLeft - 285.0) / 15.0)) : 1f; + } + } + + public float Alpha + { + get + { + float scale = this.Scale; + return (double) scale <= 0.5 ? 0.0f : (float) (((double) scale - 0.5) / 0.5); + } + } + + public void ApplyHeight(ref Vector2 v) => v.Y -= 50f * this.Alpha; + } + } +} diff --git a/UI/CalculatedStyle.cs b/UI/CalculatedStyle.cs new file mode 100644 index 0000000..f682465 --- /dev/null +++ b/UI/CalculatedStyle.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.CalculatedStyle +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..793cd98 --- /dev/null +++ b/UI/Chat/ChatLine.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.ChatLine +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 text = ""; + public TextSnippet[] parsedText = new TextSnippet[0]; + } +} diff --git a/UI/Chat/ChatManager.cs b/UI/Chat/ChatManager.cs new file mode 100644 index 0000000..1d71a2e --- /dev/null +++ b/UI/Chat/ChatManager.cs @@ -0,0 +1,402 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.ChatManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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) + { + 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 + { + 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) + vector2_1.X += x * baseScale.X * scale; + if ((double) maxWidth > 0.0) + { + float num3 = font.MeasureString(strArray2[index2]).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[index2], vector2_1, color, rotation, origin, baseScale * snippet.Scale * scale, SpriteEffects.None, 0.0f); + Vector2 vector2_3 = font.MeasureString(strArray2[index2]); + 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) + { + 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; + } + } + } + } + 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 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, Color.Black, 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})(\\/(?[^:]+))?:(?.+?)(? 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; + } +} diff --git a/UI/ChestUI.cs b/UI/ChestUI.cs new file mode 100644 index 0000000..f71cf4d --- /dev/null +++ b/UI/ChestUI.cs @@ -0,0 +1,1085 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ChestUI +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GameInput; +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]) + Main.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 if (Main.tile[player.chestX, player.chestY].type == (ushort) 21) + text = Lang.chestType[(int) Main.tile[player.chestX, player.chestY].frameX / 36].Value; + else if (Main.tile[player.chestX, player.chestY].type == (ushort) 467) + text = Lang.chestType2[(int) Main.tile[player.chestX, player.chestY].frameX / 36].Value; + else if (Main.tile[player.chestX, player.chestY].type == (ushort) 88) + text = Lang.dresserType[(int) Main.tile[player.chestX, player.chestY].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); + 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, Main.fontMouseText, 200, 1, out lineAmount); + ++lineAmount; + for (int index = 0; index < lineAmount; ++index) + ChatManager.DrawColorCodedStringWithShadow(spritebatch, Main.fontMouseText, 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 + { + Y += ID * 26; + float num = 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; + } + Vector2 vector2_1 = Main.fontMouseText.MeasureString(text); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor) * num; + 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) num / 2.0); + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, Main.fontMouseText, text, new Vector2((float) X, (float) Y), baseColor, 0.0f, vector2_1 / 2f, new Vector2(num), spread: 1.5f); + Vector2 vector2_2 = vector2_1 * num; + switch (ID) + { + case 0: + UILinkPointNavigator.SetPosition(500, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num / 2.0 * 0.800000011920929), (float) Y)); + break; + case 1: + UILinkPointNavigator.SetPosition(501, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num / 2.0 * 0.800000011920929), (float) Y)); + break; + case 2: + UILinkPointNavigator.SetPosition(502, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num / 2.0 * 0.800000011920929), (float) Y)); + break; + case 3: + UILinkPointNavigator.SetPosition(503, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num / 2.0 * 0.800000011920929), (float) Y)); + break; + case 4: + UILinkPointNavigator.SetPosition(505, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num / 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; + } + if (!Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) X - vector2_2.X / 2f, (float) Y - vector2_2.Y / 2f, vector2_2.X, vector2_2.Y)) + { + 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; + } + Recipe.FindRecipes(); + } + } + } + + 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; + } + 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) Main.inventoryBackTexture.Width * Main.inventoryScale, (float) Main.inventoryBackTexture.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() + { + 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]); + 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]); + } + } + } + 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]); + } + } + } + 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]); + } + } + } + } + + 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 + 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; + Main.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; + Main.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; + Main.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.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; + Main.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) + { + Main.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) + { + Main.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) + { + Main.PlaySound(7); + player.bank3.item[index5] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + else + { + for (int index6 = 0; index6 < 40; ++index6) + { + if (player.bank.item[index6].stack == 0) + { + Main.PlaySound(7); + player.bank.item[index6] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + } + } + } + } + + public static void QuickStack() + { + Player player = Main.player[Main.myPlayer]; + 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; + 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].maxStack > 1 && (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 = 0; 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; + Main.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; + foreach (KeyValuePair keyValuePair in dictionary) + { + if (keyValuePair.Value == netId && inventory[keyValuePair.Key].netID == netId || flag && inventory[keyValuePair.Key].stack > 0) + { + Main.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) + { + Main.PlaySound(12); + Main.editChest = false; + int chest = player.chest; + 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() + { + Main.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; + 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; + Main.PlaySound(7); + } + + public static void MoveCoins(Item[] pInv, Item[] cInv) + { + int[] numArray1 = new int[4]; + List intList1 = new List(); + List intList2 = new List(); + bool flag = 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(); + flag = true; + } + } + } + if (!flag) + return; + Main.PlaySound(7); + 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) + { + 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; + } + if (numArray1[index9] == 0) + --index9; + intList1.RemoveAt(0); + } + } + + public static bool TryPlacingInChest(Item I, bool justCheck) + { + bool flag1 = false; + Player player = Main.player[Main.myPlayer]; + 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; + bool flag2 = false; + if (I.maxStack > 1) + { + for (int index = 0; index < 40; ++index) + { + if (objArray[index].stack < objArray[index].maxStack && I.IsTheSameAs(objArray[index])) + { + int num = I.stack; + if (I.stack + objArray[index].stack > objArray[index].maxStack) + num = objArray[index].maxStack - objArray[index].stack; + if (justCheck) + { + flag2 = flag2 || num > 0; + break; + } + I.stack -= num; + objArray[index].stack += num; + Main.PlaySound(7); + if (I.stack <= 0) + { + I.SetDefaults(); + if (flag1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + if (objArray[index].type == 0) + { + objArray[index] = I.Clone(); + I.SetDefaults(); + } + if (flag1) + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + } + } + } + if (I.stack > 0) + { + for (int index = 0; index < 40; ++index) + { + if (objArray[index].stack == 0) + { + if (justCheck) + { + flag2 = true; + break; + } + Main.PlaySound(7); + objArray[index] = I.Clone(); + I.SetDefaults(); + if (flag1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + } + } + return flag2; + } + + 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; + 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; + Main.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; + } + Main.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 Count = 7; + } + } +} diff --git a/UI/GameInterfaceDrawMethod.cs b/UI/GameInterfaceDrawMethod.cs new file mode 100644 index 0000000..5575de4 --- /dev/null +++ b/UI/GameInterfaceDrawMethod.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.GameInterfaceDrawMethod +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5d24666 --- /dev/null +++ b/UI/GameInterfaceLayer.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.GameInterfaceLayer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, transformMatrix); + int num = this.DrawSelf() ? 1 : 0; + Main.spriteBatch.End(); + return num != 0; + } + + protected virtual bool DrawSelf() => true; + } +} diff --git a/UI/Gamepad/GamepadMainMenuHandler.cs b/UI/Gamepad/GamepadMainMenuHandler.cs new file mode 100644 index 0000000..04c6041 --- /dev/null +++ b/UI/Gamepad/GamepadMainMenuHandler.cs @@ -0,0 +1,88 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadMainMenuHandler +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.GlobalTime * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTime * 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) + { + if (index == 0 && lastMainMenu != GamepadMainMenuHandler.LastMainMenu && PlayerInput.UsingGamepad && Main.InvisibleCursorForGamepad) + { + Main.mouseX = PlayerInput.MouseX = (int) GamepadMainMenuHandler.MenuItemPositions[index].X; + Main.mouseY = PlayerInput.MouseY = (int) GamepadMainMenuHandler.MenuItemPositions[index].Y; + Main.menuFocus = -1; + } + UILinkPoint link = page.LinkMap[2000 + index]; + link.Position = GamepadMainMenuHandler.MenuItemPositions[index]; + 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..a42b31e --- /dev/null +++ b/UI/Gamepad/GamepadPageID.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadPageID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 CraftBig = 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 MainMenu = 1000; + public const int IngameOptionsLeft = 1001; + public const int IngameOptionsRight = 1002; + public const int NPCChat = 1003; + public const int FancyUI = 1004; + } +} diff --git a/UI/Gamepad/GamepadPointID.cs b/UI/Gamepad/GamepadPointID.cs new file mode 100644 index 0000000..7597a05 --- /dev/null +++ b/UI/Gamepad/GamepadPointID.cs @@ -0,0 +1,219 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadPointID +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 NPCHousing0 = 600; + public const int CraftsBig = 700; + public const int CraftsSmall = 1500; + public const int PVP0 = 1550; + 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 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 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 IngameOptionsLeft0 = 2900; + public const int IngameOptionsRight0 = 2930; + public const int FancyUI0 = 3000; + public const int BuilderAccs = 4000; + public const int BuffsForEquips = 9000; + } +} diff --git a/UI/Gamepad/UILinkPage.cs b/UI/Gamepad/UILinkPage.cs new file mode 100644 index 0000000..c044b87 --- /dev/null +++ b/UI/Gamepad/UILinkPage.cs @@ -0,0 +1,102 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPage +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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() => UILinkPointNavigator.ChangePage(this.PageOnLeft); + + public void SwapPageRight() => 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..a3dedcf --- /dev/null +++ b/UI/Gamepad/UILinkPoint.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPoint +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..03df5e6 --- /dev/null +++ b/UI/Gamepad/UILinkPointNavigator.cs @@ -0,0 +1,315 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPointNavigator +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 = 0; + private static int YCooldown = 0; + private static Vector2 LastInput; + private static int PageLeftCD = 0; + private static int PageRightCD = 0; + 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) + { + 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.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 (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.LockTileUseButton = 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(); + bool flag3 = PlayerInput.Triggers.Current.HotbarMinus && !PlayerInput.Triggers.Current.HotbarPlus; + int num1 = !PlayerInput.Triggers.Current.HotbarPlus ? 0 : (!PlayerInput.Triggers.Current.HotbarMinus ? 1 : 0); + if (!flag3) + UILinkPointNavigator.PageLeftCD = 0; + if (num1 == 0) + UILinkPointNavigator.PageRightCD = 0; + bool flag4 = flag3 && UILinkPointNavigator.PageLeftCD == 0; + int num2 = num1 == 0 ? 0 : (UILinkPointNavigator.PageRightCD == 0 ? 1 : 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 (flag4) + UILinkPointNavigator.PageLeftCD = 16; + if (num2 != 0) + 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)) + 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 (flag4) + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].SwapPageLeft(); + if (num2 != 0) + 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 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; + 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 = -1; + 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 int INGAMEOPTIONS_BUTTONS_LEFT = 0; + public static int INGAMEOPTIONS_BUTTONS_RIGHT = 0; + public static int OPTIONS_BUTTON_SPECIALFEATURE = 0; + public static int BackButtonCommand = 0; + public static bool BackButtonInUse = false; + public static bool BackButtonLock = false; + 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/IngameFancyUI.cs b/UI/IngameFancyUI.cs new file mode 100644 index 0000000..6bc1367 --- /dev/null +++ b/UI/IngameFancyUI.cs @@ -0,0 +1,167 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.IngameFancyUI +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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; + Main.InGameUI.SetState((UIState) Main.AchievementsMenu); + } + + public static void OpenAchievementsAndGoto(Achievement achievement) + { + IngameFancyUI.OpenAchievements(); + Main.AchievementsMenu.GotoAchievement(achievement); + } + + public static void OpenKeybinds() + { + IngameFancyUI.CoverNextFrame(); + Main.playerInventory = false; + Main.editChest = false; + Main.npcChatText = ""; + Main.inFancyUI = true; + Main.InGameUI.SetState((UIState) Main.ManageControlsMenu); + } + + public static bool CanShowVirtualKeyboard(int context) => UIVirtualKeyboard.CanDisplay(context); + + public static void OpenVirtualKeyboard(int keyboardContext) + { + IngameFancyUI.CoverNextFrame(); + Main.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; + if (Main.tile[player.chestX, player.chestY].type == (ushort) 21) + Main.defaultChestName = Lang.chestType[(int) Main.tile[player.chestX, player.chestY].frameX / 36].Value; + if (Main.tile[player.chestX, player.chestY].type == (ushort) 467) + Main.defaultChestName = Lang.chestType2[(int) Main.tile[player.chestX, player.chestY].frameX / 36].Value; + if (Main.tile[player.chestX, player.chestY].type == (ushort) 88) + Main.defaultChestName = Lang.dresserType[(int) Main.tile[player.chestX, player.chestY].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; + Main.PlaySound(11); + if (!Main.gameMenu && (!(Main.InGameUI.CurrentState is UIVirtualKeyboard) || UIVirtualKeyboard.KeyboardContext == 2)) + Main.playerInventory = true; + Main.InGameUI.SetState((UIState) null); + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 0; + } + + public static bool Draw(SpriteBatch spriteBatch, GameTime gameTime) + { + if (!Main.gameMenu && Main.player[Main.myPlayer].dead && !Main.player[Main.myPlayer].ghost) + { + IngameFancyUI.Close(); + Main.playerInventory = false; + return false; + } + 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..5cebbee --- /dev/null +++ b/UI/InterfaceScaleType.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.InterfaceScaleType +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..ef8c996 --- /dev/null +++ b/UI/ItemSlot.cs @@ -0,0 +1,2204 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemSlot +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Achievements; +using Terraria.GameContent.UI; +using Terraria.GameContent.UI.Chat; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.UI.Chat; +using Terraria.UI.Gamepad; + +namespace Terraria.UI +{ + public class ItemSlot + { + public static bool ShiftForcedOn = false; + private static Item[] singleSlotArray = new Item[1]; + private static bool[] canFavoriteAt = new bool[23]; + 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 = 0; + private static int accSlotCount = 0; + public static float CircularRadialOpacity = 0.0f; + public static float QuicksRadialOpacity = 0.0f; + + static ItemSlot() + { + ItemSlot.canFavoriteAt[0] = true; + ItemSlot.canFavoriteAt[1] = true; + ItemSlot.canFavoriteAt[2] = true; + } + + public static bool ShiftInUse => Main.keyState.PressingShift() || ItemSlot.ShiftForcedOn; + + public static void SetGlow(int index, float hue, bool chest) + { + if (chest) + { + 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); + if (Main.mouseLeftRelease && Main.mouseLeft) + { + ItemSlot.LeftClick(inv, context, slot); + Recipe.FindRecipes(); + } + else + ItemSlot.RightClick(inv, context, slot); + ItemSlot.MouseHover(inv, context, slot); + } + + public static void OverrideHover(Item[] inv, int context = 0, int slot = 0) + { + Item obj = inv[slot]; + if (ItemSlot.ShiftInUse && obj.type > 0 && obj.stack > 0 && !inv[slot].favorited) + { + switch (context) + { + case 0: + case 1: + case 2: + if (Main.npcShop > 0 && !obj.favorited) + { + Main.cursorOverride = 10; + 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)) + { + Main.cursorOverride = 8; + break; + } + break; + case 5: + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 18: + case 19: + case 20: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot])) + { + Main.cursorOverride = 7; + break; + } + break; + } + } + if (!Main.keyState.IsKeyDown(Main.FavoriteKey) || !ItemSlot.canFavoriteAt[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) + { + Item I = inv[slot]; + switch (Main.cursorOverride) + { + case 2: + if (ChatManager.AddChatText(Main.fontMouseText, ItemTagHandler.GenerateTag(I), Vector2.One)) + Main.PlaySound(12); + return true; + case 3: + if (!ItemSlot.canFavoriteAt[context]) + return false; + I.favorited = !I.favorited; + Main.PlaySound(12); + return true; + case 7: + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], noText: true); + Main.PlaySound(12); + return true; + case 8: + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], noText: true); + if (Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) slot)); + return true; + case 9: + 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) + { + if (ItemSlot.OverrideLeftClick(inv, context, slot)) + return; + inv[slot].newAndShiny = false; + Player player = Main.player[Main.myPlayer]; + bool flag = false; + switch (context) + { + case 0: + case 1: + case 2: + case 3: + case 4: + flag = player.chest == -1; + break; + } + if (ItemSlot.ShiftInUse & flag) + { + ItemSlot.SellOrTrash(inv, context, slot); + } + else + { + if (player.itemAnimation != 0 || player.itemTime != 0) + return; + switch (ItemSlot.PickItemMovementAction(inv, context, slot, Main.mouseItem)) + { + case 0: + if (context == 6 && Main.mouseItem.type != 0) + inv[slot].SetDefaults(); + 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: + 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 num = Main.mouseItem.maxStack - inv[slot].stack; + inv[slot].stack += num; + Main.mouseItem.stack -= num; + } + } + } + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + Main.PlaySound(7); + } + if (context == 3 && Main.netMode == 1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) slot)); + break; + } + break; + case 1: + if (Main.mouseItem.stack == 1 && Main.mouseItem.type > 0 && inv[slot].type > 0 && inv[slot].IsNotTheSameAs(Main.mouseItem)) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + Main.PlaySound(7); + if (inv[slot].stack > 0) + { + if (context != 0) + { + if ((uint) (context - 8) <= 4U || (uint) (context - 16) <= 1U) + { + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + break; + } + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + } + break; + } + 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(); + Main.PlaySound(7); + break; + } + break; + } + if (Main.mouseItem.type > 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(); + Main.PlaySound(7); + } + } + else + { + --Main.mouseItem.stack; + inv[slot].SetDefaults(Main.mouseItem.type); + Recipe.FindRecipes(); + Main.PlaySound(7); + } + if (inv[slot].stack > 0) + { + if (context != 0) + { + if ((uint) (context - 8) <= 4U || (uint) (context - 16) <= 1U) + { + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + break; + } + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + } + 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); + Main.PlaySound(7); + if (inv[slot].stack > 0) + { + if (context != 0) + { + if ((uint) (context - 8) <= 4U || (uint) (context - 16) <= 1U) + { + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + break; + } + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + } + break; + } + 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(); + Main.PlaySound(7); + break; + } + break; + } + 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(); + Main.PlaySound(7); + } + } + else + { + --Main.mouseItem.stack; + inv[slot].SetDefaults(Main.mouseItem.type); + Recipe.FindRecipes(); + Main.PlaySound(7); + } + if (inv[slot].stack > 0) + { + if (context != 0) + { + if ((uint) (context - 8) <= 4U || (uint) (context - 16) <= 1U) + { + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + break; + } + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + } + break; + } + break; + case 3: + Main.mouseItem.netDefaults(inv[slot].netID); + if (inv[slot].buyOnce) + Main.mouseItem.Prefix((int) inv[slot].prefix); + else + Main.mouseItem.Prefix(-1); + Main.mouseItem.position = player.Center - new Vector2((float) Main.mouseItem.width, (float) Main.mouseItem.headSlot) / 2f; + ItemText.NewText(Main.mouseItem, Main.mouseItem.stack); + if (inv[slot].buyOnce && --inv[slot].stack <= 0) + inv[slot].SetDefaults(); + if (inv[slot].value > 0) + { + Main.PlaySound(18); + break; + } + Main.PlaySound(7); + break; + case 4: + Chest chest = Main.instance.shop[Main.npcShop]; + if (player.SellItem(Main.mouseItem.value, Main.mouseItem.stack)) + { + chest.AddShop(Main.mouseItem); + Main.mouseItem.SetDefaults(); + Main.PlaySound(18); + } + else if (Main.mouseItem.value == 0) + { + chest.AddShop(Main.mouseItem); + Main.mouseItem.SetDefaults(); + Main.PlaySound(7); + } + Recipe.FindRecipes(); + break; + } + if ((uint) context <= 2U || context == 5) + return; + inv[slot].favorited = false; + } + } + + 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].value, inv[slot].stack)) + { + chest.AddShop(inv[slot]); + inv[slot].SetDefaults(); + Main.PlaySound(18); + Recipe.FindRecipes(); + } + else + { + if (inv[slot].value != 0) + return; + chest.AddShop(inv[slot]); + inv[slot].SetDefaults(); + Main.PlaySound(7); + Recipe.FindRecipes(); + } + } + else + { + if (inv[slot].favorited || ItemSlot.Options.DisableLeftShiftTrashCan) + return; + Main.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]; + 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) + return Lang.misc[74].Value; + if (ChestUI.TryPlacingInChest(inv[slot], true)) + return Lang.misc[76].Value; + break; + case 3: + case 4: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot])) + 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: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot])) + 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 && !ItemSlot.Options.DisableLeftShiftTrashCan) + 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.type == 0 || checkItem.ammo > 0 || checkItem.bait > 0) && !checkItem.notAmmo || checkItem.type == 530) + { + num = 0; + break; + } + break; + case 3: + num = 0; + break; + case 4: + num = 0; + 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(checkItem, slot)) + { + num = 1; + break; + } + break; + case 11: + if (checkItem.type == 0 || checkItem.accessory && !ItemSlot.AccCheck(checkItem, slot)) + { + num = 1; + break; + } + break; + case 12: + num = 2; + break; + case 15: + if (checkItem.type == 0 && inv[slot].type > 0) + { + if (player.BuyItem(inv[slot].GetStoreValue(), inv[slot].shopSpecialCurrency)) + { + num = 3; + break; + } + 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; + } + 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) + return; + 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)) + { + if (Main.mouseRightRelease) + { + player.OpenBossBag(inv[slot].type); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + Main.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && (inv[slot].type >= 2334 && inv[slot].type <= 2336 || inv[slot].type >= 3203 && inv[slot].type <= 3208)) + { + if (Main.mouseRightRelease) + { + player.openCrate(inv[slot].type); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + Main.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(); + Main.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(); + Main.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(); + Main.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + player.openLockBox(); + 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(); + Main.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)) + { + Main.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 && (inv[slot].type > 0 && inv[slot].stack > 0 || inv[slot - 10].type > 0 && inv[slot - 10].stack > 0)) + { + bool flag2 = true; + 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]); + Main.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: + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + } + else + break; + } + else + break; + } + else + break; + break; + case 12: + flag1 = true; + if (Main.mouseRight && Main.mouseRightRelease && Main.mouseItem.stack < Main.mouseItem.maxStack && Main.mouseItem.type > 0 && inv[slot].type > 0 && Main.mouseItem.type == inv[slot].type) + { + ++Main.mouseItem.stack; + inv[slot].SetDefaults(); + Main.PlaySound(7); + break; + } + break; + case 15: + flag1 = true; + Chest chest = Main.instance.shop[Main.npcShop]; + if (Main.stackSplit <= 1 && Main.mouseRight && inv[slot].type > 0 && (Main.mouseItem.IsTheSameAs(inv[slot]) || Main.mouseItem.type == 0)) + { + int num = Main.superFastStack + 1; + for (int index = 0; index < num; ++index) + { + if ((Main.mouseItem.stack < Main.mouseItem.maxStack || Main.mouseItem.type == 0) && player.BuyItem(inv[slot].GetStoreValue(), inv[slot].shopSpecialCurrency) && inv[slot].stack > 0) + { + if (index == 0) + Main.PlaySound(18); + 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; + } + ++Main.mouseItem.stack; + Main.stackSplit = Main.stackSplit != 0 ? Main.stackDelay : 15; + if (inv[slot].buyOnce && --inv[slot].stack <= 0) + inv[slot].SetDefaults(); + } + } + break; + } + break; + } + if (flag1) + 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 flag3 = true; + if (context == 0 && inv[slot].maxStack <= 1) + flag3 = false; + if (context == 3 && inv[slot].maxStack <= 1) + flag3 = false; + if (context == 4 && inv[slot].maxStack <= 1) + flag3 = false; + if (!flag3 || !Main.mouseItem.IsTheSameAs(inv[slot]) && Main.mouseItem.type != 0 || Main.mouseItem.stack >= Main.mouseItem.maxStack && Main.mouseItem.type != 0) + return; + if (Main.mouseItem.type == 0) + { + Main.mouseItem = inv[slot].Clone(); + Main.mouseItem.stack = 0; + Main.mouseItem.favorited = inv[slot].favorited && inv[slot].maxStack == 1; + } + ++Main.mouseItem.stack; + --inv[slot].stack; + if (inv[slot].stack <= 0) + inv[slot] = new Item(); + Recipe.FindRecipes(); + Main.soundInstanceMenuTick.Stop(); + Main.soundInstanceMenuTick = Main.soundMenuTick.CreateInstance(); + Main.PlaySound(12); + Main.stackSplit = Main.stackSplit != 0 ? Main.stackDelay : 15; + 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; + } + + 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 (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 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; + } + flag1 = UILinkPointNavigator.CurrentPoint == ID; + if (context == 0) + { + num1 = player.DpadRadial.GetDrawMode(slot); + if (num1 > 0 && !PlayerInput.CurrentProfile.UsingDpadHotbar()) + num1 = 0; + } + } + Texture2D texture2D1 = Main.inventoryBackTexture; + 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 = Main.inventoryBack10Texture; + else if (obj.type > 0 && obj.stack > 0 && ItemSlot.Options.HighlightNewItems && obj.newAndShiny && context != 13 && context != 21 && context != 14 && context != 22) + { + texture2D1 = Main.inventoryBack15Texture; + 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 = Main.inventoryBack15Texture; + 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 = Main.inventoryBack9Texture; + else if (context == 10 || context == 8 || context == 16 || context == 17 || context == 19 || context == 18 || context == 20) + texture2D1 = Main.inventoryBack3Texture; + else if (context == 11 || context == 9) + { + texture2D1 = Main.inventoryBack8Texture; + } + else + { + switch (context) + { + case 3: + texture2D1 = Main.inventoryBack5Texture; + break; + case 4: + texture2D1 = Main.inventoryBack2Texture; + break; + case 12: + texture2D1 = Main.inventoryBack12Texture; + break; + default: + if (context == 7 || context == 5) + { + texture2D1 = Main.inventoryBack4Texture; + break; + } + switch (context) + { + case 6: + texture2D1 = Main.inventoryBack7Texture; + break; + case 13: + byte num4 = 200; + if (slot == Main.player[Main.myPlayer].selectedItem) + { + texture2D1 = Main.inventoryBack14Texture; + 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 = Main.inventoryBack6Texture; + break; + case 22: + texture2D1 = Main.inventoryBack4Texture; + break; + } + break; + } + break; + } + } + if (context == 0 && ItemSlot.inventoryGlowTime[slot] > 0 && !inv[slot].favorited) + { + 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 = Main.inventoryBack13Texture; + } + if ((context == 4 || context == 3) && ItemSlot.inventoryGlowTimeChest[slot] > 0 && !inv[slot].favorited) + { + 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 = Main.inventoryBack13Texture; + } + if (flag1) + { + texture2D1 = Main.inventoryBack14Texture; + 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: + 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: + num12 = 11; + break; + case 11: + num12 = 2; + break; + case 12: + 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; + } + if ((obj.type <= 0 || obj.stack <= 0) && num12 != -1) + { + Texture2D texture2D2 = Main.extraTexture[54]; + 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) + { + Texture2D texture2D3 = Main.itemTexture[obj.type]; + 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(Main.wireTexture, 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, Main.fontItemStack, 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, Main.fontItemStack, 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, Main.fontItemStack, 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 - Main.cdTexture.Size() * inventoryScale / 2f; + Color color8 = obj.GetAlpha(color1) * ((float) player.potionDelay / (float) player.potionDelayTime); + spriteBatch.Draw(Main.cdTexture, 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 - Main.cdTexture.Size() * inventoryScale / 2f; + Color white = Color.White; + spriteBatch.Draw(Main.cdTexture, position3, new Rectangle?(), white, 0.0f, new Vector2(), scale2, SpriteEffects.None, 0.0f); + } + } + else if (context == 6) + { + Texture2D trashTexture = Main.trashTexture; + Vector2 position4 = position + texture2D1.Size() * inventoryScale / 2f - trashTexture.Size() * inventoryScale / 2f; + spriteBatch.Draw(trashTexture, 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 inventoryBack = Main.inventoryBack; + int num16 = 0; + if (Main.player[Main.myPlayer].selectedItem == slot) + { + num16 -= 3; + inventoryBack.R = byte.MaxValue; + inventoryBack.B = (byte) 0; + inventoryBack.G = (byte) 210; + inventoryBack.A = (byte) 100; + float num17 = num15 * 1.4f; + } + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, Main.fontItemStack, text, position + new Vector2(6f, (float) (4 + num16)) * inventoryScale, inventoryBack, 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(); + if (context == 8 && slot <= 2) + Main.HoverItem.wornArmor = true; + if (context == 11 || context == 9) + Main.HoverItem.social = true; + if (context != 15) + return; + Main.HoverItem.buy = true; + } + else + { + if (context == 10 || context == 11) + Main.hoverItemName = Lang.inter[9].Value; + if (context == 11) + Main.hoverItemName = Lang.inter[11].Value + " " + Main.hoverItemName; + if (context == 8 || context == 9) + { + if (slot == 0 || slot == 10) + Main.hoverItemName = Lang.inter[12].Value; + if (slot == 1 || slot == 11) + Main.hoverItemName = Lang.inter[13].Value; + if (slot == 2 || slot == 12) + Main.hoverItemName = Lang.inter[14].Value; + if (slot >= 10) + Main.hoverItemName = Lang.inter[11].Value + " " + Main.hoverItemName; + } + if (context == 12) + 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; + } + } + + private static bool AccCheck(Item item, int slot) + { + Player player = Main.player[Main.myPlayer]; + if (slot != -1 && (player.armor[slot].IsTheSameAs(item) || player.armor[slot].wingSlot > (sbyte) 0 && item.wingSlot > (sbyte) 0)) + return false; + for (int index = 0; index < player.armor.Length; ++index) + { + if (slot < 10 && index < 10 && (item.wingSlot > (sbyte) 0 && player.armor[index].wingSlot > (sbyte) 0 || slot >= 10 && index >= 10 && item.wingSlot > (sbyte) 0 && player.armor[index].wingSlot > (sbyte) 0) || item.IsTheSameAs(player.armor[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.accSlotCount = 0; + Main.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 = 5 + Main.player[Main.myPlayer].extraAccessorySlots; + for (int index2 = 3; index2 < 3 + num; ++index2) + { + if (player.armor[index2].type == 0) + { + ItemSlot.accSlotCount = index2 - 3; + break; + } + } + for (int index3 = 0; index3 < player.armor.Length; ++index3) + { + if (item.IsTheSameAs(player.armor[index3])) + ItemSlot.accSlotCount = index3 - 3; + if (index3 < 10 && item.wingSlot > (sbyte) 0 && player.armor[index3].wingSlot > (sbyte) 0) + ItemSlot.accSlotCount = index3 - 3; + } + if (ItemSlot.accSlotCount >= num) + ItemSlot.accSlotCount = 0; + if (ItemSlot.accSlotCount < 0) + ItemSlot.accSlotCount = num - 1; + int index4 = 3 + ItemSlot.accSlotCount; + for (int index5 = 0; index5 < player.armor.Length; ++index5) + { + if (item.IsTheSameAs(player.armor[index5])) + index4 = index5; + } + obj = player.armor[index4].Clone(); + player.armor[index4] = item.Clone(); + ++ItemSlot.accSlotCount; + if (ItemSlot.accSlotCount >= num) + ItemSlot.accSlotCount = 0; + } + Main.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(); + Main.PlaySound(7); + Recipe.FindRecipes(); + success = true; + return obj; + } + + public static void EquipPage(Item item) + { + Main.EquipPage = -1; + 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 static void DrawMoney( + SpriteBatch sb, + string text, + float shopx, + float shopy, + int[] coinsArray, + bool horizontal = false) + { + Utils.DrawBorderStringFourWay(sb, Main.fontMouseText, 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) + { + if (index == 0) + { + int coins = coinsArray[3 - index]; + } + Vector2 position = new Vector2((float) ((double) shopx + (double) ChatManager.GetStringSize(Main.fontMouseText, text, Vector2.One).X + (double) (24 * index) + 45.0), shopy + 50f); + sb.Draw(Main.itemTexture[74 - index], position, new Rectangle?(), Color.White, 0.0f, Main.itemTexture[74 - index].Size() / 2f, 1f, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, Main.fontItemStack, 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) + { + int num = index != 0 || coinsArray[3 - index] <= 99 ? 0 : -6; + sb.Draw(Main.itemTexture[74 - index], new Vector2(shopx + 11f + (float) (24 * index), shopy + 75f), new Rectangle?(), Color.White, 0.0f, Main.itemTexture[74 - index].Size() / 2f, 1f, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, Main.fontItemStack, 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 count = Utils.CoinsCombineStacks(out overFlowing, num1, num2, num3); + if (count <= 0L) + return; + if (num3 > 0L) + sb.Draw(Main.itemTexture[3813], Utils.CenteredRectangle(new Vector2(shopx + 92f, shopy + 45f), Main.itemTexture[3813].Size() * 0.65f), new Rectangle?(), Color.White); + if (num2 > 0L) + sb.Draw(Main.itemTexture[346], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Main.itemTexture[346].Size() * 0.65f), new Rectangle?(), Color.White); + if (num1 > 0L) + sb.Draw(Main.itemTexture[87], Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), Main.itemTexture[87].Size() * 0.65f), new Rectangle?(), Color.White); + ItemSlot.DrawMoney(sb, Lang.inter[66].Value, shopx, shopy, Utils.CoinsSplit(count), horizontal); + } + } + + 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 = Main.hotbarRadialTexture[0]; + 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 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 = Main.hotbarRadialTexture[2]; + 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 = Main.hotbarRadialTexture[1]; + 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 = Main.hotbarRadialTexture[2]; + Texture2D quicksIconTexture = Main.quicksIconTexture; + 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; + 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); + } + for (int index = 0; index < player.QuicksRadial.RadialCount; ++index) + { + Item inv = obj1; + if (index == 1) + inv = obj3; + if (index == 2) + 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(quicksIconTexture, 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 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 > 3930) + 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) + { + 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 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 str1 = ""; + if (inv == null || inv[slot] == null || Main.mouseItem == null) + return str1; + if (context == 0 || context == 1 || context == 2) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + string str2; + if (Main.mouseItem.type > 0) + { + str2 = str1 + 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) + str2 += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + { + if (context == 0 && player.chest == -1) + player.DpadRadial.ChangeBinding(slot); + str2 = str1 + PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].maxStack > 1) + str2 += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + if (inv[slot].maxStack == 1 && ItemSlot.Equippable(inv, context, slot)) + { + str2 += PlayerInput.BuildCommand(Lang.misc[67].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + ItemSlot.SwapEquip(inv, context, slot); + } + str1 = str2 + 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) + str1 += 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) + { + str1 += 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) + str1 += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + { + str1 += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].maxStack > 1) + str1 += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + if (inv[slot].maxStack == 1 && ItemSlot.Equippable(inv, context, slot)) + { + str1 += 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) + str1 += 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) + str1 += PlayerInput.BuildCommand(Lang.misc[91].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + str1 += PlayerInput.BuildCommand(Lang.misc[90].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"], PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else if (Main.mouseItem.type > 0) + str1 += 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)) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else + str1 += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 8 && slot >= 3) + { + bool flag = player.hideVisual[slot]; + str1 += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisual[slot] = !player.hideVisual[slot]; + Main.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]; + str1 += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideMisc[slot] = !player.hideMisc[slot]; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + else + { + if (Main.mouseItem.type > 0 && ItemSlot.Equippable(ref Main.mouseItem, context)) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 8 && slot >= 3) + { + bool flag = player.hideVisual[slot]; + str1 += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisual[slot] = !player.hideVisual[slot]; + Main.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]; + str1 += 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; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + } + switch (context) + { + case 6: + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + str1 += PlayerInput.BuildCommand(Lang.misc[74].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + else + str1 += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else if (Main.mouseItem.type > 0) + str1 += PlayerInput.BuildCommand(Lang.misc[74].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return str1; + case 12: + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + if (Main.mouseItem.dye > (byte) 0) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else + str1 += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 12) + { + 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.hideVisual[slot]; + str1 += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisual[slot] = !player.hideVisual[slot]; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + else + { + bool flag = player.hideMisc[slot]; + str1 += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideMisc[slot] = !player.hideMisc[slot]; + Main.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + } + } + else if (Main.mouseItem.type > 0 && Main.mouseItem.dye > (byte) 0) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return str1; + default: + 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) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else + str1 += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else if (Main.mouseItem.type > 0 & flag) + str1 += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return str1; + } + string overrideInstructions = ItemSlot.GetOverrideInstructions(inv, context, slot); + if ((Main.mouseItem.type <= 0 ? 0 : (context == 0 || context == 1 || context == 2 || context == 6 || context == 15 ? 1 : (context == 7 ? 1 : 0))) != 0 && string.IsNullOrEmpty(overrideInstructions)) + { + str1 += 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) + { + str1 += PlayerInput.BuildCommand(overrideInstructions, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartSelect"]); + if (PlayerInput.Triggers.JustPressed.SmartSelect) + ItemSlot.LeftClick(inv, context, slot); + } + Main.cursorOverride = cursorOverride; + ItemSlot.ShiftForcedOn = false; + } + int num1 = 0; + if (ItemSlot.IsABuildingItem(Main.mouseItem)) + num1 = 1; + if (num1 == 0 && Main.mouseItem.stack <= 0 && context == 0 && ItemSlot.IsABuildingItem(inv[slot])) + num1 = 2; + if (Main.autoPause) + num1 = 0; + if (num1 > 0) + { + Item mouseItem = Main.mouseItem; + if (num1 == 1) + mouseItem = Main.mouseItem; + if (num1 == 2) + mouseItem = inv[slot]; + if (num1 != 1 || player.ItemSpace(mouseItem)) + { + if (mouseItem.damage > 0 && mouseItem.ammo == 0) + str1 += PlayerInput.BuildCommand(Lang.misc[60].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + else if (mouseItem.createTile >= 0 || mouseItem.createWall > 0) + str1 += PlayerInput.BuildCommand(Lang.misc[61].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + else + str1 += PlayerInput.BuildCommand(Lang.misc[63].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + } + if (PlayerInput.Triggers.JustPressed.QuickMount) + PlayerInput.EnterBuildingMode(); + } + return str1; + } + } + + public static bool IsABuildingItem(Item item) => item.type > 0 && item.stack > 0 && item.useStyle > 0 && item.useTime > 0; + + public class Options + { + public static bool DisableLeftShiftTrashCan = false; + 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 Count = 23; + } + } +} diff --git a/UI/ItemSorting.cs b/UI/ItemSorting.cs new file mode 100644 index 0000000..c4c89f1 --- /dev/null +++ b/UI/ItemSorting.cs @@ -0,0 +1,879 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemSorting +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.WeaponsThrown); + 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 < 3930; ++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, + player.thrownDamage + }; + 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); + } + if (!ItemSorting._layerList.Contains(ItemSorting.ItemSortingLayers.WeaponsThrown) && (double) player.thrownDamage == (double) floatList[0]) + { + floatList.RemoveAt(0); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsThrown); + } + } + 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() => 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 > -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)); + } + } + + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsThrown = new ItemSorting.ItemSortingLayer("Weapons - Thrown", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].damage > 0 && (inv[i].ammo == 0 || inv[i].notAmmo) && inv[i].shoot > 0 && inv[i].thrown)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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 == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + 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].rare.CompareTo(inv[x].rare); + 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].rare.CompareTo(inv[x].rare); + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x == y ? 0 : -1; + 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) => inv[y].healLife.CompareTo(inv[x].healLife))); + 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) => inv[y].healMana.CompareTo(inv[x].healMana))); + 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) => inv[y].healLife.CompareTo(inv[x].healLife))); + 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].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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 == y ? 0 : -1; + 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].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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) => ItemID.Sets.SortingPriorityMaterials[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityMaterials[inv[x].netID]))); + 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) => ItemID.Sets.SortingPriorityExtractibles[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityExtractibles[inv[x].netID]))); + 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 == y ? 0 : -1; + 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) => ItemID.Sets.SortingPriorityRopes[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityRopes[inv[x].netID]))); + 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].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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 == y ? 0 : -1; + 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 == y ? 0 : -1; + 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].rare >= 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].rare.CompareTo(inv[x].rare); + 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 == y ? 0 : -1; + 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 == y ? 0 : -1; + return num; + })); + return indexesSortable; + })); + } + } +} diff --git a/UI/ItemTooltip.cs b/UI/ItemTooltip.cs new file mode 100644 index 0000000..b506805 --- /dev/null +++ b/UI/ItemTooltip.cs @@ -0,0 +1,70 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemTooltip +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 List _globalProcessors = new List(); + private string[] _tooltipLines; + private GameCulture _lastCulture; + private 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 (this._lastCulture == Language.ActiveCulture) + return; + this._lastCulture = Language.ActiveCulture; + 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(); + } +} diff --git a/UI/LegacyGameInterfaceLayer.cs b/UI/LegacyGameInterfaceLayer.cs new file mode 100644 index 0000000..0366a87 --- /dev/null +++ b/UI/LegacyGameInterfaceLayer.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.LegacyGameInterfaceLayer +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/SnapPoint.cs b/UI/SnapPoint.cs new file mode 100644 index 0000000..b6d5a37 --- /dev/null +++ b/UI/SnapPoint.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.SnapPoint +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI +{ + public class SnapPoint + { + private Vector2 _anchor; + private Vector2 _offset; + private Vector2 _calculatedPosition; + private string _name; + private int _id; + public UIElement BoundElement; + + public string Name => this._name; + + public int ID => this._id; + + public Vector2 Position => this._calculatedPosition; + + 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) + { + this.BoundElement = element; + CalculatedStyle dimensions = element.GetDimensions(); + this._calculatedPosition = dimensions.Position() + this._offset + this._anchor * new Vector2(dimensions.Width, dimensions.Height); + } + + public override string ToString() => "Snap Point - " + this.Name + " " + (object) this.ID; + } +} diff --git a/UI/StyleDimension.cs b/UI/StyleDimension.cs new file mode 100644 index 0000000..be57d71 --- /dev/null +++ b/UI/StyleDimension.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.StyleDimension +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + } +} diff --git a/UI/TooltipProcessor.cs b/UI/TooltipProcessor.cs new file mode 100644 index 0000000..a40c644 --- /dev/null +++ b/UI/TooltipProcessor.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.TooltipProcessor +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..6b188fb --- /dev/null +++ b/UI/UIAlign.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIAlign +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..0c0342b --- /dev/null +++ b/UI/UIElement.cs @@ -0,0 +1,389 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIElement +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.UI.Elements; + +namespace Terraria.UI +{ + public class UIElement : IComparable + { + public string Id = ""; + public UIElement Parent; + protected 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 OverflowHidden; + 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 RasterizerState _overflowHiddenRasterizerState; + protected bool _useImmediateMode; + private SnapPoint _snapPoint; + private bool _isMouseHovering; + + 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 bool IsMouseHovering => this._isMouseHovering; + + public UIElement() + { + if (UIElement._overflowHiddenRasterizerState != null) + return; + UIElement._overflowHiddenRasterizerState = new RasterizerState() + { + CullMode = CullMode.None, + ScissorTestEnable = true + }; + } + + 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 num1 = this.OverflowHidden ? 1 : 0; + int num2 = this._useImmediateMode ? 1 : 0; + RasterizerState rasterizerState = spriteBatch.GraphicsDevice.RasterizerState; + Rectangle scissorRectangle = spriteBatch.GraphicsDevice.ScissorRectangle; + SamplerState anisotropicClamp = SamplerState.AnisotropicClamp; + if (num2 != 0) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, 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 (num1 != 0) + { + spriteBatch.End(); + Rectangle clippingRectangle = this.GetClippingRectangle(spriteBatch); + spriteBatch.GraphicsDevice.ScissorRectangle = clippingRectangle; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, anisotropicClamp, DepthStencilState.None, UIElement._overflowHiddenRasterizerState, (Effect) null, Main.UIScaleMatrix); + } + this.DrawChildren(spriteBatch); + if (num1 == 0) + return; + spriteBatch.End(); + spriteBatch.GraphicsDevice.ScissorRectangle = scissorRectangle; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, anisotropicClamp, DepthStencilState.None, rasterizerState, (Effect) null, Main.UIScaleMatrix); + } + + public virtual void Update(GameTime gameTime) + { + 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 width = spriteBatch.GraphicsDevice.Viewport.Width; + int height = spriteBatch.GraphicsDevice.Viewport.Height; + rectangle.X = Utils.Clamp(rectangle.X, 0, width); + rectangle.Y = Utils.Clamp(rectangle.Y, 0, height); + rectangle.Width = Utils.Clamp(rectangle.Width, 0, width - rectangle.X); + rectangle.Height = Utils.Clamp(rectangle.Height, 0, height - rectangle.Y); + return rectangle; + } + + 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 calculatedStyle1 = this.Parent == null ? UserInterface.ActiveInstance.GetDimensions() : this.Parent.GetInnerDimensions(); + if (this.Parent != null && this.Parent is UIList) + calculatedStyle1.Height = float.MaxValue; + CalculatedStyle calculatedStyle2; + calculatedStyle2.X = this.Left.GetValue(calculatedStyle1.Width) + calculatedStyle1.X; + calculatedStyle2.Y = this.Top.GetValue(calculatedStyle1.Height) + calculatedStyle1.Y; + float min1 = this.MinWidth.GetValue(calculatedStyle1.Width); + float max1 = this.MaxWidth.GetValue(calculatedStyle1.Width); + float min2 = this.MinHeight.GetValue(calculatedStyle1.Height); + float max2 = this.MaxHeight.GetValue(calculatedStyle1.Height); + calculatedStyle2.Width = MathHelper.Clamp(this.Width.GetValue(calculatedStyle1.Width), min1, max1); + calculatedStyle2.Height = MathHelper.Clamp(this.Height.GetValue(calculatedStyle1.Height), min2, max2); + calculatedStyle2.Width += this.MarginLeft + this.MarginRight; + calculatedStyle2.Height += this.MarginTop + this.MarginBottom; + calculatedStyle2.X += (float) ((double) calculatedStyle1.Width * (double) this.HAlign - (double) calculatedStyle2.Width * (double) this.HAlign); + calculatedStyle2.Y += (float) ((double) calculatedStyle1.Height * (double) this.VAlign - (double) calculatedStyle2.Height * (double) this.VAlign); + this._outerDimensions = calculatedStyle2; + calculatedStyle2.X += this.MarginLeft; + calculatedStyle2.Y += this.MarginTop; + calculatedStyle2.Width -= this.MarginLeft + this.MarginRight; + calculatedStyle2.Height -= this.MarginTop + this.MarginBottom; + this._dimensions = calculatedStyle2; + calculatedStyle2.X += this.PaddingLeft; + calculatedStyle2.Y += this.PaddingTop; + calculatedStyle2.Width -= this.PaddingLeft + this.PaddingRight; + calculatedStyle2.Height -= this.PaddingTop + this.PaddingBottom; + this._innerDimensions = calculatedStyle2; + this.RecalculateChildren(); + } + + public UIElement GetElementAt(Vector2 point) + { + UIElement uiElement = (UIElement) null; + foreach (UIElement element in this.Elements) + { + if (element.ContainsPoint(point)) + { + uiElement = element; + break; + } + } + if (uiElement != null) + return uiElement.GetElementAt(point); + 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 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() + { + } + + 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); + } +} diff --git a/UI/UIEvent.cs b/UI/UIEvent.cs new file mode 100644 index 0000000..3d7e890 --- /dev/null +++ b/UI/UIEvent.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..77ca025 --- /dev/null +++ b/UI/UIMouseEvent.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIMouseEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..ca48f90 --- /dev/null +++ b/UI/UIScrollWheelEvent.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIScrollWheelEvent +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..f89b4c4 --- /dev/null +++ b/UI/UIState.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIState +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..dfbe281 --- /dev/null +++ b/UI/UserInterface.cs @@ -0,0 +1,176 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UserInterface +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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; + +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; + public bool IsVisible; + private UIState _currentState; + + public void ResetLasts() + { + this._lastElementHover = (UIElement) null; + this._lastElementDown = (UIElement) null; + this._lastElementClicked = (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.MousePosition = new Vector2((float) Main.mouseX, (float) Main.mouseY); + 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); + } + + public void Update(GameTime time) + { + if (this._currentState == null) + return; + this.MousePosition = new Vector2((float) Main.mouseX, (float) Main.mouseY); + bool flag1 = Main.mouseLeft && Main.hasFocus; + UIElement target = Main.hasFocus ? this._currentState.GetElementAt(this.MousePosition) : (UIElement) null; + this._clickDisabledTimeRemaining = Math.Max(0.0, this._clickDisabledTimeRemaining - time.ElapsedGameTime.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 && time.TotalGameTime.TotalMilliseconds - this._lastMouseDownTime < 500.0) + { + target.DoubleClick(new UIMouseEvent(target, this.MousePosition)); + this._lastElementClicked = (UIElement) null; + } + this._lastMouseDownTime = time.TotalGameTime.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; + this._currentState.Draw(spriteBatch); + } + + public void SetState(UIState state) + { + if (state != null) + this.AddToHistory(state); + if (this._currentState != null) + this._currentState.Deactivate(); + this._currentState = state; + this.ResetState(); + if (state == null) + return; + 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() => new CalculatedStyle(0.0f, 0.0f, (float) Main.screenWidth, (float) Main.screenHeight); + + 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..f3eb23c --- /dev/null +++ b/Utilities/CrashDump.cs @@ -0,0 +1,125 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.CrashDump +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 (!Directory.Exists(outputDirectory)) + Directory.CreateDirectory(outputDirectory); + 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/FileOperationAPIWrapper.cs b/Utilities/FileOperationAPIWrapper.cs new file mode 100644 index 0000000..ba60199 --- /dev/null +++ b/Utilities/FileOperationAPIWrapper.cs @@ -0,0 +1,95 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.FileOperationAPIWrapper +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..8c282e5 --- /dev/null +++ b/Utilities/FileUtilities.cs @@ -0,0 +1,130 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.FileUtilities +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 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 != "") + Directory.CreateDirectory(parentFolderPath); + 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 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); + } + } +} diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs new file mode 100644 index 0000000..db49458 --- /dev/null +++ b/Utilities/NPCUtils.cs @@ -0,0 +1,260 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.NPCUtils +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 && (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 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 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 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..9ea7b2c --- /dev/null +++ b/Utilities/PlatformUtilities.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.PlatformUtilities +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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/UnifiedRandom.cs b/Utilities/UnifiedRandom.cs new file mode 100644 index 0000000..29315c6 --- /dev/null +++ b/Utilities/UnifiedRandom.cs @@ -0,0 +1,112 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.UnifiedRandom +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..522d12b --- /dev/null +++ b/Utilities/WeightedRandom`1.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.WeightedRandom`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..5904d33 --- /dev/null +++ b/Utils.cs @@ -0,0 +1,1178 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utils +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.Graphics; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria.DataStructures; +using Terraria.UI.Chat; +using Terraria.Utilities; + +namespace Terraria +{ + public static class Utils + { + public const long MaxCoins = 999999999; + public static Dictionary charLengths = new Dictionary(); + 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 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 InverseLerp(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 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 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) + { + 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; + 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; + } + 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 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 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 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 Rectangle Frame( + this Texture2D tex, + int horizontalFrames = 1, + int verticalFrames = 1, + int frameX = 0, + int frameY = 0) + { + int width = tex.Width / horizontalFrames; + int height = tex.Height / verticalFrames; + return new Rectangle(width * frameX, height * frameY, width, height); + } + + 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 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 ToWorldCoordinates(this Point p, float autoAddX = 8f, float autoAddY = 8f) => p.ToVector2() * 16f + new Vector2(autoAddX, autoAddY); + + 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 ? 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 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 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 bool PressingShift(this KeyboardState kb) => kb.IsKeyDown(Keys.LeftShift) || kb.IsKeyDown(Keys.RightShift); + + public static bool PlotLine(Point16 p0, Point16 p1, Utils.PerLinePoint 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.PerLinePoint 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.PerLinePoint 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.PerLinePoint 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.PerLinePoint) ((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.PerLinePoint 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.PerLinePoint) ((x, y) => + { + ++length; + return true; + })); + length--; + int curLength = 0; + return Utils.PlotLine(pointStart.X, pointStart.Y, tileCoordinates1.X, tileCoordinates1.Y, (Utils.PerLinePoint) ((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 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 fontMouseText = Main.fontMouseText; + Vector2 vector2 = fontMouseText.MeasureString(text); + ChatManager.DrawColorCodedStringWithShadow(sb, fontMouseText, 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 fontDeathText = Main.fontDeathText; + for (int index1 = -1; index1 < 2; ++index1) + { + for (int index2 = -1; index2 < 2; ++index2) + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, fontDeathText, text, pos + new Vector2((float) index1, (float) index2), Color.Black, 0.0f, new Vector2(anchorx, anchory) * fontDeathText.MeasureString(text), scale, SpriteEffects.None, 0.0f); + } + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, fontDeathText, text, pos, color, 0.0f, new Vector2(anchorx, anchory) * fontDeathText.MeasureString(text), scale, SpriteEffects.None, 0.0f); + return fontDeathText.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 inventoryBack13Texture = Main.inventoryBack13Texture; + if (w < 20) + w = 20; + if (h < 20) + h = 20; + sb.Draw(inventoryBack13Texture, new Rectangle(x, y, 10, 10), new Rectangle?(new Rectangle(0, 0, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + 10, y, w - 20, 10), new Rectangle?(new Rectangle(10, 0, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + w - 10, y, 10, 10), new Rectangle?(new Rectangle(inventoryBack13Texture.Width - 10, 0, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x, y + 10, 10, h - 20), new Rectangle?(new Rectangle(0, 10, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + 10, y + 10, w - 20, h - 20), new Rectangle?(new Rectangle(10, 10, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + w - 10, y + 10, 10, h - 20), new Rectangle?(new Rectangle(inventoryBack13Texture.Width - 10, 10, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x, y + h - 10, 10, 10), new Rectangle?(new Rectangle(0, inventoryBack13Texture.Height - 10, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + 10, y + h - 10, w - 20, 10), new Rectangle?(new Rectangle(10, inventoryBack13Texture.Height - 10, 10, 10)), c); + sb.Draw(inventoryBack13Texture, new Rectangle(x + w - 10, y + h - 10, 10, 10), new Rectangle?(new Rectangle(inventoryBack13Texture.Width - 10, inventoryBack13Texture.Height - 10, 10, 10)), c); + } + + public static void DrawSettingsPanel( + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + Utils.DrawPanel(Main.settingsPanelTexture, 2, 0, spriteBatch, position, width, color); + } + + public static void DrawSettings2Panel( + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + Utils.DrawPanel(Main.settingsPanelTexture, 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(Main.blackTileTexture, 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(Main.blackTileTexture, vector2 - screenPosition, new Rectangle?(), Color.Lerp(colorStart, colorEnd, amount), rotation, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + vector2 = start + num2 * v; + } + } + + public static void DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color) => Utils.DrawRect(spriteBatch, new Point(rect.X, rect.Y), new Point(rect.X + rect.Width, rect.Y + rect.Height), color); + + public static void DrawRect(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, 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(Main.cursorTextures[cursorSlot], 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(Main.cursorTextures[cursorSlot], vector2_1 + vector2_2, new Rectangle?(), color, rot, origin, scale, SpriteEffects.None, 0.0f); + } + + public delegate bool PerLinePoint(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..eb767ca --- /dev/null +++ b/WaterfallManager.cs @@ -0,0 +1,809 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WaterfallManager +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.IO; + +namespace Terraria +{ + public class WaterfallManager + { + private const int minWet = 160; + private const int maxCount = 200; + private const int maxLength = 100; + private const int maxTypes = 23; + private int qualityMax; + private int currentMax; + private WaterfallManager.WaterfallData[] waterfalls; + public Texture2D[] waterfallTexture = new Texture2D[23]; + 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[200]; + + public void LoadContent() + { + for (int index = 0; index < 23; ++index) + this.waterfallTexture[index] = Main.instance.OurLoad("Images" + Path.DirectorySeparatorChar.ToString() + "Waterfall_" + (object) index); + } + + 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) (175.0 * (double) Main.gfxQuality) + 25; + 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) + { + 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 - 1.0 && (double) x1 <= ((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0 + 1.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; + bool flag = false; + 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], position, new Rectangle?(rectangle2), color2, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + } + else + { + spriteBatch.Draw(this.waterfallTexture[12], position, new Rectangle?(rectangle1), color3, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this.waterfallTexture[11], position, new Rectangle?(rectangle2), color2, 0.0f, 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; + } + 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()) + { + 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() || testTile2.type == (ushort) 162) && !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 != (byte) 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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], 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; + } + spriteBatch.Draw(this.waterfallTexture[index2], 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); + 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], 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], 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; + } + spriteBatch.Draw(this.waterfallTexture[index2], 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.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); + } + } + } + Main.ambientWaterfallX = (float) num4; + Main.ambientWaterfallY = (float) num5; + Main.ambientWaterfallStrength = num1; + Main.ambientLavafallX = (float) num9; + Main.ambientLavafallY = (float) num10; + Main.ambientLavafallStrength = num6; + } + + 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) + return; + this.DrawWaterfall(spriteBatch, 13, Main.liquidAlpha[10]); + } + + 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..06efa63 --- /dev/null +++ b/WindowsLaunch.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WindowsLaunch +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..9a0210d --- /dev/null +++ b/Wiring.cs @@ -0,0 +1,2351 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Wiring +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.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 = 254; + + public static void SetCurrentUser(int plr = -1) + { + if (plr < 0 || plr >= (int) byte.MaxValue) + plr = 254; + 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; + } + 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.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(i, j, 1, 1); + } + else if (Main.tile[i, j].type == (ushort) 440) + { + Main.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; + Main.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(i, j, 1, 1); + } + 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; + Main.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; + Main.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 num4 = 36; + int num5 = (int) Main.tile[i, j].frameX / 18 * -1; + int num6 = (int) Main.tile[i, j].frameY / 18 * -1; + int num7 = num5 % 4; + if (num7 < -1) + { + num7 += 2; + num4 = (short) -36; + } + int index1 = num7 + i; + int index2 = num6 + 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 += num4; + } + } + WorldGen.TileFrame(index1, index2); + Main.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.type != (ushort) 226 || (double) j <= Main.worldSurface || NPC.downedPlantBoss) && ((double) j <= Main.worldSurface || NPC.downedGolemBoss || Main.tile[i, j - 1].type != (ushort) 237)) + { + if (tile.inActive()) + Wiring.ReActive(i, j); + else + Wiring.DeActive(i, j); + } + return true; + } + + public static void ActuateForced(int i, int j) + { + Tile tile = Main.tile[i, j]; + if (tile.type == (ushort) 226 && (double) j > Main.worldSurface && !NPC.downedPlantBoss) + return; + if (tile.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; + 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(); + Wiring.running = false; + } + + 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 KnockBack = 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, KnockBack, 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 4: + if (tile1.frameX < (short) 66) + tile1.frameX += (short) 66; + else + tile1.frameX -= (short) 66; + NetMessage.SendTileSquare(-1, i, j, 1); + return; + 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 42: + int num40 = (int) tile1.frameY / 18; + while (num40 >= 2) + num40 -= 2; + int y1 = j - num40; + short num41 = 18; + if (tile1.frameX > (short) 0) + num41 = (short) -18; + Main.tile[i, y1].frameX += num41; + Main.tile[i, y1 + 1].frameX += num41; + Wiring.SkipWire(i, y1); + Wiring.SkipWire(i, y1 + 1); + NetMessage.SendTileSquare(-1, i, j, 2); + return; + case 93: + int num42 = (int) tile1.frameY / 18; + while (num42 >= 3) + num42 -= 3; + int y2 = j - num42; + short num43 = 18; + if (tile1.frameX > (short) 0) + num43 = (short) -18; + Main.tile[i, y2].frameX += num43; + Main.tile[i, y2 + 1].frameX += num43; + Main.tile[i, y2 + 2].frameX += num43; + 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 216: + WorldGen.LaunchRocket(i, j); + Wiring.SkipWire(i, j); + return; + case 235: + int num44 = i - (int) tile1.frameX / 18; + if (tile1.wall == (byte) 87 && (double) j > Main.worldSurface && !NPC.downedPlantBoss) + return; + if ((double) Wiring._teleport[0].X == -1.0) + { + Wiring._teleport[0].X = (float) num44; + Wiring._teleport[0].Y = (float) j; + if (!tile1.halfBrick()) + return; + Wiring._teleport[0].Y += 0.5f; + return; + } + if ((double) Wiring._teleport[0].X == (double) num44 && (double) Wiring._teleport[0].Y == (double) j) + return; + Wiring._teleport[1].X = (float) num44; + Wiring._teleport[1].Y = (float) j; + if (!tile1.halfBrick()) + return; + Wiring._teleport[1].Y += 0.5f; + return; + case 244: + int num45 = (int) tile1.frameX / 18; + while (num45 >= 3) + num45 -= 3; + int num46 = (int) tile1.frameY / 18; + while (num46 >= 3) + num46 -= 3; + int index10 = i - num45; + int index11 = j - num46; + int num47 = 54; + if (Main.tile[index10, index11].frameX >= (short) 54) + num47 = -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) num47; + } + } + NetMessage.SendTileSquare(-1, index10 + 1, index11 + 1, 3); + return; + case 335: + int num48 = j - (int) tile1.frameY / 18; + int num49 = i - (int) tile1.frameX / 18; + Wiring.SkipWire(num49, num48); + Wiring.SkipWire(num49, num48 + 1); + Wiring.SkipWire(num49 + 1, num48); + Wiring.SkipWire(num49 + 1, num48 + 1); + if (!Wiring.CheckMech(num49, num48, 30)) + return; + WorldGen.LaunchRocketSmall(num49, num48); + return; + case 338: + int num50 = j - (int) tile1.frameY / 18; + int num51 = i - (int) tile1.frameX / 18; + Wiring.SkipWire(num51, num50); + Wiring.SkipWire(num51, num50 + 1); + if (!Wiring.CheckMech(num51, num50, 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) num51 && (double) Main.projectile[index12].ai[1] == (double) num50) + { + flag5 = true; + break; + } + } + if (flag5) + return; + Projectile.NewProjectile((float) (num51 * 16 + 8), (float) (num50 * 16 + 2), 0.0f, 0.0f, 419 + Main.rand.Next(4), 0, 0.0f, Main.myPlayer, (float) num51, (float) num50); + return; + case 429: + int num52 = (int) Main.tile[i, j].frameX / 18; + bool flag6 = num52 % 2 >= 1; + bool flag7 = num52 % 4 >= 2; + bool flag8 = num52 % 8 >= 4; + bool flag9 = num52 % 16 >= 8; + bool flag10 = false; + short num53 = 0; + switch (Wiring._currentWireColor) + { + case 1: + num53 = (short) 18; + flag10 = !flag6; + break; + case 2: + num53 = (short) 72; + flag10 = !flag8; + break; + case 3: + num53 = (short) 36; + flag10 = !flag7; + break; + case 4: + num53 = (short) 144; + flag10 = !flag9; + break; + } + if (flag10) + tile1.frameX += num53; + else + tile1.frameX -= num53; + NetMessage.SendTileSquare(-1, i, j, 1); + return; + default: + if (type == 126 || type == 95 || type == 100 || type == 173) + { + int num54 = (int) tile1.frameY / 18; + while (num54 >= 2) + num54 -= 2; + int index13 = j - num54; + int num55 = (int) tile1.frameX / 18; + if (num55 > 1) + num55 -= 2; + int index14 = i - num55; + short num56 = 36; + if (Main.tile[index14, index13].frameX > (short) 0) + num56 = (short) -36; + Main.tile[index14, index13].frameX += num56; + Main.tile[index14, index13 + 1].frameX += num56; + Main.tile[index14 + 1, index13].frameX += num56; + Main.tile[index14 + 1, index13 + 1].frameX += num56; + Wiring.SkipWire(index14, index13); + Wiring.SkipWire(index14 + 1, index13); + Wiring.SkipWire(index14, index13 + 1); + Wiring.SkipWire(index14 + 1, index13 + 1); + NetMessage.SendTileSquare(-1, index14, index13, 3); + return; + } + switch (type) + { + case 34: + int num57 = (int) tile1.frameY / 18; + while (num57 >= 3) + num57 -= 3; + int index15 = j - num57; + int num58 = (int) tile1.frameX % 108 / 18; + if (num58 > 2) + num58 -= 3; + int index16 = i - num58; + short num59 = 54; + if ((int) Main.tile[index16, index15].frameX % 108 > 0) + num59 = (short) -54; + for (int x = index16; x < index16 + 3; ++x) + { + for (int y4 = index15; y4 < index15 + 3; ++y4) + { + Main.tile[x, y4].frameX += num59; + Wiring.SkipWire(x, y4); + } + } + NetMessage.SendTileSquare(-1, index16 + 1, index15 + 1, 3); + return; + case 314: + if (!Wiring.CheckMech(i, j, 5)) + return; + Minecart.FlipSwitchTrack(i, j); + return; + default: + if (type == 33 || type == 174) + { + short num60 = 18; + if (tile1.frameX > (short) 0) + num60 = (short) -18; + tile1.frameX += num60; + NetMessage.SendTileSquare(-1, i, j, 3); + return; + } + switch (type) + { + case 92: + int num61 = j - (int) tile1.frameY / 18; + short num62 = 18; + if (tile1.frameX > (short) 0) + num62 = (short) -18; + for (int y5 = num61; y5 < num61 + 6; ++y5) + { + Main.tile[i, y5].frameX += num62; + Wiring.SkipWire(i, y5); + } + NetMessage.SendTileSquare(-1, i, num61 + 3, 7); + return; + case 137: + int num63 = (int) tile1.frameY / 18; + Vector2 vector2_2 = Vector2.Zero; + float SpeedX2 = 0.0f; + float SpeedY2 = 0.0f; + int Type2 = 0; + int Damage2 = 0; + switch (num63) + { + case 0: + case 1: + case 2: + if (Wiring.CheckMech(i, j, 200)) + { + int num64 = tile1.frameX == (short) 0 ? -1 : (tile1.frameX == (short) 18 ? 1 : 0); + int num65 = tile1.frameX < (short) 36 ? 0 : (tile1.frameX < (short) 72 ? -1 : 1); + vector2_2 = new Vector2((float) (i * 16 + 8 + 10 * num64), (float) (j * 16 + 9 + num65 * 9)); + float num66 = 3f; + if (num63 == 0) + { + Type2 = 98; + Damage2 = 20; + num66 = 12f; + } + if (num63 == 1) + { + Type2 = 184; + Damage2 = 40; + num66 = 12f; + } + if (num63 == 2) + { + Type2 = 187; + Damage2 = 40; + num66 = 5f; + } + SpeedX2 = (float) num64 * num66; + SpeedY2 = (float) num65 * num66; + break; + } + break; + case 3: + if (Wiring.CheckMech(i, j, 300)) + { + int num67 = 200; + for (int index17 = 0; index17 < 1000; ++index17) + { + if (Main.projectile[index17].active && Main.projectile[index17].type == Type2) + { + float num68 = (new Vector2((float) (i * 16 + 8), (float) (j * 18 + 8)) - Main.projectile[index17].Center).Length(); + if ((double) num68 < 50.0) + num67 -= 50; + else if ((double) num68 < 100.0) + num67 -= 15; + else if ((double) num68 < 200.0) + num67 -= 10; + else if ((double) num68 < 300.0) + num67 -= 8; + else if ((double) num68 < 400.0) + num67 -= 6; + else if ((double) num68 < 500.0) + num67 -= 5; + else if ((double) num68 < 700.0) + num67 -= 4; + else if ((double) num68 < 900.0) + num67 -= 3; + else if ((double) num68 < 1200.0) + num67 -= 2; + else + --num67; + } + } + if (num67 > 0) + { + Type2 = 185; + Damage2 = 40; + int num69 = 0; + int num70 = 0; + switch ((int) tile1.frameX / 18) + { + case 0: + case 1: + num69 = 0; + num70 = 1; + break; + case 2: + num69 = 0; + num70 = -1; + break; + case 3: + num69 = -1; + num70 = 0; + break; + case 4: + num69 = 1; + num70 = 0; + break; + } + SpeedX2 = (float) (4 * num69) + (float) Main.rand.Next((num69 == 1 ? 20 : 0) - 20, 21 - (num69 == -1 ? 20 : 0)) * 0.05f; + SpeedY2 = (float) (4 * num70) + (float) Main.rand.Next((num70 == 1 ? 20 : 0) - 20, 21 - (num70 == -1 ? 20 : 0)) * 0.05f; + vector2_2 = new Vector2((float) (i * 16 + 8 + 14 * num69), (float) (j * 16 + 8 + 14 * num70)); + break; + } + break; + } + break; + case 4: + if (Wiring.CheckMech(i, j, 90)) + { + int num71 = 0; + int num72 = 0; + switch ((int) tile1.frameX / 18) + { + case 0: + case 1: + num71 = 0; + num72 = 1; + break; + case 2: + num71 = 0; + num72 = -1; + break; + case 3: + num71 = -1; + num72 = 0; + break; + case 4: + num71 = 1; + num72 = 0; + break; + } + SpeedX2 = (float) (8 * num71); + SpeedY2 = (float) (8 * num72); + Damage2 = 60; + Type2 = 186; + vector2_2 = new Vector2((float) (i * 16 + 8 + 18 * num71), (float) (j * 16 + 8 + 18 * num72)); + break; + } + break; + } + switch (num63 + 10) + { + case 0: + if (Wiring.CheckMech(i, j, 200)) + { + int num73 = -1; + if (tile1.frameX != (short) 0) + num73 = 1; + SpeedX2 = (float) (12 * num73); + Damage2 = 20; + Type2 = 98; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num73); + vector2_2.Y += 2f; + break; + } + break; + case 1: + if (Wiring.CheckMech(i, j, 200)) + { + int num74 = -1; + if (tile1.frameX != (short) 0) + num74 = 1; + SpeedX2 = (float) (12 * num74); + Damage2 = 40; + Type2 = 184; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num74); + vector2_2.Y += 2f; + break; + } + break; + case 2: + if (Wiring.CheckMech(i, j, 200)) + { + int num75 = -1; + if (tile1.frameX != (short) 0) + num75 = 1; + SpeedX2 = (float) (5 * num75); + Damage2 = 40; + Type2 = 187; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num75); + vector2_2.Y += 2f; + break; + } + break; + case 3: + if (Wiring.CheckMech(i, j, 300)) + { + Type2 = 185; + int num76 = 200; + for (int index18 = 0; index18 < 1000; ++index18) + { + if (Main.projectile[index18].active && Main.projectile[index18].type == Type2) + { + float num77 = (new Vector2((float) (i * 16 + 8), (float) (j * 18 + 8)) - Main.projectile[index18].Center).Length(); + if ((double) num77 < 50.0) + num76 -= 50; + else if ((double) num77 < 100.0) + num76 -= 15; + else if ((double) num77 < 200.0) + num76 -= 10; + else if ((double) num77 < 300.0) + num76 -= 8; + else if ((double) num77 < 400.0) + num76 -= 6; + else if ((double) num77 < 500.0) + num76 -= 5; + else if ((double) num77 < 700.0) + num76 -= 4; + else if ((double) num77 < 900.0) + num76 -= 3; + else if ((double) num77 < 1200.0) + num76 -= 2; + else + --num76; + } + } + if (num76 > 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: + int num78 = (int) tile1.frameX / 36; + int i3 = i - ((int) tile1.frameX - num78 * 36) / 18; + int j3 = j; + if (!Wiring.CheckMech(i3, j3, 200)) + return; + Vector2 zero = Vector2.Zero; + Vector2 vector2_3 = Vector2.Zero; + int Type3 = 654; + int Damage3 = 20; + Vector2 vector2_4; + if (num78 < 2) + { + vector2_4 = new Vector2((float) (i3 + 1), (float) j3) * 16f; + vector2_3 = new Vector2(0.0f, -8f); + } + else + { + vector2_4 = new Vector2((float) (i3 + 1), (float) (j3 + 1)) * 16f; + vector2_3 = new Vector2(0.0f, 8f); + } + if (Type3 == 0) + return; + Projectile.NewProjectile((float) (int) vector2_4.X, (float) (int) vector2_4.Y, vector2_3.X, vector2_3.Y, Type3, Damage3, 2f, Main.myPlayer); + return; + default: + if (type == 139 || type == 35) + { + WorldGen.SwitchMB(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 207: + WorldGen.SwitchFountain(i, j); + return; + case 210: + WorldGen.ExplodeMine(i, j); + return; + case 410: + WorldGen.SwitchMonolith(i, j); + return; + case 455: + BirthdayParty.ToggleManualParty(); + return; + default: + if (type == 142 || type == 143) + { + int y6 = j - (int) tile1.frameY / 18; + int num79 = (int) tile1.frameX / 18; + if (num79 > 1) + num79 -= 2; + int x = i - num79; + Wiring.SkipWire(x, y6); + Wiring.SkipWire(x, y6 + 1); + Wiring.SkipWire(x + 1, y6); + Wiring.SkipWire(x + 1, y6 + 1); + if (type == 142) + { + for (int index19 = 0; index19 < 4 && Wiring._numInPump < 19; ++index19) + { + int num80; + int num81; + switch (index19) + { + case 0: + num80 = x; + num81 = y6 + 1; + break; + case 1: + num80 = x + 1; + num81 = y6 + 1; + break; + case 2: + num80 = x; + num81 = y6; + break; + default: + num80 = x + 1; + num81 = y6; + break; + } + Wiring._inPumpX[Wiring._numInPump] = num80; + Wiring._inPumpY[Wiring._numInPump] = num81; + ++Wiring._numInPump; + } + return; + } + for (int index20 = 0; index20 < 4 && Wiring._numOutPump < 19; ++index20) + { + int num82; + int num83; + switch (index20) + { + case 0: + num82 = x; + num83 = y6 + 1; + break; + case 1: + num82 = x + 1; + num83 = y6 + 1; + break; + case 2: + num82 = x; + num83 = y6; + break; + default: + num82 = x + 1; + num83 = y6; + break; + } + Wiring._outPumpX[Wiring._numOutPump] = num82; + Wiring._outPumpY[Wiring._numOutPump] = num83; + ++Wiring._numOutPump; + } + return; + } + switch (type) + { + case 105: + int num84 = j - (int) tile1.frameY / 18; + int num85 = (int) tile1.frameX / 18; + int num86 = 0; + while (num85 >= 2) + { + num85 -= 2; + ++num86; + } + int num87 = i - num85; + int num88 = i - (int) tile1.frameX % 36 / 18; + int num89 = j - (int) tile1.frameY % 54 / 18; + int num90 = (int) tile1.frameX / 36 + (int) tile1.frameY / 54 * 55; + Wiring.SkipWire(num88, num89); + Wiring.SkipWire(num88, num89 + 1); + Wiring.SkipWire(num88, num89 + 2); + Wiring.SkipWire(num88 + 1, num89); + Wiring.SkipWire(num88 + 1, num89 + 1); + Wiring.SkipWire(num88 + 1, num89 + 2); + int X = num88 * 16 + 16; + int Y = (num89 + 3) * 16; + int index21 = -1; + int num91 = -1; + bool flag11 = true; + bool flag12 = false; + switch (num90) + { + case 51: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538); + break; + case 52: + num91 = 356; + break; + case 53: + num91 = 357; + break; + case 54: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 355, (short) 358); + break; + case 55: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 367, (short) 366); + break; + case 56: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 359, (short) 359, (short) 359, (short) 359, (short) 360); + break; + case 57: + num91 = 377; + break; + case 58: + num91 = 300; + break; + case 59: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 364, (short) 362); + break; + case 60: + num91 = 148; + break; + case 61: + num91 = 361; + break; + case 62: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 487, (short) 486, (short) 485); + break; + case 63: + num91 = 164; + flag11 &= NPC.MechSpawn((float) X, (float) Y, 165); + break; + case 64: + num91 = 86; + flag12 = true; + break; + case 65: + num91 = 490; + break; + case 66: + num91 = 82; + break; + case 67: + num91 = 449; + break; + case 68: + num91 = 167; + break; + case 69: + num91 = 480; + break; + case 70: + num91 = 48; + break; + case 71: + num91 = (int) Utils.SelectRandom(Main.rand, (short) 170, (short) 180, (short) 171); + flag12 = true; + break; + case 72: + num91 = 481; + break; + case 73: + num91 = 482; + break; + case 74: + num91 = 430; + break; + case 75: + num91 = 489; + break; + } + if (((num91 == -1 || !Wiring.CheckMech(num88, num89, 30) ? 0 : (NPC.MechSpawn((float) X, (float) Y, num91) ? 1 : 0)) & (flag11 ? 1 : 0)) != 0) + { + if (!flag12 || !Collision.SolidTiles(num88 - 2, num88 + 3, num89, num89 + 2)) + { + index21 = NPC.NewNPC(X, Y - 12, num91); + } + 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 (index21 <= -1) + { + switch (num90) + { + case 2: + if (Wiring.CheckMech(num88, num89, 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(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 1)) + { + index21 = NPC.NewNPC(X, Y - 12, 1); + break; + } + break; + case 7: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 49)) + { + index21 = NPC.NewNPC(X - 4, Y - 6, 49); + break; + } + break; + case 8: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 55)) + { + index21 = NPC.NewNPC(X, Y - 12, 55); + break; + } + break; + case 9: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 46)) + { + index21 = NPC.NewNPC(X, Y - 12, 46); + break; + } + break; + case 10: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 21)) + { + index21 = NPC.NewNPC(X, Y, 21); + break; + } + break; + case 17: + if (Wiring.CheckMech(num88, num89, 600) && Item.MechSpawn((float) X, (float) Y, 166)) + { + Item.NewItem(X, Y - 20, 0, 0, 166); + break; + } + break; + case 18: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 67)) + { + index21 = NPC.NewNPC(X, Y - 12, 67); + break; + } + break; + case 23: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 63)) + { + index21 = NPC.NewNPC(X, Y - 12, 63); + break; + } + break; + case 27: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 85)) + { + index21 = NPC.NewNPC(X - 9, Y, 85); + break; + } + break; + case 28: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 74)) + { + index21 = NPC.NewNPC(X, Y - 12, (int) Utils.SelectRandom(Main.rand, (short) 74, (short) 297, (short) 298)); + break; + } + break; + case 34: + for (int index22 = 0; index22 < 2; ++index22) + { + for (int index23 = 0; index23 < 3; ++index23) + { + Tile tile2 = Main.tile[num88 + index22, num89 + index23]; + tile2.type = (ushort) 349; + tile2.frameX = (short) (index22 * 18 + 216); + tile2.frameY = (short) (index23 * 18); + } + } + Animation.NewTemporaryAnimation(0, (ushort) 349, num88, num89); + if (Main.netMode == 2) + { + NetMessage.SendTileRange(-1, num88, num89, 2, 3); + break; + } + break; + case 37: + if (Wiring.CheckMech(num88, num89, 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(num88, num89, 300)) + { + int[] numArray = new int[10]; + int maxValue = 0; + for (int index24 = 0; index24 < 200; ++index24) + { + if (Main.npc[index24].active && (Main.npc[index24].type == 17 || Main.npc[index24].type == 19 || Main.npc[index24].type == 22 || Main.npc[index24].type == 38 || Main.npc[index24].type == 54 || Main.npc[index24].type == 107 || Main.npc[index24].type == 108 || Main.npc[index24].type == 142 || Main.npc[index24].type == 160 || Main.npc[index24].type == 207 || Main.npc[index24].type == 209 || Main.npc[index24].type == 227 || Main.npc[index24].type == 228 || Main.npc[index24].type == 229 || Main.npc[index24].type == 358 || Main.npc[index24].type == 369 || Main.npc[index24].type == 550)) + { + numArray[maxValue] = index24; + ++maxValue; + if (maxValue >= 9) + 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(num88, num89, 300)) + { + int[] numArray = new int[10]; + int maxValue = 0; + for (int index25 = 0; index25 < 200; ++index25) + { + if (Main.npc[index25].active && (Main.npc[index25].type == 18 || Main.npc[index25].type == 20 || Main.npc[index25].type == 124 || Main.npc[index25].type == 178 || Main.npc[index25].type == 208 || Main.npc[index25].type == 353)) + { + numArray[maxValue] = index25; + ++maxValue; + if (maxValue >= 9) + 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(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 58)) + { + index21 = NPC.NewNPC(X, Y - 12, 58); + break; + } + break; + case 50: + if (Wiring.CheckMech(num88, num89, 30) && NPC.MechSpawn((float) X, (float) Y, 65)) + { + if (!Collision.SolidTiles(num88 - 2, num88 + 3, num89, num89 + 2)) + { + index21 = 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 (index21 < 0) + return; + Main.npc[index21].value = 0.0f; + Main.npc[index21].npcSlots = 0.0f; + Main.npc[index21].SpawnedFromStatue = true; + return; + case 349: + int index26 = j - (int) tile1.frameY / 18; + int num92 = (int) tile1.frameX / 18; + while (num92 >= 2) + num92 -= 2; + int index27 = i - num92; + Wiring.SkipWire(index27, index26); + Wiring.SkipWire(index27, index26 + 1); + Wiring.SkipWire(index27, index26 + 2); + Wiring.SkipWire(index27 + 1, index26); + Wiring.SkipWire(index27 + 1, index26 + 1); + Wiring.SkipWire(index27 + 1, index26 + 2); + short num93 = Main.tile[index27, index26].frameX != (short) 0 ? (short) -216 : (short) 216; + for (int index28 = 0; index28 < 2; ++index28) + { + for (int index29 = 0; index29 < 3; ++index29) + Main.tile[index27 + index28, index26 + index29].frameX += num93; + } + if (Main.netMode == 2) + NetMessage.SendTileRange(-1, index27, index26, 2, 3); + Animation.NewTemporaryAnimation(num93 > (short) 0 ? 0 : 1, (ushort) 349, index27, index26); + return; + default: + return; + } + } + } + } + } + } + } + } + + 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 && rectangleArray[index1].Intersects(Main.player[playerIndex].getRect())) + { + 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] && rectangleArray[index1].Intersects(Main.npc[index2].getRect())) + { + 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 void DeActive(int i, int j) + { + if (!Main.tile[i, j].active()) + 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: + flag = false; + break; + } + if (!flag || Main.tile[i, j - 1].active() && (Main.tile[i, j - 1].type == (ushort) 5 || 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) 72 || Main.tile[i, j - 1].type == (ushort) 88)) + 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/Generation/Actions.cs b/World/Generation/Actions.cs new file mode 100644 index 0000000..a49c152 --- /dev/null +++ b/World/Generation/Actions.cs @@ -0,0 +1,351 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Actions +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation +{ + 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].ResetToType(this._type); + 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(Main.magicPixel, 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 = (byte) 0; + return this.UnitApply(origin, x, y, args); + } + } + + public class PlaceWall : GenAction + { + private byte _type; + private bool _neighbors; + + public PlaceWall(byte 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/World/Generation/BiomeCollection.cs b/World/Generation/BiomeCollection.cs new file mode 100644 index 0000000..9f42348 --- /dev/null +++ b/World/Generation/BiomeCollection.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.BiomeCollection +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.World.Generation +{ + internal static class BiomeCollection + { + public static List Biomes = new List(); + } +} diff --git a/World/Generation/Biomes`1.cs b/World/Generation/Biomes`1.cs new file mode 100644 index 0000000..c95ece0 --- /dev/null +++ b/World/Generation/Biomes`1.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Biomes`1 +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + public static class Biomes where T : MicroBiome, new() + { + private static T _microBiome = Biomes.CreateInstance(); + + public static bool Place(int x, int y, StructureMap structures) => Biomes._microBiome.Place(new Point(x, y), structures); + + public static bool Place(Point origin, StructureMap structures) => Biomes._microBiome.Place(origin, structures); + + public static T Get() => Biomes._microBiome; + + private static T CreateInstance() + { + T obj = new T(); + BiomeCollection.Biomes.Add((MicroBiome) obj); + return obj; + } + } +} diff --git a/World/Generation/Conditions.cs b/World/Generation/Conditions.cs new file mode 100644 index 0000000..f7b063f --- /dev/null +++ b/World/Generation/Conditions.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Conditions +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + 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 IsSolid : GenCondition + { + protected override bool CheckValidity(int x, int y) => 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; + } + } +} diff --git a/World/Generation/GenAction.cs b/World/Generation/GenAction.cs new file mode 100644 index 0000000..71d62ed --- /dev/null +++ b/World/Generation/GenAction.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenAction +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + 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/World/Generation/GenBase.cs b/World/Generation/GenBase.cs new file mode 100644 index 0000000..2222312 --- /dev/null +++ b/World/Generation/GenBase.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenBase +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Utilities; + +namespace Terraria.World.Generation +{ + 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/World/Generation/GenCondition.cs b/World/Generation/GenCondition.cs new file mode 100644 index 0000000..f30d6f9 --- /dev/null +++ b/World/Generation/GenCondition.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenCondition +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + 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/World/Generation/GenModShape.cs b/World/Generation/GenModShape.cs new file mode 100644 index 0000000..cbd1c3b --- /dev/null +++ b/World/Generation/GenModShape.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenModShape +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + public abstract class GenModShape : GenShape + { + protected ShapeData _data; + + public GenModShape(ShapeData data) => this._data = data; + } +} diff --git a/World/Generation/GenPass.cs b/World/Generation/GenPass.cs new file mode 100644 index 0000000..15c7d47 --- /dev/null +++ b/World/Generation/GenPass.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenPass +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + public abstract class GenPass : GenBase + { + public string Name; + public float Weight; + + public GenPass(string name, float loadWeight) + { + this.Name = name; + this.Weight = loadWeight; + } + + public abstract void Apply(GenerationProgress progress); + } +} diff --git a/World/Generation/GenSearch.cs b/World/Generation/GenSearch.cs new file mode 100644 index 0000000..3e2318d --- /dev/null +++ b/World/Generation/GenSearch.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenSearch +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + 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/World/Generation/GenShape.cs b/World/Generation/GenShape.cs new file mode 100644 index 0000000..5540541 --- /dev/null +++ b/World/Generation/GenShape.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenShape +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + 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/World/Generation/GenStructure.cs b/World/Generation/GenStructure.cs new file mode 100644 index 0000000..3117ef4 --- /dev/null +++ b/World/Generation/GenStructure.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenStructure +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + public abstract class GenStructure : GenBase + { + public abstract bool Place(Point origin, StructureMap structures); + } +} diff --git a/World/Generation/GenerationProgress.cs b/World/Generation/GenerationProgress.cs new file mode 100644 index 0000000..c7d43ff --- /dev/null +++ b/World/Generation/GenerationProgress.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.GenerationProgress +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + 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; + } +} diff --git a/World/Generation/MicroBiome.cs b/World/Generation/MicroBiome.cs new file mode 100644 index 0000000..066c041 --- /dev/null +++ b/World/Generation/MicroBiome.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.MicroBiome +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + public abstract class MicroBiome : GenStructure + { + public virtual void Reset() + { + } + + public static void ResetAll() + { + foreach (MicroBiome biome in BiomeCollection.Biomes) + biome.Reset(); + } + } +} diff --git a/World/Generation/ModShapes.cs b/World/Generation/ModShapes.cs new file mode 100644 index 0000000..ec30e59 --- /dev/null +++ b/World/Generation/ModShapes.cs @@ -0,0 +1,130 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.ModShapes +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; + +namespace Terraria.World.Generation +{ + 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/World/Generation/Modifiers.cs b/World/Generation/Modifiers.cs new file mode 100644 index 0000000..faa1841 --- /dev/null +++ b/World/Generation/Modifiers.cs @@ -0,0 +1,451 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Modifiers +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.World.Generation +{ + 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 Conditions : GenAction + { + private 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 byte[] _types; + + public OnlyWalls(params byte[] 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._liquidLevel = liquidLevel; + this._liquidType = liquidType; + } + + 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 byte[] _types; + + public SkipWalls(params byte[] 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.SolidTile(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.SolidTile(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/World/Generation/Passes.cs b/World/Generation/Passes.cs new file mode 100644 index 0000000..498282c --- /dev/null +++ b/World/Generation/Passes.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Passes +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.World.Generation +{ + public static class Passes + { + public class Clear : GenPass + { + public Clear() + : base("clear", 1f) + { + } + + public override void Apply(GenerationProgress progress) + { + 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; + + public override void Apply(GenerationProgress progress) + { + 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/World/Generation/Searches.cs b/World/Generation/Searches.cs new file mode 100644 index 0000000..abb1540 --- /dev/null +++ b/World/Generation/Searches.cs @@ -0,0 +1,108 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Searches +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + 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/World/Generation/ShapeData.cs b/World/Generation/ShapeData.cs new file mode 100644 index 0000000..b92033b --- /dev/null +++ b/World/Generation/ShapeData.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.ShapeData +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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.World.Generation +{ + 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/World/Generation/Shapes.cs b/World/Generation/Shapes.cs new file mode 100644 index 0000000..c40d3d8 --- /dev/null +++ b/World/Generation/Shapes.cs @@ -0,0 +1,189 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.Shapes +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.World.Generation +{ + 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 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 int _width; + private int _height; + + public Rectangle(int width, int height) + { + this._width = width; + this._height = height; + } + + public override bool Perform(Point origin, GenAction action) + { + for (int x = origin.X; x < origin.X + this._width; ++x) + { + for (int y = origin.Y; y < origin.Y + this._height; ++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.PerLinePoint) ((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/World/Generation/SimpleStructure.cs b/World/Generation/SimpleStructure.cs new file mode 100644 index 0000000..f26ea8c --- /dev/null +++ b/World/Generation/SimpleStructure.cs @@ -0,0 +1,91 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.SimpleStructure +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + 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.AddStructure(new Microsoft.Xna.Framework.Rectangle(origin.X, origin.Y, this._width, this._height)); + return true; + } + } +} diff --git a/World/Generation/StructureMap.cs b/World/Generation/StructureMap.cs new file mode 100644 index 0000000..bd75622 --- /dev/null +++ b/World/Generation/StructureMap.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.StructureMap +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.World.Generation +{ + public class StructureMap + { + private List _structures = new List(2048); + + 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) + { + 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._structures.Count; ++index) + { + if (rectangle.Intersects(this._structures[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 void AddStructure(Microsoft.Xna.Framework.Rectangle area, int padding = 0) => this._structures.Add(new Microsoft.Xna.Framework.Rectangle(area.X - padding, area.Y - padding, area.Width + padding * 2, area.Height + padding * 2)); + + public void Reset() => this._structures.Clear(); + } +} diff --git a/World/Generation/WorldGenerator.cs b/World/Generation/WorldGenerator.cs new file mode 100644 index 0000000..1664c60 --- /dev/null +++ b/World/Generation/WorldGenerator.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.WorldGenerator +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.Diagnostics; +using Terraria.GameContent.UI.States; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria.World.Generation +{ + public class WorldGenerator + { + private List _passes = new List(); + private float _totalLoadWeight; + private int _seed; + + public WorldGenerator(int seed) => this._seed = seed; + + 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(); + progress.TotalWeight = num; + Main.menuMode = 888; + Main.MenuUI.SetState((UIState) new UIWorldLoad(progress)); + 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); + progress.End(); + stopwatch.Reset(); + } + } + } +} diff --git a/World/Generation/WorldUtils.cs b/World/Generation/WorldUtils.cs new file mode 100644 index 0000000..00c42ce --- /dev/null +++ b/World/Generation/WorldUtils.cs @@ -0,0 +1,105 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World.Generation.WorldUtils +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.World.Generation +{ + public static class WorldUtils + { + public static bool Gen(Point origin, GenShape shape, GenAction action) => shape.Perform(origin, 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 = (byte) 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..9e92380 --- /dev/null +++ b/WorldGen.cs @@ -0,0 +1,41072 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldGen +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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 Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Biomes; +using Terraria.GameContent.Events; +using Terraria.GameContent.Generation; +using Terraria.GameContent.Tile_Entities; +using Terraria.Graphics.Capture; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Map; +using Terraria.ObjectData; +using Terraria.Utilities; +using Terraria.World.Generation; + +namespace Terraria +{ + public class WorldGen + { + public static TownRoomManager TownManager = new TownRoomManager(); + private static int lAltarX; + private static int lAltarY; + public static int tileReframeCount = 0; + public static bool noMapUpdate = false; + 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 int c = 0; + public static int m = 0; + public static int a = 0; + public static int co = 0; + public static int ir = 0; + public static int si = 0; + public static int go = 0; + public static int copperBar = 20; + public static int ironBar = 22; + public static int silverBar = 21; + public static int goldBar = 19; + public static ushort CopperTierOre = 7; + public static ushort IronTierOre = 6; + public static ushort SilverTierOre = 9; + public static ushort GoldTierOre = 8; + public static int treeBG = 0; + public static int corruptBG = 0; + public static int jungleBG = 0; + public static int snowBG = 0; + public static int hallowBG = 0; + public static int crimsonBG = 0; + public static int desertBG = 0; + public static int oceanBG = 0; + public static int oreTier1 = -1; + public static int oreTier2 = -1; + public static int oreTier3 = -1; + public static bool crimson = false; + public static byte mossTile = 179; + public static byte mossWall = 54; + public static bool[] gem = new bool[6]; + public static int[] tileCounts = new int[470]; + public static int totalEvil = 0; + public static int totalBlood = 0; + public static int totalGood = 0; + public static int totalSolid = 0; + public static int totalEvil2 = 0; + public static int totalBlood2 = 0; + public static int totalGood2 = 0; + public static int totalSolid2 = 0; + public static byte tEvil = 0; + public static byte tBlood = 0; + public static byte tGood = 0; + public static int totalX = 0; + public static int totalD = 0; + public static bool IsGeneratingHardMode = false; + private static Vector2[] heartPos = new Vector2[100]; + private static int heartCount = 0; + public static int lavaLine; + public static int waterLine; + public static bool noTileActions = false; + public static bool spawnEye = false; + public static int spawnHardBoss = 0; + public static int numLarva = 0; + public static int[] larvaX = new int[100]; + public static int[] larvaY = new int[100]; + public static bool gen = false; + public static bool shadowOrbSmashed = false; + public static int shadowOrbCount = 0; + public static int altarCount = 0; + public static bool spawnMeteor = false; + public static bool loadFailed = false; + public static bool loadSuccess = false; + public static bool worldCleared = false; + public static bool worldBackup = false; + public static bool loadBackup = false; + private static int lastMaxTilesX = 0; + private static int lastMaxTilesY = 0; + public static bool saveLock = false; + private static bool mergeUp = false; + private static bool mergeDown = false; + private static bool mergeLeft = false; + private static bool mergeRight = false; + private static bool stopDrops = false; + private static bool mudWall = false; + private static int grassSpread = 0; + public static bool noLiquidCheck = false; + [ThreadStatic] + public static UnifiedRandom _genRand; + [ThreadStatic] + public static int _genRandSeed = -2; + public static int _lastSeed; + public static string statusText = ""; + public static bool destroyObject = false; + public static int spawnDelay = 0; + public static int prioritizedTownNPC = 0; + public static int numTileCount = 0; + public static int maxTileCount = 3500; + public static int maxWallOut2 = 5000; + public static int[] countX = new int[WorldGen.maxTileCount]; + public static int[] countY = new int[WorldGen.maxTileCount]; + public static int lavaCount = 0; + public static int iceCount = 0; + public static int rockCount = 0; + 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[470]; + public static int bestX = 0; + public static int bestY = 0; + public static int hiScore = 0; + public static int dungeonX; + public static int dungeonY; + public static Vector2 lastDungeonHall = Vector2.Zero; + public static int maxDRooms = 100; + public static int numDRooms = 0; + 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[300]; + private static int[] DDoorY = new int[300]; + private static int[] DDoorPos = new int[300]; + private static int numDPlats; + private static int[] DPlatX = new int[300]; + private static int[] DPlatY = new int[300]; + private static int JungleItemCount = 0; + private static int[] JChestX = new int[100]; + private static int[] JChestY = new int[100]; + private static int numJChests = 0; + public static int dEnteranceX = 0; + public static bool dSurface = false; + 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 = 0; + private static int houseCount = 0; + private static bool[] skyLake = new bool[30]; + private static int[] fihX = new int[30]; + private static int[] fihY = new int[30]; + private static int numMCaves = 0; + private static int[] mCaveX = new int[30]; + private static int[] mCaveY = new int[30]; + private static int JungleX = 0; + private static int hellChest = 0; + private static int[] hellChestItem = new int[5]; + 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; + private static bool currentlyTryingToUseAlternateHousingSpot = false; + public static TownNPCRoomCheckFailureReason roomCheckFailureReason = TownNPCRoomCheckFailureReason.None; + private static int[,] trapDiag = new int[4, 2]; + private static int tileCounterNum = 0; + 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 WorldGenParam_Evil = -1; + + 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)); + 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 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.prioritizedTownNPC)) + { + 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; + } + WorldGen.ScoreRoom(); + 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.prioritizedTownNPC = 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 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) + { + if (WorldGen.CheckSpecialTownNPCSpawningConditions(WorldGen.prioritizedTownNPC) && NPC.AnyNPCs(WorldGen.prioritizedTownNPC)) + return true; + int occupation = WorldGen.TownManager.FindOccupation(x, y); + if (occupation != -1 && Main.townNPCCanSpawn[occupation] && !NPC.AnyNPCs(occupation) && WorldGen.CheckSpecialTownNPCSpawningConditions(occupation)) + { + WorldGen.prioritizedTownNPC = occupation; + return true; + } + int num = -1; + for (int index = 0; index < 580; ++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 + { + WorldGen.prioritizedTownNPC = index; + return true; + } + } + } + if (num == -1) + return false; + WorldGen.prioritizedTownNPC = 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.zoneX / 2 / 16 - 1 - Lighting.offScreenTiles; + int num3 = WorldGen.roomX2 + Main.zoneX / 2 / 16 + 1 + Lighting.offScreenTiles; + int num4 = WorldGen.roomY1 - Main.zoneY / 2 / 16 - 1 - Lighting.offScreenTiles; + int num5 = WorldGen.roomY2 + Main.zoneY / 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.maxTilesX) + num5 = Main.maxTilesX; + for (int index1 = num2 + 1; index1 < num3; ++index1) + { + for (int index2 = num4 + 2; index2 < num5 + 2; ++index2) + { + if (Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 70 || Main.tile[index1, index2].type == (ushort) 71 || Main.tile[index1, index2].type == (ushort) 72)) + ++num1; + } + } + return num1 >= 100; + } + + 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: + NetMessage.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; + NetMessage.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.prioritizedTownNPC)) + return TownNPCSpawnResult.Blocked; + WorldGen.ScoreRoom(); + if (WorldGen.hiScore <= 0 || !WorldGen.IsThereASpawnablePrioritizedTownNPC(WorldGen.bestX, WorldGen.bestY)) + return TownNPCSpawnResult.Blocked; + int index1 = -1; + for (int index2 = 0; index2 < 200; ++index2) + { + if (Main.npc[index2].active && Main.npc[index2].homeless && Main.npc[index2].type == WorldGen.prioritizedTownNPC && WorldGen.CheckSpecialTownNPCSpawningConditions(Main.npc[index2].type)) + { + index1 = index2; + break; + } + } + if (index1 != -1) + { + Main.townNPCCanSpawn[WorldGen.prioritizedTownNPC] = false; + Main.npc[index1].homeTileX = WorldGen.bestX; + Main.npc[index1].homeTileY = WorldGen.bestY; + Main.npc[index1].homeless = false; + AchievementsHelper.NotifyProgressionEvent(8); + WorldGen.prioritizedTownNPC = 0; + return TownNPCSpawnResult.RelocatedHomeless; + } + if (index1 == -1) + { + Point roomPosition; + if (WorldGen.TownManager.HasRoom(WorldGen.prioritizedTownNPC, 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 index3 = WorldGen.bestX; + int index4 = WorldGen.bestY; + bool flag1 = false; + for (int index5 = 0; index5 < 200; ++index5) + { + NPC npc = Main.npc[index5]; + if (npc.active && npc.townNPC && !npc.homeless && npc.homeTileX == index3 && npc.homeTileY == index4) + { + flag1 = true; + break; + } + } + if (flag1) + return TownNPCSpawnResult.BlockedInfiHousing; + bool flag2 = false; + if (!flag2) + { + flag2 = 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 index6 = 0; index6 < (int) byte.MaxValue; ++index6) + { + if (Main.player[index6].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index6].position.X, (int) Main.player[index6].position.Y, Main.player[index6].width, Main.player[index6].height).Intersects(rectangle)) + { + flag2 = false; + break; + } + } + } + if (!flag2 && (double) index4 <= Main.worldSurface) + { + for (int index7 = 1; index7 < 500; ++index7) + { + for (int index8 = 0; index8 < 2; ++index8) + { + index3 = index8 != 0 ? WorldGen.bestX - index7 : WorldGen.bestX + index7; + if (index3 > 10 && index3 < Main.maxTilesX - 10) + { + int num1 = WorldGen.bestY - index7; + double num2 = (double) (WorldGen.bestY + index7); + if (num1 < 10) + num1 = 10; + if (num2 > Main.worldSurface) + num2 = Main.worldSurface; + for (int index9 = num1; (double) index9 < num2; ++index9) + { + index4 = index9; + if (Main.tile[index3, index4].nactive() && Main.tileSolid[(int) Main.tile[index3, index4].type]) + { + if (!Collision.SolidTiles(index3 - 1, index3 + 1, index4 - 3, index4 - 1)) + { + flag2 = 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 index10 = 0; index10 < (int) byte.MaxValue; ++index10) + { + if (Main.player[index10].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index10].position.X, (int) Main.player[index10].position.Y, Main.player[index10].width, Main.player[index10].height).Intersects(rectangle)) + { + flag2 = false; + break; + } + } + break; + } + break; + } + } + } + if (flag2) + break; + } + if (flag2) + break; + } + } + int index11 = NPC.NewNPC(index3 * 16, index4 * 16, WorldGen.prioritizedTownNPC, 1); + Main.townNPCCanSpawn[WorldGen.prioritizedTownNPC] = false; + Main.npc[index11].homeTileX = WorldGen.bestX; + Main.npc[index11].homeTileY = WorldGen.bestY; + if (index3 < WorldGen.bestX) + Main.npc[index11].direction = 1; + else if (index3 > WorldGen.bestX) + Main.npc[index11].direction = -1; + Main.npc[index11].netUpdate = true; + string fullName = Main.npc[index11].FullName; + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasArrived", (object) fullName), (byte) 50, (byte) 125); + break; + case 2: + NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", (object) Main.npc[index11].GetFullNetName()), new Color(50, 125, (int) byte.MaxValue)); + break; + } + AchievementsHelper.NotifyProgressionEvent(8); + if (Main.npc[index11].type == 160) + AchievementsHelper.NotifyProgressionEvent(18); + WorldGen.CheckAchievement_RealEstate(); + WorldGen.prioritizedTownNPC = 0; + } + return TownNPCSpawnResult.Successful; + } + + private static void CheckAchievement_RealEstate() + { + bool[] flagArray = new bool[580]; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type >= 0 && Main.npc[index].type < 580) + 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]) + 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) + { + if (Main.npc[npc].homeTileX <= 10 || Main.npc[npc].homeTileY <= 10 || Main.npc[npc].homeTileX >= Main.maxTilesX - 10 || Main.npc[npc].homeTileY >= Main.maxTilesY) + return; + 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); + if (WorldGen.canSpawn && WorldGen.hiScore > 0) + { + for (int index = 0; index < 200; ++index) + { + if (index != npc) + { + NPC npc1 = Main.npc[index]; + if (npc1.active && npc1.townNPC && !npc1.homeless && npc1.homeTileX == WorldGen.bestX && npc1.homeTileY == WorldGen.bestY) + { + WorldGen.canSpawn = false; + break; + } + } + } + } + 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; + } + + private static bool ScoreRoom_IsThisRoomOccupiedBySomeone(int ignoreNPC = -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]) + { + 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) + { + WorldGen.roomOccupied = false; + WorldGen.roomEvil = false; + if (WorldGen.ScoreRoom_IsThisRoomOccupiedBySomeone(ignoreNPC)) + { + WorldGen.roomOccupied = true; + WorldGen.hiScore = -1; + } + else + { + WorldGen.hiScore = 0; + int num1 = 50; + int num2 = 40; + int num3 = WorldGen.roomX1 - Main.zoneX / 2 / 16 - 1 - num2; + int num4 = WorldGen.roomX2 + Main.zoneX / 2 / 16 + 1 + num2; + int num5 = WorldGen.roomY1 - Main.zoneY / 2 / 16 - 1 - num2; + int num6 = WorldGen.roomY2 + Main.zoneY / 2 / 16 + 1 + num2; + if (num3 < 0) + num3 = 0; + if (num4 >= Main.maxTilesX) + num4 = Main.maxTilesX - 1; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY - 1; + int[] tileTypeCounts = new int[470]; + 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 i = roomX1 + 1; i < roomX2; ++i) + { + for (int j = roomY1 + 2; j < roomY2 + 2; ++j) + { + if (Main.tile[i, j].nactive()) + { + int num9 = num8; + if (Main.tileSolid[(int) Main.tile[i, j].type] && !Main.tileSolidTop[(int) Main.tile[i, j].type] && !Collision.SolidTiles(i - 1, i + 1, j - 3, j - 1) && Main.tile[i - 1, j].nactive() && Main.tileSolid[(int) Main.tile[i - 1, j].type] && Main.tile[i + 1, j].nactive() && Main.tileSolid[(int) Main.tile[i + 1, j].type]) + { + int num10 = 0; + int num11 = 0; + for (int x = i - 2; x < i + 3; ++x) + { + for (int y = j - 4; y < j; ++y) + { + if (Main.tile[x, y].nactive()) + { + if (x == i) + { + ++num10; + } + else + { + Tile tile = Main.tile[x, y]; + 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 (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(i, j); + bool[] flagArray = new bool[3]; + for (int index = 1; index <= 3; ++index) + { + if (!Main.tile[i, j - index].active() || !Main.tileSolid[(int) Main.tile[i, j - index].type]) + flagArray[index - 1] = true; + if (!WorldGen.Housing_CheckIfInRoom(i, j - index)) + flagArray[index - 1] = false; + } + foreach (bool flag2 in flagArray) + { + if (!flag2) + { + flag1 = false; + break; + } + } + if (flag1 && !WorldGen.Housing_CheckIfIsCeiling(i, j)) + { + WorldGen.hiScore = num9; + WorldGen.bestX = i; + WorldGen.bestY = j; + } + } + } + } + } + } + } + } + } + + private static void ScoreRoom_CountEvilTilesOld( + ref int startScore, + int startX, + int endX, + int startY, + int endY) + { + int num = 0; + for (int index1 = startX + 1; index1 < endX; ++index1) + { + for (int index2 = startY + 2; index2 < endY + 2; ++index2) + { + if (Main.tile[index1, index2].active()) + { + if (Main.tile[index1, index2].type == (ushort) 23 || Main.tile[index1, index2].type == (ushort) 24 || Main.tile[index1, index2].type == (ushort) 25 || Main.tile[index1, index2].type == (ushort) 32 || Main.tile[index1, index2].type == (ushort) 112 || Main.tile[index1, index2].type == (ushort) 163) + ++num; + else if (Main.tile[index1, index2].type == (ushort) 199 || Main.tile[index1, index2].type == (ushort) 201 || Main.tile[index1, index2].type == (ushort) 200 || Main.tile[index1, index2].type == (ushort) 203 || Main.tile[index1, index2].type == (ushort) 234) + ++num; + else if (Main.tile[index1, index2].type == (ushort) 27) + num -= 5; + else if (Main.tile[index1, index2].type == (ushort) 109 || Main.tile[index1, index2].type == (ushort) 110 || Main.tile[index1, index2].type == (ushort) 113 || Main.tile[index1, index2].type == (ushort) 116 || Main.tile[index1, index2].type == (ushort) 164) + --num; + } + } + } + if (num < 50) + num = 0; + startScore -= num; + } + + 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 < 470; ++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]) + { + 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) + { + 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) + { + 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() && TileID.Sets.BasicChest[(int) Main.tile[index1, index2].type]) + return false; + } + } + 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 (Main.tile[i1, j1].type == (ushort) 5 || Main.tile[i1, j1].type == (ushort) 32 || Main.tile[i1, j1].type == (ushort) 352) + 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 (Main.tile[i2, j2].type == (ushort) 5 || Main.tile[i2, j2].type == (ushort) 32 || Main.tile[i2, j2].type == (ushort) 352) + 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 (Main.tile[i3, j3].type == (ushort) 5 || Main.tile[i3, j3].type == (ushort) 32 || Main.tile[i3, j3].type == (ushort) 352) + 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) + NetMessage.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) + { + Main.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; + Main.PlaySound(10); + } + + public static void CreateNewWorld(GenerationProgress progress = null) + { + Main.rand = new UnifiedRandom(Main.ActiveWorldFileData.Seed); + ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.worldGenCallBack), (object) progress); + } + + public static void SaveAndQuitCallBack(object threadContext) + { + try + { + Main.PlaySound(34, Style: 0); + Main.PlaySound(35, Style: 0); + } + catch + { + } + if (Main.netMode == 0) + WorldFile.CacheSaveTime(); + Main.invasionProgress = 0; + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + Main.menuMode = 10; + Main.gameMenu = true; + Main.StopTrackedSounds(); + CaptureInterface.ResetFocus(); + Main.ActivePlayerFileData.StopPlayTimer(); + Player.SavePlayer(Main.ActivePlayerFileData); + if (Main.netMode == 0) + { + WorldFile.saveWorld(); + Main.PlaySound(10); + } + else + { + Netplay.disconnect = true; + Main.netMode = 0; + } + Main.fastForwardTime = false; + Main.UpdateSundial(); + Main.menuMode = 0; + if (threadContext == null) + return; + ((Action) threadContext)(); + } + + public static void SaveAndQuit(Action callback = null) + { + Main.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(); + Main.player[Main.myPlayer].Update(Main.myPlayer); + Main.ActivePlayerFileData.StartPlayTimer(); + WorldGen._lastSeed = Main.ActiveWorldFileData.Seed; + Player.Hooks.EnterWorld(Main.myPlayer); + WorldFile.SetOngoingToTemps(); + Main.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(object threadContext) + { + 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; + Main.PlaySound(10); + Netplay.StartServer(); + WorldFile.SetOngoingToTemps(); + WorldGen.Hooks.WorldLoaded(); + } + + public static void serverLoadWorld() => ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.serverLoadWorldCallBack), (object) 1); + + public static void clearWorld() + { + 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.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.sundialCooldown = 0; + Main.fastForwardTime = false; + BirthdayParty.WorldClear(); + Sandstorm.WorldClear(); + Main.UpdateSundial(); + Main.wof = -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.prioritizedTownNPC = 0; + WorldGen.shadowOrbCount = 0; + WorldGen.altarCount = 0; + WorldGen.oreTier1 = -1; + WorldGen.oreTier2 = -1; + WorldGen.oreTier3 = -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.savedStylist = false; + NPC.savedGoblin = false; + NPC.savedWizard = false; + NPC.savedMech = false; + NPC.savedTaxCollector = false; + NPC.savedAngler = false; + NPC.savedBartender = 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(); + 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(); + } + } + } + CombatText.clearAll(); + for (int index = 0; index < 6000; ++index) + { + Main.dust[index] = new Dust(); + Main.dust[index].dustIndex = index; + } + for (int index = 0; index < 500; ++index) + Main.gore[index] = new Gore(); + for (int index = 0; index < 400; ++index) + { + Main.item[index] = new Item(); + Main.itemLockoutTime[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 < 1000; ++index) + Main.chest[index] = (Chest) null; + for (int index = 0; index < 1000; ++index) + Main.sign[index] = (Sign) null; + for (int index = 0; index < Liquid.resLiquid; ++index) + Main.liquid[index] = new Liquid(); + for (int index = 0; index < 10000; ++index) + Main.liquidBuffer[index] = new LiquidBuffer(); + WorldGen.setWorldSize(); + WorldGen.worldCleared = true; + } + + public static void setBG(int bg, int style) + { + switch (bg) + { + case 0: + WorldGen.treeBG = style; + Main.treeMntBG[0] = 7; + Main.treeMntBG[1] = 8; + switch (style) + { + case 1: + Main.treeBG[0] = 50; + Main.treeBG[1] = 51; + Main.treeBG[2] = 52; + return; + case 2: + Main.treeBG[0] = 53; + Main.treeBG[1] = 54; + Main.treeBG[2] = 55; + return; + case 3: + Main.treeMntBG[1] = 90; + Main.treeBG[0] = 91; + Main.treeBG[1] = -1; + Main.treeBG[2] = 92; + return; + case 4: + Main.treeMntBG[0] = 93; + Main.treeMntBG[1] = 94; + Main.treeBG[0] = -1; + Main.treeBG[1] = -1; + Main.treeBG[2] = -1; + return; + case 5: + Main.treeMntBG[0] = 93; + Main.treeMntBG[1] = 94; + Main.treeBG[0] = -1; + Main.treeBG[1] = -1; + Main.treeBG[2] = 55; + return; + case 6: + Main.treeMntBG[0] = 171; + Main.treeMntBG[1] = 172; + Main.treeBG[0] = 173; + Main.treeBG[1] = -1; + Main.treeBG[2] = -1; + return; + case 7: + Main.treeMntBG[0] = 176; + Main.treeMntBG[1] = 177; + Main.treeBG[0] = 178; + Main.treeBG[1] = -1; + Main.treeBG[2] = -1; + return; + case 8: + Main.treeMntBG[0] = 179; + Main.treeMntBG[1] = 180; + Main.treeBG[0] = 184; + Main.treeBG[1] = -1; + Main.treeBG[2] = -1; + return; + case 31: + Main.treeMntBG[1] = 90; + Main.treeBG[0] = 91; + Main.treeBG[1] = -1; + Main.treeBG[2] = 11; + return; + case 51: + Main.treeMntBG[0] = 93; + Main.treeMntBG[1] = 94; + Main.treeBG[0] = -1; + Main.treeBG[1] = -1; + Main.treeBG[2] = 11; + return; + case 71: + Main.treeMntBG[0] = 176; + Main.treeMntBG[1] = 177; + Main.treeBG[0] = 178; + Main.treeBG[1] = -1; + Main.treeBG[2] = 11; + return; + case 72: + Main.treeMntBG[0] = 176; + Main.treeMntBG[1] = 177; + Main.treeBG[0] = 178; + Main.treeBG[1] = -1; + Main.treeBG[2] = 52; + return; + case 73: + Main.treeMntBG[0] = 176; + Main.treeMntBG[1] = 177; + Main.treeBG[0] = 178; + Main.treeBG[1] = -1; + Main.treeBG[2] = 55; + return; + default: + Main.treeBG[0] = 9; + Main.treeBG[1] = 10; + Main.treeBG[2] = 11; + return; + } + case 1: + WorldGen.corruptBG = style; + if (style == 1) + { + Main.corruptBG[0] = 56; + Main.corruptBG[1] = 57; + Main.corruptBG[2] = 58; + break; + } + Main.corruptBG[0] = 12; + Main.corruptBG[1] = 13; + Main.corruptBG[2] = 14; + break; + case 2: + WorldGen.jungleBG = style; + if (style == 1) + { + Main.jungleBG[0] = 59; + Main.jungleBG[1] = 60; + Main.jungleBG[2] = 61; + break; + } + Main.jungleBG[0] = 15; + Main.jungleBG[1] = 16; + Main.jungleBG[2] = 17; + break; + 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 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; + if (style == 1) + { + Main.hallowBG[0] = 102; + Main.hallowBG[1] = 103; + Main.hallowBG[2] = 104; + break; + } + Main.hallowBG[0] = 29; + Main.hallowBG[1] = 30; + Main.hallowBG[2] = 31; + break; + case 5: + WorldGen.crimsonBG = style; + if (style == 1) + { + Main.crimsonBG[0] = 105; + Main.crimsonBG[1] = 106; + Main.crimsonBG[2] = 107; + } + if (style == 2) + { + Main.crimsonBG[0] = 174; + Main.crimsonBG[1] = -1; + Main.crimsonBG[2] = 175; + break; + } + Main.crimsonBG[0] = 43; + Main.crimsonBG[1] = 44; + Main.crimsonBG[2] = 45; + break; + case 6: + WorldGen.desertBG = style; + if (style == 1) + { + Main.desertBG[0] = 108; + Main.desertBG[1] = 109; + break; + } + Main.desertBG[0] = 21; + Main.desertBG[1] = 20; + break; + case 7: + WorldGen.oceanBG = style; + if (style == 1) + { + Main.oceanBG = 110; + break; + } + if (style == 2) + { + Main.oceanBG = 111; + break; + } + Main.oceanBG = 28; + break; + } + } + + public static void RandomizeWeather() + { + if (Main.cloudLimit < 10) + return; + Main.numClouds = WorldGen.genRand.Next(10, Main.cloudLimit); + Main.windSpeed = 0.0f; + while ((double) Main.windSpeed == 0.0) + { + Main.windSpeed = (float) WorldGen.genRand.Next(-100, 101) * 0.01f; + Main.windSpeedSet = Main.windSpeed; + } + Cloud.resetClouds(); + } + + public static void RandomizeMoonState() => Main.moonType = WorldGen.genRand.Next(Main.maxMoons); + + public static void RandomizeBackgrounds() + { + WorldGen.treeBG = WorldGen.genRand.Next(9); + if ((WorldGen.treeBG == 1 || WorldGen.treeBG == 2) && WorldGen.genRand.Next(2) == 0) + WorldGen.treeBG = WorldGen.genRand.Next(7); + if (WorldGen.treeBG == 0) + WorldGen.treeBG = WorldGen.genRand.Next(7); + if (WorldGen.treeBG == 3 && WorldGen.genRand.Next(3) == 0) + WorldGen.treeBG = 31; + if (WorldGen.treeBG == 5 && WorldGen.genRand.Next(2) == 0) + WorldGen.treeBG = 51; + if (WorldGen.treeBG == 7 && WorldGen.genRand.Next(4) == 0) + WorldGen.treeBG = WorldGen.genRand.Next(71, 74); + WorldGen.setBG(0, WorldGen.treeBG); + WorldGen.setBG(1, WorldGen.genRand.Next(2)); + WorldGen.setBG(2, WorldGen.genRand.Next(2)); + WorldGen.snowBG = WorldGen.genRand.Next(6); + if (WorldGen.snowBG == 2 && WorldGen.genRand.Next(2) == 0) + WorldGen.snowBG = WorldGen.genRand.Next(2) != 0 ? 22 : 21; + if (WorldGen.snowBG == 3 && WorldGen.genRand.Next(2) == 0) + WorldGen.snowBG = WorldGen.genRand.Next(2) != 0 ? 32 : 31; + if (WorldGen.snowBG == 4 && WorldGen.genRand.Next(2) == 0) + WorldGen.snowBG = WorldGen.genRand.Next(2) != 0 ? 42 : 41; + WorldGen.setBG(3, WorldGen.snowBG); + WorldGen.setBG(4, WorldGen.genRand.Next(2)); + WorldGen.setBG(5, WorldGen.genRand.Next(3)); + WorldGen.setBG(6, WorldGen.genRand.Next(2)); + WorldGen.setBG(7, WorldGen.genRand.Next(3)); + } + + 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; + 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; + 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); + 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.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.numDPlats = 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 i1 = x2; + int j1 = y2; + while (!WorldGen.SolidTile(i1, j1)) + { + ++j1; + if (j1 >= Main.maxTilesY - 300) + return false; + } + if (Main.tile[i1, j1].type == (ushort) 232) + return false; + int j2 = j1 - 1; + if (Main.tile[i1, j2].liquid > (byte) 0 && Main.tile[i1, j2].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[i1, j2].nactive() || Main.tile[i1 - 1, j2].nactive() || Main.tile[i1 + 1, j2].nactive() || Main.tile[i1, j2 - 1].nactive() || Main.tile[i1 - 1, j2 - 1].nactive() || Main.tile[i1 + 1, j2 - 1].nactive() || Main.tile[i1, j2 - 2].nactive() || Main.tile[i1 - 1, j2 - 2].nactive() || Main.tile[i1 + 1, j2 - 2].nactive() || Main.tile[i1, j2 + 1].type == (ushort) 48 || Main.tile[i1, j2 + 1].type == (ushort) 232) + return false; + switch (num1) + { + case 0: + int i2 = i1; + int j3 = j2 - WorldGen.genRand.Next(3); + while (!WorldGen.SolidTile(i2, j3)) + --i2; + int i3 = i2; + int i4 = i1; + while (!WorldGen.SolidTile(i4, j3)) + ++i4; + int i5 = i4; + int num2 = i1 - i3; + int num3 = i5 - i1; + bool flag1 = false; + bool flag2 = false; + if (num2 > 5 && num2 < 50) + flag1 = true; + if (num3 > 5 && num3 < 50) + flag2 = true; + if (flag1 && !WorldGen.SolidTile(i3, j3 + 1)) + flag1 = false; + if (flag2 && !WorldGen.SolidTile(i5, j3 + 1)) + flag2 = false; + if (flag1 && (Main.tile[i3, j3].type == (ushort) 10 || Main.tile[i3, j3].type == (ushort) 48 || Main.tile[i3, j3 + 1].type == (ushort) 10 || Main.tile[i3, j3 + 1].type == (ushort) 48)) + flag1 = false; + if (flag2 && (Main.tile[i5, j3].type == (ushort) 10 || Main.tile[i5, j3].type == (ushort) 48 || Main.tile[i5, j3 + 1].type == (ushort) 10 || Main.tile[i5, j3 + 1].type == (ushort) 48)) + flag2 = false; + int num4; + int i6; + if (flag1 & flag2) + { + num4 = 1; + i6 = i3; + if (WorldGen.genRand.Next(2) == 0) + { + i6 = i5; + num4 = -1; + } + } + else if (flag2) + { + i6 = i5; + num4 = -1; + } + else + { + if (!flag1) + return false; + i6 = i3; + num4 = 1; + } + if (Main.tile[i6, j3].wall != (byte) 87 || Main.tile[i6, j3].type == (ushort) 190 || Main.tile[i6, j3].type == (ushort) 135 || Main.tile[i6, j3].type == (ushort) 137 || Main.tile[i6, j3].type == (ushort) 232) + return false; + WorldGen.PlaceTile(i1, j2, 135, true, true, style: 6); + WorldGen.KillTile(i6, j3); + int num5 = WorldGen.genRand.Next(3); + if (Main.tile[i1, j2].wire()) + num5 = 0; + if (Main.tile[i1, j2].wire2()) + num5 = 1; + if (Main.tile[i1, j2].wire3()) + num5 = 2; + int num6 = Math.Abs(i6 - i1); + int style1 = 1; + if (num6 < 10 && WorldGen.genRand.Next(3) != 0) + style1 = 2; + WorldGen.PlaceTile(i6, j3, 137, true, true, style: style1); + if (num4 == 1) + Main.tile[i6, j3].frameX += (short) 18; + int num7 = WorldGen.genRand.Next(5); + int j4 = j3; + while (num7 > 0) + { + --num7; + --j4; + if (WorldGen.SolidTile(i6, j4) && WorldGen.SolidTile(i6 - num4, j4) && !WorldGen.SolidTile(i6 + num4, j4)) + { + WorldGen.PlaceTile(i6, j4, 137, true, true, style: style1); + if (num4 == 1) + Main.tile[i6, j4].frameX += (short) 18; + switch (num5) + { + case 0: + Main.tile[i6, j4].wire(true); + continue; + case 1: + Main.tile[i6, j4].wire2(true); + continue; + case 2: + Main.tile[i6, j4].wire3(true); + continue; + default: + continue; + } + } + else + break; + } + int index1 = i1; + int index2 = j2; + while (index1 != i6 || index2 != j3) + { + switch (num5) + { + case 0: + Main.tile[index1, index2].wire(true); + break; + case 1: + Main.tile[index1, index2].wire2(true); + break; + case 2: + Main.tile[index1, index2].wire3(true); + break; + } + if (index1 > i6) + --index1; + if (index1 < i6) + ++index1; + switch (num5) + { + case 0: + Main.tile[index1, index2].wire(true); + break; + case 1: + Main.tile[index1, index2].wire2(true); + break; + case 2: + Main.tile[index1, index2].wire3(true); + break; + } + if (index2 > j3) + --index2; + if (index2 < j3) + ++index2; + switch (num5) + { + case 0: + Main.tile[index1, index2].wire(true); + continue; + case 1: + Main.tile[index1, index2].wire2(true); + continue; + case 2: + Main.tile[index1, index2].wire3(true); + continue; + default: + continue; + } + } + return true; + case 1: + int i7 = i1; + int j5 = j2; + while (!WorldGen.SolidTile(i7, j5)) + { + --j5; + if ((double) j5 < Main.worldSurface) + return false; + } + int num8 = Math.Abs(j5 - j2); + if (num8 < 3) + return false; + int num9 = WorldGen.genRand.Next(3); + if (Main.tile[i1, j2].wire()) + num9 = 0; + if (Main.tile[i1, j2].wire2()) + num9 = 1; + if (Main.tile[i1, j2].wire3()) + num9 = 2; + int style2 = 3; + if (num8 < 16 && WorldGen.genRand.Next(3) != 0) + style2 = 4; + if (Main.tile[i7, j5].type == (ushort) 135 || Main.tile[i7, j5].type == (ushort) 137 || Main.tile[i7, j5].type == (ushort) 232 || Main.tile[i7, j5].wall != (byte) 87) + return false; + WorldGen.PlaceTile(i1, j2, 135, true, true, style: 6); + WorldGen.PlaceTile(i7, j5, 137, true, true, style: style2); + for (int index3 = 0; index3 < 2; ++index3) + { + int num10 = WorldGen.genRand.Next(1, 5); + int i8 = i7; + int num11 = -1; + if (index3 == 1) + num11 = 1; + while (num10 > 0) + { + --num10; + i8 += num11; + if (WorldGen.SolidTile(i8, j5 - 1) && !WorldGen.SolidTile(i8, j5 + 1)) + { + WorldGen.PlaceTile(i8, j5, 137, true, true, style: style2); + switch (num9) + { + case 0: + Main.tile[i8, j5].wire(true); + continue; + case 1: + Main.tile[i8, j5].wire2(true); + continue; + case 2: + Main.tile[i8, j5].wire3(true); + continue; + default: + continue; + } + } + else + break; + } + } + int index4 = i1; + int index5 = j2; + while (index4 != i7 || index5 != j5) + { + switch (num9) + { + 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 > i7) + --index4; + if (index4 < i7) + ++index4; + switch (num9) + { + 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 > j5) + --index5; + if (index5 < j5) + ++index5; + switch (num9) + { + 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; + default: + 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 - 300) + flag2 = true; + } + int index2 = j1 - 1; + if (Main.tile[index1, index2].wall == (byte) 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)) + --i1; + int i2 = i1; + int i3 = index1; + while (!WorldGen.SolidTile(i3, j2)) + ++i3; + 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 > (byte) 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 num5 = index2 - 8; + int i6 = num4 + WorldGen.genRand.Next(-1, 2); + bool flag5 = true; + while (flag5) + { + bool flag6 = true; + int num6 = 0; + for (int i7 = i6 - 2; i7 <= i6 + 3; ++i7) + { + for (int j3 = num5; j3 <= num5 + 3; ++j3) + { + if (!WorldGen.SolidTile(i7, j3)) + flag6 = false; + if (Main.tile[i7, j3].active() && (Main.tile[i7, j3].type == (ushort) 0 || Main.tile[i7, j3].type == (ushort) 1 || Main.tile[i7, j3].type == (ushort) 59)) + ++num6; + } + } + --num5; + if ((double) num5 < Main.worldSurface) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + if (flag6 && num6 > 2) + flag5 = false; + } + if (index2 - num5 <= 5 || index2 - num5 >= 40) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + for (int i8 = i6; i8 <= i6 + 1; ++i8) + { + for (int j4 = num5; j4 <= index2; ++j4) + { + if (WorldGen.SolidTile(i8, j4)) + WorldGen.KillTile(i8, j4); + } + } + for (int i9 = i6 - 2; i9 <= i6 + 3; ++i9) + { + for (int j5 = num5 - 2; j5 <= num5 + 3; ++j5) + { + if (WorldGen.SolidTile(i9, j5)) + Main.tile[i9, j5].type = (ushort) 1; + } + } + WorldGen.PlaceTile(index1, index2, 135, true, true, style: WorldGen.genRand.Next(2, 4)); + WorldGen.PlaceTile(i6, num5 + 2, 130, true); + WorldGen.PlaceTile(i6 + 1, num5 + 2, 130, true); + WorldGen.PlaceTile(i6 + 1, num5 + 1, 138, true); + int index7 = num5 + 2; + Main.tile[i6, index7].wire(true); + Main.tile[i6 + 1, index7].wire(true); + int j6 = index7 + 1; + WorldGen.PlaceTile(i6, j6, 130, true); + WorldGen.PlaceTile(i6 + 1, j6, 130, true); + Main.tile[i6, j6].wire(true); + Main.tile[i6 + 1, j6].wire(true); + WorldGen.PlaceTile(i6, j6 + 1, 130, true); + WorldGen.PlaceTile(i6 + 1, j6 + 1, 130, true); + Main.tile[i6, j6 + 1].wire(true); + Main.tile[i6 + 1, j6 + 1].wire(true); + int index8 = index1; + int index9 = index2; + while (index8 != i6 || index9 != j6) + { + Main.tile[index8, index9].wire(true); + if (index8 > i6) + --index8; + if (index8 < i6) + ++index8; + Main.tile[index8, index9].wire(true); + if (index9 > j6) + --index9; + if (index9 < j6) + ++index9; + Main.tile[index8, index9].wire(true); + } + ++WorldGen.trapDiag[type, 1]; + return true; + } + if (type == 2) + { + int num = WorldGen.genRand.Next(4, 7); + int i10 = index1 + WorldGen.genRand.Next(-1, 2); + int j7 = index2; + for (int index10 = 0; index10 < num; ++index10) + { + ++j7; + if (!WorldGen.SolidTile(i10, j7)) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + } + for (int i11 = i10 - 2; i11 <= i10 + 2; ++i11) + { + for (int j8 = j7 - 2; j8 <= j7 + 2; ++j8) + { + if (!WorldGen.SolidTile(i11, j8)) + return false; + } + } + WorldGen.KillTile(i10, j7); + Main.tile[i10, j7].active(true); + Main.tile[i10, j7].type = (ushort) 141; + Main.tile[i10, j7].frameX = (short) 0; + Main.tile[i10, j7].frameY = (short) (18 * WorldGen.genRand.Next(2)); + WorldGen.PlaceTile(index1, index2, 135, true, true, style: WorldGen.genRand.Next(2, 4)); + int index11 = index1; + int index12 = index2; + while (index11 != i10 || index12 != j7) + { + Main.tile[index11, index12].wire(true); + if (index11 > i10) + --index11; + if (index11 < i10) + ++index11; + Main.tile[index11, index12].wire(true); + if (index12 > j7) + --index12; + if (index12 < j7) + ++index12; + Main.tile[index11, index12].wire(true); + } + ++WorldGen.trapDiag[type, 1]; + } + else if (type == 3) + { + int num7 = 0; + int num8 = 0; + for (int index13 = 0; index13 < 4; ++index13) + { + if (num7 < 2 && WorldGen.genRand.Next(5) == 0) + { + ++num7; + } + else + { + int num9 = index1; + int j9 = index2; + bool flag7 = false; + int i12 = num8 != 0 ? num9 + WorldGen.genRand.Next(-15, 16) : num9 + WorldGen.genRand.Next(-1, 2); + int num10 = WorldGen.genRand.Next(3, 6 + (num8 > 0).ToInt() * 3); + for (int index14 = 0; index14 < num10; ++index14) + { + ++j9; + if (!WorldGen.SolidTile(i12, j9)) + { + ++WorldGen.trapDiag[type, 0]; + flag7 = true; + break; + } + } + if (!flag7) + { + int num11 = 2; + for (int i13 = i12 - num11; i13 <= i12 + num11; ++i13) + { + for (int j10 = j9 - num11; j10 <= j9 + num11; ++j10) + { + if (!WorldGen.SolidTile(i13, j10)) + { + ++WorldGen.trapDiag[type, 0]; + flag7 = true; + break; + } + } + if (flag7) + break; + } + if (!flag7) + { + int num12 = 10; + for (int i14 = i12; i14 <= i12 + 1; ++i14) + { + int j11 = j9; + while (j11 > j9 - 20 && WorldGen.SolidTile(i14, j11)) + --j11; + for (int j12 = j11 - num12; j12 <= j11; ++j12) + { + if (WorldGen.SolidTile(i14, j12)) + { + ++WorldGen.trapDiag[type, 0]; + flag7 = true; + break; + } + } + if (flag7) + break; + } + if (!flag7) + { + WorldGen.KillTile(i12, j9); + WorldGen.KillTile(i12 + 1, j9); + int num13 = WorldGen.genRand.Next(2); + for (int index15 = 0; index15 < 2; ++index15) + { + Main.tile[i12 + index15, j9].active(true); + Main.tile[i12 + index15, j9].type = (ushort) 443; + Main.tile[i12 + index15, j9].frameX = (short) (18 * index15 + 36 * num13); + Main.tile[i12 + index15, j9].frameY = (short) 0; + } + WorldGen.PlaceTile(index1, index2, 135, true, true, style: WorldGen.genRand.Next(2, 4)); + int index16 = index1; + int index17 = index2; + while (index16 != i12 || index17 != j9) + { + Main.tile[index16, index17].wire(true); + if (index16 > i12) + --index16; + if (index16 < i12) + ++index16; + Main.tile[index16, index17].wire(true); + if (index17 > j9) + --index17; + if (index17 < j9) + ++index17; + Main.tile[index16, index17].wire(true); + } + ++num8; + ++WorldGen.trapDiag[type, 1]; + } + } + } + } + } + } + return false; + } + + public static int countTiles(int x, int y, bool jungle = false, bool lavaOk = false) + { + WorldGen.numTileCount = 0; + WorldGen.lavaCount = 0; + WorldGen.iceCount = 0; + WorldGen.rockCount = 0; + 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 + { + for (int index = 0; index < WorldGen.numTileCount; ++index) + { + if (WorldGen.countX[index] == x && WorldGen.countY[index] == y) + return; + } + if (!jungle) + { + if (Main.tile[x, y].wall != (byte) 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) 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.countX[WorldGen.numTileCount] = x; + WorldGen.countY[WorldGen.numTileCount] = y; + ++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.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 + { + for (int index = 0; index < WorldGen.numTileCount; ++index) + { + if (WorldGen.countX[index] == x && WorldGen.countY[index] == 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 == (byte) 78 || Main.tile[x, y].wall == (byte) 83 || Main.tile[x, y].wall == (byte) 3) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + } + else + { + if (WorldGen.SolidTile(x, y) || Main.tile[x, y].wall != (byte) 2 && Main.tile[x, y].wall != (byte) 59) + return; + WorldGen.countX[WorldGen.numTileCount] = x; + WorldGen.countY[WorldGen.numTileCount] = y; + ++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.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 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 = (byte) (54 + WorldGen.mossType[index]); + WorldGen.mossTile = (byte) (179 + WorldGen.mossType[index]); + } + + 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(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 > (byte) 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; + } + + public static void generateWorld(int seed, GenerationProgress customProgressObject = null) + { + WorldGen._lastSeed = seed; + WorldGen._generator = new WorldGenerator(seed); + Main.rand = new UnifiedRandom(seed); + MicroBiome.ResetAll(); + StructureMap structures = new StructureMap(); + double worldSurface = 0.0; + WorldGen.worldSurfaceLow = 0.0; + double worldSurfaceHigh = 0.0; + double rockLayer = 0.0; + double rockLayerLow = 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 howFar = 0; + int[] PyrX = (int[]) null; + int[] PyrY = (int[]) null; + int numPyr = 0; + 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; + 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; + } + } + } + WorldGen.AddGenerationPass("Reset", (WorldGenLegacyMethod) (progress => + { + Liquid.ReInit(); + WorldGen.noTileActions = true; + progress.Message = ""; + WorldGen.SetupStatueList(); + WorldGen.RandomizeWeather(); + Main.cloudAlpha = 0.0f; + Main.maxRaining = 0.0f; + WorldFile.tempMaxRain = 0.0f; + Main.raining = false; + WorldGen.heartCount = 0; + Main.checkXMas(); + Main.checkHalloween(); + WorldGen.gen = true; + WorldGen.ResetGenerator(); + WorldGen.numLarva = 0; + int num = 86400; + Main.slimeRainTime = (double) -WorldGen.genRand.Next(num * 2, num * 3); + Main.cloudBGActive = (float) -WorldGen.genRand.Next(8640, 86400); + WorldGen.CopperTierOre = (ushort) 7; + WorldGen.IronTierOre = (ushort) 6; + WorldGen.SilverTierOre = (ushort) 9; + WorldGen.GoldTierOre = (ushort) 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.CopperTierOre = (ushort) 166; + } + if (WorldGen.genRand.Next(2) == 0) + { + iron = 167; + WorldGen.ironBar = 704; + WorldGen.IronTierOre = (ushort) 167; + } + if (WorldGen.genRand.Next(2) == 0) + { + silver = 168; + WorldGen.silverBar = 705; + WorldGen.SilverTierOre = (ushort) 168; + } + if (WorldGen.genRand.Next(2) == 0) + { + gold = 169; + WorldGen.goldBar = 706; + WorldGen.GoldTierOre = (ushort) 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.RandomizeMoonState(); + dungeonSide = WorldGen.genRand.Next(2) == 0 ? -1 : 1; + })); + WorldGen.AddGenerationPass("Terrain", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[0].Value; + int num1 = 0; + int num2 = 0; + worldSurface = (double) Main.maxTilesY * 0.3; + worldSurface *= (double) WorldGen.genRand.Next(90, 110) * 0.005; + rockLayer = worldSurface + (double) Main.maxTilesY * 0.2; + rockLayer *= (double) WorldGen.genRand.Next(90, 110) * 0.01; + WorldGen.worldSurfaceLow = worldSurface; + worldSurfaceHigh = worldSurface; + rockLayerLow = rockLayer; + rockLayerHigh = rockLayer; + for (int index3 = 0; index3 < Main.maxTilesX; ++index3) + { + float num3 = (float) index3 / (float) Main.maxTilesX; + progress.Set(num3); + if (worldSurface < WorldGen.worldSurfaceLow) + WorldGen.worldSurfaceLow = worldSurface; + if (worldSurface > worldSurfaceHigh) + worldSurfaceHigh = worldSurface; + if (rockLayer < rockLayerLow) + rockLayerLow = rockLayer; + if (rockLayer > rockLayerHigh) + rockLayerHigh = rockLayer; + if (num2 <= 0) + { + num1 = WorldGen.genRand.Next(0, 5); + num2 = WorldGen.genRand.Next(5, 40); + if (num1 == 0) + num2 *= (int) ((double) WorldGen.genRand.Next(5, 30) * 0.2); + } + --num2; + if ((double) index3 > (double) Main.maxTilesX * 0.43 && (double) index3 < (double) Main.maxTilesX * 0.57 && num1 >= 3) + num1 = WorldGen.genRand.Next(3); + if ((double) index3 > (double) Main.maxTilesX * 0.47 && (double) index3 < (double) Main.maxTilesX * 0.53) + num1 = 0; + switch (num1) + { + case 0: + while (WorldGen.genRand.Next(0, 7) == 0) + worldSurface += (double) WorldGen.genRand.Next(-1, 2); + break; + case 1: + while (WorldGen.genRand.Next(0, 4) == 0) + --worldSurface; + while (WorldGen.genRand.Next(0, 10) == 0) + ++worldSurface; + break; + case 2: + while (WorldGen.genRand.Next(0, 4) == 0) + ++worldSurface; + while (WorldGen.genRand.Next(0, 10) == 0) + --worldSurface; + break; + case 3: + while (WorldGen.genRand.Next(0, 2) == 0) + --worldSurface; + while (WorldGen.genRand.Next(0, 6) == 0) + ++worldSurface; + break; + case 4: + while (WorldGen.genRand.Next(0, 2) == 0) + ++worldSurface; + while (WorldGen.genRand.Next(0, 5) == 0) + --worldSurface; + break; + } + if (worldSurface < (double) Main.maxTilesY * 0.17) + { + worldSurface = (double) Main.maxTilesY * 0.17; + num2 = 0; + } + else if (worldSurface > (double) Main.maxTilesY * 0.3) + { + worldSurface = (double) Main.maxTilesY * 0.3; + num2 = 0; + } + if ((index3 < 275 || index3 > Main.maxTilesX - 275) && worldSurface > (double) Main.maxTilesY * 0.25) + { + worldSurface = (double) Main.maxTilesY * 0.25; + num2 = 1; + } + while (WorldGen.genRand.Next(0, 3) == 0) + rockLayer += (double) WorldGen.genRand.Next(-2, 3); + if (rockLayer < worldSurface + (double) Main.maxTilesY * 0.05) + ++rockLayer; + if (rockLayer > worldSurface + (double) Main.maxTilesY * 0.35) + --rockLayer; + for (int index4 = 0; (double) index4 < worldSurface; ++index4) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].frameX = (short) -1; + Main.tile[index3, index4].frameY = (short) -1; + } + for (int index5 = (int) worldSurface; index5 < Main.maxTilesY; ++index5) + { + if ((double) index5 < rockLayer) + { + Main.tile[index3, index5].active(true); + Main.tile[index3, index5].type = (ushort) 0; + Main.tile[index3, index5].frameX = (short) -1; + Main.tile[index3, index5].frameY = (short) -1; + } + else + { + Main.tile[index3, index5].active(true); + Main.tile[index3, index5].type = (ushort) 1; + Main.tile[index3, index5].frameX = (short) -1; + Main.tile[index3, index5].frameY = (short) -1; + } + } + } + Main.worldSurface = worldSurfaceHigh + 25.0; + Main.rockLayer = rockLayerHigh; + double num4 = (double) ((int) ((Main.rockLayer - Main.worldSurface) / 6.0) * 6); + Main.rockLayer = Main.worldSurface + num4; + WorldGen.waterLine = (int) (Main.rockLayer + (double) Main.maxTilesY) / 2; + WorldGen.waterLine += WorldGen.genRand.Next(-100, 20); + WorldGen.lavaLine = WorldGen.waterLine + WorldGen.genRand.Next(50, 80); + })); + WorldGen.AddGenerationPass("Tunnels", (WorldGenLegacyMethod) (progress => + { + for (int index6 = 0; index6 < (int) ((double) Main.maxTilesX * 0.0015); ++index6) + { + int[] numArray1 = new int[10]; + int[] numArray2 = new int[10]; + int num = WorldGen.genRand.Next(450, Main.maxTilesX - 450); + while ((double) num > (double) Main.maxTilesX * 0.449999988079071 && (double) num < (double) Main.maxTilesX * 0.550000011920929) + num = WorldGen.genRand.Next(0, Main.maxTilesX); + int index7 = 0; + for (int index8 = 0; index8 < 10; ++index8) + { + int index9 = num % Main.maxTilesX; + while (!Main.tile[index9, index7].active()) + ++index7; + numArray1[index8] = index9; + numArray2[index8] = index7 - WorldGen.genRand.Next(11, 16); + num = index9 + WorldGen.genRand.Next(5, 11); + } + for (int index10 = 0; index10 < 10; ++index10) + { + WorldGen.TileRunner(numArray1[index10], numArray2[index10], (double) WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(6, 9), 0, true, -2f, -0.3f); + WorldGen.TileRunner(numArray1[index10], numArray2[index10], (double) WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(6, 9), 0, true, 2f, -0.3f); + } + } + })); + WorldGen.AddGenerationPass("Sand", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[1].Value; + int length = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.0008), (int) ((double) Main.maxTilesX * (1.0 / 400.0))) + 2; + PyrX = new int[length]; + PyrY = new int[length]; + for (int index11 = 0; index11 < length; ++index11) + { + int num5 = WorldGen.genRand.Next(Main.maxTilesX); + while ((double) num5 > (double) Main.maxTilesX * 0.400000005960464 && (double) num5 < (double) Main.maxTilesX * 0.600000023841858) + num5 = WorldGen.genRand.Next(Main.maxTilesX); + int num6 = WorldGen.genRand.Next(35, 90); + if (index11 == 1) + { + float num7 = (float) (Main.maxTilesX / 4200); + num6 += (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num7); + } + if (WorldGen.genRand.Next(3) == 0) + num6 *= 2; + if (index11 == 1) + num6 *= 2; + int num8 = num5 - num6; + int num9 = WorldGen.genRand.Next(35, 90); + if (WorldGen.genRand.Next(3) == 0) + num9 *= 2; + if (index11 == 1) + num9 *= 2; + int num10 = num5 + num9; + if (num8 < 0) + num8 = 0; + if (num10 > Main.maxTilesX) + num10 = Main.maxTilesX; + switch (index11) + { + case 0: + num8 = 0; + num10 = WorldGen.genRand.Next(260, 300); + if (dungeonSide == 1) + { + num10 += 40; + break; + } + break; + case 2: + num8 = Main.maxTilesX - WorldGen.genRand.Next(260, 300); + num10 = Main.maxTilesX; + if (dungeonSide == -1) + { + num8 -= 40; + break; + } + break; + } + int num11 = WorldGen.genRand.Next(50, 100); + for (int index12 = num8; index12 < num10; ++index12) + { + if (WorldGen.genRand.Next(2) == 0) + { + num11 += WorldGen.genRand.Next(-1, 2); + if (num11 < 50) + num11 = 50; + if (num11 > 100) + num11 = 100; + } + for (int index13 = 0; (double) index13 < Main.worldSurface; ++index13) + { + if (Main.tile[index12, index13].active()) + { + if (index12 == (num8 + num10) / 2 && WorldGen.genRand.Next(6) == 0) + { + PyrX[numPyr] = index12; + PyrY[numPyr] = index13; + ++numPyr; + } + int num12 = num11; + if (index12 - num8 < num12) + num12 = index12 - num8; + if (num10 - index12 < num12) + num12 = num10 - index12; + int num13 = num12 + WorldGen.genRand.Next(5); + for (int index14 = index13; index14 < index13 + num13; ++index14) + { + if (index12 > num8 + WorldGen.genRand.Next(5) && index12 < num10 - WorldGen.genRand.Next(5)) + Main.tile[index12, index14].type = (ushort) 53; + } + break; + } + } + } + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 8E-06); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) Main.worldSurface, (int) Main.rockLayer), (double) WorldGen.genRand.Next(15, 70), WorldGen.genRand.Next(20, 130), 53); + })); + WorldGen.AddGenerationPass("Mount Caves", (WorldGenLegacyMethod) (progress => + { + WorldGen.numMCaves = 0; + progress.Message = Lang.gen[2].Value; + for (int index15 = 0; index15 < (int) ((double) Main.maxTilesX * 0.0008); ++index15) + { + int num = 0; + bool flag1 = false; + bool flag2 = false; + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.75)); + while (!flag2) + { + flag2 = true; + while (i > Main.maxTilesX / 2 - 100 && i < Main.maxTilesX / 2 + 100) + 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 (i > WorldGen.mCaveX[index16] - 50 && i < WorldGen.mCaveX[index16] + 50) + { + ++num; + flag2 = false; + break; + } + } + if (num >= 200) + { + flag1 = true; + break; + } + } + if (!flag1) + { + 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)) + flag1 = true; + } + } + if (!flag1) + { + WorldGen.Mountinater(i, j); + WorldGen.mCaveX[WorldGen.numMCaves] = i; + WorldGen.mCaveY[WorldGen.numMCaves] = j; + ++WorldGen.numMCaves; + break; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Dirt Wall Backgrounds", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[3].Value; + for (int index19 = 1; index19 < Main.maxTilesX - 1; ++index19) + { + byte num14 = 2; + float num15 = (float) index19 / (float) Main.maxTilesX; + progress.Set(num15); + 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()) + num14 = Main.tile[index19, index20].type != (ushort) 147 ? (byte) 2 : (byte) 40; + if (flag && Main.tile[index19, index20].wall != (byte) 64) + Main.tile[index19, index20].wall = num14; + 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 => + { + progress.Message = Lang.gen[4].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00015); ++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); + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0002); ++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); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0045); ++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 => + { + progress.Message = Lang.gen[5].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.005); ++index) + 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 => + { + 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); + 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); + 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); + 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 => + { + i2 = 0; + progress.Message = Lang.gen[7].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0015); ++index) + { + float num = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.0015f); + progress.Set(num); + int type = -1; + if (WorldGen.genRand.Next(5) == 0) + type = -2; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 5), WorldGen.genRand.Next(2, 20), type); + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY), (double) WorldGen.genRand.Next(8, 15), WorldGen.genRand.Next(7, 30), type); + } + })); + WorldGen.AddGenerationPass("Dirt Layer Caves", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[8].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 3E-05); ++index) + { + float num = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 3E-05f); + progress.Set(num); + if (rockLayerHigh <= (double) Main.maxTilesY) + { + int type = -1; + if (WorldGen.genRand.Next(6) == 0) + type = -2; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) rockLayerHigh + 1), (double) WorldGen.genRand.Next(5, 15), WorldGen.genRand.Next(30, 200), type); + } + } + })); + WorldGen.AddGenerationPass("Rock Layer Caves", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[9].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00013); ++index) + { + float num = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.00013f); + progress.Set(num); + 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 => + { + 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 = 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; + } + } + } + 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 = 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; + } + } + } + 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 = 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; + } + } + } + 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 = 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; + } + } + } + float num = (float) (Main.maxTilesX / 4200); + for (int index = 0; (double) index < 5.0 * (double) num; ++index) + { + try + { + WorldGen.Caverer(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 400)); + } + catch + { + } + } + })); + WorldGen.AddGenerationPass("Slush Check", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[56].Value; + snowTop = (int) Main.worldSurface; + int num16 = WorldGen.genRand.Next(Main.maxTilesX); + if (dungeonSide == 1) + { + while ((double) num16 < (double) Main.maxTilesX * 0.550000011920929 || (double) num16 > (double) Main.maxTilesX * 0.699999988079071) + num16 = WorldGen.genRand.Next(Main.maxTilesX); + } + else + { + while ((double) num16 < (double) Main.maxTilesX * 0.300000011920929 || (double) num16 > (double) Main.maxTilesX * 0.449999988079071) + num16 = WorldGen.genRand.Next(Main.maxTilesX); + } + int num17 = WorldGen.genRand.Next(50, 90); + float num18 = (float) (Main.maxTilesX / 4200); + int num19 = num17 + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num18) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num18); + int num20 = num16 - num19; + int num21 = WorldGen.genRand.Next(50, 90) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num18) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num18); + int num22 = num16 + num21; + if (num20 < 0) + num20 = 0; + if (num22 > Main.maxTilesX) + num22 = Main.maxTilesX; + int num23 = 10; + for (int index24 = 0; index24 <= WorldGen.lavaLine - 140; ++index24) + { + num20 += WorldGen.genRand.Next(-4, 4); + num22 += WorldGen.genRand.Next(-3, 5); + snowMinX[index24] = num20; + snowMaxX[index24] = num22; + for (int index25 = num20; index25 < num22; ++index25) + { + if (index24 < WorldGen.lavaLine - 140) + { + if (Main.tile[index25, index24].wall == (byte) 2) + Main.tile[index25, index24].wall = (byte) 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 + { + num23 += WorldGen.genRand.Next(-3, 4); + if (WorldGen.genRand.Next(3) == 0) + { + num23 += WorldGen.genRand.Next(-4, 5); + if (WorldGen.genRand.Next(3) == 0) + num23 += WorldGen.genRand.Next(-6, 7); + } + if (num23 < 0) + num23 = WorldGen.genRand.Next(3); + else if (num23 > 50) + num23 = 50 - WorldGen.genRand.Next(3); + for (int index26 = index24; index26 < index24 + num23; ++index26) + { + if (Main.tile[index25, index26].wall == (byte) 2) + Main.tile[index25, index26].wall = (byte) 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 => + { + for (int index27 = 0; index27 < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.002); ++index27) + { + 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("Jungle", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[11].Value; + float num24 = (float) (Main.maxTilesX / 4200) * 1.5f; + float num25 = (float) WorldGen.genRand.Next(15, 30) * 0.01f; + int num26; + if (dungeonSide == -1) + { + float num27 = 1f - num25; + num26 = (int) ((double) Main.maxTilesX * (double) num27); + } + else + num26 = (int) ((double) Main.maxTilesX * (double) num25); + int num28 = (int) ((double) Main.maxTilesY + Main.rockLayer) / 2; + int i1 = num26 + WorldGen.genRand.Next((int) (-100.0 * (double) num24), (int) (101.0 * (double) num24)); + int j1 = num28 + WorldGen.genRand.Next((int) (-100.0 * (double) num24), (int) (101.0 * (double) num24)); + int num29 = i1; + int num30 = j1; + WorldGen.TileRunner(i1, j1, (double) WorldGen.genRand.Next((int) (250.0 * (double) num24), (int) (500.0 * (double) num24)), WorldGen.genRand.Next(50, 150), 59, speedX: ((float) (dungeonSide * 3))); + for (int index = 0; (double) index < 6.0 * (double) num24; ++index) + WorldGen.TileRunner(i1 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), j1 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(63, 65)); + WorldGen.mudWall = true; + progress.Set(0.15f); + int i3 = i1 + WorldGen.genRand.Next((int) (-250.0 * (double) num24), (int) (251.0 * (double) num24)); + int j2 = j1 + WorldGen.genRand.Next((int) (-150.0 * (double) num24), (int) (151.0 * (double) num24)); + int num31 = i3; + int num32 = j2; + int num33 = i3; + int num34 = j2; + WorldGen.TileRunner(i3, j2, (double) WorldGen.genRand.Next((int) (250.0 * (double) num24), (int) (500.0 * (double) num24)), WorldGen.genRand.Next(50, 150), 59); + WorldGen.mudWall = false; + for (int index = 0; (double) index < 6.0 * (double) num24; ++index) + WorldGen.TileRunner(i3 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), j2 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(65, 67)); + WorldGen.mudWall = true; + progress.Set(0.3f); + int i4 = i3 + WorldGen.genRand.Next((int) (-400.0 * (double) num24), (int) (401.0 * (double) num24)); + int j3 = j2 + WorldGen.genRand.Next((int) (-150.0 * (double) num24), (int) (151.0 * (double) num24)); + int num35 = i4; + int num36 = j3; + WorldGen.TileRunner(i4, j3, (double) WorldGen.genRand.Next((int) (250.0 * (double) num24), (int) (500.0 * (double) num24)), WorldGen.genRand.Next(50, 150), 59, speedX: ((float) (dungeonSide * -3))); + WorldGen.mudWall = false; + for (int index = 0; (double) index < 6.0 * (double) num24; ++index) + WorldGen.TileRunner(i4 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), j3 + WorldGen.genRand.Next(-(int) (125.0 * (double) num24), (int) (125.0 * (double) num24)), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(67, 69)); + WorldGen.mudWall = true; + progress.Set(0.45f); + int i5 = (num29 + num31 + num35) / 3; + int j4 = (num30 + num32 + num36) / 3; + WorldGen.TileRunner(i5, j4, (double) WorldGen.genRand.Next((int) (400.0 * (double) num24), (int) (600.0 * (double) num24)), 10000, 59, speedY: -20f, noYChange: true); + WorldGen.JungleRunner(i5, j4); + progress.Set(0.6f); + WorldGen.mudWall = false; + for (int index = 0; index < Main.maxTilesX / 4; ++index) + { + int i6 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int j5; + for (j5 = WorldGen.genRand.Next((int) worldSurface + 10, Main.maxTilesY - 200); Main.tile[i6, j5].wall != (byte) 64 && Main.tile[i6, j5].wall != (byte) 15; j5 = WorldGen.genRand.Next((int) worldSurface + 10, Main.maxTilesY - 200)) + i6 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + WorldGen.MudWallRunner(i6, j5); + } + int i7 = num33; + int j6 = num34; + for (int index = 0; (double) index <= 20.0 * (double) num24; ++index) + { + progress.Set((float) ((60.0 + (double) index / (double) num24) * 0.00999999977648258)); + i7 += WorldGen.genRand.Next((int) (-5.0 * (double) num24), (int) (6.0 * (double) num24)); + j6 += WorldGen.genRand.Next((int) (-5.0 * (double) num24), (int) (6.0 * (double) num24)); + WorldGen.TileRunner(i7, j6, (double) WorldGen.genRand.Next(40, 100), WorldGen.genRand.Next(300, 500), 59); + } + for (int index32 = 0; (double) index32 <= 10.0 * (double) num24; ++index32) + { + progress.Set((float) ((80.0 + (double) index32 / (double) num24 * 2.0) * 0.00999999977648258)); + int i8 = num33 + WorldGen.genRand.Next((int) (-600.0 * (double) num24), (int) (600.0 * (double) num24)); + int j7; + for (j7 = num34 + WorldGen.genRand.Next((int) (-200.0 * (double) num24), (int) (200.0 * (double) num24)); i8 < 1 || i8 >= Main.maxTilesX - 1 || j7 < 1 || j7 >= Main.maxTilesY - 1 || Main.tile[i8, j7].type != (ushort) 59; j7 = num34 + WorldGen.genRand.Next((int) (-200.0 * (double) num24), (int) (200.0 * (double) num24))) + i8 = num33 + WorldGen.genRand.Next((int) (-600.0 * (double) num24), (int) (600.0 * (double) num24)); + for (int index33 = 0; (double) index33 < 8.0 * (double) num24; ++index33) + { + i8 += WorldGen.genRand.Next(-30, 31); + j7 += WorldGen.genRand.Next(-30, 31); + int type = -1; + if (WorldGen.genRand.Next(7) == 0) + type = -2; + WorldGen.TileRunner(i8, j7, (double) WorldGen.genRand.Next(10, 20), WorldGen.genRand.Next(30, 70), type); + } + } + for (int index = 0; (double) index <= 300.0 * (double) num24; ++index) + { + int i9 = num33 + WorldGen.genRand.Next((int) (-600.0 * (double) num24), (int) (600.0 * (double) num24)); + int j8; + for (j8 = num34 + WorldGen.genRand.Next((int) (-200.0 * (double) num24), (int) (200.0 * (double) num24)); i9 < 1 || i9 >= Main.maxTilesX - 1 || j8 < 1 || j8 >= Main.maxTilesY - 1 || Main.tile[i9, j8].type != (ushort) 59; j8 = num34 + WorldGen.genRand.Next((int) (-200.0 * (double) num24), (int) (200.0 * (double) num24))) + i9 = num33 + WorldGen.genRand.Next((int) (-600.0 * (double) num24), (int) (600.0 * (double) num24)); + WorldGen.TileRunner(i9, j8, (double) WorldGen.genRand.Next(4, 10), WorldGen.genRand.Next(5, 30), 1); + if (WorldGen.genRand.Next(4) == 0) + { + int type = WorldGen.genRand.Next(63, 69); + WorldGen.TileRunner(i9 + WorldGen.genRand.Next(-1, 2), j8 + WorldGen.genRand.Next(-1, 2), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(4, 8), type); + } + } + })); + WorldGen.AddGenerationPass("Marble", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[80].Value; + float num37 = (float) (Main.maxTilesX * Main.maxTilesY) / 5040000f; + int num38 = (int) ((double) WorldGen.genRand.Next(10, 15) * (double) num37); + float num39 = (float) (Main.maxTilesX - 160) / (float) num38; + int num40 = 0; + while (num40 < num38) + { + float num41 = (float) num40 / (float) num38; + progress.Set(num41); + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomRectanglePoint((int) ((double) num41 * (double) (Main.maxTilesX - 160)) + 80, (int) rockLayer + 20, (int) num39, Main.maxTilesY - ((int) rockLayer + 40) - 200), structures)) + ++num40; + } + })); + WorldGen.AddGenerationPass("Granite", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[81].Value; + float num42 = (float) Main.maxTilesX / 4200f; + int num43 = (int) ((double) WorldGen.genRand.Next(8, 14) * (double) num42); + float num44 = (float) (Main.maxTilesX - 200) / (float) num43; + int num45 = 0; + while (num45 < num43) + { + float num46 = (float) num45 / (float) num43; + progress.Set(num46); + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomRectanglePoint((int) ((double) num46 * (double) (Main.maxTilesX - 200)) + 100, (int) rockLayer + 20, (int) num44, Main.maxTilesY - ((int) rockLayer + 40) - 200), structures)) + ++num45; + } + })); + WorldGen.AddGenerationPass("Mud Caves To Grass", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[77].Value; + 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)))); + } + } + 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(); + float num = (float) ((x - 10) * (Main.maxTilesY - 20) + (y - 10)) / (float) ((Main.maxTilesX - 20) * (Main.maxTilesY - 20)); + progress.Set((float) (0.200000002980232 + (double) num * 0.800000011920929)); + } + } + })); + WorldGen.AddGenerationPass("Full Desert", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[78].Value; + int num47 = dungeonSide; + int maxValue = Main.maxTilesX / 2; + int num48 = WorldGen.genRand.Next(maxValue) / 8 + maxValue / 8; + int x = maxValue + num48 * -num47; + int num49 = 0; + while (!Terraria.World.Generation.Biomes.Place(new Point(x, (int) worldSurface), structures)) + { + int num50 = WorldGen.genRand.Next(maxValue) / 2 + maxValue / 8; + x = maxValue + num50 * -num47; + if (++num49 > 1000) + { + num47 *= -1; + num49 = 0; + } + } + })); + WorldGen.AddGenerationPass("Floating Islands", (WorldGenLegacyMethod) (progress => + { + WorldGen.numIslandHouses = 0; + WorldGen.houseCount = 0; + progress.Message = Lang.gen[12].Value; + for (int index34 = 0; index34 < (int) ((double) Main.maxTilesX * 0.0008) + skyLakes; ++index34) + { + int num51 = 1000; + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.1), (int) ((double) Main.maxTilesX * 0.9)); + while (--num51 > 0) + { + bool flag3 = true; + while (i > Main.maxTilesX / 2 - 80 && i < Main.maxTilesX / 2 + 80) + i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.1), (int) ((double) Main.maxTilesX * 0.9)); + for (int index35 = 0; index35 < WorldGen.numIslandHouses; ++index35) + { + if (i > WorldGen.fihX[index35] - 180 && i < WorldGen.fihX[index35] + 180) + { + flag3 = false; + break; + } + } + if (flag3) + { + bool flag4 = false; + int num52 = 0; + for (int index36 = 200; (double) index36 < Main.worldSurface; ++index36) + { + if (Main.tile[i, index36].active()) + { + num52 = index36; + flag4 = true; + break; + } + } + if (flag4) + { + int j = Math.Min(WorldGen.genRand.Next(90, num52 - 100), (int) WorldGen.worldSurfaceLow - 50); + if (index34 < skyLakes) + { + WorldGen.skyLake[WorldGen.numIslandHouses] = true; + WorldGen.CloudLake(i, j); + } + else + WorldGen.CloudIsland(i, j); + WorldGen.fihX[WorldGen.numIslandHouses] = i; + WorldGen.fihY[WorldGen.numIslandHouses] = j; + ++WorldGen.numIslandHouses; + } + } + } + } + })); + WorldGen.AddGenerationPass("Mushroom Patches", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[13].Value; + for (int index = 0; index < Main.maxTilesX / 500; ++index) + { + int num53 = 0; + bool flag = true; + while (flag) + { + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.3), (int) ((double) Main.maxTilesX * 0.7)); + int j = WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 350); + flag = false; + int num54 = 60; + for (int x = i - num54; x < i + num54; x += 3) + { + for (int y = j - num54; y < j + num54; y += 3) + { + if (Main.tile[x, y].type == (ushort) 147 || Main.tile[x, y].type == (ushort) 161 || Main.tile[x, y].type == (ushort) 162) + { + flag = true; + break; + } + if (WorldGen.UndergroundDesertLocation.Contains(new Point(x, y))) + { + flag = true; + break; + } + } + } + if (!flag) + WorldGen.ShroomPatch(i, j); + ++num53; + if (num53 > 100) + break; + } + } + for (int i10 = 0; i10 < Main.maxTilesX; ++i10) + { + for (int worldSurface1 = (int) Main.worldSurface; worldSurface1 < Main.maxTilesY; ++worldSurface1) + { + if (Main.tile[i10, worldSurface1].active()) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i10, worldSurface1, 59, 70, false); + if (Main.tile[i10, worldSurface1].type == (ushort) 70 && WorldGen.genRand.Next(20) == 0) + { + int num55 = WorldGen.genRand.Next(5) != 0 ? 1 : 2; + int num56 = WorldGen.genRand.Next(2, 6); + int j9 = worldSurface1 - num56; + bool flag = true; + for (int index = i10 - num55; index <= i10 + num55; ++index) + { + if (Main.tile[index, j9].active()) + flag = false; + if (Main.tileBrick[(int) Main.tile[index, j9 - 1].type]) + flag = false; + if (Main.tileBrick[(int) Main.tile[index, j9 + 1].type]) + flag = false; + } + if (Main.tile[i10 - num55 - 1, j9].type == (ushort) 190) + flag = false; + if (Main.tile[i10 + num55 + 1, j9].type == (ushort) 190) + flag = false; + for (int index = j9; index < worldSurface1; ++index) + { + if (Main.tile[i10, index].active()) + flag = false; + if (Main.tileBrick[(int) Main.tile[i10 - 1, index].type]) + flag = false; + if (Main.tileBrick[(int) Main.tile[i10 + 1, index].type]) + flag = false; + } + if (flag) + { + for (int i11 = i10 - num55; i11 <= i10 + num55; ++i11) + WorldGen.PlaceTile(i11, j9, 190, true, true); + for (int j10 = j9; j10 < worldSurface1; ++j10) + WorldGen.PlaceTile(i10, j10, 190, true, true); + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Mud To Dirt", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[14].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.001); ++index) + 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); + })); + WorldGen.AddGenerationPass("Silt", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[15].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0001); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerHigh, Main.maxTilesY), (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) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerHigh, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 5), WorldGen.genRand.Next(2, 5), 123); + })); + WorldGen.AddGenerationPass("Shinies", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[16].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 6E-05); ++index) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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.crimson) + { + 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) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 4), WorldGen.genRand.Next(3, 6), 204); + } + else + { + 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) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 4), WorldGen.genRand.Next(3, 6), 22); + } + })); + WorldGen.AddGenerationPass("Webs", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[17].Value; + for (int index37 = 0; index37 < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0006); ++index37) + { + int index38 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index39 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY - 20); + if (index37 < WorldGen.numMCaves) + { + index38 = WorldGen.mCaveX[index37]; + index39 = WorldGen.mCaveY[index37]; + } + if (!Main.tile[index38, index39].active() && ((double) index39 > Main.worldSurface || Main.tile[index38, index39].wall > (byte) 0)) + { + while (!Main.tile[index38, index39].active() && index39 > (int) WorldGen.worldSurfaceLow) + --index39; + int j = index39 + 1; + int num = 1; + if (WorldGen.genRand.Next(2) == 0) + num = -1; + while (!Main.tile[index38, j].active() && index38 > 10 && index38 < Main.maxTilesX - 10) + index38 += num; + int i = index38 - num; + if ((double) j > Main.worldSurface || Main.tile[i, j].wall > (byte) 0) + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(4, 11), WorldGen.genRand.Next(2, 4), 51, true, (float) num, -1f, overRide: false); + } + } + })); + WorldGen.AddGenerationPass("Underworld", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[18].Value; + progress.Set(0.0f); + int num57 = Main.maxTilesY - WorldGen.genRand.Next(150, 190); + for (int index40 = 0; index40 < Main.maxTilesX; ++index40) + { + num57 += WorldGen.genRand.Next(-3, 4); + if (num57 < Main.maxTilesY - 190) + num57 = Main.maxTilesY - 190; + if (num57 > Main.maxTilesY - 160) + num57 = Main.maxTilesY - 160; + for (int index41 = num57 - 20 - WorldGen.genRand.Next(3); index41 < Main.maxTilesY; ++index41) + { + if (index41 >= num57) + { + Main.tile[index40, index41].active(false); + Main.tile[index40, index41].lava(false); + Main.tile[index40, index41].liquid = (byte) 0; + } + else + Main.tile[index40, index41].type = (ushort) 57; + } + } + int num58 = Main.maxTilesY - WorldGen.genRand.Next(40, 70); + for (int index42 = 10; index42 < Main.maxTilesX - 10; ++index42) + { + num58 += WorldGen.genRand.Next(-10, 11); + if (num58 > Main.maxTilesY - 60) + num58 = Main.maxTilesY - 60; + if (num58 < Main.maxTilesY - 100) + num58 = Main.maxTilesY - 120; + for (int index43 = num58; index43 < Main.maxTilesY - 10; ++index43) + { + if (!Main.tile[index42, index43].active()) + { + Main.tile[index42, index43].lava(true); + Main.tile[index42, index43].liquid = byte.MaxValue; + } + } + } + for (int index44 = 0; index44 < Main.maxTilesX; ++index44) + { + if (WorldGen.genRand.Next(50) == 0) + { + int index45 = Main.maxTilesY - 65; + while (!Main.tile[index44, index45].active() && index45 > Main.maxTilesY - 135) + --index45; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), index45 + 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 num59 = (float) i / (float) (Main.maxTilesX - 1); + progress.Set((float) ((double) num59 / 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; + 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 num60 = (float) WorldGen.genRand.Next(1, 3); + if (WorldGen.genRand.Next(3) == 0) + num60 *= 0.5f; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.TileRunner(i, index - WorldGen.genRand.Next(2, 5), (double) (int) ((double) WorldGen.genRand.Next(5, 15) * (double) num60), (int) ((double) WorldGen.genRand.Next(10, 15) * (double) num60), 57, true, 1f, 0.3f); + if (WorldGen.genRand.Next(2) == 0) + { + float num61 = (float) WorldGen.genRand.Next(1, 3); + WorldGen.TileRunner(i, index - WorldGen.genRand.Next(2, 5), (double) (int) ((double) WorldGen.genRand.Next(5, 15) * (double) num61), (int) ((double) WorldGen.genRand.Next(10, 15) * (double) num61), 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); + 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("Lakes", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[19].Value; + int num62 = WorldGen.genRand.Next(2, (int) ((double) Main.maxTilesX * 0.005)); + for (int index = 0; index < num62; ++index) + { + float num63 = (float) index / (float) num62; + progress.Set(num63); + int i = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + while (i > Main.maxTilesX / 2 - 100 && i < Main.maxTilesX / 2 + 100) + i = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + int j = (int) WorldGen.worldSurfaceLow - 20; + while (!Main.tile[i, j].active()) + ++j; + WorldGen.Lakinater(i, j); + } + })); + WorldGen.AddGenerationPass("Dungeon", (WorldGenLegacyMethod) (progress => + { + int x; + if (dungeonSide == -1) + { + x = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.05), (int) ((double) Main.maxTilesX * 0.2)); + dungeonSide = -1; + } + else + { + x = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.8), (int) ((double) Main.maxTilesX * 0.95)); + dungeonSide = 1; + } + int y = (int) ((Main.worldSurface + Main.rockLayer) / 2.0) + WorldGen.genRand.Next(-200, 200); + WorldGen.MakeDungeon(x, y); + })); + WorldGen.AddGenerationPass("Corruption", (WorldGenLegacyMethod) (progress => + { + if (WorldGen.crimson) + { + progress.Message = Lang.gen[72].Value; + for (int index46 = 0; (double) index46 < (double) Main.maxTilesX * 0.00045; ++index46) + { + float num64 = (float) index46 / ((float) Main.maxTilesX * 0.00045f); + progress.Set(num64); + bool flag5 = false; + int i = 0; + int num65 = 0; + int num66 = 0; + while (!flag5) + { + int num67 = 0; + flag5 = true; + int num68 = Main.maxTilesX / 2; + int num69 = 200; + i = dungeonSide >= 0 ? WorldGen.genRand.Next(320, Main.maxTilesX - 600) : WorldGen.genRand.Next(600, Main.maxTilesX - 320); + num65 = i - WorldGen.genRand.Next(200) - 100; + num66 = i + WorldGen.genRand.Next(200) + 100; + if (num65 < 285) + num65 = 285; + if (num66 > Main.maxTilesX - 285) + num66 = Main.maxTilesX - 285; + if (dungeonSide < 0 && num65 < 400) + num65 = 400; + else if (dungeonSide > 0 && num65 > Main.maxTilesX - 400) + num65 = Main.maxTilesX - 400; + if (i > num68 - num69 && i < num68 + num69) + flag5 = false; + if (num65 > num68 - num69 && num65 < num68 + num69) + flag5 = false; + if (num66 > num68 - num69 && num66 < num68 + num69) + flag5 = false; + if (i > WorldGen.UndergroundDesertLocation.X && i < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag5 = false; + if (num65 > WorldGen.UndergroundDesertLocation.X && num65 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag5 = false; + if (num66 > WorldGen.UndergroundDesertLocation.X && num66 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag5 = false; + for (int index47 = num65; index47 < num66; ++index47) + { + for (int index48 = 0; index48 < (int) Main.worldSurface; index48 += 5) + { + if (Main.tile[index47, index48].active() && Main.tileDungeon[(int) Main.tile[index47, index48].type]) + { + flag5 = false; + break; + } + if (!flag5) + break; + } + } + if (num67 < 200 && WorldGen.JungleX > num65 && WorldGen.JungleX < num66) + { + int num70 = num67 + 1; + flag5 = false; + } + } + WorldGen.CrimStart(i, (int) WorldGen.worldSurfaceLow - 10); + for (int index49 = num65; index49 < num66; ++index49) + { + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[index49, worldSurfaceLow].active()) + { + int num71 = worldSurfaceLow + WorldGen.genRand.Next(10, 14); + for (int index50 = worldSurfaceLow; index50 < num71; ++index50) + { + if ((Main.tile[index49, index50].type == (ushort) 59 || Main.tile[index49, index50].type == (ushort) 60) && index49 >= num65 + WorldGen.genRand.Next(5) && index49 < num66 - WorldGen.genRand.Next(5)) + Main.tile[index49, index50].type = (ushort) 0; + } + break; + } + } + } + double num72 = Main.worldSurface + 40.0; + for (int index51 = num65; index51 < num66; ++index51) + { + num72 += (double) WorldGen.genRand.Next(-2, 3); + if (num72 < Main.worldSurface + 30.0) + num72 = Main.worldSurface + 30.0; + if (num72 > Main.worldSurface + 50.0) + num72 = Main.worldSurface + 50.0; + i2 = index51; + bool flag6 = false; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < num72; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 53 && i2 >= num65 + WorldGen.genRand.Next(5) && i2 <= num66 - 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 && !flag6) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, worldSurfaceLow, grass: 199); + } + flag6 = true; + if (Main.tile[i2, worldSurfaceLow].wall == (byte) 216) + Main.tile[i2, worldSurfaceLow].wall = (byte) 218; + else if (Main.tile[i2, worldSurfaceLow].wall == (byte) 187) + Main.tile[i2, worldSurfaceLow].wall = (byte) 221; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 1) + { + if (i2 >= num65 + WorldGen.genRand.Next(5) && i2 <= num66 - 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 num73 = WorldGen.genRand.Next(10, 15); + for (int index52 = 0; index52 < num73; ++index52) + { + int num74 = 0; + bool flag7 = false; + int num75 = 0; + while (!flag7) + { + ++num74; + int x = WorldGen.genRand.Next(num65 - num75, num66 + num75); + int y = WorldGen.genRand.Next((int) (Main.worldSurface - (double) (num75 / 2)), (int) (Main.worldSurface + 100.0 + (double) num75)); + if (num74 > 100) + { + ++num75; + num74 = 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 (num75 > 10 || Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type == (ushort) 203) + { + WorldGen.Place3x2(x, y, (ushort) 26, 1); + if (Main.tile[x, y].type == (ushort) 26) + flag7 = true; + } + if (num75 > 100) + flag7 = true; + } + } + } + } + else + { + progress.Message = Lang.gen[20].Value; + for (int index53 = 0; (double) index53 < (double) Main.maxTilesX * 0.00045; ++index53) + { + float num76 = (float) index53 / ((float) Main.maxTilesX * 0.00045f); + progress.Set(num76); + bool flag8 = false; + int num77 = 0; + int num78 = 0; + int num79 = 0; + while (!flag8) + { + int num80 = 0; + flag8 = true; + int num81 = Main.maxTilesX / 2; + int num82 = 200; + num77 = WorldGen.genRand.Next(320, Main.maxTilesX - 320); + num78 = num77 - WorldGen.genRand.Next(200) - 100; + num79 = num77 + WorldGen.genRand.Next(200) + 100; + if (num78 < 285) + num78 = 285; + if (num79 > Main.maxTilesX - 285) + num79 = Main.maxTilesX - 285; + if (num77 > num81 - num82 && num77 < num81 + num82) + flag8 = false; + if (num78 > num81 - num82 && num78 < num81 + num82) + flag8 = false; + if (num79 > num81 - num82 && num79 < num81 + num82) + flag8 = false; + if (num77 > WorldGen.UndergroundDesertLocation.X && num77 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag8 = false; + if (num78 > WorldGen.UndergroundDesertLocation.X && num78 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag8 = false; + if (num79 > WorldGen.UndergroundDesertLocation.X && num79 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag8 = false; + for (int index54 = num78; index54 < num79; ++index54) + { + for (int index55 = 0; index55 < (int) Main.worldSurface; index55 += 5) + { + if (Main.tile[index54, index55].active() && Main.tileDungeon[(int) Main.tile[index54, index55].type]) + { + flag8 = false; + break; + } + if (!flag8) + break; + } + } + if (num80 < 200 && WorldGen.JungleX > num78 && WorldGen.JungleX < num79) + { + int num83 = num80 + 1; + flag8 = false; + } + } + int num84 = 0; + for (int i = num78; i < num79; ++i) + { + if (num84 > 0) + --num84; + if (i == num77 || num84 == 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 > (byte) 0) + { + if (i == num77) + { + num84 = 20; + WorldGen.ChasmRunner(i, worldSurfaceLow, WorldGen.genRand.Next(150) + 150, true); + break; + } + if (WorldGen.genRand.Next(35) == 0 && num84 == 0) + { + num84 = 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 num85 = worldSurfaceLow + WorldGen.genRand.Next(10, 14); + for (int index56 = worldSurfaceLow; index56 < num85; ++index56) + { + if ((Main.tile[i, index56].type == (ushort) 59 || Main.tile[i, index56].type == (ushort) 60) && i >= num78 + WorldGen.genRand.Next(5) && i < num79 - WorldGen.genRand.Next(5)) + Main.tile[i, index56].type = (ushort) 0; + } + break; + } + } + } + double num86 = Main.worldSurface + 40.0; + for (int index57 = num78; index57 < num79; ++index57) + { + num86 += (double) WorldGen.genRand.Next(-2, 3); + if (num86 < Main.worldSurface + 30.0) + num86 = Main.worldSurface + 30.0; + if (num86 > Main.worldSurface + 50.0) + num86 = Main.worldSurface + 50.0; + i2 = index57; + bool flag9 = false; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < num86; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 53 && i2 >= num78 + WorldGen.genRand.Next(5) && i2 <= num79 - 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 && !flag9) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, worldSurfaceLow, grass: 23); + } + flag9 = true; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 1 && i2 >= num78 + WorldGen.genRand.Next(5) && i2 <= num79 - WorldGen.genRand.Next(5)) + Main.tile[i2, worldSurfaceLow].type = (ushort) 25; + if (Main.tile[i2, worldSurfaceLow].wall == (byte) 216) + Main.tile[i2, worldSurfaceLow].wall = (byte) 217; + else if (Main.tile[i2, worldSurfaceLow].wall == (byte) 187) + Main.tile[i2, worldSurfaceLow].wall = (byte) 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 index58 = num78; index58 < num79; ++index58) + { + for (int index59 = 0; index59 < Main.maxTilesY - 50; ++index59) + { + if (Main.tile[index58, index59].active() && Main.tile[index58, index59].type == (ushort) 31) + { + int num87 = index58 - 13; + int num88 = index58 + 13; + int num89 = index59 - 13; + int num90 = index59 + 13; + for (int index60 = num87; index60 < num88; ++index60) + { + if (index60 > 10 && index60 < Main.maxTilesX - 10) + { + for (int index61 = num89; index61 < num90; ++index61) + { + if (Math.Abs(index60 - index58) + Math.Abs(index61 - index59) < 9 + WorldGen.genRand.Next(11) && WorldGen.genRand.Next(3) != 0 && Main.tile[index60, index61].type != (ushort) 31) + { + Main.tile[index60, index61].active(true); + Main.tile[index60, index61].type = (ushort) 25; + if (Math.Abs(index60 - index58) <= 1 && Math.Abs(index61 - index59) <= 1) + Main.tile[index60, index61].active(false); + } + if (Main.tile[index60, index61].type != (ushort) 31 && Math.Abs(index60 - index58) <= 2 + WorldGen.genRand.Next(3) && Math.Abs(index61 - index59) <= 2 + WorldGen.genRand.Next(3)) + Main.tile[index60, index61].active(false); + } + } + } + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Slush", (WorldGenLegacyMethod) (progress => + { + for (int index62 = snowTop; index62 < snowBottom; ++index62) + { + for (int index63 = snowMinX[index62]; index63 < snowMaxX[index62]; ++index63) + { + switch (Main.tile[index63, index62].type) + { + case 1: + Main.tile[index63, index62].type = (ushort) 161; + break; + case 59: + bool flag = true; + int num = 3; + for (int index64 = index63 - num; index64 <= index63 + num; ++index64) + { + for (int index65 = index62 - num; index65 <= index62 + num; ++index65) + { + if (Main.tile[index64, index65].type == (ushort) 60 || Main.tile[index64, index65].type == (ushort) 70 || Main.tile[index64, index65].type == (ushort) 71 || Main.tile[index64, index65].type == (ushort) 72) + { + flag = false; + break; + } + } + } + if (flag) + { + Main.tile[index63, index62].type = (ushort) 224; + break; + } + break; + case 123: + Main.tile[index63, index62].type = (ushort) 224; + break; + } + } + } + })); + WorldGen.AddGenerationPass("Mud Caves To Grass", (WorldGenLegacyMethod) (progress => + { + 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 => + { + int index66 = 0; + int index67 = 0; + int index68 = 20; + int index69 = Main.maxTilesX - 20; + progress.Message = Lang.gen[22].Value; + for (int index70 = 0; index70 < 2; ++index70) + { + if (index70 == 0) + { + int num91 = 0; + int num92 = WorldGen.genRand.Next(125, 200) + 50; + if (dungeonSide == 1) + num92 = 275; + int num93 = 0; + float num94 = 1f; + int index71 = 0; + while (!Main.tile[num92 - 1, index71].active()) + ++index71; + index66 = index71; + int num95 = index71 + WorldGen.genRand.Next(1, 5); + for (int index72 = num92 - 1; index72 >= num91; --index72) + { + ++num93; + if (num93 < 3) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.2f; + else if (num93 < 6) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.15f; + else if (num93 < 9) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (num93 < 15) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.07f; + else if (num93 < 50) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num93 < 75) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.04f; + else if (num93 < 100) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.03f; + else if (num93 < 125) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.02f; + else if (num93 < 150) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (num93 < 175) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.005f; + else if (num93 < 200) + num94 += (float) WorldGen.genRand.Next(10, 20) * (1f / 1000f); + else if (num93 < 230) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (num93 < 235) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num93 < 240) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (num93 < 245) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num93 < (int) byte.MaxValue) + num94 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + if (num93 == 235) + index69 = index72; + if (num93 == 235) + index68 = index72; + int num96 = WorldGen.genRand.Next(15, 20); + for (int index73 = 0; (double) index73 < (double) num95 + (double) num94 + (double) num96; ++index73) + { + if ((double) index73 < (double) num95 + (double) num94 * 0.75 - 3.0) + { + Main.tile[index72, index73].active(false); + if (index73 > num95) + Main.tile[index72, index73].liquid = byte.MaxValue; + else if (index73 == num95) + Main.tile[index72, index73].liquid = (byte) 127; + } + else if (index73 > num95) + { + Main.tile[index72, index73].type = (ushort) 53; + Main.tile[index72, index73].active(true); + } + Main.tile[index72, index73].wall = (byte) 0; + } + } + } + else + { + int index74 = Main.maxTilesX - WorldGen.genRand.Next(125, 200) - 50; + int maxTilesX = Main.maxTilesX; + if (dungeonSide == -1) + index74 = Main.maxTilesX - 275; + float num97 = 1f; + int num98 = 0; + int index75 = 0; + while (!Main.tile[index74, index75].active()) + ++index75; + index67 = index75; + int num99 = index75 + WorldGen.genRand.Next(1, 5); + for (int index76 = index74; index76 < maxTilesX; ++index76) + { + ++num98; + if (num98 < 3) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.2f; + else if (num98 < 6) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.15f; + else if (num98 < 9) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (num98 < 15) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.07f; + else if (num98 < 50) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num98 < 75) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.04f; + else if (num98 < 100) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.03f; + else if (num98 < 125) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.02f; + else if (num98 < 150) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (num98 < 175) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.005f; + else if (num98 < 200) + num97 += (float) WorldGen.genRand.Next(10, 20) * (1f / 1000f); + else if (num98 < 230) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (num98 < 235) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num98 < 240) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (num98 < 245) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (num98 < (int) byte.MaxValue) + num97 += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + if (num98 == 235) + index69 = index76; + int num100 = WorldGen.genRand.Next(15, 20); + for (int index77 = 0; (double) index77 < (double) num99 + (double) num97 + (double) num100; ++index77) + { + if ((double) index77 < (double) num99 + (double) num97 * 0.75 - 3.0 && (double) index77 < Main.worldSurface - 2.0) + { + Main.tile[index76, index77].active(false); + if (index77 > num99) + Main.tile[index76, index77].liquid = byte.MaxValue; + else if (index77 == num99) + Main.tile[index76, index77].liquid = (byte) 127; + } + else if (index77 > num99) + { + Main.tile[index76, index77].type = (ushort) 53; + Main.tile[index76, index77].active(true); + } + Main.tile[index76, index77].wall = (byte) 0; + } + } + } + } + while (!Main.tile[index68, index66].active()) + ++index66; + int num101 = index66 + 1; + while (!Main.tile[index69, index67].active()) + ++index67; + int num102 = index67 + 1; + })); + WorldGen.AddGenerationPass("Gems", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[23].Value; + for (int type = 63; type <= 68; ++type) + { + float num103 = 0.0f; + switch (type) + { + case 63: + num103 = (float) Main.maxTilesX * 0.3f; + break; + case 64: + num103 = (float) Main.maxTilesX * 0.1f; + break; + case 65: + num103 = (float) Main.maxTilesX * 0.25f; + break; + case 66: + num103 = (float) Main.maxTilesX * 0.45f; + break; + case 67: + num103 = (float) Main.maxTilesX * 0.5f; + break; + case 68: + num103 = (float) Main.maxTilesX * 0.05f; + break; + } + float num104 = num103 * 0.2f; + for (int index = 0; (double) index < (double) num104; ++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 index78 = 0; index78 < 2; ++index78) + { + int num105 = 1; + int num106 = 5; + int num107 = Main.maxTilesX - 5; + if (index78 == 1) + { + num105 = -1; + num106 = Main.maxTilesX - 5; + num107 = 5; + } + for (int index79 = num106; index79 != num107; index79 += num105) + { + for (int index80 = 10; index80 < Main.maxTilesY - 10; ++index80) + { + if (Main.tile[index79, index80].active() && Main.tile[index79, index80 + 1].active() && Main.tileSand[(int) Main.tile[index79, index80].type] && Main.tileSand[(int) Main.tile[index79, index80 + 1].type]) + { + ushort type = Main.tile[index79, index80].type; + int index81 = index79 + num105; + int index82 = index80 + 1; + if (!Main.tile[index81, index80].active() && !Main.tile[index81, index80 + 1].active()) + { + while (!Main.tile[index81, index82].active()) + ++index82; + int index83 = index82 - 1; + Main.tile[index79, index80].active(false); + Main.tile[index81, index83].active(true); + Main.tile[index81, index83].type = type; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Gravitating Sand", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[24].Value; + for (int x = 0; x < Main.maxTilesX; ++x) + { + float num108 = (float) x / (float) (Main.maxTilesX - 1); + progress.Set(num108); + bool flag = false; + int num109 = 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 != num109 - 1 && TileID.Sets.Falling[(int) type]) + { + for (int index = y; index < num109; ++index) + { + Main.tile[x, index].type = type; + Main.tile[x, index].active(true); + } + } + flag = true; + num109 = y; + } + } + } + })); + WorldGen.AddGenerationPass("Clean Up Dirt", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[25].Value; + for (int index84 = 3; index84 < Main.maxTilesX - 3; ++index84) + { + float num = (float) index84 / (float) Main.maxTilesX; + progress.Set(0.5f * num); + bool flag = true; + for (int index85 = 0; (double) index85 < Main.worldSurface; ++index85) + { + if (flag) + { + if (Main.tile[index84, index85].wall == (byte) 2 || Main.tile[index84, index85].wall == (byte) 40 || Main.tile[index84, index85].wall == (byte) 64) + Main.tile[index84, index85].wall = (byte) 0; + if (Main.tile[index84, index85].type != (ushort) 53 && Main.tile[index84, index85].type != (ushort) 112 && Main.tile[index84, index85].type != (ushort) 234) + { + if (Main.tile[index84 - 1, index85].wall == (byte) 2 || Main.tile[index84 - 1, index85].wall == (byte) 40 || Main.tile[index84 - 1, index85].wall == (byte) 40) + Main.tile[index84 - 1, index85].wall = (byte) 0; + if ((Main.tile[index84 - 2, index85].wall == (byte) 2 || Main.tile[index84 - 2, index85].wall == (byte) 40 || Main.tile[index84 - 2, index85].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index84 - 2, index85].wall = (byte) 0; + if ((Main.tile[index84 - 3, index85].wall == (byte) 2 || Main.tile[index84 - 3, index85].wall == (byte) 40 || Main.tile[index84 - 3, index85].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index84 - 3, index85].wall = (byte) 0; + if (Main.tile[index84 + 1, index85].wall == (byte) 2 || Main.tile[index84 + 1, index85].wall == (byte) 40 || Main.tile[index84 + 1, index85].wall == (byte) 40) + Main.tile[index84 + 1, index85].wall = (byte) 0; + if ((Main.tile[index84 + 2, index85].wall == (byte) 2 || Main.tile[index84 + 2, index85].wall == (byte) 40 || Main.tile[index84 + 2, index85].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index84 + 2, index85].wall = (byte) 0; + if ((Main.tile[index84 + 3, index85].wall == (byte) 2 || Main.tile[index84 + 3, index85].wall == (byte) 40 || Main.tile[index84 + 3, index85].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index84 + 3, index85].wall = (byte) 0; + if (Main.tile[index84, index85].active()) + flag = false; + } + } + else if (Main.tile[index84, index85].wall == (byte) 0 && Main.tile[index84, index85 + 1].wall == (byte) 0 && Main.tile[index84, index85 + 2].wall == (byte) 0 && Main.tile[index84, index85 + 3].wall == (byte) 0 && Main.tile[index84, index85 + 4].wall == (byte) 0 && Main.tile[index84 - 1, index85].wall == (byte) 0 && Main.tile[index84 + 1, index85].wall == (byte) 0 && Main.tile[index84 - 2, index85].wall == (byte) 0 && Main.tile[index84 + 2, index85].wall == (byte) 0 && !Main.tile[index84, index85].active() && !Main.tile[index84, index85 + 1].active() && !Main.tile[index84, index85 + 2].active() && !Main.tile[index84, index85 + 3].active()) + flag = true; + } + } + for (int index86 = Main.maxTilesX - 5; index86 >= 5; --index86) + { + float num = (float) index86 / (float) Main.maxTilesX; + progress.Set((float) (1.0 - 0.5 * (double) num)); + bool flag = true; + for (int index87 = 0; (double) index87 < Main.worldSurface; ++index87) + { + if (flag) + { + if (Main.tile[index86, index87].wall == (byte) 2 || Main.tile[index86, index87].wall == (byte) 40 || Main.tile[index86, index87].wall == (byte) 64) + Main.tile[index86, index87].wall = (byte) 0; + if (Main.tile[index86, index87].type != (ushort) 53) + { + if (Main.tile[index86 - 1, index87].wall == (byte) 2 || Main.tile[index86 - 1, index87].wall == (byte) 40 || Main.tile[index86 - 1, index87].wall == (byte) 40) + Main.tile[index86 - 1, index87].wall = (byte) 0; + if ((Main.tile[index86 - 2, index87].wall == (byte) 2 || Main.tile[index86 - 2, index87].wall == (byte) 40 || Main.tile[index86 - 2, index87].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index86 - 2, index87].wall = (byte) 0; + if ((Main.tile[index86 - 3, index87].wall == (byte) 2 || Main.tile[index86 - 3, index87].wall == (byte) 40 || Main.tile[index86 - 3, index87].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index86 - 3, index87].wall = (byte) 0; + if (Main.tile[index86 + 1, index87].wall == (byte) 2 || Main.tile[index86 + 1, index87].wall == (byte) 40 || Main.tile[index86 + 1, index87].wall == (byte) 40) + Main.tile[index86 + 1, index87].wall = (byte) 0; + if ((Main.tile[index86 + 2, index87].wall == (byte) 2 || Main.tile[index86 + 2, index87].wall == (byte) 40 || Main.tile[index86 + 2, index87].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index86 + 2, index87].wall = (byte) 0; + if ((Main.tile[index86 + 3, index87].wall == (byte) 2 || Main.tile[index86 + 3, index87].wall == (byte) 40 || Main.tile[index86 + 3, index87].wall == (byte) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index86 + 3, index87].wall = (byte) 0; + if (Main.tile[index86, index87].active()) + flag = false; + } + } + else if (Main.tile[index86, index87].wall == (byte) 0 && Main.tile[index86, index87 + 1].wall == (byte) 0 && Main.tile[index86, index87 + 2].wall == (byte) 0 && Main.tile[index86, index87 + 3].wall == (byte) 0 && Main.tile[index86, index87 + 4].wall == (byte) 0 && Main.tile[index86 - 1, index87].wall == (byte) 0 && Main.tile[index86 + 1, index87].wall == (byte) 0 && Main.tile[index86 - 2, index87].wall == (byte) 0 && Main.tile[index86 + 2, index87].wall == (byte) 0 && !Main.tile[index86, index87].active() && !Main.tile[index86, index87 + 1].active() && !Main.tile[index86, index87 + 2].active() && !Main.tile[index86, index87 + 3].active()) + flag = true; + } + } + })); + WorldGen.AddGenerationPass("Pyramids", (WorldGenLegacyMethod) (progress => + { + for (int index88 = 0; index88 < numPyr; ++index88) + { + int i = PyrX[index88]; + int index89 = PyrY[index88]; + 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, index89].active() && (double) index89 < Main.worldSurface) + ++index89; + if ((double) index89 < Main.worldSurface && Main.tile[i, index89].type == (ushort) 53) + { + int num110 = Main.maxTilesX; + for (int index90 = 0; index90 < index88; ++index90) + { + int num111 = Math.Abs(i - PyrX[index90]); + if (num111 < num110) + num110 = num111; + } + if (num110 >= 250) + { + int j = index89 - 1; + WorldGen.Pyramid(i, j); + } + } + } + } + })); + WorldGen.AddGenerationPass("Dirt Rock Wall Runner", (WorldGenLegacyMethod) (progress => + { + 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 == (byte) 2) + WorldGen.DirtyRockRunner(i, j); + } + })); + WorldGen.AddGenerationPass("Living Trees", (WorldGenLegacyMethod) (progress => + { + int num112 = WorldGen.genRand.Next(0, (int) (3.0 * (double) (Main.maxTilesX / 4200))); + for (int index91 = 0; index91 < num112; ++index91) + { + bool flag10 = false; + int num113 = 0; + while (!flag10) + { + ++num113; + if (num113 > 1000) + flag10 = true; + int i = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + if (i <= Main.maxTilesX / 2 - 100 || i >= Main.maxTilesX / 2 + 100) + { + int index92 = 0; + while (!Main.tile[i, index92].active() && (double) index92 < Main.worldSurface) + ++index92; + if (Main.tile[i, index92].type == (ushort) 0) + { + int j = index92 - 1; + if (j > 150) + { + bool flag11 = true; + for (int index93 = i - 50; index93 < i + 50; ++index93) + { + for (int index94 = j - 50; index94 < j + 50; ++index94) + { + if (Main.tile[index93, index94].active()) + { + switch (Main.tile[index93, index94].type) + { + case 41: + case 43: + case 44: + case 189: + case 196: + flag11 = false; + continue; + default: + continue; + } + } + } + } + if (flag11) + flag10 = WorldGen.GrowLivingTree(i, j); + } + } + } + } + } + Main.tileSolid[192] = false; + })); + WorldGen.AddGenerationPass("Wood Tree Walls", (WorldGenLegacyMethod) (progress => + { + for (int index95 = 25; index95 < Main.maxTilesX - 25; ++index95) + { + for (int index96 = 25; (double) index96 < Main.worldSurface; ++index96) + { + if (Main.tile[index95, index96].type == (ushort) 191 || Main.tile[index95, index96 - 1].type == (ushort) 191 || Main.tile[index95 - 1, index96].type == (ushort) 191 || Main.tile[index95 + 1, index96].type == (ushort) 191 || Main.tile[index95, index96 + 1].type == (ushort) 191) + { + bool flag = true; + for (int index97 = index95 - 1; index97 <= index95 + 1; ++index97) + { + for (int index98 = index96 - 1; index98 <= index96 + 1; ++index98) + { + if (index97 != index95 && index98 != index96 && Main.tile[index97, index98].type != (ushort) 191 && Main.tile[index97, index98].wall != (byte) 78) + flag = false; + } + } + if (flag) + Main.tile[index95, index96].wall = (byte) 78; + } + } + } + })); + WorldGen.AddGenerationPass("Altars", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[26].Value; + int num = (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 1.99999994947575E-05); + for (int index99 = 0; index99 < num; ++index99) + { + progress.Set((float) index99 / (float) num); + for (int index100 = 0; index100 < 10000; ++index100) + { + int x = WorldGen.genRand.Next(1, Main.maxTilesX - 3); + int y = (int) (worldSurfaceHigh + 20.0); + int style = WorldGen.crimson ? 1 : 0; + WorldGen.Place3x2(x, y, (ushort) 26, style); + if (Main.tile[x, y].type == (ushort) 26) + break; + } + } + })); + WorldGen.AddGenerationPass("Wet Jungle", (WorldGenLegacyMethod) (progress => + { + 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("Remove Water From Sand", (WorldGenLegacyMethod) (progress => + { +label_10: + for (int index101 = 400; index101 < Main.maxTilesX - 400; ++index101) + { + i2 = index101; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + switch (Main.tile[i2, worldSurfaceLow].type) + { + case 53: + case 396: + case 397: + case 404: + case 407: + int index102 = worldSurfaceLow; + while ((double) index102 > WorldGen.worldSurfaceLow) + { + --index102; + Main.tile[i2, index102].liquid = (byte) 0; + } + goto label_10; + default: + goto label_10; + } + } + } + } + Main.tileSolid[192] = true; + })); + WorldGen.AddGenerationPass("Jungle Temple", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[70].Value; + bool flag = true; + while (flag) + { + int y = WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 500); + int x = dungeonSide >= 0 ? WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.15), (int) ((double) Main.maxTilesX * 0.4)) : WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.6), (int) ((double) Main.maxTilesX * 0.85)); + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 60) + { + flag = false; + WorldGen.makeTemple(x, y); + } + } + })); + WorldGen.AddGenerationPass("Hives", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[71].Value; + float num114 = (float) (Main.maxTilesX / 4200); + float num115 = (float) (1 + WorldGen.genRand.Next((int) (5.0 * (double) num114), (int) (8.0 * (double) num114))); + int num116 = 10000; +label_6: + while ((double) num115 > 0.0 && num116 > 0) + { + --num116; + Point origin = WorldGen.RandomWorldPoint((int) (Main.worldSurface + Main.rockLayer) >> 1, 20, 300, 20); + if (Terraria.World.Generation.Biomes.Place(origin, structures)) + { + --num115; + int num117 = WorldGen.genRand.Next(5); + int num118 = 0; + int num119 = 10000; + while (true) + { + int x; + int y; + do + { + if (num118 < num117 && num119 > 0) + { + float num120 = (float) ((double) WorldGen.genRand.NextFloat() * 60.0 + 30.0); + double a; + x = (int) (Math.Cos(a = (double) WorldGen.genRand.NextFloat() * 6.28318548202515) * (double) num120) + origin.X; + y = (int) (Math.Sin(a) * (double) num120) + origin.Y; + --num119; + } + else + goto label_6; + } + while (x <= 50 || x >= Main.maxTilesX - 50 || !Terraria.World.Generation.Biomes.Place(x, y, structures)); + ++num118; + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Chests", (WorldGenLegacyMethod) (progress => + { + WorldGen.genRand.Next(40, Main.maxTilesX - 40); + WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400); + float num121 = (float) WorldGen.genRand.Next(7, 12) * (float) (Main.maxTilesX / 4200); + for (int index103 = 0; (double) index103 < (double) num121; ++index103) + { + bool flag12 = true; + while (flag12) + { + int index104 = WorldGen.genRand.Next(40, Main.maxTilesX / 2 - 40); + if (dungeonSide < 0) + index104 += Main.maxTilesX / 2; + int index105 = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400); + if (Main.tile[index104, index105].type == (ushort) 60) + { + int num122 = 30; + flag12 = false; + for (int index106 = index104 - num122; index106 < index104 + num122; index106 += 3) + { + for (int index107 = index105 - num122; index107 < index105 + num122; index107 += 3) + { + if (Main.tile[index106, index107].active() && (Main.tile[index106, index107].type == (ushort) 225 || Main.tile[index106, index107].type == (ushort) 229 || Main.tile[index106, index107].type == (ushort) 226 || Main.tile[index106, index107].type == (ushort) 119 || Main.tile[index106, index107].type == (ushort) 120)) + flag12 = false; + if (Main.tile[index106, index107].wall == (byte) 86 || Main.tile[index106, index107].wall == (byte) 87) + flag12 = false; + } + } + } + if (!flag12) + { + int num123 = WorldGen.genRand.Next(2, 4); + int num124 = WorldGen.genRand.Next(2, 4); + int num125 = 0; + switch (jungleHut) + { + case 45: + num125 = 10; + break; + case 119: + num125 = 23; + break; + case 120: + num125 = 24; + break; + case 158: + num125 = 42; + break; + case 175: + num125 = 45; + break; + } + for (int index108 = index104 - num123 - 1; index108 <= index104 + num123 + 1; ++index108) + { + for (int index109 = index105 - num124 - 1; index109 <= index105 + num124 + 1; ++index109) + { + Main.tile[index108, index109].active(true); + Main.tile[index108, index109].type = jungleHut; + Main.tile[index108, index109].liquid = (byte) 0; + Main.tile[index108, index109].lava(false); + } + } + for (int index110 = index104 - num123; index110 <= index104 + num123; ++index110) + { + for (int index111 = index105 - num124; index111 <= index105 + num124; ++index111) + { + Main.tile[index110, index111].active(false); + Main.tile[index110, index111].wall = (byte) num125; + } + } + bool flag13 = false; + int num126 = 0; + while (!flag13 && num126 < 100) + { + ++num126; + int i = WorldGen.genRand.Next(index104 - num123, index104 + num123 + 1); + int j = WorldGen.genRand.Next(index105 - num124, index105 + num124 - 2); + WorldGen.PlaceTile(i, j, 4, true, style: 3); + if (Main.tile[i, j].type == (ushort) 4) + flag13 = true; + } + for (int index112 = index104 - num123 - 1; index112 <= index104 + num123 + 1; ++index112) + { + for (int index113 = index105 + num124 - 2; index113 <= index105 + num124; ++index113) + Main.tile[index112, index113].active(false); + } + for (int index114 = index104 - num123 - 1; index114 <= index104 + num123 + 1; ++index114) + { + for (int index115 = index105 + num124 - 2; index115 <= index105 + num124 - 1; ++index115) + Main.tile[index114, index115].active(false); + } + for (int index116 = index104 - num123 - 1; index116 <= index104 + num123 + 1; ++index116) + { + int num127 = 4; + for (int index117 = index105 + num124 + 2; !Main.tile[index116, index117].active() && index117 < Main.maxTilesY && num127 > 0; --num127) + { + Main.tile[index116, index117].active(true); + Main.tile[index116, index117].type = (ushort) 59; + ++index117; + } + } + int num128 = num123 - WorldGen.genRand.Next(1, 3); + int index118 = index105 - num124 - 2; + while (num128 > -1) + { + for (int index119 = index104 - num128 - 1; index119 <= index104 + num128 + 1; ++index119) + { + Main.tile[index119, index118].active(true); + Main.tile[index119, index118].type = jungleHut; + } + num128 -= WorldGen.genRand.Next(1, 3); + --index118; + } + WorldGen.JChestX[WorldGen.numJChests] = index104; + WorldGen.JChestY[WorldGen.numJChests] = index105; + ++WorldGen.numJChests; + } + } + } + Main.tileSolid[137] = false; + })); + WorldGen.AddGenerationPass("Smooth World", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[60].Value; + for (int index120 = 20; index120 < Main.maxTilesX - 20; ++index120) + { + float num = (float) index120 / (float) Main.maxTilesX; + progress.Set(num); + for (int index121 = 20; index121 < Main.maxTilesY - 20; ++index121) + { + if (Main.tile[index120, index121].type != (ushort) 48 && Main.tile[index120, index121].type != (ushort) 137 && Main.tile[index120, index121].type != (ushort) 232 && Main.tile[index120, index121].type != (ushort) 191 && Main.tile[index120, index121].type != (ushort) 151 && Main.tile[index120, index121].type != (ushort) 274) + { + if (!Main.tile[index120, index121 - 1].active()) + { + if (WorldGen.SolidTile(index120, index121) && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[index120, index121].type]) + { + if (!Main.tile[index120 - 1, index121].halfBrick() && !Main.tile[index120 + 1, index121].halfBrick() && Main.tile[index120 - 1, index121].slope() == (byte) 0 && Main.tile[index120 + 1, index121].slope() == (byte) 0) + { + if (WorldGen.SolidTile(index120, index121 + 1)) + { + if (!WorldGen.SolidTile(index120 - 1, index121) && !Main.tile[index120 - 1, index121 + 1].halfBrick() && WorldGen.SolidTile(index120 - 1, index121 + 1) && WorldGen.SolidTile(index120 + 1, index121) && !Main.tile[index120 + 1, index121 - 1].active()) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index120, index121, 2); + else + WorldGen.PoundTile(index120, index121); + } + else if (!WorldGen.SolidTile(index120 + 1, index121) && !Main.tile[index120 + 1, index121 + 1].halfBrick() && WorldGen.SolidTile(index120 + 1, index121 + 1) && WorldGen.SolidTile(index120 - 1, index121) && !Main.tile[index120 - 1, index121 - 1].active()) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index120, index121, 1); + else + WorldGen.PoundTile(index120, index121); + } + else if (WorldGen.SolidTile(index120 + 1, index121 + 1) && WorldGen.SolidTile(index120 - 1, index121 + 1) && !Main.tile[index120 + 1, index121].active() && !Main.tile[index120 - 1, index121].active()) + WorldGen.PoundTile(index120, index121); + if (WorldGen.SolidTile(index120, index121)) + { + if (WorldGen.SolidTile(index120 - 1, index121) && WorldGen.SolidTile(index120 + 1, index121 + 2) && !Main.tile[index120 + 1, index121].active() && !Main.tile[index120 + 1, index121 + 1].active() && !Main.tile[index120 - 1, index121 - 1].active()) + WorldGen.KillTile(index120, index121); + else if (WorldGen.SolidTile(index120 + 1, index121) && WorldGen.SolidTile(index120 - 1, index121 + 2) && !Main.tile[index120 - 1, index121].active() && !Main.tile[index120 - 1, index121 + 1].active() && !Main.tile[index120 + 1, index121 - 1].active()) + WorldGen.KillTile(index120, index121); + else if (!Main.tile[index120 - 1, index121 + 1].active() && !Main.tile[index120 - 1, index121].active() && WorldGen.SolidTile(index120 + 1, index121) && WorldGen.SolidTile(index120, index121 + 2)) + { + if (WorldGen.genRand.Next(5) == 0) + WorldGen.KillTile(index120, index121); + else if (WorldGen.genRand.Next(5) == 0) + WorldGen.PoundTile(index120, index121); + else + WorldGen.SlopeTile(index120, index121, 2); + } + else if (!Main.tile[index120 + 1, index121 + 1].active() && !Main.tile[index120 + 1, index121].active() && WorldGen.SolidTile(index120 - 1, index121) && WorldGen.SolidTile(index120, index121 + 2)) + { + if (WorldGen.genRand.Next(5) == 0) + WorldGen.KillTile(index120, index121); + else if (WorldGen.genRand.Next(5) == 0) + WorldGen.PoundTile(index120, index121); + else + WorldGen.SlopeTile(index120, index121, 1); + } + } + } + if (WorldGen.SolidTile(index120, index121) && !Main.tile[index120 - 1, index121].active() && !Main.tile[index120 + 1, index121].active()) + WorldGen.KillTile(index120, index121); + } + } + else if (!Main.tile[index120, index121].active() && Main.tile[index120, index121 + 1].type != (ushort) 151 && Main.tile[index120, index121 + 1].type != (ushort) 274) + { + if (Main.tile[index120 + 1, index121].type != (ushort) 190 && Main.tile[index120 + 1, index121].type != (ushort) 48 && Main.tile[index120 + 1, index121].type != (ushort) 232 && WorldGen.SolidTile(index120 - 1, index121 + 1) && WorldGen.SolidTile(index120 + 1, index121) && !Main.tile[index120 - 1, index121].active() && !Main.tile[index120 + 1, index121 - 1].active()) + { + WorldGen.PlaceTile(index120, index121, (int) Main.tile[index120, index121 + 1].type); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index120, index121, 2); + else + WorldGen.PoundTile(index120, index121); + } + if (Main.tile[index120 - 1, index121].type != (ushort) 190 && Main.tile[index120 - 1, index121].type != (ushort) 48 && Main.tile[index120 - 1, index121].type != (ushort) 232 && WorldGen.SolidTile(index120 + 1, index121 + 1) && WorldGen.SolidTile(index120 - 1, index121) && !Main.tile[index120 + 1, index121].active() && !Main.tile[index120 - 1, index121 - 1].active()) + { + WorldGen.PlaceTile(index120, index121, (int) Main.tile[index120, index121 + 1].type); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index120, index121, 1); + else + WorldGen.PoundTile(index120, index121); + } + } + } + else if (!Main.tile[index120, index121 + 1].active() && WorldGen.genRand.Next(2) == 0 && WorldGen.SolidTile(index120, index121) && !Main.tile[index120 - 1, index121].halfBrick() && !Main.tile[index120 + 1, index121].halfBrick() && Main.tile[index120 - 1, index121].slope() == (byte) 0 && Main.tile[index120 + 1, index121].slope() == (byte) 0 && WorldGen.SolidTile(index120, index121 - 1)) + { + if (WorldGen.SolidTile(index120 - 1, index121) && !WorldGen.SolidTile(index120 + 1, index121) && WorldGen.SolidTile(index120 - 1, index121 - 1)) + WorldGen.SlopeTile(index120, index121, 3); + else if (WorldGen.SolidTile(index120 + 1, index121) && !WorldGen.SolidTile(index120 - 1, index121) && WorldGen.SolidTile(index120 + 1, index121 - 1)) + WorldGen.SlopeTile(index120, index121, 4); + } + if (TileID.Sets.Conversion.Sand[(int) Main.tile[index120, index121].type]) + Tile.SmoothSlope(index120, index121, 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; + })); + WorldGen.AddGenerationPass("Settle Liquids", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[27].Value; + Liquid.QuickWater(3); + WorldGen.WaterCheck(); + int num129 = 0; + Liquid.quickSettle = true; + while (num129 < 10) + { + int num130 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + ++num129; + float num131 = 0.0f; + while (Liquid.numLiquid > 0) + { + float num132 = (float) (num130 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (float) num130; + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > num130) + num130 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + if ((double) num132 > (double) num131) + num131 = num132; + else + num132 = num131; + if (num129 == 1) + progress.Set((float) ((double) num132 / 3.0 + 0.330000013113022)); + int num133 = 10; + if (num129 > num133) + ; + Liquid.UpdateLiquid(); + } + WorldGen.WaterCheck(); + progress.Set((float) ((double) num129 * 0.100000001490116 / 3.0 + 0.660000026226044)); + } + Liquid.quickSettle = false; + Main.tileSolid[190] = true; + })); + WorldGen.AddGenerationPass("Waterfalls", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[69].Value; + for (int i = 20; i < Main.maxTilesX - 20; ++i) + { + float num134 = (float) i / (float) Main.maxTilesX; + progress.Set(num134 * 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 num135 = WorldGen.genRand.Next(8, 20); + int num136 = WorldGen.genRand.Next(8, 20); + int num137 = j - num135; + int num138 = num136 + j; + for (int index = num137; index <= num138; ++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 num = (float) i / (float) Main.maxTilesX; + progress.Set((float) ((double) num * 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); + } + } + } + })); + WorldGen.AddGenerationPass("Ice", (WorldGenLegacyMethod) (progress => + { + for (int i = 10; i < Main.maxTilesX - 10; ++i) + { + for (int worldSurface2 = (int) Main.worldSurface; worldSurface2 < Main.maxTilesY - 100; ++worldSurface2) + { + if (Main.tile[i, worldSurface2].liquid > (byte) 0 && !Main.tile[i, worldSurface2].lava()) + WorldGen.MakeWateryIceThing(i, worldSurface2); + } + } + Main.tileSolid[226] = false; + Main.tileSolid[162] = false; + })); + WorldGen.AddGenerationPass("Wall Variety", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[79].Value; + int num139 = (int) (300.0 * (double) ((float) (Main.maxTilesX * Main.maxTilesY) / 5040000f)); + int num140 = num139; + ShapeData data = new ShapeData(); + while (num139 > 0) + { + progress.Set((float) (1.0 - (double) num139 / (double) num140)); + 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]; + byte type = 0; + if (tile1.type == (ushort) 59 || tile1.type == (ushort) 60) + type = (byte) (204 + WorldGen.genRand.Next(4)); + else if (tile1.type == (ushort) 1 && tile2.wall == (byte) 0) + type = (double) point.Y >= rockLayer ? (point.Y >= WorldGen.lavaLine ? (byte) (208 + WorldGen.genRand.Next(4)) : (byte) (212 + WorldGen.genRand.Next(4))) : (byte) (196 + WorldGen.genRand.Next(4)); + if (tile1.active() && type != (byte) 0 && !tile2.active()) + { + bool foundInvalidTile = false; + bool 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[5] + { + (ushort) 60, + (ushort) 147, + (ushort) 161, + (ushort) 396, + (ushort) 397 + }), (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), (GenAction) new Actions.PlaceWall(type)); + --num139; + } + data.Clear(); + } + } + })); + WorldGen.AddGenerationPass("Traps", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[34].Value; + for (int index122 = 0; index122 < (int) ((double) Main.maxTilesX * 0.05); ++index122) + { + float num = (float) index122 / ((float) Main.maxTilesX * 0.05f); + progress.Set(num); + for (int index123 = 0; index123 < 1150; ++index123) + { + int x2 = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y2 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 210); + if (Main.tile[x2, y2].wall == (byte) 0 && WorldGen.placeTrap(x2, y2)) + break; + } + } + })); + WorldGen.AddGenerationPass("Life Crystals", (WorldGenLegacyMethod) (progress => + { + 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 num141 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 2E-05f); + progress.Set(num141); + bool flag = false; + int num142 = 0; + while (!flag) + { + if (WorldGen.AddLifeCrystal(WorldGen.genRand.Next(40, Main.maxTilesX - 40), WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 300))) + { + flag = true; + } + else + { + ++num142; + if (num142 >= 10000) + flag = true; + } + } + } + Main.tileSolid[225] = false; + })); + WorldGen.AddGenerationPass("Statues", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[29].Value; + int index124 = 0; + int num143 = (int) ((double) (WorldGen.statueList.Length * 2) * (double) dub2); + for (int index125 = 0; index125 < num143; ++index125) + { + if (index124 >= WorldGen.statueList.Length) + index124 = 0; + int x = (int) WorldGen.statueList[index124].X; + int y = (int) WorldGen.statueList[index124].Y; + float num144 = (float) (index125 / num143); + progress.Set(num144); + bool flag = false; + int num145 = 0; + while (!flag) + { + int index126 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index127 = WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 300); + while (!Main.tile[index126, index127].active()) + ++index127; + int index128 = index127 - 1; + WorldGen.PlaceTile(index126, index128, x, true, true, style: y); + if (Main.tile[index126, index128].active() && (int) Main.tile[index126, index128].type == x) + { + flag = true; + if (WorldGen.StatuesWithTraps.Contains(index124)) + WorldGen.PlaceStatueTrap(index126, index128); + ++index124; + } + else + { + ++num145; + if (num145 >= 10000) + flag = true; + } + } + } + })); + WorldGen.AddGenerationPass("Buried Chests", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[30].Value; + Main.tileSolid[226] = true; + Main.tileSolid[162] = true; + Main.tileSolid[225] = true; + for (int index129 = 0; index129 < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 1.6E-05); ++index129) + { + float num146 = (float) index129 / ((float) (Main.maxTilesX * Main.maxTilesY) * 1.6E-05f); + progress.Set(num146); + bool flag = false; + int num147 = 0; + while (!flag) + { + float num148 = (float) WorldGen.genRand.Next((int) (5.0 * (double) dub2), (int) (8.0 * (double) dub2 + 1.0)); + int i = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int j = WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 230); + if ((double) index129 <= (double) num148) + j = WorldGen.genRand.Next(Main.maxTilesY - 200, Main.maxTilesY - 50); + int num149 = 0; + while (Main.wallDungeon[(int) Main.tile[i, j].wall]) + { + ++num149; + i = WorldGen.genRand.Next(1, Main.maxTilesX); + j = WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 230); + if (num149 < 1000 && (double) index129 <= (double) num148) + j = WorldGen.genRand.Next(Main.maxTilesY - 200, Main.maxTilesY - 50); + } + if ((double) index129 > (double) num148) + { + for (int index130 = 10; index130 > 0; --index130) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.genRand.Next(80, Main.maxTilesX - 80), WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 230), structures)) + { + flag = true; + break; + } + } + } + else if (WorldGen.AddBuriedChest(i, j)) + flag = true; + ++num147; + if (num147 >= 1000) + flag = true; + } + } + int num = (int) (2.0 * (double) (Main.maxTilesX * Main.maxTilesY) / 5040000.0); + for (int index = 1000; index >= 0 && num >= 0; --index) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomRectanglePoint(WorldGen.UndergroundDesertLocation), structures)) + --num; + } + Main.tileSolid[226] = false; + Main.tileSolid[162] = false; + Main.tileSolid[225] = false; + })); + WorldGen.AddGenerationPass("Surface Chests", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[31].Value; + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.005); ++index) + { + float num150 = (float) index / ((float) Main.maxTilesX * 0.005f); + progress.Set(num150); + bool flag14 = false; + int num151 = 0; + while (!flag14) + { + int i = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + int j = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) Main.worldSurface); + bool flag15 = false; + if (Main.tile[i, j].wall == (byte) 2 && !Main.tile[i, j].active()) + flag15 = true; + if (flag15 && WorldGen.AddBuriedChest(i, j, notNearOtherChests: true)) + { + flag14 = true; + } + else + { + ++num151; + if (num151 >= 2000) + flag14 = true; + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Chests Placement", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[32].Value; + for (int index131 = 0; index131 < WorldGen.numJChests; ++index131) + { + float num = (float) (index131 / WorldGen.numJChests); + progress.Set(num); + int nextJungleChestItem = WorldGen.GetNextJungleChestItem(); + if (!WorldGen.AddBuriedChest(WorldGen.JChestX[index131] + WorldGen.genRand.Next(2), WorldGen.JChestY[index131], nextJungleChestItem, Style: 10)) + { + for (int i = WorldGen.JChestX[index131] - 1; i <= WorldGen.JChestX[index131] + 1; ++i) + { + for (int j = WorldGen.JChestY[index131]; j <= WorldGen.JChestY[index131] + 2; ++j) + WorldGen.KillTile(i, j); + } + for (int index132 = WorldGen.JChestX[index131] - 1; index132 <= WorldGen.JChestX[index131] + 1; ++index132) + { + for (int index133 = WorldGen.JChestY[index131]; index133 <= WorldGen.JChestY[index131] + 3; ++index133) + { + if (index133 < Main.maxTilesY) + { + Main.tile[index132, index133].slope((byte) 0); + Main.tile[index132, index133].halfBrick(false); + } + } + } + WorldGen.AddBuriedChest(WorldGen.JChestX[index131], WorldGen.JChestY[index131], nextJungleChestItem, Style: 10); + } + } + })); + WorldGen.AddGenerationPass("Water Chests", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[33].Value; + int num152 = 0; + for (int index = 0; (double) index < 9.0 * (double) dub2; ++index) + { + float num153 = (float) index / (9f * dub2); + progress.Set(num153); + ++num152; + int contain; + if (WorldGen.genRand.Next(15) == 0) + { + contain = 863; + } + else + { + switch (num152) + { + case 1: + contain = 186; + break; + case 2: + contain = 277; + break; + default: + contain = 187; + num152 = 0; + break; + } + } + int i12; + int j11; + for (bool flag = false; !flag; flag = WorldGen.AddBuriedChest(i12, j11, contain, Style: 17)) + { + i12 = WorldGen.genRand.Next(1, Main.maxTilesX); + for (j11 = WorldGen.genRand.Next(1, Main.maxTilesY - 200); Main.tile[i12, j11].liquid < (byte) 200 || Main.tile[i12, j11].lava(); j11 = WorldGen.genRand.Next(1, Main.maxTilesY - 200)) + i12 = WorldGen.genRand.Next(1, Main.maxTilesX); + } + int i13; + int j12; + for (bool flag = false; !flag; flag = WorldGen.AddBuriedChest(i13, j12, contain, Style: 17)) + { + i13 = WorldGen.genRand.Next(1, Main.maxTilesX); + for (j12 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 200); Main.tile[i13, j12].liquid < (byte) 200 || Main.tile[i13, j12].lava(); j12 = WorldGen.genRand.Next(1, Main.maxTilesY - 200)) + i13 = WorldGen.genRand.Next(1, Main.maxTilesX); + } + } + })); + WorldGen.AddGenerationPass("Spider Caves", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[64].Value; + WorldGen.maxTileCount = 3500; + for (int index134 = 0; index134 < (int) ((double) Main.maxTilesX * 0.005); ++index134) + { + float num154 = (float) index134 / ((float) Main.maxTilesX * 0.005f); + progress.Set(num154); + int num155 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 230); + for (int index135 = WorldGen.countTiles(x, y, lavaOk: true); (index135 >= 3500 || index135 < 500) && num155 < 500; index135 = WorldGen.countTiles(x, y, lavaOk: true)) + { + ++num155; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + } + if (num155 < 500) + WorldGen.Spread.Spider(x, y); + } + Main.tileSolid[162] = true; + })); + WorldGen.AddGenerationPass("Gem Caves", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[64].Value; + WorldGen.maxTileCount = 300; + for (int index136 = 0; index136 < (int) ((double) Main.maxTilesX * 0.003); ++index136) + { + float num156 = (float) index136 / ((float) Main.maxTilesX * (3f / 1000f)); + progress.Set(num156); + int num157 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + for (int index137 = WorldGen.countTiles(x, y); (index137 >= 300 || index137 < 50 || WorldGen.lavaCount > 0 || WorldGen.iceCount > 0 || WorldGen.rockCount == 0) && num157 < 1000; index137 = WorldGen.countTiles(x, y)) + { + ++num157; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + } + if (num157 < 1000) + WorldGen.gemCave(x, y); + } + })); + WorldGen.AddGenerationPass("Moss", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[61].Value; + WorldGen.randMoss(); + WorldGen.maxTileCount = 2500; + for (int index138 = 0; index138 < (int) ((double) Main.maxTilesX * 0.01); ++index138) + { + float num158 = (float) index138 / ((float) Main.maxTilesX * 0.01f); + progress.Set(num158); + int num159 = 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 index139 = WorldGen.countTiles(x, y); (index139 >= 2500 || index139 < 10 || WorldGen.lavaCount > 0 || WorldGen.iceCount > 0 || WorldGen.rockCount == 0) && num159 < 1000; index139 = WorldGen.countTiles(x, y)) + { + ++num159; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + } + if (num159 < 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 = (ushort) WorldGen.mossTile; + } + } + float num160 = (float) Main.maxTilesX * 0.05f; + while ((double) num160 > 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 = (ushort) WorldGen.mossTile; + --num160; + } + } + float num161 = (float) Main.maxTilesX * 0.065f; + while ((double) num161 > 0.0) + { + int index140 = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int index141 = WorldGen.genRand.Next(WorldGen.waterLine, Main.maxTilesY - 200); + if (Main.tile[index140, index141].type == (ushort) 1 && (!Main.tile[index140 - 1, index141].active() || !Main.tile[index140 + 1, index141].active() || !Main.tile[index140, index141 - 1].active() || !Main.tile[index140, index141 + 1].active())) + { + int num162 = 25; + int num163 = 0; + for (int index142 = index140 - num162; index142 < index140 + num162; ++index142) + { + for (int index143 = index141 - num162; index143 < index141 + num162; ++index143) + { + if (Main.tile[index142, index143].liquid > (byte) 0 && Main.tile[index142, index143].lava()) + ++num163; + } + } + if (num163 > 20) + { + Main.tile[index140, index141].type = (ushort) 381; + --num161; + } + else + num161 -= 1f / 500f; + } + } + for (int index144 = 0; index144 < Main.maxTilesX; ++index144) + { + for (int index145 = 0; index145 < Main.maxTilesY; ++index145) + { + if (Main.tile[index144, index145].active() && Main.tileMoss[(int) Main.tile[index144, index145].type]) + { + for (int index146 = 0; index146 < 4; ++index146) + { + int i = index144; + int j = index145; + if (index146 == 0) + --i; + if (index146 == 1) + ++i; + if (index146 == 2) + --j; + if (index146 == 3) + ++j; + try + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i, j, 1, (int) Main.tile[index144, index145].type); + } + catch + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i, j, 1, (int) Main.tile[index144, index145].type, false); + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Temple", (WorldGenLegacyMethod) (progress => + { + Main.tileSolid[162] = false; + Main.tileSolid[226] = true; + WorldGen.templePart2(); + Main.tileSolid[232] = false; + })); + WorldGen.AddGenerationPass("Ice Walls", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[63].Value; + WorldGen.maxTileCount = 1500; + for (int index147 = 0; index147 < (int) ((double) Main.maxTilesX * 0.04); ++index147) + { + float num164 = (float) index147 / ((float) Main.maxTilesX * 0.04f); + progress.Set(num164 * 0.66f); + int num165 = 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 index148 = WorldGen.countTiles(x, y, lavaOk: true); (index148 >= 1500 || index148 < 10) && num165 < 500; index148 = WorldGen.countTiles(x, y, lavaOk: true)) + { + ++num165; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 220); + } + if (num165 < 500) + { + int wallType = WorldGen.genRand.Next(2); + 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; + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.02); ++index) + { + float num166 = (float) index / ((float) Main.maxTilesX * 0.02f); + progress.Set((float) ((double) num166 * 0.340000003576279 + 0.660000026226044)); + int num167 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.lavaLine); + int num168 = 0; + if (Main.tile[x, y].wall == (byte) 64) + num168 = WorldGen.countTiles(x, y, true); + while ((num168 >= 1500 || num168 < 10) && num167 < 1000) + { + ++num167; + 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]) + num168 = Main.tile[x, y].wall != (byte) 64 ? 0 : WorldGen.countTiles(x, y, true); + } + if (num167 < 1000) + WorldGen.Spread.Wall2(x, y, 15); + } + })); + WorldGen.AddGenerationPass("Jungle Trees", (WorldGenLegacyMethod) (progress => + { + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int y = (int) Main.worldSurface - 1; y < Main.maxTilesY - 350; ++y) + { + if (WorldGen.genRand.Next(10) == 0) + WorldGen.GrowUndergroundTree(i, y); + } + } + })); + WorldGen.AddGenerationPass("Floating Island Houses", (WorldGenLegacyMethod) (progress => + { + for (int index = 0; index < WorldGen.numIslandHouses; ++index) + { + if (!WorldGen.skyLake[index]) + WorldGen.IslandHouse(WorldGen.fihX[index], WorldGen.fihY[index]); + } + })); + WorldGen.AddGenerationPass("Quick Cleanup", (WorldGenLegacyMethod) (progress => + { + Main.tileSolid[137] = false; + Main.tileSolid[130] = false; + for (int i = 20; i < Main.maxTilesX - 20; ++i) + { + for (int index = 20; index < Main.maxTilesY - 20; ++index) + { + if (Main.tile[i, index].type != (ushort) 19 && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[i, index].type]) + { + if (Main.tile[i, index].topSlope() || Main.tile[i, index].halfBrick()) + { + if (!WorldGen.SolidTile(i, index + 1)) + Main.tile[i, index].active(false); + if (Main.tile[i + 1, index].type == (ushort) 137 || Main.tile[i - 1, index].type == (ushort) 137) + Main.tile[i, index].active(false); + } + else if (Main.tile[i, index].bottomSlope()) + { + if (!WorldGen.SolidTile(i, index - 1)) + Main.tile[i, index].active(false); + if (Main.tile[i + 1, index].type == (ushort) 137 || Main.tile[i - 1, index].type == (ushort) 137) + Main.tile[i, index].active(false); + } + } + } + } + })); + WorldGen.AddGenerationPass("Pots", (WorldGenLegacyMethod) (progress => + { + 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 num169 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.0008f); + progress.Set(num169); + bool flag16 = false; + int num170 = 0; + while (!flag16) + { + int num171 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY - 10); + if ((double) num169 > 0.93) + num171 = Main.maxTilesY - 150; + else if ((double) num169 > 0.75) + num171 = (int) WorldGen.worldSurfaceLow; + int x = WorldGen.genRand.Next(1, Main.maxTilesX); + bool flag17 = false; + for (int y = num171; y < Main.maxTilesY; ++y) + { + if (!flag17) + { + if (Main.tile[x, y].active() && Main.tileSolid[(int) Main.tile[x, y].type] && !Main.tile[x, y - 1].lava()) + flag17 = true; + } + else + { + int style = WorldGen.genRand.Next(0, 4); + int num172 = 0; + if (y < Main.maxTilesY - 5) + num172 = (int) Main.tile[x, y + 1].type; + if (num172 == 147 || num172 == 161 || num172 == 162) + style = WorldGen.genRand.Next(4, 7); + if (num172 == 60) + style = WorldGen.genRand.Next(7, 10); + if (Main.wallDungeon[(int) Main.tile[x, y].wall]) + style = WorldGen.genRand.Next(10, 13); + if (num172 == 41 || num172 == 43 || num172 == 44) + style = WorldGen.genRand.Next(10, 13); + if (num172 == 22 || num172 == 23 || num172 == 25) + style = WorldGen.genRand.Next(16, 19); + if (num172 == 199 || num172 == 203 || num172 == 204 || num172 == 200) + style = WorldGen.genRand.Next(22, 25); + if (num172 == 367) + style = WorldGen.genRand.Next(31, 34); + if (num172 == 226) + style = WorldGen.genRand.Next(28, 31); + if (y > Main.maxTilesY - 200) + style = WorldGen.genRand.Next(13, 16); + if (WorldGen.PlacePot(x, y, style: style)) + { + flag16 = true; + break; + } + ++num170; + if (num170 >= 10000) + { + flag16 = true; + break; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Hellforge", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[36].Value; + for (int index149 = 0; index149 < Main.maxTilesX / 200; ++index149) + { + float num173 = (float) (index149 / (Main.maxTilesX / 200)); + progress.Set(num173); + bool flag = false; + int num174 = 0; + while (!flag) + { + int i = WorldGen.genRand.Next(1, Main.maxTilesX); + int index150 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 5); + try + { + if (Main.tile[i, index150].wall != (byte) 13) + { + if (Main.tile[i, index150].wall != (byte) 14) + continue; + } + while (!Main.tile[i, index150].active()) + ++index150; + int j = index150 - 1; + WorldGen.PlaceTile(i, j, 77); + if (Main.tile[i, j].type == (ushort) 77) + { + flag = true; + } + else + { + ++num174; + if (num174 >= 10000) + flag = true; + } + } + catch + { + } + } + } + })); + WorldGen.AddGenerationPass("Spreading Grass", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[37].Value; + for (int index = 0; index < Main.maxTilesX; ++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 == (byte) 0) + flag = true; + } + } + })); + WorldGen.AddGenerationPass("Piles", (WorldGenLegacyMethod) (progress => + { + Main.tileSolid[190] = false; + Main.tileSolid[196] = false; + Main.tileSolid[189] = false; + Main.tileSolid[202] = false; + for (int index151 = 0; (double) index151 < (double) Main.maxTilesX * 0.06; ++index151) + { + bool flag = false; + while (!flag) + { + int i14 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j13 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 300); + if (!Main.tile[i14, j13].active()) + { + int type = 186; + while (!Main.tile[i14, j13 + 1].active() && j13 < Main.maxTilesY - 5) + ++j13; + 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[i14, j13 + 1].type == (ushort) 0 || Main.tile[i14, j13 + 1].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[i14, j13 + 1].type]) && WorldGen.genRand.Next(5) == 0) + { + style = WorldGen.genRand.Next(23, 29); + type = 187; + } + if (j13 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[i14, j13].wall] || Main.tile[i14, j13 + 1].type == (ushort) 30 || Main.tile[i14, j13 + 1].type == (ushort) 19 || Main.tile[i14, j13 + 1].type == (ushort) 25 || Main.tile[i14, j13 + 1].type == (ushort) 203) + { + style = WorldGen.genRand.Next(7); + type = 186; + } + if (Main.tile[i14, j13 + 1].type == (ushort) 147 || Main.tile[i14, j13 + 1].type == (ushort) 161 || Main.tile[i14, j13 + 1].type == (ushort) 162) + { + style = WorldGen.genRand.Next(26, 32); + type = 186; + } + if (Main.tile[i14, j13 + 1].type == (ushort) 60) + { + type = 187; + style = WorldGen.genRand.Next(6); + } + if ((Main.tile[i14, j13 + 1].type == (ushort) 57 || Main.tile[i14, j13 + 1].type == (ushort) 58) && WorldGen.genRand.Next(3) < 2) + { + type = 187; + style = WorldGen.genRand.Next(6, 9); + } + if (Main.tile[i14, j13 + 1].type == (ushort) 226) + { + type = 187; + style = WorldGen.genRand.Next(18, 23); + } + if (Main.tile[i14, j13 + 1].type == (ushort) 70) + { + style = WorldGen.genRand.Next(32, 35); + type = 186; + } + if (type == 186 && style >= 7 && style <= 15 && WorldGen.genRand.Next(75) == 0) + { + type = 187; + style = 17; + } + if (Main.wallDungeon[(int) Main.tile[i14, j13].wall] && WorldGen.genRand.Next(3) != 0) + { + flag = true; + } + else + { + WorldGen.PlaceTile(i14, j13, type, true, style: style); + if (Main.tile[i14, j13].type == (ushort) 186 || Main.tile[i14, j13].type == (ushort) 187) + flag = true; + if (flag && type == 186 && style <= 7) + { + int num = WorldGen.genRand.Next(1, 5); + for (int index152 = 0; index152 < num; ++index152) + { + int i15 = i14 + WorldGen.genRand.Next(-10, 11); + int j14 = j13 - WorldGen.genRand.Next(5); + if (!Main.tile[i15, j14].active()) + { + while (!Main.tile[i15, j14 + 1].active() && j14 < Main.maxTilesY - 5) + ++j14; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i15, j14, X, 0); + } + } + } + } + } + } + } + for (int index153 = 0; (double) index153 < (double) Main.maxTilesX * 0.01; ++index153) + { + bool flag = false; + while (!flag) + { + int i16 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j15 = WorldGen.genRand.Next(Main.maxTilesY - 300, Main.maxTilesY - 10); + if (!Main.tile[i16, j15].active()) + { + int type = 186; + while (!Main.tile[i16, j15 + 1].active() && j15 < Main.maxTilesY - 5) + ++j15; + 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 (j15 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[i16, j15].wall] || Main.tile[i16, j15 + 1].type == (ushort) 30 || Main.tile[i16, j15 + 1].type == (ushort) 19) + style = WorldGen.genRand.Next(7); + if ((Main.tile[i16, j15 + 1].type == (ushort) 57 || Main.tile[i16, j15 + 1].type == (ushort) 58) && WorldGen.genRand.Next(3) < 2) + { + type = 187; + style = WorldGen.genRand.Next(6, 9); + } + if (Main.tile[i16, j15 + 1].type == (ushort) 147 || Main.tile[i16, j15 + 1].type == (ushort) 161 || Main.tile[i16, j15 + 1].type == (ushort) 162) + style = WorldGen.genRand.Next(26, 32); + WorldGen.PlaceTile(i16, j15, type, true, style: style); + if (Main.tile[i16, j15].type == (ushort) 186 || Main.tile[i16, j15].type == (ushort) 187) + flag = true; + if (flag && type == 186 && style <= 7) + { + int num = WorldGen.genRand.Next(1, 5); + for (int index154 = 0; index154 < num; ++index154) + { + int i17 = i16 + WorldGen.genRand.Next(-10, 11); + int j16 = j15 - WorldGen.genRand.Next(5); + if (!Main.tile[i17, j16].active()) + { + while (!Main.tile[i17, j16 + 1].active() && j16 < Main.maxTilesY - 5) + ++j16; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i17, j16, X, 0); + } + } + } + } + } + } + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.003; ++index) + { + bool flag = false; + while (!flag) + { + int type = 186; + int i = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j = WorldGen.genRand.Next(10, (int) Main.worldSurface); + if (!Main.tile[i, j].active()) + { + while (!Main.tile[i, j + 1].active() && j < Main.maxTilesY - 5) + ++j; + int style = WorldGen.genRand.Next(7, 13); + if (j > Main.maxTilesY - 300 || 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) 53 || Main.tile[i, j + 1].type == (ushort) 25 || Main.tile[i, j + 1].type == (ushort) 203) + style = -1; + 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) + style = WorldGen.genRand.Next(26, 32); + if (Main.tile[i, j + 1].type == (ushort) 2 || Main.tile[i - 1, j + 1].type == (ushort) 2 || Main.tile[i + 1, j + 1].type == (ushort) 2) + { + type = 187; + style = WorldGen.genRand.Next(14, 17); + } + if (Main.tile[i, j + 1].type == (ushort) 151 || Main.tile[i, j + 1].type == (ushort) 274) + { + type = 186; + style = WorldGen.genRand.Next(7); + } + if (style >= 0) + WorldGen.PlaceTile(i, j, type, true, style: style); + if ((int) Main.tile[i, j].type == type) + flag = true; + } + } + } + for (int index155 = 0; (double) index155 < (double) Main.maxTilesX * 0.0035; ++index155) + { + bool flag = false; + while (!flag) + { + int i18 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j17 = WorldGen.genRand.Next(10, (int) Main.worldSurface); + if (!Main.tile[i18, j17].active() && Main.tile[i18, j17].wall > (byte) 0) + { + int type = 186; + while (!Main.tile[i18, j17 + 1].active() && j17 < Main.maxTilesY - 5) + ++j17; + int style = WorldGen.genRand.Next(7, 13); + if (j17 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[i18, j17].wall] || Main.tile[i18, j17 + 1].type == (ushort) 30 || Main.tile[i18, j17 + 1].type == (ushort) 19) + style = -1; + if (Main.tile[i18, j17 + 1].type == (ushort) 25) + style = WorldGen.genRand.Next(7); + if (Main.tile[i18, j17 + 1].type == (ushort) 147 || Main.tile[i18, j17 + 1].type == (ushort) 161 || Main.tile[i18, j17 + 1].type == (ushort) 162) + style = WorldGen.genRand.Next(26, 32); + if (Main.tile[i18, j17 + 1].type == (ushort) 2 || Main.tile[i18 - 1, j17 + 1].type == (ushort) 2 || Main.tile[i18 + 1, j17 + 1].type == (ushort) 2) + { + type = 187; + style = WorldGen.genRand.Next(14, 17); + } + if (Main.tile[i18, j17 + 1].type == (ushort) 151 || Main.tile[i18, j17 + 1].type == (ushort) 274) + { + type = 186; + style = WorldGen.genRand.Next(7); + } + if (style >= 0) + WorldGen.PlaceTile(i18, j17, type, true, style: style); + if ((int) Main.tile[i18, j17].type == type) + flag = true; + if (flag && style <= 7) + { + int num = WorldGen.genRand.Next(1, 5); + for (int index156 = 0; index156 < num; ++index156) + { + int i19 = i18 + WorldGen.genRand.Next(-10, 11); + int j18 = j17 - WorldGen.genRand.Next(5); + if (!Main.tile[i19, j18].active()) + { + while (!Main.tile[i19, j18 + 1].active() && j18 < Main.maxTilesY - 5) + ++j18; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i19, j18, X, 0); + } + } + } + } + } + } + for (int index157 = 0; (double) index157 < (double) Main.maxTilesX * 0.6; ++index157) + { + bool flag = false; + while (!flag) + { + int i20 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j19 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20); + if (Main.tile[i20, j19].wall == (byte) 87 && WorldGen.genRand.Next(2) == 0) + { + i20 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + j19 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20); + } + if (!Main.tile[i20, j19].active()) + { + while (!Main.tile[i20, j19 + 1].active() && j19 < Main.maxTilesY - 5) + ++j19; + 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 (j19 > 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[i20, j19].wall] || Main.tile[i20, j19 + 1].type == (ushort) 30 || Main.tile[i20, j19 + 1].type == (ushort) 19 || Main.tile[i20, j19 + 1].type == (ushort) 25 || Main.tile[i20, j19 + 1].type == (ushort) 203 || Main.tile[i20, j19].wall == (byte) 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[i20, j19 + 1].type == (ushort) 147 || Main.tile[i20, j19 + 1].type == (ushort) 161 || Main.tile[i20, j19 + 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[i20, j19 + 1].type == (ushort) 151 || Main.tile[i20, j19 + 1].type == (ushort) 274) + { + if (Y == 0) + X1 = WorldGen.genRand.Next(12, 28); + if (Y == 1) + X1 = WorldGen.genRand.Next(12, 19); + } + flag = Main.wallDungeon[(int) Main.tile[i20, j19].wall] && WorldGen.genRand.Next(3) != 0 || WorldGen.PlaceSmallPile(i20, j19, X1, Y); + if (flag && Y == 1 && X1 >= 6 && X1 <= 15) + { + int num = WorldGen.genRand.Next(1, 5); + for (int index158 = 0; index158 < num; ++index158) + { + int i21 = i20 + WorldGen.genRand.Next(-10, 11); + int j20 = j19 - WorldGen.genRand.Next(5); + if (!Main.tile[i21, j20].active()) + { + while (!Main.tile[i21, j20 + 1].active() && j20 < Main.maxTilesY - 5) + ++j20; + int X2 = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i21, j20, X2, 0); + } + } + } + } + } + } + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.0199999995529652; ++index) + { + bool flag = false; + while (!flag) + { + int i = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j = WorldGen.genRand.Next(15, (int) Main.worldSurface); + if (!Main.tile[i, j].active()) + { + 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.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) 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) 53 && Main.tile[i, j + 1].type != (ushort) 25 && Main.tile[i, j + 1].type != (ushort) 203) + flag = WorldGen.PlaceSmallPile(i, j, X, Y); + } + } + } + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.150000005960464; ++index) + { + bool flag = false; + while (!flag) + { + 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 == (byte) 2 || Main.tile[i, j].wall == (byte) 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.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) 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; + })); + WorldGen.AddGenerationPass("Moss", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[38].Value; + int num175 = 8; + int num176 = 400; + int num177 = 4; + int num178 = 275; + for (int index = 0; index < 3; ++index) + { + int num179; + int num180; + bool flag; + int maxValue; + switch (index) + { + case 1: + num179 = num176; + num180 = Main.maxTilesX - num176; + flag = true; + maxValue = num175; + break; + case 2: + num179 = Main.maxTilesX - num178; + num180 = Main.maxTilesX - 5; + flag = false; + maxValue = num177; + break; + default: + num179 = 5; + num180 = num178; + flag = false; + maxValue = num177; + break; + } + for (int i = num179; i < num180; ++i) + { + if (WorldGen.genRand.Next(maxValue) == 0) + { + for (int j = 0; (double) j < Main.worldSurface - 1.0; ++j) + { + Tile tile3 = Main.tile[i, j]; + if (tile3.active() && tile3.type == (ushort) 53) + { + Tile tile4 = Main.tile[i, j - 1]; + if (!tile4.active() && tile4.wall == (byte) 0) + { + if (flag) + { + WorldGen.PlantCactus(i, j); + break; + } + if (Main.tile[i, j - 2].liquid == byte.MaxValue && Main.tile[i, j - 3].liquid == byte.MaxValue && Main.tile[i, j - 4].liquid == byte.MaxValue) + { + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(i, j - 1, 81, true); + break; + } + WorldGen.PlaceTile(i, j - 1, 324, true, style: WorldGen.genRand.Next(2)); + break; + } + if (Main.tile[i, j - 2].liquid == (byte) 0) + { + WorldGen.PlaceTile(i, j - 1, 324, true, style: WorldGen.genRand.Next(2)); + break; + } + } + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Spawn Point", (WorldGenLegacyMethod) (progress => + { + int num181 = 5; + bool flag = true; + while (flag) + { + int index159 = Main.maxTilesX / 2 + WorldGen.genRand.Next(-num181, num181 + 1); + for (int index160 = 0; index160 < Main.maxTilesY; ++index160) + { + if (Main.tile[index159, index160].active()) + { + Main.spawnTileX = index159; + Main.spawnTileY = index160; + break; + } + } + flag = false; + ++num181; + if ((double) Main.spawnTileY > Main.worldSurface) + flag = true; + if (Main.tile[Main.spawnTileX, Main.spawnTileY - 1].liquid > (byte) 0) + flag = true; + } + int num182 = 10; + while ((double) Main.spawnTileY > Main.worldSurface) + { + int index161 = WorldGen.genRand.Next(Main.maxTilesX / 2 - num182, Main.maxTilesX / 2 + num182); + for (int index162 = 0; index162 < Main.maxTilesY; ++index162) + { + if (Main.tile[index161, index162].active()) + { + Main.spawnTileX = index161; + Main.spawnTileY = index162; + break; + } + } + ++num182; + } + })); + WorldGen.AddGenerationPass("Grass Wall", (WorldGenLegacyMethod) (progress => + { + WorldGen.maxTileCount = 3500; + for (int index163 = 50; index163 < Main.maxTilesX - 50; ++index163) + { + for (int index164 = 0; (double) index164 < Main.worldSurface - 10.0; ++index164) + { + if (WorldGen.genRand.Next(4) == 0) + { + bool flag = false; + int x = -1; + int y = -1; + if (Main.tile[index163, index164].active() && Main.tile[index163, index164].type == (ushort) 2 && (Main.tile[index163, index164].wall == (byte) 2 || Main.tile[index163, index164].wall == (byte) 63)) + { + for (int i = index163 - 1; i <= index163 + 1; ++i) + { + for (int j = index164 - 1; j <= index164 + 1; ++j) + { + if (Main.tile[i, j].wall == (byte) 0 && !WorldGen.SolidTile(i, j)) + flag = true; + } + } + if (flag) + { + for (int i = index163 - 1; i <= index163 + 1; ++i) + { + for (int j = index164 - 1; j <= index164 + 1; ++j) + { + if ((Main.tile[i, j].wall == (byte) 2 || Main.tile[i, j].wall == (byte) 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 == (byte) 63 && WorldGen.genRand.Next(10) == 0) + Main.tile[i, j].wall = (byte) 65; + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 0) + { + bool flag = false; + for (int index165 = i - 1; index165 <= i + 1; ++index165) + { + for (int index166 = j - 1; index166 <= j + 1; ++index166) + { + if (Main.tile[i, j].wall == (byte) 63 || Main.tile[i, j].wall == (byte) 65) + { + flag = true; + break; + } + } + } + if (flag) + WorldGen.SpreadGrass(i, j); + } + } + } + })); + WorldGen.AddGenerationPass("Guide", (WorldGenLegacyMethod) (progress => + { + 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 => + { + progress.Message = Lang.gen[39].Value; + for (int index167 = 0; (double) index167 < (double) Main.maxTilesX * 0.002; ++index167) + { + int num183 = Main.maxTilesX / 2; + int num184 = WorldGen.genRand.Next(Main.maxTilesX); + int num185 = num184 - WorldGen.genRand.Next(10) - 7; + int num186 = num184 + WorldGen.genRand.Next(10) + 7; + if (num185 < 0) + num185 = 0; + if (num186 > Main.maxTilesX - 1) + num186 = Main.maxTilesX - 1; + for (int i = num185; i < num186; ++i) + { + for (int index168 = 1; (double) index168 < Main.worldSurface - 1.0; ++index168) + { + if (Main.tile[i, index168].type == (ushort) 2 && Main.tile[i, index168].active() && !Main.tile[i, index168 - 1].active()) + WorldGen.PlaceTile(i, index168 - 1, 27, true); + if (Main.tile[i, index168].active()) + break; + } + } + } + })); + WorldGen.AddGenerationPass("Planting Trees", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[40].Value; + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.003; ++index) + { + int num187 = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int num188 = WorldGen.genRand.Next(25, 50); + for (int i = num187 - num188; i < num187 + num188; ++i) + { + for (int y = 20; (double) y < Main.worldSurface; ++y) + WorldGen.GrowEpicTree(i, y); + } + } + WorldGen.AddTrees(); + })); + WorldGen.AddGenerationPass("Herbs", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[41].Value; + for (int index = 0; (double) index < (double) Main.maxTilesX * 1.7; ++index) + WorldGen.PlantAlch(); + })); + WorldGen.AddGenerationPass("Dye Plants", (WorldGenLegacyMethod) (progress => + { + for (int index = 0; index < Main.maxTilesX; ++index) + WorldGen.plantDye(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next(100, Main.maxTilesY - 200)); + for (int index = 0; index < Main.maxTilesX / 8; ++index) + WorldGen.plantDye(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next(100, Main.maxTilesY - 200), true); + })); + WorldGen.AddGenerationPass("Webs And Honey", (WorldGenLegacyMethod) (progress => + { + for (int index = 100; index < Main.maxTilesX - 100; ++index) + { + for (int worldSurface3 = (int) Main.worldSurface; worldSurface3 < Main.maxTilesY - 100; ++worldSurface3) + { + if (Main.tile[index, worldSurface3].wall == (byte) 86) + { + if (Main.tile[index, worldSurface3].liquid > (byte) 0) + Main.tile[index, worldSurface3].honey(true); + if (WorldGen.genRand.Next(3) == 0) + WorldGen.PlaceTight(index, worldSurface3); + } + if (Main.tile[index, worldSurface3].wall == (byte) 62) + { + Main.tile[index, worldSurface3].liquid = (byte) 0; + Main.tile[index, worldSurface3].lava(false); + } + if (Main.tile[index, worldSurface3].wall == (byte) 62 && !Main.tile[index, worldSurface3].active() && WorldGen.genRand.Next(10) != 0) + { + int num189 = WorldGen.genRand.Next(2, 5); + int num190 = index - num189; + int num191 = index + num189; + int num192 = worldSurface3 - num189; + int num193 = worldSurface3 + num189; + bool flag = false; + for (int i = num190; i <= num191; ++i) + { + for (int j = num192; j <= num193; ++j) + { + if (WorldGen.SolidTile(i, j)) + { + flag = true; + break; + } + } + } + if (flag) + { + WorldGen.PlaceTile(index, worldSurface3, 51, true); + WorldGen.TileFrame(index, worldSurface3); + } + } + } + } + })); + WorldGen.AddGenerationPass("Weeds", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[42].Value; + if (Main.halloween) + { + for (int index169 = 40; index169 < Main.maxTilesX - 40; ++index169) + { + for (int index170 = 50; (double) index170 < Main.worldSurface; ++index170) + { + if (Main.tile[index169, index170].active() && Main.tile[index169, index170].type == (ushort) 2 && WorldGen.genRand.Next(15) == 0) + { + WorldGen.PlacePumpkin(index169, index170 - 1); + int num = WorldGen.genRand.Next(5); + for (int index171 = 0; index171 < num; ++index171) + WorldGen.GrowPumpkin(index169, index170 - 1, 254); + } + } + } + } + WorldGen.AddPlants(); + })); + WorldGen.AddGenerationPass("Mud Caves To Grass", (WorldGenLegacyMethod) (progress => + { + 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.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 => + { + for (int index172 = 0; index172 < Main.maxTilesX * 100; ++index172) + { + int X2 = WorldGen.genRand.Next(40, Main.maxTilesX / 2 - 40); + if (dungeonSide < 0) + X2 += Main.maxTilesX / 2; + int index173 = WorldGen.genRand.Next(Main.maxTilesY - 300); + while (!Main.tile[X2, index173].active() && index173 < Main.maxTilesY - 300) + ++index173; + if (Main.tile[X2, index173].active() && Main.tile[X2, index173].type == (ushort) 60) + { + int Y2 = index173 - 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 => + { + progress.Message = Lang.gen[43].Value; + for (int i22 = 0; i22 < Main.maxTilesX; ++i22) + { + int num194 = 0; + for (int index = 0; (double) index < Main.worldSurface; ++index) + { + if (num194 > 0 && !Main.tile[i22, index].active()) + { + Main.tile[i22, index].active(true); + Main.tile[i22, index].type = (ushort) 52; + --num194; + } + else + num194 = 0; + if (Main.tile[i22, index].active() && !Main.tile[i22, index].bottomSlope() && (Main.tile[i22, index].type == (ushort) 2 || Main.tile[i22, index].type == (ushort) 192 && WorldGen.genRand.Next(4) == 0) && WorldGen.genRand.Next(5) < 3) + num194 = WorldGen.genRand.Next(1, 10); + } + int num195 = 0; + for (int j21 = 0; j21 < Main.maxTilesY; ++j21) + { + if (num195 > 0 && !Main.tile[i22, j21].active()) + { + Main.tile[i22, j21].active(true); + Main.tile[i22, j21].type = (ushort) 62; + --num195; + } + else + num195 = 0; + if (Main.tile[i22, j21].active() && Main.tile[i22, j21].type == (ushort) 60 && !Main.tile[i22, j21].bottomSlope()) + { + if (i22 < Main.maxTilesX - 1 && j21 < Main.maxTilesY - 2 && Main.tile[i22 + 1, j21].active() && Main.tile[i22 + 1, j21].type == (ushort) 60 && !Main.tile[i22 + 1, j21].bottomSlope() && WorldGen.genRand.Next(40) == 0) + { + bool flag = true; + for (int index174 = i22; index174 < i22 + 2; ++index174) + { + for (int index175 = j21 + 1; index175 < j21 + 3; ++index175) + { + if (Main.tile[index174, index175].active() && (!Main.tileCut[(int) Main.tile[index174, index175].type] || Main.tile[index174, index175].type == (ushort) 444)) + { + flag = false; + break; + } + if (Main.tile[index174, index175].liquid > (byte) 0 || Main.wallHouse[(int) Main.tile[index174, index175].wall]) + { + flag = false; + break; + } + } + if (!flag) + break; + } + if (flag) + { + if (WorldGen.CountNearBlocksTypes(i22, j21, 20, 1, 444) > 0) + flag = false; + } + if (flag) + { + for (int i23 = i22; i23 < i22 + 2; ++i23) + { + for (int j22 = j21 + 1; j22 < j21 + 3; ++j22) + WorldGen.KillTile(i23, j22); + } + for (int index176 = i22; index176 < i22 + 2; ++index176) + { + for (int index177 = j21 + 1; index177 < j21 + 3; ++index177) + { + Main.tile[index176, index177].active(true); + Main.tile[index176, index177].type = (ushort) 444; + Main.tile[index176, index177].frameX = (short) ((index176 - i22) * 18); + Main.tile[index176, index177].frameY = (short) ((index177 - j21 - 1) * 18); + } + } + continue; + } + } + if (WorldGen.genRand.Next(5) < 3) + num195 = WorldGen.genRand.Next(1, 10); + } + } + int num196 = 0; + for (int index = 0; index < Main.maxTilesY; ++index) + { + if (num196 > 0 && !Main.tile[i22, index].active()) + { + Main.tile[i22, index].active(true); + Main.tile[i22, index].type = (ushort) 205; + --num196; + } + else + num196 = 0; + if (Main.tile[i22, index].active() && Main.tile[i22, index].type == (ushort) 199 && WorldGen.genRand.Next(5) < 3) + num196 = WorldGen.genRand.Next(1, 10); + } + } + })); + WorldGen.AddGenerationPass("Flowers", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[44].Value; + for (int index178 = 0; (double) index178 < (double) Main.maxTilesX * 0.005; ++index178) + { + int index179 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int num197 = WorldGen.genRand.Next(5, 15); + int num198 = WorldGen.genRand.Next(15, 30); + for (int index180 = 1; (double) index180 < Main.worldSurface - 1.0; ++index180) + { + if (Main.tile[index179, index180].active()) + { + for (int index181 = index179 - num197; index181 < index179 + num197; ++index181) + { + for (int index182 = index180 - num198; index182 < index180 + num198; ++index182) + { + if (Main.tile[index181, index182].type == (ushort) 3 || Main.tile[index181, index182].type == (ushort) 24) + { + Main.tile[index181, index182].frameX = (short) (WorldGen.genRand.Next(6, 8) * 18); + if (Main.tile[index181, index182].type == (ushort) 3 && WorldGen.genRand.Next(2) == 0) + Main.tile[index181, index182].frameX = (short) (WorldGen.genRand.Next(9, 11) * 18); + } + } + } + break; + } + } + } + })); + WorldGen.AddGenerationPass("Mushrooms", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[45].Value; + for (int index183 = 0; (double) index183 < (double) Main.maxTilesX * 0.002; ++index183) + { + int index184 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int num199 = WorldGen.genRand.Next(4, 10); + int num200 = WorldGen.genRand.Next(15, 30); + for (int index185 = 1; (double) index185 < Main.worldSurface - 1.0; ++index185) + { + if (Main.tile[index184, index185].active()) + { + for (int index186 = index184 - num199; index186 < index184 + num199; ++index186) + { + for (int index187 = index185 - num200; index187 < index185 + num200; ++index187) + { + if (Main.tile[index186, index187].type == (ushort) 3 || Main.tile[index186, index187].type == (ushort) 24) + Main.tile[index186, index187].frameX = (short) 144; + else if (Main.tile[index186, index187].type == (ushort) 201) + Main.tile[index186, index187].frameX = (short) 270; + } + } + break; + } + } + } + })); + WorldGen.AddGenerationPass("Stalac", (WorldGenLegacyMethod) (progress => + { + for (int x = 20; x < Main.maxTilesX - 20; ++x) + { + for (int worldSurface4 = (int) Main.worldSurface; worldSurface4 < Main.maxTilesY - 20; ++worldSurface4) + { + if (!Main.tile[x, worldSurface4].active() && WorldGen.genRand.Next(5) == 0) + { + if ((Main.tile[x, worldSurface4 - 1].type == (ushort) 1 || Main.tile[x, worldSurface4 - 1].type == (ushort) 147 || Main.tile[x, worldSurface4 - 1].type == (ushort) 161 || Main.tile[x, worldSurface4 - 1].type == (ushort) 25 || Main.tile[x, worldSurface4 - 1].type == (ushort) 203 || Main.tileStone[(int) Main.tile[x, worldSurface4 - 1].type] || Main.tileMoss[(int) Main.tile[x, worldSurface4 - 1].type]) && !Main.tile[x, worldSurface4].active() && !Main.tile[x, worldSurface4 + 1].active()) + Main.tile[x, worldSurface4 - 1].slope((byte) 0); + if ((Main.tile[x, worldSurface4 + 1].type == (ushort) 1 || Main.tile[x, worldSurface4 + 1].type == (ushort) 147 || Main.tile[x, worldSurface4 + 1].type == (ushort) 161 || Main.tile[x, worldSurface4 + 1].type == (ushort) 25 || Main.tile[x, worldSurface4 + 1].type == (ushort) 203 || Main.tileStone[(int) Main.tile[x, worldSurface4 + 1].type] || Main.tileMoss[(int) Main.tile[x, worldSurface4 + 1].type]) && !Main.tile[x, worldSurface4].active() && !Main.tile[x, worldSurface4 - 1].active()) + Main.tile[x, worldSurface4 + 1].slope((byte) 0); + WorldGen.PlaceTight(x, worldSurface4); + } + } + for (int y = 5; y < (int) Main.worldSurface; ++y) + { + if ((Main.tile[x, y - 1].type == (ushort) 147 || Main.tile[x, y - 1].type == (ushort) 161) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[x, y].active() && !Main.tile[x, y + 1].active()) + Main.tile[x, y - 1].slope((byte) 0); + WorldGen.PlaceTight(x, y); + } + if ((Main.tile[x, y - 1].type == (ushort) 25 || Main.tile[x, y - 1].type == (ushort) 203) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[x, y].active() && !Main.tile[x, y + 1].active()) + Main.tile[x, y - 1].slope((byte) 0); + WorldGen.PlaceTight(x, y); + } + if ((Main.tile[x, y + 1].type == (ushort) 25 || Main.tile[x, y + 1].type == (ushort) 203) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[x, y].active() && !Main.tile[x, y - 1].active()) + Main.tile[x, y + 1].slope((byte) 0); + WorldGen.PlaceTight(x, y); + } + } + } + })); + WorldGen.AddGenerationPass("Gems In Ice Biome", (WorldGenLegacyMethod) (progress => + { + for (int index188 = 0; (double) index188 < (double) Main.maxTilesX * 0.25; ++index188) + { + int index189 = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, WorldGen.lavaLine); + int index190 = WorldGen.genRand.Next(snowMinX[index189], snowMaxX[index189]); + if (Main.tile[index190, index189].active() && (Main.tile[index190, index189].type == (ushort) 147 || Main.tile[index190, index189].type == (ushort) 161 || Main.tile[index190, index189].type == (ushort) 162 || Main.tile[index190, index189].type == (ushort) 224)) + { + int num201 = WorldGen.genRand.Next(1, 4); + int num202 = WorldGen.genRand.Next(1, 4); + int num203 = WorldGen.genRand.Next(1, 4); + int num204 = WorldGen.genRand.Next(1, 4); + int num205 = WorldGen.genRand.Next(12); + int style = num205 >= 3 ? (num205 >= 6 ? (num205 >= 8 ? (num205 >= 10 ? (num205 >= 11 ? 5 : 4) : 3) : 2) : 1) : 0; + for (int i = index190 - num201; i < index190 + num202; ++i) + { + for (int j = index189 - num203; j < index189 + num204; ++j) + { + if (!Main.tile[i, j].active()) + WorldGen.PlaceTile(i, j, 178, true, style: style); + } + } + } + } + })); + WorldGen.AddGenerationPass("Random Gems", (WorldGenLegacyMethod) (progress => + { + 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 != (byte) 27) + { + int num = WorldGen.genRand.Next(12); + int style = num >= 3 ? (num >= 6 ? (num >= 8 ? (num >= 10 ? (num >= 11 ? 5 : 4) : 3) : 2) : 1) : 0; + WorldGen.PlaceTile(i, j, 178, true, style: style); + } + } + })); + WorldGen.AddGenerationPass("Moss Grass", (WorldGenLegacyMethod) (progress => + { + for (int index191 = 5; index191 < Main.maxTilesX - 5; ++index191) + { + for (int index192 = 5; index192 < Main.maxTilesY - 5; ++index192) + { + if (Main.tile[index191, index192].active() && Main.tileMoss[(int) Main.tile[index191, index192].type]) + { + for (int index193 = 0; index193 < 4; ++index193) + { + int i = index191; + int j = index192; + if (index193 == 0) + --i; + if (index193 == 1) + ++i; + if (index193 == 2) + --j; + if (index193 == 3) + ++j; + if (!Main.tile[i, j].active()) + WorldGen.PlaceTile(i, j, 184, true); + } + } + } + } + })); + WorldGen.AddGenerationPass("Muds Walls In Jungle", (WorldGenLegacyMethod) (progress => + { + int num206 = 0; + int num207 = 0; + bool flag18 = false; + for (int index194 = 5; index194 < Main.maxTilesX - 5; ++index194) + { + for (int index195 = 0; (double) index195 < Main.worldSurface + 20.0; ++index195) + { + if (Main.tile[index194, index195].active() && Main.tile[index194, index195].type == (ushort) 60) + { + num206 = index194; + flag18 = true; + break; + } + } + if (flag18) + break; + } + bool flag19 = false; + for (int index196 = Main.maxTilesX - 5; index196 > 5; --index196) + { + for (int index197 = 0; (double) index197 < Main.worldSurface + 20.0; ++index197) + { + if (Main.tile[index196, index197].active() && Main.tile[index196, index197].type == (ushort) 60) + { + num207 = index196; + flag19 = true; + break; + } + } + if (flag19) + break; + } + for (int index198 = num206; index198 <= num207; ++index198) + { + for (int index199 = 0; (double) index199 < Main.worldSurface + 20.0; ++index199) + { + if ((index198 >= num206 + 2 && index198 <= num207 - 2 || WorldGen.genRand.Next(2) != 0) && (index198 >= num206 + 3 && index198 <= num207 - 3 || WorldGen.genRand.Next(3) != 0) && (Main.tile[index198, index199].wall == (byte) 2 || Main.tile[index198, index199].wall == (byte) 59)) + Main.tile[index198, index199].wall = (byte) 15; + } + } + })); + WorldGen.AddGenerationPass("Larva", (WorldGenLegacyMethod) (progress => + { + for (int index200 = 0; index200 < WorldGen.numLarva; ++index200) + { + int i = WorldGen.larvaX[index200]; + int j = WorldGen.larvaY[index200]; + for (int index201 = i - 1; index201 <= i + 1; ++index201) + { + for (int index202 = j - 2; index202 <= j + 1; ++index202) + { + if (index202 != j + 1) + { + Main.tile[index201, index202].active(false); + } + else + { + Main.tile[index201, index202].active(true); + Main.tile[index201, index202].type = (ushort) 225; + Main.tile[index201, index202].slope((byte) 0); + Main.tile[index201, index202].halfBrick(false); + } + } + } + WorldGen.PlaceTile(i, j, 231, true); + } + Main.tileSolid[232] = true; + Main.tileSolid[162] = true; + })); + WorldGen.AddGenerationPass("Settle Liquids Again", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[27].Value; + Liquid.QuickWater(3); + WorldGen.WaterCheck(); + int num208 = 0; + Liquid.quickSettle = true; + while (num208 < 10) + { + int num209 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + ++num208; + float num210 = 0.0f; + while (Liquid.numLiquid > 0) + { + float num211 = (float) (num209 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (float) num209; + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > num209) + num209 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + if ((double) num211 > (double) num210) + num210 = num211; + else + num211 = num210; + if (num208 == 1) + progress.Set((float) ((double) num211 / 3.0 + 0.330000013113022)); + int num212 = 10; + if (num208 > num212) + ; + Liquid.UpdateLiquid(); + } + WorldGen.WaterCheck(); + progress.Set((float) ((double) num208 * 0.100000001490116 / 3.0 + 0.660000026226044)); + } + Liquid.quickSettle = false; + })); + WorldGen.AddGenerationPass("Tile Cleanup", (WorldGenLegacyMethod) (progress => + { + for (int i = 40; i < Main.maxTilesX - 40; ++i) + { + for (int index203 = 40; index203 < Main.maxTilesY - 40; ++index203) + { + if (!Main.tile[i, index203].active() && Main.tile[i, index203].liquid == (byte) 0 && WorldGen.genRand.Next(3) != 0 && WorldGen.SolidTile(i, index203 - 1)) + { + int num213 = WorldGen.genRand.Next(15, 21); + for (int index204 = index203 - 2; index204 >= index203 - num213; --index204) + { + if (Main.tile[i, index204].liquid >= (byte) 128) + { + int num214 = 373; + if (Main.tile[i, index204].lava()) + num214 = 374; + else if (Main.tile[i, index204].honey()) + num214 = 375; + if (WorldGen.genRand.Next(index203 - index204) <= 1) + { + Main.tile[i, index203].type = (ushort) num214; + Main.tile[i, index203].frameX = (short) 0; + Main.tile[i, index203].frameY = (short) 0; + Main.tile[i, index203].active(true); + break; + } + } + } + if (!Main.tile[i, index203].active()) + { + int num215 = WorldGen.genRand.Next(3, 11); + for (int index205 = index203 + 1; index205 <= index203 + num215; ++index205) + { + if (Main.tile[i, index205].liquid >= (byte) 200) + { + int num216 = 373; + if (Main.tile[i, index205].lava()) + num216 = 374; + else if (Main.tile[i, index205].honey()) + num216 = 375; + if (WorldGen.genRand.Next((index205 - index203) * 3) <= 1) + { + Main.tile[i, index203].type = (ushort) num216; + Main.tile[i, index203].frameX = (short) 0; + Main.tile[i, index203].frameY = (short) 0; + Main.tile[i, index203].active(true); + break; + } + } + } + } + if (!Main.tile[i, index203].active() && WorldGen.genRand.Next(3) != 0) + { + Tile tile = Main.tile[i, index203 - 1]; + if (TileID.Sets.Conversion.Sandstone[(int) tile.type] || TileID.Sets.Conversion.HardenedSand[(int) tile.type]) + { + Main.tile[i, index203].type = (ushort) 461; + Main.tile[i, index203].frameX = (short) 0; + Main.tile[i, index203].frameY = (short) 0; + Main.tile[i, index203].active(true); + } + } + } + if (Main.tile[i, index203].type == (ushort) 137) + { + if (Main.tile[i, index203].frameY <= (short) 52) + { + int num = -1; + if (Main.tile[i, index203].frameX >= (short) 18) + num = 1; + if (Main.tile[i + num, index203].halfBrick() || Main.tile[i + num, index203].slope() != (byte) 0) + Main.tile[i + num, index203].active(false); + } + } + else if (Main.tile[i, index203].type == (ushort) 162 && Main.tile[i, index203 + 1].liquid == (byte) 0) + Main.tile[i, index203].active(false); + if (Main.tile[i, index203].wall == (byte) 13 || Main.tile[i, index203].wall == (byte) 14) + Main.tile[i, index203].liquid = (byte) 0; + if (Main.tile[i, index203].type == (ushort) 31) + { + int num217 = (int) Main.tile[i, index203].frameX / 18; + int num218 = 0; + int num219 = i; + int num220 = num218 + num217 / 2; + int num221 = WorldGen.crimson ? 1 : 0; + int num222 = num217 % 2; + int num223 = num219 - num222; + int num224 = (int) Main.tile[i, index203].frameY / 18; + int num225 = 0; + int num226 = index203; + int num227 = num225 + num224 / 2; + int num228 = num224 % 2; + int num229 = num226 - num228; + for (int index206 = 0; index206 < 2; ++index206) + { + for (int index207 = 0; index207 < 2; ++index207) + { + int index208 = num223 + index206; + int index209 = num229 + index207; + Main.tile[index208, index209].active(true); + Main.tile[index208, index209].slope((byte) 0); + Main.tile[index208, index209].halfBrick(false); + Main.tile[index208, index209].type = (ushort) 31; + Main.tile[index208, index209].frameX = (short) (index206 * 18 + 36 * num221); + Main.tile[index208, index209].frameY = (short) (index207 * 18 + 36 * num227); + } + } + } + if (Main.tile[i, index203].type == (ushort) 12) + { + int num230 = (int) Main.tile[i, index203].frameX / 18; + int num231 = 0; + int num232 = i; + int num233 = num231 + num230 / 2; + int num234 = num230 % 2; + int num235 = num232 - num234; + int num236 = (int) Main.tile[i, index203].frameY / 18; + int num237 = 0; + int num238 = index203; + int num239 = num237 + num236 / 2; + int num240 = num236 % 2; + int num241 = num238 - num240; + for (int index210 = 0; index210 < 2; ++index210) + { + for (int index211 = 0; index211 < 2; ++index211) + { + int index212 = num235 + index210; + int index213 = num241 + index211; + Main.tile[index212, index213].active(true); + Main.tile[index212, index213].slope((byte) 0); + Main.tile[index212, index213].halfBrick(false); + Main.tile[index212, index213].type = (ushort) 12; + Main.tile[index212, index213].frameX = (short) (index210 * 18 + 36 * num233); + Main.tile[index212, index213].frameY = (short) (index211 * 18 + 36 * num239); + } + if (!Main.tile[index210, index203 + 2].active()) + { + Main.tile[index210, index203 + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index210, index203 + 2].type] || Main.tileSolidTop[(int) Main.tile[index210, index203 + 2].type]) + Main.tile[index210, index203 + 2].type = (ushort) 0; + } + Main.tile[index210, index203 + 2].slope((byte) 0); + Main.tile[index210, index203 + 2].halfBrick(false); + } + } + if (TileID.Sets.BasicChest[(int) Main.tile[i, index203].type]) + { + int num242 = (int) Main.tile[i, index203].frameX / 18; + int num243 = 0; + int num244 = i; + int Y = index203 - (int) Main.tile[i, index203].frameY / 18; + for (; num242 >= 2; num242 -= 2) + ++num243; + int X = num244 - num242; + int chest = Chest.FindChest(X, Y); + if (chest != -1) + { + switch (Main.chest[chest].item[0].type) + { + case 1156: + num243 = 23; + break; + case 1260: + num243 = 26; + break; + case 1569: + num243 = 25; + break; + case 1571: + num243 = 24; + break; + case 1572: + num243 = 27; + break; + } + } + for (int index214 = 0; index214 < 2; ++index214) + { + for (int index215 = 0; index215 < 2; ++index215) + { + int index216 = X + index214; + int index217 = Y + index215; + Main.tile[index216, index217].active(true); + Main.tile[index216, index217].slope((byte) 0); + Main.tile[index216, index217].halfBrick(false); + Main.tile[index216, index217].type = (ushort) 21; + Main.tile[index216, index217].frameX = (short) (index214 * 18 + 36 * num243); + Main.tile[index216, index217].frameY = (short) (index215 * 18); + } + if (!Main.tile[index214, index203 + 2].active()) + { + Main.tile[index214, index203 + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index214, index203 + 2].type] || Main.tileSolidTop[(int) Main.tile[index214, index203 + 2].type]) + Main.tile[index214, index203 + 2].type = (ushort) 0; + } + Main.tile[index214, index203 + 2].slope((byte) 0); + Main.tile[index214, index203 + 2].halfBrick(false); + } + } + if (Main.tile[i, index203].type == (ushort) 28) + { + int num245 = (int) Main.tile[i, index203].frameX / 18; + int num246 = 0; + int num247 = i; + for (; num245 >= 2; num245 -= 2) + ++num246; + int num248 = num247 - num245; + int num249 = (int) Main.tile[i, index203].frameY / 18; + int num250 = 0; + int num251 = index203; + for (; num249 >= 2; num249 -= 2) + ++num250; + int num252 = num251 - num249; + for (int index218 = 0; index218 < 2; ++index218) + { + for (int index219 = 0; index219 < 2; ++index219) + { + int index220 = num248 + index218; + int index221 = num252 + index219; + Main.tile[index220, index221].active(true); + Main.tile[index220, index221].slope((byte) 0); + Main.tile[index220, index221].halfBrick(false); + Main.tile[index220, index221].type = (ushort) 28; + Main.tile[index220, index221].frameX = (short) (index218 * 18 + 36 * num246); + Main.tile[index220, index221].frameY = (short) (index219 * 18 + 36 * num250); + } + if (!Main.tile[index218, index203 + 2].active()) + { + Main.tile[index218, index203 + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index218, index203 + 2].type] || Main.tileSolidTop[(int) Main.tile[index218, index203 + 2].type]) + Main.tile[index218, index203 + 2].type = (ushort) 0; + } + Main.tile[index218, index203 + 2].slope((byte) 0); + Main.tile[index218, index203 + 2].halfBrick(false); + } + } + if (Main.tile[i, index203].type == (ushort) 26) + { + int num253 = (int) Main.tile[i, index203].frameX / 18; + int num254 = 0; + int num255 = i; + int num256 = index203 - (int) Main.tile[i, index203].frameY / 18; + for (; num253 >= 3; num253 -= 3) + ++num254; + int num257 = num255 - num253; + for (int index222 = 0; index222 < 3; ++index222) + { + for (int index223 = 0; index223 < 2; ++index223) + { + int index224 = num257 + index222; + int index225 = num256 + index223; + Main.tile[index224, index225].active(true); + Main.tile[index224, index225].slope((byte) 0); + Main.tile[index224, index225].halfBrick(false); + Main.tile[index224, index225].type = (ushort) 26; + Main.tile[index224, index225].frameX = (short) (index222 * 18 + 54 * num254); + Main.tile[index224, index225].frameY = (short) (index223 * 18); + } + if (!Main.tile[num257 + index222, num256 + 2].active() || !Main.tileSolid[(int) Main.tile[num257 + index222, num256 + 2].type] || Main.tileSolidTop[(int) Main.tile[num257 + index222, num256 + 2].type]) + { + Main.tile[num257 + index222, num256 + 2].active(true); + if (!TileID.Sets.Platforms[(int) Main.tile[num257 + index222, num256 + 2].type] && (!Main.tileSolid[(int) Main.tile[num257 + index222, num256 + 2].type] || Main.tileSolidTop[(int) Main.tile[num257 + index222, num256 + 2].type])) + Main.tile[num257 + index222, num256 + 2].type = (ushort) 0; + } + Main.tile[num257 + index222, num256 + 2].slope((byte) 0); + Main.tile[num257 + index222, num256 + 2].halfBrick(false); + if (Main.tile[num257 + index222, num256 + 3].type == (ushort) 28 && (int) Main.tile[num257 + index222, num256 + 3].frameY % 36 >= 18) + { + Main.tile[num257 + index222, num256 + 3].type = (ushort) 0; + Main.tile[num257 + index222, num256 + 3].active(false); + } + } + for (int index226 = 0; index226 < 3; ++index226) + { + if ((Main.tile[num257 - 1, num256 + index226].type == (ushort) 28 || Main.tile[num257 - 1, num256 + index226].type == (ushort) 12) && (int) Main.tile[num257 - 1, num256 + index226].frameX % 36 < 18) + { + Main.tile[num257 - 1, num256 + index226].type = (ushort) 0; + Main.tile[num257 - 1, num256 + index226].active(false); + } + if ((Main.tile[num257 + 3, num256 + index226].type == (ushort) 28 || Main.tile[num257 + 3, num256 + index226].type == (ushort) 12) && (int) Main.tile[num257 + 3, num256 + index226].frameX % 36 >= 18) + { + Main.tile[num257 + 3, num256 + index226].type = (ushort) 0; + Main.tile[num257 + 3, num256 + index226].active(false); + } + } + } + if (Main.tile[i, index203].type == (ushort) 237 && Main.tile[i, index203 + 1].type == (ushort) 232) + Main.tile[i, index203 + 1].type = (ushort) 226; + } + } + })); + WorldGen.AddGenerationPass("Lihzahrd Altars", (WorldGenLegacyMethod) (progress => + { + int lAltarX = WorldGen.lAltarX; + int lAltarY = WorldGen.lAltarY; + for (int index227 = 0; index227 <= 2; ++index227) + { + for (int index228 = 0; index228 <= 1; ++index228) + { + int index229 = lAltarX + index227; + int index230 = lAltarY + index228; + Main.tile[index229, index230].active(true); + Main.tile[index229, index230].type = (ushort) 237; + Main.tile[index229, index230].frameX = (short) (index227 * 18); + Main.tile[index229, index230].frameY = (short) (index228 * 18); + } + Main.tile[index227, lAltarY + 2].active(true); + Main.tile[index227, lAltarY + 2].slope((byte) 0); + Main.tile[index227, lAltarY + 2].halfBrick(false); + Main.tile[index227, lAltarY + 2].type = (ushort) 226; + } + })); + WorldGen.AddGenerationPass("Micro Biomes", (WorldGenLegacyMethod) (progress => + { + progress.Message = Lang.gen[76].Value; + float num258 = (float) (Main.maxTilesX * Main.maxTilesY) / 5040000f; + float num259 = (float) Main.maxTilesX / 4200f; + int num260 = (int) ((double) WorldGen.genRand.Next(3, 6) * (double) num258); + int num261 = 0; + while (num261 < num260) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface + 20, 50, 200, 50), structures)) + ++num261; + } + progress.Set(0.1f); + int num262 = (int) Math.Ceiling((double) num258); + int num263 = 0; + while (num263 < num262) + { + 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 (Terraria.World.Generation.Biomes.Place(origin, structures)) + ++num263; + } + progress.Set(0.2f); + int num264 = (int) ((double) WorldGen.genRand.Next(6, 12) * (double) num258); + int num265 = 0; + while (num265 < num264) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface, 50, 200, 50), structures)) + ++num265; + } + int num266 = (int) ((double) WorldGen.genRand.Next(14, 30) * (double) num258); + int num267 = 0; + while (num267 < num266) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomWorldPoint((int) rockLayer, 50, 200, 50), structures)) + ++num267; + } + progress.Set(0.3f); + int num268 = (int) ((double) WorldGen.genRand.Next(6, 12) * (double) num259); + int num269 = 0; + for (int index = 0; num269 < num268 && index < 20000; ++index) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface + 50, 50, 500, 50), structures)) + ++num269; + } + progress.Set(0.4f); + if (!WorldGen.crimson) + { + int num270 = (int) ((double) WorldGen.genRand.Next(1, 3) * (double) num258); + int num271 = 0; + while (num271 < num270) + { + if (Terraria.World.Generation.Biomes.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface, 50, 500, 50), structures)) + ++num271; + } + } + TrackGenerator.Run((int) (10.0 * (double) num258), (int) ((double) num258 * 25.0) + 250); + progress.Set(1f); + })); + WorldGen.AddGenerationPass("Final Cleanup", (WorldGenLegacyMethod) (progress => + { + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int index = 0; index < Main.maxTilesY; ++index) + { + if (Main.tile[i, index].active() && (!WorldGen.SolidTile(i, index + 1) || !WorldGen.SolidTile(i, index + 2))) + { + switch (Main.tile[i, index].type) + { + case 53: + Main.tile[i, index].type = (ushort) 397; + continue; + case 112: + Main.tile[i, index].type = (ushort) 398; + continue; + case 123: + Main.tile[i, index].type = (ushort) 1; + continue; + case 224: + Main.tile[i, index].type = (ushort) 147; + continue; + case 234: + Main.tile[i, index].type = (ushort) 399; + continue; + default: + continue; + } + } + } + } + WorldGen.noTileActions = false; + WorldGen.gen = false; + Main.AnglerQuestSwap(); + })); + WorldGen._generator.GenerateWorld(customProgressObject); + Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World); + } + + 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; + while (Main.tile[i, index1].type == (ushort) 20) + ++index1; + Tile tile1 = Main.tile[i, index1]; + Tile tile2 = Main.tile[i, index1 - 1]; + if (!tile1.active() || tile1.halfBrick() || tile1.slope() != (byte) 0 || tile2.wall != (byte) 0 || tile2.liquid != (byte) 0 || tile1.type != (ushort) 53 && tile1.type != (ushort) 234 && tile1.type != (ushort) 116 && tile1.type != (ushort) 112 || !WorldGen.EmptyTileCheck(i - 1, i + 1, index1 - 30, index1 - 1, 20)) + return false; + int num1 = WorldGen.genRand.Next(10, 21); + int num2 = WorldGen.genRand.Next(-8, 9) * 2; + short num3 = 0; + for (int index2 = 0; index2 < num1; ++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 == num1 - 1) + { + tile3.active(true); + tile3.type = (ushort) 323; + tile3.frameX = (short) (22 * WorldGen.genRand.Next(4, 7)); + tile3.frameY = num3; + } + else + { + if ((int) num3 != num2) + { + float num4 = (float) index2 / (float) num1; + if ((double) num4 >= 0.25 && ((double) num4 < 0.5 && WorldGen.genRand.Next(13) == 0 || (double) num4 < 0.699999988079071 && WorldGen.genRand.Next(9) == 0 || (double) num4 < 0.949999988079071 && WorldGen.genRand.Next(5) == 0 || true)) + { + short num5 = (short) Math.Sign(num2); + num3 += (short) ((int) num5 * 2); + } + } + tile3.active(true); + tile3.type = (ushort) 323; + tile3.frameX = (short) (22 * WorldGen.genRand.Next(0, 3)); + tile3.frameY = num3; + } + } + 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 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 == (byte) 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); + 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(8) != 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 = (byte) 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 = (byte) 34; + Main.tile[index6 + num6, index5].wall = (byte) 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 = (byte) 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) + { + 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()) + return false; + int num1 = i - WorldGen.genRand.Next(1, 4); + int num2 = i + WorldGen.genRand.Next(1, 4); + if (j < 150) + return false; + int num3 = i - 50; + int num4 = i + 50; + for (int index3 = num3; index3 <= num4; ++index3) + { + for (int index4 = 5; index4 < j - 5; ++index4) + { + if (Main.tile[index3, index4].active()) + return false; + } + } + int num5 = num1; + int num6 = num2; + int num7 = num1; + int num8 = num2; + int minValue = num2 - num1; + bool flag1 = true; + int num9 = WorldGen.genRand.Next(-10, -5); + int num10 = WorldGen.genRand.Next(2); + int index5 = j; + while (flag1) + { + ++num9; + if (num9 > WorldGen.genRand.Next(5, 30)) + { + num9 = 0; + numArray2[index1] = index5 + WorldGen.genRand.Next(5); + if (WorldGen.genRand.Next(5) == 0) + num10 = num10 != 0 ? 0 : 1; + if (num10 == 0) + { + numArray3[index1] = -1; + numArray1[index1] = num1; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + ++num1; + ++num5; + num10 = 1; + } + else + { + numArray3[index1] = 1; + numArray1[index1] = num2; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + --num2; + --num6; + num10 = 0; + } + if (num5 == num6) + flag1 = 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; ++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(minValue * 3, minValue * 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(minValue, minValue * 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; + ++index2; + } + } + } + } + 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 = num7; i1 <= num8; ++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; + for (int index17 = 0; index17 < 2; ++index17) + { + int index18 = num20; + int num21 = (num7 + num8) / 2; + int num22 = 1; + int num23 = i1 >= num21 ? 1 : -1; + if (i1 == num21 || minValue > 6 && (i1 == num21 - 1 || i1 == num21 + 1)) + num23 = 0; + int num24 = num23; + int index19 = i1; + int num25 = WorldGen.genRand.Next((int) ((double) minValue * 2.5), minValue * 4); + while (num25 > 0) + { + --num25; + index19 += num23; + Main.tile[index19, index18].type = (ushort) 191; + Main.tile[index19, index18].active(true); + Main.tile[index19, index18].halfBrick(false); + index18 += num22; + Main.tile[index19, index18].type = (ushort) 191; + Main.tile[index19, index18].active(true); + Main.tile[index19, index18].halfBrick(false); + if (!Main.tile[index19, index18 + 1].active()) + { + num23 = 0; + num22 = 1; + } + if (WorldGen.genRand.Next(3) == 0) + num23 = num24 >= 0 ? (num24 <= 0 ? WorldGen.genRand.Next(-1, 2) : (num23 != 0 ? 0 : 1)) : (num23 != 0 ? 0 : -1); + if (WorldGen.genRand.Next(3) == 0) + num22 = num22 != 0 ? 0 : 1; + } + } + } + for (int index20 = 0; index20 < index2; ++index20) + { + int num26 = (int) ((double) WorldGen.genRand.Next(5, 8) * (1.0 + (double) minValue * 0.0500000007450581)); + if (flagArray[index20]) + num26 = WorldGen.genRand.Next(7, 13); + int num27 = numArray5[index20] - num26; + int num28 = numArray5[index20] + num26; + int num29 = numArray6[index20] - num26; + int num30 = numArray6[index20] + num26; + float num31 = (float) (2.0 - (double) WorldGen.genRand.Next(5) * 0.100000001490116); + for (int index21 = num27; index21 <= num28; ++index21) + { + for (int index22 = num29; index22 <= num30; ++index22) + { + if (Main.tile[index21, index22].type != (ushort) 191 && (double) Math.Abs(numArray5[index20] - index21) + (double) Math.Abs(numArray6[index20] - index22) * (double) num31 < (double) num26) + { + Main.tile[index21, index22].type = (ushort) 192; + Main.tile[index21, index22].active(true); + Main.tile[index21, index22].halfBrick(false); + } + } + } + } + if (minValue >= 4 && WorldGen.genRand.Next(3) != 0) + { + bool flag2 = false; + int num32 = num7; + int num33 = num8; + int j2 = j - 5; + int num34 = 50; + int num35 = WorldGen.genRand.Next(400, 700); + int num36 = 1; + bool flag3 = true; + while (num35 > 0) + { + ++j2; + --num35; + --num34; + int num37 = (num7 + num8) / 2; + int num38 = 0; + if (j2 > j && minValue == 4) + num38 = 1; + for (int index23 = num7 - num38; index23 <= num8 + num38; ++index23) + { + if (index23 > num37 - 2 && index23 <= num37 + 1) + { + if (Main.tile[index23, j2].type != (ushort) 19) + Main.tile[index23, j2].active(false); + Main.tile[index23, j2].wall = (byte) 78; + if (Main.tile[index23 - 1, j2].wall > (byte) 0 || (double) j2 >= Main.worldSurface) + Main.tile[index23 - 1, j2].wall = (byte) 78; + if (Main.tile[index23 + 1, j2].wall > (byte) 0 || (double) j2 >= Main.worldSurface) + Main.tile[index23 + 1, j2].wall = (byte) 78; + } + else + { + Main.tile[index23, j2].type = (ushort) 191; + Main.tile[index23, j2].active(true); + Main.tile[index23, j2].halfBrick(false); + } + } + ++num36; + if (num36 >= 6) + { + num36 = 0; + int num39 = WorldGen.genRand.Next(3); + if (num39 == 0) + num39 = -1; + if (flag3) + num39 = 2; + if (num39 == 2) + { + flag3 = false; + for (int i2 = num7; i2 <= num8; ++i2) + { + if (i2 > num37 - 2 && i2 <= num37 + 1) + { + Main.tile[i2, j2 + 1].active(false); + WorldGen.PlaceTile(i2, j2 + 1, 19, true, style: 23); + } + } + } + else + { + num7 += num39; + num8 += num39; + } + if (num34 <= 0 && !flag2) + { + flag2 = true; + int num40 = WorldGen.genRand.Next(2); + if (num40 == 0) + num40 = -1; + int num41 = j2 - 2; + int num42 = j2; + int num43 = (num7 + num8) / 2; + if (num40 < 0) + --num43; + if (num40 > 0) + ++num43; + int num44 = WorldGen.genRand.Next(15, 30); + int num45 = num43 + num44; + if (num40 < 0) + { + num45 = num43; + num43 -= num44; + } + WorldGen.dMinX = num43; + WorldGen.dMaxX = num45; + if (num40 < 0) + WorldGen.dMinX -= 40; + else + WorldGen.dMaxX += 40; + bool flag4 = false; + for (int index24 = num43; index24 < num45; ++index24) + { + for (int index25 = j2 - 20; index25 < j2 + 10; ++index25) + { + if (Main.tile[index24, index25].wall == (byte) 0 && !Main.tile[index24, index25].active() && (double) index25 < Main.worldSurface) + flag4 = true; + } + } + if (!flag4) + { + for (int index26 = num43; index26 <= num45; ++index26) + { + for (int index27 = num41 - 2; index27 <= num42 + 2; ++index27) + { + if (Main.tile[index26, index27].wall != (byte) 78 && Main.tile[index26, index27].type != (ushort) 19) + { + Main.tile[index26, index27].active(true); + Main.tile[index26, index27].type = (ushort) 191; + Main.tile[index26, index27].halfBrick(false); + } + if (index27 >= num41 && index27 <= num42) + { + Main.tile[index26, index27].liquid = (byte) 0; + Main.tile[index26, index27].wall = (byte) 78; + Main.tile[index26, index27].active(false); + } + } + } + int i3 = (num7 + num8) / 2 + 3 * num40; + int j3 = j2; + WorldGen.PlaceTile(i3, j3, 10, true, style: 7); + int num46 = WorldGen.genRand.Next(5, 9); + int num47 = WorldGen.genRand.Next(4, 6); + int num48; + int num49; + if (num40 < 0) + { + num48 = num43 + num46; + num49 = num43 - num46; + } + else + { + num49 = num45 - num46; + num48 = num45 + num46; + } + int num50 = num42 - num47; + for (int index28 = num49 - 2; index28 <= num48 + 2; ++index28) + { + for (int index29 = num50 - 2; index29 <= num42 + 2; ++index29) + { + if (Main.tile[index28, index29].wall != (byte) 78 && Main.tile[index28, index29].type != (ushort) 19) + { + Main.tile[index28, index29].active(true); + Main.tile[index28, index29].type = (ushort) 191; + Main.tile[index28, index29].halfBrick(false); + } + if (index29 >= num50 && index29 <= num42 && index28 >= num49 && index28 <= num48) + { + Main.tile[index28, index29].liquid = (byte) 0; + Main.tile[index28, index29].wall = (byte) 78; + Main.tile[index28, index29].active(false); + } + } + } + int i4 = num49 - 2; + if (num40 < 0) + i4 = num48 + 2; + WorldGen.PlaceTile(i4, j3, 10, true, style: 7); + int i5 = num48; + if (num40 < 0) + i5 = num49; + WorldGen.PlaceTile(i5, j2, 15, true, style: 5); + if (num40 < 0) + { + Main.tile[i5, j2 - 1].frameX += (short) 18; + Main.tile[i5, j2].frameX += (short) 18; + } + int i6 = num48 - 2; + if (num40 < 0) + i6 = num49 + 2; + WorldGen.PlaceTile(i6, j2, 14, true, style: 6); + int i7 = num48 - 4; + if (num40 < 0) + i7 = num49 + 4; + WorldGen.PlaceTile(i7, j2, 15, true, style: 5); + if (num40 > 0) + { + Main.tile[i7, j2 - 1].frameX += (short) 18; + Main.tile[i7, j2].frameX += (short) 18; + } + int i8 = num48 - 7; + if (num40 < 0) + i8 = num49 + 8; + WorldGen.genRand.Next(2); + int contain = 832; + WorldGen.AddBuriedChest(i8, j2, contain, Style: 12); + } + } + } + if (num34 <= 0) + { + bool flag5 = true; + for (int i9 = num7; i9 <= num8; ++i9) + { + for (int j4 = j2 + 1; j4 <= j2 + 4; ++j4) + { + if (WorldGen.SolidTile(i9, j4)) + flag5 = false; + } + } + if (flag5) + num35 = 0; + } + } + int num51 = num32; + int num52 = num33; + int num53 = (num51 + num52) / 2; + if (WorldGen.genRand.Next(2) == 0) + num52 = num53; + else + num51 = num53; + for (int index30 = num51; index30 <= num52; ++index30) + { + for (int index31 = j - 3; index31 <= j; ++index31) + { + Main.tile[index30, index31].active(false); + bool flag6 = true; + for (int index32 = index30 - 1; index32 <= index30 + 1; ++index32) + { + for (int index33 = index31 - 1; index33 <= index31 + 1; ++index33) + { + if (!Main.tile[index32, index33].active() && Main.tile[index32, index33].wall == (byte) 0) + flag6 = false; + } + } + if (flag6) + Main.tile[index30, index31].wall = (byte) 78; + } + } + } + return true; + } + + public static void TreeGrowFXCheck(int x, int y) + { + int height = 1; + int num1 = -1; + Tile tile1 = (Tile) null; + for (int index = -1; index > -100; --index) + { + Tile tile2 = Main.tile[x, y + index]; + if (tile2.active() && (tile2.type == (ushort) 5 || tile2.type == (ushort) 323 || tile2.type == (ushort) 72)) + { + tile1 = tile2; + ++height; + } + else + break; + } + for (int index = 1; index < 5; ++index) + { + Tile tile3 = Main.tile[x, y + index]; + if (tile3.active() && (tile3.type == (ushort) 5 || tile3.type == (ushort) 323 || tile3.type == (ushort) 72)) + { + ++height; + } + else + { + int num2 = 0; + if (tile1.frameX == (short) 22) + { + if (tile1.frameY == (short) 220) + num2 = 1; + else if (tile1.frameY == (short) 242) + num2 = 2; + } + switch (tile3.type) + { + case 2: + num1 = 910; + goto label_39; + case 23: + case 400: + num1 = 915; + goto label_39; + case 53: + num1 = 911; + goto label_39; + case 60: + num1 = 914; + goto label_39; + case 70: + num1 = 912; + goto label_39; + case 109: + if (x % 3 == 1) + num2 += 3; + if (x % 3 == 2) + num2 += 6; + int num3 = 917; + switch (num2) + { + case 0: + num1 = 2; + break; + case 1: + num1 = 1; + break; + case 2: + num1 = 7; + break; + case 3: + num1 = 4; + break; + case 4: + num1 = 5; + break; + case 5: + num1 = 6; + break; + case 6: + num1 = 3; + break; + case 7: + num1 = 8; + break; + case 8: + num1 = 0; + break; + } + num1 += num3; + height += 5; + goto label_39; + case 116: + num1 = 919; + goto label_39; + case 147: + num1 = 913; + goto label_39; + case 199: + case 234: + num1 = 916; + goto label_39; + default: + goto label_39; + } + } + } +label_39: + if (height <= 0 || num1 <= 0) + return; + if (Main.netMode == 2) + NetMessage.SendData(112, number: 1, number2: ((float) x), number3: ((float) y), number4: ((float) height), number5: num1); + if (Main.netMode != 0) + return; + WorldGen.TreeGrowFX(x, y, height, num1); + } + + public static void TreeGrowFX(int x, int y, int height, int treeGore) + { + Vector2 vector2 = new Vector2((float) x, (float) y) * 16f + new Vector2(8f, 8f); + int Type = treeGore; + int num = 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 + new Vector2(-16f, (float) (index1 * 16)) + Utils.RandomVector2(Main.rand, -20f, 20f), 4, 4, num + Main.rand.Next(maxValue), SpeedY: -4f, Alpha: 100); + } + else + { + float max = 10f; + Gore.NewGore(vector2 + new Vector2(-16f, (float) (index1 * 16)), Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + Gore.NewGore(vector2 + new Vector2(0.0f, (float) (index1 * 16)), Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + Gore.NewGore(vector2 + new Vector2(16f, (float) (index1 * 16)), Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + if (index1 == -height + 1) + { + for (int index3 = 0; index3 < 20; ++index3) + Gore.NewGore(vector2 + new Vector2(0.0f, (float) (index1 * 16 - 40)) + Utils.RandomVector2(Main.rand, -40f, 40f), Utils.RandomVector2(Main.rand, -10f, 10f), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + } + } + } + } + + 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) && 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) 2 && Main.tile[i, index1].type != (ushort) 23 && Main.tile[i, index1].type != (ushort) 60 && Main.tile[i, index1].type != (ushort) 109 && Main.tile[i, index1].type != (ushort) 147 && Main.tile[i, index1].type != (ushort) 199 && Main.tile[i, index1].type != (ushort) 70 || Main.tile[i, index1 - 1].wall != (byte) 0 && Main.tile[i, index1 - 1].wall != (byte) 106 && Main.tile[i, index1 - 1].wall != (byte) 107 && (Main.tile[i, index1 - 1].wall < (byte) 138 || Main.tile[i, index1 - 1].wall > (byte) 141) && Main.tile[i, index1 - 1].wall != (byte) 145 && Main.tile[i, index1 - 1].wall != (byte) 150 && Main.tile[i, index1 - 1].wall != (byte) 152 || (!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].type != (ushort) 147 && Main.tile[i - 1, index1].type != (ushort) 199 && Main.tile[i - 1, index1].type != (ushort) 70) && (!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].type != (ushort) 147 && Main.tile[i + 1, index1].type != (ushort) 199 && Main.tile[i + 1, index1].type != (ushort) 70)) + return false; + int num1 = 2; + int num2 = 16; + if (Main.tile[i, index1].type == (ushort) 60) + num2 += 5; + if (!WorldGen.EmptyTileCheck(i - num1, i + num1, index1 - num2, index1 - 1, 20)) + return false; + bool flag1 = false; + bool flag2 = false; + int num3 = WorldGen.genRand.Next(5, num2 + 1); + for (int index2 = index1 - num3; 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 - num3) + 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 || Main.tile[i - 1, index1].type == (ushort) 199)) + 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 || Main.tile[i + 1, index1].type == (ushort) 199)) + 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 - num3].frameX = (short) 22; + Main.tile[i, index1 - num3].frameY = (short) 198; + } + if (num12 == 1) + { + Main.tile[i, index1 - num3].frameX = (short) 22; + Main.tile[i, index1 - num3].frameY = (short) 220; + } + if (num12 == 2) + { + Main.tile[i, index1 - num3].frameX = (short) 22; + Main.tile[i, index1 - num3].frameY = (short) 242; + } + } + else + { + int num13 = WorldGen.genRand.Next(3); + if (num13 == 0) + { + Main.tile[i, index1 - num3].frameX = (short) 0; + Main.tile[i, index1 - num3].frameY = (short) 198; + } + if (num13 == 1) + { + Main.tile[i, index1 - num3].frameX = (short) 0; + Main.tile[i, index1 - num3].frameY = (short) 220; + } + if (num13 == 2) + { + Main.tile[i, index1 - num3].frameX = (short) 0; + Main.tile[i, index1 - num3].frameY = (short) 242; + } + } + WorldGen.RangeFrame(i - 2, index1 - num3 - 1, i + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num3 * 0.5), num3 + 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) + 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].halfBrick() || Main.tile[i, index1].slope() != (byte) 0 || Main.tile[i, index1].type != (ushort) 70 || Main.tile[i, index1 - 1].wall != (byte) 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 - 1, 71)) + 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() + { + for (int i = 1; i < Main.maxTilesX - 1; ++i) + { + for (int y = 20; (double) y < Main.worldSurface; ++y) + { + WorldGen.GrowTree(i, y); + if ((i < 380 || i > Main.maxTilesX - 380) && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowPalmTree(i, y); + } + if (WorldGen.genRand.Next(3) == 0) + ++i; + if (WorldGen.genRand.Next(4) == 0) + ++i; + } + } + + 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; + 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 20: + switch (Main.tile[index1, index2].type) + { + case 3: + case 20: + 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: + continue; + default: + return false; + } + case 71: + if (Main.tile[index1, index2].type != (ushort) 71) + return false; + continue; + default: + continue; + } + } + } + } + return true; + } + + public static void StartHardmode() + { + if (Main.netMode == 1 || Main.hardMode) + return; + Main.hardMode = true; + Main.InitLifeBytes(); + 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]; + byte type = 0; + if (TileID.Sets.Crimson[(int) tile1.type]) + type = (byte) (192 + WorldGen.genRand.Next(4)); + else if (TileID.Sets.Corrupt[(int) tile1.type]) + type = (byte) (188 + WorldGen.genRand.Next(4)); + else if (TileID.Sets.Hallow[(int) tile1.type]) + type = (byte) (200 + WorldGen.genRand.Next(4)); + if (tile1.active() && type != (byte) 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 byte[30] + { + (byte) 0, + (byte) 54, + (byte) 55, + (byte) 56, + (byte) 57, + (byte) 58, + (byte) 59, + (byte) 61, + (byte) 185, + (byte) 212, + (byte) 213, + (byte) 214, + (byte) 215, + (byte) 196, + (byte) 197, + (byte) 198, + (byte) 199, + (byte) 15, + (byte) 40, + (byte) 71, + (byte) 64, + (byte) 204, + (byte) 205, + (byte) 206, + (byte) 207, + (byte) 208, + (byte) 209, + (byte) 210, + (byte) 211, + (byte) 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: + NetMessage.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 num = 54 * style; + 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) num; + Main.tile[i, j - 1].frameX = (short) (WorldGen.genRand.Next(3) * 18); + Main.tile[i, j].active(true); + Main.tile[i, j].type = (ushort) 10; + Main.tile[i, j].frameY = (short) (num + 18); + Main.tile[i, j].frameX = (short) (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) (num + 36); + Main.tile[i, j + 1].frameX = (short) (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); + } + Main.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 minValue = (int) ((double) Main.maxTilesX * 0.25); + for (int i = minValue; i < Main.maxTilesX - minValue; ++i) + { + 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; + 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 num1 = (float) (Main.maxTilesX / 4200); + for (int index1 = 0; (double) index1 < 200.0 * (double) num1; ++index1) + { + int num2 = 0; + bool flag1 = false; + while (!flag1) + { + ++num2; + 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 num3 = 0; + if (Main.tile[index2 - 1, j].wall > (byte) 0) + num3 = -1; + else if (Main.tile[index2 + 1, j].wall > (byte) 0) + num3 = 1; + if (!Main.tile[index2 + num3, j].active() && !Main.tile[index2 + num3, 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 + num3, j, 4, true, true, style: 7); + flag1 = true; + } + } + } + if (num2 > 1000) + flag1 = true; + } + } + float num4 = 4200000f / (float) Main.maxTilesX; + for (int index5 = 0; (double) index5 < (double) num4; ++index5) + { + int i1 = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + int j; + for (j = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); Main.tile[i1, j].wall != (byte) 13 && Main.tile[i1, j].wall != (byte) 14 || Main.tile[i1, j].active(); j = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20)) + i1 = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + if ((Main.tile[i1, j].wall == (byte) 13 || Main.tile[i1, j].wall == (byte) 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 num5 = i2 + 1; + while (!Main.tile[i3, index6].active() && WorldGen.SolidTile(i3, index6 + 1)) + ++i3; + int num6 = i3 - 1; + int num7 = num6 - num5; + int index7 = (num6 + num5) / 2; + if (!Main.tile[index7, index6].active() && (Main.tile[index7, index6].wall == (byte) 13 || Main.tile[index7, index6].wall == (byte) 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 num8 = WorldGen.genRand.Next(13); + int num9 = 0; + int num10 = 0; + if (num8 == 0) + { + num9 = 5; + num10 = 4; + } + if (num8 == 1) + { + num9 = 4; + num10 = 3; + } + if (num8 == 2) + { + num9 = 3; + num10 = 5; + } + if (num8 == 3) + { + num9 = 4; + num10 = 6; + } + if (num8 == 4) + { + num9 = 3; + num10 = 3; + } + if (num8 == 5) + { + num9 = 5; + num10 = 3; + } + if (num8 == 6) + { + num9 = 5; + num10 = 4; + } + if (num8 == 7) + { + num9 = 5; + num10 = 4; + } + if (num8 == 8) + { + num9 = 5; + num10 = 4; + } + if (num8 == 9) + { + num9 = 3; + num10 = 5; + } + if (num8 == 10) + { + num9 = 5; + num10 = 3; + } + if (num8 == 11) + { + num9 = 2; + num10 = 4; + } + if (num8 == 12) + { + num9 = 3; + num10 = 3; + } + for (int index8 = index7 - num9; index8 <= index7 + num9; ++index8) + { + for (int index9 = index6 - num10; index9 <= index6; ++index9) + { + if (Main.tile[index8, index9].active()) + { + num8 = -1; + break; + } + } + } + if ((double) num7 < (double) num9 * 1.75) + num8 = -1; + switch (num8) + { + case 0: + WorldGen.PlaceTile(index7, index6, 14, true, style: style2); + int num11 = WorldGen.genRand.Next(6); + if (num11 < 3) + WorldGen.PlaceTile(index7 + num11, 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 num12 = WorldGen.genRand.Next(4); + if (num12 < 2) + WorldGen.PlaceTile(index7 + num12, 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 num13 = 420000f / (float) Main.maxTilesX; + for (int index10 = 0; (double) index10 < (double) num13; ++index10) + { + int index11 = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + int index12; + for (index12 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); Main.tile[index11, index12].wall != (byte) 13 && Main.tile[index11, index12].wall != (byte) 14 || Main.tile[index11, index12].active(); index12 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20)) + index11 = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + for (int index13 = 0; index13 < 2; ++index13) + { + int index14 = index11; + int index15 = index11; + while (!Main.tile[index14, index12].active() && (Main.tile[index14, index12].wall == (byte) 13 || Main.tile[index14, index12].wall == (byte) 14)) + --index14; + int num14 = index14 + 1; + while (!Main.tile[index15, index12].active() && (Main.tile[index15, index12].wall == (byte) 13 || Main.tile[index15, index12].wall == (byte) 14)) + ++index15; + int num15 = index15 - 1; + index11 = (num14 + num15) / 2; + int index16 = index12; + int index17 = index12; + while (!Main.tile[index11, index16].active() && (Main.tile[index11, index16].wall == (byte) 13 || Main.tile[index11, index16].wall == (byte) 14)) + --index16; + int num16 = index16 + 1; + while (!Main.tile[index11, index17].active() && (Main.tile[index11, index17].wall == (byte) 13 || Main.tile[index11, index17].wall == (byte) 14)) + ++index17; + int num17 = index17 - 1; + index12 = (num16 + num17) / 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 num18 = index18 + 1; + while (!Main.tile[index19, index12].active() && !Main.tile[index19, index12 - 1].active() && !Main.tile[index19, index12 + 1].active()) + ++index19; + int num19 = 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 num20 = index20 + 1; + while (!Main.tile[index11, index21].active() && !Main.tile[index11 - 1, index21].active() && !Main.tile[index11 + 1, index21].active()) + ++index21; + int num21 = index21 - 1; + int num22 = (num18 + num19) / 2; + int num23 = (num20 + num21) / 2; + int num24 = num19 - num18; + int num25 = num21 - num20; + if (num24 > 7 && num25 > 5) + { + int num26 = 0; + if (WorldGen.nearPicture2(num22, num23)) + num26 = -1; + if (num26 == 0) + { + Vector2 vector2 = WorldGen.randHellPicture(); + int x = (int) vector2.X; + int y = (int) vector2.Y; + if (!WorldGen.nearPicture(num22, num23)) + WorldGen.PlaceTile(num22, num23, 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 num27 = 420000f / (float) Main.maxTilesX; + for (int index22 = 0; (double) index22 < (double) num27; ++index22) + { + int i; + int j1; + do + { + i = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + j1 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + } + while (Main.tile[i, j1].wall != (byte) 13 && Main.tile[i, j1].wall != (byte) 14 || Main.tile[i, j1].active()); + while (!WorldGen.SolidTile(i, j1) && j1 > 10) + --j1; + int j2 = j1 + 1; + if (Main.tile[i, j2].wall == (byte) 13 || Main.tile[i, j2].wall == (byte) 14) + { + int num28 = WorldGen.genRand.Next(3); + int style15 = 32; + int style16 = 32; + int num29; + int num30; + switch (num28) + { + case 1: + num29 = 3; + num30 = 3; + break; + case 2: + num29 = 1; + num30 = 2; + break; + default: + num29 = 1; + num30 = 3; + break; + } + for (int index23 = i - 1; index23 <= i + num29; ++index23) + { + for (int index24 = j2; index24 <= j2 + num30; ++index24) + { + Tile tile = Main.tile[i, j2]; + if (index23 < i || index23 == i + num29) + { + if (tile.active()) + { + switch (tile.type) + { + case 10: + case 11: + case 34: + case 42: + case 91: + num28 = -1; + continue; + default: + continue; + } + } + } + else if (tile.active()) + num28 = -1; + } + } + switch (num28) + { + 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; + 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) + { + 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) + { + 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) + { + 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) + { + 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; + for (int index10 = Main.maxTilesY - 200; index10 < Main.maxTilesY; ++index10) + { + if (Main.tile[index9, index10].wall > (byte) 0) + flag3 = true; + } + if (flag3) + { + for (int index11 = 0; index11 < 10; ++index11) + flagArray1[index8, index11] = 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 index12 = 0; index12 < 5; ++index12) + { + for (int index13 = 0; index13 < 10; ++index13) + { + if (flagArray1[index12, index13] && (numArray3[index13] < Main.maxTilesY - 200 || numArray4[index13] > Main.maxTilesY - 20)) + flagArray1[index12, index13] = false; + } + } + for (int index14 = 0; index14 < 5; ++index14) + { + for (int index15 = 0; index15 < 10; ++index15) + { + if (flagArray1[index14, index15]) + { + for (int index16 = numArray1[index14]; index16 <= numArray2[index14]; ++index16) + { + for (int index17 = numArray3[index15]; index17 <= numArray4[index15]; ++index17) + { + Main.tile[index16, index17].liquid = (byte) 0; + if (index16 == numArray1[index14] || index16 == numArray2[index14] || index17 == numArray3[index15] || index17 == numArray4[index15]) + { + Main.tile[index16, index17].active(true); + Main.tile[index16, index17].type = tileType; + Main.tile[index16, index17].halfBrick(false); + Main.tile[index16, index17].slope((byte) 0); + } + else + { + Main.tile[index16, index17].wall = wallType; + Main.tile[index16, index17].active(false); + } + } + } + } + } + } + int style1 = 19; + int style2 = 13; + for (int index18 = 0; index18 < 4; ++index18) + { + bool[] flagArray2 = new bool[10]; + bool flag4 = false; + for (int index19 = 0; index19 < 10; ++index19) + { + if (flagArray1[index18, index19] && flagArray1[index18 + 1, index19]) + { + flagArray2[index19] = true; + flag4 = true; + } + } + while (flag4) + { + int index20 = WorldGen.genRand.Next(10); + if (flagArray2[index20]) + { + flag4 = false; + Main.tile[numArray2[index18], numArray4[index20] - 1].active(false); + Main.tile[numArray2[index18], numArray4[index20] - 2].active(false); + Main.tile[numArray2[index18], numArray4[index20] - 3].active(false); + Main.tile[numArray2[index18], numArray4[index20] - 1].wall = wallType; + Main.tile[numArray2[index18], numArray4[index20] - 2].wall = wallType; + Main.tile[numArray2[index18], numArray4[index20] - 3].wall = wallType; + WorldGen.PlaceTile(numArray2[index18], numArray4[index20] - 1, 10, true, style: style1); + } + } + } + for (int index21 = 0; index21 < 5; ++index21) + { + for (int index22 = 0; index22 < 10; ++index22) + { + if (flagArray1[index21, index22]) + { + if (index22 > 0 && flagArray1[index21, index22 - 1]) + { + int num9 = WorldGen.genRand.Next(numArray1[index21] + 2, numArray2[index21] - 1); + int num10; + for (num10 = WorldGen.genRand.Next(numArray1[index21] + 2, numArray2[index21] - 1); num10 - num9 < 2 || num10 - num9 > 5; num10 = WorldGen.genRand.Next(numArray1[index21] + 2, numArray2[index21] - 1)) + num9 = WorldGen.genRand.Next(numArray1[index21] + 2, numArray2[index21] - 1); + for (int i1 = num9; i1 <= num10; ++i1) + { + Main.tile[i1, numArray3[index22]].active(false); + WorldGen.PlaceTile(i1, numArray3[index22], 19, true, true, style: style2); + Main.tile[i1, numArray3[index22]].wall = wallType; + } + } + if (index21 < 4 && flagArray1[index21 + 1, index22] && WorldGen.genRand.Next(3) == 0) + { + Main.tile[numArray2[index21], numArray4[index22] - 1].active(false); + Main.tile[numArray2[index21], numArray4[index22] - 2].active(false); + Main.tile[numArray2[index21], numArray4[index22] - 3].active(false); + Main.tile[numArray2[index21], numArray4[index22] - 1].wall = wallType; + Main.tile[numArray2[index21], numArray4[index22] - 2].wall = wallType; + Main.tile[numArray2[index21], numArray4[index22] - 3].wall = wallType; + WorldGen.PlaceTile(numArray2[index21], numArray4[index22] - 1, 10, true, style: style1); + } + } + } + } + bool flag5 = false; + for (int index23 = 0; index23 < 5; ++index23) + { + bool[] flagArray3 = new bool[10]; + for (int index24 = 0; index24 < 10; ++index24) + { + if (flagArray1[index23, index24]) + { + flag5 = true; + flagArray3[index24] = true; + } + } + if (flag5) + { + bool flag6 = false; + for (int index25 = 0; index25 < 10; ++index25) + { + if (flagArray3[index25]) + { + if (!Main.tile[numArray1[index23] - 1, numArray4[index25] - 1].active() && !Main.tile[numArray1[index23] - 1, numArray4[index25] - 2].active() && !Main.tile[numArray1[index23] - 1, numArray4[index25] - 3].active() && Main.tile[numArray1[index23] - 1, numArray4[index25] - 1].liquid == (byte) 0 && Main.tile[numArray1[index23] - 1, numArray4[index25] - 2].liquid == (byte) 0 && Main.tile[numArray1[index23] - 1, numArray4[index25] - 3].liquid == (byte) 0) + flag6 = true; + else + flagArray3[index25] = false; + } + } + while (flag6) + { + int index26 = WorldGen.genRand.Next(10); + if (flagArray3[index26]) + { + flag6 = false; + Main.tile[numArray1[index23], numArray4[index26] - 1].active(false); + Main.tile[numArray1[index23], numArray4[index26] - 2].active(false); + Main.tile[numArray1[index23], numArray4[index26] - 3].active(false); + WorldGen.PlaceTile(numArray1[index23], numArray4[index26] - 1, 10, true, style: style1); + } + } + break; + } + } + bool flag7 = false; + for (int index27 = 4; index27 >= 0; --index27) + { + bool[] flagArray4 = new bool[10]; + for (int index28 = 0; index28 < 10; ++index28) + { + if (flagArray1[index27, index28]) + { + flag7 = true; + flagArray4[index28] = true; + } + } + if (flag7) + { + bool flag8 = false; + for (int index29 = 0; index29 < 10; ++index29) + { + if (flagArray4[index29]) + { + if (!Main.tile[numArray2[index27] + 1, numArray4[index29] - 1].active() && !Main.tile[numArray2[index27] + 1, numArray4[index29] - 2].active() && !Main.tile[numArray2[index27] + 1, numArray4[index29] - 3].active() && Main.tile[numArray2[index27] + 1, numArray4[index29] - 1].liquid == (byte) 0 && Main.tile[numArray2[index27] + 1, numArray4[index29] - 2].liquid == (byte) 0 && Main.tile[numArray2[index27] + 1, numArray4[index29] - 3].liquid == (byte) 0) + flag8 = true; + else + flagArray4[index29] = false; + } + } + while (flag8) + { + int index30 = WorldGen.genRand.Next(10); + if (flagArray4[index30]) + { + flag8 = false; + Main.tile[numArray2[index27], numArray4[index30] - 1].active(false); + Main.tile[numArray2[index27], numArray4[index30] - 2].active(false); + Main.tile[numArray2[index27], numArray4[index30] - 3].active(false); + WorldGen.PlaceTile(numArray2[index27], numArray4[index30] - 1, 10, true, style: style1); + } + } + break; + } + } + bool flag9 = false; + for (int index31 = 0; index31 < 10; ++index31) + { + bool[] flagArray5 = new bool[10]; + for (int index32 = 0; index32 < 5; ++index32) + { + if (flagArray1[index32, index31]) + { + flag9 = true; + flagArray5[index32] = true; + } + } + if (flag9) + { + bool flag10 = true; + while (flag10) + { + int index33 = WorldGen.genRand.Next(5); + if (flagArray5[index33]) + { + int num11 = WorldGen.genRand.Next(numArray1[index33] + 2, numArray2[index33] - 1); + int num12; + for (num12 = WorldGen.genRand.Next(numArray1[index33] + 2, numArray2[index33] - 1); num12 - num11 < 2 || num12 - num11 > 5; num12 = WorldGen.genRand.Next(numArray1[index33] + 2, numArray2[index33] - 1)) + num11 = WorldGen.genRand.Next(numArray1[index33] + 2, numArray2[index33] - 1); + for (int index34 = num11; index34 <= num12; ++index34) + { + if (Main.tile[index34, numArray3[index31] - 1].active() || Main.tile[index34, numArray3[index31] - 1].liquid > (byte) 0) + flag10 = false; + } + if (flag10) + { + for (int i2 = num11; i2 <= num12; ++i2) + { + Main.tile[i2, numArray3[index31]].active(false); + WorldGen.PlaceTile(i2, numArray3[index31], 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 == (byte) 13 || Main.tile[i, index2].wall == (byte) 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 == (byte) 13 || Main.tile[i, index3].wall == (byte) 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 == (byte) 13 || Main.tile[i, index4].wall == (byte) 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 == (byte) 13) + Main.tile[index5, index4].wall = (byte) 13; + if (Main.tile[index5, index4 - 1].wall == (byte) 14) + Main.tile[index5, index4].wall = (byte) 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 = (byte) 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 = 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 = (byte) 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 = (byte) 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 == (byte) 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 == (byte) 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[40]; + float num1 = (float) (Main.maxTilesX / 4200); + int maxValue = WorldGen.genRand.Next((int) ((double) num1 * 10.0), (int) ((double) num1 * 16.0)); + 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 (WorldGen.genRand.Next(1) == 0) + { + 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 = (byte) 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 = (byte) 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); + 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 (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 == (byte) 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 = (byte) 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 == (byte) 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 = (byte) 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 - 1; index25 <= i1 + 1; ++index25) + { + for (int index26 = j1; index26 < j1 + 3; ++index26) + { + Main.tile[index25, index26].active(false); + Main.tile[index25, index26].wall = (byte) 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 != (byte) 87) + { + flag5 = false; + break; + } + } + } + if (flag5) + Main.tile[index27, index28].wall = (byte) 87; + } + } + int num47 = 0; + Microsoft.Xna.Framework.Rectangle rectangle1; + do + { + ++num47; + rectangle1 = rectangleArray[maxValue - 1]; + int i2 = rectangle1.X + WorldGen.genRand.Next(rectangle1.Width); + int j2 = rectangle1.Y + WorldGen.genRand.Next(rectangle1.Height); + 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_278; + } + } + while (num47 < 1000); + int num48 = rectangle1.X + rectangle1.Width / 2; + int num49 = rectangle1.Y + rectangle1.Height / 2; + int index31 = num48 + WorldGen.genRand.Next(-10, 11); + int index32 = num49 + 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 num50 = index32 - 2; + int num51 = index31 - 1; + for (int index33 = -1; index33 <= 3; ++index33) + { + for (int index34 = -1; index34 <= 1; ++index34) + { + x = num51 + index33; + y = num50 + index34; + Main.tile[x, y].active(false); + } + } + WorldGen.lAltarX = num51; + WorldGen.lAltarY = num50; + for (int index35 = 0; index35 <= 2; ++index35) + { + for (int index36 = 0; index36 <= 1; ++index36) + { + x = num51 + index35; + y = num50 + 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); + } + } +label_278: + float num52 = (float) maxValue * 1.1f * (float) (1.0 + (double) WorldGen.genRand.Next(-25, 26) * 0.00999999977648258); + int num53 = 0; + while ((double) num52 > 0.0) + { + ++num53; + int index37 = WorldGen.genRand.Next(maxValue); + int index38 = WorldGen.genRand.Next(rectangleArray[index37].X, rectangleArray[index37].X + rectangleArray[index37].Width); + int index39 = WorldGen.genRand.Next(rectangleArray[index37].Y, rectangleArray[index37].Y + rectangleArray[index37].Height); + if (Main.tile[index38, index39].wall == (byte) 87 && !Main.tile[index38, index39].active()) + { + bool flag6 = false; + if (WorldGen.genRand.Next(2) == 0) + { + int num54 = 1; + if (WorldGen.genRand.Next(2) == 0) + num54 = -1; + while (!Main.tile[index38, index39].active()) + index39 += num54; + int num55 = index39 - num54; + int num56 = WorldGen.genRand.Next(2); + int num57 = WorldGen.genRand.Next(3, 10); + bool flag7 = true; + for (int index40 = index38 - num57; index40 < index38 + num57; ++index40) + { + for (int index41 = num55 - num57; index41 < num55 + num57; ++index41) + { + if (Main.tile[index40, index41].active() && Main.tile[index40, index41].type == (ushort) 10) + { + flag7 = false; + break; + } + } + } + if (flag7) + { + for (int i3 = index38 - num57; i3 < index38 + num57; ++i3) + { + for (int j3 = num55 - num57; j3 < num55 + num57; ++j3) + { + if (WorldGen.SolidTile(i3, j3) && Main.tile[i3, j3].type != (ushort) 232 && !WorldGen.SolidTile(i3, j3 - num54)) + { + Main.tile[i3, j3].type = (ushort) 232; + flag6 = true; + if (num56 == 0) + { + Main.tile[i3, j3 - 1].type = (ushort) 232; + Main.tile[i3, j3 - 1].active(true); + } + else + { + Main.tile[i3, j3 + 1].type = (ushort) 232; + Main.tile[i3, j3 + 1].active(true); + } + ++num56; + if (num56 > 1) + num56 = 0; + } + } + } + } + if (flag6) + { + num53 = 0; + --num52; + } + } + else + { + int num58 = 1; + if (WorldGen.genRand.Next(2) == 0) + num58 = -1; + while (!Main.tile[index38, index39].active()) + index38 += num58; + int num59 = index38 - num58; + int num60 = WorldGen.genRand.Next(2); + int num61 = WorldGen.genRand.Next(3, 10); + bool flag8 = true; + for (int index42 = num59 - num61; index42 < num59 + num61; ++index42) + { + for (int index43 = index39 - num61; index43 < index39 + num61; ++index43) + { + if (Main.tile[index42, index43].active() && Main.tile[index42, index43].type == (ushort) 10) + { + flag8 = false; + break; + } + } + } + if (flag8) + { + for (int i4 = num59 - num61; i4 < num59 + num61; ++i4) + { + for (int j4 = index39 - num61; j4 < index39 + num61; ++j4) + { + if (WorldGen.SolidTile(i4, j4) && Main.tile[i4, j4].type != (ushort) 232 && !WorldGen.SolidTile(i4 - num58, j4)) + { + Main.tile[i4, j4].type = (ushort) 232; + flag6 = true; + if (num60 == 0) + { + Main.tile[i4 - 1, j4].type = (ushort) 232; + Main.tile[i4 - 1, j4].active(true); + } + else + { + Main.tile[i4 + 1, j4].type = (ushort) 232; + Main.tile[i4 + 1, j4].active(true); + } + ++num60; + if (num60 > 1) + num60 = 0; + } + } + } + } + if (flag6) + { + num53 = 0; + --num52; + } + } + } + if (num53 > 1000) + { + num53 = 0; + --num52; + } + } + 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 == (byte) 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 == (byte) 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 == (byte) 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 == (byte) 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 != (byte) 7 && Main.tile[x, y].wall != (byte) 8 && Main.tile[x, y].wall != (byte) 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) + { + int num1 = WorldGen.genRand.Next(3); + WorldGen.genRand.Next(3); + ushort tileType; + int wallType; + switch (num1) + { + case 0: + tileType = (ushort) 41; + wallType = 7; + break; + case 1: + tileType = (ushort) 43; + wallType = 8; + break; + default: + tileType = (ushort) 44; + wallType = 9; + break; + } + WorldGen.numDDoors = 0; + WorldGen.numDPlats = 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, wallType); + 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, wallType); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + WorldGen.dungeonX = dungeonX; + WorldGen.dungeonY = dungeonY; + } + else + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + } + else + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + } + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + 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; + 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, wallType, true); + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + WorldGen.dungeonX = dungeonX; + WorldGen.dungeonY = dungeonY; + } + WorldGen.DungeonStairs(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + } + WorldGen.DungeonEnt(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType); + Main.statusText = Lang.gen[58].Value + " 65%"; + 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.DPlatX[WorldGen.numDPlats] = index2; + WorldGen.DPlatY[WorldGen.numDPlats] = WorldGen.dRoomT[index1] - 1; + ++WorldGen.numDPlats; + break; + } + } + for (int index3 = WorldGen.dRoomL[index1]; index3 <= WorldGen.dRoomR[index1]; ++index3) + { + if (!Main.tile[index3, WorldGen.dRoomB[index1] + 1].active()) + { + WorldGen.DPlatX[WorldGen.numDPlats] = index3; + WorldGen.DPlatY[WorldGen.numDPlats] = WorldGen.dRoomB[index1] + 1; + ++WorldGen.numDPlats; + 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 num9 = 0; + int num10 = 1000; + int num11 = 0; + while (num11 < Main.maxTilesX / 100) + { + ++num9; + int index6 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index7 = WorldGen.genRand.Next((int) Main.worldSurface + 25, WorldGen.dMaxY); + int num12 = index6; + if ((int) Main.tile[index6, index7].wall == wallType && !Main.tile[index6, index7].active()) + { + int num13 = 1; + if (WorldGen.genRand.Next(2) == 0) + num13 = -1; + while (!Main.tile[index6, index7].active()) + index7 += num13; + if (Main.tile[index6 - 1, index7].active() && Main.tile[index6 + 1, index7].active() && !Main.tile[index6 - 1, index7 - num13].active() && !Main.tile[index6 + 1, index7 - num13].active()) + { + ++num11; + for (int index8 = WorldGen.genRand.Next(5, 13); Main.tile[index6 - 1, index7].active() && Main.tile[index6, index7 + num13].active() && Main.tile[index6, index7].active() && !Main.tile[index6, index7 - num13].active() && index8 > 0; --index8) + { + Main.tile[index6, index7].type = (ushort) 48; + if (!Main.tile[index6 - 1, index7 - num13].active() && !Main.tile[index6 + 1, index7 - num13].active()) + { + Main.tile[index6, index7 - num13].type = (ushort) 48; + Main.tile[index6, index7 - num13].active(true); + } + --index6; + } + int num14 = WorldGen.genRand.Next(5, 13); + for (int index9 = num12 + 1; Main.tile[index9 + 1, index7].active() && Main.tile[index9, index7 + num13].active() && Main.tile[index9, index7].active() && !Main.tile[index9, index7 - num13].active() && num14 > 0; --num14) + { + Main.tile[index9, index7].type = (ushort) 48; + if (!Main.tile[index9 - 1, index7 - num13].active() && !Main.tile[index9 + 1, index7 - num13].active()) + { + Main.tile[index9, index7 - num13].type = (ushort) 48; + Main.tile[index9, index7 - num13].active(true); + } + ++index9; + } + } + } + if (num9 > num10) + { + num9 = 0; + ++num11; + } + } + int num15 = 0; + int num16 = 1000; + int num17 = 0; + Main.statusText = Lang.gen[58].Value + " 75%"; + while (num17 < Main.maxTilesX / 100) + { + ++num15; + int index10 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index11 = WorldGen.genRand.Next((int) Main.worldSurface + 25, WorldGen.dMaxY); + int num18 = index11; + if ((int) Main.tile[index10, index11].wall == wallType && !Main.tile[index10, index11].active()) + { + int num19 = 1; + if (WorldGen.genRand.Next(2) == 0) + num19 = -1; + while (index10 > 5 && index10 < Main.maxTilesX - 5 && !Main.tile[index10, index11].active()) + index10 += num19; + if (Main.tile[index10, index11 - 1].active() && Main.tile[index10, index11 + 1].active() && !Main.tile[index10 - num19, index11 - 1].active() && !Main.tile[index10 - num19, index11 + 1].active()) + { + ++num17; + for (int index12 = WorldGen.genRand.Next(5, 13); Main.tile[index10, index11 - 1].active() && Main.tile[index10 + num19, index11].active() && Main.tile[index10, index11].active() && !Main.tile[index10 - num19, index11].active() && index12 > 0; --index12) + { + Main.tile[index10, index11].type = (ushort) 48; + if (!Main.tile[index10 - num19, index11 - 1].active() && !Main.tile[index10 - num19, index11 + 1].active()) + { + Main.tile[index10 - num19, index11].type = (ushort) 48; + Main.tile[index10 - num19, index11].active(true); + } + --index11; + } + int num20 = WorldGen.genRand.Next(5, 13); + for (int index13 = num18 + 1; Main.tile[index10, index13 + 1].active() && Main.tile[index10 + num19, index13].active() && Main.tile[index10, index13].active() && !Main.tile[index10 - num19, index13].active() && num20 > 0; --num20) + { + Main.tile[index10, index13].type = (ushort) 48; + if (!Main.tile[index10 - num19, index13 - 1].active() && !Main.tile[index10 - num19, index13 + 1].active()) + { + Main.tile[index10 - num19, index13].type = (ushort) 48; + Main.tile[index10 - num19, index13].active(true); + } + ++index13; + } + } + } + if (num15 > num16) + { + num15 = 0; + ++num17; + } + } + Main.statusText = Lang.gen[58].Value + " 80%"; + for (int index14 = 0; index14 < WorldGen.numDDoors; ++index14) + { + int num21 = WorldGen.DDoorX[index14] - 10; + int num22 = WorldGen.DDoorX[index14] + 10; + int num23 = 100; + int num24 = 0; + for (int index15 = num21; index15 < num22; ++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 num25 = 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 num26 = index17; + if (num26 - num25 >= 3) + { + int num27 = index15 - 20; + int num28 = index15 + 20; + int num29 = num26 - 10; + int num30 = num26 + 10; + for (int index18 = num27; index18 < num28; ++index18) + { + for (int index19 = num29; index19 < num30; ++index19) + { + if (Main.tile[index18, index19].active() && Main.tile[index18, index19].type == (ushort) 10) + { + flag1 = false; + break; + } + } + } + if (flag1) + { + for (int index20 = num26 - 3; index20 < num26; ++index20) + { + for (int index21 = index15 - 3; index21 <= index15 + 3; ++index21) + { + if (Main.tile[index21, index20].active()) + { + flag1 = false; + break; + } + } + } + } + if (flag1 && num26 - num25 < 20) + { + bool flag2 = false; + if (WorldGen.DDoorPos[index14] == 0 && num26 - num25 < num23) + flag2 = true; + if (WorldGen.DDoorPos[index14] == -1 && index15 > num24) + flag2 = true; + if (WorldGen.DDoorPos[index14] == 1 && (index15 < num24 || num24 == 0)) + flag2 = true; + if (flag2) + { + num24 = index15; + num23 = num26 - num25; + } + } + } + } + if (num23 < 20) + { + int i = num24; + int index22 = WorldGen.DDoorY[index14]; + int index23 = index22; + for (; !Main.tile[i, index22].active(); ++index22) + Main.tile[i, index22].active(false); + while (!Main.tile[i, index23].active()) + --index23; + int j = index22 - 1; + int num31 = index23 + 1; + for (int index24 = num31; index24 < j - 2; ++index24) + { + Main.tile[i, index24].active(true); + Main.tile[i, index24].type = tileType; + } + int style = 13; + if (WorldGen.genRand.Next(3) == 0) + { + switch (wallType) + { + case 7: + style = 16; + break; + case 8: + style = 17; + break; + case 9: + style = 18; + break; + } + } + WorldGen.PlaceTile(i, j, 10, true, style: style); + int index25 = i - 1; + int index26 = j - 3; + while (!Main.tile[index25, index26].active()) + --index26; + if (j - index26 < j - num31 + 5 && Main.tileDungeon[(int) Main.tile[index25, index26].type]) + { + for (int index27 = j - 4 - WorldGen.genRand.Next(3); index27 > index26; --index27) + { + Main.tile[index25, index27].active(true); + Main.tile[index25, index27].type = tileType; + } + } + int index28 = index25 + 2; + int index29 = j - 3; + while (!Main.tile[index28, index29].active()) + --index29; + if (j - index29 < j - num31 + 5 && Main.tileDungeon[(int) Main.tile[index28, index29].type]) + { + for (int index30 = j - 4 - WorldGen.genRand.Next(3); index30 > index29; --index30) + { + Main.tile[index28, index30].active(true); + Main.tile[index28, index30].type = tileType; + } + } + int index31 = j + 1; + int num32 = index28 - 1; + Main.tile[num32 - 1, index31].active(true); + Main.tile[num32 - 1, index31].type = tileType; + Main.tile[num32 + 1, index31].active(true); + Main.tile[num32 + 1, index31].type = tileType; + } + } + int[] roomWall = new int[3]; + switch (wallType) + { + 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 num33 = WorldGen.genRand.Next(40, 240); + int num34 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int num35 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + for (int x1 = num34 - num33; x1 < num34 + num33; ++x1) + { + for (int y1 = num35 - num33; y1 < num35 + num33; ++y1) + { + if ((double) y1 > Main.worldSurface) + { + double num36 = (double) Math.Abs(num34 - x1); + float num37 = (float) Math.Abs(num35 - y1); + if (Math.Sqrt(num36 * num36 + (double) num37 * (double) num37) < (double) num33 * 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.numDPlats; ++index34) + { + int index35 = WorldGen.DPlatX[index34]; + int num38 = WorldGen.DPlatY[index34]; + int num39 = Main.maxTilesX; + int num40 = 10; + if ((double) num38 < Main.worldSurface + 50.0) + num40 = 20; + for (int index36 = num38 - 5; index36 <= num38 + 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]) + flag3 = true; + } + while (!Main.tile[index38, index36].active()) + { + ++index38; + if (!Main.tileDungeon[(int) Main.tile[index38, index36].type]) + flag3 = true; + } + } + if (!flag3 && index38 - index37 <= num40) + { + bool flag4 = true; + int num41 = index35 - num40 / 2 - 2; + int num42 = index35 + num40 / 2 + 2; + int num43 = index36 - 5; + int num44 = index36 + 5; + for (int index39 = num41; index39 <= num42; ++index39) + { + for (int index40 = num43; index40 <= num44; ++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) + { + num39 = index36; + break; + } + } + } + if (num39 > num38 - 10 && num39 < num38 + 10) + { + int index42 = index35; + int index43 = num39; + int index44 = index35 + 1; + for (; !Main.tile[index42, index43].active(); --index42) + { + Main.tile[index42, index43].active(true); + Main.tile[index42, index43].type = (ushort) 19; + if (wallType == 7) + Main.tile[index42, index43].frameY = (short) 108; + if (wallType == 8) + Main.tile[index42, index43].frameY = (short) 144; + if (wallType == 9) + Main.tile[index42, index43].frameY = (short) 126; + } + for (; !Main.tile[index44, index43].active(); ++index44) + { + Main.tile[index44, index43].active(true); + Main.tile[index44, index43].type = (ushort) 19; + if (wallType == 7) + Main.tile[index44, index43].frameY = (short) 108; + if (wallType == 8) + Main.tile[index44, index43].frameY = (short) 144; + if (wallType == 9) + Main.tile[index44, index43].frameY = (short) 126; + } + } + } + for (int index = 0; index < 4; ++index) + { + bool flag = false; + while (!flag) + { + int i = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int j = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.dMaxY); + if (Main.wallDungeon[(int) Main.tile[i, j].wall] && !Main.tile[i, j].active()) + { + 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; + } + flag = WorldGen.AddBuriedChest(i, j, contain, Style: Style); + } + } + } + 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 num45 = 0; + int num46 = 1000; + int num47 = 0; + while (num47 < Main.maxTilesX / 20) + { + ++num45; + int index45 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index46 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + bool flag5 = true; + if (Main.wallDungeon[(int) Main.tile[index45, index46].wall] && !Main.tile[index45, index46].active()) + { + int num48 = 1; + if (WorldGen.genRand.Next(2) == 0) + num48 = -1; + while (flag5 && !Main.tile[index45, index46].active()) + { + index45 -= num48; + if (index45 < 5 || index45 > Main.maxTilesX - 5) + flag5 = false; + else if (Main.tile[index45, index46].active() && !Main.tileDungeon[(int) Main.tile[index45, index46].type]) + flag5 = false; + } + if (flag5 && Main.tile[index45, index46].active() && Main.tileDungeon[(int) Main.tile[index45, index46].type] && Main.tile[index45, index46 - 1].active() && Main.tileDungeon[(int) Main.tile[index45, index46 - 1].type] && Main.tile[index45, index46 + 1].active() && Main.tileDungeon[(int) Main.tile[index45, index46 + 1].type]) + { + int i1 = index45 + num48; + for (int index47 = i1 - 3; index47 <= i1 + 3; ++index47) + { + for (int index48 = index46 - 3; index48 <= index46 + 3; ++index48) + { + if (Main.tile[index47, index48].active() && Main.tile[index47, index48].type == (ushort) 19) + { + flag5 = false; + break; + } + } + } + if (flag5 && !Main.tile[i1, index46 - 1].active() & !Main.tile[i1, index46 - 2].active() & !Main.tile[i1, index46 - 3].active()) + { + int index49 = i1; + int num49 = i1; + while (index49 > WorldGen.dMinX && index49 < WorldGen.dMaxX && !Main.tile[index49, index46].active() && !Main.tile[index49, index46 - 1].active() && !Main.tile[index49, index46 + 1].active()) + index49 += num48; + int num50 = Math.Abs(i1 - index49); + bool flag6 = false; + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + if (num50 > 5) + { + for (int index50 = WorldGen.genRand.Next(1, 4); index50 > 0; --index50) + { + Main.tile[i1, index46].active(true); + Main.tile[i1, index46].type = (ushort) 19; + if ((int) Main.tile[i1, index46].wall == roomWall[0]) + Main.tile[i1, index46].frameY = (short) (18 * numArray[0]); + if ((int) Main.tile[i1, index46].wall == roomWall[1]) + Main.tile[i1, index46].frameY = (short) (18 * numArray[1]); + if ((int) Main.tile[i1, index46].wall == roomWall[2]) + Main.tile[i1, index46].frameY = (short) (18 * numArray[2]); + if (flag6) + { + WorldGen.PlaceTile(i1, index46 - 1, 50, true); + if (WorldGen.genRand.Next(50) == 0 && Main.tile[i1, index46 - 1].type == (ushort) 50) + Main.tile[i1, index46 - 1].frameX = (short) 90; + } + i1 += num48; + } + num45 = 0; + ++num47; + if (!flag6 && WorldGen.genRand.Next(2) == 0) + { + int i2 = num49; + int j = index46 - 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(i2, j, type, true); + if (Main.tile[i2, j].type == (ushort) 13) + Main.tile[i2, j].frameX = WorldGen.genRand.Next(2) != 0 ? (short) 36 : (short) 18; + } + } + } + } + } + if (num45 > num46) + { + num45 = 0; + ++num47; + } + } + Main.statusText = Lang.gen[58].Value + " 95%"; + int num51 = 1; + for (int index = 0; index < WorldGen.numDRooms; ++index) + { + int num52 = 0; + while (num52 < 1000) + { + int num53 = (int) ((double) WorldGen.dRoomSize[index] * 0.4); + int i = WorldGen.dRoomX[index] + WorldGen.genRand.Next(-num53, num53 + 1); + int j = WorldGen.dRoomY[index] + WorldGen.genRand.Next(-num53, num53 + 1); + int Style = 2; + int contain; + switch (num51) + { + case 1: + contain = 329; + break; + case 2: + contain = 155; + break; + case 3: + contain = 156; + break; + case 4: + contain = 157; + break; + case 5: + contain = 163; + break; + case 6: + contain = 113; + break; + case 7: + contain = 3317; + break; + case 8: + contain = 327; + Style = 0; + break; + default: + contain = 164; + num51 = 0; + break; + } + if ((double) j < Main.worldSurface + 50.0) + { + contain = 327; + Style = 0; + } + if (contain == 0 && WorldGen.genRand.Next(2) == 0) + { + num52 = 1000; + } + else + { + if (WorldGen.AddBuriedChest(i, j, contain, Style: Style)) + { + num52 += 1000; + ++num51; + } + ++num52; + } + } + } + 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 numAdd = 0; + WorldGen.MakeDungeon_Lights(tileType, ref failCount, failMax1, ref numAdd, roomWall); + failCount = 0; + int failMax2 = 1000; + numAdd = 0; + WorldGen.MakeDungeon_Traps(ref failCount, failMax2, ref numAdd); + float count1 = WorldGen.MakeDungeon_GroundFurniture(wallType); + 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.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; + } + } + } + } + } + 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.maxTilesY - 200) + ++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 >= (byte) 94 && Main.tile[index3, index2].wall <= (byte) 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 randHousePicture() + { + int num1 = WorldGen.genRand.Next(4); + 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); + Vector2 vector2; + vector2.X = (float) i; + vector2.Y = (float) j; + int num2 = WorldGen.genRand.Next(10, 30); + int num3 = i <= WorldGen.dEnteranceX ? 1 : -1; + if (i > Main.maxTilesX - 400) + num3 = -1; + else if (i < 400) + num3 = 1; + zero.Y = -1f; + zero.X = (float) num3; + 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; + while (num2 > 0) + { + --num2; + int num4 = (int) ((double) vector2.X - num1 - 4.0 - (double) WorldGen.genRand.Next(6)); + int num5 = (int) ((double) vector2.X + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + int num6 = (int) ((double) vector2.Y - num1 - 4.0); + int num7 = (int) ((double) vector2.Y + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY) + num7 = Main.maxTilesY; + int num8 = 1; + if ((double) vector2.X > (double) (Main.maxTilesX / 2)) + num8 = -1; + int i1 = (int) ((double) vector2.X + WorldGen.dxStrength1 * 0.600000023841858 * (double) num8 + WorldGen.dxStrength2 * (double) num8); + int num9 = (int) (WorldGen.dyStrength2 * 0.5); + if ((double) vector2.Y < Main.worldSurface - 5.0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 6.0 + (double) num9)].wall == (byte) 0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 7.0 + (double) num9)].wall == (byte) 0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 8.0 + (double) num9)].wall == (byte) 0) + { + WorldGen.dSurface = true; + WorldGen.TileRunner(i1, (int) ((double) vector2.Y - num1 - 6.0 + (double) num9), (double) WorldGen.genRand.Next(25, 35), WorldGen.genRand.Next(10, 20), -1, speedY: -1f); + } + for (int index1 = num4; index1 < num5; ++index1) + { + for (int index2 = num6; index2 < num7; ++index2) + { + Main.tile[index1, index2].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + { + Main.tile[index1, index2].wall = (byte) 0; + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = tileType; + } + } + } + for (int index3 = num4 + 1; index3 < num5 - 1; ++index3) + { + for (int index4 = num6 + 1; index4 < num7 - 1; ++index4) + Main.tile[index3, index4].wall = (byte) wallType; + } + int num10 = 0; + if (WorldGen.genRand.Next((int) num1) == 0) + num10 = WorldGen.genRand.Next(1, 3); + int num11 = (int) ((double) vector2.X - num1 * 0.5 - (double) num10); + int num12 = (int) ((double) vector2.X + num1 * 0.5 + (double) num10); + int num13 = (int) ((double) vector2.Y - num1 * 0.5 - (double) num10); + int num14 = (int) ((double) vector2.Y + num1 * 0.5 + (double) num10); + if (num11 < 0) + num11 = 0; + if (num12 > Main.maxTilesX) + num12 = Main.maxTilesX; + if (num13 < 0) + num13 = 0; + if (num14 > Main.maxTilesY) + num14 = Main.maxTilesY; + for (int i2 = num11; i2 < num12; ++i2) + { + for (int j1 = num13; j1 < num14; ++j1) + { + Main.tile[i2, j1].active(false); + WorldGen.PlaceWall(i2, j1, wallType, true); + } + } + if (WorldGen.dSurface) + num2 = 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 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); + if (forceX) + { + num3 += 20; + WorldGen.lastDungeonHall = Vector2.Zero; + } + else if (WorldGen.genRand.Next(5) == 0) + { + num1 *= 2.0; + num3 /= 2; + } + bool flag1 = false; + bool flag2 = false; + bool flag3 = true; + while (!flag1) + { + bool flag4 = false; + int num4; + if (flag3 && !forceX) + { + bool flag5 = true; + bool flag6 = true; + bool flag7 = true; + bool flag8 = true; + int num5 = num3; + bool flag9 = false; + for (int index1 = j; index1 > j - num5; --index1) + { + int index2 = i; + if ((int) Main.tile[index2, index1].wall == wallType) + { + if (flag9) + { + flag5 = false; + break; + } + } + else + flag9 = true; + } + bool flag10 = false; + for (int index3 = j; index3 < j + num5; ++index3) + { + int index4 = i; + if ((int) Main.tile[index4, index3].wall == wallType) + { + if (flag10) + { + flag6 = false; + break; + } + } + else + flag10 = true; + } + bool flag11 = false; + for (int index5 = i; index5 > i - num5; --index5) + { + int index6 = j; + if ((int) Main.tile[index5, index6].wall == wallType) + { + if (flag11) + { + flag7 = false; + break; + } + } + else + flag11 = true; + } + bool flag12 = false; + for (int index7 = i; index7 < i + num5; ++index7) + { + int index8 = j; + if ((int) Main.tile[index7, index8].wall == wallType) + { + if (flag12) + { + flag8 = false; + break; + } + } + else + flag12 = true; + } + if (!flag7 && !flag8 && !flag5 && !flag6) + { + num4 = WorldGen.genRand.Next(2) != 0 ? 1 : -1; + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + } + else + { + WorldGen.genRand.Next(4); + int num6; + do + { + num6 = WorldGen.genRand.Next(4); + } + while (!(num6 == 0 & flag5) && !(num6 == 1 & flag6) && !(num6 == 2 & flag7) && !(num6 == 3 & flag8)); + switch (num6) + { + case 0: + num4 = -1; + break; + case 1: + num4 = 1; + break; + default: + flag4 = true; + num4 = num6 != 2 ? 1 : -1; + break; + } + } + } + else + { + num4 = WorldGen.genRand.Next(2) != 0 ? 1 : -1; + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + } + flag3 = false; + if (forceX) + flag4 = true; + if (flag4) + { + 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) + { + flag2 = 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) + flag1 = 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) + { + flag2 = 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.DPlatX[WorldGen.numDPlats] = (int) vector2.X; + WorldGen.DPlatY[WorldGen.numDPlats] = (int) vector2.Y; + ++WorldGen.numDPlats; + } + 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; + } + } + } + for (int index11 = num14 + 1; index11 < num15 - 1; ++index11) + { + for (int index12 = num16 + 1; index12 < num17 - 1; ++index12) + Main.tile[index11, index12].wall = (byte) 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].active(false); + Main.tile[index13, index14].wall = (byte) wallType; + } + } + vector2 += zero1; + if (flag2 && 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.DPlatX[WorldGen.numDPlats] = (int) vector2.X; + WorldGen.DPlatY[WorldGen.numDPlats] = (int) vector2.Y; + ++WorldGen.numDPlats; + } + } + + 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].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 = (byte) 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 = (byte) 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); + } + } + 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; + 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 = (byte) 0; + if (index3 > num3 + 1 && index3 < num4 - 2 && index4 > num5 + 1 && index4 < num6 - 2) + Main.tile[index3, index4].wall = (byte) wallType; + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = tileType; + } + } + } + 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) + { + if ((int) Main.tile[index5, index6].wall != wallType) + { + Main.tile[index5, index6].active(true); + Main.tile[index5, index6].type = tileType; + } + } + } + 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) + { + if ((int) Main.tile[index7, index8].wall != wallType) + { + Main.tile[index7, index8].active(true); + Main.tile[index7, index8].type = tileType; + } + } + } + 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) + { + if ((int) Main.tile[index9, index10].wall != wallType) + { + Main.tile[index9, index10].active(true); + Main.tile[index9, index10].type = tileType; + } + } + ++num17; + if (num17 >= num16) + { + index9 += num16; + num17 = 0; + } + } + for (int index11 = num3; index11 < num4; ++index11) + { + for (int index12 = num6; (double) index12 < Main.worldSurface; ++index12) + { + if (!Main.wallDungeon[(int) Main.tile[index11, index12].wall]) + { + Main.tile[index11, index12].active(true); + Main.tile[index11, index12].type = tileType; + } + Main.tile[index11, index12].wall = (byte) wallType; + } + } + 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].wall = (byte) wallType; + } + 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; + for (int index15 = num22; index15 < num23; ++index15) + { + for (int index16 = num24; index16 < num25; ++index16) + Main.tile[index15, index16].wall = (byte) wallType; + } + 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].active(false); + Main.tile[index17, index18].wall = (byte) 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.DPlatX[WorldGen.numDPlats] = index21; + WorldGen.DPlatY[WorldGen.numDPlats] = index19; + ++WorldGen.numDPlats; + break; + } + int index22 = (int) vector2.X + index20; + if (!Main.tile[index22, index19].active() && Main.wallDungeon[(int) Main.tile[index22, index19].wall]) + { + WorldGen.DPlatX[WorldGen.numDPlats] = index22; + WorldGen.DPlatY[WorldGen.numDPlats] = index19; + ++WorldGen.numDPlats; + 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) + { + 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 = (byte) 0; + Main.tile[index23, index24].active(true); + Main.tile[index23, index24].type = tileType; + } + } + } + } + for (int index25 = num30; index25 < num31; ++index25) + { + for (int index26 = num33; (double) index26 < Main.worldSurface; ++index26) + { + 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 = (byte) wallType; + } + } + 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) + { + if ((int) Main.tile[index27, index28].wall != wallType) + { + Main.tile[index27, index28].active(true); + Main.tile[index27, index28].type = tileType; + } + } + } + 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) + { + if ((int) Main.tile[index29, index30].wall != wallType) + { + Main.tile[index29, index30].active(true); + Main.tile[index29, index30].type = tileType; + } + } + } + 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) + { + if ((int) Main.tile[index31, index32].wall != wallType) + { + Main.tile[index31, index32].active(true); + Main.tile[index31, index32].type = tileType; + } + } + ++num46; + if (num46 >= num45) + { + index31 += num45; + num46 = 0; + } + } + 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].wall = (byte) 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 index35 = (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 (index35 > Main.maxTilesY) + index35 = Main.maxTilesY; + for (int index36 = num51; index36 < num52; ++index36) + { + for (int index37 = num53; index37 < index35; ++index37) + { + Main.tile[index36, index37].active(false); + Main.tile[index36, index37].wall = (byte) 0; + } + } + for (int index38 = num51; index38 < num52; ++index38) + { + if (!Main.tile[index38, index35].active()) + { + Main.tile[index38, index35].active(true); + Main.tile[index38, index35].type = (ushort) 19; + if (wallType == 7) + Main.tile[index38, index35].frameY = (short) 108; + if (wallType == 8) + Main.tile[index38, index35].frameY = (short) 144; + if (wallType == 9) + Main.tile[index38, index35].frameY = (short) 126; + } + } + Main.dungeonX = (int) vector2.X; + Main.dungeonY = index35; + int index39 = NPC.NewNPC(Main.dungeonX * 16 + 8, Main.dungeonY * 16, 37); + Main.npc[index39].homeless = false; + Main.npc[index39].homeTileX = Main.dungeonX; + Main.npc[index39].homeTileY = Main.dungeonY; + if (num2 == 1) + { + int num54 = 0; + for (int index40 = num52; index40 < num52 + 50; ++index40) + { + ++num54; + for (int index41 = index35 + num54; index41 < index35 + 50; ++index41) + { + if (!Main.wallDungeon[(int) Main.tile[index40, index41].wall]) + { + Main.tile[index40, index41].active(true); + Main.tile[index40, index41].type = tileType; + } + } + } + } + else + { + int num55 = 0; + for (int index42 = num51; index42 > num51 - 50; --index42) + { + ++num55; + for (int index43 = index35 + num55; index43 < index35 + 50; ++index43) + { + if (!Main.wallDungeon[(int) Main.tile[index42, index43].wall]) + { + Main.tile[index42, index43].active(true); + Main.tile[index42, index43].type = tileType; + } + } + } + } + int num56 = 1 + WorldGen.genRand.Next(2); + int num57 = 2 + WorldGen.genRand.Next(4); + int num58 = 0; + int num59 = (int) ((double) vector2.X - dxStrength2 * 0.5); + int num60 = (int) ((double) vector2.X + dxStrength2 * 0.5); + int num61 = num59 + 2; + int num62 = num60 - 2; + for (int i1 = num61; i1 < num62; ++i1) + { + for (int j1 = num53; j1 < index35; ++j1) + WorldGen.PlaceWall(i1, j1, wallType, true); + ++num58; + if (num58 >= num57) + { + i1 += num57 * 2; + num58 = 0; + } + } + vector2.X -= (float) (dxStrength2 * 0.600000023841858) * (float) num2; + vector2.Y += (float) dyStrength2 * 0.5f; + double num63 = 15.0; + double num64 = 3.0; + vector2.Y -= (float) num64 * 0.5f; + int num65 = (int) ((double) vector2.X - num63 * 0.5); + int num66 = (int) ((double) vector2.X + num63 * 0.5); + int num67 = (int) ((double) vector2.Y - num64 * 0.5); + int num68 = (int) ((double) vector2.Y + num64 * 0.5); + if (num65 < 0) + num65 = 0; + if (num66 > Main.maxTilesX) + num66 = Main.maxTilesX; + if (num67 < 0) + num67 = 0; + if (num68 > Main.maxTilesY) + num68 = Main.maxTilesY; + for (int index44 = num65; index44 < num66; ++index44) + { + for (int index45 = num67; index45 < num68; ++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 AddBuriedChest( + int i, + int j, + int contain = 0, + bool notNearOtherChests = false, + int Style = -1) + { + bool flag1 = false; + bool flag2 = false; + for (int j1 = j; j1 < Main.maxTilesY; ++j1) + { + if (WorldGen.SolidTile(i, j1)) + { + bool flag3 = false; + int num1 = i; + int num2 = j1; + int style = 0; + if ((double) num2 >= Main.worldSurface + 25.0 || contain > 0) + { + style = 1; + if (Style == 10 || contain == 211 || contain == 212 || contain == 213 || contain == 753) + { + style = 10; + flag2 = true; + } + } + if (Style >= 0) + style = Style; + if (style == 11 || contain == 0 && (double) num2 >= Main.worldSurface + 25.0 && num2 <= Main.maxTilesY - 205 && (Main.tile[i, j1].type == (ushort) 147 || Main.tile[i, j1].type == (ushort) 161 || Main.tile[i, j1].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 (num2 > Main.maxTilesY - 205 && contain == 0) + { + if (WorldGen.hellChest == WorldGen.hellChestItem[0]) + { + contain = 274; + style = 4; + flag3 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[1]) + { + contain = 220; + style = 4; + flag3 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[2]) + { + contain = 112; + style = 4; + flag3 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[3]) + { + contain = 218; + style = 4; + flag3 = true; + } + else + { + contain = 3019; + style = 4; + flag3 = true; + } + } + int index1 = WorldGen.PlaceChest(num1 - 1, num2 - 1, notNearOtherChests: notNearOtherChests, style: style); + if (index1 < 0) + return false; + if (flag3) + { + ++WorldGen.hellChest; + if (WorldGen.hellChest > 4) + WorldGen.hellChest = 0; + } + int index2 = 0; + while (index2 == 0) + { + if (style == 0 && (double) num2 < Main.worldSurface + 25.0 || contain == 848) + { + if (contain > 0) + { + Main.chest[index1].item[index2].SetDefaults(contain); + Main.chest[index1].item[index2].Prefix(-1); + switch (contain) + { + case 832: + ++index2; + Main.chest[index1].item[index2].SetDefaults(933); + break; + case 848: + ++index2; + Main.chest[index1].item[index2].SetDefaults(866); + break; + } + ++index2; + } + else + { + int num3 = WorldGen.genRand.Next(11); + if (num3 == 0) + { + Main.chest[index1].item[index2].SetDefaults(280); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 1) + { + Main.chest[index1].item[index2].SetDefaults(281); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 2) + { + Main.chest[index1].item[index2].SetDefaults(284); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 3) + { + Main.chest[index1].item[index2].SetDefaults(282); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(40, 75); + } + if (num3 == 4) + { + Main.chest[index1].item[index2].SetDefaults(279); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(70, 150); + } + if (num3 == 5) + { + Main.chest[index1].item[index2].SetDefaults(285); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 6) + { + Main.chest[index1].item[index2].SetDefaults(953); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 7) + { + Main.chest[index1].item[index2].SetDefaults(946); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 8) + { + Main.chest[index1].item[index2].SetDefaults(3068); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 9) + { + Main.chest[index1].item[index2].SetDefaults(3069); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num3 == 10) + { + Main.chest[index1].item[index2].SetDefaults(3084); + Main.chest[index1].item[index2].Prefix(-1); + } + ++index2; + } + if (WorldGen.genRand.Next(6) == 0) + { + Main.chest[index1].item[index2].SetDefaults(3093); + Main.chest[index1].item[index2].stack = 1; + if (WorldGen.genRand.Next(5) == 0) + Main.chest[index1].item[index2].stack += WorldGen.genRand.Next(2); + if (WorldGen.genRand.Next(10) == 0) + Main.chest[index1].item[index2].stack += WorldGen.genRand.Next(3); + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + Main.chest[index1].item[index2].SetDefaults(168); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(3, 6); + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num4 = WorldGen.genRand.Next(2); + int num5 = WorldGen.genRand.Next(8) + 3; + if (num4 == 0) + Main.chest[index1].item[index2].SetDefaults(WorldGen.copperBar); + if (num4 == 1) + Main.chest[index1].item[index2].SetDefaults(WorldGen.ironBar); + Main.chest[index1].item[index2].stack = num5; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num6 = WorldGen.genRand.Next(50, 101); + Main.chest[index1].item[index2].SetDefaults(965); + Main.chest[index1].item[index2].stack = num6; + ++index2; + } + if (WorldGen.genRand.Next(3) != 0) + { + int num7 = WorldGen.genRand.Next(2); + int num8 = WorldGen.genRand.Next(26) + 25; + if (num7 == 0) + Main.chest[index1].item[index2].SetDefaults(40); + if (num7 == 1) + Main.chest[index1].item[index2].SetDefaults(42); + Main.chest[index1].item[index2].stack = num8; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num9 = WorldGen.genRand.Next(1); + int num10 = WorldGen.genRand.Next(3) + 3; + if (num9 == 0) + Main.chest[index1].item[index2].SetDefaults(28); + Main.chest[index1].item[index2].stack = num10; + ++index2; + } + if (WorldGen.genRand.Next(3) != 0) + { + Main.chest[index1].item[index2].SetDefaults(2350); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(2, 5); + ++index2; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num11 = WorldGen.genRand.Next(6); + int num12 = WorldGen.genRand.Next(1, 3); + if (num11 == 0) + Main.chest[index1].item[index2].SetDefaults(292); + if (num11 == 1) + Main.chest[index1].item[index2].SetDefaults(298); + if (num11 == 2) + Main.chest[index1].item[index2].SetDefaults(299); + if (num11 == 3) + Main.chest[index1].item[index2].SetDefaults(290); + if (num11 == 4) + Main.chest[index1].item[index2].SetDefaults(2322); + if (num11 == 5) + Main.chest[index1].item[index2].SetDefaults(2325); + Main.chest[index1].item[index2].stack = num12; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num13 = WorldGen.genRand.Next(2); + int num14 = WorldGen.genRand.Next(11) + 10; + if (num13 == 0) + Main.chest[index1].item[index2].SetDefaults(8); + if (num13 == 1) + Main.chest[index1].item[index2].SetDefaults(31); + Main.chest[index1].item[index2].stack = num14; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + Main.chest[index1].item[index2].SetDefaults(72); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(10, 30); + ++index2; + } + } + else if ((double) num2 < Main.rockLayer) + { + if (contain > 0) + { + if (contain == 832) + { + Main.chest[index1].item[index2].SetDefaults(933); + ++index2; + } + Main.chest[index1].item[index2].SetDefaults(contain); + Main.chest[index1].item[index2].Prefix(-1); + ++index2; + } + else + { + int num15 = WorldGen.genRand.Next(7); + if (WorldGen.genRand.Next(20) == 0) + { + Main.chest[index1].item[index2].SetDefaults(997); + Main.chest[index1].item[index2].Prefix(-1); + } + else + { + if (num15 == 0) + { + Main.chest[index1].item[index2].SetDefaults(49); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 1) + { + Main.chest[index1].item[index2].SetDefaults(50); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 2) + { + Main.chest[index1].item[index2].SetDefaults(53); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 3) + { + Main.chest[index1].item[index2].SetDefaults(54); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 4) + { + Main.chest[index1].item[index2].SetDefaults(55); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 5) + { + Main.chest[index1].item[index2].SetDefaults(975); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num15 == 6) + { + Main.chest[index1].item[index2].SetDefaults(930); + Main.chest[index1].item[index2].Prefix(-1); + ++index2; + Main.chest[index1].item[index2].SetDefaults(931); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(26) + 25; + } + } + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + Main.chest[index1].item[index2].SetDefaults(166); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(10, 20); + ++index2; + } + if (WorldGen.genRand.Next(5) == 0) + { + Main.chest[index1].item[index2].SetDefaults(52); + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + int num16 = WorldGen.genRand.Next(50, 101); + Main.chest[index1].item[index2].SetDefaults(965); + Main.chest[index1].item[index2].stack = num16; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num17 = WorldGen.genRand.Next(2); + int num18 = WorldGen.genRand.Next(10) + 5; + if (num17 == 0) + Main.chest[index1].item[index2].SetDefaults(WorldGen.ironBar); + if (num17 == 1) + Main.chest[index1].item[index2].SetDefaults(WorldGen.silverBar); + Main.chest[index1].item[index2].stack = num18; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num19 = WorldGen.genRand.Next(2); + int num20 = WorldGen.genRand.Next(25) + 25; + if (num19 == 0) + Main.chest[index1].item[index2].SetDefaults(40); + if (num19 == 1) + Main.chest[index1].item[index2].SetDefaults(42); + Main.chest[index1].item[index2].stack = num20; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num21 = WorldGen.genRand.Next(1); + int num22 = WorldGen.genRand.Next(3) + 3; + if (num21 == 0) + Main.chest[index1].item[index2].SetDefaults(28); + Main.chest[index1].item[index2].stack = num22; + ++index2; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num23 = WorldGen.genRand.Next(9); + int num24 = WorldGen.genRand.Next(1, 3); + if (num23 == 0) + Main.chest[index1].item[index2].SetDefaults(289); + if (num23 == 1) + Main.chest[index1].item[index2].SetDefaults(298); + if (num23 == 2) + Main.chest[index1].item[index2].SetDefaults(299); + if (num23 == 3) + Main.chest[index1].item[index2].SetDefaults(290); + if (num23 == 4) + Main.chest[index1].item[index2].SetDefaults(303); + if (num23 == 5) + Main.chest[index1].item[index2].SetDefaults(291); + if (num23 == 6) + Main.chest[index1].item[index2].SetDefaults(304); + if (num23 == 7) + Main.chest[index1].item[index2].SetDefaults(2322); + if (num23 == 8) + Main.chest[index1].item[index2].SetDefaults(2329); + Main.chest[index1].item[index2].stack = num24; + ++index2; + } + if (WorldGen.genRand.Next(3) != 0) + { + int num25 = WorldGen.genRand.Next(1, 3); + Main.chest[index1].item[index2].SetDefaults(2350); + Main.chest[index1].item[index2].stack = num25; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num26 = WorldGen.genRand.Next(11) + 10; + if (style == 11) + Main.chest[index1].item[index2].SetDefaults(974); + else + Main.chest[index1].item[index2].SetDefaults(8); + Main.chest[index1].item[index2].stack = num26; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + Main.chest[index1].item[index2].SetDefaults(72); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(50, 90); + ++index2; + } + } + else if (num2 < Main.maxTilesY - 250) + { + if (contain > 0) + { + Main.chest[index1].item[index2].SetDefaults(contain); + Main.chest[index1].item[index2].Prefix(-1); + ++index2; + if (flag1 && WorldGen.genRand.Next(5) == 0) + { + Main.chest[index1].item[index2].SetDefaults(3199); + ++index2; + } + if (flag2 && WorldGen.genRand.Next(6) == 0) + { + Item[] objArray1 = Main.chest[index1].item; + int index3 = index2; + int num27 = index3 + 1; + objArray1[index3].SetDefaults(3360); + Item[] objArray2 = Main.chest[index1].item; + int index4 = num27; + index2 = index4 + 1; + objArray2[index4].SetDefaults(3361); + } + } + else + { + int num28 = WorldGen.genRand.Next(7); + if (WorldGen.genRand.Next(40) == 0) + { + Main.chest[index1].item[index2].SetDefaults(906); + Main.chest[index1].item[index2].Prefix(-1); + } + else if (WorldGen.genRand.Next(15) == 0) + { + Main.chest[index1].item[index2].SetDefaults(997); + Main.chest[index1].item[index2].Prefix(-1); + } + else + { + if (num28 == 0) + { + Main.chest[index1].item[index2].SetDefaults(49); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 1) + { + Main.chest[index1].item[index2].SetDefaults(50); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 2) + { + Main.chest[index1].item[index2].SetDefaults(53); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 3) + { + Main.chest[index1].item[index2].SetDefaults(54); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 4) + { + Main.chest[index1].item[index2].SetDefaults(55); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 5) + { + Main.chest[index1].item[index2].SetDefaults(975); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num28 == 6) + { + Main.chest[index1].item[index2].SetDefaults(930); + Main.chest[index1].item[index2].Prefix(-1); + ++index2; + Main.chest[index1].item[index2].SetDefaults(931); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(26) + 25; + } + } + ++index2; + } + if (WorldGen.genRand.Next(5) == 0) + { + Main.chest[index1].item[index2].SetDefaults(43); + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + Main.chest[index1].item[index2].SetDefaults(167); + ++index2; + } + if (WorldGen.genRand.Next(4) == 0) + { + Main.chest[index1].item[index2].SetDefaults(51); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(26) + 25; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num29 = WorldGen.genRand.Next(2); + int num30 = WorldGen.genRand.Next(8) + 3; + if (num29 == 0) + Main.chest[index1].item[index2].SetDefaults(WorldGen.goldBar); + if (num29 == 1) + Main.chest[index1].item[index2].SetDefaults(WorldGen.silverBar); + Main.chest[index1].item[index2].stack = num30; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num31 = WorldGen.genRand.Next(2); + int num32 = WorldGen.genRand.Next(26) + 25; + if (num31 == 0) + Main.chest[index1].item[index2].SetDefaults(41); + if (num31 == 1) + Main.chest[index1].item[index2].SetDefaults(279); + Main.chest[index1].item[index2].stack = num32; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num33 = WorldGen.genRand.Next(1); + int num34 = WorldGen.genRand.Next(3) + 3; + if (num33 == 0) + Main.chest[index1].item[index2].SetDefaults(188); + Main.chest[index1].item[index2].stack = num34; + ++index2; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num35 = WorldGen.genRand.Next(6); + int num36 = WorldGen.genRand.Next(1, 3); + if (num35 == 0) + Main.chest[index1].item[index2].SetDefaults(296); + if (num35 == 1) + Main.chest[index1].item[index2].SetDefaults(295); + if (num35 == 2) + Main.chest[index1].item[index2].SetDefaults(299); + if (num35 == 3) + Main.chest[index1].item[index2].SetDefaults(302); + if (num35 == 4) + Main.chest[index1].item[index2].SetDefaults(303); + if (num35 == 5) + Main.chest[index1].item[index2].SetDefaults(305); + Main.chest[index1].item[index2].stack = num36; + ++index2; + } + if (WorldGen.genRand.Next(3) > 1) + { + int num37 = WorldGen.genRand.Next(7); + int num38 = WorldGen.genRand.Next(1, 3); + if (num37 == 0) + Main.chest[index1].item[index2].SetDefaults(301); + if (num37 == 1) + Main.chest[index1].item[index2].SetDefaults(302); + if (num37 == 2) + Main.chest[index1].item[index2].SetDefaults(297); + if (num37 == 3) + Main.chest[index1].item[index2].SetDefaults(304); + if (num37 == 4) + Main.chest[index1].item[index2].SetDefaults(2329); + if (num37 == 5) + Main.chest[index1].item[index2].SetDefaults(2351); + if (num37 == 6) + Main.chest[index1].item[index2].SetDefaults(2329); + Main.chest[index1].item[index2].stack = num38; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num39 = WorldGen.genRand.Next(1, 3); + Main.chest[index1].item[index2].SetDefaults(2350); + Main.chest[index1].item[index2].stack = num39; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num40 = WorldGen.genRand.Next(2); + int num41 = WorldGen.genRand.Next(15) + 15; + if (num40 == 0) + { + if (style == 11) + Main.chest[index1].item[index2].SetDefaults(974); + else + Main.chest[index1].item[index2].SetDefaults(8); + } + if (num40 == 1) + Main.chest[index1].item[index2].SetDefaults(282); + Main.chest[index1].item[index2].stack = num41; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + Main.chest[index1].item[index2].SetDefaults(73); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(1, 3); + ++index2; + } + } + else + { + if (contain > 0) + { + Main.chest[index1].item[index2].SetDefaults(contain); + Main.chest[index1].item[index2].Prefix(-1); + ++index2; + } + else + { + int num42 = WorldGen.genRand.Next(4); + if (num42 == 0) + { + Main.chest[index1].item[index2].SetDefaults(49); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num42 == 1) + { + Main.chest[index1].item[index2].SetDefaults(50); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num42 == 2) + { + Main.chest[index1].item[index2].SetDefaults(53); + Main.chest[index1].item[index2].Prefix(-1); + } + if (num42 == 3) + { + Main.chest[index1].item[index2].SetDefaults(54); + Main.chest[index1].item[index2].Prefix(-1); + } + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + Main.chest[index1].item[index2].SetDefaults(167); + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num43 = WorldGen.genRand.Next(2); + int num44 = WorldGen.genRand.Next(15) + 15; + if (num43 == 0) + Main.chest[index1].item[index2].SetDefaults(117); + if (num43 == 1) + Main.chest[index1].item[index2].SetDefaults(WorldGen.goldBar); + Main.chest[index1].item[index2].stack = num44; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num45 = WorldGen.genRand.Next(2); + int num46 = WorldGen.genRand.Next(25) + 50; + if (num45 == 0) + Main.chest[index1].item[index2].SetDefaults(265); + if (num45 == 1) + Main.chest[index1].item[index2].SetDefaults(278); + Main.chest[index1].item[index2].stack = num46; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num47 = WorldGen.genRand.Next(2); + int num48 = WorldGen.genRand.Next(6) + 15; + if (num47 == 0) + Main.chest[index1].item[index2].SetDefaults(226); + if (num47 == 1) + Main.chest[index1].item[index2].SetDefaults(227); + Main.chest[index1].item[index2].stack = num48; + ++index2; + } + if (WorldGen.genRand.Next(4) > 0) + { + int num49 = WorldGen.genRand.Next(8); + int num50 = WorldGen.genRand.Next(1, 3); + if (num49 == 0) + Main.chest[index1].item[index2].SetDefaults(296); + if (num49 == 1) + Main.chest[index1].item[index2].SetDefaults(295); + if (num49 == 2) + Main.chest[index1].item[index2].SetDefaults(293); + if (num49 == 3) + Main.chest[index1].item[index2].SetDefaults(288); + if (num49 == 4) + Main.chest[index1].item[index2].SetDefaults(294); + if (num49 == 5) + Main.chest[index1].item[index2].SetDefaults(297); + if (num49 == 6) + Main.chest[index1].item[index2].SetDefaults(304); + if (num49 == 7) + Main.chest[index1].item[index2].SetDefaults(2323); + Main.chest[index1].item[index2].stack = num50; + ++index2; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num51 = WorldGen.genRand.Next(8); + int num52 = WorldGen.genRand.Next(1, 3); + if (num51 == 0) + Main.chest[index1].item[index2].SetDefaults(305); + if (num51 == 1) + Main.chest[index1].item[index2].SetDefaults(301); + if (num51 == 2) + Main.chest[index1].item[index2].SetDefaults(302); + if (num51 == 3) + Main.chest[index1].item[index2].SetDefaults(288); + if (num51 == 4) + Main.chest[index1].item[index2].SetDefaults(300); + if (num51 == 5) + Main.chest[index1].item[index2].SetDefaults(2351); + if (num51 == 6) + Main.chest[index1].item[index2].SetDefaults(2348); + if (num51 == 7) + Main.chest[index1].item[index2].SetDefaults(2345); + Main.chest[index1].item[index2].stack = num52; + ++index2; + } + if (WorldGen.genRand.Next(3) == 0) + { + int num53 = WorldGen.genRand.Next(1, 3); + Main.chest[index1].item[index2].SetDefaults(2350); + Main.chest[index1].item[index2].stack = num53; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num54 = WorldGen.genRand.Next(2); + int num55 = WorldGen.genRand.Next(15) + 15; + if (num54 == 0) + Main.chest[index1].item[index2].SetDefaults(8); + if (num54 == 1) + Main.chest[index1].item[index2].SetDefaults(282); + Main.chest[index1].item[index2].stack = num55; + ++index2; + } + if (WorldGen.genRand.Next(2) == 0) + { + Main.chest[index1].item[index2].SetDefaults(73); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(2, 5); + ++index2; + } + } + if (index2 > 0) + { + if (style == 10 && WorldGen.genRand.Next(4) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2204); + ++index2; + } + if (style == 11 && WorldGen.genRand.Next(7) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2198); + ++index2; + } + if (style == 12 && WorldGen.genRand.Next(2) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2196); + ++index2; + } + if (style == 13 && WorldGen.genRand.Next(3) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2197); + ++index2; + } + if (style == 16) + { + Main.chest[index1].item[index2].SetDefaults(2195); + ++index2; + } + if (Main.wallDungeon[(int) Main.tile[i, j1].wall] && WorldGen.genRand.Next(8) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2192); + ++index2; + } + if (style == 16) + { + if (WorldGen.genRand.Next(5) == 0) + { + Main.chest[index1].item[index2].SetDefaults(2767); + ++index2; + } + else + { + Main.chest[index1].item[index2].SetDefaults(2766); + Main.chest[index1].item[index2].stack = WorldGen.genRand.Next(3, 8); + ++index2; + } + } + } + } + return true; + } + } + 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; + } + Main.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); + } + } + + 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 tile = Main.tile[i, j]; + if (tile.type != (ushort) 10 || tile.frameY >= (short) 594 && tile.frameY <= (short) 646 && tile.frameX < (short) 54) + return false; + short num1 = 0; + int frameY = (int) tile.frameY; + int num2 = 0; + while (frameY >= 54) + { + frameY -= 54; + ++num2; + } + if (tile.frameX >= (short) 54) + { + int num3 = (int) tile.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) + 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; + Main.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; + } + } + 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) + { + for (int index3 = 0; index3 < 2; ++index3) + { + if (Main.tile[index1 + index3, y - 1] == null) + Main.tile[index1 + index3, y - 1] = new Tile(); + if (!Main.tile[index1 + index3, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[index1 + index3, y - 1].type] || Main.tileSolidTop[(int) Main.tile[index1 + index3, y - 1].type]) + { + 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 ? 359 : 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 * 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 ? 438 + num5 - 2 : 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; + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + Type = 938 + Type; + 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) 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) 465) + Item.NewItem(index1 * 16, j * 16, 32, 32, 3815); + if (type == (ushort) 378) + { + Item.NewItem(index1 * 16, j * 16, 32, 48, 3202); + TETrainingDummy.Kill(index1, y); + } + WorldGen.destroyObject = false; + } + + public static void PlaceTight(int x, int y, ushort type = 165, 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(); + if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y].active() && !Main.tile[x, y + 1].active()) + { + if (spiders) + { + int num = 108 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + 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 (WorldGen.genRand.Next(2) == 0) + { + int num = WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num = WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + 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 (WorldGen.genRand.Next(2) == 0) + { + int num = 54 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num = 54 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 225) + { + int num = 162 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + 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 (WorldGen.genRand.Next(2) == 0) + { + int num = 378 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num = 378 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 368) + { + if (WorldGen.genRand.Next(2) == 0) + { + int num = 432 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num = 432 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 367) + { + if (WorldGen.genRand.Next(2) == 0) + { + int num = 486 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num = 486 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + } + } + else + { + if (spiders) + return; + if (WorldGen.SolidTile(x, y + 1) && !Main.tile[x, y].active() && !Main.tile[x, y - 1].active()) + { + 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 (WorldGen.genRand.Next(2) == 0) + { + int num = 54 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num = 54 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type == (ushort) 225) + { + int num = 162 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + 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 (WorldGen.genRand.Next(2) == 0) + { + int num = 378 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num = 378 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type == (ushort) 368) + { + if (WorldGen.genRand.Next(2) == 0) + { + int num = 432 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num = 432 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type == (ushort) 367) + { + if (WorldGen.genRand.Next(2) == 0) + { + int num = 486 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num = 486 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num; + Main.tile[x, y].frameY = (short) 54; + } + } + } + } + if (Main.tile[x, y].type != (ushort) 165) + return; + WorldGen.CheckTight(x, y); + } + + public static void TightBiome(int x, int j) + { + if (Main.netMode == 1 || Main.tile[x, j] == null) + return; + int tileY = j; + int num1 = 1; + int num2; + if (Main.tile[x, tileY].frameX >= (short) 0 && Main.tile[x, tileY].frameX <= (short) 36) + num2 = 7; + else if (Main.tile[x, tileY].frameX >= (short) 54 && Main.tile[x, tileY].frameX <= (short) 90) + num2 = 0; + else if (Main.tile[x, tileY].frameX >= (short) 216 && Main.tile[x, tileY].frameX <= (short) 252) + num2 = 1; + else if (Main.tile[x, tileY].frameX >= (short) 270 && Main.tile[x, tileY].frameX <= (short) 306) + num2 = 2; + else if (Main.tile[x, tileY].frameX >= (short) 324 && Main.tile[x, tileY].frameX <= (short) 360) + num2 = 3; + else if (Main.tile[x, tileY].frameX >= (short) 378 && Main.tile[x, tileY].frameX <= (short) 414) + num2 = 4; + else if (Main.tile[x, tileY].frameX >= (short) 432 && Main.tile[x, tileY].frameX <= (short) 468) + { + num2 = 5; + } + else + { + if (Main.tile[x, tileY].frameX < (short) 486 || Main.tile[x, tileY].frameX > (short) 522) + return; + num2 = 6; + } + int type; + if (Main.tile[x, tileY].frameY == (short) 72) + type = (int) Main.tile[x, tileY - 1].type; + else if (Main.tile[x, tileY].frameY == (short) 90) + type = (int) Main.tile[x, tileY + 1].type; + else if (Main.tile[x, tileY].frameY >= (short) 36) + { + if (Main.tile[x, tileY].frameY == (short) 54) + --tileY; + num1 = 2; + type = (int) Main.tile[x, tileY + 2].type; + } + else + { + if (Main.tile[x, tileY].frameY == (short) 18) + --tileY; + num1 = 2; + type = (int) Main.tile[x, tileY - 1].type; + } + int num3; + switch (type) + { + case 1: + num3 = 0; + break; + case 25: + case 163: + case 398: + case 400: + num3 = 2; + break; + case 117: + case 164: + case 402: + case 403: + num3 = 1; + break; + case 161: + num3 = 7; + break; + case 200: + case 203: + case 399: + case 401: + num3 = 3; + break; + case 367: + num3 = 6; + break; + case 368: + num3 = 5; + break; + case 396: + case 397: + num3 = 4; + break; + default: + return; + } + if (num2 == num3) + return; + int num4 = WorldGen.genRand.Next(3) * 18; + switch (num3) + { + case 0: + num4 += 54; + break; + case 1: + num4 += 216; + break; + case 2: + num4 += 270; + break; + case 3: + num4 += 324; + break; + case 4: + num4 += 378; + break; + case 5: + num4 += 432; + break; + case 6: + num4 += 486; + break; + case 7: + num4 = num4; + break; + } + for (int index = tileY; index < tileY + num1; ++index) + Main.tile[x, index].frameX = (short) num4; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, tileY, 2); + } + + 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) + { + if ((int) Main.tile[x, j1].type != (int) Main.tile[x, j].type) + return; + WorldGen.KillTile(x, j1); + } + else + WorldGen.TightBiome(x, j1); + } + 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) + { + if ((int) Main.tile[x, j1].type != (int) Main.tile[x, j].type) + return; + WorldGen.KillTile(x, j1); + } + else + WorldGen.TightBiome(x, j1); + } + 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) + { + 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) + return; + WorldGen.KillTile(x, j1 + 1); + } + else + WorldGen.TightBiome(x, j1); + } + 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) + { + 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) + return; + WorldGen.KillTile(x, j1 + 1); + } + else + WorldGen.TightBiome(x, j1); + } + } + + 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) + { + 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 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 num1 = 0; + while (frameY >= 40) + { + frameY -= 40; + ++num1; + } + if (frameY == 18) + --j1; + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if ((int) Main.tile[x, j1].frameY == 40 * num1 && (int) Main.tile[x, j1 + 1].frameY == 40 * num1 + 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: + num3 = 0; + break; + case 23: + num3 = 3; + break; + case 53: + num3 = 6; + break; + case 60: + num3 = 2; + break; + case 109: + 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 + num1); + 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) 15) + { + int Type = num1 < 18 || num1 > 23 ? (num1 != 5 ? (num1 != 6 ? (num1 != 7 ? (num1 != 8 ? (num1 != 9 ? (num1 != 10 ? (num1 != 11 ? (num1 != 13 ? (num1 != 14 ? (num1 != 15 ? (num1 != 12 ? (num1 != 4 ? (num1 != 3 ? (num1 != 2 ? (num1 != 17 ? (num1 != 1 ? (num1 != 24 ? (num1 != 25 ? (num1 != 16 ? (num1 != 26 ? (num1 != 27 ? (num1 != 28 ? (num1 != 29 ? (num1 != 30 ? (num1 != 31 ? (num1 != 32 ? (num1 != 33 ? (num1 != 34 ? (num1 != 35 ? (num1 != 36 ? 34 : 3889) : 3175) : 3176) : 3174) : 2812) : 2572) : 2557) : 2524) : 2288) : 2228) : 1925) : 1459) : 1814) : 1792) : 358) : 1509) : 628) : 629) : 630) : 1143) : 1402) : 1399) : 1396) : 915) : 826) : 810) : 809) : 808) : 807) : 806) : 1703 + num1 - 18; + Item.NewItem(x * 16, j1 * 16, 32, 32, Type); + } + else if (type == (ushort) 134) + { + if (num1 == 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 || Main.tile[x, y + 1].active() && Main.tileTable[(int) Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].topSlope() && !Main.tile[x, y + 1].halfBrick()) + return; + if (type == 78) + { + if (WorldGen.SolidTile2(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 x1 = x - num7; + int y1 = y - num6; + int num8 = (int) Main.tile[x1, y1].frameX / 18 / 2; + int num9 = (int) Main.tile[x, y].frameX / 18; + int num10 = 0; + while (num9 > 1) + { + num9 -= 2; + ++num10; + } + int num11 = x1; + int num12 = x1 + 2; + int num13 = y1; + int num14 = y1 + 2; + int num15 = 0; + for (int index3 = num11; index3 < num12; ++index3) + { + int num16 = 0; + for (int index4 = num13; index4 < num14; ++index4) + { + if (!Main.tile[index3, index4].active() || (int) Main.tile[index3, index4].type != (int) type) + { + flag = true; + break; + } + if ((int) Main.tile[index3, index4].frameX / 18 != num15 + num8 * 2 || (int) Main.tile[index3, index4].frameY / 18 != num16) + { + flag = true; + break; + } + ++num16; + } + ++num15; + } + if (!flag) + { + if (type == (ushort) 85) + { + if (Main.tile[x1, y1 + 2].active() && (Main.tileSolid[(int) Main.tile[x1, y1 + 2].type] || Main.tileSolidTop[(int) Main.tile[x1, y1 + 2].type]) && Main.tile[x1 + 1, y1 + 2].active() && (Main.tileSolid[(int) Main.tile[x1 + 1, y1 + 2].type] || Main.tileSolidTop[(int) Main.tile[x1 + 1, y1 + 2].type])) + num8 = num10; + else + flag = true; + } + else if (Main.tile[x1, y1 + 2].active() && (Main.tileSolid[(int) Main.tile[x1, y1 + 2].type] || Main.tileSolidTop[(int) Main.tile[x1, y1 + 2].type] && !Main.tileNoAttach[(int) Main.tile[x1, y1 + 2].type]) && Main.tile[x1 + 1, y1 + 2].active() && (Main.tileSolid[(int) Main.tile[x1 + 1, y1 + 2].type] || Main.tileSolidTop[(int) Main.tile[x1 + 1, y1 + 2].type] && !Main.tileNoAttach[(int) Main.tile[x1 + 1, y1 + 2].type])) + num8 = 0; + else if (Main.tile[x1, y1 - 1].nactive() && Main.tileSolid[(int) Main.tile[x1, y1 - 1].type] && !Main.tileSolidTop[(int) Main.tile[x1, y1 - 1].type] && !Main.tileNoAttach[(int) Main.tile[x1, y1 - 1].type] && Main.tile[x1 + 1, y1 - 1].nactive() && Main.tileSolid[(int) Main.tile[x1 + 1, y1 - 1].type] && !Main.tileSolidTop[(int) Main.tile[x1 + 1, y1 - 1].type] && !Main.tileNoAttach[(int) Main.tile[x1 + 1, y1 - 1].type]) + num8 = 1; + else if (Main.tile[x1 - 1, y1].nactive() && Main.tileSolid[(int) Main.tile[x1 - 1, y1].type] && !Main.tileSolidTop[(int) Main.tile[x1 - 1, y1].type] && !Main.tileNoAttach[(int) Main.tile[x1 - 1, y1].type] && Main.tile[x1 - 1, y1 + 1].nactive() && Main.tileSolid[(int) Main.tile[x1 - 1, y1 + 1].type] && !Main.tileSolidTop[(int) Main.tile[x1 - 1, y1 + 1].type] && !Main.tileNoAttach[(int) Main.tile[x1 - 1, y1 + 1].type]) + num8 = 2; + else if (Main.tile[x1 + 2, y1].nactive() && Main.tileSolid[(int) Main.tile[x1 + 2, y1].type] && !Main.tileSolidTop[(int) Main.tile[x1 + 2, y1].type] && !Main.tileNoAttach[(int) Main.tile[x1 + 2, y1].type] && Main.tile[x1 + 2, y1 + 1].nactive() && Main.tileSolid[(int) Main.tile[x1 + 2, y1 + 1].type] && !Main.tileSolidTop[(int) Main.tile[x1 + 2, y1 + 1].type] && !Main.tileNoAttach[(int) Main.tile[x1 + 2, y1 + 1].type]) + num8 = 3; + else if (Main.tile[x1, y1].wall > (byte) 0 && Main.tile[x1 + 1, y1].wall > (byte) 0 && Main.tile[x1, y1 + 1].wall > (byte) 0 && Main.tile[x1 + 1, y1 + 1].wall > (byte) 0) + num8 = 4; + else + flag = true; + } + if (flag) + { + if (type == (ushort) 395) + { + int key = TEItemFrame.Find(x1, y1); + if (key != -1 && ((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + ((TEItemFrame) TileEntity.ByID[key]).DropItem(); + if (Main.netMode == 2) + return; + Main.blockMouse = true; + return; + } + } + WorldGen.destroyObject = true; + for (int i = num11; i < num12; ++i) + { + for (int j = num13; j < num14; ++j) + { + if ((int) Main.tile[i, j].type == (int) type) + WorldGen.KillTile(i, j); + } + } + if (type != (ushort) 395) + Sign.KillSign(x1, y1); + if (type == (ushort) 85) + { + int Type = 321; + if (num10 >= 6 && num10 <= 10) + Type = 3229 + num10 - 6; + else if (num10 >= 1 && num10 <= 5) + Type = 1173 + num10 - 1; + Item.NewItem(x * 16, y * 16, 32, 32, Type); + } + else if (type == (ushort) 395) + { + Item.NewItem(x1 * 16, y1 * 16, 32, 32, 3270); + TEItemFrame.Kill(x1, y1); + } + else if (type == (ushort) 425) + Item.NewItem(x1 * 16, y1 * 16, 32, 32, 3617); + else + Item.NewItem(x * 16, y * 16, 32, 32, 171); + WorldGen.destroyObject = false; + } + else + { + int num17 = 36 * num8; + for (int index5 = 0; index5 < 2; ++index5) + { + for (int index6 = 0; index6 < 2; ++index6) + { + Main.tile[x1 + index5, y1 + index6].active(true); + Main.tile[x1 + index5, y1 + index6].type = type; + Main.tile[x1 + index5, y1 + index6].frameX = (short) (num17 + 18 * index5); + Main.tile[x1 + index5, y1 + index6].frameY = (short) (18 * index6); + } + } + } + } + + 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) + { + 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 <= (byte) 0 || Main.tile[index3 + 1, index4].wall <= (byte) 0 || Main.tile[index3, index4 + 1].wall <= (byte) 0 || Main.tile[index3 + 1, index4 + 1].wall <= (byte) 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 == (byte) 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 == (byte) 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 <= (byte) 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; + default: + 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 == (byte) 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 <= (byte) 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; + 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 == (byte) 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 <= (byte) 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; + 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 == (byte) 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 <= (byte) 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 == (byte) 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 <= (byte) 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) + { + if (num3 == 30) + Item.NewItem(x * 16, y * 16, 32, 32, 2995); + else if (num3 >= 31 && num3 <= 35) + Item.NewItem(x * 16, y * 16, 32, 32, 3055 + num3 - 31); + else if (num3 >= 27 && num3 <= 29) + Item.NewItem(x * 16, y * 16, 32, 32, 2865 + num3 - 27); + else if (num3 == 36) + Item.NewItem(x * 16, y * 16, 32, 32, 3596); + else if (num3 == 26) + Item.NewItem(x * 16, y * 16, 32, 32, 2497); + else if (num3 == 25) + Item.NewItem(x * 16, y * 16, 32, 32, 2495); + else if (num3 >= 22) + Item.NewItem(x * 16, y * 16, 32, 32, 2281 + num3 - 22); + else if (num3 >= 17) + Item.NewItem(x * 16, y * 16, 32, 32, 1846 + num3 - 17); + else if (num3 == 16) + Item.NewItem(x * 16, y * 16, 32, 32, 1573); + else if (num3 >= 13) + Item.NewItem(x * 16, y * 16, 32, 32, 1500 + num3 - 13); + else if (num3 >= 6) + Item.NewItem(x * 16, y * 16, 32, 32, 1433 + num3 - 6); + else + Item.NewItem(x * 16, y * 16, 32, 32, 1421 + num3); + } + WorldGen.destroyObject = false; + } + + 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(2)); + 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.genRand.Next(2)); + 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 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) 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); + } + + public static void GrowAlch(int x, int y) + { + if (!Main.tile[x, y].active()) + return; + if (Main.tile[x, y].type == (ushort) 82 && WorldGen.genRand.Next(50) == 0) + { + bool flag = false; + if (Main.tile[x, y].frameX == (short) 108) + { + if (WorldGen.genRand.Next(3) != 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.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 (WorldGen.genRand.Next(5) != 0 && Main.tile[x, y].type != (ushort) 84) + 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(80) != 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(0, 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) + 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].active()) + 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) 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].liquid > (byte) 0 && !Main.tile[x, y].lava()) + flag = true; + if (Main.tile[x, y].type != (ushort) 82 && Main.tile[x, y].lava() && 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 >= 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 <= (byte) 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; + } + 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; + } + 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]) + flag = true; + if (!Main.tile[i1 + 1, y + 1].active() || !Main.tileTable[(int) Main.tile[i1 + 1, y + 1].type]) + 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].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; + } + } + 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); + Main.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); + Main.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) Main.tile[i, j].frameX / 18 * -1; + if ((type == 79 || type == 90) && Main.tile[i, j].frameX >= (short) 72) + num1 += 4; + int num2 = (int) Main.tile[i, j].frameY / 18; + int num3 = 0; + while (num2 > 1) + { + num2 -= 2; + ++num3; + } + int num4 = j - num2; + for (int i1 = num1; i1 < num1 + 4; ++i1) + { + for (int index = num4; index < num4 + 2; ++index) + { + int num5 = (i1 - num1) * 18; + if ((type == 79 || type == 90) && Main.tile[i, j].frameX >= (short) 72) + num5 = (i1 - num1 + 4) * 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 + num3 * 36) + 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 = num1; i2 < num1 + 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 = num3 != 0 ? (num3 != 4 ? (num3 < 9 || num3 > 12 ? (num3 < 5 || num3 > 8 ? (num3 < 13 || num3 > 18 ? (num3 != 19 ? (num3 != 20 ? (num3 != 21 ? (num3 != 22 ? (num3 != 23 ? (num3 != 24 ? (num3 != 25 ? (num3 != 26 ? (num3 != 27 ? (num3 != 28 ? (num3 != 29 ? (num3 != 30 ? (num3 != 31 ? num3 + 643 : 3897) : 3163) : 3164) : 3162) : 2811) : 2669) : 2568) : 2553) : 2538) : 2520) : 2231) : 2140) : 2139) : 2066 + num3 - 13) : 1465 + num3) : 1710 + num3) : 920) : 224; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + if (type == 90) + { + int Type = 0; + if (num3 == 0) + Type = 336; + else if (num3 >= 1 && num3 <= 10) + Type = 2072 + num3 - 1; + else if (num3 >= 11 && num3 <= 15) + { + Type = 2124 + num3 - 11; + } + else + { + switch (num3) + { + 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; + } + } + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + WorldGen.destroyObject = false; + for (int i3 = num1 - 1; i3 < num1 + 4; ++i3) + { + for (int j2 = num4 - 1; j2 < num4 + 4; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + 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); + } + } + } + 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); + } + } + } + } + + 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; + bool flag1 = type == 376; + bool flag2 = type == 443; + bool flag3 = type == 444; + 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 flag4 = false; + bool flag5 = 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)) + flag4 = 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]) + flag4 = true; + if (tileSafely.halfBrick()) + flag4 = true; + } + } + if (flag2) + { + bool flag6 = true; + bool flag7 = true; + for (int index = 0; index < width; ++index) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j + height), AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide)) + flag7 = false; + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j - 1), AnchorType.SolidBottom)) + flag6 = false; + } + if (!flag6 && !flag7) + flag4 = true; + if (!flag4) + { + int num7 = 0; + if (Main.netMode != 1) + { + if (flag7) + { + 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 flag8 = true; + for (int index = 0; index < width; ++index) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j - 1), AnchorType.SolidTile)) + flag8 = false; + } + if (!flag8) + flag4 = 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) + { + flag4 = true; + flag5 = true; + } + } + } + } + if (!flag4) + 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) + Type = style <= 2 ? 2334 + style : 3203 + style - 3; + if (type == 443) + Type = 3722; + if (type == 444 && Main.netMode != 1 && !flag5) + 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: + 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 < (byte) 1 || Main.tile[i1 + 1, index1].wall < (byte) 1 || Main.tile[i1, index1 + 1].wall < (byte) 1 || Main.tile[i1 + 1, index1 + 1].wall < (byte) 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: + 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] ? 1 : (TileID.Sets.BasicChestFake[(int) type4] ? 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 == 360) + Type = 3072; + 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; + } + } + } + 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 == 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; + } + } + 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); + 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 TileID.Sets.BasicChest[(int) Main.tile[index, num2 - 1].type] || TileID.Sets.BasicChest[(int) Main.tile[index + 1, num2 - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[index, num2 - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[index + 1, num2 - 1].type] || Main.tile[index, num2 - 1].type == (ushort) 88 || Main.tile[index + 1, num2 - 1].type == (ushort) 88; + } + + 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 = 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; + int num6; + switch (num1) + { + case 0: + if (WorldGen.oreTier1 == -1) + { + WorldGen.oreTier1 = 107; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.oreTier1 = 221; + } + int index1 = 12; + if (WorldGen.oreTier1 == 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: + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index1].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.oreTier1; + num5 *= 1.05f; + break; + case 1: + if (WorldGen.oreTier2 == -1) + { + WorldGen.oreTier2 = 108; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.oreTier2 = 222; + } + int index2 = 13; + if (WorldGen.oreTier2 == 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: + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index2].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.oreTier2; + break; + default: + if (WorldGen.oreTier3 == -1) + { + WorldGen.oreTier3 = 111; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.oreTier3 = 223; + } + int index3 = 14; + if (WorldGen.oreTier3 == 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: + NetMessage.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index3].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.oreTier3; + break; + } + 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)) + 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; + 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 num6 = 0; + while (num5 > 2) + { + num5 -= 3; + ++num6; + } + int index2 = i - num5; + int num7 = num6 * 54; + if (type == 14 && num6 == 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 + num7 || (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 >= 361 && type <= 364) + { + if (!WorldGen.SolidTileAllowBottomSlope(i1, j1) && (!Main.tile[i1, j1].nactive() || !Main.tileSolidTop[(int) Main.tile[i1, j1].type] || Main.tile[i1, j1].frameY != (short) 0) && (!Main.tile[i1, j1].active() || !TileID.Sets.Platforms[(int) Main.tile[i1, j1].type])) + flag1 = true; + } + else if (!WorldGen.SolidTileAllowBottomSlope(i1, j1)) + flag1 = true; + } + if (type == 187 && 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].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) + 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 = num6 < 1 || num6 > 3 ? (num6 < 15 || num6 > 20 ? (num6 < 4 || num6 > 7 ? (num6 != 8 ? (num6 != 9 ? (num6 != 10 ? (num6 != 11 ? (num6 != 12 ? (num6 != 13 ? (num6 != 14 ? (num6 != 23 ? (num6 != 21 ? (num6 != 22 ? (num6 != 24 ? (num6 != 25 ? (num6 != 26 ? (num6 != 27 ? (num6 != 28 ? (num6 != 29 ? (num6 != 30 ? (num6 != 31 ? (num6 != 32 ? (num6 != 33 ? (num6 != 34 ? 32 : 3154) : 3155) : 3153) : 2824) : 2743) : 2583) : 677) : 2550) : 2532) : 2259) : 2248) : 1816) : 1794) : 1926) : 1510) : 1460) : 1403) : 1400) : 1397) : 1144) : 917) : 823 + num6) : 1698 + num6) : 637 + num6; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + if (type == 469) + { + int Type = 3920; + 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 = num6 < 1 || num6 > 3 ? (num6 != 4 ? (num6 < 5 || num6 > 7 ? (num6 < 8 || num6 > 10 ? (num6 < 11 || num6 > 20 ? (num6 != 21 ? (num6 != 22 ? (num6 != 23 ? (num6 != 24 ? (num6 != 25 ? (num6 != 26 ? (num6 != 27 ? (num6 != 28 ? (num6 != 29 ? (num6 != 30 ? (num6 != 31 ? 333 : 3916) : 3915) : 3142) : 3143) : 3141) : 2821) : 2671) : 2580) : 2565) : 2548) : 2531) : 2376 + num6 - 11) : 2254 + num6 - 8) : 2245 + num6 - 5) : 919) : 640 + num6; + Item.NewItem(i * 16, j * 16, 32, 32, Type1); + break; + case 88: + int Type2 = num6 < 1 || num6 > 3 ? (num6 != 4 ? (num6 < 5 || num6 > 15 ? (num6 != 16 ? (num6 != 17 ? (num6 != 18 ? (num6 != 19 ? (num6 != 20 ? (num6 != 21 ? (num6 != 22 ? (num6 != 23 ? (num6 != 24 ? (num6 != 25 ? (num6 != 26 ? (num6 != 27 ? (num6 != 28 ? (num6 != 29 ? (num6 != 30 ? (num6 != 31 ? 334 : 3914) : 3913) : 3912) : 3911) : 3133) : 3134) : 3132) : 2816) : 2640) : 2639) : 2638) : 2637) : 2577) : 2562) : 2545) : 2529) : 2386 + num6 - 5) : 918) : 646 + num6; + Item.NewItem(i * 16, j * 16, 32, 32, Type2); + break; + case 89: + int Type3 = num6 < 1 || num6 > 20 ? (num6 != 21 ? (num6 != 22 ? (num6 != 23 ? (num6 != 24 ? (num6 != 25 ? (num6 != 26 ? (num6 != 27 ? (num6 != 28 ? (num6 != 29 ? (num6 != 30 ? (num6 != 31 ? (num6 != 32 ? (num6 != 33 ? (num6 != 34 ? 335 : 3919) : 3918) : 3151) : 3152) : 3150) : 2823) : 2636) : 2635) : 2634) : 2582) : 858) : 2539) : 2527) : 2521) : 2397 + num6 - 1; + Item.NewItem(i * 16, j * 16, 32, 32, Type3); + 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 (num6) + { + 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; + default: + Item.NewItem(i * 16, j * 16, 32, 32, 3046 + num6 - 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; + default: + if (type == 187 && frameX >= 918 && frameX <= 970) + { + if (Main.rand.Next(10) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 3368); + 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); + } + } + + 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; + for (num4 = (int) Main.tile[i, j].frameX / 18; num4 >= 3; num4 -= 3) + ++num3; + int num5 = num1 - num4; + int num6 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + for (int i1 = num5; i1 < num5 + 3; ++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 * 54 + (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 + 3; ++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); + } + } + switch (type) + { + case 101: + int Type = 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 ? 354 : 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, Type); + 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; + } + WorldGen.destroyObject = false; + for (int i3 = num5 - 1; i3 < num5 + 4; ++i3) + { + for (int j2 = num6 - 1; j2 < num6 + 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); + 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; + if (ammo == 5) + num4 = 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 num5 = num2; + float num6 = num3; + float num7 = (float) Math.Sqrt((double) num5 * (double) num5 + (double) num6 * (double) num6); + if (ammo == 4 || ammo == 5) + { + if (angle == 4) + vector2.X += 5f; + vector2.Y += 5f; + } + float num8 = num1 / num7; + float SpeedX = num5 * num8; + float SpeedY = num6 * num8; + 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; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, KnockBack, owner, (float) num4); + } + } + + 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() && 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; + } + } + } + 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 >= 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 < (byte) 1 || Main.tile[x, y - 1].wall < (byte) 1 || Main.tile[x - 1, y].wall < (byte) 1 || Main.tile[x - 1, y].wall < (byte) 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 >= 470 || !TileObject.CanPlace(x, y, type, style, direction, out objectData)) + return false; + objectData.random = random; + if (TileObject.Place(objectData) && !mute) + { + WorldGen.SquareTileFrame(x, y); + Main.PlaySound(0, x * 16, y * 16); + } + return false; + } + + 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; + Main.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; + Main.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); + } + Main.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; + } + Main.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) + { + 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 (!Collision.EmptyTile(x, y + index4, true)) + return false; + } + Main.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) + { + 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 (!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) 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 == (byte) 0 || Main.wallHouse[(int) Main.tile[x, y].wall] || Main.tile[x - 1, y].wall == (byte) 0 || Main.wallHouse[(int) Main.tile[x - 1, y].wall] || Main.tile[x + 1, y].wall == (byte) 0 || Main.wallHouse[(int) Main.tile[x + 1, y].wall] || Main.tile[x, y - 1].wall == (byte) 0 || Main.wallHouse[(int) Main.tile[x, y - 1].wall] || Main.tile[x, y + 1].wall == (byte) 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; + } + 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) 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 * 108; + 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 ? 106 : 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 == 406 || type == 412 || type == 452 || type == 455) + { + 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; + } + } + } + NPC.SpawnOnPlayer(plr, 222); + 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; + } + 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 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 > (byte) 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) 109) + 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 PlaceDye(int x, int y, int style) + { + bool flag = false; + 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 == (byte) 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 (WorldGen.genRand.Next(2) == 0) + WorldGen.spawnMeteor = true; + 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) + { + 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: + NetMessage.BroadcastChatMessage(NetworkText.FromKey(localizedText.Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + AchievementsHelper.NotifyProgressionEvent(7); + break; + } + } + if (flag) + Main.PlaySound(4, i * 16, j * 16); + else + Main.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 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 == 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 != 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 <= 470 && wall <= 231) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 69) + { + Main.tile[index1, index2].wall = (byte) 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 = (byte) 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 = (byte) 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 = (byte) 220; + 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 <= 470 && wall <= 231) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 70) + { + Main.tile[index1, index2].wall = (byte) 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 = (byte) 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 = (byte) 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 = (byte) 222; + 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.Grass[type] && type != 109) + { + 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 (Main.tile[index1, index2].wall == (byte) 64 || Main.tile[index1, index2].wall == (byte) 15) + { + Main.tile[index1, index2].wall = (byte) 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 <= 470 && wall <= 231) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 81) + { + Main.tile[index1, index2].wall = (byte) 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 = (byte) 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 = (byte) 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 = (byte) 221; + 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 == (byte) 69 || Main.tile[index1, index2].wall == (byte) 70 || Main.tile[index1, index2].wall == (byte) 81) + { + Main.tile[index1, index2].wall = (double) index2 >= Main.worldSurface ? (byte) 64 : (WorldGen.genRand.Next(10) != 0 ? (byte) 63 : (byte) 65); + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (Main.tile[index1, index2].wall == (byte) 3 || Main.tile[index1, index2].wall == (byte) 28 || Main.tile[index1, index2].wall == (byte) 83) + { + Main.tile[index1, index2].wall = (byte) 1; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (Main.tile[index1, index2].wall == (byte) 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 = (byte) 15; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + else + { + Main.tile[index1, index2].wall = (byte) 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 = (byte) 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 = (byte) 187; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if (Main.tile[index1, index2].type == (ushort) 23 || Main.tile[index1, index2].type == (ushort) 109 || Main.tile[index1, index2].type == (ushort) 199) + { + Main.tile[index1, index2].type = (ushort) 2; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 117 || Main.tile[index1, index2].type == (ushort) 25 || Main.tile[index1, index2].type == (ushort) 203) + { + Main.tile[index1, index2].type = (ushort) 1; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 112 || Main.tile[index1, index2].type == (ushort) 116 || Main.tile[index1, index2].type == (ushort) 234) + { + Main.tile[index1, index2].type = (ushort) 53; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 398 || Main.tile[index1, index2].type == (ushort) 402 || Main.tile[index1, index2].type == (ushort) 399) + { + Main.tile[index1, index2].type = (ushort) 397; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 400 || Main.tile[index1, index2].type == (ushort) 403 || Main.tile[index1, index2].type == (ushort) 401) + { + Main.tile[index1, index2].type = (ushort) 396; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 164 || Main.tile[index1, index2].type == (ushort) 163 || Main.tile[index1, index2].type == (ushort) 200) + { + 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; + 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() || 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; + 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 num1 = 0; + int num2 = 0; + for (int index2 = i - 6; index2 <= i + 6; ++index2) + { + for (int index3 = j - 3; index3 <= j + 1; ++index3) + { + try + { + if (Main.tile[index2, index3].active()) + { + if (Main.tile[index2, index3].type == (ushort) 80) + { + ++num1; + if (num1 >= 4) + return; + } + if (Main.tile[index2, index3].type != (ushort) 53 && Main.tile[index2, index3].type != (ushort) 112 && Main.tile[index2, index3].type != (ushort) 116) + { + if (Main.tile[index2, index3].type != (ushort) 234) + continue; + } + ++num2; + } + } + catch + { + } + } + } + if (num2 <= 10) + return; + 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 num3 = index1 - 1 - j; + int num4 = i - i1; + int num5 = i - num4; + int num6 = j; + int num7 = 11 - num3; + int num8 = 0; + for (int index4 = num5 - 2; index4 <= num5 + 2; ++index4) + { + for (int index5 = num6 - num7; index5 <= num6 + num3; ++index5) + { + if (Main.tile[index4, index5].active() && Main.tile[index4, index5].type == (ushort) 80) + ++num8; + } + } + if (num8 >= WorldGen.genRand.Next(11, 13)) + return; + int index6 = i; + int index7 = j; + if (num4 == 0) + { + if (num3 == 0) + { + if (Main.tile[index6, index7 - 1].active()) + return; + Main.tile[index6, index7 - 1].active(true); + Main.tile[index6, index7 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index6, index7 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index6, index7 - 1, 1); + } + else + { + bool flag1 = false; + bool flag2 = false; + if (Main.tile[index6, index7 - 1].active() && Main.tile[index6, index7 - 1].type == (ushort) 80) + { + if (!Main.tile[index6 - 1, index7].active() && !Main.tile[index6 - 2, index7 + 1].active() && !Main.tile[index6 - 1, index7 - 1].active() && !Main.tile[index6 - 1, index7 + 1].active() && !Main.tile[index6 - 2, index7].active()) + flag1 = true; + if (!Main.tile[index6 + 1, index7].active() && !Main.tile[index6 + 2, index7 + 1].active() && !Main.tile[index6 + 1, index7 - 1].active() && !Main.tile[index6 + 1, index7 + 1].active() && !Main.tile[index6 + 2, index7].active()) + flag2 = true; + } + int num9 = WorldGen.genRand.Next(3); + if (num9 == 0 & flag1) + { + Main.tile[index6 - 1, index7].active(true); + Main.tile[index6 - 1, index7].type = (ushort) 80; + WorldGen.SquareTileFrame(index6 - 1, index7); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index6 - 1, index7, 1); + } + else if (num9 == 1 & flag2) + { + Main.tile[index6 + 1, index7].active(true); + Main.tile[index6 + 1, index7].type = (ushort) 80; + WorldGen.SquareTileFrame(index6 + 1, index7); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index6 + 1, index7, 1); + } + else + { + if (num3 >= WorldGen.genRand.Next(2, 8)) + return; + if (Main.tile[index6 - 1, index7 - 1].active()) + { + int type = (int) Main.tile[index6 - 1, index7 - 1].type; + } + if (Main.tile[index6 + 1, index7 - 1].active() && Main.tile[index6 + 1, index7 - 1].type == (ushort) 80 || Main.tile[index6, index7 - 1].active()) + return; + Main.tile[index6, index7 - 1].active(true); + Main.tile[index6, index7 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index6, index7 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index6, index7 - 1, 1); + } + } + } + else + { + if (Main.tile[index6, index7 - 1].active() || Main.tile[index6, index7 - 2].active() || Main.tile[index6 + num4, index7 - 1].active() || !Main.tile[index6 - num4, index7 - 1].active() || Main.tile[index6 - num4, index7 - 1].type != (ushort) 80) + return; + Main.tile[index6, index7 - 1].active(true); + Main.tile[index6, index7 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index6, index7 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index6, index7 - 1, 1); + } + } + } + + public static void CheckPot(int i, int j, int type = 28) + { + if (WorldGen.destroyObject) + return; + bool flag = 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) + flag = true; + } + if (Main.tile[i1, num7 + 2] == null) + Main.tile[i1, num7 + 2] = new Tile(); + if (!WorldGen.SolidTile2(i1, num7 + 2)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + if (num6 >= 7 && num6 <= 9) + Main.PlaySound(6, i * 16, j * 16); + else if (num6 >= 16 && num6 <= 24) + Main.PlaySound(4, i * 16, j * 16); + else + Main.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; + 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; + } + break; + } + float num11 = (float) (((double) num9 * 2.0 + 1.0) / 3.0); + int maxValue = (int) (250.0 / (((double) num11 + 1.0) / 2.0)); + if (!WorldGen.gen) + { + if (Main.rand.Next(maxValue) == 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(40) == 0 && Main.wallDungeon[(int) Main.tile[i, j].wall] && (double) j > Main.worldSurface) + Item.NewItem(i * 16, j * 16, 16, 16, 327); + 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); + } + 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 >= 9) + Item.NewItem(i * 16, j * 16, 16, 16, 2350); + } + else if (j < Main.maxTilesY - 200) + { + 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 == 14) + Item.NewItem(i * 16, j * 16, 16, 16, 2350); + } + 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); + } + } + 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(8); + if (Main.expertMode) + --num16; + if (num16 == 0 && Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].statLife < Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].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 if (num16 == 1 && Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].statMana < Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].statManaMax2) + { + Item.NewItem(i * 16, j * 16, 16, 16, 184); + } + else + { + switch (num16) + { + case 2: + int Stack1 = Main.rand.Next(2, 6); + if (Main.expertMode) + Stack1 += Main.rand.Next(1, 7); + if (Main.tile[i, j].liquid > (byte) 0) + { + Item.NewItem(i * 16, j * 16, 16, 16, 282, Stack1); + break; + } + Item.NewItem(i * 16, j * 16, 16, 16, 8, Stack1); + break; + case 3: + int Stack2 = Main.rand.Next(10, 21); + int Type1 = 40; + if ((double) j < Main.rockLayer && WorldGen.genRand.Next(2) == 0) + Type1 = !Main.hardMode ? 42 : 168; + if (j > Main.maxTilesY - 200) + Type1 = 265; + else if (Main.hardMode) + Type1 = Main.rand.Next(2) != 0 ? 47 : 278; + Item.NewItem(i * 16, j * 16, 16, 16, Type1, Stack2); + break; + case 4: + int Type2 = 28; + if (j > Main.maxTilesY - 200 || Main.hardMode) + Type2 = 188; + int Stack3 = 1; + if (Main.expertMode && Main.rand.Next(3) != 0) + ++Stack3; + Item.NewItem(i * 16, j * 16, 16, 16, Type2, Stack3); + break; + default: + if (num16 == 5 && (double) j > Main.rockLayer) + { + int Stack4 = Main.rand.Next(4) + 1; + if (Main.expertMode) + Stack4 += Main.rand.Next(4); + Item.NewItem(i * 16, j * 16, 16, 16, 166, Stack4); + break; + } + if ((num16 == 5 || num16 == 6) && j < Main.maxTilesY - 200 && !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; + 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 num4 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + while (num3 > 1) + num3 -= 2; + int i1 = num3 * -1 + i; + for (int index1 = i1; index1 < i1 + 2; ++index1) + { + for (int index2 = num4; index2 < num4 + 2; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + int num5 = (int) Main.tile[index1, index2].frameX / 18; + while (num5 > 1) + num5 -= 2; + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || num5 != index1 - i1 || (int) Main.tile[index1, index2].frameY != (index2 - num4) * 18) + flag = true; + } + if (Main.tile[index1, num4 + 2] == null) + Main.tile[index1, num4 + 2] = new Tile(); + if (!Main.tile[index1, num4 + 2].active() || !Main.tileSolid[(int) Main.tile[index1, num4 + 2].type]) + flag = true; + } + if (!flag) + return; + int index3 = (int) Main.tile[i, j].frameX / 36; + int Type = type != 467 ? Chest.chestItemSpawn[index3] : Chest.chestItemSpawn2[index3]; + WorldGen.destroyObject = true; + for (int index4 = i1; index4 < i1 + 2; ++index4) + { + for (int index5 = num4; index5 < num4 + 3; ++index5) + { + if ((int) Main.tile[index4, index5].type == type && Main.tile[index4, index5].active()) + { + Chest.DestroyChest(index4, index5); + WorldGen.KillTile(index4, index5); + } + } + } + Item.NewItem(i * 16, j * 16, 32, 32, Type); + WorldGen.destroyObject = false; + if (Main.tile[i1, num4 + 2].type != (ushort) 138 && Main.tile[i1 + 1, num4 + 2].type != (ushort) 138) + return; + WorldGen.SquareTileFrame(i1, num4 + 2); + } + + public static bool PlaceActuator(int i, int j) + { + if (Main.tile[i, j].actuator()) + return false; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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; + Main.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 PlaceTile( + int i, + int j, + int type, + bool mute = false, + bool forced = false, + int plr = -1, + int style = 0) + { + if (type >= 470) + 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[type] || type == 23 && trackCache.type == (ushort) 0 && trackCache.active() || type == 199 && trackCache.type == (ushort) 0 && trackCache.active() || type == 2 && trackCache.type == (ushort) 0 && trackCache.active() || type == 109 && trackCache.type == (ushort) 0 && trackCache.active() || type == 60 && trackCache.type == (ushort) 59 && trackCache.active() || type == 70 && trackCache.type == (ushort) 59 && trackCache.active()) + { + if (type == 23 && (trackCache.type != (ushort) 0 || !trackCache.active()) || type == 2 && (trackCache.type != (ushort) 0 || !trackCache.active()) || type == 109 && (trackCache.type != (ushort) 0 || !trackCache.active()) || type == 60 && (trackCache.type != (ushort) 59 || !trackCache.active())) + return false; + if (type == 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 ((type == 373 || type == 375 || type == 374 || type == 461) && (Main.tile[i, j - 1] == null || Main.tile[i, j - 1].bottomSlope())) + return false; + if (trackCache.liquid > (byte) 0) + { + if (type == 4) + { + if (style != 8 && style != 11) + return false; + } + else if (type == 3 || type == 20 || type == 24 || type == 27 || type == 32 || type == 51 || type == 69 || type == 72 || type == 201 || type == 352) + return false; + } + if (type != 2 || Main.tile[i, j].type != (ushort) 0) + { + trackCache.halfBrick(false); + trackCache.frameY = (short) 0; + trackCache.frameX = (short) 0; + } + if (type == 3 || type == 24 || type == 110 || type == 201) + { + 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) 2 && type == 3 || Main.tile[i, j + 1].type == (ushort) 23 && type == 24 || Main.tile[i, j + 1].type == (ushort) 199 && type == 201 || (Main.tile[i, j + 1].type == (ushort) 78 || Main.tile[i, j + 1].type == (ushort) 380) && type == 3 || Main.tile[i, j + 1].type == (ushort) 109 && type == 110)) + { + if (type == 24 && WorldGen.genRand.Next(13) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) 32; + WorldGen.SquareTileFrame(i, j); + } + else if (type == 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) + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = (short) (WorldGen.genRand.Next(2) * 18 + 108); + } + else if ((trackCache.wall == (byte) 0 || trackCache.wall == (byte) 106 || trackCache.wall == (byte) 107 || trackCache.wall >= (byte) 63 && trackCache.wall <= (byte) 70) && (Main.tile[i, j + 1].wall == (byte) 0 || Main.tile[i, j + 1].wall == (byte) 106 || Main.tile[i, j + 1].wall == (byte) 107 || Main.tile[i, j + 1].wall >= (byte) 63 && Main.tile[i, j + 1].wall <= (byte) 70)) + { + if (type == 3 && WorldGen.genRand.Next(35) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = (short) (WorldGen.genRand.Next(2) * 18 + 162); + } + else if (WorldGen.genRand.Next(50) == 0 || (type == 24 || type == 201) && WorldGen.genRand.Next(40) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = type != 201 ? (short) 144 : (short) 270; + } + else if (WorldGen.genRand.Next(35) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = (short) (WorldGen.genRand.Next(2) * 18 + 108); + } + else + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = (short) (WorldGen.genRand.Next(6) * 18); + } + } + } + } + else + { + switch (type) + { + 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) type; + trackCache.frameX = (short) 144; + break; + } + if (WorldGen.genRand.Next(300) == 0 && (double) j > Main.rockLayer) + { + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameX = (short) 162; + break; + } + if (WorldGen.genRand.Next(15) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + 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) type; + 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) + { + trackCache.active(true); + trackCache.type = (ushort) type; + 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) type; + trackCache.frameX = (short) (WorldGen.genRand.Next(18) * 18); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 171: + WorldGen.PlaceXmasTree(i, j); + break; + case 178: + 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) type; + 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) type; + 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) type, style); + break; + case 335: + WorldGen.Place2x2(i, j, (ushort) type, 0); + break; + default: + if (type == 319 || type == 132 || type == 138 || type == 142 || type == 143 || type == 282 || type >= 288 && type <= 295 || type >= 316 && type <= 318) + { + WorldGen.Place2x2(i, j, (ushort) type, 0); + break; + } + switch (type) + { + 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 > (byte) 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] || tile1.type == (ushort) 124 || tile1.type == (ushort) 5 && Main.tile[i - 1, j - 1].type == (ushort) 5 && Main.tile[i - 1, j + 1].type == (ushort) 5) || 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] || tile2.type == (ushort) 124 || tile2.type == (ushort) 5 && Main.tile[i + 1, j - 1].type == (ushort) 5 && Main.tile[i + 1, j + 1].type == (ushort) 5) || tile3.active() && Main.tileSolid[(int) tile3.type] && (!Main.tileSolidTop[(int) tile3.type] || TileID.Sets.Platforms[(int) tile3.type] && tile3.slope() == (byte) 0) && !TileID.Sets.NotReallySolid[(int) tile3.type] && !tile3.halfBrick() && tile3.slope() == (byte) 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + 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, type, 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, type, 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) || Main.tile[i - 1, j].type == (ushort) 124 || 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) || Main.tile[i + 1, j].type == (ushort) 124 || 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 > (byte) 0) + { + trackCache.active(true); + trackCache.type = (ushort) type; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 137: + trackCache.active(true); + trackCache.type = (ushort) type; + trackCache.frameY = (short) (18 * style); + break; + case 411: + WorldGen.Place2x2(i, j, (ushort) type, 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) || Main.tile[i - 1, j].type == (ushort) 124 || 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) || Main.tile[i + 1, j].type == (ushort) 124 || 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) type; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 457: + WorldGen.Place2x2Horizontal(i, j, (ushort) 457, style); + break; + default: + if (type >= 275 && type <= 281 || type == 296 || type == 297 || type == 309 || type == 358 || type == 359 || type == 413 || type == 414) + { + WorldGen.Place6x3(i, j, (ushort) type); + break; + } + if (type == 237 || type == 244 || type == 285 || type == 286 || type == 298 || type == 299 || type == 310 || type == 339 || type >= 361 && type <= 364) + { + WorldGen.Place3x2(i, j, (ushort) type); + break; + } + switch (type) + { + 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) type; + 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 (type == 139 || type == 35) + { + WorldGen.PlaceMB(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (type) + { + case 34: + WorldGen.PlaceChand(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 165: + WorldGen.PlaceTight(i, j, (ushort) type); + WorldGen.SquareTileFrame(i, j); + break; + case 235: + WorldGen.Place3x1(i, j, (ushort) type); + WorldGen.SquareTileFrame(i, j); + break; + case 240: + WorldGen.Place3x3Wall(i, j, (ushort) type, style); + break; + case 241: + WorldGen.Place4x3Wall(i, j, (ushort) type, style); + break; + case 242: + WorldGen.Place6x4Wall(i, j, (ushort) type, style); + break; + case 245: + WorldGen.Place2x3Wall(i, j, (ushort) type, style); + break; + case 246: + WorldGen.Place3x2Wall(i, j, (ushort) type, style); + break; + case 440: + WorldGen.Place3x3Wall(i, j, (ushort) type, style); + break; + default: + 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) + { + WorldGen.Place3x3(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 13 || type == 33 || type == 49 || type == 50 || type == 78 || type == 174 || type == 372) + { + WorldGen.PlaceOnTable1x1(i, j, type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 14 || type == 26 || type == 86 || type == 87 || type == 88 || type == 89 || type == 114 || type == 186 || type == 187 || type == 215 || type == 217 || type == 218 || type == 377) + { + WorldGen.Place3x2(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (type) + { + case 20: + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + int type1 = (int) Main.tile[i, j + 1].type; + if (Main.tile[i, j + 1].active() && (type1 == 2 || type1 == 109 || type1 == 147 || type1 == 60 || type1 == 23 || type1 == 199 || type1 == 53 || type1 == 234 || type1 == 116 || type1 == 112)) + { + WorldGen.Place1x2(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 236: + WorldGen.PlaceJunglePlant(i, j, (ushort) type, WorldGen.genRand.Next(3), 0); + WorldGen.SquareTileFrame(i, j); + break; + case 238: + WorldGen.PlaceJunglePlant(i, j, (ushort) type, 0, 0); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (type == 15 || type == 216 || type == 338 || type == 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) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 227) + { + WorldGen.PlaceDye(i, j, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 16 || type == 18 || type == 29 || type == 103 || type == 134 || type == 462) + { + WorldGen.Place2x1(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 92 || type == 93 || type == 453) + { + WorldGen.Place1xX(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 104 || type == 105 || type == 320 || type == 337 || type == 349 || type == 356 || type == 378 || type == 456) + { + WorldGen.Place2xX(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (type == 17 || type == 77 || type == 133) + { + WorldGen.Place3x2(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (type) + { + case 207: + WorldGen.Place2xX(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 410: + WorldGen.Place2xX(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 465: + WorldGen.Place2xX(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (TileID.Sets.BasicChest[type]) + { + WorldGen.PlaceChest(i, j, (ushort) type, style: style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (type) + { + 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: + WorldGen.Place1x1(i, j, type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 42: + case 270: + case 271: + WorldGen.Place1x2Top(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 55: + case 425: + WorldGen.PlaceSign(i, j, (ushort) type, style); + break; + case 85: + case 376: + WorldGen.Place2x2Horizontal(i, j, (ushort) type, style); + break; + case 91: + WorldGen.PlaceBanner(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 101: + case 102: + case 463: + WorldGen.Place3x4(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 419: + case 420: + case 423: + case 424: + case 429: + case 445: + WorldGen.PlaceLogicTiles(i, j, type, style); + WorldGen.SquareTileFrame(i, j); + break; + case 464: + case 466: + WorldGen.Place5x4(i, j, (ushort) type, style); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (Main.tileAlch[type]) + { + WorldGen.PlaceAlch(i, j, style); + break; + } + switch (type) + { + case 19: + trackCache.frameY = (short) (18 * style); + trackCache.active(true); + trackCache.type = (ushort) type; + break; + case 79: + case 90: + int direction = 1; + if (plr > -1) + direction = Main.player[plr].direction; + WorldGen.Place4x2(i, j, (ushort) type, direction, style); + break; + case 81: + trackCache.frameX = (short) (26 * WorldGen.genRand.Next(6)); + trackCache.active(true); + trackCache.type = (ushort) type; + 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) type, style); + break; + case 96: + WorldGen.Place2x2Style(i, j, (ushort) type, style); + break; + case 209: + WorldGen.PlaceCannon(i, j, (ushort) type, style); + break; + case 314: + Minecart.PlaceTrack(trackCache, style); + break; + case 380: + trackCache.frameY = (short) (18 * style); + trackCache.active(true); + trackCache.type = (ushort) type; + break; + default: + trackCache.active(true); + trackCache.type = (ushort) type; + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + } + if (trackCache.active()) + { + if (trackCache.type == (ushort) 54) + WorldGen.SquareWallFrame(i, j); + WorldGen.SquareTileFrame(i, j); + flag = true; + if (!mute) + { + switch (type) + { + case (int) sbyte.MaxValue: + Main.PlaySound(SoundID.Item30, i * 16, j * 16); + break; + case 314: + Main.PlaySound(SoundID.Item52, i * 16, j * 16); + break; + case 330: + case 331: + case 332: + case 333: + Main.PlaySound(18, i * 16, j * 16); + break; + default: + Main.PlaySound(0, i * 16, j * 16); + break; + } + if (type == 22 || type == 140) + { + for (int index = 0; index < 3; ++index) + 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 tile = Main.tile[i, j]; + if (tile == null) + { + tile = new Tile(); + Main.tile[i, j] = tile; + } + if (tile.wall <= (byte) 0) + return; + if (Main.wallDungeon[(int) tile.wall] && !NPC.downedBoss3) + fail = true; + if (tile.wall == (byte) 87 && !NPC.downedGolemBoss) + fail = true; + if (tile.wall == (byte) 21 || tile.wall == (byte) 186 || tile.wall == (byte) 136 || tile.wall == (byte) 137 || tile.wall == (byte) 168 || tile.wall == (byte) 169 || tile.wall == (byte) 172 || tile.wall == (byte) 226 || tile.wall == (byte) 227) + Main.PlaySound(13, i * 16, j * 16); + else if (tile.wall >= (byte) 63 && tile.wall <= (byte) 70) + Main.PlaySound(6, i * 16, j * 16); + else + Main.PlaySound(0, i * 16, j * 16); + int num = 10; + if (fail) + num = 3; + for (int index1 = 0; index1 < num; ++index1) + { + int Type = 0; + if (tile.wall == (byte) 148) + Type = -1; + if (tile.wall == (byte) 1 || tile.wall == (byte) 5 || tile.wall == (byte) 6 || tile.wall == (byte) 7 || tile.wall == (byte) 107 || tile.wall == (byte) 8 || tile.wall == (byte) 9 || tile.wall >= (byte) 48 && tile.wall <= (byte) 53 || tile.wall >= (byte) 54 && tile.wall <= (byte) 58 || tile.wall == (byte) 185) + Type = 1; + if (tile.wall >= (byte) 94 && tile.wall <= (byte) 105) + Type = 1; + if (tile.wall == (byte) 3) + Type = WorldGen.genRand.Next(2) != 0 ? 1 : 14; + if (tile.wall == (byte) 35) + Type = 37; + if (tile.wall == (byte) 4 || tile.wall == (byte) 106) + Type = 7; + if (tile.wall == (byte) 12) + Type = 9; + if (tile.wall == (byte) 10) + Type = 10; + if (tile.wall == (byte) 11) + Type = 11; + if (tile.wall == (byte) 21) + Type = 13; + if (tile.wall == (byte) 34) + Type = 32; + if (tile.wall == (byte) 225) + Type = 1; + if (tile.wall == (byte) 145) + Type = 8; + if (tile.wall == (byte) 22 || tile.wall == (byte) 28) + Type = 51; + if (tile.wall == (byte) 23) + Type = 38; + if (tile.wall == (byte) 24) + Type = 36; + if (tile.wall == (byte) 25) + Type = 48; + if (tile.wall == (byte) 179 || tile.wall == (byte) 178 || tile.wall == (byte) 183) + Type = 236; + if (tile.wall == (byte) 181 || tile.wall == (byte) 180 || tile.wall == (byte) 184) + Type = 240; + if (tile.wall == (byte) 113) + Type = 189; + if (tile.wall == (byte) 114) + Type = 190; + if (tile.wall == (byte) 115) + Type = 191; + if (tile.wall == (byte) 177 || tile.wall == (byte) 13) + Type = 25; + if (tile.wall == (byte) 186) + Type = WorldGen.genRand.Next(68, 71); + if (tile.wall == (byte) 142) + Type = 210; + if (tile.wall == (byte) 143) + Type = 210; + if (tile.wall == (byte) 224) + Type = 265; + if (tile.wall == (byte) 173) + Type = 128; + if (tile.wall == (byte) 174) + Type = 117; + if (tile.wall == (byte) 175) + Type = 42; + if (tile.wall == (byte) 176) + Type = 226; + if (tile.wall == (byte) 182) + Type = WorldGen.genRand.Next(2) != 0 ? 23 : 6; + if (tile.wall >= (byte) 153 && tile.wall <= (byte) 166) + { + switch (tile.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 (tile.wall == (byte) 26 || tile.wall == (byte) 30) + Type = 49; + if (tile.wall == (byte) 29 || tile.wall == (byte) 32) + Type = 50; + if (tile.wall == (byte) 31) + Type = 51; + if (tile.wall == (byte) 14 || tile.wall == (byte) 20) + Type = 109; + if (tile.wall >= (byte) 88 && tile.wall <= (byte) 93) + { + Type = 86 + (int) tile.wall - 88; + if (tile.wall == (byte) 93) + Type = WorldGen.genRand.Next(88, 94); + } + if (tile.wall == (byte) 33) + Type = 14; + if (tile.wall == (byte) 41) + Type = 77; + if (tile.wall == (byte) 42) + Type = 78; + if (tile.wall == (byte) 43) + Type = 78; + if (tile.wall == (byte) 43) + Type = 78; + if (tile.wall == (byte) 36) + Type = 26; + if (tile.wall == (byte) 37) + Type = 32; + if (tile.wall == (byte) 38) + Type = 2; + if (tile.wall == (byte) 39) + Type = 1; + if (tile.wall == (byte) 40) + Type = 51; + if (tile.wall == (byte) 45) + Type = 81; + if (tile.wall == (byte) 46) + Type = 83; + if (tile.wall == (byte) 47) + Type = 84; + if (tile.wall == (byte) 85) + Type = 126; + if (tile.wall == (byte) 59) + Type = 0; + if (tile.wall == (byte) 61) + Type = 0; + if (tile.wall == (byte) 62) + Type = 0; + if (tile.wall == (byte) 63) + Type = 3; + if (tile.wall == (byte) 65) + Type = 3; + if (tile.wall == (byte) 66) + Type = 3; + if (tile.wall == (byte) 68) + Type = 3; + if (tile.wall == (byte) 64) + Type = 40; + if (tile.wall == (byte) 67) + Type = 40; + if (tile.wall == (byte) 84) + Type = 80; + if (tile.wall == (byte) 71) + Type = 80; + if (tile.wall == (byte) 60) + Type = 3; + if (tile.wall == (byte) 71) + Type = 80; + if (tile.wall == (byte) 167) + Type = 81; + if (tile.wall == (byte) 147) + Type = 51; + if (tile.wall == (byte) 146) + Type = 9; + if (tile.wall == (byte) 109) + Type = 144; + if (tile.wall == (byte) 110) + Type = 145; + if (tile.wall == (byte) 111) + Type = 146; + if (tile.wall == (byte) 86 || tile.wall == (byte) 108) + Type = 147; + if (tile.wall == (byte) 87) + Type = 148; + if (tile.wall == (byte) 83) + { + Type = 117; + if (WorldGen.genRand.Next(2) == 0) + Type = 1; + } + if (tile.wall == (byte) 81) + Type = 123; + if (tile.wall == (byte) 136) + Type = 13; + if (tile.wall == (byte) 137) + Type = 13; + if (tile.wall == (byte) 168) + Type = 13; + if (tile.wall == (byte) 169) + Type = 13; + if (tile.wall == (byte) 172) + Type = 13; + if (tile.wall == (byte) 226) + Type = 13; + if (tile.wall == (byte) 227) + Type = 13; + if (tile.wall == (byte) 72) + Type = 40; + if (tile.wall == (byte) 73) + Type = 16; + if (tile.wall == (byte) 74 || tile.wall == (byte) 80) + Type = 26; + if (tile.wall == (byte) 144) + Type = WorldGen.genRand.Next(2) != 0 ? 118 : 10; + if (tile.wall == (byte) 75) + Type = 26; + if (tile.wall == (byte) 76) + Type = 4; + if (tile.wall == (byte) 77 || tile.wall == (byte) 81) + Type = 5; + if (tile.wall == (byte) 78) + Type = 7; + if (tile.wall == (byte) 79) + Type = 37; + if (tile.wall == (byte) 82) + Type = 36; + if (tile.wall == (byte) 69) + Type = WorldGen.genRand.Next(2) != 0 ? 17 : 14; + if (tile.wall == (byte) 70) + Type = 47; + if (tile.wall == (byte) 27) + Type = WorldGen.genRand.Next(2) != 0 ? 1 : 7; + if (tile.wall == (byte) 138) + Type = 77; + if (tile.wall == (byte) 139) + Type = 78; + if (tile.wall == (byte) 140) + Type = 79; + if (tile.wall == (byte) 141) + Type = 126; + if (tile.wall == (byte) 149 || tile.wall == (byte) 150) + Type = 214; + if (tile.wall == (byte) 151 || tile.wall == (byte) 152) + Type = 215; + else if (tile.wall == (byte) 17 || tile.wall == (byte) 18 || tile.wall == (byte) 19) + Type = 1; + if (tile.wall == (byte) 44) + { + int index2 = 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[index2].noGravity = true; + } + else if ((tile.wall < (byte) 133 || tile.wall > (byte) 135) && (tile.wall < (byte) 116 || tile.wall > (byte) 125) && (tile.wall < (byte) 126 || tile.wall > (byte) 132)) + { + if (tile.wall == (byte) 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) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type); + } + } + if (fail) + { + WorldGen.SquareWallFrame(i, j); + } + else + { + int Type = 0; + if (tile.wall == (byte) 168) + Type = 2696; + if (tile.wall == (byte) 169) + Type = 2698; + if (tile.wall == (byte) 226) + Type = 3752; + if (tile.wall == (byte) 227) + Type = 3753; + if (tile.wall == (byte) 228) + Type = 3760; + if (tile.wall == (byte) 229) + Type = 3761; + if (tile.wall == (byte) 230) + Type = 3762; + if (tile.wall == (byte) 142) + Type = 2263; + if (tile.wall == (byte) 143) + Type = 2264; + if (tile.wall == (byte) 144) + Type = 2271; + if (tile.wall == (byte) 149) + Type = 2505; + if (tile.wall == (byte) 150) + Type = 2507; + if (tile.wall == (byte) 151) + Type = 2506; + if (tile.wall == (byte) 152) + Type = 2508; + if (tile.wall == (byte) 1) + Type = 26; + if (tile.wall == (byte) 4) + Type = 93; + if (tile.wall == (byte) 5) + Type = 130; + if (tile.wall == (byte) 6) + Type = 132; + if (tile.wall == (byte) 7) + Type = 135; + if (tile.wall == (byte) 8) + Type = 138; + if (tile.wall == (byte) 9) + Type = 140; + if (tile.wall == (byte) 10) + Type = 142; + if (tile.wall == (byte) 11) + Type = 144; + if (tile.wall == (byte) 12) + Type = 146; + if (tile.wall == (byte) 14) + Type = 330; + if (tile.wall == (byte) 224) + Type = 3472; + if (tile.wall == (byte) 177) + Type = 3067; + if (tile.wall == (byte) 167) + Type = 2691; + if (tile.wall == (byte) 60) + Type = 3584; + if (tile.wall == (byte) 225) + Type = 3751; + if (tile.wall == (byte) 179) + Type = 3083; + if (tile.wall == (byte) 183) + Type = 3082; + if (tile.wall == (byte) 181) + Type = 3089; + if (tile.wall == (byte) 184) + Type = 3088; + if (tile.wall == (byte) 186) + Type = 3238; + if (tile.wall >= (byte) 153 && tile.wall <= (byte) 166) + { + switch (tile.wall) + { + case 153: + Type = 2677; + break; + case 154: + Type = 2679; + break; + case 155: + Type = 2681; + break; + case 156: + Type = 2683; + break; + case 157: + Type = 2678; + break; + case 158: + Type = 2680; + break; + case 159: + Type = 2682; + break; + case 160: + Type = 2684; + break; + case 161: + Type = 2686; + break; + case 162: + Type = 2688; + break; + case 163: + Type = 2690; + break; + case 164: + Type = 2685; + break; + case 165: + Type = 2687; + break; + case 166: + Type = 2689; + break; + } + } + if (tile.wall == (byte) 136) + Type = 2169; + if (tile.wall == (byte) 137) + Type = 2170; + if (tile.wall == (byte) 172) + Type = 2788; + if (tile.wall == (byte) 145) + Type = 2333; + if (tile.wall == (byte) 16) + Type = 30; + if (tile.wall == (byte) 17) + Type = 135; + if (tile.wall == (byte) 18) + Type = 138; + if (tile.wall == (byte) 19) + Type = 140; + if (tile.wall == (byte) 20) + Type = 330; + if (tile.wall == (byte) 21) + Type = 392; + if (tile.wall == (byte) 86 || tile.wall == (byte) 108) + Type = 1126; + if (tile.wall == (byte) 173) + Type = 2789; + if (tile.wall == (byte) 174) + Type = 2790; + if (tile.wall == (byte) 175) + Type = 2791; + if (tile.wall == (byte) 176) + Type = 2861; + if (tile.wall == (byte) 182) + Type = 3101; + if (tile.wall == (byte) 133) + Type = 2158; + if (tile.wall == (byte) 134) + Type = 2159; + if (tile.wall == (byte) 135) + Type = 2160; + else if (tile.wall == (byte) 113) + Type = 1726; + else if (tile.wall == (byte) 114) + Type = 1728; + else if (tile.wall == (byte) 115) + Type = 1730; + else if (tile.wall == (byte) 146) + Type = 2432; + else if (tile.wall == (byte) 147) + Type = 2433; + else if (tile.wall == (byte) 148) + Type = 2434; + if (tile.wall >= (byte) 116 && tile.wall <= (byte) 125) + Type = 1948 + (int) tile.wall - 116; + if (tile.wall >= (byte) 126 && tile.wall <= (byte) 132) + Type = 2008 + (int) tile.wall - 126; + if (tile.wall == (byte) 22) + Type = 417; + if (tile.wall == (byte) 23) + Type = 418; + if (tile.wall == (byte) 24) + Type = 419; + if (tile.wall == (byte) 25) + Type = 420; + if (tile.wall == (byte) 26) + Type = 421; + if (tile.wall == (byte) 29) + Type = 587; + if (tile.wall == (byte) 30) + Type = 592; + if (tile.wall == (byte) 31) + Type = 595; + if (tile.wall == (byte) 32) + Type = 605; + if (tile.wall == (byte) 33) + Type = 606; + if (tile.wall == (byte) 34) + Type = 608; + if (tile.wall == (byte) 35) + Type = 610; + if (tile.wall == (byte) 36) + Type = 615; + if (tile.wall == (byte) 37) + Type = 616; + if (tile.wall == (byte) 38) + Type = 617; + if (tile.wall == (byte) 39) + Type = 618; + if (tile.wall == (byte) 41) + Type = 622; + if (tile.wall == (byte) 42) + Type = 623; + if (tile.wall == (byte) 43) + Type = 624; + if (tile.wall == (byte) 44) + Type = 663; + if (tile.wall == (byte) 45) + Type = 720; + if (tile.wall == (byte) 46) + Type = 721; + if (tile.wall == (byte) 47) + Type = 722; + if (tile.wall == (byte) 66) + Type = 745; + if (tile.wall == (byte) 67) + Type = 746; + if (tile.wall == (byte) 68) + Type = 747; + if (tile.wall == (byte) 84) + Type = 884; + if (tile.wall == (byte) 72) + Type = 750; + if (tile.wall == (byte) 73) + Type = 752; + if (tile.wall == (byte) 74) + Type = 764; + if (tile.wall == (byte) 85) + Type = 927; + if (tile.wall == (byte) 75) + Type = 768; + if (tile.wall == (byte) 76) + Type = 769; + if (tile.wall == (byte) 77) + Type = 770; + if (tile.wall == (byte) 82) + Type = 825; + if (tile.wall == (byte) 27) + Type = 479; + if (tile.wall == (byte) 106) + Type = 1447; + if (tile.wall == (byte) 107) + Type = 1448; + if (tile.wall == (byte) 109) + Type = 1590; + if (tile.wall == (byte) 110) + Type = 1592; + if (tile.wall == (byte) 111) + Type = 1594; + if (tile.wall == (byte) 78) + Type = 1723; + if (tile.wall == (byte) 87 || tile.wall == (byte) 112) + Type = 1102; + if (tile.wall == (byte) 94 || tile.wall == (byte) 100) + Type = 1378; + if (tile.wall == (byte) 95 || tile.wall == (byte) 101) + Type = 1379; + if (tile.wall == (byte) 96 || tile.wall == (byte) 102) + Type = 1380; + if (tile.wall == (byte) 97 || tile.wall == (byte) 103) + Type = 1381; + if (tile.wall == (byte) 98 || tile.wall == (byte) 104) + Type = 1382; + if (tile.wall == (byte) 99 || tile.wall == (byte) 105) + Type = 1383; + if (tile.wall >= (byte) 88 && tile.wall <= (byte) 93) + Type = 1267 + (int) tile.wall - 88; + if (tile.wall >= (byte) 138 && tile.wall <= (byte) 141) + Type = 2210 + (int) tile.wall - 138; + if (Type > 0) + Item.NewItem(i * 16, j * 16, 16, 16, Type); + tile.wall = (byte) 0; + tile.wallColor((byte) 0); + WorldGen.SquareWallFrame(i, j); + if (tile.type < (ushort) 0 || tile.type >= (ushort) 470 || !TileID.Sets.FramesOnKillWall[(int) tile.type]) + return; + WorldGen.TileFrame(i, j); + } + } + + 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; + Projectile.NewProjectile(vector2.X, vector2.Y + 2f, 0.0f, -8f, Type, Damage, (float) num2, Main.myPlayer); + 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; + Projectile.NewProjectile(vector2.X, vector2.Y + 2f, 0.0f, -8f, Type, Damage, (float) num, Main.myPlayer); + } + + 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 tile1 = Main.tile[i, j]; + Tile tile2 = (Tile) null; + if (tile1 == null || !tile1.active()) + return false; + if (j >= 1) + tile2 = Main.tile[i, j - 1]; + if (tile2 != null && tile2.active()) + { + int type = (int) tile2.type; + switch (type) + { + case 5: + if ((int) tile1.type != 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) + return false; + break; + case 21: + case 26: + case 72: + case 88: + if ((int) tile1.type != type) + return false; + break; + case 323: + if ((int) tile1.type != type && (tile2.frameX == (short) 66 || tile2.frameX == (short) 220)) + return false; + break; + } + } + switch (tile1.type) + { + case 10: + if (tile1.type == (ushort) 10 && tile1.frameY >= (short) 594 && tile1.frameY <= (short) 646) + { + blockDamaged = true; + return false; + } + break; + case 21: + if (!Chest.CanDestroyChest(i - (int) tile1.frameX / 18 % 2, j - (int) tile1.frameY / 18)) + return false; + break; + case 88: + if (!Chest.CanDestroyChest(i - (int) tile1.frameX / 18 % 3, j - (int) tile1.frameY / 18)) + return false; + break; + case 138: + if (WorldGen.CheckBoulderChest(i, j)) + { + blockDamaged = true; + return false; + } + break; + case 235: + int num = i - (int) tile1.frameX % 54 / 18; + for (int index = 0; index < 3; ++index) + { + if (Main.tile[num + index, j - 1].active() && (TileID.Sets.BasicChest[(int) Main.tile[num + index, j - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[num + index, j - 1].type])) + { + blockDamaged = true; + return false; + } + } + break; + } + return true; + } + + 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 tile = Main.tile[i, j]; + if (tile == null) + { + tile = new Tile(); + Main.tile[i, j] = tile; + } + if (!tile.active()) + return; + if (j >= 1 && Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + if (j >= 1 && Main.tile[i, j - 1].active() && (Main.tile[i, j - 1].type == (ushort) 5 && tile.type != (ushort) 5 || Main.tile[i, j - 1].type == (ushort) 323 && tile.type != (ushort) 323 || TileID.Sets.BasicChest[(int) Main.tile[i, j - 1].type] && !TileID.Sets.BasicChest[(int) tile.type] || Main.tile[i, j - 1].type == (ushort) 323 && tile.type != (ushort) 323 || Main.tile[i, j - 1].type == (ushort) 88 && tile.type != (ushort) 88 || Main.tile[i, j - 1].type == (ushort) 26 && tile.type != (ushort) 26 || Main.tile[i, j - 1].type == (ushort) 72 && tile.type != (ushort) 72)) + { + if (Main.tile[i, j - 1].type == (ushort) 5) + { + if ((Main.tile[i, j - 1].frameX != (short) 66 || Main.tile[i, j - 1].frameY < (short) 0 || Main.tile[i, j - 1].frameY > (short) 44) && (Main.tile[i, j - 1].frameX != (short) 88 || Main.tile[i, j - 1].frameY < (short) 66 || Main.tile[i, j - 1].frameY > (short) 110) && Main.tile[i, j - 1].frameY < (short) 198) + return; + } + else if (Main.tile[i, j - 1].type != (ushort) 323 || Main.tile[i, j - 1].frameX == (short) 66 || Main.tile[i, j - 1].frameX == (short) 220) + return; + } + if (tile.type == (ushort) 10 && tile.frameY >= (short) 594 && tile.frameY <= (short) 646) + fail = true; + if (tile.type == (ushort) 138) + fail = WorldGen.CheckBoulderChest(i, j); + if (tile.type == (ushort) 235) + { + int frameX = (int) tile.frameX; + int num = i - frameX % 54 / 18; + for (int index = 0; index < 3; ++index) + { + if (Main.tile[num + index, j - 1].active() && (TileID.Sets.BasicChest[(int) Main.tile[num + index, j - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[num + index, j - 1].type] || Main.tile[num + index, j - 1].type == (ushort) 88)) + { + fail = true; + break; + } + } + } + if (!effectOnly && !WorldGen.stopDrops) + { + if (!noItem && FixExploitManEaters.SpotProtected(i, j)) + return; + if (tile.type == (ushort) sbyte.MaxValue) + Main.PlaySound(SoundID.Item27, i * 16, j * 16); + else if (tile.type == (ushort) 147 || tile.type == (ushort) 224) + { + if (WorldGen.genRand.Next(2) == 0) + Main.PlaySound(SoundID.Item48, i * 16, j * 16); + else + Main.PlaySound(SoundID.Item49, i * 16, j * 16); + } + else if (tile.type == (ushort) 161 || tile.type == (ushort) 163 || tile.type == (ushort) 164 || tile.type == (ushort) 200) + Main.PlaySound(SoundID.Item50, i * 16, j * 16); + else if (tile.type == (ushort) 3 || tile.type == (ushort) 110) + { + Main.PlaySound(6, i * 16, j * 16); + if (tile.frameX == (short) 144) + Item.NewItem(i * 16, j * 16, 16, 16, 5); + } + else if (tile.type == (ushort) 254) + Main.PlaySound(6, i * 16, j * 16); + else if (tile.type == (ushort) 24) + { + Main.PlaySound(6, i * 16, j * 16); + if (tile.frameX == (short) 144) + Item.NewItem(i * 16, j * 16, 16, 16, 60); + } + else if (Main.tileAlch[(int) tile.type] || tile.type == (ushort) 384 || tile.type == (ushort) 227 || tile.type == (ushort) 32 || tile.type == (ushort) 51 || tile.type == (ushort) 52 || tile.type == (ushort) 61 || tile.type == (ushort) 62 || tile.type == (ushort) 69 || tile.type == (ushort) 71 || tile.type == (ushort) 73 || tile.type == (ushort) 74 || tile.type == (ushort) 113 || tile.type == (ushort) 115 || tile.type == (ushort) 184 || tile.type == (ushort) 192 || tile.type == (ushort) 205 || tile.type == (ushort) 233 || tile.type == (ushort) 352 || tile.type == (ushort) 382) + Main.PlaySound(6, i * 16, j * 16); + else if (tile.type == (ushort) 201) + { + Main.PlaySound(6, i * 16, j * 16); + if (tile.frameX == (short) 270) + Item.NewItem(i * 16, j * 16, 16, 16, 2887); + } + else if (tile.type == (ushort) 1 || tile.type == (ushort) 6 || tile.type == (ushort) 7 || tile.type == (ushort) 8 || tile.type == (ushort) 9 || tile.type == (ushort) 22 || tile.type == (ushort) 140 || tile.type == (ushort) 25 || tile.type == (ushort) 37 || tile.type == (ushort) 38 || tile.type == (ushort) 39 || tile.type == (ushort) 41 || tile.type == (ushort) 43 || tile.type == (ushort) 44 || tile.type == (ushort) 45 || tile.type == (ushort) 46 || tile.type == (ushort) 47 || tile.type == (ushort) 48 || tile.type == (ushort) 56 || tile.type == (ushort) 58 || tile.type == (ushort) 63 || tile.type == (ushort) 64 || tile.type == (ushort) 65 || tile.type == (ushort) 66 || tile.type == (ushort) 67 || tile.type == (ushort) 68 || tile.type == (ushort) 75 || tile.type == (ushort) 76 || tile.type == (ushort) 107 || tile.type == (ushort) 108 || tile.type == (ushort) 111 || tile.type == (ushort) 117 || tile.type == (ushort) 118 || tile.type == (ushort) 119 || tile.type == (ushort) 120 || tile.type == (ushort) 121 || tile.type == (ushort) 122 || tile.type == (ushort) 150 || tile.type == (ushort) 151 || tile.type == (ushort) 152 || tile.type == (ushort) 153 || tile.type == (ushort) 154 || tile.type == (ushort) 155 || tile.type == (ushort) 156 || tile.type == (ushort) 160 || tile.type == (ushort) 161 || tile.type == (ushort) 166 || tile.type == (ushort) 167 || tile.type == (ushort) 168 || tile.type == (ushort) 169 || tile.type == (ushort) 175 || tile.type == (ushort) 176 || tile.type == (ushort) 177 || tile.type == (ushort) 203 || tile.type == (ushort) 202 || tile.type == (ushort) 204 || tile.type == (ushort) 206 || tile.type == (ushort) 211 || tile.type == (ushort) 221 || tile.type == (ushort) 222 || tile.type == (ushort) 223 || tile.type == (ushort) 226 || tile.type == (ushort) 248 || tile.type == (ushort) 249 || tile.type == (ushort) 250 || tile.type == (ushort) 272 || tile.type == (ushort) 273 || tile.type == (ushort) 274 || tile.type == (ushort) 284 || tile.type == (ushort) 325 || tile.type == (ushort) 346 || tile.type == (ushort) 347 || tile.type == (ushort) 348 || tile.type == (ushort) 350 || tile.type == (ushort) 367 || tile.type == (ushort) 357 || tile.type == (ushort) 368 || tile.type == (ushort) 369 || tile.type == (ushort) 370 || tile.type == (ushort) 407) + Main.PlaySound(21, i * 16, j * 16); + else if (tile.type == (ushort) 231 || tile.type == (ushort) 195) + Main.PlaySound(4, i * 16, j * 16); + else if (tile.type == (ushort) 26 && tile.frameX >= (short) 54) + Main.PlaySound(4, i * 16, j * 16); + else if (tile.type == (ushort) 314) + Main.PlaySound(SoundID.Item52, i * 16, j * 16); + else if (tile.type >= (ushort) 330 && tile.type <= (ushort) 333) + Main.PlaySound(18, i * 16, j * 16); + else if (tile.type != (ushort) 138) + Main.PlaySound(0, i * 16, j * 16); + if ((tile.type == (ushort) 162 || tile.type == (ushort) 385 || tile.type == (ushort) 129 || tile.type == (ushort) 165 && tile.frameX < (short) 54) && !fail) + Main.PlaySound(SoundID.Item27, i * 16, j * 16); + } + if (tile.type == (ushort) 128 || tile.type == (ushort) 269) + { + int index1 = i; + int frameX1 = (int) tile.frameX; + int frameX2 = (int) tile.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 num = (int) Main.tile[index1, j].frameY / 18; + if (num == 0) + Item.NewItem(i * 16, j * 16, 16, 16, Item.headType[index2]); + if (num == 1) + Item.NewItem(i * 16, j * 16, 16, 16, Item.bodyType[index2]); + if (num == 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 (tile.type == (ushort) 334) + { + int index = i; + int frameX4 = (int) tile.frameX; + int num1 = (int) tile.frameX; + int num2 = 0; + while (num1 >= 5000) + { + num1 -= 5000; + ++num2; + } + if (num2 != 0) + num1 = (num2 - 1) * 18; + int num3 = num1 % 54; + if (num3 == 18) + { + frameX4 = (int) Main.tile[i - 1, j].frameX; + --index; + } + if (num3 == 36) + { + frameX4 = (int) Main.tile[i - 2, j].frameX; + index -= 2; + } + if (frameX4 >= 5000) + { + int num4 = 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(num4); + obj.Prefix(pre); + int number = Item.NewItem(i * 16, j * 16, 16, 16, num4, noBroadcast: true); + obj.position = Main.item[number].position; + Main.item[number] = obj; + NetMessage.SendData(21, number: number); + } + int num5 = (int) Main.tile[index, j].frameX; + int num6 = 0; + while (num5 >= 5000) + { + num5 -= 5000; + ++num6; + } + if (num6 != 0) + num5 = (num6 - 1) * 18; + Main.tile[index, j].frameX = (short) num5; + Main.tile[index + 1, j].frameX = (short) (num5 + 18); + } + } + if (tile.type == (ushort) 395) + { + int key = TEItemFrame.Find(i - (int) tile.frameX % 36 / 18, j - (int) tile.frameY % 36 / 18); + if (key != -1 && ((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + ((TEItemFrame) TileEntity.ByID[key]).DropItem(); + if (Main.netMode == 2) + return; + Main.blockMouse = true; + return; + } + } + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(fail, tile); + for (int index = 0; index < tileDustAmount; ++index) + WorldGen.KillTile_MakeTileDust(i, j, tile); + if (effectOnly) + return; + if (fail) + { + if (tile.type == (ushort) 2 || tile.type == (ushort) 23 || tile.type == (ushort) 109 || tile.type == (ushort) 199) + tile.type = (ushort) 0; + if (tile.type == (ushort) 60 || tile.type == (ushort) 70) + tile.type = (ushort) 59; + if (Main.tileMoss[(int) tile.type]) + tile.type = (ushort) 1; + WorldGen.SquareTileFrame(i, j); + } + else + { + if (TileID.Sets.BasicChest[(int) tile.type] && Main.netMode != 1) + { + int num = (int) tile.frameX / 18; + int Y = j - (int) tile.frameY / 18; + while (num > 1) + num -= 2; + if (!Chest.DestroyChest(i - num, Y)) + return; + } + if (tile.type == (ushort) 88 && Main.netMode != 1) + { + int num7 = (int) tile.frameX / 18; + int Y = j - (int) tile.frameY / 18; + int num8 = num7 % 3; + if (!Chest.DestroyChest(i - num8, Y)) + return; + } + if (tile.type == (ushort) 51 && tile.wall == (byte) 62 && WorldGen.genRand.Next(4) != 0) + noItem = true; + if (!noItem && !WorldGen.stopDrops && Main.netMode != 1) + { + bool flag1 = false; + int maxValue1 = -1; + int maxValue2 = -1; + int maxValue3 = -1; + if (tile.type == (ushort) 3) + { + maxValue1 = 400; + maxValue2 = 100; + if (tile.frameX >= (short) 108) + { + maxValue1 *= 3; + maxValue2 *= 3; + } + } + if (tile.type == (ushort) 73) + { + maxValue1 = 200; + maxValue2 = 50; + if (tile.frameX >= (short) 108) + { + maxValue1 *= 3; + maxValue2 *= 3; + } + } + if (tile.type == (ushort) 61) + { + maxValue3 = 80; + if (tile.frameX >= (short) 108) + maxValue3 *= 3; + } + if (tile.type == (ushort) 74) + { + maxValue3 = 40; + if (tile.frameX >= (short) 108) + maxValue3 *= 3; + } + if (tile.type == (ushort) 62) + maxValue3 = 250; + if (tile.type == (ushort) 185) + { + if (tile.frameY == (short) 0 && tile.frameX < (short) 214) + maxValue1 = 6; + if (tile.frameY == (short) 18 && (tile.frameX < (short) 214 || tile.frameX >= (short) 1368)) + maxValue1 = 6; + } + else if (tile.type == (ushort) 186) + { + if (tile.frameX >= (short) 378 && tile.frameX <= (short) 700) + maxValue1 = 6; + } + else if (tile.type == (ushort) 187) + { + if (tile.frameX >= (short) 756 && tile.frameX <= (short) 916) + maxValue1 = 6; + if (tile.frameX <= (short) 322) + maxValue1 = 6; + } + else if (tile.type == (ushort) 233) + maxValue3 = 10; + if (maxValue1 > 0 && NPC.CountNPCS(357) < 5 && WorldGen.genRand.Next(maxValue1) == 0) + { + int Type = 357; + if (WorldGen.genRand.Next(NPC.goldCritterChance) == 0) + Type = 448; + int index = NPC.NewNPC(i * 16 + 10, j * 16, Type); + 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 Type = 377; + if (WorldGen.genRand.Next(NPC.goldCritterChance) == 0) + Type = 446; + int index = NPC.NewNPC(i * 16 + 10, j * 16, Type); + 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) + { + int Type = 485; + if (WorldGen.genRand.Next(4) == 0) + Type = 486; + if (WorldGen.genRand.Next(12) == 0) + Type = 487; + int index = NPC.NewNPC(i * 16 + 10, j * 16, Type); + 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; + } + int Type1 = 0; + int Type2 = 0; + if (tile.type == (ushort) 0 || tile.type == (ushort) 2 || tile.type == (ushort) 109) + Type1 = 2; + else if (tile.type == (ushort) 426) + Type1 = 3621; + else if (tile.type == (ushort) 430) + Type1 = 3633; + else if (tile.type == (ushort) 431) + Type1 = 3634; + else if (tile.type == (ushort) 432) + Type1 = 3635; + else if (tile.type == (ushort) 433) + Type1 = 3636; + else if (tile.type == (ushort) 434) + Type1 = 3637; + else if (tile.type == (ushort) 427) + Type1 = 3622; + else if (tile.type == (ushort) 435) + Type1 = 3638; + else if (tile.type == (ushort) 436) + Type1 = 3639; + else if (tile.type == (ushort) 437) + Type1 = 3640; + else if (tile.type == (ushort) 438) + Type1 = 3641; + else if (tile.type == (ushort) 439) + Type1 = 3642; + else if (tile.type == (ushort) 446) + Type1 = 3736; + else if (tile.type == (ushort) 447) + Type1 = 3737; + else if (tile.type == (ushort) 448) + Type1 = 3738; + else if (tile.type == (ushort) 449) + Type1 = 3739; + else if (tile.type == (ushort) 450) + Type1 = 3740; + else if (tile.type == (ushort) 451) + Type1 = 3741; + else if (tile.type == (ushort) 368) + Type1 = 3086; + else if (tile.type == (ushort) 369) + Type1 = 3087; + else if (tile.type == (ushort) 367) + Type1 = 3081; + else if (tile.type == (ushort) 379) + Type1 = 3214; + else if (tile.type == (ushort) 353) + Type1 = 2996; + else if (tile.type == (ushort) 365) + Type1 = 3077; + else if (tile.type == (ushort) 366) + Type1 = 3078; + else if ((tile.type == (ushort) 52 || tile.type == (ushort) 62) && WorldGen.genRand.Next(2) == 0 && Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].cordage) + Type1 = 2996; + else if (tile.type == (ushort) 357) + Type1 = 3066; + else if (tile.type == (ushort) 1) + Type1 = 3; + else if (tile.type == (ushort) 3 || tile.type == (ushort) 73) + { + if (WorldGen.genRand.Next(2) == 0 && (Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].HasItem(281) || Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)].HasItem(986))) + Type1 = 283; + } + else if (tile.type == (ushort) 227) + { + int num = (int) tile.frameX / 34; + Type1 = 1107 + num; + if (num >= 8 && num <= 11) + Type1 = 3385 + num - 8; + } + else if (tile.type == (ushort) 4) + { + int num = (int) tile.frameY / 22; + switch (num) + { + case 0: + Type1 = 8; + break; + case 8: + Type1 = 523; + break; + case 9: + Type1 = 974; + break; + case 10: + Type1 = 1245; + break; + case 11: + Type1 = 1333; + break; + case 12: + Type1 = 2274; + break; + case 13: + Type1 = 3004; + break; + case 14: + Type1 = 3045; + break; + case 15: + Type1 = 3114; + break; + default: + Type1 = 426 + num; + break; + } + } + else if (tile.type == (ushort) 239) + { + int num = (int) tile.frameX / 18; + if (num == 0) + Type1 = 20; + if (num == 1) + Type1 = 703; + if (num == 2) + Type1 = 22; + if (num == 3) + Type1 = 704; + if (num == 4) + Type1 = 21; + if (num == 5) + Type1 = 705; + if (num == 6) + Type1 = 19; + if (num == 7) + Type1 = 706; + if (num == 8) + Type1 = 57; + if (num == 9) + Type1 = 117; + if (num == 10) + Type1 = 175; + if (num == 11) + Type1 = 381; + if (num == 12) + Type1 = 1184; + if (num == 13) + Type1 = 382; + if (num == 14) + Type1 = 1191; + if (num == 15) + Type1 = 391; + if (num == 16) + Type1 = 1198; + if (num == 17) + Type1 = 1006; + if (num == 18) + Type1 = 1225; + if (num == 19) + Type1 = 1257; + if (num == 20) + Type1 = 1552; + if (num == 21) + Type1 = 3261; + if (num == 22) + Type1 = 3467; + } + else if (tile.type == (ushort) 380) + Type1 = 3215 + (int) tile.frameY / 18; + else if (tile.type == (ushort) 442) + Type1 = 3707; + else if (tile.type == (ushort) 383) + Type1 = 620; + else if (tile.type == (ushort) 315) + Type1 = 2435; + else if (tile.type == (ushort) 330) + Type1 = 71; + else if (tile.type == (ushort) 331) + Type1 = 72; + else if (tile.type == (ushort) 332) + Type1 = 73; + else if (tile.type == (ushort) 333) + Type1 = 74; + else if (tile.type == (ushort) 5) + { + if (tile.frameX >= (short) 22 && tile.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) + { + if (Main.tile[i, index].type == (ushort) 2 || Main.tile[i, index].type == (ushort) 109 || Main.tile[i, index].type == (ushort) 147 || Main.tile[i, index].type == (ushort) 199 || Main.tile[i, index].type == (ushort) 23) + { + Type1 = 9; + Type2 = 27; + } + else + Type1 = 9; + } + } + else + Type1 = 9; + } + } + else + Type1 = 9; + if (Type1 == 9) + { + int index3 = i; + int index4 = j; + if (tile.frameX == (short) 66 && tile.frameY <= (short) 45) + ++index3; + if (tile.frameX == (short) 88 && tile.frameY >= (short) 66 && tile.frameY <= (short) 110) + --index3; + if (tile.frameX == (short) 22 && tile.frameY >= (short) 132 && tile.frameY <= (short) 176) + --index3; + if (tile.frameX == (short) 44 && tile.frameY >= (short) 132 && tile.frameY <= (short) 176) + ++index3; + if (tile.frameX == (short) 44 && tile.frameY >= (short) 198) + ++index3; + if (tile.frameX == (short) 66 && tile.frameY >= (short) 198) + --index3; + while (!Main.tile[index3, index4].active() || !Main.tileSolid[(int) Main.tile[index3, index4].type]) + ++index4; + if (Main.tile[index3, index4].active()) + { + switch (Main.tile[index3, index4].type) + { + case 23: + Type1 = 619; + break; + case 60: + Type1 = 620; + break; + case 70: + Type1 = 183; + break; + case 109: + Type1 = 621; + break; + case 147: + Type1 = 2503; + break; + case 199: + Type1 = 911; + break; + } + } + int closest = (int) Player.FindClosest(new Vector2((float) (index3 * 16), (float) (index4 * 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) + flag1 = true; + } + } + else if (tile.type == (ushort) 323) + { + Type1 = 2504; + if (tile.frameX <= (short) 132 && tile.frameX >= (short) 88) + Type2 = 27; + int index5 = i; + int index6 = j; + while (!Main.tile[index5, index6].active() || !Main.tileSolid[(int) Main.tile[index5, index6].type]) + ++index6; + if (Main.tile[index5, index6].active()) + { + switch (Main.tile[index5, index6].type) + { + case 112: + Type1 = 619; + break; + case 116: + Type1 = 621; + break; + case 234: + Type1 = 911; + break; + } + } + } + else if (tile.type == (ushort) 408) + Type1 = 3460; + else if (tile.type == (ushort) 409) + Type1 = 3461; + else if (tile.type == (ushort) 415) + Type1 = 3573; + else if (tile.type == (ushort) 416) + Type1 = 3574; + else if (tile.type == (ushort) 417) + Type1 = 3575; + else if (tile.type == (ushort) 418) + Type1 = 3576; + else if (tile.type >= (ushort) byte.MaxValue && tile.type <= (ushort) 261) + Type1 = 1970 + (int) tile.type - (int) byte.MaxValue; + else if (tile.type >= (ushort) 262 && tile.type <= (ushort) 268) + Type1 = 1970 + (int) tile.type - 262; + else if (tile.type == (ushort) 171) + { + if (tile.frameX >= (short) 10) + { + WorldGen.dropXmasTree(i, j, 0); + WorldGen.dropXmasTree(i, j, 1); + WorldGen.dropXmasTree(i, j, 2); + WorldGen.dropXmasTree(i, j, 3); + } + } + else if (tile.type == (ushort) 324) + { + switch ((int) tile.frameY / 22) + { + case 0: + Type1 = 2625; + break; + case 1: + Type1 = 2626; + break; + } + } + else if (tile.type == (ushort) 421) + Type1 = 3609; + else if (tile.type == (ushort) 422) + Type1 = 3610; + else if (tile.type == (ushort) 419) + { + switch ((int) tile.frameX / 18) + { + case 0: + Type1 = 3602; + break; + case 1: + Type1 = 3618; + break; + case 2: + Type1 = 3663; + break; + } + } + else if (tile.type == (ushort) 428) + { + switch ((int) tile.frameY / 18) + { + case 0: + Type1 = 3630; + break; + case 1: + Type1 = 3632; + break; + case 2: + Type1 = 3631; + break; + case 3: + Type1 = 3626; + break; + } + PressurePlateHelper.DestroyPlate(new Point(i, j)); + } + else if (tile.type == (ushort) 420) + { + switch ((int) tile.frameY / 18) + { + case 0: + Type1 = 3603; + break; + case 1: + Type1 = 3604; + break; + case 2: + Type1 = 3605; + break; + case 3: + Type1 = 3606; + break; + case 4: + Type1 = 3607; + break; + case 5: + Type1 = 3608; + break; + } + } + else if (tile.type == (ushort) 423) + { + TELogicSensor.Kill(i, j); + switch ((int) tile.frameY / 18) + { + case 0: + Type1 = 3613; + break; + case 1: + Type1 = 3614; + break; + case 2: + Type1 = 3615; + break; + case 3: + Type1 = 3726; + break; + case 4: + Type1 = 3727; + break; + case 5: + Type1 = 3728; + break; + case 6: + Type1 = 3729; + break; + } + } + else if (tile.type == (ushort) 424) + Type1 = 3616; + else if (tile.type == (ushort) 445) + Type1 = 3725; + else if (tile.type == (ushort) 429) + Type1 = 3629; + else if (tile.type == (ushort) 272) + Type1 = 1344; + else if (tile.type == (ushort) 273) + Type1 = 2119; + else if (tile.type == (ushort) 274) + Type1 = 2120; + else if (tile.type == (ushort) 460) + Type1 = 3756; + else if (tile.type == (ushort) 326) + { + Type1 = 2693; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 327) + { + Type1 = 2694; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 458) + { + Type1 = 3754; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 459) + { + Type1 = 3755; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 345) + { + Type1 = 2787; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 328) + { + Type1 = 2695; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 329) + { + Type1 = 2697; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 346) + Type1 = 2792; + else if (tile.type == (ushort) 347) + Type1 = 2793; + else if (tile.type == (ushort) 348) + Type1 = 2794; + else if (tile.type == (ushort) 350) + Type1 = 2860; + else if (tile.type == (ushort) 336) + Type1 = 2701; + else if (tile.type == (ushort) 340) + Type1 = 2751; + else if (tile.type == (ushort) 341) + Type1 = 2752; + else if (tile.type == (ushort) 342) + Type1 = 2753; + else if (tile.type == (ushort) 343) + Type1 = 2754; + else if (tile.type == (ushort) 344) + Type1 = 2755; + else if (tile.type == (ushort) 351) + Type1 = 2868; + else if (tile.type == (ushort) 251) + Type1 = 1725; + else if (tile.type == (ushort) 252) + Type1 = 1727; + else if (tile.type == (ushort) 253) + Type1 = 1729; + else if (tile.type == (ushort) 325) + Type1 = 2692; + else if (tile.type == (ushort) 370) + Type1 = 3100; + else if (tile.type == (ushort) 396) + Type1 = 3271; + else if (tile.type == (ushort) 400) + Type1 = 3276; + else if (tile.type == (ushort) 401) + Type1 = 3277; + else if (tile.type == (ushort) 403) + Type1 = 3339; + else if (tile.type == (ushort) 397) + Type1 = 3272; + else if (tile.type == (ushort) 398) + Type1 = 3274; + else if (tile.type == (ushort) 399) + Type1 = 3275; + else if (tile.type == (ushort) 402) + Type1 = 3338; + else if (tile.type == (ushort) 404) + Type1 = 3347; + else if (tile.type == (ushort) 407) + Type1 = 3380; + else if (tile.type == (ushort) 170) + Type1 = 1872; + else if (tile.type == (ushort) 284) + Type1 = 2173; + else if (tile.type == (ushort) 214) + Type1 = 85; + else if (tile.type == (ushort) 213) + Type1 = 965; + else if (tile.type == (ushort) 211) + Type1 = 947; + else if (tile.type == (ushort) 6) + Type1 = 11; + else if (tile.type == (ushort) 7) + Type1 = 12; + else if (tile.type == (ushort) 8) + Type1 = 13; + else if (tile.type == (ushort) 9) + Type1 = 14; + else if (tile.type == (ushort) 202) + Type1 = 824; + else if (tile.type == (ushort) 234) + Type1 = 1246; + else if (tile.type == (ushort) 226) + Type1 = 1101; + else if (tile.type == (ushort) 224) + Type1 = 1103; + else if (tile.type == (ushort) 36) + Type1 = 1869; + else if (tile.type == (ushort) 311) + Type1 = 2260; + else if (tile.type == (ushort) 312) + Type1 = 2261; + else if (tile.type == (ushort) 313) + Type1 = 2262; + else if (tile.type == (ushort) 229) + Type1 = 1125; + else if (tile.type == (ushort) 230) + Type1 = 1127; + else if (tile.type == (ushort) 225) + { + if (WorldGen.genRand.Next(3) == 0) + { + tile.honey(true); + tile.liquid = byte.MaxValue; + } + else + { + Type1 = 1124; + if (Main.netMode != 1 && WorldGen.genRand.Next(2) == 0) + { + int num = 1; + if (WorldGen.genRand.Next(3) == 0) + num = 2; + for (int index7 = 0; index7 < num; ++index7) + { + int Type3 = WorldGen.genRand.Next(210, 212); + int index8 = NPC.NewNPC(i * 16 + 8, j * 16 + 15, Type3, 1); + Main.npc[index8].velocity.X = (float) WorldGen.genRand.Next(-200, 201) * (1f / 500f); + Main.npc[index8].velocity.Y = (float) WorldGen.genRand.Next(-200, 201) * (1f / 500f); + Main.npc[index8].netUpdate = true; + } + } + } + } + else if (tile.type == (ushort) 221) + Type1 = 1104; + else if (tile.type == (ushort) 222) + Type1 = 1105; + else if (tile.type == (ushort) 223) + Type1 = 1106; + else if (tile.type == (ushort) 248) + Type1 = 1589; + else if (tile.type == (ushort) 249) + Type1 = 1591; + else if (tile.type == (ushort) 250) + Type1 = 1593; + else if (tile.type == (ushort) 191) + Type1 = 9; + else if (tile.type == (ushort) 203) + Type1 = 836; + else if (tile.type == (ushort) 204) + Type1 = 880; + else if (tile.type == (ushort) 166) + Type1 = 699; + else if (tile.type == (ushort) 167) + Type1 = 700; + else if (tile.type == (ushort) 168) + Type1 = 701; + else if (tile.type == (ushort) 169) + Type1 = 702; + else if (tile.type == (ushort) 123) + Type1 = 424; + else if (tile.type == (ushort) 124) + Type1 = 480; + else if (tile.type == (ushort) 157) + Type1 = 619; + else if (tile.type == (ushort) 158) + Type1 = 620; + else if (tile.type == (ushort) 159) + Type1 = 621; + else if (tile.type == (ushort) 161) + Type1 = 664; + else if (tile.type == (ushort) 206) + Type1 = 883; + else if (tile.type == (ushort) 232) + Type1 = 1150; + else if (tile.type == (ushort) 198) + Type1 = 775; + else if (tile.type == (ushort) 314) + Type1 = Minecart.GetTrackItem(tile); + else if (tile.type == (ushort) 189) + Type1 = 751; + else if (tile.type == (ushort) 195) + Type1 = 763; + else if (tile.type == (ushort) 194) + Type1 = 766; + else if (tile.type == (ushort) 193) + Type1 = 762; + else if (tile.type == (ushort) 196) + Type1 = 765; + else if (tile.type == (ushort) 197) + Type1 = 767; + else if (tile.type == (ushort) 178) + { + switch ((int) tile.frameX / 18) + { + case 0: + Type1 = 181; + break; + case 1: + Type1 = 180; + break; + case 2: + Type1 = 177; + break; + case 3: + Type1 = 179; + break; + case 4: + Type1 = 178; + break; + case 5: + Type1 = 182; + break; + case 6: + Type1 = 999; + break; + } + } + else if (tile.type == (ushort) 149) + { + if (tile.frameX == (short) 0 || tile.frameX == (short) 54) + Type1 = 596; + else if (tile.frameX == (short) 18 || tile.frameX == (short) 72) + Type1 = 597; + else if (tile.frameX == (short) 36 || tile.frameX == (short) 90) + Type1 = 598; + } + else if (tile.type == (ushort) 13) + { + Main.PlaySound(13, i * 16, j * 16); + switch ((int) tile.frameX / 18) + { + case 1: + Type1 = 28; + break; + case 2: + Type1 = 110; + break; + case 3: + Type1 = 350; + break; + case 4: + Type1 = 351; + break; + case 5: + Type1 = 2234; + break; + case 6: + Type1 = 2244; + break; + case 7: + Type1 = 2257; + break; + case 8: + Type1 = 2258; + break; + default: + Type1 = 31; + break; + } + } + else if (tile.type == (ushort) 19) + { + int num = (int) tile.frameY / 18; + switch (num) + { + case 0: + Type1 = 94; + break; + case 1: + Type1 = 631; + break; + case 2: + Type1 = 632; + break; + case 3: + Type1 = 633; + break; + case 4: + Type1 = 634; + break; + case 5: + Type1 = 913; + break; + case 6: + Type1 = 1384; + break; + case 7: + Type1 = 1385; + break; + case 8: + Type1 = 1386; + break; + case 9: + Type1 = 1387; + break; + case 10: + Type1 = 1388; + break; + case 11: + Type1 = 1389; + break; + case 12: + Type1 = 1418; + break; + case 13: + Type1 = 1457; + break; + case 14: + Type1 = 1702; + break; + case 15: + Type1 = 1796; + break; + case 16: + Type1 = 1818; + break; + case 17: + Type1 = 2518; + break; + case 18: + Type1 = 2549; + break; + case 19: + Type1 = 2566; + break; + case 20: + Type1 = 2581; + break; + case 21: + Type1 = 2627; + break; + case 22: + Type1 = 2628; + break; + case 23: + Type1 = 2629; + break; + case 24: + Type1 = 2630; + break; + case 25: + Type1 = 2744; + break; + case 26: + Type1 = 2822; + break; + case 27: + Type1 = 3144; + break; + case 28: + Type1 = 3146; + break; + case 29: + Type1 = 3145; + break; + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + Type1 = 3903 + num - 30; + break; + } + } + else if (tile.type == (ushort) 22) + Type1 = 56; + else if (tile.type == (ushort) 140) + Type1 = 577; + else if (tile.type == (ushort) 23) + Type1 = 2; + else if (tile.type == (ushort) 25) + Type1 = 61; + else if (tile.type == (ushort) 30) + Type1 = 9; + else if (tile.type == (ushort) 191) + Type1 = 9; + else if (tile.type == (ushort) 208) + Type1 = 911; + else if (tile.type == (ushort) 33) + { + int num = (int) tile.frameY / 22; + Type1 = 105; + switch (num) + { + case 1: + Type1 = 1405; + break; + case 2: + Type1 = 1406; + break; + case 3: + Type1 = 1407; + break; + default: + if (num >= 4 && num <= 13) + { + Type1 = 2045 + num - 4; + break; + } + if (num >= 14 && num <= 16) + { + Type1 = 2153 + num - 14; + break; + } + switch (num) + { + case 17: + Type1 = 2236; + break; + case 18: + Type1 = 2523; + break; + case 19: + Type1 = 2542; + break; + case 20: + Type1 = 2556; + break; + case 21: + Type1 = 2571; + break; + case 22: + Type1 = 2648; + break; + case 23: + Type1 = 2649; + break; + case 24: + Type1 = 2650; + break; + case 25: + Type1 = 2651; + break; + case 26: + Type1 = 2818; + break; + case 27: + Type1 = 3171; + break; + case 28: + Type1 = 3173; + break; + case 29: + Type1 = 3172; + break; + case 30: + Type1 = 3890; + break; + } + break; + } + } + else if (tile.type == (ushort) 372) + Type1 = 3117; + else if (tile.type == (ushort) 371) + Type1 = 3113; + else if (tile.type == (ushort) 174) + Type1 = 713; + else if (tile.type == (ushort) 37) + Type1 = 116; + else if (tile.type == (ushort) 38) + Type1 = 129; + else if (tile.type == (ushort) 39) + Type1 = 131; + else if (tile.type == (ushort) 40) + Type1 = 133; + else if (tile.type == (ushort) 41) + Type1 = 134; + else if (tile.type == (ushort) 43) + Type1 = 137; + else if (tile.type == (ushort) 44) + Type1 = 139; + else if (tile.type == (ushort) 45) + Type1 = 141; + else if (tile.type == (ushort) 46) + Type1 = 143; + else if (tile.type == (ushort) 47) + Type1 = 145; + else if (tile.type == (ushort) 48) + Type1 = 147; + else if (tile.type == (ushort) 49) + Type1 = 148; + else if (tile.type == (ushort) 51) + Type1 = 150; + else if (tile.type == (ushort) 53) + Type1 = 169; + else if (tile.type == (ushort) 151) + Type1 = 607; + else if (tile.type == (ushort) 152) + Type1 = 609; + else if (tile.type == (ushort) 54) + { + Type1 = 170; + Main.PlaySound(13, i * 16, j * 16); + } + else if (tile.type == (ushort) 56) + Type1 = 173; + else if (tile.type == (ushort) 57) + Type1 = 172; + else if (tile.type == (ushort) 58) + Type1 = 174; + else if (tile.type == (ushort) 60) + Type1 = 176; + else if (tile.type == (ushort) 70) + Type1 = 176; + else if (tile.type == (ushort) 75) + Type1 = 192; + else if (tile.type == (ushort) 76) + Type1 = 214; + else if (tile.type == (ushort) 78) + Type1 = 222; + else if (tile.type == (ushort) 81) + Type1 = 275; + else if (tile.type == (ushort) 80) + Type1 = 276; + else if (tile.type == (ushort) 188) + Type1 = 276; + else if (tile.type == (ushort) 107) + Type1 = 364; + else if (tile.type == (ushort) 108) + Type1 = 365; + else if (tile.type == (ushort) 111) + Type1 = 366; + else if (tile.type == (ushort) 150) + Type1 = 604; + else if (tile.type == (ushort) 112) + Type1 = 370; + else if (tile.type == (ushort) 116) + Type1 = 408; + else if (tile.type == (ushort) 117) + Type1 = 409; + else if (tile.type == (ushort) 129) + Type1 = 502; + else if (tile.type == (ushort) 118) + Type1 = 412; + else if (tile.type == (ushort) 119) + Type1 = 413; + else if (tile.type == (ushort) 120) + Type1 = 414; + else if (tile.type == (ushort) 121) + Type1 = 415; + else if (tile.type == (ushort) 122) + Type1 = 416; + else if (tile.type == (ushort) 136) + Type1 = 538; + else if (tile.type == (ushort) 385) + Type1 = 3234; + else if (tile.type == (ushort) 137) + { + int num = (int) tile.frameY / 18; + if (num == 0) + Type1 = 539; + if (num == 1) + Type1 = 1146; + if (num == 2) + Type1 = 1147; + if (num == 3) + Type1 = 1148; + if (num == 4) + Type1 = 1149; + } + else if (tile.type == (ushort) 141) + Type1 = 580; + else if (tile.type == (ushort) 145) + Type1 = 586; + else if (tile.type == (ushort) 146) + Type1 = 591; + else if (tile.type == (ushort) 147) + Type1 = 593; + else if (tile.type == (ushort) 148) + Type1 = 594; + else if (tile.type == (ushort) 153) + Type1 = 611; + else if (tile.type == (ushort) 154) + Type1 = 612; + else if (tile.type == (ushort) 155) + Type1 = 613; + else if (tile.type == (ushort) 156) + Type1 = 614; + else if (tile.type == (ushort) 160) + Type1 = 662; + else if (tile.type == (ushort) 175) + Type1 = 717; + else if (tile.type == (ushort) 176) + Type1 = 718; + else if (tile.type == (ushort) 177) + Type1 = 719; + else if (tile.type == (ushort) 163) + Type1 = 833; + else if (tile.type == (ushort) 164) + Type1 = 834; + else if (tile.type == (ushort) 200) + Type1 = 835; + else if (tile.type == (ushort) 210) + Type1 = 937; + else if (tile.type == (ushort) 135) + { + int num = (int) tile.frameY / 18; + if (num == 0) + Type1 = 529; + if (num == 1) + Type1 = 541; + if (num == 2) + Type1 = 542; + if (num == 3) + Type1 = 543; + if (num == 4) + Type1 = 852; + if (num == 5) + Type1 = 853; + if (num == 6) + Type1 = 1151; + } + else if (tile.type == (ushort) 144) + { + if (tile.frameX == (short) 0) + Type1 = 583; + if (tile.frameX == (short) 18) + Type1 = 584; + if (tile.frameX == (short) 36) + Type1 = 585; + } + else if (tile.type == (ushort) 130) + Type1 = 511; + else if (tile.type == (ushort) 131) + Type1 = 512; + else if (tile.type == (ushort) 61 || tile.type == (ushort) 74) + { + if (tile.frameX == (short) 144 && tile.type == (ushort) 61) + Item.NewItem(i * 16, j * 16, 16, 16, 331, WorldGen.genRand.Next(2, 4)); + else if (tile.frameX == (short) 162 && tile.type == (ushort) 61) + Type1 = 223; + else if (tile.frameX >= (short) 108 && tile.frameX <= (short) 126 && tile.type == (ushort) 61 && WorldGen.genRand.Next(20) == 0) + Type1 = 208; + else if (WorldGen.genRand.Next(100) == 0) + Type1 = 195; + } + else if (tile.type == (ushort) 59 || tile.type == (ushort) 60) + Type1 = 176; + else if (tile.type == (ushort) 190) + Type1 = 183; + else if (tile.type == (ushort) 71 || tile.type == (ushort) 72) + { + if (WorldGen.genRand.Next(50) == 0) + Type1 = 194; + else if (WorldGen.genRand.Next(2) == 0) + Type1 = 183; + } + else if (tile.type >= (ushort) 63 && tile.type <= (ushort) 68) + Type1 = (int) tile.type - 63 + 177; + else if (tile.type == (ushort) 50) + Type1 = tile.frameX != (short) 90 ? 149 : 165; + else if (Main.tileAlch[(int) tile.type]) + { + if (tile.type > (ushort) 82) + { + int num = (int) tile.frameX / 18; + bool flag2 = false; + Type1 = 313 + num; + int Type4 = 307 + num; + if (tile.type == (ushort) 84) + flag2 = true; + if (num == 0 && Main.dayTime) + flag2 = true; + if (num == 1 && !Main.dayTime) + flag2 = true; + if (num == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0)) + flag2 = true; + if (num == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0)) + flag2 = true; + if (num == 5 && !Main.raining && Main.dayTime && Main.time > 40500.0) + flag2 = true; + if (num == 6) + { + Type1 = 2358; + Type4 = 2357; + } + int closest = (int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16); + if (Main.player[closest].inventory[Main.player[closest].selectedItem].type == 213) + { + Item.NewItem(i * 16, j * 16, 16, 16, Type4, WorldGen.genRand.Next(1, 6)); + Item.NewItem(i * 16, j * 16, 16, 16, Type1, WorldGen.genRand.Next(1, 3)); + Type1 = -1; + } + else if (flag2) + { + int Stack = WorldGen.genRand.Next(1, 4); + Item.NewItem(i * 16, j * 16, 16, 16, Type4, Stack); + } + } + } + else if (tile.type == (ushort) 321) + Type1 = 2503; + else if (tile.type == (ushort) 322) + Type1 = 2504; + if (Type1 > 0) + { + int Stack = 1; + if (flag1) + ++Stack; + Item.NewItem(i * 16, j * 16, 16, 16, Type1, Stack, pfix: -1); + } + if (Type2 > 0) + Item.NewItem(i * 16, j * 16, 16, 16, Type2, pfix: -1); + } + if (Main.netMode != 2) + AchievementsHelper.NotifyTileDestroyed(Main.player[Main.myPlayer], tile.type); + tile.active(false); + tile.halfBrick(false); + tile.frameX = (short) -1; + tile.frameY = (short) -1; + tile.color((byte) 0); + tile.frameNumber((byte) 0); + if (tile.type == (ushort) 58 && j > Main.maxTilesY - 200) + { + tile.lava(true); + tile.liquid = (byte) 128; + } + else if (tile.type == (ushort) 419) + Wiring.PokeLogicGate(i, j + 1); + else if (tile.type == (ushort) 54) + WorldGen.SquareWallFrame(i, j); + tile.type = (ushort) 0; + tile.inActive(false); + WorldGen.SquareTileFrame(i, j); + } + } + + public static int KillTile_GetTileDustAmount(bool fail, Tile tileCache) + { + int num = 10; + if (tileCache.type == (ushort) 231) + num = 6; + if (fail) + num = 3; + if (tileCache.type == (ushort) 138) + num = 0; + if (tileCache.type == (ushort) 373) + num = 0; + if (tileCache.type == (ushort) 374) + num = 0; + if (tileCache.type == (ushort) 375) + num = 0; + if (tileCache.type == (ushort) 461) + num = 0; + if (tileCache.type >= (ushort) 300 && tileCache.type <= (ushort) 308) + num = 0; + if (tileCache.type == (ushort) 125) + num = 0; + if (tileCache.type == (ushort) 287) + num = 0; + if (tileCache.type == (ushort) 354) + num = 0; + if (tileCache.type == (ushort) 355) + num = 0; + if (tileCache.type == (ushort) 376) + num = 0; + return num; + } + + 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) 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) + Type1 = 6; + else if (tileCache.type == (ushort) 416) + Type1 = 61; + else if (tileCache.type == (ushort) 417) + Type1 = 242; + else if (tileCache.type == (ushort) 418) + Type1 = 135; + 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) 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) + 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: + Type1 = -1; + break; + case 407: + Type1 = 10; + break; + case 454: + Type1 = 139; + break; + } + if (tileCache.type == (ushort) 240) + { + int num = (int) tileCache.frameX / 54; + if (tileCache.frameY >= (short) 54) + num += 36; + Type1 = 7; + if (num == 16 || num == 17) + Type1 = 26; + if (num >= 46 && num <= 49) + Type1 = -1; + } + if (tileCache.type == (ushort) 241) + Type1 = 1; + if (tileCache.type == (ushort) 242) + Type1 = -1; + 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) 357 || tileCache.type == (ushort) 367) + Type1 = 236; + if (tileCache.type == (ushort) 368 || tileCache.type == (ushort) 369) + 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) 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) + { + int num = (int) tileCache.frameY / 18; + Type1 = num == 0 || num == 9 || num == 10 || num == 11 || num == 12 ? 7 : (num != 1 ? (num != 2 ? (num != 3 ? (num != 4 ? (num != 5 ? (num != 13 ? (num != 14 ? (num < 15 || num > 16 ? (num != 17 ? (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 ? 1 : 80) : 5) : 148) : 78) : 10) : 68 + Main.rand.Next(3)) : 236) : 240) : 23) : 226) : 40) : 147) : 78) : 8) : 1) : 4) : 214) : 214) : 215) : -1) : 13) : 109) : 126) : 26) : 79) : 78) : 77); + } + if (tileCache.type == (ushort) 79) + { + int num = (int) tileCache.frameY / 36; + Type1 = num != 0 ? (num != 1 ? (num != 2 ? (num != 3 ? (num != 4 ? (num != 8 ? (num < 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) + Type1 = -1; + if (tileCache.type >= (ushort) byte.MaxValue && tileCache.type <= (ushort) 261) + { + int num = (int) tileCache.type - (int) byte.MaxValue; + Type1 = 86 + num; + if (num == 6) + Type1 = 138; + } + if (tileCache.type >= (ushort) 262 && tileCache.type <= (ushort) 268) + { + int num = (int) tileCache.type - 262; + Type1 = 86 + num; + if (num == 6) + Type1 = 138; + } + if (tileCache.type == (ushort) 178) + { + int num = (int) tileCache.frameX / 18; + Type1 = 86 + num; + if (num == 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; + } + 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; + } + 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) + Type1 = 1; + if (tileCache.type == (ushort) 239) + { + int num = (int) tileCache.frameX / 18; + if (num == 0) + Type1 = 9; + if (num == 1) + Type1 = 81; + if (num == 2) + Type1 = 8; + if (num == 3) + Type1 = 82; + if (num == 4) + Type1 = 11; + if (num == 5) + Type1 = 83; + if (num == 6) + Type1 = 10; + if (num == 7) + Type1 = 84; + if (num == 8) + Type1 = 14; + if (num == 9) + Type1 = 23; + if (num == 10) + Type1 = 25; + if (num == 11) + Type1 = 48; + if (num == 12) + Type1 = 144; + if (num == 13) + Type1 = 49; + if (num == 14) + Type1 = 145; + if (num == 15) + Type1 = 50; + if (num == 16) + Type1 = 146; + if (num == 17) + Type1 = 128; + if (num == 18) + Type1 = 84; + if (num == 19) + Type1 = 117; + if (num == 20) + Type1 = 42; + if (num == 21) + Type1 = -1; + if (num == 22) + Type1 = 265; + } + if (tileCache.type == (ushort) 185) + { + if (tileCache.frameY == (short) 18) + { + int num = (int) tileCache.frameX / 36; + if (num < 6) + Type1 = 1; + else if (num < 16) + { + Type1 = 26; + } + else + { + switch (num) + { + 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 (num < 31) + { + Type1 = 80; + break; + } + if (num < 33) + { + Type1 = 7; + break; + } + if (num < 34) + { + Type1 = 8; + break; + } + if (num < 39) + { + Type1 = 30; + break; + } + if (num < 42) + { + Type1 = 1; + break; + } + break; + } + } + } + else + { + int num = (int) tileCache.frameX / 18; + if (num < 6) + Type1 = 1; + else if (num < 12) + Type1 = 0; + else if (num < 27) + Type1 = 26; + else if (num < 32) + Type1 = 1; + else if (num < 35) + Type1 = 0; + else if (num < 46) + Type1 = 80; + else if (num < 52) + Type1 = 30; + } + } + if (tileCache.type == (ushort) 184) + { + int num = (int) tileCache.frameX / 22; + Type1 = num != 5 ? 93 + num : 258; + } + 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) + 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) 2) + Type1 = WorldGen.genRand.Next(2) != 0 ? 2 : 0; + if (Main.tileMoss[(int) tileCache.type]) + Type1 = tileCache.type != (ushort) 381 ? (int) tileCache.type - 179 + 93 : 258; + 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) + { + 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; + 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) 413 || tileCache.type == (ushort) 414) + { + 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) 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.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) + 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) 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) + 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) 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) + 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 num = (int) tileCache.frameX / 18; + if (num == 0) + Type1 = 3; + if (num == 1) + Type1 = 3; + if (num == 2) + Type1 = 7; + if (num == 3) + Type1 = 17; + if (num == 4) + Type1 = 3; + if (num == 5) + Type1 = 6; + if (num == 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) + 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 num = (int) tileCache.frameY / 22; + switch (num) + { + case 0: + Type1 = 6; + break; + case 8: + Type1 = 75; + break; + case 9: + Type1 = 135; + break; + case 10: + Type1 = 158; + break; + case 11: + Type1 = 169; + break; + case 12: + Type1 = 156; + break; + case 13: + Type1 = 234; + break; + case 14: + Type1 = 66; + break; + case 15: + Type1 = 242; + break; + default: + Type1 = 58 + num; + break; + } + } + 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) 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) + 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) 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) + 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) + { + Tile tile = Main.tile[x, y]; + return tile.type == (ushort) 10 && tile.frameY >= (short) 594 && tile.frameY <= (short) 646 && tile.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; + 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 index1 = i - num3; index1 < i + num3; ++index1) + { + for (int index2 = j - num3; index2 < j + num3; ++index2) + { + if (index1 < Main.maxTilesX - 10 && index1 > 10 && Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 211) + ++num5; + } + } + if (num5 > num1) + return false; + int num6 = 0; + for (int index3 = i - num4; index3 < i + num4; ++index3) + { + for (int index4 = j - num4; index4 < j + num4; ++index4) + { + if (index3 < Main.maxTilesX - 10 && index3 > 10 && Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 211) + ++num6; + } + } + return num6 <= num2; + } + + private static bool nearbyChlorophyte(int i, int j) + { + float num1 = 0.0f; + int num2 = 10; + 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 == 5.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(-5, 6); + int index8 = j + Main.rand.Next(-5, 6); + 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) 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) + return; + if (type == 23 || type == 25 || type == 32 || type == 112 || type == 163 || type == 400 || type == 398) + { + bool flag1 = true; + while (flag1) + { + flag1 = false; + int index9 = i + WorldGen.genRand.Next(-3, 4); + int index10 = j + WorldGen.genRand.Next(-3, 4); + bool flag2 = false; + switch (Main.tile[index9, index10].type) + { + case 59: + case 60: + flag2 = WorldGen.nearbyChlorophyte(index9, index10); + break; + default: + bool flag3 = false; + int index11 = index9; + int index12 = index10; + for (int index13 = 0; index13 < 4; ++index13) + { + switch (index13) + { + case 0: + index11 = index9 - 1; + index12 = index10; + break; + case 1: + index11 = index9 + 1; + index12 = index10; + break; + case 2: + index11 = index9; + index12 = index10 - 1; + break; + case 3: + index11 = index9; + index12 = index10 + 1; + break; + } + if (Main.tile[index11, index12].active() && (Main.tile[index11, index12].type == (ushort) 59 || Main.tile[index11, index12].type == (ushort) 60)) + { + flag3 = true; + break; + } + } + if (flag3) + { + flag2 = WorldGen.nearbyChlorophyte(index9, index10); + break; + } + break; + } + if (!(Main.tile[index9, index10 - 1].type == (ushort) 27 | flag2)) + { + if (Main.tile[index9, index10].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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) + flag1 = 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 flag4 = true; + while (flag4) + { + flag4 = false; + int index14 = i + WorldGen.genRand.Next(-3, 4); + int index15 = j + WorldGen.genRand.Next(-3, 4); + bool flag5 = WorldGen.nearbyChlorophyte(index14, index15); + if (!(Main.tile[index14, index15 - 1].type == (ushort) 27 | flag5)) + { + if (Main.tile[index14, index15].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 199; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index14, index15].type]) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 203; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 53) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 234; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 396) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 401; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 397) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 399; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 59) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 0; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 60) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 199; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 69) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 352; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + else if (Main.tile[index14, index15].type == (ushort) 161) + { + if (WorldGen.genRand.Next(2) == 0) + flag4 = true; + Main.tile[index14, index15].type = (ushort) 200; + WorldGen.SquareTileFrame(index14, index15); + NetMessage.SendTileSquare(-1, index14, index15, 1); + } + } + } + } + if (type != 109 && type != 110 && type != 113 && type != 115 && type != 116 && type != 117 && type != 164 && type != 402 && type != 403) + return; + bool flag6 = true; + while (flag6) + { + flag6 = false; + int index16 = i + WorldGen.genRand.Next(-3, 4); + int index17 = j + WorldGen.genRand.Next(-3, 4); + if (Main.tile[index16, index17].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 109; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 1); + } + else if (Main.tile[index16, index17].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index16, index17].type]) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 117; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 1); + } + else if (Main.tile[index16, index17].type == (ushort) 53) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 116; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 1); + } + else if (Main.tile[index16, index17].type == (ushort) 396) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 403; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 1); + } + else if (Main.tile[index16, index17].type == (ushort) 397) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 402; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 1); + } + else if (Main.tile[index16, index17].type == (ushort) 161) + { + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + Main.tile[index16, index17].type = (ushort) 164; + WorldGen.SquareTileFrame(index16, index17); + NetMessage.SendTileSquare(-1, index16, index17, 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 bool SolidOrSlopedTile(int x, int y) => WorldGen.SolidOrSlopedTile(Main.tile[x, y]); + + public static bool SolidTile(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.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 true; + } + } + } + } + } + } + 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 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 (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 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 Vector2 Hive(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(12, 21); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(10, 21); + 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.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.2f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + num1 = num2 * (1.0 + (double) WorldGen.genRand.Next(-20, 20) * 0.00999999977648258); + float num4 = num3 - 1f; + int num5 = (int) ((double) vector2_1.X - num1); + int num6 = (int) ((double) vector2_1.X + num1); + int num7 = (int) ((double) vector2_1.Y - num1); + int num8 = (int) ((double) vector2_1.Y + num1); + if (num5 < 1) + num5 = 1; + if (num6 > Main.maxTilesX - 1) + num6 = Main.maxTilesX - 1; + if (num7 < 1) + num7 = 1; + if (num8 > Main.maxTilesY - 1) + num8 = Main.maxTilesY - 1; + for (int i1 = num5; i1 < num6; ++i1) + { + for (int j1 = num7; j1 < num8; ++j1) + { + double num9 = (double) Math.Abs((float) i1 - vector2_1.X); + float num10 = Math.Abs((float) j1 - vector2_1.Y); + double num11 = Math.Sqrt(num9 * num9 + (double) num10 * (double) num10); + if (num11 < num2 * 0.4 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.005)) + { + if (WorldGen.genRand.Next(3) == 0) + Main.tile[i1, j1].liquid = byte.MaxValue; + Main.tile[i1, j1].honey(true); + Main.tile[i1, j1].wall = (byte) 86; + Main.tile[i1, j1].active(false); + Main.tile[i1, j1].halfBrick(false); + Main.tile[i1, j1].slope((byte) 0); + WorldGen.SquareWallFrame(i1, j1); + } + else if (num11 < num2 * 0.75 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.005)) + { + Main.tile[i1, j1].liquid = (byte) 0; + if (Main.tile[i1, j1].wall != (byte) 86) + { + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].halfBrick(false); + Main.tile[i1, j1].slope((byte) 0); + Main.tile[i1, j1].type = (ushort) 225; + } + } + if (num11 < num2 * 0.6 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.005)) + Main.tile[i1, j1].wall = (byte) 86; + WorldGen.SquareWallFrame(i1, j1); + WorldGen.SquareTileFrame(i1, j1); + } + } + vector2_1 += vector2_2; + num3 = num4 - 1f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + } + return new Vector2(vector2_1.X, vector2_1.Y); + } + + 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 > (byte) 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 != (byte) 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 = (byte) 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 == (byte) 27 && !Main.tile[i2, j5].active()) + { + if (Main.tile[i2 - 1, j5].wall != (byte) 27 && i2 < i && !WorldGen.SolidTile(i2 - 1, j5)) + { + WorldGen.PlaceTile(i2, j5, 30, true); + Main.tile[i2, j5].wall = (byte) 0; + } + if (Main.tile[i2 + 1, j5].wall != (byte) 27 && i2 > i && !WorldGen.SolidTile(i2 + 1, j5)) + { + WorldGen.PlaceTile(i2, j5, 30, true); + Main.tile[i2, j5].wall = (byte) 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 == (byte) 27 && Main.tile[i2 + 1, j5].wall == (byte) 27 && (Main.tile[i2, j5 - 1].wall == (byte) 27 || Main.tile[i2, j5 - 1].active()) && (Main.tile[i2, j5 + 1].wall == (byte) 27 || Main.tile[i2, j5 + 1].active())) + { + Main.tile[i2, j5].active(false); + Main.tile[i2, j5].wall = (byte) 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 == (byte) 27 && Main.tile[index3 + 1, index4].wall == (byte) 27 && !Main.tile[index3 - 1, index4].active() && !Main.tile[index3 + 1, index4].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (byte) 27; + } + if (!TileID.Sets.BasicChest[(int) Main.tile[index3, index4 - 1].type] && Main.tile[index3 - 1, index4].wall == (byte) 27 && Main.tile[index3 + 1, index4].type == (ushort) 30 && Main.tile[index3 + 2, index4].wall == (byte) 27 && !Main.tile[index3 - 1, index4].active() && !Main.tile[index3 + 2, index4].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (byte) 27; + Main.tile[index3 + 1, index4].active(false); + Main.tile[index3 + 1, index4].wall = (byte) 27; + } + if (Main.tile[index3, index4 - 1].wall == (byte) 27 && Main.tile[index3, index4 + 1].wall == (byte) 27 && !Main.tile[index3, index4 - 1].active() && !Main.tile[index3, index4 + 1].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (byte) 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 == (byte) 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 == (byte) 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 == (byte) 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 != (byte) 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 == (byte) 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 + { + 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 != (byte) 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 == (byte) 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 != (byte) 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 == (byte) 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 != (byte) 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 == (byte) 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[1] + WorldGen.tileCounts[60] + WorldGen.tileCounts[53] + WorldGen.tileCounts[161]; + WorldGen.totalSolid2 += WorldGen.tileCounts[164] + WorldGen.tileCounts[109] + 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.maxTilesY - 200) + 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); + } + } + + public static void UpdateWorld() + { + int wallDist = 20; + int maxValue1 = 40; + if (Main.expertMode) + maxValue1 = 30; + 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; + } + } + if (Main.worldRate == 0) + return; + ++Liquid.skipCount; + if (Liquid.skipCount > 1) + { + Liquid.UpdateLiquid(); + Liquid.skipCount = 0; + } + float num1 = 3E-05f * (float) Main.worldRate; + float num2 = 1.5E-05f * (float) Main.worldRate; + bool flag1 = false; + ++WorldGen.spawnDelay; + if (Main.invasionType > 0 || Main.eclipse) + WorldGen.spawnDelay = 0; + if (WorldGen.spawnDelay >= 20) + { + flag1 = true; + WorldGen.spawnDelay = 0; + if (WorldGen.prioritizedTownNPC != 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.prioritizedTownNPC = Main.npc[index].type; + break; + } + } + } + } + float num3 = (float) (Main.maxTilesX * Main.maxTilesY) * num1; + int num4 = 151; + int maxValue2 = (int) MathHelper.Lerp((float) num4, (float) num4 * 2.8f, MathHelper.Clamp((float) ((double) Main.maxTilesX / 4200.0 - 1.0), 0.0f, 1f)); + for (int index1 = 0; (double) index1 < (double) num3; ++index1) + { + if (Main.rand.Next(100) == 0 && Main.rand.Next(maxValue2) == 0) + WorldGen.PlantAlch(); + int index2 = WorldGen.genRand.Next(10, Main.maxTilesX - 10); + int index3 = WorldGen.genRand.Next(10, (int) Main.worldSurface - 1); + int num5 = index2 - 1; + int num6 = index2 + 2; + int index4 = index3 - 1; + int num7 = index3 + 2; + if (num5 < 10) + num5 = 10; + if (num6 > Main.maxTilesX - 10) + num6 = Main.maxTilesX - 10; + if (index4 < 10) + index4 = 10; + if (num7 > Main.maxTilesY - 10) + num7 = Main.maxTilesY - 10; + if (Main.tile[index2, index3] != null) + { + if (Main.tileAlch[(int) Main.tile[index2, index3].type]) + WorldGen.GrowAlch(index2, index3); + if (Main.tile[index2, index3].liquid > (byte) 32) + { + if (Main.tile[index2, index3].active() && (Main.tile[index2, index3].type == (ushort) 3 || Main.tile[index2, index3].type == (ushort) 20 || Main.tile[index2, index3].type == (ushort) 24 || Main.tile[index2, index3].type == (ushort) 27 || Main.tile[index2, index3].type == (ushort) 73 || Main.tile[index2, index3].type == (ushort) 201)) + { + WorldGen.KillTile(index2, index3); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) index2), number3: ((float) index3)); + } + } + else if (Main.tile[index2, index3].nactive()) + { + WorldGen.hardUpdateWorld(index2, index3); + if (Main.rand.Next(3000) == 0) + WorldGen.plantDye(index2, index3); + if (Main.rand.Next(9001) == 0) + WorldGen.plantDye(index2, index3, true); + if (Main.tile[index2, index3].type == (ushort) 80) + { + if (WorldGen.genRand.Next(15) == 0) + WorldGen.GrowCactus(index2, index3); + } + else if (TileID.Sets.Conversion.Sand[(int) Main.tile[index2, index3].type]) + { + if (!Main.tile[index2, index4].active()) + { + if (index2 < 250 || index2 > Main.maxTilesX - 250) + { + if (WorldGen.genRand.Next(500) == 0) + { + int num8 = 7; + int num9 = 6; + int num10 = 0; + for (int index5 = index2 - num8; index5 <= index2 + num8; ++index5) + { + for (int index6 = index4 - num8; index6 <= index4 + num8; ++index6) + { + if (Main.tile[index5, index6].active() && Main.tile[index5, index6].type == (ushort) 81) + ++num10; + } + } + if (num10 < num9 && Main.tile[index2, index4].liquid == byte.MaxValue && Main.tile[index2, index4 - 1].liquid == byte.MaxValue && Main.tile[index2, index4 - 2].liquid == byte.MaxValue && Main.tile[index2, index4 - 3].liquid == byte.MaxValue && Main.tile[index2, index4 - 4].liquid == byte.MaxValue) + { + WorldGen.PlaceTile(index2, index4, 81, true); + if (Main.netMode == 2 && Main.tile[index2, index4].active()) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + } + } + else if (index2 > 400 && index2 < Main.maxTilesX - 400 && WorldGen.genRand.Next(300) == 0) + WorldGen.GrowCactus(index2, index3); + } + } + else if (Main.tile[index2, index3].type == (ushort) 116 || Main.tile[index2, index3].type == (ushort) 112 || Main.tile[index2, index3].type == (ushort) 234) + { + if (!Main.tile[index2, index4].active() && index2 > 400 && index2 < Main.maxTilesX - 400 && WorldGen.genRand.Next(300) == 0) + WorldGen.GrowCactus(index2, index3); + } + else if (Main.tile[index2, index3].type == (ushort) 147 || Main.tile[index2, index3].type == (ushort) 161 || Main.tile[index2, index3].type == (ushort) 163 || Main.tile[index2, index3].type == (ushort) 164 || Main.tile[index2, index3].type == (ushort) 200) + { + if (Main.rand.Next(10) == 0 && !Main.tile[index2, index3 + 1].active() && !Main.tile[index2, index3 + 2].active()) + { + int num11 = index2 - 3; + int num12 = index2 + 4; + int num13 = 0; + for (int index7 = num11; index7 < num12; ++index7) + { + if (Main.tile[index7, index3].type == (ushort) 165 && Main.tile[index7, index3].active()) + ++num13; + if (Main.tile[index7, index3 + 1].type == (ushort) 165 && Main.tile[index7, index3 + 1].active()) + ++num13; + if (Main.tile[index7, index3 + 2].type == (ushort) 165 && Main.tile[index7, index3 + 2].active()) + ++num13; + if (Main.tile[index7, index3 + 3].type == (ushort) 165 && Main.tile[index7, index3 + 3].active()) + ++num13; + } + if (num13 < 2) + { + WorldGen.PlaceTight(index2, index3 + 1); + WorldGen.SquareTileFrame(index2, index3 + 1); + if (Main.netMode == 2 && Main.tile[index2, index3 + 1].active()) + NetMessage.SendTileSquare(-1, index2, index3 + 1, 3); + } + } + } + else if (Main.tile[index2, index3].type == (ushort) 254) + { + if (Main.rand.Next(((int) Main.tile[index2, index3].frameX + 10) / 10) == 0) + WorldGen.GrowPumpkin(index2, index3, 254); + } + else if (Main.tile[index2, index3].type == (ushort) 78 || Main.tile[index2, index3].type == (ushort) 380) + { + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(index2, index4, 3, true); + if (Main.netMode == 2 && Main.tile[index2, index4].active()) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + } + else if (Main.tile[index2, index3].type == (ushort) 2 || Main.tile[index2, index3].type == (ushort) 23 || Main.tile[index2, index3].type == (ushort) 32 || Main.tile[index2, index3].type == (ushort) 109 || Main.tile[index2, index3].type == (ushort) 199 || Main.tile[index2, index3].type == (ushort) 352) + { + int grass = (int) Main.tile[index2, index3].type; + if (Main.halloween && WorldGen.genRand.Next(75) == 0 && (grass == 2 || grass == 109)) + { + int num14 = 100; + int num15 = 0; + for (int index8 = index2 - num14; index8 < index2 + num14; index8 += 2) + { + for (int index9 = index3 - num14; index9 < index3 + num14; index9 += 2) + { + if (index8 > 1 && index8 < Main.maxTilesX - 2 && index9 > 1 && index9 < Main.maxTilesY - 2 && Main.tile[index8, index9].active() && Main.tile[index8, index9].type == (ushort) 254) + ++num15; + } + } + if (num15 < 6) + { + WorldGen.PlacePumpkin(index2, index4); + if (Main.netMode == 2 && Main.tile[index2, index4].type == (ushort) 254) + NetMessage.SendTileSquare(-1, index2, index4, 4); + } + } + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(12) == 0 && grass == 2 && WorldGen.PlaceTile(index2, index4, 3, true)) + { + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(10) == 0 && grass == 23 && WorldGen.PlaceTile(index2, index4, 24, true)) + { + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(10) == 0 && grass == 109 && WorldGen.PlaceTile(index2, index4, 110, true)) + { + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(10) == 0 && grass == 199 && WorldGen.PlaceTile(index2, index4, 201, true)) + { + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + bool flag2 = false; + for (int i = num5; i < num6; ++i) + { + for (int j = index4; j < num7; ++j) + { + if ((index2 != i || index3 != j) && Main.tile[i, j].active()) + { + if (grass == 32) + grass = 23; + if (grass == 352) + grass = 199; + if (Main.tile[i, j].type == (ushort) 0 || grass == 23 && Main.tile[i, j].type == (ushort) 2 || grass == 199 && Main.tile[i, j].type == (ushort) 2 || grass == 23 && Main.tile[i, j].type == (ushort) 109) + { + WorldGen.SpreadGrass(i, j, grass: grass, repeat: false, color: Main.tile[index2, index3].color()); + if (grass == 23) + WorldGen.SpreadGrass(i, j, 2, grass, false, Main.tile[index2, index3].color()); + if (grass == 23) + WorldGen.SpreadGrass(i, j, 109, grass, false, Main.tile[index2, index3].color()); + if (grass == 199) + WorldGen.SpreadGrass(i, j, 2, grass, false, Main.tile[index2, index3].color()); + if (grass == 199) + WorldGen.SpreadGrass(i, j, 109, grass, false, Main.tile[index2, index3].color()); + if ((int) Main.tile[i, j].type == grass) + { + WorldGen.SquareTileFrame(i, j); + flag2 = true; + } + } + if (Main.tile[i, j].type == (ushort) 0 || grass == 109 && Main.tile[i, j].type == (ushort) 2 || grass == 109 && Main.tile[i, j].type == (ushort) 23 || grass == 109 && Main.tile[i, j].type == (ushort) 199) + { + WorldGen.SpreadGrass(i, j, grass: grass, repeat: false, color: Main.tile[index2, index3].color()); + if (grass == 109) + WorldGen.SpreadGrass(i, j, 2, grass, false, Main.tile[index2, index3].color()); + if (grass == 109) + WorldGen.SpreadGrass(i, j, 23, grass, false, Main.tile[index2, index3].color()); + if (grass == 109) + WorldGen.SpreadGrass(i, j, 199, grass, false, Main.tile[index2, index3].color()); + if ((int) Main.tile[i, j].type == grass) + { + WorldGen.SquareTileFrame(i, j); + flag2 = true; + } + } + } + } + } + if (Main.netMode == 2 & flag2) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + else if (Main.tile[index2, index3].type == (ushort) 20 && WorldGen.genRand.Next(20) == 0) + { + bool flag3 = WorldGen.PlayerLOS(index2, index3); + if ((Main.tile[index2, index3].frameX < (short) 324 || Main.tile[index2, index3].frameX >= (short) 540 ? WorldGen.GrowTree(index2, index3) : WorldGen.GrowPalmTree(index2, index3)) & flag3) + WorldGen.TreeGrowFXCheck(index2, index3); + } + if (Main.tile[index2, index3].type == (ushort) 3 && WorldGen.genRand.Next(20) == 0 && Main.tile[index2, index3].frameX != (short) 144) + { + if (Main.tile[index2, index3].frameX < (short) 144 && Main.rand.Next(10) == 0 || (Main.tile[index2, index3 + 1].type == (ushort) 78 || Main.tile[index2, index3 + 1].type == (ushort) 380) && Main.rand.Next(2) == 0) + Main.tile[index2, index3].frameX = (short) (198 + WorldGen.genRand.Next(10) * 18); + Main.tile[index2, index3].type = (ushort) 73; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + if (Main.tile[index2, index3].type == (ushort) 110 && WorldGen.genRand.Next(20) == 0 && Main.tile[index2, index3].frameX < (short) 144) + { + Main.tile[index2, index3].type = (ushort) 113; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + if (Main.tile[index2, index3].type == (ushort) 32 && WorldGen.genRand.Next(3) == 0) + { + int index10 = index2; + int index11 = index3; + int num16 = 0; + if (Main.tile[index10 + 1, index11].active() && Main.tile[index10 + 1, index11].type == (ushort) 32) + ++num16; + if (Main.tile[index10 - 1, index11].active() && Main.tile[index10 - 1, index11].type == (ushort) 32) + ++num16; + if (Main.tile[index10, index11 + 1].active() && Main.tile[index10, index11 + 1].type == (ushort) 32) + ++num16; + if (Main.tile[index10, index11 - 1].active() && Main.tile[index10, index11 - 1].type == (ushort) 32) + ++num16; + if (num16 < 3 || Main.tile[index2, index3].type == (ushort) 23) + { + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index11; + break; + case 1: + ++index11; + break; + case 2: + --index10; + break; + case 3: + ++index10; + break; + } + if (!Main.tile[index10, index11].active()) + { + int num17 = 0; + if (Main.tile[index10 + 1, index11].active() && Main.tile[index10 + 1, index11].type == (ushort) 32) + ++num17; + if (Main.tile[index10 - 1, index11].active() && Main.tile[index10 - 1, index11].type == (ushort) 32) + ++num17; + if (Main.tile[index10, index11 + 1].active() && Main.tile[index10, index11 + 1].type == (ushort) 32) + ++num17; + if (Main.tile[index10, index11 - 1].active() && Main.tile[index10, index11 - 1].type == (ushort) 32) + ++num17; + if (num17 < 2) + { + int num18 = 7; + int num19 = index10 - num18; + int num20 = index10 + num18; + int num21 = index11 - num18; + int num22 = index11 + num18; + bool flag4 = false; + for (int index12 = num19; index12 < num20; ++index12) + { + for (int index13 = num21; index13 < num22; ++index13) + { + if (Math.Abs(index12 - index10) * 2 + Math.Abs(index13 - index11) < 9 && Main.tile[index12, index13].active() && Main.tile[index12, index13].type == (ushort) 23 && Main.tile[index12, index13 - 1].active() && Main.tile[index12, index13 - 1].type == (ushort) 32 && Main.tile[index12, index13 - 1].liquid == (byte) 0) + { + flag4 = true; + break; + } + } + } + if (flag4) + { + Main.tile[index10, index11].type = (ushort) 32; + Main.tile[index10, index11].active(true); + WorldGen.SquareTileFrame(index10, index11); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index10, index11, 3); + } + } + } + } + } + if (Main.tile[index2, index3].type == (ushort) 352 && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowSpike(index2, index3, (ushort) 352, (ushort) 199); + } + else if (flag1) + WorldGen.TrySpawningTownNPC(index2, index3); + if (Main.tile[index2, index3].wall == (byte) 81 || Main.tile[index2, index3].wall == (byte) 83 || Main.tile[index2, index3].type == (ushort) 199 && Main.tile[index2, index3].active()) + { + int tileX = index2 + WorldGen.genRand.Next(-2, 3); + int tileY = index3 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (byte) 63 && Main.tile[tileX, tileY].wall <= (byte) 68) + { + bool flag5 = false; +label_213: + for (int index14 = index2 - wallDist; index14 < index2 + wallDist; ++index14) + { + for (int index15 = index3 - wallDist; index15 < index3 + wallDist; ++index15) + { + if (Main.tile[index2, index3].active()) + { + switch (Main.tile[index2, index3].type) + { + case 199: + case 200: + case 201: + case 203: + case 205: + case 234: + case 352: + flag5 = true; + goto label_213; + default: + continue; + } + } + } + } + if (flag5) + { + Main.tile[tileX, tileY].wall = (byte) 81; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + if (Main.tile[index2, index3].wall == (byte) 69 || Main.tile[index2, index3].wall == (byte) 3 || Main.tile[index2, index3].type == (ushort) 23 && Main.tile[index2, index3].active()) + { + int tileX = index2 + WorldGen.genRand.Next(-2, 3); + int tileY = index3 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (byte) 63 && Main.tile[tileX, tileY].wall <= (byte) 68) + { + bool flag6 = false; +label_227: + for (int index16 = index2 - wallDist; index16 < index2 + wallDist; ++index16) + { + for (int index17 = index3 - wallDist; index17 < index3 + wallDist; ++index17) + { + if (Main.tile[index16, index17].active()) + { + switch (Main.tile[index16, index17].type) + { + case 22: + case 23: + case 24: + case 25: + case 32: + case 112: + case 163: + flag6 = true; + goto label_227; + default: + continue; + } + } + } + } + if (flag6) + { + Main.tile[tileX, tileY].wall = (byte) 69; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + if (Main.tile[index2, index3].wall == (byte) 70 || Main.tile[index2, index3].type == (ushort) 109 && Main.tile[index2, index3].active()) + { + int tileX = index2 + WorldGen.genRand.Next(-2, 3); + int tileY = index3 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall == (byte) 63 || Main.tile[tileX, tileY].wall == (byte) 65 || Main.tile[tileX, tileY].wall == (byte) 66 || Main.tile[tileX, tileY].wall == (byte) 68) + { + bool flag7 = false; +label_241: + for (int index18 = index2 - wallDist; index18 < index2 + wallDist; ++index18) + { + for (int index19 = index3 - wallDist; index19 < index3 + wallDist; ++index19) + { + if (Main.tile[index18, index19].active()) + { + switch (Main.tile[index18, index19].type) + { + case 109: + case 110: + case 113: + case 115: + case 116: + case 117: + case 164: + flag7 = true; + goto label_241; + default: + continue; + } + } + } + } + if (flag7) + { + Main.tile[tileX, tileY].wall = (byte) 70; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + WorldGen.SpreadDesertWalls(wallDist, index2, index3); + if (Main.tile[index2, index3].active()) + { + if ((Main.tile[index2, index3].type == (ushort) 2 || Main.tile[index2, index3].type == (ushort) 52 || Main.tile[index2, index3].type == (ushort) 192 && WorldGen.genRand.Next(10) == 0) && WorldGen.genRand.Next(40) == 0 && !Main.tile[index2, index3 + 1].active() && !Main.tile[index2, index3 + 1].lava()) + { + bool flag8 = false; + for (int index20 = index3; index20 > index3 - 10; --index20) + { + if (Main.tile[index2, index20].bottomSlope()) + { + flag8 = false; + break; + } + if (Main.tile[index2, index20].active() && Main.tile[index2, index20].type == (ushort) 2 && !Main.tile[index2, index20].bottomSlope()) + { + flag8 = true; + break; + } + } + if (flag8) + { + int index21 = index2; + int index22 = index3 + 1; + Main.tile[index21, index22].type = (ushort) 52; + Main.tile[index21, index22].active(true); + Main.tile[index21, index22].color(Main.tile[index2, index3].color()); + WorldGen.SquareTileFrame(index21, index22); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index21, index22, 3); + } + } + if (Main.tile[index2, index3].type == (ushort) 70) + { + int type = (int) Main.tile[index2, index3].type; + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(10) == 0) + { + WorldGen.PlaceTile(index2, index4, 71, true); + if (Main.tile[index2, index4].active()) + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2 && Main.tile[index2, index4].active()) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + if (WorldGen.genRand.Next(100) == 0) + { + bool flag9 = WorldGen.PlayerLOS(index2, index3); + if (WorldGen.GrowTree(index2, index3) & flag9) + WorldGen.TreeGrowFXCheck(index2, index3 - 1); + } + bool flag10 = false; + for (int i = num5; i < num6; ++i) + { + for (int j = index4; j < num7; ++j) + { + if ((index2 != i || index3 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 59) + { + WorldGen.SpreadGrass(i, j, 59, type, false, Main.tile[index2, index3].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag10 = true; + } + } + } + } + if (Main.netMode == 2 & flag10) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + if (Main.tile[index2, index3].type == (ushort) 60) + { + int type = (int) Main.tile[index2, index3].type; + if (!Main.tile[index2, index4].active() && WorldGen.genRand.Next(7) == 0) + { + WorldGen.PlaceTile(index2, index4, 61, true); + if (Main.tile[index2, index4].active()) + Main.tile[index2, index4].color(Main.tile[index2, index3].color()); + if (Main.netMode == 2 && Main.tile[index2, index4].active()) + NetMessage.SendTileSquare(-1, index2, index4, 1); + } + else if (WorldGen.genRand.Next(500) == 0 && (!Main.tile[index2, index4].active() || Main.tile[index2, index4].type == (ushort) 61 || Main.tile[index2, index4].type == (ushort) 74 || Main.tile[index2, index4].type == (ushort) 69)) + { + if (WorldGen.GrowTree(index2, index3) && WorldGen.PlayerLOS(index2, index3)) + WorldGen.TreeGrowFXCheck(index2, index3 - 1); + } + else if (WorldGen.genRand.Next(25) == 0 && Main.tile[index2, index4].liquid == (byte) 0) + { + WorldGen.PlaceJunglePlant(index2, index4, (ushort) 233, WorldGen.genRand.Next(8), 0); + if (Main.tile[index2, index4].type == (ushort) 233) + { + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, index2, index4, 4); + } + else + { + WorldGen.PlaceJunglePlant(index2, index4, (ushort) 233, WorldGen.genRand.Next(12), 1); + if (Main.tile[index2, index4].type == (ushort) 233 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index4, 3); + } + } + } + bool flag11 = false; + for (int i = num5; i < num6; ++i) + { + for (int j = index4; j < num7; ++j) + { + if ((index2 != i || index3 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 59) + { + WorldGen.SpreadGrass(i, j, 59, type, false, Main.tile[index2, index3].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag11 = true; + } + } + } + } + if (Main.netMode == 2 & flag11) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + if (Main.tile[index2, index3].type == (ushort) 61 && WorldGen.genRand.Next(3) == 0 && Main.tile[index2, index3].frameX < (short) 144) + { + if (Main.rand.Next(4) == 0) + Main.tile[index2, index3].frameX = (short) (162 + WorldGen.genRand.Next(8) * 18); + Main.tile[index2, index3].type = (ushort) 74; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index2, index3, 3); + } + if ((Main.tile[index2, index3].type == (ushort) 60 || Main.tile[index2, index3].type == (ushort) 62) && WorldGen.genRand.Next(15) == 0 && !Main.tile[index2, index3 + 1].active() && !Main.tile[index2, index3 + 1].lava()) + { + bool flag12 = false; + for (int index23 = index3; index23 > index3 - 10; --index23) + { + if (Main.tile[index2, index23].bottomSlope()) + { + flag12 = false; + break; + } + if (Main.tile[index2, index23].active() && Main.tile[index2, index23].type == (ushort) 60 && !Main.tile[index2, index23].bottomSlope()) + { + flag12 = true; + break; + } + } + if (flag12) + { + int index24 = index2; + int index25 = index3 + 1; + Main.tile[index24, index25].type = (ushort) 62; + Main.tile[index24, index25].active(true); + WorldGen.SquareTileFrame(index24, index25); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index24, index25, 3); + } + } + if ((Main.tile[index2, index3].type == (ushort) 109 || Main.tile[index2, index3].type == (ushort) 115) && WorldGen.genRand.Next(15) == 0 && !Main.tile[index2, index3 + 1].active() && !Main.tile[index2, index3 + 1].lava()) + { + bool flag13 = false; + for (int index26 = index3; index26 > index3 - 10; --index26) + { + if (Main.tile[index2, index26].bottomSlope()) + { + flag13 = false; + break; + } + if (Main.tile[index2, index26].active() && Main.tile[index2, index26].type == (ushort) 109 && !Main.tile[index2, index26].bottomSlope()) + { + flag13 = true; + break; + } + } + if (flag13) + { + int index27 = index2; + int index28 = index3 + 1; + Main.tile[index27, index28].type = (ushort) 115; + Main.tile[index27, index28].active(true); + WorldGen.SquareTileFrame(index27, index28); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index27, index28, 3); + } + } + if ((Main.tile[index2, index3].type == (ushort) 199 || Main.tile[index2, index3].type == (ushort) 205) && WorldGen.genRand.Next(15) == 0 && !Main.tile[index2, index3 + 1].active() && !Main.tile[index2, index3 + 1].lava()) + { + bool flag14 = false; + for (int index29 = index3; index29 > index3 - 10; --index29) + { + if (Main.tile[index2, index29].bottomSlope()) + { + flag14 = false; + break; + } + if (Main.tile[index2, index29].active() && Main.tile[index2, index29].type == (ushort) 199 && !Main.tile[index2, index29].bottomSlope()) + { + flag14 = true; + break; + } + } + if (flag14) + { + int index30 = index2; + int index31 = index3 + 1; + Main.tile[index30, index31].type = (ushort) 205; + Main.tile[index30, index31].active(true); + WorldGen.SquareTileFrame(index30, index31); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index30, index31, 3); + } + } + } + } + } + for (int index32 = 0; (double) index32 < (double) (Main.maxTilesX * Main.maxTilesY) * (double) num2; ++index32) + { + int index33 = WorldGen.genRand.Next(10, Main.maxTilesX - 10); + int index34 = WorldGen.genRand.Next((int) Main.worldSurface - 1, Main.maxTilesY - 20); + int num23 = index33 - 1; + int num24 = index33 + 2; + int index35 = index34 - 1; + int num25 = index34 + 2; + if (num23 < 10) + num23 = 10; + if (num24 > Main.maxTilesX - 10) + num24 = Main.maxTilesX - 10; + if (index35 < 10) + index35 = 10; + if (num25 > Main.maxTilesY - 10) + num25 = Main.maxTilesY - 10; + if (Main.tile[index33, index34] != null) + { + if (Main.tileAlch[(int) Main.tile[index33, index34].type]) + WorldGen.GrowAlch(index33, index34); + if (Main.tile[index33, index34].liquid <= (byte) 32) + { + if (Main.tile[index33, index34].nactive()) + { + WorldGen.hardUpdateWorld(index33, index34); + if (Main.rand.Next(3000) == 0) + WorldGen.plantDye(index33, index34); + if (Main.rand.Next(4500) == 0) + WorldGen.plantDye(index33, index34, true); + if (Main.tile[index33, index34].type == (ushort) 23 && !Main.tile[index33, index35].active() && WorldGen.genRand.Next(1) == 0) + { + WorldGen.PlaceTile(index33, index35, 24, true); + if (Main.netMode == 2 && Main.tile[index33, index35].active()) + NetMessage.SendTileSquare(-1, index33, index35, 1); + } + if (Main.tile[index33, index34].type == (ushort) 32 && WorldGen.genRand.Next(3) == 0) + { + int index36 = index33; + int index37 = index34; + int num26 = 0; + if (Main.tile[index36 + 1, index37].active() && Main.tile[index36 + 1, index37].type == (ushort) 32) + ++num26; + if (Main.tile[index36 - 1, index37].active() && Main.tile[index36 - 1, index37].type == (ushort) 32) + ++num26; + if (Main.tile[index36, index37 + 1].active() && Main.tile[index36, index37 + 1].type == (ushort) 32) + ++num26; + if (Main.tile[index36, index37 - 1].active() && Main.tile[index36, index37 - 1].type == (ushort) 32) + ++num26; + if (num26 < 3 || Main.tile[index33, index34].type == (ushort) 23) + { + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index37; + break; + case 1: + ++index37; + break; + case 2: + --index36; + break; + case 3: + ++index36; + break; + } + if (!Main.tile[index36, index37].active()) + { + int num27 = 0; + if (Main.tile[index36 + 1, index37].active() && Main.tile[index36 + 1, index37].type == (ushort) 32) + ++num27; + if (Main.tile[index36 - 1, index37].active() && Main.tile[index36 - 1, index37].type == (ushort) 32) + ++num27; + if (Main.tile[index36, index37 + 1].active() && Main.tile[index36, index37 + 1].type == (ushort) 32) + ++num27; + if (Main.tile[index36, index37 - 1].active() && Main.tile[index36, index37 - 1].type == (ushort) 32) + ++num27; + if (num27 < 2) + { + int num28 = 7; + int num29 = index36 - num28; + int num30 = index36 + num28; + int num31 = index37 - num28; + int num32 = index37 + num28; + bool flag15 = false; + for (int index38 = num29; index38 < num30; ++index38) + { + for (int index39 = num31; index39 < num32; ++index39) + { + if (Math.Abs(index38 - index36) * 2 + Math.Abs(index39 - index37) < 9 && Main.tile[index38, index39].active() && Main.tile[index38, index39].type == (ushort) 23 && Main.tile[index38, index39 - 1].active() && Main.tile[index38, index39 - 1].type == (ushort) 32 && Main.tile[index38, index39 - 1].liquid == (byte) 0) + { + flag15 = true; + break; + } + } + } + if (flag15) + { + Main.tile[index36, index37].type = (ushort) 32; + Main.tile[index36, index37].active(true); + WorldGen.SquareTileFrame(index36, index37); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index36, index37, 3); + } + } + } + } + } + if (Main.tile[index33, index34].type == (ushort) 352 && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowSpike(index33, index34, (ushort) 352, (ushort) 199); + if (Main.tile[index33, index34].type == (ushort) 199) + { + int type = (int) Main.tile[index33, index34].type; + bool flag16 = false; + for (int i = num23; i < num24; ++i) + { + for (int j = index35; j < num25; ++j) + { + if ((index33 != i || index34 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 0) + { + WorldGen.SpreadGrass(i, j, grass: type, repeat: false, color: Main.tile[index33, index34].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag16 = true; + } + } + } + } + if (Main.netMode == 2 & flag16) + NetMessage.SendTileSquare(-1, index33, index34, 3); + } + if (Main.tile[index33, index34].type == (ushort) 60) + { + int type = (int) Main.tile[index33, index34].type; + if (!Main.tile[index33, index35].active() && WorldGen.genRand.Next(10) == 0) + { + WorldGen.PlaceTile(index33, index35, 61, true); + if (Main.netMode == 2 && Main.tile[index33, index35].active()) + NetMessage.SendTileSquare(-1, index33, index35, 1); + } + else if (WorldGen.genRand.Next(25) == 0 && Main.tile[index33, index35].liquid == (byte) 0) + { + if (Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && WorldGen.genRand.Next(60) == 0) + { + bool flag17 = true; + int num33 = 150; + for (int index40 = index33 - num33; index40 < index33 + num33; index40 += 2) + { + for (int index41 = index34 - num33; index41 < index34 + num33; index41 += 2) + { + if (index40 > 1 && index40 < Main.maxTilesX - 2 && index41 > 1 && index41 < Main.maxTilesY - 2 && Main.tile[index40, index41].active() && Main.tile[index40, index41].type == (ushort) 238) + { + flag17 = false; + break; + } + } + } + if (flag17) + { + WorldGen.PlaceJunglePlant(index33, index35, (ushort) 238, 0, 0); + WorldGen.SquareTileFrame(index33, index35); + WorldGen.SquareTileFrame(index33 + 1, index35 + 1); + if (Main.tile[index33, index35].type == (ushort) 238 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, index35, 4); + } + } + if (Main.hardMode && NPC.downedMechBossAny && WorldGen.genRand.Next(maxValue1) == 0) + { + bool flag18 = true; + int num34 = 60; + if (Main.expertMode) + num34 -= 10; + for (int index42 = index33 - num34; index42 < index33 + num34; index42 += 2) + { + for (int index43 = index34 - num34; index43 < index34 + num34; index43 += 2) + { + if (index42 > 1 && index42 < Main.maxTilesX - 2 && index43 > 1 && index43 < Main.maxTilesY - 2 && Main.tile[index42, index43].active() && Main.tile[index42, index43].type == (ushort) 236) + { + flag18 = false; + break; + } + } + } + if (flag18) + { + WorldGen.PlaceJunglePlant(index33, index35, (ushort) 236, WorldGen.genRand.Next(3), 0); + WorldGen.SquareTileFrame(index33, index35); + WorldGen.SquareTileFrame(index33 + 1, index35 + 1); + if (Main.tile[index33, index35].type == (ushort) 236 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, index35, 4); + } + } + else + { + WorldGen.PlaceJunglePlant(index33, index35, (ushort) 233, WorldGen.genRand.Next(8), 0); + if (Main.tile[index33, index35].type == (ushort) 233) + { + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, index33, index35, 4); + } + else + { + WorldGen.PlaceJunglePlant(index33, index35, (ushort) 233, WorldGen.genRand.Next(12), 1); + if (Main.tile[index33, index35].type == (ushort) 233 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, index35, 3); + } + } + } + } + bool flag19 = false; + for (int i = num23; i < num24; ++i) + { + for (int j = index35; j < num25; ++j) + { + if ((index33 != i || index34 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 59) + { + WorldGen.SpreadGrass(i, j, 59, type, false, Main.tile[index33, index34].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag19 = true; + } + } + } + } + if (Main.netMode == 2 & flag19) + NetMessage.SendTileSquare(-1, index33, index34, 3); + } + if (Main.tile[index33, index34].type == (ushort) 61 && WorldGen.genRand.Next(3) == 0 && Main.tile[index33, index34].frameX < (short) 144) + { + if (Main.rand.Next(4) == 0) + Main.tile[index33, index34].frameX = (short) (162 + WorldGen.genRand.Next(8) * 18); + Main.tile[index33, index34].type = (ushort) 74; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, index34, 3); + } + if ((Main.tile[index33, index34].type == (ushort) 60 || Main.tile[index33, index34].type == (ushort) 62) && WorldGen.genRand.Next(5) == 0 && !Main.tile[index33, index34 + 1].active() && !Main.tile[index33, index34 + 1].lava()) + { + bool flag20 = false; + for (int index44 = index34; index44 > index34 - 10; --index44) + { + if (Main.tile[index33, index44].bottomSlope()) + { + flag20 = false; + break; + } + if (Main.tile[index33, index44].active() && Main.tile[index33, index44].type == (ushort) 60 && !Main.tile[index33, index44].bottomSlope()) + { + flag20 = true; + break; + } + } + if (flag20) + { + int index45 = index33; + int index46 = index34 + 1; + Main.tile[index45, index46].type = (ushort) 62; + Main.tile[index45, index46].active(true); + WorldGen.SquareTileFrame(index45, index46); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index45, index46, 3); + } + } + if ((Main.tile[index33, index34].type == (ushort) 60 || Main.tile[index33, index34].type == (ushort) 62) && WorldGen.genRand.Next(80) == 0 && !WorldGen.PlayerLOS(index33, index34)) + { + bool flag21 = true; + int tileY = index34; + if (Main.tile[index33, index34].type == (ushort) 60) + ++tileY; + for (int i = index33; i < index33 + 2; ++i) + { + int j = tileY - 1; + if (!WorldGen.AnchorValid(Framing.GetTileSafely(i, j), AnchorType.SolidTile) || Main.tile[i, j].bottomSlope()) + flag21 = false; + if (Main.tile[i, j].liquid > (byte) 0 || Main.wallHouse[(int) Main.tile[i, j].wall]) + flag21 = false; + if (flag21) + { + for (int index47 = tileY; index47 < tileY + 2; ++index47) + { + if ((!Main.tile[i, index47].active() || Main.tileCut[(int) Main.tile[i, index47].type] && Main.tile[i, index47].type != (ushort) 444 ? (!Main.tile[i, index47].lava() ? 1 : 0) : 0) == 0) + flag21 = false; + if (!flag21) + break; + } + if (!flag21) + break; + } + else + break; + } + if (flag21) + { + if (WorldGen.CountNearBlocksTypes(index33, index34, 20, 1, 444) > 0) + flag21 = false; + } + if (flag21) + { + for (int i = index33; i < index33 + 2; ++i) + { + Main.tile[i, tileY - 1].slope((byte) 0); + Main.tile[i, tileY - 1].halfBrick(false); + for (int j = tileY; j < tileY + 2; ++j) + { + if (Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + for (int index48 = index33; index48 < index33 + 2; ++index48) + { + for (int index49 = tileY; index49 < tileY + 2; ++index49) + { + Main.tile[index48, index49].active(true); + Main.tile[index48, index49].type = (ushort) 444; + Main.tile[index48, index49].frameX = (short) ((index48 - index33) * 18); + Main.tile[index48, index49].frameY = (short) ((index49 - tileY) * 18); + } + } + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, tileY, 3); + } + } + if (Main.tile[index33, index34].type == (ushort) 69 && WorldGen.genRand.Next(3) == 0) + { + int index50 = index33; + int index51 = index34; + int num35 = 0; + if (Main.tile[index50 + 1, index51].active() && Main.tile[index50 + 1, index51].type == (ushort) 69) + ++num35; + if (Main.tile[index50 - 1, index51].active() && Main.tile[index50 - 1, index51].type == (ushort) 69) + ++num35; + if (Main.tile[index50, index51 + 1].active() && Main.tile[index50, index51 + 1].type == (ushort) 69) + ++num35; + if (Main.tile[index50, index51 - 1].active() && Main.tile[index50, index51 - 1].type == (ushort) 69) + ++num35; + if (num35 < 3 || Main.tile[index33, index34].type == (ushort) 60) + { + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index51; + break; + case 1: + ++index51; + break; + case 2: + --index50; + break; + case 3: + ++index50; + break; + } + if (!Main.tile[index50, index51].active()) + { + int num36 = 0; + if (Main.tile[index50 + 1, index51].active() && Main.tile[index50 + 1, index51].type == (ushort) 69) + ++num36; + if (Main.tile[index50 - 1, index51].active() && Main.tile[index50 - 1, index51].type == (ushort) 69) + ++num36; + if (Main.tile[index50, index51 + 1].active() && Main.tile[index50, index51 + 1].type == (ushort) 69) + ++num36; + if (Main.tile[index50, index51 - 1].active() && Main.tile[index50, index51 - 1].type == (ushort) 69) + ++num36; + if (num36 < 2) + { + int num37 = 7; + int num38 = index50 - num37; + int num39 = index50 + num37; + int num40 = index51 - num37; + int num41 = index51 + num37; + bool flag22 = false; + for (int index52 = num38; index52 < num39; ++index52) + { + for (int index53 = num40; index53 < num41; ++index53) + { + if (Math.Abs(index52 - index50) * 2 + Math.Abs(index53 - index51) < 9 && Main.tile[index52, index53].active() && Main.tile[index52, index53].type == (ushort) 60 && Main.tile[index52, index53 - 1].active() && Main.tile[index52, index53 - 1].type == (ushort) 69 && Main.tile[index52, index53 - 1].liquid == (byte) 0) + { + flag22 = true; + break; + } + } + } + if (flag22) + { + Main.tile[index50, index51].type = (ushort) 69; + Main.tile[index50, index51].active(true); + WorldGen.SquareTileFrame(index50, index51); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index50, index51, 3); + } + } + } + } + } + else if (Main.tile[index33, index34].type == (ushort) 147 || Main.tile[index33, index34].type == (ushort) 161 || Main.tile[index33, index34].type == (ushort) 163 || Main.tile[index33, index34].type == (ushort) 164 || Main.tile[index33, index34].type == (ushort) 200) + { + if (Main.rand.Next(10) == 0 && !Main.tile[index33, index34 + 1].active() && !Main.tile[index33, index34 + 2].active()) + { + int num42 = index33 - 3; + int num43 = index33 + 4; + int num44 = 0; + for (int index54 = num42; index54 < num43; ++index54) + { + if (Main.tile[index54, index34].type == (ushort) 165 && Main.tile[index54, index34].active()) + ++num44; + if (Main.tile[index54, index34 + 1].type == (ushort) 165 && Main.tile[index54, index34 + 1].active()) + ++num44; + if (Main.tile[index54, index34 + 2].type == (ushort) 165 && Main.tile[index54, index34 + 2].active()) + ++num44; + if (Main.tile[index54, index34 + 3].type == (ushort) 165 && Main.tile[index54, index34 + 3].active()) + ++num44; + } + if (num44 < 2) + { + WorldGen.PlaceTight(index33, index34 + 1); + WorldGen.SquareTileFrame(index33, index34 + 1); + if (Main.netMode == 2 && Main.tile[index33, index34 + 1].active()) + NetMessage.SendTileSquare(-1, index33, index34 + 1, 3); + } + } + } + else if (Main.tileMoss[(int) Main.tile[index33, index34].type]) + { + int type = (int) Main.tile[index33, index34].type; + bool flag23 = false; + for (int i = num23; i < num24; ++i) + { + for (int j = index35; j < num25; ++j) + { + if ((index33 != i || index34 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 1) + { + WorldGen.SpreadGrass(i, j, 1, type, false, Main.tile[index33, index34].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag23 = true; + } + } + } + } + if (Main.netMode == 2 & flag23) + NetMessage.SendTileSquare(-1, index33, index34, 3); + if (WorldGen.genRand.Next(6) == 0) + { + int index55 = index33; + int index56 = index34; + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index55; + break; + case 1: + ++index55; + break; + case 2: + --index56; + break; + default: + ++index56; + break; + } + if (!Main.tile[index55, index56].active()) + { + WorldGen.PlaceTile(index55, index56, 184, true); + if (Main.netMode == 2 && Main.tile[index55, index56].active()) + NetMessage.SendTileSquare(-1, index55, index56, 1); + } + } + } + if (Main.tile[index33, index34].type == (ushort) 70) + { + int type = (int) Main.tile[index33, index34].type; + if (!Main.tile[index33, index35].active() && WorldGen.genRand.Next(10) == 0) + { + WorldGen.PlaceTile(index33, index35, 71, true); + if (Main.netMode == 2 && Main.tile[index33, index35].active()) + NetMessage.SendTileSquare(-1, index33, index35, 1); + } + if (WorldGen.genRand.Next(200) == 0 && WorldGen.GrowShroom(index33, index34) && WorldGen.PlayerLOS(index33, index34)) + WorldGen.TreeGrowFXCheck(index33, index34 - 1); + bool flag24 = false; + for (int i = num23; i < num24; ++i) + { + for (int j = index35; j < num25; ++j) + { + if ((index33 != i || index34 != j) && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 59) + { + WorldGen.SpreadGrass(i, j, 59, type, false, Main.tile[index33, index34].color()); + if ((int) Main.tile[i, j].type == type) + { + WorldGen.SquareTileFrame(i, j); + flag24 = true; + } + } + } + } + if (Main.netMode == 2 & flag24) + NetMessage.SendTileSquare(-1, index33, index34, 3); + } + } + else + { + if (Main.tile[index33, index34].wall == (byte) 62 && Main.tile[index33, index34].liquid == (byte) 0 && WorldGen.genRand.Next(10) == 0) + { + int num45 = WorldGen.genRand.Next(2, 4); + int num46 = index33 - num45; + int num47 = index33 + num45; + int num48 = index34 - num45; + int num49 = index34 + num45; + bool flag25 = false; + for (int i = num46; i <= num47; ++i) + { + for (int j = num48; j <= num49; ++j) + { + if (WorldGen.SolidTile(i, j)) + { + flag25 = true; + break; + } + } + } + if (flag25 && !Main.tile[index33, index34].active()) + { + WorldGen.PlaceTile(index33, index34, 51, true); + WorldGen.TileFrame(index33, index34, true); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index33, index34, 3); + } + } + if (flag1) + WorldGen.TrySpawningTownNPC(index33, index34); + } + } + if (Main.tile[index33, index34].wall == (byte) 81 || Main.tile[index33, index34].wall == (byte) 83 || Main.tile[index33, index34].type == (ushort) 199 && Main.tile[index33, index34].active()) + { + int tileX = index33 + WorldGen.genRand.Next(-2, 3); + int tileY = index34 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (byte) 63 && Main.tile[tileX, tileY].wall <= (byte) 68) + { + bool flag26 = false; +label_629: + for (int index57 = index33 - wallDist; index57 < index33 + wallDist; ++index57) + { + for (int index58 = index34 - wallDist; index58 < index34 + wallDist; ++index58) + { + if (Main.tile[index33, index34].active()) + { + switch (Main.tile[index33, index34].type) + { + case 199: + case 200: + case 201: + case 203: + case 205: + case 234: + case 352: + flag26 = true; + goto label_629; + default: + continue; + } + } + } + } + if (flag26) + { + Main.tile[tileX, tileY].wall = (byte) 81; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + if (Main.tile[index33, index34].wall == (byte) 69 || Main.tile[index33, index34].wall == (byte) 3 || Main.tile[index33, index34].type == (ushort) 23 && Main.tile[index33, index34].active()) + { + int tileX = index33 + WorldGen.genRand.Next(-2, 3); + int tileY = index34 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (byte) 63 && Main.tile[tileX, tileY].wall <= (byte) 68) + { + bool flag27 = false; +label_643: + for (int index59 = index33 - wallDist; index59 < index33 + wallDist; ++index59) + { + for (int index60 = index34 - wallDist; index60 < index34 + wallDist; ++index60) + { + if (Main.tile[index33, index34].active()) + { + switch (Main.tile[index33, index34].type) + { + case 22: + case 23: + case 24: + case 25: + case 32: + case 112: + case 163: + flag27 = true; + goto label_643; + default: + continue; + } + } + } + } + if (flag27) + { + Main.tile[tileX, tileY].wall = (byte) 69; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + if (Main.tile[index33, index34].wall == (byte) 70 || Main.tile[index33, index34].type == (ushort) 109 && Main.tile[index33, index34].active()) + { + int tileX = index33 + WorldGen.genRand.Next(-2, 3); + int tileY = index34 + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall == (byte) 63 || Main.tile[tileX, tileY].wall == (byte) 65 || Main.tile[tileX, tileY].wall == (byte) 66 || Main.tile[tileX, tileY].wall == (byte) 68) + { + bool flag28 = false; +label_657: + for (int index61 = index33 - wallDist; index61 < index33 + wallDist; ++index61) + { + for (int index62 = index34 - wallDist; index62 < index34 + wallDist; ++index62) + { + if (Main.tile[index33, index34].active()) + { + switch (Main.tile[index33, index34].type) + { + case 109: + case 110: + case 113: + case 115: + case 116: + case 117: + case 164: + flag28 = true; + goto label_657; + default: + continue; + } + } + } + } + if (flag28) + { + Main.tile[tileX, tileY].wall = (byte) 70; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + WorldGen.SpreadDesertWalls(wallDist, index33, index34); + } + } + if (Main.dayTime) + return; + float num50 = (float) (Main.maxTilesX / 4200); + if ((double) Main.rand.Next(8000) >= 10.0 * (double) num50) + return; + Vector2 vector2 = new Vector2((float) ((Main.rand.Next(Main.maxTilesX - 50) + 100) * 16), (float) (Main.rand.Next((int) ((double) Main.maxTilesY * 0.05)) * 16)); + float num51 = (float) Main.rand.Next(-100, 101); + float num52 = (float) (Main.rand.Next(200) + 100); + float num53 = 12f / (float) Math.Sqrt((double) num51 * (double) num51 + (double) num52 * (double) num52); + float SpeedX = num51 * num53; + float SpeedY = num52 * num53; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, 12, 1000, 10f, Main.myPlayer); + } + + private static void TrySpawningTownNPC(int x, int y) + { + if (WorldGen.prioritizedTownNPC <= 0) + return; + if (Main.tile[x, y].wall == (byte) 34) + { + if (Main.rand.Next(4) != 0) + return; + int num = (int) WorldGen.SpawnTownNPC(x, y); + } + else + { + int num1 = (int) WorldGen.SpawnTownNPC(x, y); + } + } + + 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.Sandstone[(int) Main.tile[tileX, tileY].wall] || WallID.Sets.Conversion.HardenedSand[(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; + byte? nullable = new byte?(); + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[tileX, tileY].wall]) + { + switch (num) + { + case 1: + nullable = new byte?((byte) 220); + break; + case 2: + nullable = new byte?((byte) 222); + break; + case 3: + nullable = new byte?((byte) 221); + break; + } + } + if (WallID.Sets.Conversion.HardenedSand[(int) Main.tile[tileX, tileY].wall]) + { + switch (num) + { + case 1: + nullable = new byte?((byte) 217); + break; + case 2: + nullable = new byte?((byte) 219); + break; + case 3: + nullable = new byte?((byte) 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 != (byte) 0) + return; + Main.tile[i, j].wall = (byte) type; + WorldGen.SquareWallFrame(i, j); + if (mute) + return; + Main.PlaySound(0, i * 16, j * 16); + } + + public static void AddPlants() + { + for (int i = 0; i < Main.maxTilesX; ++i) + { + 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); + } + } + } + + 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) || (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) + 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 != (byte) 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 == (byte) 2) + Main.tile[index3, index4].wall = (byte) 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 != (byte) 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; + WorldGen.heartCount = 0; + WorldGen.crimson = true; + 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 = (byte) 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 != (byte) 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 = (byte) 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 = (byte) 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 = (byte) 83; + } + else if (num15 < (double) num5 * 0.4 && Main.tile[index4, index5].wall != (byte) 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 = (byte) 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); + } + for (int index8 = 0; index8 < WorldGen.heartCount; ++index8) + { + float num17 = (float) WorldGen.genRand.Next(16, 21); + int x = (int) WorldGen.heartPos[index8].X; + int y = (int) WorldGen.heartPos[index8].Y; + for (int index9 = (int) ((double) x - (double) num17 / 2.0); (double) index9 < (double) x + (double) num17 / 2.0; ++index9) + { + for (int index10 = (int) ((double) y - (double) num17 / 2.0); (double) index10 < (double) y + (double) num17 / 2.0; ++index10) + { + double num18 = (double) Math.Abs(index9 - x); + float num19 = (float) Math.Abs(index10 - y); + if (Math.Sqrt(num18 * num18 + (double) num19 * (double) num19) < (double) num17 * 0.4) + { + Main.tile[index9, index10].active(true); + Main.tile[index9, index10].type = (ushort) 203; + Main.tile[index9, index10].wall = (byte) 83; + } + } + } + } + for (int index11 = 0; index11 < WorldGen.heartCount; ++index11) + { + float num20 = (float) WorldGen.genRand.Next(10, 14); + int x = (int) WorldGen.heartPos[index11].X; + int y = (int) WorldGen.heartPos[index11].Y; + for (int index12 = (int) ((double) x - (double) num20 / 2.0); (double) index12 < (double) x + (double) num20 / 2.0; ++index12) + { + for (int index13 = (int) ((double) y - (double) num20 / 2.0); (double) index13 < (double) y + (double) num20 / 2.0; ++index13) + { + double num21 = (double) Math.Abs(index12 - x); + float num22 = (float) Math.Abs(index13 - y); + if (Math.Sqrt(num21 * num21 + (double) num22 * (double) num22) < (double) num20 * 0.3) + { + Main.tile[index12, index13].active(false); + Main.tile[index12, index13].wall = (byte) 83; + } + } + } + } + for (int index = 0; index < WorldGen.heartCount; ++index) + WorldGen.AddShadowOrb((int) WorldGen.heartPos[index].X, (int) WorldGen.heartPos[index].Y); + int num23 = Main.maxTilesX; + int num24 = 0; + position.X = (float) num1; + position.Y = (float) num2; + float num25 = (float) WorldGen.genRand.Next(25, 35); + float num26 = (float) WorldGen.genRand.Next(0, 6); + for (int index14 = 0; index14 < 50; ++index14) + { + if ((double) num26 > 0.0) + { + float num27 = (float) WorldGen.genRand.Next(10, 30) * 0.01f; + num26 -= num27; + position.Y -= num27; + } + int num28 = (int) position.X + WorldGen.genRand.Next(-2, 3); + int num29 = (int) position.Y + WorldGen.genRand.Next(-2, 3); + for (int index15 = (int) ((double) num28 - (double) num25 / 2.0); (double) index15 < (double) num28 + (double) num25 / 2.0; ++index15) + { + for (int index16 = (int) ((double) num29 - (double) num25 / 2.0); (double) index16 < (double) num29 + (double) num25 / 2.0; ++index16) + { + double num30 = (double) Math.Abs(index15 - num28); + float num31 = (float) Math.Abs(index16 - num29); + float num32 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00499999988824129); + float num33 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00499999988824129); + double num34 = (double) num32; + double num35 = num30 * num34; + float num36 = num31 * num33; + double num37 = Math.Sqrt(num35 * num35 + (double) num36 * (double) num36); + if (num37 < (double) num25 * 0.2 * ((double) WorldGen.genRand.Next(90, 111) * 0.01)) + { + Main.tile[index15, index16].active(false); + Main.tile[index15, index16].wall = (byte) 83; + } + else if (num37 < (double) num25 * 0.45) + { + if (index15 < num23) + num23 = index15; + if (index15 > num24) + num24 = index15; + if (Main.tile[index15, index16].wall != (byte) 83) + { + Main.tile[index15, index16].active(true); + Main.tile[index15, index16].type = (ushort) 203; + if (num37 < (double) num25 * 0.35) + Main.tile[index15, index16].wall = (byte) 83; + } + } + } + } + } + for (int index17 = num23; index17 <= num24; ++index17) + { + int index18 = num2; + while (Main.tile[index17, index18].type == (ushort) 203 && Main.tile[index17, index18].active() || Main.tile[index17, index18].wall == (byte) 83) + ++index18; + for (int index19 = WorldGen.genRand.Next(15, 20); !Main.tile[index17, index18].active() && index19 > 0 && Main.tile[index17, index18].wall != (byte) 83; ++index18) + { + --index19; + Main.tile[index17, index18].type = (ushort) 203; + Main.tile[index17, index18].active(true); + } + } + WorldGen.CrimEnt(position, crimDir); + } + + 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 = (byte) 83; + } + else if (num5 < (double) num1 * 0.5 && Main.tile[index1, index2].wall != (byte) 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 = (byte) 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) + { + 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 = (byte) 3; + } + } + } + } + } + + public static void JungleRunner(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(5, 11); + 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, 20) * 0.1f; + int num2 = 0; + bool flag = true; + while (flag) + { + if ((double) vector2_1.Y < Main.worldSurface) + { + 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 == (byte) 0 && !Main.tile[index1, index2].active() && Main.tile[index1, index2 - 3].wall == (byte) 0 && !Main.tile[index1, index2 - 3].active() && Main.tile[index1, index2 - 1].wall == (byte) 0 && !Main.tile[index1, index2 - 1].active() && Main.tile[index1, index2 - 4].wall == (byte) 0 && !Main.tile[index1, index2 - 4].active() && Main.tile[index1, index2 - 2].wall == (byte) 0 && !Main.tile[index1, index2 - 2].active() && Main.tile[index1, index2 - 5].wall == (byte) 0 && !Main.tile[index1, index2 - 5].active()) + flag = false; + } + WorldGen.JungleX = (int) vector2_1.X; + num1 += (double) WorldGen.genRand.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) WorldGen.genRand.Next(-10, 11) * 0.015)) + WorldGen.KillTile(i1, j1); + } + } + ++num2; + if (num2 > 10 && WorldGen.genRand.Next(50) < num2) + { + num2 = 0; + int num11 = -2; + if (WorldGen.genRand.Next(2) == 0) + num11 = 2; + WorldGen.TileRunner((int) vector2_1.X, (int) vector2_1.Y, (double) WorldGen.genRand.Next(3, 20), WorldGen.genRand.Next(10, 100), -1, speedX: ((float) num11)); + } + vector2_1 += vector2_2; + vector2_2.Y += (float) WorldGen.genRand.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) WorldGen.genRand.Next(-10, 11) * 0.1f; + if ((double) vector2_1.X < (double) (i - 200)) + vector2_2.X += (float) WorldGen.genRand.Next(5, 21) * 0.1f; + if ((double) vector2_1.X > (double) (i + 200)) + vector2_2.X -= (float) WorldGen.genRand.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; + } + } + + public static void GERunner(int i, int j, float speedX = 0.0f, float speedY = 0.0f, bool good = true) + { + int num1 = (int) ((double) WorldGen.genRand.Next(200, 250) * (double) (Main.maxTilesX / 4200)); + double num2 = (double) num1; + 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 flag = true; + while (flag) + { + 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) + num4 = Main.maxTilesX; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + for (int i1 = num3; i1 < num4; ++i1) + { + for (int j1 = num5; j1 < num6; ++j1) + { + if ((double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < (double) num1 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (good) + { + if (Main.tile[i1, j1].wall == (byte) 63 || Main.tile[i1, j1].wall == (byte) 65 || Main.tile[i1, j1].wall == (byte) 66 || Main.tile[i1, j1].wall == (byte) 68 || Main.tile[i1, j1].wall == (byte) 69 || Main.tile[i1, j1].wall == (byte) 81) + Main.tile[i1, j1].wall = (byte) 70; + else if (Main.tile[i1, j1].wall == (byte) 216) + Main.tile[i1, j1].wall = (byte) 219; + else if (Main.tile[i1, j1].wall == (byte) 187) + Main.tile[i1, j1].wall = (byte) 222; + if (Main.tile[i1, j1].wall == (byte) 3 || Main.tile[i1, j1].wall == (byte) 83) + Main.tile[i1, j1].wall = (byte) 28; + 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 == (byte) 63 || Main.tile[i1, j1].wall == (byte) 65 || Main.tile[i1, j1].wall == (byte) 66 || Main.tile[i1, j1].wall == (byte) 68) + Main.tile[i1, j1].wall = (byte) 81; + else if (Main.tile[i1, j1].wall == (byte) 216) + Main.tile[i1, j1].wall = (byte) 218; + else if (Main.tile[i1, j1].wall == (byte) 187) + Main.tile[i1, j1].wall = (byte) 221; + 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 == (byte) 63 || Main.tile[i1, j1].wall == (byte) 65 || Main.tile[i1, j1].wall == (byte) 66 || Main.tile[i1, j1].wall == (byte) 68) + Main.tile[i1, j1].wall = (byte) 69; + else if (Main.tile[i1, j1].wall == (byte) 216) + Main.tile[i1, j1].wall = (byte) 217; + else if (Main.tile[i1, j1].wall == (byte) 187) + Main.tile[i1, j1].wall = (byte) 220; + 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) -num1 || (double) vector2_1.Y < (double) -num1 || (double) vector2_1.X > (double) (Main.maxTilesX + num1) || (double) vector2_1.Y > (double) (Main.maxTilesX + num1)) + flag = false; + } + } + + 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) + { + 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; + while (num1 > 0.0 && (double) num2 > 0.0) + { + 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 i1 = num3; i1 < num4; ++i1) + { + for (int j1 = num5; j1 < num6; ++j1) + { + if ((double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < strength * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (WorldGen.mudWall && (double) j1 > Main.worldSurface && Main.tile[i1, j1 - 1].wall != (byte) 2 && j1 < Main.maxTilesY - 210 - WorldGen.genRand.Next(3)) + { + if (j1 > WorldGen.lavaLine - WorldGen.genRand.Next(0, 4) - 50) + { + if (Main.tile[i1, j1 - 1].wall != (byte) 64 && Main.tile[i1, j1 + 1].wall != (byte) 64 && Main.tile[i1 - 1, j1].wall != (byte) 64 && Main.tile[i1, j1 + 1].wall != (byte) 64) + WorldGen.PlaceWall(i1, j1, 15, true); + } + else if (Main.tile[i1, j1 - 1].wall != (byte) 15 && Main.tile[i1, j1 + 1].wall != (byte) 15 && Main.tile[i1 - 1, j1].wall != (byte) 15 && Main.tile[i1, j1 + 1].wall != (byte) 15) + WorldGen.PlaceWall(i1, j1, 64, true); + } + if (type < 0) + { + if (type == -2 && Main.tile[i1, j1].active() && (j1 < WorldGen.waterLine || j1 > WorldGen.lavaLine)) + { + Main.tile[i1, j1].liquid = byte.MaxValue; + if (j1 > WorldGen.lavaLine) + Main.tile[i1, j1].lava(true); + } + Main.tile[i1, j1].active(false); + } + else + { + if (flag1 && (double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < strength * 0.3 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.01)) + WorldGen.PlaceWall(i1, j1, 180, true); + if (flag2 && (double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < strength * 0.3 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.01)) + WorldGen.PlaceWall(i1, j1, 178, true); + if (overRide || !Main.tile[i1, j1].active()) + { + Tile tile = Main.tile[i1, j1]; + 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) j1 < Main.worldSurface + (double) WorldGen.genRand.Next(-50, 50)) + { + flag3 = true; + break; + } + break; + case 45: + case 147: + case 189: + case 190: + case 196: + flag3 = true; + break; + case 53: + if (type == 40) + flag3 = true; + if ((double) j1 < 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[i1, j1].active(true); + Main.tile[i1, j1].liquid = (byte) 0; + Main.tile[i1, j1].lava(false); + } + if (noYChange && (double) j1 < Main.worldSurface && type != 59) + Main.tile[i1, j1].wall = (byte) 2; + if (type == 59 && j1 > WorldGen.waterLine && Main.tile[i1, j1].liquid > (byte) 0) + { + Main.tile[i1, j1].lava(false); + Main.tile[i1, j1].liquid = (byte) 0; + } + } + } + } + } + vector2_1 += vector2_2; + if (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 ((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 == (byte) 2) + Main.tile[index1, index2].wall = (byte) 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 = (byte) 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 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 = (byte) 73; + WorldGen.SquareWallFrame(i5, j5); + } + } + } + for (int i6 = num4; i6 <= num5; ++i6) + { + int j6 = num6 - 10; + while (!Main.tile[i6, j6 + 1].active()) + ++j6; + if (j6 < num7 && Main.tile[i6, j6 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num34 = WorldGen.genRand.Next(1, 3); + for (int index7 = i6 - num34; index7 <= i6 + num34; ++index7) + { + if (Main.tile[index7, j6].type == (ushort) 189) + { + Main.tile[index7, j6].active(false); + Main.tile[index7, j6].liquid = byte.MaxValue; + Main.tile[index7, j6].lava(false); + WorldGen.SquareTileFrame(i6, j6); + } + if (Main.tile[index7, j6 + 1].type == (ushort) 189) + { + Main.tile[index7, j6 + 1].active(false); + Main.tile[index7, j6 + 1].liquid = byte.MaxValue; + Main.tile[index7, j6 + 1].lava(false); + WorldGen.SquareTileFrame(i6, j6 + 1); + } + if (index7 > i6 - num34 && index7 < i6 + 2 && Main.tile[index7, j6 + 2].type == (ushort) 189) + { + Main.tile[index7, j6 + 2].active(false); + Main.tile[index7, j6 + 2].liquid = byte.MaxValue; + Main.tile[index7, j6 + 2].lava(false); + WorldGen.SquareTileFrame(i6, j6 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0) + Main.tile[i6, j6].liquid = byte.MaxValue; + Main.tile[i6, j6].lava(false); + WorldGen.SquareTileFrame(i6, j6); + } + } + int num35 = WorldGen.genRand.Next(4); + for (int index8 = 0; index8 <= num35; ++index8) + { + 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 i7 = num36 - num38; i7 <= num36 + num38; ++i7) + { + for (int j7 = num37 - num38; j7 <= num37 + num38; ++j7) + { + double num40 = (double) Math.Abs(i7 - num36); + float num41 = (float) (Math.Abs(j7 - num37) * 2); + if (Math.Sqrt(num40 * num40 + (double) num41 * (double) num41) < (double) (num38 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i7, j7].active(true); + Main.tile[i7, j7].type = (ushort) num39; + WorldGen.SquareTileFrame(i7, j7); + } + } + } + for (int i8 = num36 - num38 + 2; i8 <= num36 + num38 - 2; ++i8) + { + int j8 = num37 - num38; + while (!Main.tile[i8, j8].active()) + ++j8; + Main.tile[i8, j8].active(false); + Main.tile[i8, j8].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(i8, j8); + } + } + } + + 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 index3 = num22; index3 < num23; ++index3) + { + 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 index4 = num24; index4 < num25; ++index4) + { + if ((double) index4 > (double) num27) + { + double num28 = (double) Math.Abs((float) index3 - vector2_1.X); + float num29 = Math.Abs((float) index4 - vector2_1.Y) * 3f; + if (Math.Sqrt(num28 * num28 + (double) num29 * (double) num29) < num26 * 0.4 && Main.tile[index3, index4].type == (ushort) 189) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].liquid = byte.MaxValue; + Main.tile[index3, index4].honey(false); + Main.tile[index3, index4].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.2) + vector2_2.Y = -0.2f; + } + for (int index5 = num4 - 20; index5 <= num5 + 20; ++index5) + { + for (int index6 = num6 - 20; index6 <= num7 + 20; ++index6) + { + bool flag = true; + for (int index7 = index5 - 1; index7 <= index5 + 1; ++index7) + { + for (int index8 = index6 - 1; index8 <= index6 + 1; ++index8) + { + if (!Main.tile[index7, index8].active()) + flag = false; + } + } + if (flag) + Main.tile[index5, index6].wall = (byte) 73; + } + } + for (int i3 = num4; i3 <= num5; ++i3) + { + int j3 = num6 - 10; + while (!Main.tile[i3, j3 + 1].active()) + ++j3; + if (j3 < num7 && Main.tile[i3, j3 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num30 = WorldGen.genRand.Next(1, 3); + for (int index = i3 - num30; index <= i3 + num30; ++index) + { + if (Main.tile[index, j3].type == (ushort) 189) + { + Main.tile[index, j3].active(false); + Main.tile[index, j3].liquid = byte.MaxValue; + Main.tile[index, j3].lava(false); + WorldGen.SquareTileFrame(i3, j3); + } + if (Main.tile[index, j3 + 1].type == (ushort) 189) + { + Main.tile[index, j3 + 1].active(false); + Main.tile[index, j3 + 1].liquid = byte.MaxValue; + Main.tile[index, j3 + 1].lava(false); + WorldGen.SquareTileFrame(i3, j3 + 1); + } + if (index > i3 - num30 && index < i3 + 2 && Main.tile[index, j3 + 2].type == (ushort) 189) + { + Main.tile[index, j3 + 2].active(false); + Main.tile[index, j3 + 2].liquid = byte.MaxValue; + Main.tile[index, j3 + 2].lava(false); + WorldGen.SquareTileFrame(i3, j3 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0) + Main.tile[i3, j3].liquid = byte.MaxValue; + Main.tile[i3, j3].lava(false); + WorldGen.SquareTileFrame(i3, j3); + } + } + int num31 = WorldGen.genRand.Next(1, 4); + for (int index = 0; index <= num31; ++index) + { + 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 i4 = num32 - num34; i4 <= num32 + num34; ++i4) + { + for (int j4 = num33 - num34; j4 <= num33 + num34; ++j4) + { + double num36 = (double) Math.Abs(i4 - num32); + float num37 = (float) (Math.Abs(j4 - num33) * 2); + if (Math.Sqrt(num36 * num36 + (double) num37 * (double) num37) < (double) (num34 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i4, j4].active(true); + Main.tile[i4, j4].type = (ushort) num35; + WorldGen.SquareTileFrame(i4, j4); + } + } + } + for (int i5 = num32 - num34 + 2; i5 <= num32 + num34 - 2; ++i5) + { + int j5 = num33 - num34; + while (!Main.tile[i5, j5].active()) + ++j5; + Main.tile[i5, j5].active(false); + Main.tile[i5, j5].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(i5, j5); + } + } + } + + 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 = (byte) 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) + { + 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 = (byte) 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 == (byte) 0) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = 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 = (byte) 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; + } + WorldGen.AddBuriedChest(i, y - 3, contain, Style: 13); + ++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 index7 = num14 - num16; index7 <= num14 + num16; ++index7) + { + for (int index8 = num17 - 1; index8 <= num17 + 1; ++index8) + Main.tile[index7, index8].wall = (byte) 21; + } + for (int index9 = num15 - num16; index9 <= num15 + num16; ++index9) + { + for (int index10 = num17 - 1; index10 <= num17 + 1; ++index10) + Main.tile[index9, index10].wall = (byte) 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)); + } + + 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) + { + double num1 = (double) WorldGen.genRand.Next(25, 50); + 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 ShroomPatch(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(40, 70); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(20, 30); + if (WorldGen.genRand.Next(5) == 0) + { + num1 *= 1.5; + double num4 = 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) + { + num1 -= (double) WorldGen.genRand.Next(3); + --num3; + int num5 = (int) ((double) vector2_1.X - num1 * 0.5); + int num6 = (int) ((double) vector2_1.X + num1 * 0.5); + int num7 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num8 = (int) ((double) vector2_1.Y + num1 * 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; + double num9 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + double num10 = (double) Math.Abs((float) index1 - vector2_1.X); + float num11 = Math.Abs((float) (((double) index2 - (double) vector2_1.Y) * 2.29999995231628)); + if (Math.Sqrt(num10 * num10 + (double) num11 * (double) num11) < num9 * 0.4) + { + if ((double) index2 < (double) vector2_1.Y + num9 * 0.02) + { + if (Main.tile[index1, index2].type != (ushort) 59) + Main.tile[index1, index2].active(false); + } + else + Main.tile[index1, index2].type = (ushort) 59; + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].lava(false); + } + } + } + vector2_1 += vector2_2; + vector2_1.X += vector2_2.X; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.Y -= (float) WorldGen.genRand.Next(11) * 0.05f; + 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 > 2.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -2.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + if ((double) vector2_2.Y < -1.0) + vector2_2.Y = -1f; + 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 num12 = WorldGen.genRand.Next(7, 10); + int steps = WorldGen.genRand.Next(7, 10); + WorldGen.TileRunner(i1, j1, (double) num12, steps, 59, speedY: 2f, noYChange: true); + if (WorldGen.genRand.Next(3) == 0) + WorldGen.TileRunner(i1, j1, (double) (num12 - 3), steps - 3, -1, 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].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; + 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) + { + if (Main.tile[(int) vector2_1.X, (int) vector2_1.Y].wall == (byte) 0) + 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) + 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.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); + } + } + } + } + } + + 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 > (byte) 0) + Framing.WallFrame(i, j, true); + } + } + WorldGen.noLiquidCheck = false; + WorldGen.noTileActions = false; + long elapsedMilliseconds = stopwatch.ElapsedMilliseconds; + } + + public static void PlantCheck(int i, int j) + { + int num1 = -1; + int num2 = (int) Main.tile[i, j].type; + int num3 = i - 1; + int num4 = i + 1; + int maxTilesX = Main.maxTilesX; + int num5 = j - 1; + if (j + 1 >= Main.maxTilesY) + num1 = num2; + if (i - 1 >= 0 && Main.tile[i - 1, j] != null && Main.tile[i - 1, j].nactive()) + { + int type1 = (int) Main.tile[i - 1, j].type; + } + if (i + 1 < Main.maxTilesX && Main.tile[i + 1, j] != null && Main.tile[i + 1, j].nactive()) + { + int type2 = (int) Main.tile[i + 1, j].type; + } + if (j - 1 >= 0 && Main.tile[i, j - 1] != null && Main.tile[i, j - 1].nactive()) + { + int type3 = (int) Main.tile[i, j - 1].type; + } + if (j + 1 < Main.maxTilesY && Main.tile[i, j + 1] != null && Main.tile[i, j + 1].nactive() && !Main.tile[i, j + 1].halfBrick() && Main.tile[i, j + 1].slope() == (byte) 0) + num1 = (int) Main.tile[i, j + 1].type; + if (i - 1 >= 0 && j - 1 >= 0 && Main.tile[i - 1, j - 1] != null && Main.tile[i - 1, j - 1].nactive()) + { + int type4 = (int) Main.tile[i - 1, j - 1].type; + } + if (i + 1 < Main.maxTilesX && j - 1 >= 0 && Main.tile[i + 1, j - 1] != null && Main.tile[i + 1, j - 1].nactive()) + { + int type5 = (int) Main.tile[i + 1, j - 1].type; + } + if (i - 1 >= 0 && j + 1 < Main.maxTilesY && Main.tile[i - 1, j + 1] != null && Main.tile[i - 1, j + 1].nactive()) + { + int type6 = (int) Main.tile[i - 1, j + 1].type; + } + if (i + 1 < Main.maxTilesX && j + 1 < Main.maxTilesY && Main.tile[i + 1, j + 1] != null && Main.tile[i + 1, j + 1].nactive()) + { + int type7 = (int) Main.tile[i + 1, j + 1].type; + } + if ((num2 != 3 || num1 == 2 || num1 == 78 || num1 == 380) && (num2 != 24 || num1 == 23) && (num2 != 61 || num1 == 60) && (num2 != 71 || num1 == 70) && (num2 != 73 || num1 == 2 || num1 == 78 || num1 == 380) && (num2 != 74 || num1 == 60) && (num2 != 110 || num1 == 109) && (num2 != 113 || num1 == 109) && (num2 != 201 || num1 == 199)) + return; + if ((num2 == 3 || num2 == 73) && num1 != 2 && Main.tile[i, j].frameX >= (short) 162) + Main.tile[i, j].frameX = (short) 126; + if (num2 == 74 && num1 != 60 && Main.tile[i, j].frameX >= (short) 162) + Main.tile[i, j].frameX = (short) 126; + switch (num1) + { + case 2: + num2 = num2 != 113 ? 3 : 73; + break; + case 23: + num2 = 24; + if (Main.tile[i, j].frameX >= (short) 162) + { + Main.tile[i, j].frameX = (short) 126; + break; + } + break; + case 70: + num2 = 71; + while (Main.tile[i, j].frameX > (short) 72) + Main.tile[i, j].frameX -= (short) 72; + break; + case 109: + num2 = num2 != 73 ? 110 : 113; + break; + case 199: + num2 = 201; + break; + } + if (num2 != (int) Main.tile[i, j].type) + Main.tile[i, j].type = (ushort) num2; + else + WorldGen.KillTile(i, j); + } + + public static bool CheckPound(int i, int j) + { + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + 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(); + switch (Main.tile[i, j].type) + { + case 10: + case 48: + case 137: + case 138: + case 232: + case 380: + case 387: + case 388: + return false; + default: + if (WorldGen.gen && (Main.tile[i, j].type == (ushort) 190 || Main.tile[i, j].type == (ushort) 30)) + return false; + if (Main.tile[i, j - 1].active()) + { + switch (Main.tile[i, j - 1].type) + { + case 5: + case 21: + case 26: + case 72: + case 77: + case 88: + case 235: + case 237: + case 323: + case 441: + case 467: + case 468: + return false; + } + } + return true; + } + } + + public static bool SlopeTile(int i, int j, int slope = 0) + { + if (!WorldGen.CheckPound(i, j)) + return false; + Main.tile[i, j].halfBrick(false); + Main.tile[i, j].slope((byte) slope); + if (!WorldGen.gen) + { + WorldGen.KillTile(i, j, true, true); + Main.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.CheckPound(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); + Main.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 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) + { + addToList = WorldGen.UpdateMapTile(i, j); + Tile centerTile = Main.tile[i, j]; + if (!centerTile.active()) + { + centerTile.halfBrick(false); + centerTile.color((byte) 0); + centerTile.slope((byte) 0); + } + if (centerTile.liquid > (byte) 0 && Main.netMode != 1 && !WorldGen.noLiquidCheck) + Liquid.AddWater(i, j); + if (centerTile.active()) + { + if (noBreak && Main.tileFrameImportant[(int) centerTile.type] && centerTile.type != (ushort) 4) + return; + int index1 = (int) centerTile.type; + if (Main.tileStone[index1]) + index1 = 1; + int frameX1 = (int) centerTile.frameX; + int frameY1 = (int) centerTile.frameY; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(-1, -1, 0, 0); + if (Main.tileFrameImportant[(int) centerTile.type]) + { + switch (index1) + { + case 4: + Tile tile1 = Main.tile[i, j - 1]; + Tile tile2 = Main.tile[i, j + 1]; + Tile tile3 = Main.tile[i - 1, j]; + Tile tile4 = Main.tile[i + 1, j]; + Tile tile5 = Main.tile[i - 1, j + 1]; + Tile tile6 = Main.tile[i + 1, j + 1]; + Tile tile7 = Main.tile[i - 1, j - 1]; + Tile tile8 = Main.tile[i + 1, j - 1]; + short num1 = 0; + if (centerTile.frameX >= (short) 66) + num1 = (short) 66; + int index2 = -1; + int index3 = -1; + int index4 = -1; + int num2 = -1; + int num3 = -1; + int num4 = -1; + int num5 = -1; + if (tile1 != null && tile1.active() && !tile1.bottomSlope()) + { + int type1 = (int) tile1.type; + } + if (tile2 != null && tile2.active() && !tile2.halfBrick() && !tile2.topSlope()) + index2 = (int) tile2.type; + if (tile3 != null && tile3.active() && (tile3.slope() == (byte) 0 || (int) tile3.slope() % 2 != 1)) + index3 = (int) tile3.type; + if (tile4 != null && tile4.active() && (tile4.slope() == (byte) 0 || (int) tile4.slope() % 2 != 0)) + index4 = (int) tile4.type; + if (tile5 != null && tile5.active()) + num2 = (int) tile5.type; + if (tile6 != null && tile6.active()) + num3 = (int) tile6.type; + if (tile7 != null && tile7.active()) + num4 = (int) tile7.type; + if (tile8 != null && tile8.active()) + num5 = (int) tile8.type; + if (index2 >= 0 && Main.tileSolid[index2] && (!Main.tileNoAttach[index2] || TileID.Sets.Platforms[index2])) + { + centerTile.frameX = num1; + return; + } + if (index3 >= 0 && Main.tileSolid[index3] && !Main.tileNoAttach[index3] || index3 == 124 || index3 == 5 && num4 == 5 && num2 == 5) + { + centerTile.frameX = (short) (22 + (int) num1); + return; + } + if (index4 >= 0 && Main.tileSolid[index4] && !Main.tileNoAttach[index4] || index4 == 124 || index4 == 5 && num5 == 5 && num3 == 5) + { + centerTile.frameX = (short) (44 + (int) num1); + return; + } + if (centerTile.wall > (byte) 0) + { + centerTile.frameX = num1; + return; + } + WorldGen.KillTile(i, j); + return; + case 136: + Tile tile9 = Main.tile[i, j - 1]; + Tile tile10 = Main.tile[i, j + 1]; + Tile tile11 = Main.tile[i - 1, j]; + Tile tile12 = Main.tile[i + 1, j]; + Tile tile13 = Main.tile[i - 1, j + 1]; + Tile tile14 = Main.tile[i + 1, j + 1]; + Tile tile15 = Main.tile[i - 1, j - 1]; + Tile tile16 = Main.tile[i + 1, j - 1]; + int index5 = -1; + int index6 = -1; + int index7 = -1; + int num6 = -1; + int num7 = -1; + int num8 = -1; + int num9 = -1; + if (tile9 != null && tile9.nactive()) + { + int type2 = (int) tile9.type; + } + if (tile10 != null && tile10.nactive() && !tile10.halfBrick() && !tile10.topSlope()) + index5 = (int) tile10.type; + if (tile11 != null && tile11.nactive()) + index6 = (int) tile11.type; + if (tile12 != null && tile12.nactive()) + index7 = (int) tile12.type; + if (tile13 != null && tile13.nactive()) + num6 = (int) tile13.type; + if (tile14 != null && tile14.nactive()) + num7 = (int) tile14.type; + if (tile15 != null && tile15.nactive()) + num8 = (int) tile15.type; + if (tile16 != null && tile16.nactive()) + num9 = (int) tile16.type; + if (index5 >= 0 && Main.tileSolid[index5] && !Main.tileNoAttach[index5] && !tile10.halfBrick() && (tile10.slope() == (byte) 0 || tile10.bottomSlope())) + { + centerTile.frameX = (short) 0; + return; + } + if (index6 >= 0 && Main.tileSolid[index6] && !Main.tileNoAttach[index6] && (tile11.leftSlope() || tile11.slope() == (byte) 0) && !tile11.halfBrick() || index6 == 124 || index6 == 5 && num8 == 5 && num6 == 5) + { + centerTile.frameX = (short) 18; + return; + } + if (index7 >= 0 && Main.tileSolid[index7] && !Main.tileNoAttach[index7] && (tile12.rightSlope() || tile12.slope() == (byte) 0) && !tile12.halfBrick() || index7 == 124 || index7 == 5 && num9 == 5 && num7 == 5) + { + centerTile.frameX = (short) 36; + return; + } + if (centerTile.wall > (byte) 0) + { + centerTile.frameX = (short) 54; + return; + } + WorldGen.KillTile(i, j); + return; + case 442: + Tile tile17 = Main.tile[i, j - 1]; + Tile tile18 = Main.tile[i, j + 1]; + Tile tile19 = Main.tile[i - 1, j]; + Tile tile20 = Main.tile[i + 1, j]; + Tile tile21 = Main.tile[i - 1, j + 1]; + Tile tile22 = Main.tile[i + 1, j + 1]; + Tile tile23 = Main.tile[i - 1, j - 1]; + Tile tile24 = Main.tile[i + 1, j - 1]; + int index8 = -1; + int index9 = -1; + int index10 = -1; + int index11 = -1; + int num10 = -1; + int num11 = -1; + int num12 = -1; + int num13 = -1; + if (tile17 != null && tile17.nactive() && !tile17.bottomSlope()) + index9 = (int) tile17.type; + if (tile18 != null && tile18.nactive() && !tile18.halfBrick() && !tile18.topSlope()) + index8 = (int) tile18.type; + if (tile19 != null && tile19.nactive() && (tile19.slope() == (byte) 0 || (int) tile19.slope() % 2 != 1)) + index10 = (int) tile19.type; + if (tile20 != null && tile20.nactive() && (tile20.slope() == (byte) 0 || (int) tile20.slope() % 2 != 0)) + index11 = (int) tile20.type; + if (tile21 != null && tile21.nactive()) + num10 = (int) tile21.type; + if (tile22 != null && tile22.nactive()) + num11 = (int) tile22.type; + if (tile23 != null && tile23.nactive()) + num12 = (int) tile23.type; + if (tile24 != null && tile24.nactive()) + num13 = (int) tile24.type; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + if (index8 >= 0 && Main.tileSolid[index8] && (!Main.tileNoAttach[index8] || TileID.Sets.Platforms[index8]) && (tile18.bottomSlope() || tile18.slope() == (byte) 0) && !tile18.halfBrick()) + flag4 = true; + if (index9 >= 0 && Main.tileSolid[index9] && (!Main.tileNoAttach[index9] || TileID.Sets.Platforms[index9] && tile17.halfBrick()) && (tile17.topSlope() || tile17.slope() == (byte) 0 || tile17.halfBrick())) + flag1 = true; + if (index10 >= 0 && Main.tileSolid[index10] && !Main.tileNoAttach[index10] && (tile19.leftSlope() || tile19.slope() == (byte) 0) && !tile19.halfBrick() || index10 == 124 || index10 == 5 && num12 == 5 && num10 == 5) + flag2 = true; + if (index11 >= 0 && Main.tileSolid[index11] && !Main.tileNoAttach[index11] && (tile20.rightSlope() || tile20.slope() == (byte) 0) && !tile20.halfBrick() || index11 == 124 || index11 == 5 && num13 == 5 && num11 == 5) + flag3 = true; + bool flag5; + switch ((int) centerTile.frameX / 22) + { + case 0: + flag5 = !flag4; + break; + case 1: + flag5 = !flag1; + break; + case 2: + flag5 = !flag2; + break; + case 3: + flag5 = !flag3; + break; + default: + flag5 = true; + break; + } + if (!flag5) + return; + if (flag4) + { + centerTile.frameX = (short) 0; + return; + } + if (flag1) + { + centerTile.frameX = (short) 22; + return; + } + if (flag2) + { + centerTile.frameX = (short) 44; + return; + } + if (flag3) + { + centerTile.frameX = (short) 66; + return; + } + WorldGen.KillTile(i, j); + return; + default: + if (index1 == 129 || index1 == 149) + { + Tile tile25 = Main.tile[i, j - 1]; + Tile tile26 = Main.tile[i, j + 1]; + Tile tile27 = Main.tile[i - 1, j]; + Tile tile28 = Main.tile[i + 1, j]; + int index12 = -1; + int index13 = -1; + int index14 = -1; + int index15 = -1; + if (tile25 != null && tile25.nactive() && !tile25.bottomSlope()) + index13 = (int) tile25.type; + if (tile26 != null && tile26.nactive() && !tile26.halfBrick() && !tile26.topSlope()) + index12 = (int) tile26.type; + if (tile27 != null && tile27.nactive()) + index14 = (int) tile27.type; + if (tile28 != null && tile28.nactive()) + index15 = (int) tile28.type; + if (index12 >= 0 && Main.tileSolid[index12] && !Main.tileSolidTop[index12]) + { + centerTile.frameY = (short) 0; + return; + } + if (index14 >= 0 && Main.tileSolid[index14] && !Main.tileSolidTop[index14]) + { + centerTile.frameY = (short) 54; + return; + } + if (index15 >= 0 && Main.tileSolid[index15] && !Main.tileSolidTop[index15]) + { + centerTile.frameY = (short) 36; + return; + } + if (index13 >= 0 && Main.tileSolid[index13] && !Main.tileSolidTop[index13]) + { + centerTile.frameY = (short) 18; + return; + } + WorldGen.KillTile(i, j); + return; + } + if (index1 >= 373 && index1 <= 375 || index1 == 461) + { + Tile tile29 = Main.tile[i, j - 1]; + if (tile29 != null && tile29.active() && !tile29.bottomSlope() && Main.tileSolid[(int) tile29.type] && !Main.tileSolidTop[(int) tile29.type]) + return; + WorldGen.KillTile(i, j); + return; + } + switch (index1) + { + case 178: + Tile tile30 = Main.tile[i, j - 1]; + Tile tile31 = Main.tile[i, j + 1]; + Tile tile32 = Main.tile[i - 1, j]; + Tile tile33 = Main.tile[i + 1, j]; + int index16 = -1; + int index17 = -1; + int index18 = -1; + int index19 = -1; + if (tile30 != null && tile30.active() && !tile30.bottomSlope()) + index17 = (int) tile30.type; + if (tile31 != null && tile31.active() && !tile31.halfBrick() && !tile31.topSlope()) + index16 = (int) tile31.type; + if (tile32 != null && tile32.active()) + index18 = (int) tile32.type; + if (tile33 != null && tile33.active()) + index19 = (int) tile33.type; + short num14 = (short) (WorldGen.genRand.Next(3) * 18); + if (index16 >= 0 && Main.tileSolid[index16] && !Main.tileSolidTop[index16]) + { + if (centerTile.frameY >= (short) 0 && centerTile.frameY <= (short) 36) + return; + centerTile.frameY = num14; + return; + } + if (index18 >= 0 && Main.tileSolid[index18] && !Main.tileSolidTop[index18]) + { + if (centerTile.frameY >= (short) 108 && centerTile.frameY <= (short) 54) + return; + centerTile.frameY = (short) (108 + (int) num14); + return; + } + if (index19 >= 0 && Main.tileSolid[index19] && !Main.tileSolidTop[index19]) + { + if (centerTile.frameY >= (short) 162 && centerTile.frameY <= (short) 198) + return; + centerTile.frameY = (short) (162 + (int) num14); + return; + } + if (index17 >= 0 && Main.tileSolid[index17] && !Main.tileSolidTop[index17]) + { + if (centerTile.frameY >= (short) 54 && centerTile.frameY <= (short) 90) + return; + centerTile.frameY = (short) (54 + (int) num14); + return; + } + WorldGen.KillTile(i, j); + return; + case 184: + Tile tile34 = Main.tile[i, j - 1]; + Tile tile35 = Main.tile[i, j + 1]; + Tile tile36 = Main.tile[i - 1, j]; + Tile tile37 = Main.tile[i + 1, j]; + int index20 = -1; + int index21 = -1; + int index22 = -1; + int index23 = -1; + if (tile34 != null && tile34.active() && !tile34.bottomSlope()) + index21 = (int) tile34.type; + if (tile35 != null && tile35.active() && !tile35.halfBrick() && !tile35.topSlope()) + index20 = (int) tile35.type; + if (tile36 != null && tile36.active()) + index22 = (int) tile36.type; + if (tile37 != null && tile37.active()) + index23 = (int) tile37.type; + short num15 = (short) (WorldGen.genRand.Next(3) * 18); + if (index20 >= 0 && Main.tileMoss[index20]) + { + centerTile.frameX = index20 != 381 ? (short) (22 * (index20 - 179)) : (short) 110; + if (centerTile.frameY >= (short) 0 && centerTile.frameY <= (short) 36) + return; + centerTile.frameY = num15; + return; + } + if (index21 >= 0 && Main.tileMoss[index21]) + { + centerTile.frameX = index21 != 381 ? (short) (22 * (index21 - 179)) : (short) 110; + if (centerTile.frameY >= (short) 54 && centerTile.frameY <= (short) 90) + return; + centerTile.frameY = (short) (54 + (int) num15); + return; + } + if (index22 >= 0 && Main.tileMoss[index22]) + { + centerTile.frameX = index22 != 381 ? (short) (22 * (index22 - 179)) : (short) 110; + if (centerTile.frameY >= (short) 108 && centerTile.frameY <= (short) 54) + return; + centerTile.frameY = (short) (108 + (int) num15); + return; + } + if (index23 >= 0 && Main.tileMoss[index23]) + { + centerTile.frameX = index23 != 381 ? (short) (22 * (index23 - 179)) : (short) 110; + if (centerTile.frameY >= (short) 162 && centerTile.frameY <= (short) 198) + return; + centerTile.frameY = (short) (162 + (int) num15); + 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 == 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: + Tile tile38 = Main.tile[i, j + 1]; + if (tile38 == null) + { + tile38 = new Tile(); + Main.tile[i, j + 1] = tile38; + } + if (tile38.nactive() && (Main.tileSolid[(int) tile38.type] || Main.tileSolidTop[(int) tile38.type])) + 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) + { + WorldGen.Check6x3(i, j, index1); + return; + } + switch (index1) + { + case 10: + if (WorldGen.destroyObject) + return; + bool flag6 = false; + int frameY2 = (int) centerTile.frameY; + int doorStyle1 = frameY2 / 54 + (int) centerTile.frameX / 54 * 36; + int j1 = j - frameY2 % 54 / 18; + Tile tile39 = Main.tile[i, j1 - 1]; + Tile tile40 = Main.tile[i, j1]; + Tile tile41 = Main.tile[i, j1 + 1]; + Tile tile42 = Main.tile[i, j1 + 2]; + Tile testTile1 = Main.tile[i, j1 + 3]; + if (tile39 == null) + { + tile39 = new Tile(); + Main.tile[i, j1 - 1] = tile39; + } + if (tile40 == null) + { + tile40 = new Tile(); + Main.tile[i, j1] = tile40; + } + if (tile41 == null) + { + tile41 = new Tile(); + Main.tile[i, j1 + 1] = tile41; + } + if (tile42 == null) + { + tile42 = new Tile(); + Main.tile[i, j1 + 2] = tile42; + } + if (testTile1 == null) + { + testTile1 = new Tile(); + Main.tile[i, j1 + 3] = testTile1; + } + if (!tile39.active() || !Main.tileSolid[(int) tile39.type]) + flag6 = true; + if (!WorldGen.SolidTile(testTile1)) + flag6 = true; + if (!tile40.active() || (int) tile40.type != index1) + flag6 = true; + if (!tile41.active() || (int) tile41.type != index1) + flag6 = true; + if (!tile42.active() || (int) tile42.type != index1) + flag6 = true; + if (flag6) + { + WorldGen.destroyObject = true; + WorldGen.KillTile(i, j1); + WorldGen.KillTile(i, j1 + 1); + WorldGen.KillTile(i, j1 + 2); + WorldGen.DropDoorItem(i, j, doorStyle1); + } + WorldGen.destroyObject = false; + return; + case 11: + if (WorldGen.destroyObject) + return; + int num16 = 0; + int index24 = i; + int frameX2 = (int) centerTile.frameX; + int frameY3 = (int) centerTile.frameY; + int doorStyle2 = frameY3 / 54 + (int) centerTile.frameX / 72 * 36; + int num17 = j - frameY3 % 54 / 18; + bool flag7 = false; + switch (frameX2 % 72) + { + case 0: + index24 = i; + num16 = 1; + break; + case 18: + index24 = i - 1; + num16 = 1; + break; + case 36: + index24 = i + 1; + num16 = -1; + break; + case 54: + index24 = i; + num16 = -1; + break; + } + Tile tile43 = Main.tile[index24, num17 - 1]; + Tile testTile2 = Main.tile[index24, num17 + 3]; + if (tile43 == null) + { + tile43 = new Tile(); + Main.tile[index24, num17 - 1] = tile43; + } + if (testTile2 == null) + { + testTile2 = new Tile(); + Main.tile[index24, num17 + 3] = testTile2; + } + if (!tile43.active() || !Main.tileSolid[(int) tile43.type] || !WorldGen.SolidTile(testTile2)) + { + flag7 = true; + WorldGen.destroyObject = true; + WorldGen.DropDoorItem(i, j, doorStyle2); + } + int num18 = index24; + if (num16 == -1) + num18 = index24 - 1; + for (int i1 = num18; i1 < num18 + 2; ++i1) + { + for (int j2 = num17; j2 < num17 + 3; ++j2) + { + if (!flag7) + { + Tile tile44 = Main.tile[i1, j2]; + if (!tile44.active() || tile44.type != (ushort) 11) + { + WorldGen.destroyObject = true; + WorldGen.DropDoorItem(i, j, doorStyle2); + flag7 = true; + i1 = num18; + j2 = num17; + } + } + if (flag7) + WorldGen.KillTile(i1, j2); + } + } + WorldGen.destroyObject = false; + return; + case 314: + Minecart.FrameTrack(i, j, false); + return; + case 380: + Tile tile45 = Main.tile[i - 1, j]; + if (tile45 == null) + return; + Tile tile46 = Main.tile[i + 1, j]; + if (tile46 == 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 index25 = -1; + int index26 = -1; + if (tile45 != null && tile45.active()) + index26 = !Main.tileStone[(int) tile45.type] ? (int) tile45.type : 1; + if (tile46 != null && tile46.active()) + index25 = !Main.tileStone[(int) tile46.type] ? (int) tile46.type : 1; + if (index25 >= 0 && !Main.tileSolid[index25]) + index25 = -1; + if (index26 >= 0 && !Main.tileSolid[index26]) + index26 = -1; + rectangle.X = index26 != index1 || index25 != index1 ? (index26 != index1 || index25 == index1 ? (index26 == index1 || index25 != index1 ? 54 : 0) : 36) : 18; + centerTile.frameX = (short) rectangle.X; + return; + default: + if (index1 >= 0 && TileID.Sets.Platforms[index1]) + { + Tile tile47 = Main.tile[i - 1, j]; + if (tile47 == null) + return; + Tile tile48 = Main.tile[i + 1, j]; + if (tile48 == null) + return; + Tile tile49 = Main.tile[i - 1, j + 1]; + if (tile49 == null) + return; + Tile tile50 = Main.tile[i + 1, j + 1]; + if (tile50 == null) + return; + Tile tile51 = Main.tile[i - 1, j - 1]; + if (tile51 == null) + return; + Tile tile52 = Main.tile[i + 1, j - 1]; + if (tile52 == null) + return; + int index27 = -1; + int index28 = -1; + if (tile47 != null && tile47.active()) + index28 = !Main.tileStone[(int) tile47.type] ? (!TileID.Sets.Platforms[(int) tile47.type] ? (int) tile47.type : index1) : 1; + if (tile48 != null && tile48.active()) + index27 = !Main.tileStone[(int) tile48.type] ? (!TileID.Sets.Platforms[(int) tile48.type] ? (int) tile48.type : index1) : 1; + if (index27 >= 0 && !Main.tileSolid[index27]) + index27 = -1; + if (index28 >= 0 && !Main.tileSolid[index28]) + index28 = -1; + if (index28 == index1 && tile47.halfBrick() != centerTile.halfBrick()) + index28 = -1; + if (index27 == index1 && tile48.halfBrick() != centerTile.halfBrick()) + index27 = -1; + if (index28 != -1 && index28 != index1 && centerTile.halfBrick()) + index28 = -1; + if (index27 != -1 && index27 != index1 && centerTile.halfBrick()) + index27 = -1; + if (index28 == -1 && tile51.active() && (int) tile51.type == index1 && tile51.slope() == (byte) 1) + index28 = index1; + if (index27 == -1 && tile52.active() && (int) tile52.type == index1 && tile52.slope() == (byte) 2) + index27 = index1; + if (index28 == index1 && tile47.slope() == (byte) 2 && index27 != index1) + index27 = -1; + if (index27 == index1 && tile48.slope() == (byte) 1 && index28 != index1) + index28 = -1; + rectangle.X = centerTile.slope() != (byte) 1 ? (centerTile.slope() != (byte) 2 ? (index28 != index1 || index27 != index1 ? (index28 != index1 || index27 != -1 ? (index28 != -1 || index27 != index1 ? (index28 == index1 || index27 != index1 ? (index28 != index1 || index27 == index1 ? (index28 == index1 || index28 == -1 || index27 != -1 ? (index28 != -1 || index27 == index1 || index27 == -1 ? 90 : 126) : 108) : 72) : 54) : (tile48.slope() != (byte) 1 ? 36 : 288)) : (tile47.slope() != (byte) 2 ? 18 : 270)) : (tile47.slope() != (byte) 2 || tile48.slope() != (byte) 1 ? (tile47.slope() != (byte) 2 ? (tile48.slope() != (byte) 1 ? 0 : 234) : 216) : 252)) : (!TileID.Sets.Platforms[(int) tile47.type] || tile47.slope() != (byte) 0 ? (tile49.active() || TileID.Sets.Platforms[(int) tile49.type] && tile49.slope() != (byte) 1 ? (tile48.active() || TileID.Sets.Platforms[(int) tile52.type] && tile52.slope() == (byte) 2 ? 144 : 378) : (tile48.active() || TileID.Sets.Platforms[(int) tile52.type] && tile52.slope() == (byte) 2 ? 342 : 414)) : 450)) : (!TileID.Sets.Platforms[(int) tile48.type] || tile48.slope() != (byte) 0 ? (tile50.active() || TileID.Sets.Platforms[(int) tile50.type] && tile50.slope() != (byte) 2 ? (tile47.active() || TileID.Sets.Platforms[(int) tile51.type] && tile51.slope() == (byte) 1 ? 180 : 396) : (tile47.active() || TileID.Sets.Platforms[(int) tile51.type] && tile51.slope() == (byte) 1 ? 360 : 432)) : 468); + centerTile.frameX = (short) rectangle.X; + return; + } + if (index1 == 233 || index1 == 236 || index1 == 238) + { + WorldGen.CheckJunglePlant(i, j, index1); + 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 == 34 || index1 == 454) + { + WorldGen.CheckChand(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) + { + WorldGen.Check3x3(i, j, (int) (ushort) index1); + return; + } + if (index1 == 15 || index1 == 20 || index1 == 216 || index1 == 338 || index1 == 390) + { + 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 >= 361 && index1 <= 364 || index1 >= 391 && index1 <= 394 || index1 == 405) + { + WorldGen.Check3x2(i, j, (int) (ushort) index1); + return; + } + if (index1 == 135 || index1 == 144 || index1 == 141 || index1 == 210 || index1 == 239 || index1 == 36 || index1 == 428) + { + WorldGen.Check1x1(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) + { + WorldGen.CheckOnTable1x1(i, j, (int) (byte) 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; + default: + if (!TileID.Sets.BasicChestFake[index1] && index1 != 457) + { + if (index1 == 335 || index1 == 411) + { + WorldGen.Check2x2(i, j, index1); + return; + } + if (index1 == 132 || index1 == 138 || index1 == 142 || index1 == 143 || index1 >= 288 && index1 <= 295 || index1 >= 316 && index1 <= 318 || index1 == 172 || index1 == 360) + { + WorldGen.Check2x2(i, j, index1); + return; + } + if (index1 == 376 || index1 == 443 || index1 == 444) + { + 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) + { + WorldGen.Check2xX(i, j, (ushort) index1); + return; + } + if (index1 == 101 || index1 == 102 || index1 == 463) + { + WorldGen.Check3x4(i, j, index1); + return; + } + if (index1 == 42 || index1 == 270 || index1 == 271) + { + WorldGen.Check1x2Top(i, j, (ushort) index1); + return; + } + if (index1 == 55 || index1 == 85 || index1 == 395 || index1 == 425) + { + WorldGen.CheckSign(i, j, (ushort) index1); + return; + } + if (index1 == 209) + { + WorldGen.CheckCannon(i, j, index1); + return; + } + if (index1 == 79 || index1 == 90) + { + 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) + { + WorldGen.Check2x2(i, j, index1); + return; + } + switch (index1) + { + case 81: + Tile tile53 = Main.tile[i, j - 1]; + Tile tile54 = Main.tile[i, j + 1]; + Tile tile55 = Main.tile[i - 1, j]; + Tile tile56 = Main.tile[i + 1, j]; + int index29 = -1; + int num19 = -1; + if (tile53 != null && tile53.active()) + num19 = (int) tile53.type; + if (tile54 != null && tile54.active()) + index29 = (int) tile54.type; + if (num19 != -1) + { + WorldGen.KillTile(i, j); + return; + } + if (index29 >= 0 && Main.tileSolid[index29] && !tile54.halfBrick() && !tile54.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 tile57 = Main.tile[i, j - 1]; + Tile tile58 = Main.tile[i, j + 1]; + int num20 = -1; + int num21 = -1; + if (tile57 != null && tile57.active()) + num21 = (int) tile57.type; + if (tile58 != null && tile58.active()) + num20 = (int) tile58.type; + if (num20 != index1 && num20 != 70) + { + WorldGen.KillTile(i, j); + return; + } + if (num21 == index1 || centerTile.frameX != (short) 0) + return; + centerTile.frameNumber((byte) WorldGen.genRand.Next(3)); + if (centerTile.frameNumber() == (byte) 0) + { + centerTile.frameX = (short) 18; + centerTile.frameY = (short) 0; + } + if (centerTile.frameNumber() == (byte) 1) + { + centerTile.frameX = (short) 18; + centerTile.frameY = (short) 18; + } + if (centerTile.frameNumber() != (byte) 2) + return; + centerTile.frameX = (short) 18; + centerTile.frameY = (short) 36; + return; + case 323: + WorldGen.CheckPalmTree(i, j); + 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, centerTile, resetFrame); + return; + } + Tile tile59 = Main.tile[i, j - 1]; + Tile tile60 = Main.tile[i, j + 1]; + Tile tile61 = Main.tile[i - 1, j]; + Tile tile62 = Main.tile[i + 1, j]; + Tile tile63 = Main.tile[i - 1, j + 1]; + Tile tile64 = Main.tile[i + 1, j + 1]; + Tile tile65 = Main.tile[i - 1, j - 1]; + Tile tile66 = 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 (tile61 != null && tile61.active()) + { + left = !Main.tileStone[(int) tile61.type] ? (int) tile61.type : 1; + if (tile61.slope() == (byte) 1 || tile61.slope() == (byte) 3) + left = -1; + } + if (tile62 != null && tile62.active()) + { + right = !Main.tileStone[(int) tile62.type] ? (int) tile62.type : 1; + if (tile62.slope() == (byte) 2 || tile62.slope() == (byte) 4) + right = -1; + } + if (tile59 != null && tile59.active()) + { + up = !Main.tileStone[(int) tile59.type] ? (int) tile59.type : 1; + if (tile59.slope() == (byte) 3 || tile59.slope() == (byte) 4) + up = -1; + } + if (tile60 != null && tile60.active()) + { + down = !Main.tileStone[(int) tile60.type] ? (int) tile60.type : 1; + if (tile60.slope() == (byte) 1 || tile60.slope() == (byte) 2) + down = -1; + } + if (tile65 != null && tile65.active()) + upLeft = !Main.tileStone[(int) tile65.type] ? (int) tile65.type : 1; + if (tile66 != null && tile66.active()) + upRight = !Main.tileStone[(int) tile66.type] ? (int) tile66.type : 1; + if (tile63 != null && tile63.active()) + downLeft = !Main.tileStone[(int) tile63.type] ? (int) tile63.type : 1; + if (tile64 != null && tile64.active()) + downRight = !Main.tileStone[(int) tile64.type] ? (int) tile64.type : 1; + if (centerTile.slope() == (byte) 2) + { + up = -1; + left = -1; + } + if (centerTile.slope() == (byte) 1) + { + up = -1; + right = -1; + } + if (centerTile.slope() == (byte) 4) + { + down = -1; + left = -1; + } + if (centerTile.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 (tile60.frameY == (short) 72) + down = index1; + else if (tile60.frameY == (short) 0) + down = index1; + } + if ((index1 == 1 || Main.tileMoss[index1] || index1 == 117 || index1 == 25 || index1 == 203) && up == 165) + { + if (tile59.frameY == (short) 90) + up = index1; + else if (tile59.frameY == (short) 54) + up = index1; + } + if (index1 == 225) + { + if (down == 165) + down = index1; + if (up == 165) + up = index1; + } + if ((index1 == 200 || index1 == 161 || index1 == 163 || index1 == 164) && down == 165) + down = index1; + if ((centerTile.slope() == (byte) 1 || centerTile.slope() == (byte) 2) && down > -1 && !TileID.Sets.Platforms[down]) + down = index1; + if (up > -1 && (tile59.slope() == (byte) 1 || tile59.slope() == (byte) 2) && !TileID.Sets.Platforms[up]) + up = index1; + if ((centerTile.slope() == (byte) 3 || centerTile.slope() == (byte) 4) && up > -1 && !TileID.Sets.Platforms[up]) + up = index1; + if (down > -1 && (tile60.slope() == (byte) 3 || tile60.slope() == (byte) 4) && !TileID.Sets.Platforms[down]) + down = index1; + if (index1 == 124) + { + if (up > -1 && Main.tileSolid[up]) + up = index1; + if (down > -1 && Main.tileSolid[down]) + down = index1; + } + if (up > -1 && tile59.halfBrick() && !TileID.Sets.Platforms[up]) + up = index1; + if (left > -1 && tile61.halfBrick()) + { + if (centerTile.halfBrick()) + left = index1; + else if ((int) tile61.type != index1) + left = -1; + } + if (right > -1 && tile62.halfBrick()) + { + if (centerTile.halfBrick()) + right = index1; + else if ((int) tile62.type != index1) + right = -1; + } + if (centerTile.halfBrick()) + { + if (left != index1) + left = -1; + if (right != index1) + right = -1; + up = -1; + } + if (tile60 != null && tile60.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 num22; + if (resetFrame) + { + num22 = WorldGen.genRand.Next(0, 3); + centerTile.frameNumber((byte) num22); + } + else + num22 = (int) centerTile.frameNumber(); + if (Main.tileLargeFrames[index1] == (byte) 1) + num22 = new int[4, 3] + { + { + 2, + 4, + 2 + }, + { + 1, + 3, + 1 + }, + { + 2, + 2, + 4 + }, + { + 1, + 1, + 3 + } + }[j % 4, i % 3] - 1; + 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]) + WorldGen.TileMergeAttempt(index1, Main.tileSolid, Main.tileSolidTop, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + 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; + } + if (up == 2 || up == 23 || up == 109 || up == 199) + up = index1; + if (down == 2 || down == 23 || down == 109 || down == 199) + down = index1; + if (left == 2 || left == 23 || left == 109 || left == 199) + left = index1; + if (right == 2 || right == 23 || right == 109 || right == 199) + right = index1; + if (upLeft > -1 && Main.tileMergeDirt[upLeft]) + upLeft = index1; + else if (upLeft == 2 || upLeft == 23 || upLeft == 109 || upLeft == 199) + upLeft = index1; + if (upRight > -1 && Main.tileMergeDirt[upRight]) + upRight = index1; + else if (upRight == 2 || upRight == 23 || upRight == 109 || upRight == 199) + upRight = index1; + if (downLeft > -1 && Main.tileMergeDirt[downLeft]) + downLeft = index1; + else if (downLeft == 2 || downLeft == 23 || downLeft == 109 || downLeft == 199) + downLeft = index1; + if (downRight > -1 && Main.tileMergeDirt[downRight]) + downRight = index1; + else if (downRight == 2 || downRight == 23 || downRight == 109 || downRight == 199) + 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); + 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 + { + switch (index1) + { + case 32: + if (down == 23) + { + down = index1; + break; + } + break; + case 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; + 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 58: + case 75: + case 76: + WorldGen.TileMergeAttempt(-2, 57, 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 60: + WorldGen.TileMergeAttempt(59, 211, ref up, ref down, ref left, ref right); + break; + case 69: + if (down == 60) + { + down = index1; + break; + } + 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 161: + case 163: + case 164: + case 200: + case 224: + WorldGen.TileMergeAttempt(-2, 147, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 162: + WorldGen.TileMergeAttempt(-2, TileID.Sets.IcesSnow, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 189: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 196, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 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; + case 192: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 191, 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); + 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; + case 225: + case 226: + WorldGen.TileMergeAttempt(-2, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 352: + if (down == 199) + { + down = index1; + break; + } + break; + case 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; + case 384: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 383, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 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; + case 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; + case 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; + case 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; + case 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; + case 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; + case 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; + case 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; + case 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; + case 407: + WorldGen.TileMergeAttempt(-2, 404, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + } + if (Main.tileStone[index1] || index1 == 1) + WorldGen.TileMergeAttempt(index1, Main.tileMoss, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + bool flag8 = false; + if (up == -2 && (int) centerTile.color() != (int) tile59.color()) + { + up = index1; + WorldGen.mergeUp = true; + } + if (down == -2 && (int) centerTile.color() != (int) tile60.color()) + { + down = index1; + WorldGen.mergeDown = true; + } + if (left == -2 && (int) centerTile.color() != (int) tile61.color()) + { + left = index1; + WorldGen.mergeLeft = true; + } + if (right == -2 && (int) centerTile.color() != (int) tile62.color()) + { + right = index1; + WorldGen.mergeRight = true; + } + if (index1 == 2 || index1 == 23 || index1 == 60 || index1 == 70 || index1 == 109 || index1 == 199 || Main.tileMoss[index1] || TileID.Sets.NeedsGrassFraming[index1]) + { + flag8 = true; + WorldGen.TileMergeAttemptWeird(index1, -1, Main.tileSolid, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + int num23 = TileID.Sets.NeedsGrassFramingDirt[index1]; + if (index1 == 60 || index1 == 70) + num23 = 59; + else if (Main.tileMoss[index1]) + { + num23 = 1; + } + else + { + switch (index1) + { + case 2: + WorldGen.TileMergeAttempt(num23, 23, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 23: + WorldGen.TileMergeAttempt(num23, 2, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + } + if (up != index1 && up != num23 && (down == index1 || down == num23)) + { + if (left == num23 && right == index1) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 != num23 && (up == index1 || up == num23)) + { + if (left == num23 && right == index1) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 != num23 && (right == index1 || right == num23)) + { + if (up == num23 && down == index1) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 != num23 && (left == index1 || left == num23)) + { + if (up == num23 && down == index1) + { + switch (num22) + { + 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 (num22) + { + 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 == num23) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 == num23) + { + switch (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 == num23 && left == index1 && right == index1 && upLeft == -1 && upRight == -1) + { + switch (num22) + { + 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 == num23 && down == index1 && left == index1 && right == index1 && downLeft == -1 && downRight == -1) + { + switch (num22) + { + 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 == num23 && right == index1 && upRight == -1 && downRight == -1) + { + switch (num22) + { + 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 == num23 && upLeft == -1 && downLeft == -1) + { + switch (num22) + { + 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 == num23 && left == index1 && right == index1) + { + if (upRight != -1) + { + switch (num22) + { + 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 (num22) + { + 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 == num23 && down == index1 && left == index1 && right == index1) + { + if (downRight != -1) + { + switch (num22) + { + 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 (num22) + { + 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 == num23) + { + if (upLeft != -1) + { + switch (num22) + { + 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 (num22) + { + 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 == num23 && right == index1) + { + if (upRight != -1) + { + switch (num22) + { + 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 (num22) + { + 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 == num23 && down == index1 && left == index1 && right == index1 || up == index1 && down == num23 && left == index1 && right == index1 || up == index1 && down == index1 && left == num23 && right == index1 || up == index1 && down == index1 && left == index1 && right == num23) + { + switch (num22) + { + 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 == num23) && (down == index1 || down == num23) && (left == index1 || left == num23) && (right == index1 || right == num23)) + { + if (upLeft != index1 && upLeft != num23 && (upRight == index1 || upRight == num23) && (downLeft == index1 || downLeft == num23) && (downRight == index1 || downRight == num23)) + { + switch (num22) + { + 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 != num23 && (upLeft == index1 || upLeft == num23) && (downLeft == index1 || downLeft == num23) && (downRight == index1 || downRight == num23)) + { + switch (num22) + { + 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 != num23 && (upLeft == index1 || upLeft == num23) && (upRight == index1 || upRight == num23) && (downRight == index1 || downRight == num23)) + { + switch (num22) + { + 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 != num23 && (upLeft == index1 || upLeft == num23) && (downLeft == index1 || downLeft == num23) && (upRight == index1 || upRight == num23)) + { + switch (num22) + { + 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 != num23 && up != index1 && down == index1 && left != num23 && left != index1 && right == index1 && downRight != num23 && downRight != index1) + { + switch (num22) + { + 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 != num23 && up != index1 && down == index1 && left == index1 && right != num23 && right != index1 && downLeft != num23 && downLeft != index1) + { + switch (num22) + { + 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 != num23 && down != index1 && up == index1 && left != num23 && left != index1 && right == index1 && upRight != num23 && upRight != index1) + { + switch (num22) + { + 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 != num23 && down != index1 && up == index1 && left == index1 && right != num23 && right != index1 && upLeft != num23 && upLeft != index1) + { + switch (num22) + { + 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 != num23 && down == index1 && left == index1 && right == index1 && downLeft != index1 && downLeft != num23 && downRight != index1 && downRight != num23) + { + switch (num22) + { + 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 != num23 && up == index1 && left == index1 && right == index1 && upLeft != index1 && upLeft != num23 && upRight != index1 && upRight != num23) + { + switch (num22) + { + 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 != num23 && down == index1 && up == index1 && right == index1 && upRight != index1 && upRight != num23 && downRight != index1 && downRight != num23) + { + switch (num22) + { + 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 != num23 && down == index1 && up == index1 && left == index1 && upLeft != index1 && upLeft != num23 && downLeft != index1 && downLeft != num23) + { + switch (num22) + { + 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 != num23 && up != index1 && (down == num23 || down == index1) && left == num23 && right == num23) + { + switch (num22) + { + 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 != num23 && down != index1 && (up == num23 || up == index1) && left == num23 && right == num23) + { + switch (num22) + { + 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 != num23 && left != index1 && (right == num23 || right == index1) && up == num23 && down == num23) + { + switch (num22) + { + 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 != num23 && right != index1 && (left == num23 || left == index1) && up == num23 && down == num23) + { + switch (num22) + { + 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 == num23 && left == num23 && right == num23) + { + switch (num22) + { + 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 == num23 && down == index1 && left == num23 && right == num23) + { + switch (num22) + { + 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 == num23 && down == num23 && left == index1 && right == num23) + { + switch (num22) + { + 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 == num23 && down == num23 && left == num23 && right == index1) + { + switch (num22) + { + 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 != num23 && down == index1 && left == index1 && right == index1) + { + if ((downLeft == num23 || downLeft == index1) && downRight != num23 && downRight != index1) + { + switch (num22) + { + 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 == num23 || downRight == index1) && downLeft != num23 && downLeft != index1) + { + switch (num22) + { + 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 != num23 && up == index1 && left == index1 && right == index1) + { + if ((upLeft == num23 || upLeft == index1) && upRight != num23 && upRight != index1) + { + switch (num22) + { + 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 == num23 || upRight == index1) && upLeft != num23 && upLeft != index1) + { + switch (num22) + { + 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 != num23 && up == index1 && down == index1 && right == index1) + { + if ((upRight == num23 || upRight == index1) && downRight != num23 && downRight != index1) + { + switch (num22) + { + 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 == num23 || downRight == index1) && upRight != num23 && upRight != index1) + { + switch (num22) + { + 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 != num23 && up == index1 && down == index1 && left == index1) + { + if ((upLeft == num23 || upLeft == index1) && downLeft != num23 && downLeft != index1) + { + switch (num22) + { + 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 == num23 || downLeft == index1) && upLeft != num23 && upLeft != index1) + { + switch (num22) + { + 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 == num23) && (down == index1 || down == num23) && (left == index1 || left == num23) && (right == index1 || right == num23) && upLeft != -1 && upRight != -1 && downLeft != -1 && downRight != -1) + { + if ((i + j) % 2 == 1) + { + switch (num22) + { + 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 (num22) + { + 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, num23, 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 (!flag8) + { + flag8 = 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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) + { + if (up == -1 && down == -2 && left == index1 && right == index1) + { + switch (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 num24 = centerTile.blockType(); + if (TileID.Sets.HasSlopeFrames[index1]) + { + if (num24 == 0) + { + bool flag9 = index1 == up && tile59.topSlope(); + bool flag10 = index1 == left && tile61.leftSlope(); + bool flag11 = index1 == right && tile62.rightSlope(); + bool flag12 = index1 == down && tile60.bottomSlope(); + int num25 = 0; + int num26 = 0; + if (flag9.ToInt() + flag10.ToInt() + flag11.ToInt() + flag12.ToInt() > 2) + { + int num27 = (tile59.slope() == (byte) 1).ToInt() + (tile62.slope() == (byte) 1).ToInt() + (tile60.slope() == (byte) 4).ToInt() + (tile61.slope() == (byte) 4).ToInt(); + int num28 = (tile59.slope() == (byte) 2).ToInt() + (tile62.slope() == (byte) 3).ToInt() + (tile60.slope() == (byte) 3).ToInt() + (tile61.slope() == (byte) 2).ToInt(); + if (num27 == num28) + { + num25 = 2; + num26 = 4; + } + else if (num27 > num28) + { + int num29 = index1 != upLeft ? 0 : (tile65.slope() == (byte) 0 ? 1 : 0); + bool flag13 = index1 == downRight && tile64.slope() == (byte) 0; + int num30 = flag13 ? 1 : 0; + if ((num29 & num30) != 0) + num26 = 4; + else if (flag13) + { + num25 = 6; + } + else + { + num25 = 7; + num26 = 1; + } + } + else + { + int num31 = index1 != upRight ? 0 : (tile66.slope() == (byte) 0 ? 1 : 0); + bool flag14 = index1 == downLeft && tile63.slope() == (byte) 0; + int num32 = flag14 ? 1 : 0; + if ((num31 & num32) != 0) + { + num26 = 4; + num25 = 1; + } + else if (flag14) + { + num25 = 7; + } + else + { + num25 = 6; + num26 = 1; + } + } + rectangle.X = (18 + num25) * 18; + rectangle.Y = num26 * 18; + } + else + { + if (flag9 & flag10 && index1 == down && index1 == right) + num26 = 2; + else if (flag9 & flag11 && index1 == down && index1 == left) + { + num25 = 1; + num26 = 2; + } + else if (flag11 & flag12 && index1 == up && index1 == left) + { + num25 = 1; + num26 = 3; + } + else if (flag12 & flag10 && index1 == up && index1 == right) + num26 = 3; + if (num25 != 0 || num26 != 0) + { + rectangle.X = (18 + num25) * 18; + rectangle.Y = num26 * 18; + } + } + } + if (num24 >= 2 && (rectangle.X < 0 || rectangle.Y < 0)) + { + int num33 = -1; + int num34 = -1; + int num35 = -1; + int num36 = 0; + int num37 = 0; + switch (num24) + { + case 2: + num33 = left; + num34 = down; + num35 = downLeft; + ++num36; + break; + case 3: + num33 = right; + num34 = down; + num35 = downRight; + break; + case 4: + num33 = left; + num34 = up; + num35 = upLeft; + ++num36; + ++num37; + break; + case 5: + num33 = right; + num34 = up; + num35 = upRight; + ++num37; + break; + } + if (index1 != num33 || index1 != num34 || index1 != num35) + { + if (index1 == num33 && index1 == num34) + num36 += 2; + else if (index1 == num33) + num36 += 4; + else if (index1 == num34) + { + num36 += 4; + num37 += 2; + } + else + { + num36 += 2; + num37 += 2; + } + } + rectangle.X = (18 + num36) * 18; + rectangle.Y = num37 * 18; + } + } + if (rectangle.X < 0 || rectangle.Y < 0) + { + if (!flag8) + 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 || Main.tileMoss[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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22) + { + 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 (num22 <= 0) + { + rectangle.X = 18; + rectangle.Y = 18; + } + else if (num22 == 1) + { + rectangle.X = 36; + rectangle.Y = 18; + } + if (num22 >= 2) + { + rectangle.X = 54; + rectangle.Y = 18; + } + } + if (Main.tileLargeFrames[index1] == (byte) 1 && num22 == 3) + rectangle.Y += 90; + centerTile.frameX = (short) rectangle.X; + centerTile.frameY = (short) rectangle.Y; + if (index1 == 52 || index1 == 62 || index1 == 115 || index1 == 205) + { + up = tile59 == null ? index1 : (tile59.active() ? (!tile59.bottomSlope() ? (int) tile59.type : -1) : -1); + if ((index1 == 52 || index1 == 205) && (up == 109 || up == 115)) + { + centerTile.type = (ushort) 115; + WorldGen.SquareTileFrame(i, j); + return; + } + if ((index1 == 115 || index1 == 205) && (up == 2 || up == 52)) + { + centerTile.type = (ushort) 52; + WorldGen.SquareTileFrame(i, j); + return; + } + if ((index1 == 52 || index1 == 115) && (up == 199 || up == 205)) + { + centerTile.type = (ushort) 205; + WorldGen.SquareTileFrame(i, j); + return; + } + if (up != index1) + { + bool flag15 = false; + if (up == -1) + flag15 = true; + if (index1 == 52 && up != 2 && up != 192) + flag15 = true; + if (index1 == 62 && up != 60) + flag15 = true; + if (index1 == 115 && up != 109) + flag15 = true; + if (index1 == 205 && up != 199) + flag15 = true; + if (flag15) + WorldGen.KillTile(i, j); + } + } + if (!WorldGen.noTileActions && centerTile.active() && (index1 == 53 || index1 == 112 || index1 == 116 || index1 == 123 || index1 == 234 || index1 == 224 || index1 == 330 || index1 == 331 || index1 == 332 || index1 == 333)) + { + switch (Main.netMode) + { + case 0: + if (tile60 != null && !tile60.active()) + { + bool flag16 = true; + if (tile59.active() && (TileID.Sets.BasicChest[(int) tile59.type] || TileID.Sets.BasicChestFake[(int) tile59.type] || tile59.type == (ushort) 323 || tile59.type == (ushort) 88)) + flag16 = false; + if (flag16) + { + int Damage = 10; + int Type; + switch (index1) + { + case 59: + Type = 39; + break; + case 112: + Type = 56; + break; + case 116: + Type = 67; + break; + case 123: + Type = 71; + break; + case 224: + Type = 179; + break; + case 234: + Type = 241; + break; + case 330: + Type = 411; + Damage = 0; + break; + case 331: + Type = 412; + Damage = 0; + break; + case 332: + Type = 413; + Damage = 0; + break; + case 333: + Type = 414; + Damage = 0; + break; + default: + Type = 31; + break; + } + centerTile.ClearTile(); + int index30 = Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.41f, Type, Damage, 0.0f, Main.myPlayer); + Main.projectile[index30].ai[0] = 1f; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + } + break; + case 2: + if (tile60 != null && !tile60.active()) + { + bool flag17 = true; + if (tile59.active() && (TileID.Sets.BasicChest[(int) tile59.type] || TileID.Sets.BasicChestFake[(int) tile59.type] || tile59.type == (ushort) 323 || tile59.type == (ushort) 88)) + flag17 = false; + if (flag17) + { + int Damage = 10; + int Type; + switch (index1) + { + case 59: + Type = 39; + break; + case 112: + Type = 56; + break; + case 116: + Type = 67; + break; + case 123: + Type = 71; + break; + case 224: + Type = 179; + break; + case 234: + Type = 241; + break; + case 330: + Type = 411; + Damage = 0; + break; + case 331: + Type = 412; + Damage = 0; + break; + case 332: + Type = 413; + Damage = 0; + break; + case 333: + Type = 414; + Damage = 0; + break; + default: + Type = 31; + break; + } + centerTile.active(false); + bool flag18 = false; + for (int index31 = 0; index31 < 1000; ++index31) + { + if (Main.projectile[index31].active && Main.projectile[index31].owner == Main.myPlayer && Main.projectile[index31].type == Type && Math.Abs(Main.projectile[index31].timeLeft - 3600) < 60 && (double) Main.projectile[index31].Distance(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 10))) < 4.0) + { + flag18 = true; + break; + } + } + if (!flag18) + { + int index32 = Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 2.5f, Type, Damage, 0.0f, Main.myPlayer); + Main.projectile[index32].velocity.Y = 0.5f; + Main.projectile[index32].position.Y += 2f; + Main.projectile[index32].netUpdate = true; + } + NetMessage.SendTileSquare(-1, i, j, 1); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + } + break; + } + } + if (rectangle.X != frameX1) + { + if (rectangle.Y != frameY1) + { + if (frameX1 >= 0) + { + if (frameY1 >= 0) + { + ++WorldGen.tileReframeCount; + if (WorldGen.tileReframeCount < 55) + { + int num38 = 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 = num38 != 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 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; + NetMessage.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) + return false; + return Main.tile[x, y].type != (ushort) 254 || context == TileCuttingContext.TilePlacement; + } + + public class Hooks + { + public static event Action OnWorldLoad; + + public static void Initialize() => Player.Hooks.OnEnterWorld += (Action) (player => + { + if (player.whoAmI != Main.myPlayer) + return; + WorldGen.Hooks.WorldLoaded(); + Main.FixUIScale(); + }); + + public static void WorldLoaded() + { + if (WorldGen.Hooks.OnWorldLoad == null) + return; + WorldGen.Hooks.OnWorldLoad(); + } + + public static void ClearWorld() + { + PressurePlateHelper.Reset(); + WorldGen.TownManager.Clear(); + NPC.ResetKillCount(); + } + } + + public class Spread + { + public static void Wall(int x, int y, int wallType) + { + if (!WorldGen.InWorld(x, y)) + return; + byte num = (byte) 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 != (byte) 0) + { + if (tile.active() && tile.wall == (byte) 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; + byte num1 = (byte) 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 != (byte) 4 && tile.wall != (byte) 40 && tile.wall != (byte) 3) + { + if (num1 == (byte) 63 && tile.wall == (byte) 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 == (byte) 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 != (byte) 4 && tile.wall != (byte) 40 && tile.wall != (byte) 3) + tile.wall = num1; + } + } + } + } + + public static void Moss(int x, int y) + { + if (!WorldGen.InWorld(x, y)) + return; + byte mossWall = WorldGen.mossWall; + ushort mossTile = (ushort) 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 != (byte) 0) + { + if (tile.active()) + { + if (tile.wall == (byte) 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 != (byte) 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 = (byte) (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 != (byte) 0) + { + if (tile.active() && tile.wall == (byte) 0) + tile.wall = num; + } + else + { + tile.wall = 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, spiders: 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; + byte num = (byte) 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 > (byte) 0) + { + 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; + } + } +} diff --git a/WorldSections.cs b/WorldSections.cs new file mode 100644 index 0000000..67768ef --- /dev/null +++ b/WorldSections.cs @@ -0,0 +1,394 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldSections +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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..e6d9519 --- /dev/null +++ b/ZoomContext.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ZoomContext +// Assembly: Terraria, Version=1.3.5.3, Culture=neutral, PublicKeyToken=null +// MVID: 68659D26-2BE6-448F-8663-74FA559E6F08 +// 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, + } +}