コード例 #1
0
        public static bool FlailTileCollide(int index, Vector2 oldVelocity)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            bool flag = false;

            if (oldVelocity.X != projectile.velocity.X)
            {
                if (Math.Abs(oldVelocity.X) > 4f)
                {
                    flag = true;
                }
                projectile.velocity.X = -oldVelocity.X * 0.2f;
            }
            if (oldVelocity.Y != projectile.velocity.Y)
            {
                if (Math.Abs(oldVelocity.Y) > 4f)
                {
                    flag = true;
                }
                projectile.velocity.Y = -oldVelocity.Y * 0.2f;
            }
            projectile.ai[0] = 1f;
            if (flag)
            {
                projectile.netUpdate = true;
                Collision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height);
                Main.PlaySound(0, (int)projectile.position.X, (int)projectile.position.Y, 1);
            }
            return(false);
        }
コード例 #2
0
 //in Terraria.Projectile.Damage for damaging NPCs before flag2 is checked... just check the patch files
 internal static bool? CanHitNPC(Projectile projectile, NPC target)
 {
     bool? flag = null;
     foreach (GlobalProjectile globalProjectile in globalProjectiles)
     {
         bool? canHit = globalProjectile.CanHitNPC(projectile, target);
         if (canHit.HasValue && !canHit.Value)
         {
             return false;
         }
         if (canHit.HasValue)
         {
             flag = canHit.Value;
         }
     }
     if (IsModProjectile(projectile))
     {
         bool? canHit = projectile.modProjectile.CanHitNPC(target);
         if (canHit.HasValue && !canHit.Value)
         {
             return false;
         }
         if (canHit.HasValue)
         {
             flag = canHit.Value;
         }
     }
     return flag;
 }
コード例 #3
0
 public static void ThrowingKnifeAI(int index, int airTime = 20, ExtraAction action = null, ExtraAction initialize = null)
 {
     Terraria.Projectile projectile = Main.projectile[index];
     if (initialize != null && projectile.localAI[1] == 0f)
     {
         projectile.localAI[1] = 1f;
         initialize();
     }
     projectile.rotation   += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.03f * (float)projectile.direction;
     projectile.localAI[0] += 1f;
     if (projectile.localAI[0] >= (float)airTime)
     {
         projectile.velocity.Y = projectile.velocity.Y + 0.4f;
         projectile.velocity.X = projectile.velocity.X * 0.98f;
     }
     else
     {
         projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
     }
     if (projectile.velocity.Y > 16f)
     {
         projectile.velocity.Y = 16f;
     }
     if (action != null)
     {
         action();
     }
 }
コード例 #4
0
ファイル: HealProj.cs プロジェクト: DrakoGlyph/tModLoader
		public override bool PreAI(Projectile projectile)
		{
			if (projectile.aiStyle == 52)
			{
				Player player = Main.player[(int)projectile.ai[0]];
				Vector2 center = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
				float offsetX = player.Center.X - center.X;
				float offsetY = player.Center.Y - center.Y;
				float distance = (float)Math.Sqrt(offsetX * offsetX + offsetY * offsetY);
				if (distance < 50f && projectile.position.X < player.position.X + player.width && projectile.position.X + projectile.width > player.position.X && projectile.position.Y < player.position.Y + player.height && projectile.position.Y + projectile.height > player.position.Y)
				{
					if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech)
					{
						int heal = (int)projectile.ai[1];
						int damage = player.statLifeMax2 - player.statLife;
						if (heal > damage)
						{
							heal = damage;
						}
						if (heal > 0)
						{
							player.AddBuff(mod.BuffType("Undead2"), 2 * heal, false);
						}
					}
				}
			}
			return base.PreAI(projectile);
		}
コード例 #5
0
		internal void SetupProjectile(Projectile projectile)
		{
			ModProjectile newProjectile = (ModProjectile)Activator.CreateInstance(GetType());
			newProjectile.projectile = projectile;
			projectile.modProjectile = newProjectile;
			newProjectile.mod = mod;
			newProjectile.SetDefaults();
		}
コード例 #6
0
ファイル: ProjHooks.cs プロジェクト: TerrariaPrismTeam/Prism
        internal static bool OnColliding(Projectile pr, Rectangle p, Rectangle t)
        {
            var bh = pr.P_BHandler as ProjBHandler;

            if (bh == null)
                return pr.RealColliding(p, t);

            return bh.IsColliding(p, t);
        }
コード例 #7
0
		internal void SetupProjectile(Projectile projectile)
		{
			ModProjectile newProjectile = (ModProjectile)(CloneNewInstances ? MemberwiseClone()
				: Activator.CreateInstance(GetType()));
			newProjectile.projectile = projectile;
			projectile.modProjectile = newProjectile;
			newProjectile.mod = mod;
			newProjectile.SetDefaults();
		}
コード例 #8
0
ファイル: Helper.cs プロジェクト: astranauta/Tremor
        public static void DrawAroundOrigin(int index, Color lightColor)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            Texture2D           texture2D  = Main.projectileTexture[projectile.type];
            Vector2             origin     = new Vector2((float)texture2D.Width * 0.5f, (float)(texture2D.Height / Main.projFrames[projectile.type]) * 0.5f);
            SpriteEffects       effects    = (projectile.direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None;

            Main.spriteBatch.Draw(texture2D, projectile.Center - Main.screenPosition, new Rectangle?(Utils.Frame(texture2D, 1, Main.projFrames[projectile.type], 0, projectile.frame)), lightColor, projectile.rotation, origin, projectile.scale, effects, 0f);
        }
コード例 #9
0
 internal static void AI(Projectile projectile)
 {
     if (IsModProjectile(projectile))
     {
         projectile.modProjectile.AI();
     }
     foreach (GlobalProjectile globalProjectile in globalProjectiles)
     {
         globalProjectile.AI(projectile);
     }
 }
コード例 #10
0
 public static void BoomerangOnHitEntity(int index)
 {
     Terraria.Projectile projectile = Main.projectile[index];
     if (projectile.ai[0] == 0f)
     {
         projectile.velocity.X = -projectile.velocity.X;
         projectile.velocity.Y = -projectile.velocity.Y;
         projectile.netUpdate  = true;
     }
     projectile.ai[0] = 1f;
 }
コード例 #11
0
 public static bool BoomerangTileCollide(int index, Vector2 oldVelocity)
 {
     Terraria.Projectile projectile = Main.projectile[index];
     Collision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height);
     projectile.ai[0]      = 1f;
     projectile.velocity.X = -oldVelocity.X;
     projectile.velocity.Y = -oldVelocity.Y;
     projectile.netUpdate  = true;
     Main.PlaySound(0, (int)projectile.position.X, (int)projectile.position.Y, 1);
     return(false);
 }
コード例 #12
0
 public override void OnHitByProjectile(Terraria.Projectile proj, int damage, bool crit)
 {
     if (PhanticMeleeBonus)
     {
         if (damage > 10)
         {
             Vector2 offset = new Vector2(0, -100);
             Terraria.Projectile.NewProjectile(player.Center + offset, new Vector2(0 + ((float)Terraria.Main.rand.Next(20) / 10) - 1, -3 + ((float)Terraria.Main.rand.Next(20) / 10) - 1), ModContent.ProjectileType <PhanticSoul>(), 6, 1f, Terraria.Main.myPlayer);
         }
     }
 }
コード例 #13
0
ファイル: ProjHooks.cs プロジェクト: TerrariaPrismTeam/Prism
        internal static void OnAI(Projectile pr)
        {
            var bh = pr.P_BHandler as ProjBHandler;

            if (bh == null || bh.PreAI())
            {
                pr.RealAI();

                if (bh != null)
                    bh.OnAI();
            }
        }
コード例 #14
0
ファイル: ProjHooks.cs プロジェクト: TerrariaPrismTeam/Prism
        internal static void OnKill(Projectile pr)
        {
            var bh = pr.P_BHandler as ProjBHandler;

            if (bh == null || bh.PreDestroyed())
            {
                pr.RealKill();

                if (bh != null)
                    bh.OnDestroyed();
            }
        }
コード例 #15
0
        public static void DrawSpear(int index, Color lightColor)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            Vector2             zero       = Vector2.Zero;
            SpriteEffects       effects    = SpriteEffects.None;

            if (projectile.spriteDirection == -1)
            {
                zero.X  = (float)Main.projectileTexture[projectile.type].Width;
                effects = SpriteEffects.FlipHorizontally;
            }
            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 Rectangle?(new Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height)), projectile.GetAlpha(lightColor), projectile.rotation, zero, projectile.scale, effects, 0f);
        }
コード例 #16
0
 public static void OnSetDefaults(ref int type, Projectile proj)
 {
     if (SetDefaults == null)
     {
         return;
     }
     SetDefaultsEventArgs<Projectile, int> setDefaultsEventArgs = new SetDefaultsEventArgs<Projectile, int>
     {
         Object = proj,
         Info = type
     };
     SetDefaults(setDefaultsEventArgs);
     type = setDefaultsEventArgs.Info;
 }
コード例 #17
0
        public override void OnHitNPCWithProj(Terraria.Projectile proj, Terraria.NPC target, int damage, float knockback, bool crit)
        {
            if (QueensStinger)
            {
                if (proj.type != 181)
                {
                    if (Terraria.Main.rand.NextBool(10))
                    {
                        Terraria.Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.Bee, 3, 2, player.whoAmI);
                    }
                }
            }

            if (EmeraldEmpoweredGem)
            {
                target.AddBuff(39, 40);
            }

            if (MidasCrown)
            {
                target.AddBuff(BuffID.Midas, 900);
            }

            if (FrostProjectile)
            {
                if (Terraria.Main.rand.NextBool(2))
                {
                    target.AddBuff(BuffID.Frostburn, 120);
                }
            }


            if (SpiritCultistBonus && proj.magic && !target.boss)
            {
                if (target.FindBuffIndex(ModContent.BuffType <LiftedSpiritsDebuff>()) < 1)
                {
                    target.velocity.Y -= 20;
                }

                target.AddBuff(ModContent.BuffType <LiftedSpiritsDebuff>(), 210);
            }
            if (PhanticRangedBonus && proj.ranged && Terraria.Main.rand.NextFloat() < 0.15f && proj.type != ModContent.ProjectileType <PhanticSoul>())
            {
                float   rot      = Terraria.Main.rand.NextFloat(MathHelper.TwoPi);
                Vector2 position = target.Center + Vector2.One.RotatedBy(rot) * 180;
                Vector2 velocity = Vector2.One.RotatedBy(rot) * -1 * 12f;
                Terraria.Projectile.NewProjectile(position, velocity, ModContent.ProjectileType <PhanticSoul>(), 30, player.HeldItem.knockBack, player.whoAmI, 0, 0);
            }
        }
コード例 #18
0
 //in Terraria.Projectile.Damage for damaging my player, add this before collision check
 internal static bool CanHitPlayer(Projectile projectile, Player target, ref int cooldownSlot)
 {
     foreach (GlobalProjectile globalProjectile in globalProjectiles)
     {
         if (!globalProjectile.CanHitPlayer(projectile, target, ref cooldownSlot))
         {
             return false;
         }
     }
     if (IsModProjectile(projectile))
     {
         return projectile.modProjectile.CanHitPlayer(target, ref cooldownSlot);
     }
     return true;
 }
コード例 #19
0
		//in Terraria.Projectile.SetDefaults get rid of bad type check
		//in Terraria.Projectile.SetDefaults before scaling size call ProjectileLoader.SetupProjectile(this);
		internal static void SetupProjectile(Projectile projectile)
		{
			projectile.projectileInfo.Clear();
			foreach (ProjectileInfo info in infoList)
			{
				projectile.projectileInfo.Add(info.Clone());
			}
			if (IsModProjectile(projectile))
			{
				GetProjectile(projectile.type).SetupProjectile(projectile);
			}
			foreach (GlobalProjectile globalProjectile in globalProjectiles)
			{
				globalProjectile.SetDefaults(projectile);
			}
		}
コード例 #20
0
        public static void SpearAI(int index, float protractSpeed = 1.5f, float retractSpeed = 1.4f, ExtraAction action = null, ExtraAction initialize = null)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            if (initialize != null && projectile.localAI[1] == 0f)
            {
                projectile.localAI[1] = 1f;
                initialize();
            }
            Vector2 vector = Main.player[projectile.owner].RotatedRelativePoint(Main.player[projectile.owner].MountedCenter, true);

            projectile.direction = Main.player[projectile.owner].direction;
            Main.player[projectile.owner].heldProj = projectile.whoAmI;
            Main.player[projectile.owner].itemTime = Main.player[projectile.owner].itemAnimation;
            projectile.position.X = vector.X - (float)(projectile.width / 2);
            projectile.position.Y = vector.Y - (float)(projectile.height / 2);
            if (!Main.player[projectile.owner].frozen)
            {
                if (projectile.ai[0] == 0f)
                {
                    projectile.ai[0]     = 3f;
                    projectile.netUpdate = true;
                }
                if (Main.player[projectile.owner].itemAnimation < Main.player[projectile.owner].itemAnimationMax / 3)
                {
                    projectile.ai[0] -= retractSpeed;
                }
                else
                {
                    projectile.ai[0] += protractSpeed;
                }
            }
            projectile.position += projectile.velocity * projectile.ai[0];
            if (Main.player[projectile.owner].itemAnimation == 0)
            {
                projectile.Kill();
            }
            projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f;
            if (projectile.spriteDirection == -1)
            {
                projectile.rotation -= 1.57f;
            }
            if (action != null)
            {
                action();
            }
        }
コード例 #21
0
ファイル: ProjHooks.cs プロジェクト: TerrariaPrismTeam/Prism
        internal static void OnUpdate(Projectile pr, int id)
        {
            if (!pr.active)
                return;

            pr.whoAmI = id;
            pr.numUpdates = pr.extraUpdates;

            var bh = pr.P_BHandler as ProjBHandler;

            if (bh == null || bh.PreUpdate())
            {
                pr.RealUpdate(id);

                if (bh != null)
                    bh.OnUpdate();
            }
        }
コード例 #22
0
        /// <summary>
        /// Adds all the original vanilla projectiles.
        /// </summary>
        internal static void FillVanilla()
        {
            for (int i = -65; i < ProjectileID.Count; i++)
            {
                if (i == 0)
                    continue;

                Projectile p = new Projectile();
                p.SetDefaults(i);

                ProjectileDef def = new ProjectileDef();

                def.InternalName = p.name;
                def.Type = p.type;

                CopyProjectileToDef(def, p);

                DefFromType.Add(i, def);
                VanillaDefFromName.Add(p.name, def);
            }
        }
コード例 #23
0
 public static void ExplosionEffect(Projectile p)
 {
     Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 14);
     for (int num500 = 0; num500 < 10; num500++)
     {
         Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
     }
     for (int num501 = 0; num501 < 5; num501++)
     {
         int num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 2.5f);
         Main.dust[num502].noGravity = true;
         Main.dust[num502].velocity *= 3f;
         num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
         Main.dust[num502].velocity *= 2f;
     }
     int num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
     Main.gore[num503].velocity *= 0.4f;
     Gore expr_105D2_cp_0 = Main.gore[num503];
     expr_105D2_cp_0.velocity.X = expr_105D2_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
     Gore expr_10602_cp_0 = Main.gore[num503];
     expr_10602_cp_0.velocity.Y = expr_10602_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
     num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
     Main.gore[num503].velocity *= 0.4f;
     Gore expr_10696_cp_0 = Main.gore[num503];
     expr_10696_cp_0.velocity.X = expr_10696_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
     Gore expr_106C6_cp_0 = Main.gore[num503];
     expr_106C6_cp_0.velocity.Y = expr_106C6_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
     if (p.owner == Main.myPlayer)
     {
         p.penetrate = -1;
         p.position.X = p.position.X + (float)(p.width / 2);
         p.position.Y = p.position.Y + (float)(p.height / 2);
         p.width = 48;
         p.height = 48;
         p.position.X = p.position.X - (float)(p.width / 2);
         p.position.Y = p.position.Y - (float)(p.height / 2);
         p.Damage();
     }
 }
コード例 #24
0
        public static void DrawChain(int index, Vector2 to, string chainPath)
        {
            Texture2D texture = ModLoader.GetTexture(chainPath);

            Terraria.Projectile projectile      = Main.projectile[index];
            Vector2             vector          = projectile.Center;
            Rectangle?          sourceRectangle = null;
            Vector2             origin          = new Vector2((float)texture.Width * 0.5f, (float)texture.Height * 0.5f);
            float   num      = (float)texture.Height;
            Vector2 vector2  = to - vector;
            float   rotation = (float)Math.Atan2((double)vector2.Y, (double)vector2.X) - 1.57f;
            bool    flag     = true;

            if (float.IsNaN(vector.X) && float.IsNaN(vector.Y))
            {
                flag = false;
            }
            if (float.IsNaN(vector2.X) && float.IsNaN(vector2.Y))
            {
                flag = false;
            }
            while (flag)
            {
                if ((double)vector2.Length() < (double)num + 1.0)
                {
                    flag = false;
                }
                else
                {
                    Vector2 value = vector2;
                    value.Normalize();
                    vector += value * num;
                    vector2 = to - vector;
                    Color color = Lighting.GetColor((int)vector.X / 16, (int)((double)vector.Y / 16.0));
                    color = projectile.GetAlpha(color);
                    Main.spriteBatch.Draw(texture, vector - Main.screenPosition, sourceRectangle, color, rotation, origin, 1f, SpriteEffects.None, 0f);
                }
            }
        }
コード例 #25
0
ファイル: Main.cs プロジェクト: Heloo88/ModTerraria_Heloo
 protected override void Update(GameTime gameTime)
 {
     if (Main.netMode != 2)
     {
         snowing();
     }
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     WorldGen.destroyObject = false;
     if (!dedServ)
     {
         if (fixedTiming)
         {
             if (base.IsActive)
             {
                 base.IsFixedTimeStep = false;
             }
             else
             {
                 base.IsFixedTimeStep = true;
             }
         }
         else
         {
             base.IsFixedTimeStep = true;
         }
         this.graphics.SynchronizeWithVerticalRetrace = true;
         this.UpdateMusic();
         if (showSplash)
         {
             return;
         }
         if (!gameMenu && (Main.netMode == 1))
         {
             if (!saveTime.IsRunning)
             {
                 saveTime.Start();
             }
             if (saveTime.ElapsedMilliseconds > 0x493e0)
             {
                 saveTime.Reset();
                 WorldGen.saveToonWhilePlaying();
             }
         }
         else if (!gameMenu && autoSave)
         {
             if (!saveTime.IsRunning)
             {
                 saveTime.Start();
             }
             if (saveTime.ElapsedMilliseconds > 0x927c0)
             {
                 saveTime.Reset();
                 WorldGen.saveToonWhilePlaying();
                 WorldGen.saveAndPlay();
             }
         }
         else if (saveTime.IsRunning)
         {
             saveTime.Stop();
         }
         if (teamCooldown > 0)
         {
             teamCooldown--;
         }
         updateTime++;
         if (fpsTimer.ElapsedMilliseconds >= 0x3e8)
         {
             if (fpsCount >= (30f + (30f * gfxQuality)))
             {
                 gfxQuality += gfxRate;
                 gfxRate += 0.005f;
             }
             else if (fpsCount < (29f + (30f * gfxQuality)))
             {
                 gfxRate = 0.01f;
                 gfxQuality -= 0.1f;
             }
             if (gfxQuality < 0f)
             {
                 gfxQuality = 0f;
             }
             if (gfxQuality > 1f)
             {
                 gfxQuality = 1f;
             }
             if (maxQ && base.IsActive)
             {
                 gfxQuality = 1f;
                 maxQ = false;
             }
             updateRate = uCount;
             frameRate = fpsCount;
             fpsCount = 0;
             fpsTimer.Restart();
             updateTime = 0;
             drawTime = 0;
             uCount = 0;
             if (Main.netMode == 2)
             {
                 cloudLimit = 0;
             }
         }
         if (fixedTiming)
         {
             float num = 16f;
             float elapsedMilliseconds = updateTimer.ElapsedMilliseconds;
             if ((elapsedMilliseconds + uCarry) < num)
             {
                 drawSkip = true;
                 return;
             }
             uCarry += elapsedMilliseconds - num;
             if (uCarry > 1000f)
             {
                 uCarry = 1000f;
             }
             updateTimer.Restart();
         }
         uCount++;
         drawSkip = false;
         if (qaStyle == 1)
         {
             gfxQuality = 1f;
         }
         else if (qaStyle == 2)
         {
             gfxQuality = 0.5f;
         }
         else if (qaStyle == 3)
         {
             gfxQuality = 0f;
         }
         numDust = (int)(2000f * ((gfxQuality * 0.75f) + 0.25f));
         Gore.goreTime = (int)(600f * gfxQuality);
         cloudLimit = (int)(100f * gfxQuality);
         Liquid.maxLiquid = (int)(2500f + (2500f * gfxQuality));
         Liquid.cycles = (int)(17f - (10f * gfxQuality));
         if (gfxQuality < 0.5)
         {
             this.graphics.SynchronizeWithVerticalRetrace = false;
         }
         else
         {
             this.graphics.SynchronizeWithVerticalRetrace = true;
         }
         if (gfxQuality < 0.2)
         {
             Lighting.maxRenderCount = 8;
         }
         else if (gfxQuality < 0.4)
         {
             Lighting.maxRenderCount = 7;
         }
         else if (gfxQuality < 0.6)
         {
             Lighting.maxRenderCount = 6;
         }
         else if (gfxQuality < 0.8)
         {
             Lighting.maxRenderCount = 5;
         }
         else
         {
             Lighting.maxRenderCount = 4;
         }
         if (Liquid.quickSettle)
         {
             Liquid.maxLiquid = Liquid.resLiquid;
             Liquid.cycles = 1;
         }
         if (!base.IsActive)
         {
             hasFocus = false;
         }
         else
         {
             hasFocus = true;
         }
         if (!base.IsActive && (Main.netMode == 0))
         {
             base.IsMouseVisible = true;
             if ((Main.netMode != 2) && (myPlayer >= 0))
             {
                 player[myPlayer].delayUseItem = true;
             }
             mouseLeftRelease = false;
             mouseRightRelease = false;
             if (gameMenu)
             {
                 UpdateMenu();
             }
             gamePaused = true;
             return;
         }
         base.IsMouseVisible = false;
         demonTorch += demonTorchDir * 0.01f;
         if (demonTorch > 1f)
         {
             demonTorch = 1f;
             demonTorchDir = -1;
         }
         if (demonTorch < 0f)
         {
             demonTorch = 0f;
             demonTorchDir = 1;
         }
         int num3 = 7;
         if (this.DiscoStyle == 0)
         {
             DiscoG += num3;
             if (DiscoG >= 0xff)
             {
                 DiscoG = 0xff;
                 this.DiscoStyle++;
             }
             DiscoR -= num3;
             if (DiscoR <= 0)
             {
                 DiscoR = 0;
             }
         }
         else if (this.DiscoStyle == 1)
         {
             DiscoB += num3;
             if (DiscoB >= 0xff)
             {
                 DiscoB = 0xff;
                 this.DiscoStyle++;
             }
             DiscoG -= num3;
             if (DiscoG <= 0)
             {
                 DiscoG = 0;
             }
         }
         else
         {
             DiscoR += num3;
             if (DiscoR >= 0xff)
             {
                 DiscoR = 0xff;
                 this.DiscoStyle = 0;
             }
             DiscoB -= num3;
             if (DiscoB <= 0)
             {
                 DiscoB = 0;
             }
         }
         if ((keyState.IsKeyDown(Keys.F10) && !chatMode) && !editSign)
         {
             if (frameRelease)
             {
                 PlaySound(12, -1, -1, 1);
                 if (showFrameRate)
                 {
                     showFrameRate = false;
                 }
                 else
                 {
                     showFrameRate = true;
                 }
             }
             frameRelease = false;
         }
         else
         {
             frameRelease = true;
         }
         if ((keyState.IsKeyDown(Keys.F9) && !chatMode) && !editSign)
         {
             if (RGBRelease)
             {
                 Lighting.lightCounter += 100;
                 PlaySound(12, -1, -1, 1);
                 Lighting.lightMode++;
                 if (Lighting.lightMode >= 4)
                 {
                     Lighting.lightMode = 0;
                 }
                 if ((Lighting.lightMode == 2) || (Lighting.lightMode == 0))
                 {
                     renderCount = 0;
                     renderNow = true;
                     int num4 = (screenWidth / 0x10) + (Lighting.offScreenTiles * 2);
                     int num5 = (screenHeight / 0x10) + (Lighting.offScreenTiles * 2);
                     for (int i = 0; i < num4; i++)
                     {
                         for (int j = 0; j < num5; j++)
                         {
                             Lighting.color[i, j] = 0f;
                             Lighting.colorG[i, j] = 0f;
                             Lighting.colorB[i, j] = 0f;
                         }
                     }
                 }
             }
             RGBRelease = false;
         }
         else
         {
             RGBRelease = true;
         }
         if ((keyState.IsKeyDown(Keys.F8) && !chatMode) && !editSign)
         {
             if (netRelease)
             {
                 PlaySound(12, -1, -1, 1);
                 if (netDiag)
                 {
                     netDiag = false;
                 }
                 else
                 {
                     netDiag = true;
                 }
             }
             netRelease = false;
         }
         else
         {
             netRelease = true;
         }
         if ((keyState.IsKeyDown(Keys.F7) && !chatMode) && !editSign)
         {
             if (drawRelease)
             {
                 PlaySound(12, -1, -1, 1);
                 if (drawDiag)
                 {
                     drawDiag = false;
                 }
                 else
                 {
                     drawDiag = true;
                 }
             }
             drawRelease = false;
         }
         else
         {
             drawRelease = true;
         }
         if (keyState.IsKeyDown(Keys.F11))
         {
             if (releaseUI)
             {
                 if (hideUI)
                 {
                     hideUI = false;
                 }
                 else
                 {
                     hideUI = true;
                 }
             }
             releaseUI = false;
         }
         else
         {
             releaseUI = true;
         }
         if ((keyState.IsKeyDown(Keys.LeftAlt) || keyState.IsKeyDown(Keys.RightAlt)) && keyState.IsKeyDown(Keys.Enter))
         {
             if (this.toggleFullscreen)
             {
                 this.graphics.ToggleFullScreen();
                 chatRelease = false;
             }
             this.toggleFullscreen = false;
         }
         else
         {
             this.toggleFullscreen = true;
         }
         if (!gamePad || gameMenu)
         {
             oldMouseState = mouseState;
             mouseState = Mouse.GetState();
             mouseX = mouseState.X;
             mouseY = mouseState.Y;
             mouseLeft = false;
             mouseRight = false;
             if (mouseState.LeftButton == ButtonState.Pressed)
             {
                 mouseLeft = true;
             }
             if (mouseState.RightButton == ButtonState.Pressed)
             {
                 mouseRight = true;
             }
         }
         keyState = Keyboard.GetState();
         if (editSign)
         {
             chatMode = false;
         }
         if (chatMode)
         {
             if (keyState.IsKeyDown(Keys.Escape))
             {
                 chatMode = false;
             }
             string chatText = Main.chatText;
             Main.chatText = GetInputText(Main.chatText);
             while (fontMouseText.MeasureString(Main.chatText).X > 470f)
             {
                 Main.chatText = Main.chatText.Substring(0, Main.chatText.Length - 1);
             }
             if (chatText != Main.chatText)
             {
                 PlaySound(12, -1, -1, 1);
             }
             if (inputTextEnter && chatRelease)
             {
                 //if (Main.chatText != "")
                 if (Main.chatText != "" && Mods.ModHooks.onChat(Main.chatText))
                 {
                     NetMessage.SendData(0x19, -1, -1, Main.chatText, myPlayer, 0f, 0f, 0f, 0);
                 }
                 Main.chatText = "";
                 chatMode = false;
                 chatRelease = false;
                 player[myPlayer].releaseHook = false;
                 player[myPlayer].releaseThrow = false;
                 PlaySound(11, -1, -1, 1);
             }
         }
         //
         // original code:
         //if ((keyState.IsKeyDown(Keys.Enter) && (Main.netMode == 1)) && (!keyState.IsKeyDown(Keys.LeftAlt) && !keyState.IsKeyDown(Keys.RightAlt)))
         //
         // ALLOW CHAT IN SINGLEPLAYER
         //
         if ((keyState.IsKeyDown(Keys.Enter)) && (!keyState.IsKeyDown(Keys.LeftAlt) && !keyState.IsKeyDown(Keys.RightAlt)))
         {
             if ((chatRelease && !chatMode) && (!editSign && !keyState.IsKeyDown(Keys.Escape)))
             {
                 PlaySound(10, -1, -1, 1);
                 chatMode = true;
                 Main.chatText = "";
             }
             chatRelease = false;
         }
         else
         {
             chatRelease = true;
         }
         if (gameMenu)
         {
             UpdateMenu();
             if (Main.netMode != 2)
             {
                 return;
             }
             gamePaused = false;
         }
     }
     if (Main.netMode == 1)
     {
         for (int k = 0; k < 0x31; k++)
         {
             if (player[myPlayer].inventory[k].IsNotTheSameAs(clientPlayer.inventory[k]))
             {
                 NetMessage.SendData(5, -1, -1, player[myPlayer].inventory[k].name, myPlayer, (float)k, (float)player[myPlayer].inventory[k].prefix, 0f, 0);
             }
         }
         if (player[myPlayer].armor[0].IsNotTheSameAs(clientPlayer.armor[0]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[0].name, myPlayer, 49f, (float)player[myPlayer].armor[0].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[1].IsNotTheSameAs(clientPlayer.armor[1]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[1].name, myPlayer, 50f, (float)player[myPlayer].armor[1].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[2].IsNotTheSameAs(clientPlayer.armor[2]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[2].name, myPlayer, 51f, (float)player[myPlayer].armor[2].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[3].IsNotTheSameAs(clientPlayer.armor[3]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[3].name, myPlayer, 52f, (float)player[myPlayer].armor[3].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[4].IsNotTheSameAs(clientPlayer.armor[4]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[4].name, myPlayer, 53f, (float)player[myPlayer].armor[4].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[5].IsNotTheSameAs(clientPlayer.armor[5]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[5].name, myPlayer, 54f, (float)player[myPlayer].armor[5].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[6].IsNotTheSameAs(clientPlayer.armor[6]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[6].name, myPlayer, 55f, (float)player[myPlayer].armor[6].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[7].IsNotTheSameAs(clientPlayer.armor[7]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[7].name, myPlayer, 56f, (float)player[myPlayer].armor[7].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[8].IsNotTheSameAs(clientPlayer.armor[8]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[8].name, myPlayer, 57f, (float)player[myPlayer].armor[8].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[9].IsNotTheSameAs(clientPlayer.armor[9]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[9].name, myPlayer, 58f, (float)player[myPlayer].armor[9].prefix, 0f, 0);
         }
         if (player[myPlayer].armor[10].IsNotTheSameAs(clientPlayer.armor[10]))
         {
             NetMessage.SendData(5, -1, -1, player[myPlayer].armor[10].name, myPlayer, 59f, (float)player[myPlayer].armor[10].prefix, 0f, 0);
         }
         if (player[myPlayer].chest != clientPlayer.chest)
         {
             NetMessage.SendData(0x21, -1, -1, "", player[myPlayer].chest, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].talkNPC != clientPlayer.talkNPC)
         {
             NetMessage.SendData(40, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].zoneEvil != clientPlayer.zoneEvil)
         {
             NetMessage.SendData(0x24, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].zoneMeteor != clientPlayer.zoneMeteor)
         {
             NetMessage.SendData(0x24, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].zoneDungeon != clientPlayer.zoneDungeon)
         {
             NetMessage.SendData(0x24, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].zoneJungle != clientPlayer.zoneJungle)
         {
             NetMessage.SendData(0x24, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         if (player[myPlayer].zoneHoly != clientPlayer.zoneHoly)
         {
             NetMessage.SendData(0x24, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
         bool flag = false;
         for (int m = 0; m < 10; m++)
         {
             if (player[myPlayer].buffType[m] != clientPlayer.buffType[m])
             {
                 flag = true;
             }
         }
         if (flag)
         {
             NetMessage.SendData(50, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
             NetMessage.SendData(13, -1, -1, "", myPlayer, 0f, 0f, 0f, 0);
         }
     }
     if (Main.netMode == 1)
     {
         clientPlayer = (Player)player[myPlayer].clientClone();
     }
     if (((Main.netMode == 0) && ((playerInventory || (npcChatText != "")) || (player[myPlayer].sign >= 0))) && autoPause)
     {
         Keys[] pressedKeys = keyState.GetPressedKeys();
         player[myPlayer].controlInv = false;
         for (int n = 0; n < pressedKeys.Length; n++)
         {
             if ((pressedKeys[n]).ToString() == cInv)
             {
                 player[myPlayer].controlInv = true;
             }
         }
         if (player[myPlayer].controlInv)
         {
             if (player[myPlayer].releaseInventory)
             {
                 player[myPlayer].toggleInv();
             }
             player[myPlayer].releaseInventory = false;
         }
         else
         {
             player[myPlayer].releaseInventory = true;
         }
         if (playerInventory)
         {
             int num11 = (mouseState.ScrollWheelValue - oldMouseState.ScrollWheelValue) / 120;
             focusRecipe += num11;
             if (focusRecipe > (numAvailableRecipes - 1))
             {
                 focusRecipe = numAvailableRecipes - 1;
             }
             if (focusRecipe < 0)
             {
                 focusRecipe = 0;
             }
             player[myPlayer].dropItemCheck();
         }
         player[myPlayer].head = player[myPlayer].armor[0].headSlot;
         player[myPlayer].body = player[myPlayer].armor[1].bodySlot;
         player[myPlayer].legs = player[myPlayer].armor[2].legSlot;
         if (!player[myPlayer].hostile)
         {
             if (player[myPlayer].armor[8].headSlot >= 0)
             {
                 player[myPlayer].head = player[myPlayer].armor[8].headSlot;
             }
             if (player[myPlayer].armor[9].bodySlot >= 0)
             {
                 player[myPlayer].body = player[myPlayer].armor[9].bodySlot;
             }
             if (player[myPlayer].armor[10].legSlot >= 0)
             {
                 player[myPlayer].legs = player[myPlayer].armor[10].legSlot;
             }
         }
         if (editSign)
         {
             if (player[myPlayer].sign == -1)
             {
                 editSign = false;
             }
             else
             {
                 npcChatText = GetInputText(npcChatText);
                 if (inputTextEnter)
                 {
                     byte[] bytes = new byte[] { 10 };
                     npcChatText = npcChatText + Encoding.ASCII.GetString(bytes);
                 }
             }
         }
         gamePaused = true;
     }
     else
     {
         gamePaused = false;
         if ((!dedServ && (screenPosition.Y < ((worldSurface * 16.0) + 16.0))) && (Main.netMode != 2))
         {
             Star.UpdateStars();
             Cloud.UpdateClouds();
         }
         for (int num12 = 0; num12 < 0xff; num12++)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     player[num12].UpdatePlayer(num12);
                 }
                 catch
                 {
                 }
             }
             else
             {
                 player[num12].UpdatePlayer(num12);
             }
         }
         if (Main.netMode != 1)
         {
             NPC.SpawnNPC();
         }
         for (int num13 = 0; num13 < 0xff; num13++)
         {
             player[num13].activeNPCs = 0f;
             player[num13].townNPCs = 0f;
         }
         if ((wof >= 0) && !npc[wof].active)
         {
             wof = -1;
         }
         for (int num14 = 0; num14 < 200; num14++)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     npc[num14].UpdateNPC(num14);
                 }
                 catch (Exception)
                 {
                     npc[num14] = new NPC();
                 }
             }
             else
             {
                 npc[num14].UpdateNPC(num14);
             }
         }
         for (int num15 = 0; num15 < 200; num15++)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     gore[num15].Update();
                 }
                 catch
                 {
                     gore[num15] = new Gore();
                 }
             }
             else
             {
                 gore[num15].Update();
             }
         }
         for (int num16 = 0; num16 < 0x3e8; num16++)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     projectile[num16].Update(num16);
                 }
                 catch
                 {
                     projectile[num16] = new Projectile();
                 }
             }
             else
             {
                 projectile[num16].Update(num16);
             }
         }
         for (int num17 = 0; num17 < 200; num17++)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     item[num17].UpdateItem(num17);
                 }
                 catch
                 {
                     item[num17] = new Item();
                 }
             }
             else
             {
                 item[num17].UpdateItem(num17);
             }
         }
         if (ignoreErrors)
         {
             try
             {
                 Dust.UpdateDust();
             }
             catch
             {
                 for (int num18 = 0; num18 < 0x7d0; num18++)
                 {
                     dust[num18] = new Dust();
                 }
             }
         }
         else
         {
             Dust.UpdateDust();
         }
         if (Main.netMode != 2)
         {
             CombatText.UpdateCombatText();
             ItemText.UpdateItemText();
         }
         if (ignoreErrors)
         {
             try
             {
                 UpdateTime();
             }
             catch
             {
                 checkForSpawns = 0;
             }
         }
         else
         {
             UpdateTime();
         }
         if (Main.netMode != 1)
         {
             if (ignoreErrors)
             {
                 try
                 {
                     WorldGen.UpdateWorld();
                     UpdateInvasion();
                 }
                 catch
                 {
                 }
             }
             else
             {
                 WorldGen.UpdateWorld();
                 UpdateInvasion();
             }
         }
         if (ignoreErrors)
         {
             try
             {
                 if (Main.netMode == 2)
                 {
                     UpdateServer();
                 }
                 if (Main.netMode == 1)
                 {
                     UpdateClient();
                 }
             }
             catch
             {
                 int netMode = Main.netMode;
             }
         }
         else
         {
             if (Main.netMode == 2)
             {
                 UpdateServer();
             }
             if (Main.netMode == 1)
             {
                 UpdateClient();
             }
         }
         if (ignoreErrors)
         {
             try
             {
                 for (int num19 = 0; num19 < numChatLines; num19++)
                 {
                     if (chatLine[num19].showTime > 0)
                     {
                         ChatLine line1 = chatLine[num19];
                         line1.showTime--;
                     }
                 }
             }
             catch
             {
                 for (int num20 = 0; num20 < numChatLines; num20++)
                 {
                     chatLine[num20] = new ChatLine();
                 }
             }
         }
         else
         {
             for (int num21 = 0; num21 < numChatLines; num21++)
             {
                 if (chatLine[num21].showTime > 0)
                 {
                     ChatLine line2 = chatLine[num21];
                     line2.showTime--;
                 }
             }
         }
         upTimer = stopwatch.ElapsedMilliseconds;
         if (upTimerMaxDelay > 0f)
         {
             upTimerMaxDelay--;
         }
         else
         {
             upTimerMax = 0f;
         }
         if (upTimer > upTimerMax)
         {
             upTimerMax = upTimer;
             upTimerMaxDelay = 400f;
         }
         base.Update(gameTime);
     }
 }
コード例 #26
0
ファイル: Main.cs プロジェクト: Heloo88/ModTerraria_Heloo
        protected override void Initialize()
        {
            NPC.clrNames();
            NPC.setNames();
            bgAlpha[0] = 1f;
            bgAlpha2[0] = 1f;
            for (int i = 0; i < 0x6f; i++)
            {
                projFrames[i] = 1;
            }
            projFrames[0x48] = 4;
            projFrames[0x56] = 4;
            projFrames[0x57] = 4;
            projFrames[0x66] = 2;
            debuff[20] = true;
            debuff[0x15] = true;
            debuff[0x16] = true;
            debuff[0x17] = true;
            debuff[0x18] = true;
            debuff[0x19] = true;
            debuff[0x1c] = true;
            debuff[30] = true;
            debuff[0x1f] = true;
            debuff[0x20] = true;
            debuff[0x21] = true;
            debuff[0x22] = true;
            debuff[0x23] = true;
            debuff[0x24] = true;
            debuff[0x25] = true;
            debuff[0x26] = true;
            debuff[0x27] = true;
            buffName[1] = "Obsidian Skin";
            buffTip[1] = "Immune to lava";
            buffName[2] = "Regeneration";
            buffTip[2] = "Provides life regeneration";
            buffName[3] = "Swiftness";
            buffTip[3] = "25% increased movement speed";
            buffName[4] = "Gills";
            buffTip[4] = "Breathe water instead of air";
            buffName[5] = "Ironskin";
            buffTip[5] = "Increase defense by 8";
            buffName[6] = "Mana Regeneration";
            buffTip[6] = "Increased mana regeneration";
            buffName[7] = "Magic Power";
            buffTip[7] = "20% increased magic damage";
            buffName[8] = "Featherfall";
            buffTip[8] = "Press UP or DOWN to control speed of descent";
            buffName[9] = "Spelunker";
            buffTip[9] = "Shows the location of treasure and ore";
            buffName[10] = "Invisibility";
            buffTip[10] = "Grants invisibility";
            buffName[11] = "Shine";
            buffTip[11] = "Emitting light";
            buffName[12] = "Night Owl";
            buffTip[12] = "Increased night vision";
            buffName[13] = "Battle";
            buffTip[13] = "Increased enemy spawn rate";
            buffName[14] = "Thorns";
            buffTip[14] = "Attackers also take damage";
            buffName[15] = "Water Walking";
            buffTip[15] = "Press DOWN to enter water";
            buffName[0x10] = "Archery";
            buffTip[0x10] = "20% increased arrow damage and speed";
            buffName[0x11] = "Hunter";
            buffTip[0x11] = "Shows the location of enemies";
            buffName[0x12] = "Gravitation";
            buffTip[0x12] = "Press UP or DOWN to reverse gravity";
            buffName[0x13] = "Orb of Light";
            buffTip[0x13] = "A magical orb that provides light";
            buffName[20] = "Poisoned";
            buffTip[20] = "Slowly losing life";
            buffName[0x15] = "Potion Sickness";
            buffTip[0x15] = "Cannot consume anymore healing items";
            buffName[0x16] = "Darkness";
            buffTip[0x16] = "Decreased light vision";
            buffName[0x17] = "Cursed";
            buffTip[0x17] = "Cannot use any items";
            buffName[0x18] = "On Fire!";
            buffTip[0x18] = "Slowly losing life";
            buffName[0x19] = "Tipsy";
            buffTip[0x19] = "Increased melee abilities, lowered defense";
            buffName[0x1a] = "Well Fed";
            buffTip[0x1a] = "Minor improvements to all stats";
            buffName[0x1b] = "Fairy";
            buffTip[0x1b] = "A fairy is following you";
            buffName[0x1c] = "Werewolf";
            buffTip[0x1c] = "Physical abilities are increased";
            buffName[0x1d] = "Clairvoyance";
            buffTip[0x1d] = "Magic powers are increased";
            buffName[30] = "Bleeding";
            buffTip[30] = "Cannot regenerate life";
            buffName[0x1f] = "Confused";
            buffTip[0x1f] = "Movement is reversed";
            buffName[0x20] = "Slow";
            buffTip[0x20] = "Movement speed is reduced";
            buffName[0x21] = "Weak";
            buffTip[0x21] = "Physical abilities are decreased";
            buffName[0x22] = "Merfolk";
            buffTip[0x22] = "Can breathe and move easily underwater";
            buffName[0x23] = "Silenced";
            buffTip[0x23] = "Cannot use items that require mana";
            buffName[0x24] = "Broken Armor";
            buffTip[0x24] = "Defense is cut in half";
            buffName[0x25] = "Horrified";
            buffTip[0x25] = "You have seen something nasty, there is no escape.";
            buffName[0x26] = "The Tongue";
            buffTip[0x26] = "You are being sucked into the mouth";
            buffName[0x27] = "Cursed Inferno";
            buffTip[0x27] = "Losing life";
            for (int j = 0; j < 10; j++)
            {
                recentWorld[j] = "";
                recentIP[j] = "";
                recentPort[j] = 0;
            }
            if (rand == null)
            {
                rand = new Random((int)DateTime.Now.Ticks);
            }
            if (WorldGen.genRand == null)
            {
                WorldGen.genRand = new Random((int)DateTime.Now.Ticks);
            }
            switch (rand.Next(15))
            {
                case 0:
                    base.Window.Title = "Terraria: Dig Peon, Dig!";
                    break;

                case 1:
                    base.Window.Title = "Terraria: Epic Dirt";
                    break;

                case 2:
                    base.Window.Title = "Terraria: Hey Guys!";
                    break;

                case 3:
                    base.Window.Title = "Terraria: Sand is Overpowered";
                    break;

                case 4:
                    base.Window.Title = "Terraria Part 3: The Return of the Guide";
                    break;

                case 5:
                    base.Window.Title = "Terraria: A Bunnies Tale";
                    break;

                case 6:
                    base.Window.Title = "Terraria: Dr. Bones and The Temple of Blood Moon";
                    break;

                case 7:
                    base.Window.Title = "Terraria: Slimeassic Park";
                    break;

                case 8:
                    base.Window.Title = "Terraria: The Grass is Greener on This Side";
                    break;

                case 9:
                    base.Window.Title = "Terraria: Small Blocks, Not for Children Under the Age of 5";
                    break;

                case 10:
                    base.Window.Title = "Terraria: Digger T' Blocks";
                    break;

                case 11:
                    base.Window.Title = "Terraria: There is No Cow Layer";
                    break;

                case 12:
                    base.Window.Title = "Terraria: Suspicous Looking Eyeballs";
                    break;

                case 13:
                    base.Window.Title = "Terraria: Purple Grass!";
                    break;

                case 14:
                    base.Window.Title = "Terraria: Noone Dug Behind!";
                    break;

                default:
                    base.Window.Title = "Terraria: Shut Up and Dig Gaiden!";
                    break;
            }
            lo = rand.Next(6);
            //ADDED TILEOPTIONS for flags:  (tiki = 0x56)
            tileHammer[150] = true;
            tileLighted[150] = true;
            tileLavaDeath[150] = true;
            tileFrameImportant[150] = true;
            tileNoAttach[150] = true;
            tileName[150] = "Red Flag";     //CHANGED: ADDED

            tileHammer[151] = true;
            //tileLighted[151] = true;
            tileLavaDeath[151] = true;
            //tileFrameImportant[151] = true;
            tileNoAttach[151] = true;
            tileName[151] = "Blue Flag";     //CHANGED: ADDED

            //ORIG
            tileShine2[6] = true;
            tileShine2[7] = true;
            tileShine2[8] = true;
            tileShine2[9] = true;
            tileShine2[12] = true;
            tileShine2[0x15] = true;
            tileShine2[0x16] = true;
            tileShine2[0x19] = true;
            tileShine2[0x2d] = true;
            tileShine2[0x2e] = true;
            tileShine2[0x2f] = true;
            tileShine2[0x3f] = true;
            tileShine2[0x40] = true;
            tileShine2[0x41] = true;
            tileShine2[0x42] = true;
            tileShine2[0x43] = true;
            tileShine2[0x44] = true;
            tileShine2[0x6b] = true;
            tileShine2[0x6c] = true;
            tileShine2[0x6f] = true;
            tileShine2[0x79] = true;
            tileShine2[0x7a] = true;
            tileShine2[0x75] = true;
            tileShine[0x81] = 300;
            tileHammer[0x8d] = true;
            tileHammer[4] = true;
            tileHammer[10] = true;
            tileHammer[11] = true;
            tileHammer[12] = true;
            tileHammer[13] = true;
            tileHammer[14] = true;
            tileHammer[15] = true;
            tileHammer[0x10] = true;
            tileHammer[0x11] = true;
            tileHammer[0x12] = true;
            tileHammer[0x13] = true;
            tileHammer[0x15] = true;
            tileHammer[0x1a] = true;
            tileHammer[0x1c] = true;
            tileHammer[0x1d] = true;
            tileHammer[0x1f] = true;
            tileHammer[0x21] = true;
            tileHammer[0x22] = true;
            tileHammer[0x23] = true;
            tileHammer[0x24] = true;
            tileHammer[0x2a] = true;
            tileHammer[0x30] = true;
            tileHammer[0x31] = true;
            tileHammer[50] = true;
            tileHammer[0x36] = true;
            tileHammer[0x37] = true;
            tileHammer[0x4d] = true;
            tileHammer[0x4e] = true;
            tileHammer[0x4f] = true;
            tileHammer[0x51] = true;
            tileHammer[0x55] = true;
            tileHammer[0x56] = true;
            tileHammer[0x57] = true;
            tileHammer[0x58] = true;
            tileHammer[0x59] = true;
            tileHammer[90] = true;
            tileHammer[0x5b] = true;
            tileHammer[0x5c] = true;
            tileHammer[0x5d] = true;
            tileHammer[0x5e] = true;
            tileHammer[0x5f] = true;
            tileHammer[0x60] = true;
            tileHammer[0x61] = true;
            tileHammer[0x62] = true;
            tileHammer[0x63] = true;
            tileHammer[100] = true;
            tileHammer[0x65] = true;
            tileHammer[0x66] = true;
            tileHammer[0x67] = true;
            tileHammer[0x68] = true;
            tileHammer[0x69] = true;
            tileHammer[0x6a] = true;
            tileHammer[0x72] = true;
            tileHammer[0x7d] = true;
            tileHammer[0x7e] = true;
            tileHammer[0x80] = true;
            tileHammer[0x81] = true;
            tileHammer[0x84] = true;
            tileHammer[0x85] = true;
            tileHammer[0x86] = true;
            tileHammer[0x87] = true;
            tileHammer[0x88] = true;
            tileFrameImportant[0x8b] = true;
            tileHammer[0x8b] = true;
            tileLighted[0x95] = true;
            tileFrameImportant[0x95] = true;
            tileHammer[0x95] = true;
            tileFrameImportant[0x8e] = true;
            tileHammer[0x8e] = true;
            tileFrameImportant[0x8f] = true;
            tileHammer[0x8f] = true;
            tileFrameImportant[0x90] = true;
            tileHammer[0x90] = true;
            tileStone[0x83] = true;
            tileFrameImportant[0x88] = true;
            tileFrameImportant[0x89] = true;
            tileFrameImportant[0x8a] = true;
            tileBlockLight[0x89] = true;
            tileSolid[0x89] = true;
            tileBlockLight[0x91] = true;
            tileSolid[0x91] = true;
            tileMergeDirt[0x91] = true;
            tileBlockLight[0x92] = true;
            tileSolid[0x92] = true;
            tileMergeDirt[0x92] = true;
            tileBlockLight[0x93] = true;
            tileSolid[0x93] = true;
            tileMergeDirt[0x93] = true;
            tileBlockLight[0x94] = true;
            tileSolid[0x94] = true;
            tileMergeDirt[0x94] = true;
            tileBlockLight[0x8a] = true;
            tileSolid[0x8a] = true;
            tileBlockLight[140] = true;
            tileSolid[140] = true;
            tileAxe[5] = true;
            tileAxe[30] = true;
            tileAxe[0x48] = true;
            tileAxe[80] = true;
            tileAxe[0x7c] = true;
            tileShine[0x16] = 0x47e;
            tileShine[6] = 0x47e;
            tileShine[7] = 0x44c;
            tileShine[8] = 0x3e8;
            tileShine[9] = 0x41a;
            tileShine[12] = 0x3e8;
            tileShine[0x15] = 0x4b0;
            tileShine[0x3f] = 900;
            tileShine[0x40] = 900;
            tileShine[0x41] = 900;
            tileShine[0x42] = 900;
            tileShine[0x43] = 900;
            tileShine[0x44] = 900;
            tileShine[0x2d] = 0x76c;
            tileShine[0x2e] = 0x7d0;
            tileShine[0x2f] = 0x834;
            tileShine[0x7a] = 0x708;
            tileShine[0x79] = 0x73a;
            tileShine[0x7d] = 600;
            tileShine[0x6d] = 0x2328;
            tileShine[110] = 0x2328;
            tileShine[0x74] = 0x2328;
            tileShine[0x75] = 0x2328;
            tileShine[0x76] = 0x1f40;
            tileShine[0x6b] = 950;
            tileShine[0x6c] = 900;
            tileShine[0x6f] = 850;
            tileLighted[4] = true;
            tileLighted[0x11] = true;
            tileLighted[0x85] = true;
            tileLighted[0x1f] = true;
            tileLighted[0x21] = true;
            tileLighted[0x22] = true;
            tileLighted[0x23] = true;
            tileLighted[0x24] = true;
            tileLighted[0x25] = true;
            tileLighted[0x2a] = true;
            tileLighted[0x31] = true;
            tileLighted[0x3a] = true;
            tileLighted[0x3d] = true;
            tileLighted[70] = true;
            tileLighted[0x47] = true;
            tileLighted[0x48] = true;
            tileLighted[0x4c] = true;
            tileLighted[0x4d] = true;
            tileLighted[0x13] = true;
            tileLighted[0x16] = true;
            tileLighted[0x1a] = true;
            tileLighted[0x53] = true;
            tileLighted[0x54] = true;
            tileLighted[0x5c] = true;
            tileLighted[0x5d] = true;
            tileLighted[0x5f] = true;
            tileLighted[0x62] = true;
            tileLighted[100] = true;
            tileLighted[0x6d] = true;
            tileLighted[0x7d] = true;
            tileLighted[0x7e] = true;
            tileLighted[0x81] = true;
            tileLighted[140] = true;
            tileMergeDirt[1] = true;
            tileMergeDirt[6] = true;
            tileMergeDirt[7] = true;
            tileMergeDirt[8] = true;
            tileMergeDirt[9] = true;
            tileMergeDirt[0x16] = true;
            tileMergeDirt[0x19] = true;
            tileMergeDirt[30] = true;
            tileMergeDirt[0x25] = true;
            tileMergeDirt[0x26] = true;
            tileMergeDirt[40] = true;
            tileMergeDirt[0x35] = true;
            tileMergeDirt[0x38] = true;
            tileMergeDirt[0x6b] = true;
            tileMergeDirt[0x6c] = true;
            tileMergeDirt[0x6f] = true;
            tileMergeDirt[0x70] = true;
            tileMergeDirt[0x74] = true;
            tileMergeDirt[0x75] = true;
            tileMergeDirt[0x7b] = true;
            tileMergeDirt[140] = true;
            tileMergeDirt[0x27] = true;
            tileMergeDirt[0x7a] = true;
            tileMergeDirt[0x79] = true;
            tileMergeDirt[120] = true;
            tileMergeDirt[0x77] = true;
            tileMergeDirt[0x76] = true;
            tileMergeDirt[0x2f] = true;
            tileMergeDirt[0x2e] = true;
            tileMergeDirt[0x2d] = true;
            tileMergeDirt[0x2c] = true;
            tileMergeDirt[0x2b] = true;
            tileMergeDirt[0x29] = true;
            tileFrameImportant[3] = true;
            tileFrameImportant[4] = true;
            tileFrameImportant[5] = true;
            tileFrameImportant[10] = true;
            tileFrameImportant[11] = true;
            tileFrameImportant[12] = true;
            tileFrameImportant[13] = true;
            tileFrameImportant[14] = true;
            tileFrameImportant[15] = true;
            tileFrameImportant[0x10] = true;
            tileFrameImportant[0x11] = true;
            tileFrameImportant[0x12] = true;
            tileFrameImportant[20] = true;
            tileFrameImportant[0x15] = true;
            tileFrameImportant[0x18] = true;
            tileFrameImportant[0x1a] = true;
            tileFrameImportant[0x1b] = true;
            tileFrameImportant[0x1c] = true;
            tileFrameImportant[0x1d] = true;
            tileFrameImportant[0x1f] = true;
            tileFrameImportant[0x21] = true;
            tileFrameImportant[0x22] = true;
            tileFrameImportant[0x23] = true;
            tileFrameImportant[0x24] = true;
            tileFrameImportant[0x2a] = true;
            tileFrameImportant[50] = true;
            tileFrameImportant[0x37] = true;
            tileFrameImportant[0x3d] = true;
            tileFrameImportant[0x47] = true;
            tileFrameImportant[0x48] = true;
            tileFrameImportant[0x49] = true;
            tileFrameImportant[0x4a] = true;
            tileFrameImportant[0x4d] = true;
            tileFrameImportant[0x4e] = true;
            tileFrameImportant[0x4f] = true;
            tileFrameImportant[0x51] = true;
            tileFrameImportant[0x52] = true;
            tileFrameImportant[0x53] = true;
            tileFrameImportant[0x54] = true;
            tileFrameImportant[0x55] = true;
            tileFrameImportant[0x56] = true;
            tileFrameImportant[0x57] = true;
            tileFrameImportant[0x58] = true;
            tileFrameImportant[0x59] = true;
            tileFrameImportant[90] = true;
            tileFrameImportant[0x5b] = true;
            tileFrameImportant[0x5c] = true;
            tileFrameImportant[0x5d] = true;
            tileFrameImportant[0x5e] = true;
            tileFrameImportant[0x5f] = true;
            tileFrameImportant[0x60] = true;
            tileFrameImportant[0x61] = true;
            tileFrameImportant[0x62] = true;
            tileFrameImportant[0x63] = true;
            tileFrameImportant[0x65] = true;
            tileFrameImportant[0x66] = true;
            tileFrameImportant[0x67] = true;
            tileFrameImportant[0x68] = true;
            tileFrameImportant[0x69] = true;
            tileFrameImportant[100] = true;
            tileFrameImportant[0x6a] = true;
            tileFrameImportant[110] = true;
            tileFrameImportant[0x71] = true;
            tileFrameImportant[0x72] = true;
            tileFrameImportant[0x7d] = true;
            tileFrameImportant[0x7e] = true;
            tileFrameImportant[0x80] = true;
            tileFrameImportant[0x81] = true;
            tileFrameImportant[0x84] = true;
            tileFrameImportant[0x85] = true;
            tileFrameImportant[0x86] = true;
            tileFrameImportant[0x87] = true;
            tileFrameImportant[0x8d] = true;
            tileCut[3] = true;
            tileCut[0x18] = true;
            tileCut[0x1c] = true;
            tileCut[0x20] = true;
            tileCut[0x33] = true;
            tileCut[0x34] = true;
            tileCut[0x3d] = true;
            tileCut[0x3e] = true;
            tileCut[0x45] = true;
            tileCut[0x47] = true;
            tileCut[0x49] = true;
            tileCut[0x4a] = true;
            tileCut[0x52] = true;
            tileCut[0x53] = true;
            tileCut[0x54] = true;
            tileCut[110] = true;
            tileCut[0x71] = true;
            tileCut[0x73] = true;
            tileAlch[0x52] = true;
            tileAlch[0x53] = true;
            tileAlch[0x54] = true;
            tileLavaDeath[0x68] = true;
            tileLavaDeath[110] = true;
            tileLavaDeath[0x71] = true;
            tileLavaDeath[0x73] = true;
            tileSolid[0x7f] = true;
            tileSolid[130] = true;
            tileBlockLight[130] = true;
            tileBlockLight[0x83] = true;
            tileSolid[0x6b] = true;
            tileBlockLight[0x6b] = true;
            tileSolid[0x6c] = true;
            tileBlockLight[0x6c] = true;
            tileSolid[0x6f] = true;
            tileBlockLight[0x6f] = true;
            tileSolid[0x6d] = true;
            tileBlockLight[0x6d] = true;
            tileSolid[110] = false;
            tileNoAttach[110] = true;
            tileNoFail[110] = true;
            tileSolid[0x70] = true;
            tileBlockLight[0x70] = true;
            tileSolid[0x74] = true;
            tileBlockLight[0x74] = true;
            tileSolid[0x75] = true;
            tileBlockLight[0x75] = true;
            tileSolid[0x7b] = true;
            tileBlockLight[0x7b] = true;
            tileSolid[0x76] = true;
            tileBlockLight[0x76] = true;
            tileSolid[0x77] = true;
            tileBlockLight[0x77] = true;
            tileSolid[120] = true;
            tileBlockLight[120] = true;
            tileSolid[0x79] = true;
            tileBlockLight[0x79] = true;
            tileSolid[0x7a] = true;
            tileBlockLight[0x7a] = true;
            tileBlockLight[0x73] = true;
            tileSolid[0] = true;
            tileBlockLight[0] = true;
            tileSolid[1] = true;
            tileBlockLight[1] = true;
            tileSolid[2] = true;
            tileBlockLight[2] = true;
            tileSolid[3] = false;
            tileNoAttach[3] = true;
            tileNoFail[3] = true;
            tileSolid[4] = false;
            tileNoAttach[4] = true;
            tileNoFail[4] = true;
            tileNoFail[0x18] = true;
            tileSolid[5] = false;
            tileSolid[6] = true;
            tileBlockLight[6] = true;
            tileSolid[7] = true;
            tileBlockLight[7] = true;
            tileSolid[8] = true;
            tileBlockLight[8] = true;
            tileSolid[9] = true;
            tileBlockLight[9] = true;
            tileBlockLight[10] = true;
            tileSolid[10] = true;
            tileNoAttach[10] = true;
            tileBlockLight[10] = true;
            tileSolid[11] = false;
            tileSolidTop[0x13] = true;
            tileSolid[0x13] = true;
            tileSolid[0x16] = true;
            tileSolid[0x17] = true;
            tileSolid[0x19] = true;
            tileSolid[30] = true;
            tileNoFail[0x20] = true;
            tileBlockLight[0x20] = true;
            tileSolid[0x25] = true;
            tileBlockLight[0x25] = true;
            tileSolid[0x26] = true;
            tileBlockLight[0x26] = true;
            tileSolid[0x27] = true;
            tileBlockLight[0x27] = true;
            tileSolid[40] = true;
            tileBlockLight[40] = true;
            tileSolid[0x29] = true;
            tileBlockLight[0x29] = true;
            tileSolid[0x2b] = true;
            tileBlockLight[0x2b] = true;
            tileSolid[0x2c] = true;
            tileBlockLight[0x2c] = true;
            tileSolid[0x2d] = true;
            tileBlockLight[0x2d] = true;
            tileSolid[0x2e] = true;
            tileBlockLight[0x2e] = true;
            tileSolid[0x2f] = true;
            tileBlockLight[0x2f] = true;
            tileSolid[0x30] = true;
            tileBlockLight[0x30] = true;
            tileSolid[0x35] = true;
            tileBlockLight[0x35] = true;
            tileSolid[0x36] = true;
            tileBlockLight[0x34] = true;
            tileSolid[0x38] = true;
            tileBlockLight[0x38] = true;
            tileSolid[0x39] = true;
            tileBlockLight[0x39] = true;
            tileSolid[0x3a] = true;
            tileBlockLight[0x3a] = true;
            tileSolid[0x3b] = true;
            tileBlockLight[0x3b] = true;
            tileSolid[60] = true;
            tileBlockLight[60] = true;
            tileSolid[0x3f] = true;
            tileBlockLight[0x3f] = true;
            tileStone[0x3f] = true;
            tileStone[130] = true;
            tileSolid[0x40] = true;
            tileBlockLight[0x40] = true;
            tileStone[0x40] = true;
            tileSolid[0x41] = true;
            tileBlockLight[0x41] = true;
            tileStone[0x41] = true;
            tileSolid[0x42] = true;
            tileBlockLight[0x42] = true;
            tileStone[0x42] = true;
            tileSolid[0x43] = true;
            tileBlockLight[0x43] = true;
            tileStone[0x43] = true;
            tileSolid[0x44] = true;
            tileBlockLight[0x44] = true;
            tileStone[0x44] = true;
            tileSolid[0x4b] = true;
            tileBlockLight[0x4b] = true;
            tileSolid[0x4c] = true;
            tileBlockLight[0x4c] = true;
            tileSolid[70] = true;
            tileBlockLight[70] = true;
            tileNoFail[50] = true;
            tileNoAttach[50] = true;
            tileDungeon[0x29] = true;
            tileDungeon[0x2b] = true;
            tileDungeon[0x2c] = true;
            tileBlockLight[30] = true;
            tileBlockLight[0x19] = true;
            tileBlockLight[0x17] = true;
            tileBlockLight[0x16] = true;
            tileBlockLight[0x3e] = true;
            tileSolidTop[0x12] = true;
            tileSolidTop[14] = true;
            tileSolidTop[0x10] = true;
            tileSolidTop[0x72] = true;
            tileNoAttach[20] = true;
            tileNoAttach[0x13] = true;
            tileNoAttach[13] = true;
            tileNoAttach[14] = true;
            tileNoAttach[15] = true;
            tileNoAttach[0x10] = true;
            tileNoAttach[0x11] = true;
            tileNoAttach[0x12] = true;
            tileNoAttach[0x13] = true;
            tileNoAttach[0x15] = true;
            tileNoAttach[0x1b] = true;
            tileNoAttach[0x72] = true;
            tileTable[14] = true;
            tileTable[0x12] = true;
            tileTable[0x13] = true;
            tileTable[0x72] = true;
            tileNoAttach[0x56] = true;
            tileNoAttach[0x57] = true;
            tileNoAttach[0x58] = true;
            tileNoAttach[0x59] = true;
            tileNoAttach[90] = true;
            tileLavaDeath[0x56] = true;
            tileLavaDeath[0x57] = true;
            tileLavaDeath[0x58] = true;
            tileLavaDeath[0x59] = true;
            tileLavaDeath[0x7d] = true;
            tileLavaDeath[0x7e] = true;
            tileLavaDeath[0x65] = true;
            tileTable[0x65] = true;
            tileNoAttach[0x65] = true;
            tileLavaDeath[0x66] = true;
            tileNoAttach[0x66] = true;
            tileNoAttach[0x5e] = true;
            tileNoAttach[0x5f] = true;
            tileNoAttach[0x60] = true;
            tileNoAttach[0x61] = true;
            tileNoAttach[0x62] = true;
            tileNoAttach[0x63] = true;
            tileLavaDeath[0x5e] = true;
            tileLavaDeath[0x5f] = true;
            tileLavaDeath[0x60] = true;
            tileLavaDeath[0x61] = true;
            tileLavaDeath[0x62] = true;
            tileLavaDeath[0x63] = true;
            tileLavaDeath[100] = true;
            tileLavaDeath[0x67] = true;
            tileTable[0x57] = true;
            tileTable[0x58] = true;
            tileSolidTop[0x57] = true;
            tileSolidTop[0x58] = true;
            tileSolidTop[0x65] = true;
            tileNoAttach[0x5b] = true;
            tileLavaDeath[0x5b] = true;
            tileNoAttach[0x5c] = true;
            tileLavaDeath[0x5c] = true;
            tileNoAttach[0x5d] = true;
            tileLavaDeath[0x5d] = true;
            tileWaterDeath[4] = true;
            tileWaterDeath[0x33] = true;
            tileWaterDeath[0x5d] = true;
            tileWaterDeath[0x62] = true;
            tileLavaDeath[3] = true;
            tileLavaDeath[5] = true;
            tileLavaDeath[10] = true;
            tileLavaDeath[11] = true;
            tileLavaDeath[12] = true;
            tileLavaDeath[13] = true;
            tileLavaDeath[14] = true;
            tileLavaDeath[15] = true;
            tileLavaDeath[0x10] = true;
            tileLavaDeath[0x11] = true;
            tileLavaDeath[0x12] = true;
            tileLavaDeath[0x13] = true;
            tileLavaDeath[20] = true;
            tileLavaDeath[0x1b] = true;
            tileLavaDeath[0x1c] = true;
            tileLavaDeath[0x1d] = true;
            tileLavaDeath[0x20] = true;
            tileLavaDeath[0x21] = true;
            tileLavaDeath[0x22] = true;
            tileLavaDeath[0x23] = true;
            tileLavaDeath[0x24] = true;
            tileLavaDeath[0x2a] = true;
            tileLavaDeath[0x31] = true;
            tileLavaDeath[50] = true;
            tileLavaDeath[0x34] = true;
            tileLavaDeath[0x37] = true;
            tileLavaDeath[0x3d] = true;
            tileLavaDeath[0x3e] = true;
            tileLavaDeath[0x45] = true;
            tileLavaDeath[0x47] = true;
            tileLavaDeath[0x48] = true;
            tileLavaDeath[0x49] = true;
            tileLavaDeath[0x4a] = true;
            tileLavaDeath[0x4f] = true;
            tileLavaDeath[80] = true;
            tileLavaDeath[0x51] = true;
            tileLavaDeath[0x6a] = true;
            wallHouse[1] = true;
            wallHouse[4] = true;
            wallHouse[5] = true;
            wallHouse[6] = true;
            wallHouse[10] = true;
            wallHouse[11] = true;
            wallHouse[12] = true;
            wallHouse[0x10] = true;
            wallHouse[0x11] = true;
            wallHouse[0x12] = true;
            wallHouse[0x13] = true;
            wallHouse[20] = true;
            wallHouse[0x15] = true;
            wallHouse[0x16] = true;
            wallHouse[0x17] = true;
            wallHouse[0x18] = true;
            wallHouse[0x19] = true;
            wallHouse[0x1a] = true;
            wallHouse[0x1b] = true;
            wallHouse[0x1d] = true;
            wallHouse[30] = true;
            wallHouse[0x1f] = true;
            for (int k = 0; k < 0x20; k++)
            {
                switch (k)
                {
                    case 20:
                        wallBlend[k] = 14;
                        break;

                    case 0x13:
                        wallBlend[k] = 9;
                        break;

                    case 0x12:
                        wallBlend[k] = 8;
                        break;

                    case 0x11:
                        wallBlend[k] = 7;
                        break;

                    case 0x10:
                        wallBlend[k] = 2;
                        break;

                    default:
                        wallBlend[k] = k;
                        break;
                }
            }
            tileNoFail[0x20] = true;
            tileNoFail[0x3d] = true;
            tileNoFail[0x45] = true;
            tileNoFail[0x49] = true;
            tileNoFail[0x4a] = true;
            tileNoFail[0x52] = true;
            tileNoFail[0x53] = true;
            tileNoFail[0x54] = true;
            tileNoFail[110] = true;
            tileNoFail[0x71] = true;
            for (int m = 0; m < maxTileSets; m++)    //CHANGED: orig 150
            {
                tileName[m] = "";
                if (tileSolid[m])
                {
                    tileNoSunLight[m] = true;
                }
            }
            tileNoSunLight[0x13] = false;
            tileNoSunLight[11] = true;
            tileName[13] = "Bottle";
            tileName[14] = "Table";
            tileName[15] = "Chair";
            tileName[0x10] = "Anvil";
            tileName[0x11] = "Furnace";
            tileName[0x12] = "Workbench";
            tileName[0x1a] = "Demon Altar";
            tileName[0x4d] = "Hellforge";
            tileName[0x56] = "Loom";
            tileName[0x5e] = "Keg";
            tileName[0x60] = "Cooking Pot";
            tileName[0x65] = "Bookcase";
            tileName[0x6a] = "Sawmill";
            tileName[0x72] = "Tinkerer's Workshop";
            tileName[0x85] = "Adamantite Forge";
            tileName[0x86] = "Mythril Anvil";

            for (int n = 0; n < maxMenuItems; n++)
            {
                this.menuItemScale[n] = 0.8f;
            }
            for (int num7 = 0; num7 < 0x7d1; num7++)
            {
                dust[num7] = new Dust();
            }
            for (int num8 = 0; num8 < 0xc9; num8++)
            {
                Main.item[num8] = new Item();
            }
            for (int num9 = 0; num9 < 0xc9; num9++)
            {
                npc[num9] = new NPC();
                npc[num9].whoAmI = num9;
            }
            for (int num10 = 0; num10 < 0x100; num10++)
            {
                player[num10] = new Player();
            }
            for (int num11 = 0; num11 < 0x3e9; num11++)
            {
                projectile[num11] = new Projectile();
            }
            for (int num12 = 0; num12 < 0xc9; num12++)
            {
                gore[num12] = new Gore();
            }
            for (int num13 = 0; num13 < 100; num13++)
            {
                cloud[num13] = new Cloud();
            }
            for (int num14 = 0; num14 < 100; num14++)
            {
                combatText[num14] = new CombatText();
            }
            for (int num15 = 0; num15 < 20; num15++)
            {
                itemText[num15] = new ItemText();
            }
            for (int num16 = 0; num16 < maxItemTypes; num16++) //CHANGED, orig 0x25b
            {
                Item item = new Item();
                item.SetDefaults(num16, false);
                itemName[num16] = item.name;
                if (item.headSlot > 0)
                {
                    Item.headType[item.headSlot] = item.type;
                }
                if (item.bodySlot > 0)
                {
                    Item.bodyType[item.bodySlot] = item.type;
                }
                if (item.legSlot > 0)
                {
                    Item.legType[item.legSlot] = item.type;
                }
            }
            for (int num17 = 0; num17 < Recipe.maxRecipes; num17++)
            {
                recipe[num17] = new Recipe();
                availableRecipeY[num17] = 0x41 * num17;
            }
            Recipe.SetupRecipes();
            for (int num18 = 0; num18 < numChatLines; num18++)
            {
                chatLine[num18] = new ChatLine();
            }
            for (int num19 = 0; num19 < Liquid.resLiquid; num19++)
            {
                liquid[num19] = new Liquid();
            }
            for (int num20 = 0; num20 < 0x2710; num20++)
            {
                liquidBuffer[num20] = new LiquidBuffer();
            }
            this.shop[0] = new Chest();
            this.shop[1] = new Chest();
            this.shop[1].SetupShop(1);
            this.shop[2] = new Chest();
            this.shop[2].SetupShop(2);
            this.shop[3] = new Chest();
            this.shop[3].SetupShop(3);
            this.shop[4] = new Chest();
            this.shop[4].SetupShop(4);
            this.shop[5] = new Chest();
            this.shop[5].SetupShop(5);
            this.shop[6] = new Chest();
            this.shop[6].SetupShop(6);
            this.shop[7] = new Chest();
            this.shop[7].SetupShop(7);
            this.shop[8] = new Chest();
            this.shop[8].SetupShop(8);
            this.shop[9] = new Chest();
            this.shop[9].SetupShop(9);
            teamColor[0] = Color.White;
            teamColor[1] = new Color(230, 40, 20);
            teamColor[2] = new Color(20, 200, 30);
            teamColor[3] = new Color(0x4b, 90, 0xff);
            teamColor[4] = new Color(200, 180, 0);
            if (menuMode == 1)
            {
                LoadPlayers();
            }
            Netplay.Init();
            /*if (skipMenu) // CHANGED: wasnt working so made new skipmenu (line 17280)
            {
                WorldGen.clearWorld();
                gameMenu = false;
                LoadPlayers();
                player[myPlayer] = (Player)loadPlayer[0].Clone();
                PlayerPath = loadPlayerPath[0];
                LoadWorlds();
                WorldGen.generateWorld(-1);
                WorldGen.EveryTileFrame();
                player[myPlayer].Spawn();
            }
            else
            {*/
                IntPtr systemMenu = GetSystemMenu(base.Window.Handle, false);
                int menuItemCount = GetMenuItemCount(systemMenu);
                RemoveMenu(systemMenu, menuItemCount - 1, 0x400);
            //}
            if (!dedServ)
            {
                this.graphics.PreferredBackBufferWidth = screenWidth;
                this.graphics.PreferredBackBufferHeight = screenHeight;
                this.graphics.ApplyChanges();
                base.Initialize();
                base.Window.AllowUserResizing = true;
                this.OpenSettings();
                this.OpenRecent();
                Star.SpawnStars();
                foreach (DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
                {
                    if (((mode.Width < minScreenW) || (mode.Height < minScreenH)) || ((mode.Width > maxScreenW) || (mode.Height > maxScreenH)))
                    {
                        continue;
                    }
                    bool flag = true;
                    for (int num22 = 0; num22 < this.numDisplayModes; num22++)
                    {
                        if ((mode.Width == this.displayWidth[num22]) && (mode.Height == this.displayHeight[num22]))
                        {
                            flag = false;
                            break;
                        }
                    }
                    if (flag)
                    {
                        this.displayHeight[this.numDisplayModes] = mode.Height;
                        this.displayWidth[this.numDisplayModes] = mode.Width;
                        this.numDisplayModes++;
                    }
                }
                if (autoJoin)
                {
                    LoadPlayers();
                    menuMode = 1;
                    menuMultiplayer = true;
                }
                fpsTimer.Start();
                updateTimer.Start();
            }
            if(Mods.ModMain.skipMenu)
            {
                Mods.ModMain.skipMenus();   //CHANGED: Try to skip menus
            }
        }
コード例 #27
0
        public static void BoomerangAI(int index, float retractTime = 30f, float speed = 9f, float speedAcceleration = 0.4f, ExtraAction action = null, ExtraAction initialize = null)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            if (initialize != null && projectile.localAI[1] == 0f)
            {
                projectile.localAI[1] = 1f;
                initialize();
            }
            if (projectile.soundDelay == 0)
            {
                projectile.soundDelay = 8;
                Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 7);
            }

            if (projectile.ai[0] == 0f)
            {
                projectile.ai[1] += 1f;
                if (projectile.ai[1] >= retractTime)
                {
                    projectile.ai[0]     = 1f;
                    projectile.ai[1]     = 0f;
                    projectile.netUpdate = true;
                }
            }
            else
            {
                projectile.tileCollide = false;
                Vector2 vector = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
                float   num    = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector.X;
                float   num2   = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector.Y;
                float   num3   = (float)Math.Sqrt((double)(num * num + num2 * num2));
                if (num3 > 3000f)
                {
                    projectile.Kill();
                }

                num3  = speed / num3;
                num  *= num3;
                num2 *= num3;

                if (projectile.velocity.X < num)
                {
                    projectile.velocity.X = projectile.velocity.X + speedAcceleration;
                    if (projectile.velocity.X < 0f && num > 0f)
                    {
                        projectile.velocity.X = projectile.velocity.X + speedAcceleration;
                    }
                }
                else if (projectile.velocity.X > num)
                {
                    projectile.velocity.X = projectile.velocity.X - speedAcceleration;
                    if (projectile.velocity.X > 0f && num < 0f)
                    {
                        projectile.velocity.X = projectile.velocity.X - speedAcceleration;
                    }
                }

                if (projectile.velocity.Y < num2)
                {
                    projectile.velocity.Y = projectile.velocity.Y + speedAcceleration;
                    if (projectile.velocity.Y < 0f && num2 > 0f)
                    {
                        projectile.velocity.Y = projectile.velocity.Y + speedAcceleration;
                    }
                }
                else if (projectile.velocity.Y > num2)
                {
                    projectile.velocity.Y = projectile.velocity.Y - speedAcceleration;
                    if (projectile.velocity.Y > 0f && num2 < 0f)
                    {
                        projectile.velocity.Y = projectile.velocity.Y - speedAcceleration;
                    }
                }

                if (Main.myPlayer == projectile.owner)
                {
                    Rectangle rectangle = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height);
                    Rectangle value     = new Rectangle((int)Main.player[projectile.owner].position.X, (int)Main.player[projectile.owner].position.Y, Main.player[projectile.owner].width, Main.player[projectile.owner].height);
                    if (rectangle.Intersects(value))
                    {
                        projectile.Kill();
                    }
                }
            }
            projectile.rotation += 0.4f * (float)projectile.direction;
            if (action != null)
            {
                action();
            }
        }
コード例 #28
0
		internal bool InvokeProjectileAIUpdate(Projectile projectile)
		{
			ProjectileAiUpdateEventArgs args = new ProjectileAiUpdateEventArgs
			{
				Projectile = projectile
			};

			this.ProjectileAIUpdate.Invoke(args);

			return args.Handled;
		}
コード例 #29
0
		internal bool InvokeProjectileTriggerPressurePlate(Projectile projectile, int tileX, int tileY)
		{
			TriggerPressurePlateEventArgs<Projectile> args = new TriggerPressurePlateEventArgs<Projectile>
			{
				Object = projectile,
				TileX = tileX,
				TileY = tileY
			};

			this.ProjectileTriggerPressurePlate.Invoke(args);

			return args.Handled;
		}
コード例 #30
0
		internal bool InvokeProjectileSetDefaults(ref int type, Projectile projectile)
		{
			SetDefaultsEventArgs<Projectile, int> args = new SetDefaultsEventArgs<Projectile, int>
			{
				Object = projectile,
				Info = type
			};

			this.ProjectileSetDefaults.Invoke(args);

			type = args.Info;
			return args.Handled;
		}
コード例 #31
0
        public static void FlailAI(int index, float initialRange = 160f, float weaponOutRange = 300f, float retractRange = 100f, ExtraAction action = null, ExtraAction initialize = null)
        {
            Terraria.Projectile projectile = Main.projectile[index];
            if (initialize != null && projectile.localAI[1] == 0f)
            {
                projectile.localAI[1] = 1f;
                initialize();
            }
            if (Main.player[projectile.owner].dead)
            {
                projectile.Kill();
                return;
            }
            Main.player[projectile.owner].itemAnimation = 10;
            Main.player[projectile.owner].itemTime      = 10;
            if (projectile.position.X + (float)(projectile.width / 2) > Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2))
            {
                Main.player[projectile.owner].ChangeDir(1);
                projectile.direction = 1;
            }
            else
            {
                Main.player[projectile.owner].ChangeDir(-1);
                projectile.direction = -1;
            }
            Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter;
            Vector2 vector        = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
            float   num           = mountedCenter.X - vector.X;
            float   num2          = mountedCenter.Y - vector.Y;
            float   num3          = (float)Math.Sqrt((double)(num * num + num2 * num2));

            if (projectile.ai[0] == 0f)
            {
                projectile.tileCollide = true;
                if (num3 > initialRange)
                {
                    projectile.ai[0]     = 1f;
                    projectile.netUpdate = true;
                }
                else if (!Main.player[projectile.owner].channel)
                {
                    if (projectile.velocity.Y < 0f)
                    {
                        projectile.velocity.Y = projectile.velocity.Y * 0.9f;
                    }
                    projectile.velocity.Y = projectile.velocity.Y + 1f;
                    projectile.velocity.X = projectile.velocity.X * 0.9f;
                }
            }
            else if (projectile.ai[0] == 1f)
            {
                float num4 = 14f / Main.player[projectile.owner].meleeSpeed;
                float num5 = 0.9f / Main.player[projectile.owner].meleeSpeed;
                Math.Abs(num);
                Math.Abs(num2);
                if (projectile.ai[1] == 1f)
                {
                    projectile.tileCollide = false;
                }
                if (!Main.player[projectile.owner].channel || num3 > weaponOutRange || !projectile.tileCollide)
                {
                    projectile.ai[1] = 1f;
                    if (projectile.tileCollide)
                    {
                        projectile.netUpdate = true;
                    }
                    projectile.tileCollide = false;
                    if (num3 < 20f)
                    {
                        projectile.Kill();
                    }
                }
                if (!projectile.tileCollide)
                {
                    num5 *= 2f;
                }
                int num6 = (int)retractRange;
                if (num3 > (float)num6 || !projectile.tileCollide)
                {
                    num3  = num4 / num3;
                    num  *= num3;
                    num2 *= num3;
                    new Vector2(projectile.velocity.X, projectile.velocity.Y);
                    float num7 = num - projectile.velocity.X;
                    float num8 = num2 - projectile.velocity.Y;
                    float num9 = (float)Math.Sqrt((double)(num7 * num7 + num8 * num8));
                    num9  = num5 / num9;
                    num7 *= num9;
                    num8 *= num9;
                    projectile.velocity.X = projectile.velocity.X * 0.98f;
                    projectile.velocity.Y = projectile.velocity.Y * 0.98f;
                    projectile.velocity.X = projectile.velocity.X + num7;
                    projectile.velocity.Y = projectile.velocity.Y + num8;
                }
                else
                {
                    if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 6f)
                    {
                        projectile.velocity.X = projectile.velocity.X * 0.96f;
                        projectile.velocity.Y = projectile.velocity.Y + 0.2f;
                    }
                    if (Main.player[projectile.owner].velocity.X == 0f)
                    {
                        projectile.velocity.X = projectile.velocity.X * 0.96f;
                    }
                }
            }
            if (projectile.velocity.X < 0f)
            {
                projectile.rotation -= (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f;
            }
            else
            {
                projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f;
            }
            if (action != null)
            {
                action();
            }
        }
コード例 #32
0
ファイル: ModNPC.cs プロジェクト: guyde2011/tModLoader
 public virtual void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
 {
 }
コード例 #33
0
ファイル: ModNPC.cs プロジェクト: guyde2011/tModLoader
 public virtual bool? CanBeHitByProjectile(Projectile projectile)
 {
     return null;
 }
コード例 #34
0
        public static void DrawString(int index, Vector2 to = default(Vector2))
        {
            Terraria.Projectile projectile    = Main.projectile[index];
            Vector2             mountedCenter = Main.player[projectile.owner].MountedCenter;
            Vector2             vector        = mountedCenter;

            vector.Y += Main.player[projectile.owner].gfxOffY;
            if (to != default(Vector2))
            {
                vector = to;
            }
            float num  = projectile.Center.X - vector.X;
            float num2 = projectile.Center.Y - vector.Y;

            Math.Sqrt((double)(num * num + num2 * num2));
            float rotation = (float)Math.Atan2((double)num2, (double)num) - 1.57f;

            if (!projectile.counterweight)
            {
                int num3 = -1;
                if (projectile.position.X + (float)(projectile.width / 2) < Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2))
                {
                    num3 = 1;
                }
                num3 *= -1;
                Main.player[projectile.owner].itemRotation = (float)Math.Atan2((double)(num2 * (float)num3), (double)(num * (float)num3));
            }
            bool flag = true;

            if (num == 0f && num2 == 0f)
            {
                flag = false;
            }
            else
            {
                float num4 = (float)Math.Sqrt((double)(num * num + num2 * num2));
                num4      = 12f / num4;
                num      *= num4;
                num2     *= num4;
                vector.X -= num * 0.1f;
                vector.Y -= num2 * 0.1f;
                num       = projectile.position.X + (float)projectile.width * 0.5f - vector.X;
                num2      = projectile.position.Y + (float)projectile.height * 0.5f - vector.Y;
            }
            while (flag)
            {
                float num5 = 12f;
                float num6 = (float)Math.Sqrt((double)(num * num + num2 * num2));
                float num7 = num6;
                if (float.IsNaN(num6) || float.IsNaN(num7))
                {
                    flag = false;
                }
                else
                {
                    if (num6 < 20f)
                    {
                        num5 = num6 - 8f;
                        flag = false;
                    }
                    num6      = 12f / num6;
                    num      *= num6;
                    num2     *= num6;
                    vector.X += num;
                    vector.Y += num2;
                    num       = projectile.position.X + (float)projectile.width * 0.5f - vector.X;
                    num2      = projectile.position.Y + (float)projectile.height * 0.1f - vector.Y;
                    if (num7 > 12f)
                    {
                        float num8 = 0.3f;
                        float num9 = Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y);
                        if (num9 > 16f)
                        {
                            num9 = 16f;
                        }
                        num9  = 1f - num9 / 16f;
                        num8 *= num9;
                        num9  = num7 / 80f;
                        if (num9 > 1f)
                        {
                            num9 = 1f;
                        }
                        num8 *= num9;
                        if (num8 < 0f)
                        {
                            num8 = 0f;
                        }
                        num8 *= num9;
                        num8 *= 0.5f;
                        if (num2 > 0f)
                        {
                            num2 *= 1f + num8;
                            num  *= 1f - num8;
                        }
                        else
                        {
                            num9 = Math.Abs(projectile.velocity.X) / 3f;
                            if (num9 > 1f)
                            {
                                num9 = 1f;
                            }
                            num9 -= 0.5f;
                            num8 *= num9;
                            if (num8 > 0f)
                            {
                                num8 *= 2f;
                            }
                            num2 *= 1f + num8;
                            num  *= 1f - num8;
                        }
                    }
                    rotation = (float)Math.Atan2((double)num2, (double)num) - 1.57f;
                    int   stringColor = Main.player[projectile.owner].stringColor;
                    Color color       = WorldGen.paintColor(stringColor);
                    if (color.R < 75)
                    {
                        color.R = 75;
                    }
                    if (color.G < 75)
                    {
                        color.G = 75;
                    }
                    if (color.B < 75)
                    {
                        color.B = 75;
                    }
                    if (stringColor == 13)
                    {
                        color = new Color(20, 20, 20);
                    }
                    else if (stringColor == 14 || stringColor == 0)
                    {
                        color = new Color(200, 200, 200);
                    }
                    else if (stringColor == 28)
                    {
                        color = new Color(163, 116, 91);
                    }
                    else if (stringColor == 27)
                    {
                        color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
                    }
                    color.A = (byte)((float)color.A * 0.4f);
                    float num10 = 0.5f;
                    color = Lighting.GetColor((int)vector.X / 16, (int)(vector.Y / 16f), color);
                    color = new Color((int)((byte)((float)color.R * num10)), (int)((byte)((float)color.G * num10)), (int)((byte)((float)color.B * num10)), (int)((byte)((float)color.A * num10)));
                    Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2(vector.X - Main.screenPosition.X + (float)Main.fishingLineTexture.Width * 0.5f, vector.Y - Main.screenPosition.Y + (float)Main.fishingLineTexture.Height * 0.5f) - new Vector2(6f, 0f), new Rectangle?(new Rectangle(0, 0, Main.fishingLineTexture.Width, (int)num5)), color, rotation, new Vector2((float)Main.fishingLineTexture.Width * 0.5f, 0f), 1f, SpriteEffects.None, 0f);
                }
            }
        }
コード例 #35
0
ファイル: PuritySpirit.cs プロジェクト: PJB3005/tModLoader
 public override bool? CanBeHitByProjectile(Projectile projectile)
 {
     return CanBeHitByPlayer(Main.player[projectile.owner]);
 }
コード例 #36
0
ファイル: Helper.cs プロジェクト: astranauta/Tremor
 public static void Explode(int index, int sizeX, int sizeY, ExtraAction visualAction = null)
 {
     Terraria.Projectile projectile = Main.projectile[index];
     if (!projectile.active)
     {
         return;
     }
     projectile.tileCollide = false;
     projectile.alpha       = 255;
     projectile.position.X  = projectile.position.X + (float)(projectile.width / 2);
     projectile.position.Y  = projectile.position.Y + (float)(projectile.height / 2);
     projectile.width       = sizeX;
     projectile.height      = sizeY;
     projectile.position.X  = projectile.position.X - (float)(projectile.width / 2);
     projectile.position.Y  = projectile.position.Y - (float)(projectile.height / 2);
     projectile.Damage();
     Main.projectileIdentity[projectile.owner, projectile.identity] = -1;
     projectile.position.X = projectile.position.X + (float)(projectile.width / 2);
     projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2);
     projectile.width      = (int)((float)sizeX / 5.8f);
     projectile.height     = (int)((float)sizeY / 5.8f);
     projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
     projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
     if (visualAction == null)
     {
         for (int i = 0; i < 30; i++)
         {
             int num = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 1.5f);
             Main.dust[num].velocity *= 1.4f;
         }
         for (int j = 0; j < 20; j++)
         {
             int num2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3.5f);
             Main.dust[num2].noGravity = true;
             Main.dust[num2].velocity *= 7f;
             num2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 1.5f);
             Main.dust[num2].velocity *= 3f;
         }
         for (int k = 0; k < 2; k++)
         {
             float scaleFactor = 0.4f;
             if (k == 1)
             {
                 scaleFactor = 0.8f;
             }
             int num3 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
             Main.gore[num3].velocity *= scaleFactor;
             Gore gore = Main.gore[num3];
             gore.velocity.X = gore.velocity.X + 1f;
             Gore gore2 = Main.gore[num3];
             gore2.velocity.Y          = gore2.velocity.Y + 1f;
             num3                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
             Main.gore[num3].velocity *= scaleFactor;
             Gore gore3 = Main.gore[num3];
             gore3.velocity.X = gore3.velocity.X - 1f;
             Gore gore4 = Main.gore[num3];
             gore4.velocity.Y          = gore4.velocity.Y + 1f;
             num3                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
             Main.gore[num3].velocity *= scaleFactor;
             Gore gore5 = Main.gore[num3];
             gore5.velocity.X = gore5.velocity.X + 1f;
             Gore gore6 = Main.gore[num3];
             gore6.velocity.Y          = gore6.velocity.Y - 1f;
             num3                      = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
             Main.gore[num3].velocity *= scaleFactor;
             Gore gore7 = Main.gore[num3];
             gore7.velocity.X = gore7.velocity.X - 1f;
             Gore gore8 = Main.gore[num3];
             gore8.velocity.Y = gore8.velocity.Y - 1f;
         }
         return;
     }
     visualAction();
 }
コード例 #37
0
        public override void Behavior()
        {
            Player player = Main.player[base.projectile.owner];
            float  num    = (float)base.projectile.width * 1.1f;

            for (int i = 0; i < 1000; i++)
            {
                Terraria.Projectile projectile = Main.projectile[i];
                if (i != base.projectile.whoAmI && projectile.active && projectile.owner == base.projectile.owner && projectile.type == base.projectile.type && Math.Abs(base.projectile.position.X - projectile.position.X) + Math.Abs(base.projectile.position.Y - projectile.position.Y) < num)
                {
                    if (base.projectile.position.X < Main.projectile[i].position.X)
                    {
                        Terraria.Projectile expr_F3_cp_0 = base.projectile;
                        expr_F3_cp_0.velocity.X = expr_F3_cp_0.velocity.X - 0.08f;
                    }
                    else
                    {
                        Terraria.Projectile expr_111_cp_0 = base.projectile;
                        expr_111_cp_0.velocity.X = expr_111_cp_0.velocity.X + 0.08f;
                    }
                    if (base.projectile.position.Y < Main.projectile[i].position.Y)
                    {
                        Terraria.Projectile expr_150_cp_0 = base.projectile;
                        expr_150_cp_0.velocity.Y = expr_150_cp_0.velocity.Y - 0.08f;
                    }
                    else
                    {
                        Terraria.Projectile expr_16E_cp_0 = base.projectile;
                        expr_16E_cp_0.velocity.Y = expr_16E_cp_0.velocity.Y + 0.08f;
                    }
                }
            }
            Vector2 value = base.projectile.position;
            float   num2  = 500f;
            bool    flag  = false;

            base.projectile.tileCollide = true;
            for (int j = 0; j < 200; j++)
            {
                NPC nPC = Main.npc[j];
                if (nPC.CanBeChasedBy(this, false))
                {
                    float num3 = Vector2.Distance(nPC.Center, base.projectile.Center);
                    if ((num3 < num2 || !flag) && Collision.CanHitLine(base.projectile.position, base.projectile.width, base.projectile.height, nPC.position, nPC.width, nPC.height))
                    {
                        num2  = num3;
                        value = nPC.Center;
                        flag  = true;
                    }
                }
            }
            if (Vector2.Distance(player.Center, base.projectile.Center) > (flag ? 1000f : 500f))
            {
                base.projectile.ai[0]     = 1f;
                base.projectile.netUpdate = true;
            }
            if (base.projectile.ai[0] == 1f)
            {
                base.projectile.tileCollide = false;
            }
            if (flag && base.projectile.ai[0] == 0f)
            {
                Vector2 value2 = value - base.projectile.Center;
                if (value2.Length() > 200f)
                {
                    value2.Normalize();
                    base.projectile.velocity = (base.projectile.velocity * 20f + value2 * 6f) / 21f;
                }
                else
                {
                    base.projectile.velocity *= (float)Math.Pow(0.97, 2.0);
                }
            }
            else
            {
                if (!Collision.CanHitLine(base.projectile.Center, 1, 1, player.Center, 1, 1))
                {
                    base.projectile.ai[0] = 1f;
                }
                float num4 = 6f;
                if (base.projectile.ai[0] == 1f)
                {
                    num4 = 15f;
                }
                Vector2 center = base.projectile.Center;
                Vector2 vector = player.Center - center;
                base.projectile.ai[1]     = 3600f;
                base.projectile.netUpdate = true;
                int num5 = 1;
                for (int k = 0; k < base.projectile.whoAmI; k++)
                {
                    if (Main.projectile[k].active && Main.projectile[k].owner == base.projectile.owner && Main.projectile[k].type == base.projectile.type)
                    {
                        num5++;
                    }
                }
                vector.X -= (float)((10 + num5 * 40) * player.direction);
                vector.Y -= 70f;
                float num6 = vector.Length();
                if (num6 > 200f && num4 < 9f)
                {
                    num4 = 9f;
                }
                if (num6 < 100f && base.projectile.ai[0] == 1f && !Collision.SolidCollision(base.projectile.position, base.projectile.width, base.projectile.height))
                {
                    base.projectile.ai[0]     = 0f;
                    base.projectile.netUpdate = true;
                }
                if (num6 > 2000f)
                {
                    base.projectile.Center = player.Center;
                }
                if (num6 > 48f)
                {
                    vector.Normalize();
                    vector *= num4;
                    float num7 = 10f;
                    base.projectile.velocity = (base.projectile.velocity * num7 + vector) / (num7 + 1f);
                }
                else
                {
                    base.projectile.direction = Main.player[base.projectile.owner].direction;
                    base.projectile.velocity *= (float)Math.Pow(0.9, 2.0);
                }
            }
            base.projectile.rotation = base.projectile.velocity.X * 0.05f;
            if (base.projectile.velocity.X > 0f)
            {
                base.projectile.spriteDirection = (base.projectile.direction = -1);
            }
            else if (base.projectile.velocity.X < 0f)
            {
                base.projectile.spriteDirection = (base.projectile.direction = 1);
            }
            if (base.projectile.ai[1] > 0f)
            {
                base.projectile.ai[1] += 1f;
            }
            if (base.projectile.ai[1] > 140f)
            {
                base.projectile.ai[1]     = 0f;
                base.projectile.netUpdate = true;
            }
            if (base.projectile.ai[0] == 0f && flag)
            {
                if ((value - base.projectile.Center).X > 0f)
                {
                    base.projectile.spriteDirection = (base.projectile.direction = -1);
                }
                else if ((value - base.projectile.Center).X < 0f)
                {
                    base.projectile.spriteDirection = (base.projectile.direction = 1);
                }
                if (base.projectile.ai[1] == 0f)
                {
                    base.projectile.ai[1] = 1f;
                    if (Main.myPlayer == base.projectile.owner)
                    {
                        Vector2 vector2 = value - base.projectile.Center;
                        if (vector2 == Vector2.Zero)
                        {
                            vector2 = new Vector2(0f, 1f);
                        }
                        vector2.Normalize();
                        vector2 *= 9f;
                        int num8 = Terraria.Projectile.NewProjectile(base.projectile.Center.X, base.projectile.Center.Y, vector2.X, vector2.Y, base.mod.ProjectileType("WitherBolt1"), 19, base.projectile.knockBack, Main.myPlayer, 0f, 0f);
                        Main.projectile[num8].timeLeft  = 300;
                        Main.projectile[num8].netUpdate = true;
                        base.projectile.netUpdate       = true;
                    }
                }
            }
            if (base.projectile.ai[0] == 0f)
            {
                if (Main.rand.Next(5) == 0)
                {
                    int  num9          = Dust.NewDust(base.projectile.position, base.projectile.width, base.projectile.height / 2, 187, 0f, 0f, 0, default(Color), 1f);
                    Dust expr_8EC_cp_0 = Main.dust[num9];
                    expr_8EC_cp_0.velocity.Y = expr_8EC_cp_0.velocity.Y - 1.2f;
                }
            }
            else if (Main.rand.Next(3) == 0)
            {
                Vector2 velocity = base.projectile.velocity;
                if (velocity != Vector2.Zero)
                {
                    velocity.Normalize();
                }
                int num10 = Dust.NewDust(base.projectile.position, base.projectile.width, base.projectile.height, 187, 0f, 0f, 0, default(Color), 1f);
                Main.dust[num10].velocity -= 1.2f * velocity;
            }
            Lighting.AddLight((int)(base.projectile.Center.X / 16f), (int)(base.projectile.Center.Y / 16f), 0.2f, 0.2f, 0.9f);
        }
コード例 #38
0
ファイル: Main.cs プロジェクト: NoviaDroid/Terraria
		protected override void Initialize()
		{
			Chest.Initialize();
			Wiring.Initialize();
			Framing.Initialize();
			Lighting.Initialize(false);
			Map.Initialize();
			TimeLogger.Initialize();
			WorldGen.randomBackgrounds();
			WorldGen.setCaveBacks();
			WorldGen.randMoon();
			Main.bgAlpha[0] = 1f;
			Main.bgAlpha2[0] = 1f;
			this.invBottom = 258;
			for (int i = 0; i < 423; i++)
			{
				Main.projFrames[i] = 1;
			}
			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[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[127] = 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.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[127] = 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[377] = 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.tileLighted[237] = 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.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[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[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[137] = 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[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[138] = true;
			Main.buffNoTimeDisplay[139] = 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[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[127] = true;
			Main.vanityPet[136] = true;
			Main.lightPet[19] = true;
			Main.lightPet[27] = true;
			Main.lightPet[101] = true;
			Main.lightPet[102] = true;
			Main.lightPet[57] = 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.tileRope[213] = true;
			Main.tileRope[214] = true;
			Main.tilePile[330] = true;
			Main.tilePile[331] = true;
			Main.tilePile[332] = true;
			Main.tilePile[333] = true;
			for (int j = 0; j < 378; j++)
			{
				Main.npcCatchable[j] = 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.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.tileFrameImportant[334] = 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[324] = true;
			Main.tileObsidianKill[324] = true;
			Main.tileLavaDeath[324] = 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] = 1;
			Main.tileLargeFrames[325] = 1;
			Main.tileSolid[325] = true;
			Main.tileBlockLight[325] = true;
			Main.wallLargeFrames[146] = 1;
			Main.wallLargeFrames[147] = 1;
			Main.wallLargeFrames[167] = 1;
			Main.tileSolid[326] = true;
			Main.tileBlockLight[326] = true;
			Main.tileSolid[327] = true;
			Main.tileBlockLight[327] = 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.tileSolid[284] = true;
			Main.tileBlockLight[284] = true;
			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[309] = true;
			Main.tileFrameImportant[310] = true;
			Main.tileFrameImportant[339] = true;
			Main.tileLighted[286] = 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.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] = 1;
			Main.tileSolid[273] = true;
			Main.tileBlockLight[273] = true;
			Main.tileLargeFrames[274] = 1;
			Main.tileSolid[274] = true;
			Main.tileBlockLight[274] = true;
			for (int k = 255; k <= 268; k++)
			{
				Main.tileSolid[k] = true;
				if (k > 261)
				{
					Main.tileLighted[k] = true;
					Main.tileShine2[k] = true;
				}
			}
			Main.tileFrameImportant[269] = true;
			Main.tileFrameImportant[334] = 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;
			for (int l = 153; l < 167; l++)
			{
				Main.wallHouse[l] = 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[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[127] = 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.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 m = 0; m < 172; m++)
			{
				Main.wallDungeon[m] = 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 n = 0; n < 10; n++)
			{
				Main.recentWorld[n] = "";
				Main.recentIP[n] = "";
				Main.recentPort[n] = 0;
			}
			if (Main.rand == null)
			{
				Main.rand = new Random((int)DateTime.Now.Ticks);
			}
			if (WorldGen.genRand == null)
			{
				WorldGen.genRand = new Random((int)DateTime.Now.Ticks);
			}
			this.SetTitle();
			Main.lo = Main.rand.Next(6);
			Main.critterCage = true;
			for (int num = 0; num < 3600; num++)
			{
				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[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.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[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[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[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.tileBlockLight[138] = 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[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[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[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[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[319] = true;
			Main.tileFrameImportant[323] = true;
			Main.tileFrameImportant[335] = true;
			Main.tileFrameImportant[337] = true;
			Main.tileFrameImportant[141] = true;
			Main.tileFrameImportant[270] = true;
			Main.tileFrameImportant[271] = true;
			Main.tileFrameImportant[314] = 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.tileAlch[82] = true;
			Main.tileAlch[83] = true;
			Main.tileAlch[84] = true;
			Main.tileSolid[127] = 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.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.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.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.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[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[15] = true;
			Main.tileNoAttach[16] = true;
			Main.tileNoAttach[134] = true;
			Main.tileNoAttach[17] = true;
			Main.tileNoAttach[18] = true;
			Main.tileNoAttach[19] = true;
			Main.tileNoAttach[21] = true;
			Main.tileNoAttach[27] = true;
			Main.tileNoAttach[114] = true;
			Main.tileTable[14] = 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[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[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[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[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[323] = true;
			Main.tileLavaDeath[335] = true;
			Main.tileLavaDeath[338] = true;
			Main.tileLavaDeath[339] = true;
			Main.tileLighted[316] = true;
			Main.tileLighted[317] = true;
			Main.tileLighted[318] = true;
			for (int num2 = 0; num2 < 340; num2++)
			{
				if (Main.tileLavaDeath[num2])
				{
					Main.tileObsidianKill[num2] = 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;
			for (int num3 = 0; num3 < 172; num3++)
			{
				if (num3 == 20)
				{
					Main.wallBlend[num3] = 14;
				}
				else
				{
					if (num3 == 19)
					{
						Main.wallBlend[num3] = 9;
					}
					else
					{
						if (num3 == 18)
						{
							Main.wallBlend[num3] = 8;
						}
						else
						{
							if (num3 == 17)
							{
								Main.wallBlend[num3] = 7;
							}
							else
							{
								if (num3 == 16 || num3 == 59)
								{
									Main.wallBlend[num3] = 2;
								}
								else
								{
									if (num3 == 1 || (num3 >= 48 && num3 <= 53))
									{
										Main.wallBlend[num3] = 1;
									}
									else
									{
										Main.wallBlend[num3] = num3;
									}
								}
							}
						}
					}
				}
			}
			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;
			for (int num4 = 0; num4 < 340; num4++)
			{
				if (Main.tileSolid[num4])
				{
					Main.tileNoSunLight[num4] = true;
				}
				Main.tileFrame[num4] = 0;
				Main.tileFrameCounter[num4] = 0;
			}
			Main.tileNoSunLight[54] = false;
			Main.tileNoSunLight[328] = false;
			Main.tileNoSunLight[19] = false;
			Main.tileNoSunLight[11] = true;
			Main.tileNoSunLight[189] = false;
			Main.tileNoSunLight[196] = false;
			for (int num5 = 0; num5 < Main.maxMenuItems; num5++)
			{
				this.menuItemScale[num5] = 0.8f;
			}
			for (int num6 = 0; num6 < 6001; num6++)
			{
				Main.dust[num6] = new Dust();
			}
			for (int num7 = 0; num7 < 401; num7++)
			{
				Main.item[num7] = new Item();
			}
			for (int num8 = 0; num8 < 201; num8++)
			{
				Main.npc[num8] = new NPC();
				Main.npc[num8].whoAmI = num8;
			}
			for (int num9 = 0; num9 < 256; num9++)
			{
				Main.player[num9] = new Player();
			}
			for (int num10 = 0; num10 < 1001; num10++)
			{
				Main.projectile[num10] = new Projectile();
			}
			for (int num11 = 0; num11 < 501; num11++)
			{
				Main.gore[num11] = new Gore();
			}
			for (int num12 = 0; num12 < Main.maxRain + 1; num12++)
			{
				Main.rain[num12] = new Rain();
			}
			for (int num13 = 0; num13 < 200; num13++)
			{
				Main.cloud[num13] = new Cloud();
			}
			for (int num14 = 0; num14 < 100; num14++)
			{
				Main.combatText[num14] = new CombatText();
			}
			for (int num15 = 0; num15 < 20; num15++)
			{
				Main.itemText[num15] = new ItemText();
			}
			for (int num16 = 0; num16 < 2749; num16++)
			{
				Item item = new Item();
				item.SetDefaults(num16, false);
				Main.itemName[num16] = item.name;
				if (item.headSlot > 0)
				{
					Item.headType[item.headSlot] = item.type;
				}
				if (item.bodySlot > 0)
				{
					Item.bodyType[item.bodySlot] = item.type;
				}
				if (item.legSlot > 0)
				{
					Item.legType[item.legSlot] = item.type;
				}
			}
			NPC nPC = new NPC();
			for (int num17 = -65; num17 < 378; num17++)
			{
				if (num17 != 0)
				{
					nPC.netDefaults(num17);
					if (nPC.lifeMax > 32767)
					{
						Main.npcLifeBytes[num17] = 4;
					}
					else
					{
						if (nPC.lifeMax > 127)
						{
							Main.npcLifeBytes[num17] = 2;
						}
						else
						{
							Main.npcLifeBytes[num17] = 1;
						}
					}
				}
			}
			for (int num18 = 0; num18 < Recipe.maxRecipes; num18++)
			{
				Main.recipe[num18] = new Recipe();
				Main.availableRecipeY[num18] = (float)(65 * num18);
			}
			Recipe.SetupRecipes();
			for (int num19 = 0; num19 < Main.numChatLines; num19++)
			{
				Main.chatLine[num19] = new ChatLine();
			}
			for (int num20 = 0; num20 < Liquid.resLiquid; num20++)
			{
				Main.liquid[num20] = new Liquid();
			}
			for (int num21 = 0; num21 < 10000; num21++)
			{
				Main.liquidBuffer[num21] = new LiquidBuffer();
			}
			this.waterfallManager = new WaterfallManager();
			Lighting.LightingThreads = Environment.ProcessorCount - 1;
			this.shop[0] = new Chest(false);
			Chest.SetupTravelShop();
			for (int num22 = 1; num22 < Main.numShops; num22++)
			{
				this.shop[num22] = new Chest(false);
				this.shop[num22].SetupShop(num22);
			}
			Main.teamColor[0] = Color.White;
			Main.teamColor[1] = new Color(230, 40, 20);
			Main.teamColor[2] = new Color(20, 200, 30);
			Main.teamColor[3] = new Color(75, 90, 255);
			Main.teamColor[4] = new Color(200, 180, 0);
			if (Main.menuMode == 1)
			{
				Main.LoadPlayers();
			}
			for (int num23 = 1; num23 < 423; num23++)
			{
				Projectile projectile = new Projectile();
				projectile.SetDefaults(num23);
				if (projectile.hostile)
				{
					Main.projHostile[num23] = true;
				}
			}
			Netplay.Init();
			if (Main.skipMenu)
			{
				WorldGen.clearWorld();
				Main.gameMenu = false;
				Main.LoadPlayers();
				Main.player[Main.myPlayer] = (Player)Main.loadPlayer[0].Clone();
				Main.PlayerPath = Main.loadPlayerPath[0];
				Main.LoadWorlds();
				WorldGen.generateWorld(-1);
				WorldGen.EveryTileFrame();
				Main.player[Main.myPlayer].Spawn();
			}
			else
			{
				IntPtr systemMenu = Main.GetSystemMenu(base.Window.Handle, false);
				int menuItemCount = Main.GetMenuItemCount(systemMenu);
				Main.RemoveMenu(systemMenu, menuItemCount - 1, 1024);
			}
			if (Main.dedServ)
			{
				return;
			}
			Main.clientUUID = Guid.NewGuid().ToString();
			keyBoardInput.newKeyEvent += delegate(char keyStroke)
			{
				if (Main.keyCount < 10)
				{
					Main.keyInt[Main.keyCount] = (int)keyStroke;
					Main.keyString[Main.keyCount] = string.Concat(keyStroke);
					Main.keyCount++;
				}
			};
			base.Initialize();
			base.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();
			this.CheckBunny();
			if (Lang.lang > 1)
			{
				Lang.setLang(true);
			}
			Lang.setLang(false);
			if (Lang.lang == 0)
			{
				Main.menuMode = 1212;
			}
			this.SetTitle();
			this.OpenRecent();
			Star.SpawnStars();
			WorldGen.RandomWeather();
			foreach (DisplayMode current in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
			{
				if (current.Width >= Main.minScreenW && current.Height >= Main.minScreenH && current.Width <= Main.maxScreenW && current.Height <= Main.maxScreenH)
				{
					bool flag = true;
					for (int num24 = 0; num24 < Main.numDisplayModes; num24++)
					{
						if (current.Width == Main.displayWidth[num24] && current.Height == Main.displayHeight[num24])
						{
							flag = false;
							break;
						}
					}
					if (flag)
					{
						Main.displayHeight[Main.numDisplayModes] = current.Height;
						Main.displayWidth[Main.numDisplayModes] = current.Width;
						Main.numDisplayModes++;
					}
				}
			}
			if (Main.autoJoin)
			{
				Main.LoadPlayers();
				Main.menuMode = 1;
				Main.menuMultiplayer = true;
			}
			Main.fpsTimer.Start();
			Main.updateTimer.Start();
		}
コード例 #39
0
ファイル: PuritySpirit.cs プロジェクト: PJB3005/tModLoader
 public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
 {
     OnHit(damage);
 }
コード例 #40
0
ファイル: ModNPC.cs プロジェクト: guyde2011/tModLoader
 public virtual void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit)
 {
 }
コード例 #41
0
ファイル: TShock.cs プロジェクト: InanZen/TShock
        public static bool CheckProjectilePermission(TSPlayer player, int index, int type)
        {
            if (type == 43)
            {
                return true;
            }

            if (type == 17 && !player.Group.HasPermission(Permissions.usebanneditem) && Itembans.ItemIsBanned("Dirt Rod", player))
                //Dirt Rod Projectile
            {
                return true;
            }

            if ((type == 42 || type == 65 || type == 68) && !player.Group.HasPermission(Permissions.usebanneditem) &&
                Itembans.ItemIsBanned("Sandgun", player)) //Sandgun Projectiles
            {
                return true;
            }

            Projectile proj = new Projectile();
            proj.SetDefaults(type);

            if (!player.Group.HasPermission(Permissions.usebanneditem) && Itembans.ItemIsBanned(proj.name, player))
            {
                return true;
            }

            if (Main.projHostile[type])
            {
                //player.SendMessage( proj.name, Color.Yellow);
                return true;
            }

            return false;
        }
コード例 #42
0
 protected void Initialize()
 {
     NPC.clrNames();
     NPC.setNames();
     Main.bgAlpha[0] = 1f;
     Main.bgAlpha2[0] = 1f;
     for (int index = 0; index < 112; ++index)
         Main.projFrames[index] = 1;
     Main.projFrames[72] = 4;
     Main.projFrames[86] = 4;
     Main.projFrames[87] = 4;
     Main.projFrames[102] = 2;
     Main.projFrames[111] = 8;
     Main.pvpBuff[20] = true;
     Main.pvpBuff[24] = true;
     Main.pvpBuff[31] = true;
     Main.pvpBuff[39] = 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;
     for (int index = 0; index < 10; ++index)
     {
         Main.recentWorld[index] = "";
         Main.recentIP[index] = "";
         Main.recentPort[index] = 0;
     }
     if (Main.rand == null)
         Main.rand = new Random((int)DateTime.Now.Ticks);
     if (WorldGen.genRand == null)
         WorldGen.genRand = new Random((int)DateTime.Now.Ticks);
     this.SetTitle();
     Main.lo = Main.rand.Next(6);
     Main.tileShine2[6] = true;
     Main.tileShine2[7] = true;
     Main.tileShine2[8] = true;
     Main.tileShine2[9] = true;
     Main.tileShine2[12] = true;
     Main.tileShine2[21] = 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.tileShine[129] = 300;
     Main.tileHammer[141] = true;
     Main.tileHammer[4] = true;
     Main.tileHammer[10] = true;
     Main.tileHammer[11] = true;
     Main.tileHammer[12] = true;
     Main.tileHammer[13] = true;
     Main.tileHammer[14] = true;
     Main.tileHammer[15] = true;
     Main.tileHammer[16] = true;
     Main.tileHammer[17] = true;
     Main.tileHammer[18] = true;
     Main.tileHammer[19] = true;
     Main.tileHammer[21] = true;
     Main.tileHammer[26] = true;
     Main.tileHammer[28] = true;
     Main.tileHammer[29] = true;
     Main.tileHammer[31] = true;
     Main.tileHammer[33] = true;
     Main.tileHammer[34] = true;
     Main.tileHammer[35] = true;
     Main.tileHammer[36] = true;
     Main.tileHammer[42] = true;
     Main.tileHammer[48] = true;
     Main.tileHammer[49] = true;
     Main.tileHammer[50] = true;
     Main.tileHammer[54] = true;
     Main.tileHammer[55] = true;
     Main.tileHammer[77] = true;
     Main.tileHammer[78] = true;
     Main.tileHammer[79] = true;
     Main.tileHammer[81] = true;
     Main.tileHammer[85] = true;
     Main.tileHammer[86] = true;
     Main.tileHammer[87] = true;
     Main.tileHammer[88] = true;
     Main.tileHammer[89] = true;
     Main.tileHammer[90] = true;
     Main.tileHammer[91] = true;
     Main.tileHammer[92] = true;
     Main.tileHammer[93] = true;
     Main.tileHammer[94] = true;
     Main.tileHammer[95] = true;
     Main.tileHammer[96] = true;
     Main.tileHammer[97] = true;
     Main.tileHammer[98] = true;
     Main.tileHammer[99] = true;
     Main.tileHammer[100] = true;
     Main.tileHammer[101] = true;
     Main.tileHammer[102] = true;
     Main.tileHammer[103] = true;
     Main.tileHammer[104] = true;
     Main.tileHammer[105] = true;
     Main.tileHammer[106] = true;
     Main.tileHammer[114] = true;
     Main.tileHammer[125] = true;
     Main.tileHammer[126] = true;
     Main.tileHammer[128] = true;
     Main.tileHammer[129] = true;
     Main.tileHammer[132] = true;
     Main.tileHammer[133] = true;
     Main.tileHammer[134] = true;
     Main.tileHammer[135] = true;
     Main.tileHammer[136] = true;
     Main.tileFrameImportant[139] = true;
     Main.tileHammer[139] = true;
     Main.tileLighted[149] = true;
     Main.tileFrameImportant[149] = true;
     Main.tileHammer[149] = true;
     Main.tileFrameImportant[142] = true;
     Main.tileHammer[142] = true;
     Main.tileFrameImportant[143] = true;
     Main.tileHammer[143] = true;
     Main.tileFrameImportant[144] = true;
     Main.tileHammer[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[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.tileMergeDirt[147] = true;
     Main.tileBlockLight[148] = true;
     Main.tileSolid[148] = true;
     Main.tileMergeDirt[148] = true;
     Main.tileBlockLight[138] = true;
     Main.tileSolid[138] = true;
     Main.tileBlockLight[140] = true;
     Main.tileSolid[140] = true;
     Main.tileAxe[5] = true;
     Main.tileAxe[30] = true;
     Main.tileAxe[72] = true;
     Main.tileAxe[80] = true;
     Main.tileAxe[124] = true;
     Main.tileShine[22] = 1150;
     Main.tileShine[6] = 1150;
     Main.tileShine[7] = 1100;
     Main.tileShine[8] = 1000;
     Main.tileShine[9] = 1050;
     Main.tileShine[12] = 1000;
     Main.tileShine[21] = 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.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[36] = 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.tileMergeDirt[1] = true;
     Main.tileMergeDirt[6] = true;
     Main.tileMergeDirt[7] = true;
     Main.tileMergeDirt[8] = true;
     Main.tileMergeDirt[9] = 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[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[15] = true;
     Main.tileFrameImportant[16] = true;
     Main.tileFrameImportant[17] = true;
     Main.tileFrameImportant[18] = true;
     Main.tileFrameImportant[20] = true;
     Main.tileFrameImportant[21] = 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[36] = 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[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[141] = 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.tileAlch[82] = true;
     Main.tileAlch[83] = true;
     Main.tileAlch[84] = true;
     Main.tileLavaDeath[104] = true;
     Main.tileLavaDeath[110] = true;
     Main.tileLavaDeath[113] = true;
     Main.tileLavaDeath[115] = true;
     Main.tileSolid[(int)sbyte.MaxValue] = true;
     Main.tileSolid[130] = true;
     Main.tileBlockLight[130] = true;
     Main.tileBlockLight[131] = 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.tileSolid[117] = true;
     Main.tileBlockLight[117] = true;
     Main.tileSolid[123] = true;
     Main.tileBlockLight[123] = 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.tileBlockLight[115] = 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.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.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.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.tileSolid[56] = true;
     Main.tileBlockLight[56] = true;
     Main.tileSolid[57] = true;
     Main.tileBlockLight[57] = true;
     Main.tileSolid[58] = true;
     Main.tileBlockLight[58] = 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[16] = true;
     Main.tileSolidTop[114] = true;
     Main.tileNoAttach[20] = true;
     Main.tileNoAttach[19] = true;
     Main.tileNoAttach[13] = true;
     Main.tileNoAttach[14] = true;
     Main.tileNoAttach[15] = true;
     Main.tileNoAttach[16] = true;
     Main.tileNoAttach[17] = true;
     Main.tileNoAttach[18] = true;
     Main.tileNoAttach[19] = true;
     Main.tileNoAttach[21] = true;
     Main.tileNoAttach[27] = true;
     Main.tileNoAttach[114] = true;
     Main.tileTable[14] = 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.tileLavaDeath[86] = true;
     Main.tileLavaDeath[87] = true;
     Main.tileLavaDeath[88] = true;
     Main.tileLavaDeath[89] = true;
     Main.tileLavaDeath[125] = true;
     Main.tileLavaDeath[126] = true;
     Main.tileLavaDeath[101] = true;
     Main.tileTable[101] = true;
     Main.tileNoAttach[101] = true;
     Main.tileLavaDeath[102] = 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.tileLavaDeath[94] = true;
     Main.tileLavaDeath[95] = true;
     Main.tileLavaDeath[96] = true;
     Main.tileLavaDeath[97] = true;
     Main.tileLavaDeath[98] = true;
     Main.tileLavaDeath[99] = true;
     Main.tileLavaDeath[100] = true;
     Main.tileLavaDeath[103] = 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.tileLavaDeath[91] = true;
     Main.tileNoAttach[92] = true;
     Main.tileLavaDeath[92] = true;
     Main.tileNoAttach[93] = true;
     Main.tileLavaDeath[93] = 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[15] = true;
     Main.tileLavaDeath[16] = true;
     Main.tileLavaDeath[17] = true;
     Main.tileLavaDeath[18] = true;
     Main.tileLavaDeath[19] = true;
     Main.tileLavaDeath[20] = 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[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[106] = 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;
     for (int index = 0; index < 32; ++index)
         Main.wallBlend[index] = index != 20 ? (index != 19 ? (index != 18 ? (index != 17 ? (index != 16 ? index : 2) : 7) : 8) : 9) : 14;
     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;
     for (int index = 0; index < 150; ++index)
     {
         Main.tileName[index] = "";
         if (Main.tileSolid[index])
             Main.tileNoSunLight[index] = true;
     }
     Main.tileNoSunLight[19] = false;
     Main.tileNoSunLight[11] = true;
     for (int index = 0; index < Main.maxMenuItems; ++index)
         this.menuItemScale[index] = 0.8f;
     for (int index = 0; index < 2001; ++index)
         Main.dust[index] = new Dust();
     for (int index = 0; index < 201; ++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 < 201; ++index)
         Main.gore[index] = new Gore();
     for (int index = 0; index < 100; ++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();
     var orilang = Lang.lang;
     Lang.lang = 1;
     for (int Type = 0; Type < 604; ++Type)
     {
         Item obj = new Item();
         obj.SetDefaults(Type, false);
         Main.itemName[Type] = obj.name;
         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;
     }
     Lang.lang = orilang;
     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 < Liquid.resLiquid; ++index)
         Main.liquid[index] = new Liquid();
     for (int index = 0; index < 10000; ++index)
         Main.liquidBuffer[index] = new LiquidBuffer();
     this.shop[0] = new Chest();
     this.shop[1] = new Chest();
     this.shop[1].SetupShop(1);
     this.shop[2] = new Chest();
     this.shop[2].SetupShop(2);
     this.shop[3] = new Chest();
     this.shop[3].SetupShop(3);
     this.shop[4] = new Chest();
     this.shop[4].SetupShop(4);
     this.shop[5] = new Chest();
     this.shop[5].SetupShop(5);
     this.shop[6] = new Chest();
     this.shop[6].SetupShop(6);
     this.shop[7] = new Chest();
     this.shop[7].SetupShop(7);
     this.shop[8] = new Chest();
     this.shop[8].SetupShop(8);
     this.shop[9] = new Chest();
     this.shop[9].SetupShop(9);
     Main.teamColor[0] = Color.White;
     Main.teamColor[1] = new Color(230, 40, 20);
     Main.teamColor[2] = new Color(20, 200, 30);
     Main.teamColor[3] = new Color(75, 90, (int)byte.MaxValue);
     Main.teamColor[4] = new Color(200, 180, 0);
     if (Main.menuMode == 1)
         Main.LoadPlayers();
     for (int Type = 1; Type < 112; ++Type)
     {
         Projectile projectile = new Projectile();
         projectile.SetDefaults(Type);
         if (projectile.hostile)
             Main.projHostile[Type] = true;
     }
     Netplay.Init();
     if (Main.skipMenu)
     {
         WorldGen.clearWorld();
         Main.gameMenu = false;
         Main.LoadPlayers();
         Main.player[Main.myPlayer] = (Player)Main.loadPlayer[0].Clone();
         Main.PlayerPath = Main.loadPlayerPath[0];
         Main.LoadWorlds();
         WorldGen.generateWorld(-1);
         WorldGen.EveryTileFrame();
         Main.player[Main.myPlayer].Spawn();
     }
 }
コード例 #43
0
 protected override void Initialize()
 {
     NPC.clrNames();
     NPC.setNames();
     WorldGen.randomBackgrounds();
     WorldGen.setCaveBacks();
     WorldGen.randMoon();
     Main.bgAlpha[0] = 1f;
     Main.bgAlpha2[0] = 1f;
     this.invBottom = 258;
     for (int i = 0; i < 311; i++)
     {
         Main.projFrames[i] = 1;
     }
     Main.projFrames[308] = 10;
     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[127] = 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.projPet[266] = true;
     Main.tileLighted[237] = true;
     Main.projPet[175] = true;
     Main.projPet[111] = true;
     Main.projPet[112] = true;
     Main.projPet[127] = 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.pvpBuff[20] = true;
     Main.pvpBuff[24] = true;
     Main.pvpBuff[31] = true;
     Main.pvpBuff[39] = true;
     Main.pvpBuff[44] = 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.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.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[65] = true;
     Main.vanityPet[66] = true;
     Main.lightPet[19] = true;
     Main.lightPet[27] = true;
     Main.lightPet[57] = true;
     Main.tileFlame[4] = true;
     Main.tileFlame[33] = true;
     Main.tileFlame[34] = true;
     Main.tileFlame[35] = true;
     Main.tileFlame[36] = true;
     Main.tileFlame[49] = true;
     Main.tileFlame[93] = true;
     Main.tileFlame[98] = true;
     Main.tileFlame[100] = true;
     Main.tileFlame[170] = true;
     Main.tileFlame[171] = true;
     Main.tileFlame[172] = true;
     Main.tileFlame[173] = true;
     Main.tileFlame[174] = true;
     Main.tileRope[213] = true;
     Main.tileRope[214] = true;
     Main.tileSolid[232] = true;
     Main.tileShine[239] = 1100;
     Main.tileSolid[239] = true;
     Main.tileSolidTop[239] = 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.tileSolid[221] = true;
     Main.tileBlockLight[221] = true;
     Main.tileMergeDirt[221] = 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.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.tileBlockLight[248] = true;
     Main.tileBlockLight[249] = true;
     Main.tileBlockLight[250] = true;
     Main.wallHouse[109] = true;
     Main.wallHouse[110] = true;
     Main.wallHouse[111] = true;
     Main.wallHouse[112] = true;
     for (int j = 0; j < 113; j++)
     {
         Main.wallDungeon[j] = false;
     }
     Main.wallLight[0] = true;
     Main.wallLight[21] = true;
     Main.wallLight[106] = true;
     Main.wallLight[107] = true;
     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;
     Main.wallHouse[108] = 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;
     for (int k = 0; k < 10; k++)
     {
         Main.recentWorld[k] = "";
         Main.recentIP[k] = "";
         Main.recentPort[k] = 0;
     }
     if (Main.rand == null)
     {
         Main.rand = new Random((int)DateTime.Now.Ticks);
     }
     if (WorldGen.genRand == null)
     {
         WorldGen.genRand = new Random((int)DateTime.Now.Ticks);
     }
     this.SetTitle();
     Main.lo = Main.rand.Next(6);
     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[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.wallHouse[82] = true;
     Main.wallHouse[77] = 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[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.wallHouse[75] = true;
     Main.wallHouse[76] = true;
     Main.wallHouse[78] = 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.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[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[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.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[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[170] = true;
     Main.tileFrameImportant[171] = true;
     Main.tileFrameImportant[172] = true;
     Main.tileFrameImportant[173] = true;
     Main.tileFrameImportant[174] = true;
     Main.tileLighted[170] = true;
     Main.tileLighted[171] = true;
     Main.tileLighted[172] = 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.tileBlockLight[138] = 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.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[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[36] = 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.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[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[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[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[36] = 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[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[141] = 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.tileAlch[82] = true;
     Main.tileAlch[83] = true;
     Main.tileAlch[84] = true;
     Main.tileLavaDeath[104] = true;
     Main.tileLavaDeath[110] = true;
     Main.tileLavaDeath[113] = true;
     Main.tileLavaDeath[115] = true;
     Main.tileSolid[127] = 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.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.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.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.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[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[15] = true;
     Main.tileNoAttach[16] = true;
     Main.tileNoAttach[134] = true;
     Main.tileNoAttach[17] = true;
     Main.tileNoAttach[18] = true;
     Main.tileNoAttach[19] = true;
     Main.tileNoAttach[21] = true;
     Main.tileNoAttach[27] = true;
     Main.tileNoAttach[114] = true;
     Main.tileTable[14] = 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.tileLavaDeath[86] = true;
     Main.tileLavaDeath[87] = true;
     Main.tileLavaDeath[88] = true;
     Main.tileLavaDeath[89] = true;
     Main.tileLavaDeath[125] = true;
     Main.tileLavaDeath[126] = true;
     Main.tileLavaDeath[101] = true;
     Main.tileTable[101] = true;
     Main.tileNoAttach[101] = true;
     Main.tileLavaDeath[102] = 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.tileLavaDeath[94] = true;
     Main.tileLavaDeath[95] = true;
     Main.tileLavaDeath[96] = true;
     Main.tileLavaDeath[97] = true;
     Main.tileLavaDeath[98] = true;
     Main.tileLavaDeath[99] = true;
     Main.tileLavaDeath[100] = true;
     Main.tileLavaDeath[103] = 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.tileLavaDeath[91] = true;
     Main.tileNoAttach[92] = true;
     Main.tileLavaDeath[92] = true;
     Main.tileNoAttach[93] = true;
     Main.tileLavaDeath[93] = true;
     Main.tileLighted[190] = true;
     Main.tileBlockLight[192] = true;
     Main.tileBrick[192] = false;
     Main.tileWaterDeath[4] = true;
     Main.tileWaterDeath[51] = true;
     Main.tileWaterDeath[93] = true;
     Main.tileWaterDeath[98] = true;
     Main.tileLavaDeath[201] = 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[15] = true;
     Main.tileLavaDeath[16] = true;
     Main.tileLavaDeath[17] = true;
     Main.tileLavaDeath[18] = true;
     Main.tileLavaDeath[19] = true;
     Main.tileLavaDeath[20] = 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[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[106] = true;
     Main.tileLavaDeath[205] = 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;
     for (int l = 0; l < 113; l++)
     {
         if (l == 20)
         {
             Main.wallBlend[l] = 14;
         }
         else
         {
             if (l == 19)
             {
                 Main.wallBlend[l] = 9;
             }
             else
             {
                 if (l == 18)
                 {
                     Main.wallBlend[l] = 8;
                 }
                 else
                 {
                     if (l == 17)
                     {
                         Main.wallBlend[l] = 7;
                     }
                     else
                     {
                         if (l == 16 || l == 59)
                         {
                             Main.wallBlend[l] = 2;
                         }
                         else
                         {
                             if (l == 1 || (l >= 48 && l <= 53))
                             {
                                 Main.wallBlend[l] = 1;
                             }
                             else
                             {
                                 Main.wallBlend[l] = l;
                             }
                         }
                     }
                 }
             }
         }
     }
     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;
     for (int m = 0; m < 251; m++)
     {
         Main.tileName[m] = "";
         if (Main.tileSolid[m])
         {
             Main.tileNoSunLight[m] = true;
         }
         Main.tileFrame[m] = 0;
         Main.tileFrameCounter[m] = 0;
     }
     Main.tileNoSunLight[19] = false;
     Main.tileNoSunLight[11] = true;
     Main.tileNoSunLight[189] = false;
     Main.tileNoSunLight[196] = false;
     for (int n = 0; n < Main.maxMenuItems; n++)
     {
         this.menuItemScale[n] = 0.8f;
     }
     for (int num = 0; num < 6001; num++)
     {
         Main.dust[num] = new Dust();
     }
     for (int num2 = 0; num2 < 401; num2++)
     {
         Main.item[num2] = new Item();
     }
     for (int num3 = 0; num3 < 201; num3++)
     {
         Main.npc[num3] = new NPC();
         Main.npc[num3].whoAmI = num3;
     }
     for (int num4 = 0; num4 < 256; num4++)
     {
         Main.player[num4] = new Player();
     }
     for (int num5 = 0; num5 < 1001; num5++)
     {
         Main.projectile[num5] = new Projectile();
     }
     for (int num6 = 0; num6 < 501; num6++)
     {
         Main.gore[num6] = new Gore();
     }
     for (int num7 = 0; num7 < Main.maxRain + 1; num7++)
     {
         Main.rain[num7] = new Rain();
     }
     for (int num8 = 0; num8 < 200; num8++)
     {
         Main.cloud[num8] = new Cloud();
     }
     for (int num9 = 0; num9 < 100; num9++)
     {
         Main.combatText[num9] = new CombatText();
     }
     for (int num10 = 0; num10 < 20; num10++)
     {
         Main.itemText[num10] = new ItemText();
     }
     for (int num11 = 0; num11 < 1725; num11++)
     {
         Item item = new Item();
         item.SetDefaults(num11, false);
         Main.itemName[num11] = item.name;
         if (item.headSlot > 0)
         {
             Item.headType[item.headSlot] = item.type;
         }
         if (item.bodySlot > 0)
         {
             Item.bodyType[item.bodySlot] = item.type;
         }
         if (item.legSlot > 0)
         {
             Item.legType[item.legSlot] = item.type;
         }
     }
     for (int num12 = 0; num12 < Recipe.maxRecipes; num12++)
     {
         Main.recipe[num12] = new Recipe();
         Main.availableRecipeY[num12] = (float)(65 * num12);
     }
     Recipe.SetupRecipes();
     for (int num13 = 0; num13 < Main.numChatLines; num13++)
     {
         Main.chatLine[num13] = new ChatLine();
     }
     for (int num14 = 0; num14 < Liquid.resLiquid; num14++)
     {
         Main.liquid[num14] = new Liquid();
     }
     for (int num15 = 0; num15 < 10000; num15++)
     {
         Main.liquidBuffer[num15] = new LiquidBuffer();
     }
     this.shop[0] = new Chest();
     for (int num16 = 1; num16 < Main.numShops; num16++)
     {
         this.shop[num16] = new Chest();
         this.shop[num16].SetupShop(num16);
     }
     Main.teamColor[0] = Color.White;
     Main.teamColor[1] = new Color(230, 40, 20);
     Main.teamColor[2] = new Color(20, 200, 30);
     Main.teamColor[3] = new Color(75, 90, 255);
     Main.teamColor[4] = new Color(200, 180, 0);
     if (Main.menuMode == 1)
     {
         Main.LoadPlayers();
     }
     for (int num17 = 1; num17 < 311; num17++)
     {
         Projectile projectile = new Projectile();
         projectile.SetDefaults(num17);
         if (projectile.hostile)
         {
             Main.projHostile[num17] = true;
         }
     }
     Netplay.Init();
     if (Main.skipMenu)
     {
         WorldGen.clearWorld();
         Main.gameMenu = false;
         Main.LoadPlayers();
         Main.player[Main.myPlayer] = (Player)Main.loadPlayer[0].Clone();
         Main.PlayerPath = Main.loadPlayerPath[0];
         Main.LoadWorlds();
         WorldGen.generateWorld(-1);
         WorldGen.EveryTileFrame();
         Main.player[Main.myPlayer].Spawn();
     }
     else
     {
         IntPtr systemMenu = Main.GetSystemMenu(base.Window.Handle, false);
         int menuItemCount = Main.GetMenuItemCount(systemMenu);
         Main.RemoveMenu(systemMenu, menuItemCount - 1, 1024);
     }
     if (Main.dedServ)
     {
         return;
     }
     Main.clientUUID = Guid.NewGuid().ToString();
     if (Main.CachedAnonymousMethodDelegate1 == null)
     {
         Main.CachedAnonymousMethodDelegate1 = new Action<char>(Main.b__0);
     }
     keyBoardInput.newKeyEvent += Main.CachedAnonymousMethodDelegate1;
     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;
     }
     this.graphics.PreferredBackBufferWidth = Main.screenWidth;
     this.graphics.PreferredBackBufferHeight = Main.screenHeight;
     this.graphics.ApplyChanges();
     base.Initialize();
     base.Window.AllowUserResizing = true;
     this.OpenSettings();
     this.CheckBunny();
     if (Lang.lang > 1)
     {
         Lang.setLang(true);
     }
     Lang.setLang(false);
     if (Lang.lang == 0)
     {
         Main.menuMode = 1212;
     }
     this.SetTitle();
     this.OpenRecent();
     Star.SpawnStars();
     WorldGen.RandomWeather();
     foreach (DisplayMode current in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
     {
         if (current.Width >= Main.minScreenW && current.Height >= Main.minScreenH && current.Width <= Main.maxScreenW && current.Height <= Main.maxScreenH)
         {
             bool flag = true;
             for (int num18 = 0; num18 < this.numDisplayModes; num18++)
             {
                 if (current.Width == this.displayWidth[num18] && current.Height == this.displayHeight[num18])
                 {
                     flag = false;
                     break;
                 }
             }
             if (flag)
             {
                 this.displayHeight[this.numDisplayModes] = current.Height;
                 this.displayWidth[this.numDisplayModes] = current.Width;
                 this.numDisplayModes++;
             }
         }
     }
     if (Main.autoJoin)
     {
         Main.LoadPlayers();
         Main.menuMode = 1;
         Main.menuMultiplayer = true;
     }
     Main.fpsTimer.Start();
     Main.updateTimer.Start();
 }
コード例 #44
0
ファイル: PuritySpirit.cs プロジェクト: PJB3005/tModLoader
 public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit)
 {
     ModifyHit(ref damage);
 }
コード例 #45
0
 public virtual void Kill(Terraria.Projectile projectile, int timeLeft)
 {
     projectile.CloneDefaults(ProjectileID.Shuriken);
 }
コード例 #46
0
 public void Apply(Projectile projectile)
 {
     //                if (Owner < 255)
     //                    projectile.Creator = Main.player[Owner];
     projectile.identity = Id;
     projectile.owner = Owner;
     projectile.damage = Damage;
     projectile.knockBack = Knockback;
     //                projectile.position = new Vector2(X, Y);
     //                projectile.velocity = new Vector2(VX, VY);
     projectile.ai = AI;
 }
コード例 #47
0
 public override void ModifyHitNPCWithProj(Terraria.Player player, SkillData rawdata, Terraria.Projectile proj, Terraria.NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 {
     if (proj.minion || proj.type == 376 || proj.type == 378 || proj.type == 379 || proj.type == 389 || proj.type == 408 || proj.type == 614)
     {
         SummonPotenceSkillData data = (SummonPotenceSkillData)rawdata;
         int CriticalRate            = data.Level + data.LoggedCriticalBonus;
         if (data.Level > 5)
         {
             CriticalRate += 5;
         }
         if (Terraria.Main.rand.Next(100) < CriticalRate)
         {
             //damage *= 2;
             crit = true;
         }
     }
 }