From f9e809ee926517cf6a6d7abd2c0a0f6d0dd12cc5 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Mon, 20 Jul 2020 13:45:02 -0500 Subject: [PATCH 01/71] Fixes, progression shuffling, and structures --- Items/CalamityGlobalItem.cs | 5 +- Items/Weapons/DraedonsArsenal/GatlingLaser.cs | 15 +- Items/Weapons/DraedonsArsenal/GaussDagger.cs | 64 ++ Items/Weapons/DraedonsArsenal/GaussDagger.png | Bin 0 -> 500 bytes Items/Weapons/DraedonsArsenal/GaussPistol.cs | 15 +- Items/Weapons/DraedonsArsenal/GaussRifle.cs | 12 +- .../DraedonsArsenal/HydraulicVoltCrasher.cs | 12 +- Items/Weapons/DraedonsArsenal/LaserRifle.cs | 13 +- .../Weapons/DraedonsArsenal/MountedScanner.cs | 10 +- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 30 +- .../Weapons/DraedonsArsenal/PlasmaGrenade.cs | 18 +- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 18 +- Items/Weapons/DraedonsArsenal/PulsePistol.cs | 1 + .../DraedonsArsenal/PulseTurretRemote.cs | 12 +- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 16 +- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 3 + Projectiles/DraedonsArsenal/GaussFlux.cs | 81 ++ Projectiles/DraedonsArsenal/GaussFlux.png | Bin 0 -> 121 bytes .../HydraulicVoltCrasherProjectile.cs | 2 +- .../PlasmaGrenadeProjectile.cs | 6 +- .../DraedonsArsenal/SnakeEyesSummon.cs | 6 +- .../ResearchFacility2Schematic.cs | 541 +++++++++++++ .../ResearchFacility2Schematic.png | Bin 0 -> 2502 bytes .../Workshop2Schematic.cs | 741 ++++++++++++++++++ .../Workshop2Schematic.png | Bin 0 -> 2037 bytes Schematics/SchematicLoader.cs | 4 +- Schematics/TileDefinitionStructure.cs | 5 + Schematics/TilePlacementHelpers.cs | 23 +- TileEntities/TEDraedonFuelFactory.cs | 3 +- TileEntities/TEDraedonItemCharger.cs | 2 +- Tiles/DraedonItemCharger.cs | 4 + Tiles/InactiveDraedonFuelFactory.cs | 50 ++ Tiles/InactiveDraedonFuelFactory.png | Bin 0 -> 929 bytes World/CalamityWorld.cs | 15 +- World/DraedonStructures.cs | 12 +- 36 files changed, 1631 insertions(+), 110 deletions(-) create mode 100644 Items/Weapons/DraedonsArsenal/GaussDagger.cs create mode 100644 Items/Weapons/DraedonsArsenal/GaussDagger.png create mode 100644 Projectiles/DraedonsArsenal/GaussFlux.cs create mode 100644 Projectiles/DraedonsArsenal/GaussFlux.png create mode 100644 Schematics/AutoGeneratedContent/ResearchFacility2Schematic.cs create mode 100644 Schematics/AutoGeneratedContent/ResearchFacility2Schematic.png create mode 100644 Schematics/AutoGeneratedContent/Workshop2Schematic.cs create mode 100644 Schematics/AutoGeneratedContent/Workshop2Schematic.png create mode 100644 Tiles/InactiveDraedonFuelFactory.cs create mode 100644 Tiles/InactiveDraedonFuelFactory.png diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index d9d3805a90..c946d8e742 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -61,9 +61,9 @@ namespace CalamityMod.Items public int timesUsed = 0; // The damage modifications for the item are handled in player files. - public int CurrentCharge = ChargeMax; + public int CurrentCharge; public bool Chargeable = false; - public const int ChargeMax = 150; + public int ChargeMax; public const float ChargeDamageMinMultiplier = 0.75f; public const float ChargeDamageReductionThreshold = 0.75f; @@ -99,6 +99,7 @@ namespace CalamityMod.Items #region SetDefaults public override void SetDefaults(Item item) { + item.Calamity().ChargeMax = ChargeMax; if (customRarity.IsPostML() && item.rare != 10) item.rare = 10; diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index a866d3301b..83ad263184 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -10,8 +10,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class GatlingLaser : ModItem { - private int BaseDamage = 430; - public override void SetStaticDefaults() { DisplayName.SetDefault("Gatling Laser"); @@ -24,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 58; item.height = 24; item.magic = true; - item.damage = BaseDamage; + item.damage = 81; item.knockBack = 1f; item.useTime = 2; item.useAnimation = 2; @@ -36,14 +34,14 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/GatlingLaserFireStart"); item.noMelee = true; - item.value = Item.buyPrice(1, 80, 0, 0); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.value = CalamityGlobalItem.Rarity8BuyPrice; + item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 135; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; @@ -70,9 +68,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.LaserMachinegun); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.cs b/Items/Weapons/DraedonsArsenal/GaussDagger.cs new file mode 100644 index 0000000000..87130e9935 --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/GaussDagger.cs @@ -0,0 +1,64 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + public class GaussDagger : ModItem + { + public const int HitsRequiredForFlux = 3; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gauss Dagger"); + Tooltip.SetDefault("Hitting enemies in rapid succession causes them to become enveloped in a magnetic flux"); + } + public override void SetDefaults() + { + item.damage = 30; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.SwingThrow; + item.useTurn = false; + item.knockBack = 7f; + + item.value = CalamityGlobalItem.Rarity3BuyPrice; + item.rare = 3; + + item.UseSound = SoundID.Item1; + item.autoReuse = true; + + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 50; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + target.Calamity().GaussFluxTimer += 50; + if (target.Calamity().GaussFluxTimer >= 30 * HitsRequiredForFlux) + { + target.Calamity().GaussFluxTimer = 0; + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI, 0f, target.whoAmI); + } + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 7); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.png b/Items/Weapons/DraedonsArsenal/GaussDagger.png new file mode 100644 index 0000000000000000000000000000000000000000..77ac1dfc11d0a1efa08cc5c9622eb5f98f550910 GIT binary patch literal 500 zcmVPx$u1Q2eR7i=<)<0_#aU93-*NGYI(pIyy@gK2KRJx1A77BucLs4<>A}$U-5(hV* zfFKACK7v}LJ^-s?4ON>4N{YJFAwwLJZ=1U`7Hi4%vmC$Q-S6(+_x|4ZE^$aH6bhhH zo&uk1tL@(X#}4a4`z86`6AU7G{NNFI^6V*wNOb(53xlLIF^PVXY>pmL5JZZnilE-u zXv5vx^M75RU)5#rJQ4)Wt!C=|2$Gp<6|B|1Vz=5(Pm~glh@;e}eu3inD7ZI&2mNlQ$`=w?t$jgGj@o-25CoAcl?wKE z6C|xx3wc&uwyI{U)8OaINAUdJ3V67%02Y^)z{}UK(C;RaA5lE}7mI7){!C|l^I|D= zTvXZF$up_>teZ&wondZz927g79XGdT=fJm(@7Q${JuNyxHp3?xA012J&GOqeT)uQw zcbr-fL|HdMl64aqYOhOmgdq9w={*=ZF_OT^v5u_uMt#o?qWf*jooL5Vbm?#sB-_8Y q^==*TUobyMz55va%>Ok*Bl-i${F6=9iY1Z&0000(); item.shootSpeed = 14f; + item.Calamity().ChargeMax = 85; item.Calamity().Chargeable = true; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddTile(TileID.Anvils); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/GaussRifle.cs b/Items/Weapons/DraedonsArsenal/GaussRifle.cs index 7f28c794fc..2dab43881a 100644 --- a/Items/Weapons/DraedonsArsenal/GaussRifle.cs +++ b/Items/Weapons/DraedonsArsenal/GaussRifle.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; -using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -21,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 112; item.height = 36; item.ranged = true; - item.damage = 8000; + item.damage = 170; item.knockBack = 30f; item.useTime = item.useAnimation = 28; item.autoReuse = true; @@ -30,9 +29,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/GaussWeaponFire"); item.noMelee = true; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = ItemRarityID.Red; - item.Calamity().customRarity = CalamityRarity.RareVariant; // In accordance with the other post-ML Arsenal weapons that Fabsol made. + item.value = CalamityGlobalItem.Rarity8BuyPrice; + item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 27f; @@ -51,9 +49,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ItemID.LaserRifle); - recipe.AddTile(ModContent.TileType()); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index 91151c2253..5d3679aec1 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -25,16 +25,18 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.damage = 99; item.hammer = 230; item.UseSound = SoundID.Item23; + item.shoot = ModContent.ProjectileType(); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; - item.value = CalamityGlobalItem.Rarity10BuyPrice; + item.rare = 5; + item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.noMelee = true; item.noUseGraphic = true; item.melee = true; item.channel = true; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 85; } public override void AddRecipes() @@ -42,8 +44,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/LaserRifle.cs b/Items/Weapons/DraedonsArsenal/LaserRifle.cs index d2c508ab4c..1124876ffb 100644 --- a/Items/Weapons/DraedonsArsenal/LaserRifle.cs +++ b/Items/Weapons/DraedonsArsenal/LaserRifle.cs @@ -9,8 +9,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class LaserRifle : ModItem { - private int BaseDamage = 200; - public override void SetStaticDefaults() { DisplayName.SetDefault("Heavy Laser Rifle"); @@ -23,7 +21,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 84; item.height = 28; item.ranged = true; - item.damage = BaseDamage; + item.damage = 270; item.knockBack = 4f; item.useTime = 25; item.useAnimation = 25; @@ -33,14 +31,15 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserRifleFire"); item.noMelee = true; - item.value = CalamityGlobalItem.Rarity10BuyPrice; + item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 190; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -74,13 +73,13 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal return new Vector2(-20, 0); } - public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.LunarBar, 5); recipe.AddIngredient(ItemID.LaserRifle); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index 58b9821f26..ef04cf10ab 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 26; item.height = 26; item.summon = true; - item.damage = 15; + item.damage = 19; item.knockBack = 2f; item.useTime = item.useAnimation = 35; item.autoReuse = true; @@ -29,8 +29,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item15; item.noMelee = true; - item.value = CalamityGlobalItem.Rarity4BuyPrice; - item.rare = 4; + item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; @@ -78,9 +78,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); + recipe.AddIngredient(ItemID.HallowedBar, 5); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 93e909c1cd..551778bcd2 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -1,3 +1,4 @@ +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; using Microsoft.Xna.Framework; using Terraria; @@ -8,8 +9,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class PlasmaCaster : ModItem { - private int BaseDamage = 2800; - public override void SetStaticDefaults() { DisplayName.SetDefault("Plasma Caster"); @@ -23,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 62; item.height = 30; item.magic = true; - item.damage = BaseDamage; + item.damage = 1100; item.knockBack = 7f; item.useTime = 45; item.useAnimation = 45; @@ -33,14 +32,15 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaCasterFire"); item.noMelee = true; - item.value = Item.buyPrice(1, 80, 0, 0); + item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 190; } public override bool AltFunctionUse(Player player) @@ -105,16 +105,16 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal return new Vector2(-10, 0); } - /*public override void AddRecipes() + public override void AddRecipes() { - ModRecipe r = new ModRecipe(mod); - r.AddIngredient(null, "CrownJewel"); - r.AddIngredient(null, "GalacticaSingularity", 5); - r.AddIngredient(null, "BarofLife", 10); - r.AddIngredient(null, "CosmiliteBar", 15); - r.AddTile(TileID.LunarCraftingStation); - r.SetResult(this); - r.AddRecipe(); - }*/ + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } } } diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index 77c4d48f1b..5df934b1e7 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -21,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { item.width = 22; item.height = 28; - item.damage = 50; + item.damage = 5000; item.noMelee = true; item.noUseGraphic = true; item.consumable = true; @@ -31,10 +32,13 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.knockBack = 3f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = CalamityGlobalItem.Rarity5BuyPrice; - item.rare = 5; + + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 10f; + item.shootSpeed = 19f; item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -49,9 +53,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ModContent.ItemType(), 1); - recipe.AddIngredient(ItemID.HallowedBar, 2); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this, 200); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this, 800); recipe.AddRecipe(); } } diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 6e7b579249..18de89b972 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -12,13 +13,13 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Pole Warper"); - Tooltip.SetDefault("Summons two floating magnets which repel each other"); + Tooltip.SetDefault("Summons two floating magnets that repel each other"); } public override void SetDefaults() { item.shootSpeed = 10f; - item.damage = 33; + item.damage = 700; item.mana = 12; item.width = 38; item.height = 24; @@ -26,8 +27,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 8f; - item.value = CalamityGlobalItem.Rarity4BuyPrice; - item.rare = 4; + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + item.UseSound = SoundID.Item15; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); @@ -73,10 +77,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 6); recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddTile(TileID.Anvils); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index d6d5d93ca9..1baec0fcff 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.shootSpeed = 5.2f; // Keep in mind that the shot has extra updates. item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 50; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 15767f3f01..c651736a51 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 28; item.height = 26; item.sentry = true; - item.damage = 21; + item.damage = 100; item.knockBack = 0f; item.useTime = item.useAnimation = 35; item.autoReuse = true; @@ -28,8 +28,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item15; item.noMelee = true; - item.value = CalamityGlobalItem.Rarity4BuyPrice; - item.rare = 4; + item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; @@ -64,10 +64,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddTile(TileID.Anvils); + recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 878d9da33a..647e28108a 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetDefaults() { item.shootSpeed = 10f; - item.damage = 11; + item.damage = 211; item.mana = 12; item.width = 38; item.height = 24; @@ -26,8 +26,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 3f; - item.value = CalamityGlobalItem.Rarity3BuyPrice; - item.rare = ItemRarityID.Orange; + item.value = CalamityGlobalItem.Rarity10BuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.UseSound = SoundID.Item15; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); @@ -44,10 +45,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddTile(TileID.Anvils); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index 0ec1167cba..754b30ae5a 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/TeslaCannonFire"); item.noMelee = true; - item.value = Item.buyPrice(1, 80, 0, 0); + item.value = CalamityGlobalItem.RarityVioletBuyPrice; item.rare = 10; item.Calamity().customRarity = CalamityRarity.RareVariant; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5da258093e..242a91b100 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -147,6 +147,7 @@ namespace CalamityMod.NPCs public int kamiFlu = 0; public int relicOfResilienceCooldown = 0; public int relicOfResilienceWeakness = 0; + public int GaussFluxTimer = 0; // whoAmI Variables public static int[] bobbitWormBottom = new int[5]; @@ -3194,6 +3195,8 @@ namespace CalamityMod.NPCs relicOfResilienceCooldown--; if (relicOfResilienceWeakness > 0) relicOfResilienceWeakness--; + if (GaussFluxTimer > 0) + GaussFluxTimer--; if (ladHearts > 0) ladHearts--; diff --git a/Projectiles/DraedonsArsenal/GaussFlux.cs b/Projectiles/DraedonsArsenal/GaussFlux.cs new file mode 100644 index 0000000000..1b900c0ad2 --- /dev/null +++ b/Projectiles/DraedonsArsenal/GaussFlux.cs @@ -0,0 +1,81 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class GaussFlux : ModProjectile + { + public float Time + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + public NPC Target + { + get => Main.npc[(int)projectile.ai[1]]; + set => projectile.ai[1] = value.whoAmI; + } + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Voltage Stream"); + } + + public override void SetDefaults() + { + projectile.width = 16; + projectile.height = 16; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = -1; + projectile.timeLeft = 180; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 14; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, Color.Lime.ToVector3()); + if (!Target.active) + { + projectile.Kill(); + return; + } + projectile.Center = Target.Center; + if (!Main.dedServ) + { + if (Time == 0) + { + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(Target.Center, 261); + dust.color = Utils.SelectRandom(Main.rand, Color.Yellow, Color.YellowGreen); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2f; + dust.noGravity = true; + } + } + for (int i = 0; i < 7; i++) + { + for (int arcIndex = 0; arcIndex < 6; arcIndex++) + { + float offsetAngle = MathHelper.ToRadians(1080f) * i / 18f; + offsetAngle += Time / 10f; + float scale = 1.4f + (float)Math.Cos(i / 7f * MathHelper.TwoPi + Time / 30f) * 0.3f; + scale *= MathHelper.Lerp(1f, 0.4f, arcIndex / 6f); + Vector2 offset = Target.Size.RotatedBy(offsetAngle) * 0.5f; + offset += (arcIndex * MathHelper.TwoPi / 6f + Time / 20f).ToRotationVector2() * 6f * arcIndex; + + Dust dust = Dust.NewDustPerfect(Target.Center + offset, 261); + dust.color = Utils.SelectRandom(Main.rand, Color.Yellow, Color.YellowGreen); + dust.velocity = Vector2.Zero; + dust.scale = scale; + dust.noGravity = true; + } + } + } + Time++; + } + } +} diff --git a/Projectiles/DraedonsArsenal/GaussFlux.png b/Projectiles/DraedonsArsenal/GaussFlux.png new file mode 100644 index 0000000000000000000000000000000000000000..272321a620cf6b1310244d77589d5133f8347268 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sEXgD|57Yp@DXkk8Y_F+?LcS%TH!zyY8E91M&HSvG?VXYh3O Kb6Mw<&;$UBkr`Y7 literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index 995b73e73a..76cbc7d798 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), - projectile.damage, + (int)(projectile.damage * 0.35), 0f, projectile.owner, 0f, diff --git a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs index e2a3bdc19b..8c94557769 100644 --- a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs @@ -73,7 +73,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } else { - CalamityGlobalProjectile.ExpandHitboxBy(projectile, 240); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 360); + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; projectile.Damage(); if (!Main.dedServ) { @@ -82,7 +84,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal int type = Main.rand.NextBool(3) ? 261 : (int)CalamityDusts.SulfurousSeaAcid; Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), type); dust.scale = Main.rand.NextFloat(1.3f, 1.5f); - dust.velocity = Main.rand.NextVector2CircularEdge(10f, 10f); + dust.velocity = Main.rand.NextVector2CircularEdge(15f, 15f); dust.noGravity = true; if (type == 261) { diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index 266d1cfa96..ff6bb1d8e6 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal offsetMultiplier = new Vector2(1f, -1f); break; } - if (Time % 30f == 0f) + if (Time % 20f == 0f) { if (projectile.ai[1] > 0 && Main.myPlayer == projectile.owner) { @@ -206,8 +206,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal else { EyeOutwardness = MathHelper.Lerp(EyeOutwardness, 1f, 0.15f); - EyeRotation = EyeRotation.AngleTowards(projectile.AngleTo(npc.Center), MathHelper.TwoPi / 30f); - projectile.Center = Vector2.SmoothStep(OldCenter, npc.Center + (new Vector2(300f) + projectile.Size * 0.5f) * offsetMultiplier, Time % 30f / 30f); + EyeRotation = EyeRotation.AngleTowards(projectile.AngleTo(npc.Center), MathHelper.TwoPi / 20f); + projectile.Center = Vector2.SmoothStep(OldCenter, npc.Center + (new Vector2(300f) + projectile.Size * 0.5f) * offsetMultiplier, Time % 20f / 20f); } } public void GenerateAfterimageDust() diff --git a/Schematics/AutoGeneratedContent/ResearchFacility2Schematic.cs b/Schematics/AutoGeneratedContent/ResearchFacility2Schematic.cs new file mode 100644 index 0000000000..ab3c5f807e --- /dev/null +++ b/Schematics/AutoGeneratedContent/ResearchFacility2Schematic.cs @@ -0,0 +1,541 @@ +using CalamityMod.Tiles; +using Microsoft.Xna.Framework; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Tiles.DraedonStructures; +using CalamityMod.Walls.DraedonStructures; + +namespace CalamityMod.Schematics.AutoGeneratedContent +{ + public class ResearchFacility2Schematic + { + [GeneratedCode("ScreenCaptureToSchematic", "1.0.2")] + public static ColorTileMap GetMap() + { + var tile1 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 0, 0); + var tile2 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 8224).UseFrame(36, 54); + var tile3 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(0, 18); + var tile4 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32); + var tile5 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 16416).UseFrame(0, 72); + var tile6 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 8224).UseFrame(36, 54); + var tile7 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(0, 18); + var tile8 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 16416).UseFrame(36, 72); + var tile9 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(306, 72); + var tile10 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 3, 32).UseFrame(72, 18).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile11 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile12 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 80, 1, 32).UseFrame(72, 18).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile13 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 4, 32).UseFrame(72, 18).UseWall((ushort)ModContent.WallType(), 72, 144); + var tile14 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(54, 72); + var tile15 = new TileDefinitionStructure(TileID.ClosedDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 756); + var tile16 = new TileDefinitionStructure(TileID.ClosedDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 774); + var tile17 = new TileDefinitionStructure(TileID.ClosedDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 792); + var tile18 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 0); + var tile19 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 18); + var tile20 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 36); + var tile21 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 8224).UseFrame(0, 54); + var tile22 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(306, 72); + var tile23 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 148, 3, 12320).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile24 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile25 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile26 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 74, 1, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile27 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile28 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 64, 1, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile29 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 64, 1, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile30 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 0, 0).UseWall((ushort)WallID.SapphireGemspark, 0, 0); + var tile31 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 103, 3, 32).UseFrame(54, 0).UseWall((ushort)WallID.SapphireGemspark, 252, 108); + var tile32 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 18); + var tile33 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 36); + var tile34 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(306, 72); + var tile35 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 2, 0).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile36 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile37 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 2, 0).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile38 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)WallID.SapphireGemspark, 72, 72); + var tile39 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 8224).UseFrame(72, 54); + var tile40 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 3, 12320).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile41 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile42 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile43 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 139, 2, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile44 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 1, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile45 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 139, 2, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile46 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile47 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 75, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile48 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 66, 2, 32).UseFrame(36, 18).UseWall((ushort)WallID.SapphireGemspark, 72, 72); + var tile49 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 0); + var tile50 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 36); + var tile51 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(270, 72); + var tile52 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 36); + var tile53 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile54 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 1, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile55 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile56 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile57 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 1, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile58 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 2, 32).UseFrame(54, 18).UseWall((ushort)WallID.SapphireGemspark, 108, 72); + var tile59 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 0); + var tile60 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 0); + var tile61 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(252, 54); + var tile62 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 3, 12320).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile63 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile64 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile65 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 3, 12320).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile66 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile67 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 139, 2, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile68 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile69 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile70 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile71 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile72 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile73 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile74 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile75 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 36); + var tile76 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile77 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile78 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile79 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 74, 1, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile80 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 138, 2, 32).UseFrame(0, 216).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile81 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 131, 1, 32).UseFrame(0, 234).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile82 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 1, 2, 32).UseFrame(0, 252).UseWall((ushort)WallID.SapphireGemspark, 36, 72); + var tile83 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(90, 54); + var tile84 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 0); + var tile85 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile86 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile87 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile88 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)WallID.SapphireGemspark, 252, 72); + var tile89 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 64, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile90 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 4, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 0, 144); + var tile91 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 3, 12320).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 0, 108); + var tile92 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 1, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile93 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile94 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile95 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile96 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile97 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile98 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile99 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile100 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile101 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 74, 1, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile102 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile103 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile104 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile105 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile106 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 74, 1, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile107 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile108 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(270, 72); + var tile109 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile110 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile111 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile112 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile113 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile114 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(18, 54).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile115 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 0); + var tile116 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 3, 12320).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile117 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 75, 1, 0).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile118 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile119 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile120 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)WallID.SapphireGemspark, 36, 36); + var tile121 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 1, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile122 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile123 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(144, 72); + var tile124 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile125 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)WallID.SapphireGemspark, 108, 36); + var tile126 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile127 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile128 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(108, 72); + var tile129 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 0, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile130 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile131 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile132 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile133 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile134 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 139, 2, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile135 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile136 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile137 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 131, 1, 32).UseWall((ushort)WallID.SapphireGemspark, 108, 36); + var tile138 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 136, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile139 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 66, 2, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile140 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(126, 72); + var tile141 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 3, 12320).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile142 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile143 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile144 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile145 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile146 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 131, 1, 32).UseFrame(18, 0).UseWall((ushort)WallID.SapphireGemspark, 108, 36); + var tile147 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 74, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile148 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 66, 2, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile149 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(216, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile150 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile151 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile152 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 6, 2, 32).UseFrame(36, 0).UseWall((ushort)WallID.SapphireGemspark, 216, 72); + var tile153 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 131, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile154 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 131, 2, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile155 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile156 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile157 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile158 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile159 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile160 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 138, 2, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile161 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 36); + var tile162 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile163 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile164 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile165 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile166 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 136, 2, 32).UseFrame(36, 0).UseWall((ushort)WallID.SapphireGemspark, 288, 72); + var tile167 = new TileDefinitionStructure(TileID.Extractinator).UseHeaders(0, 66, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile168 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile169 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile170 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile171 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 75, 1, 0).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile172 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)WallID.SapphireGemspark, 72, 36); + var tile173 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile174 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 1, 1, 32).UseWall((ushort)WallID.SapphireGemspark, 36, 36); + var tile175 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 74, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile176 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 131, 2, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile177 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile178 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 136, 2, 32).UseFrame(18, 0).UseWall((ushort)WallID.SapphireGemspark, 288, 72); + var tile179 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 66, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile180 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 131, 2, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile181 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(234, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile182 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile183 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 66, 1, 32).UseFrame(36, 0).UseWall((ushort)WallID.SapphireGemspark, 72, 36); + var tile184 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 6, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile185 = new TileDefinitionStructure(TileID.GlassKiln).UseHeaders(0, 66, 2, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile186 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 4128).UseFrame(18, 54); + var tile187 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(288, 72); + var tile188 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 3, 16416).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile189 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile190 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile191 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile192 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile193 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile194 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile195 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(270, 54); + var tile196 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 3, 16416).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile197 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)WallID.SapphireGemspark, 216, 72); + var tile198 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile199 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 4128).UseFrame(90, 54); + var tile200 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(252, 72); + var tile201 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile202 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile203 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile204 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 2, 32).UseFrame(72, 54).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile205 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile206 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile207 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile208 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 67, 3, 16416).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile209 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile210 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile211 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 4, 0, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile212 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 165, 4, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 180, 144); + var tile213 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile214 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile215 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 74, 1, 32).UseFrame(0, 216).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile216 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 1, 2, 32).UseFrame(0, 252).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile217 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(0, 54); + var tile218 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(288, 72); + var tile219 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 133, 3, 16416).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 180, 108); + var tile220 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 2, 0).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile221 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile222 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile223 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 165, 3, 16416).UseFrame(72, 72).UseWall((ushort)ModContent.WallType(), 180, 108); + var tile224 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 18); + var tile225 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 4128).UseFrame(54, 54); + var tile226 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(252, 72); + var tile227 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 131, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile228 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 1, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile229 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile230 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 138, 2, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile231 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile232 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 2, 32).UseFrame(36, 18).UseWall((ushort)WallID.SapphireGemspark, 108, 72); + var tile233 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 72); + var tile234 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 3, 16416).UseFrame(72, 72).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile235 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 71, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile236 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 131, 1, 32).UseFrame(54, 18).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile237 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 1, 2, 32).UseFrame(54, 18).UseWall((ushort)WallID.SapphireGemspark, 36, 72); + var tile238 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 83, 3, 16416).UseFrame(36, 72).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile239 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)WallID.SapphireGemspark, 36, 72); + var tile240 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 68, 1, 0).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile241 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 2, 0).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile242 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 4, 0, 0).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile243 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 2, 0).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile244 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 4, 0, 0).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile245 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 67, 4, 0).UseWall((ushort)WallID.SapphireGemspark, 108, 144); + var tile246 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(0, 36); + var tile247 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(72, 72); + var tile248 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 756); + var tile249 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 774); + var tile250 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(0, 792); + var tile251 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(72, 0); + var tile252 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(72, 18); + var tile253 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 12320).UseFrame(18, 72); + var tile254 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(18, 756); + var tile255 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(18, 774); + var tile256 = new TileDefinitionStructure(TileID.OpenDoor).UseHeaders(0, 0, 0, 32).UseFrame(18, 792); + var tile257 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 4128).UseFrame(90, 54); + var tile258 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(72, 36); + var tile259 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 12320).UseFrame(54, 72); + Dictionary colorTileMap = new Dictionary() + { + { new Color(0, 0, 0), tile1 }, + { new Color(35, 221, 125), tile2 }, + { new Color(112, 142, 86), tile3 }, + { new Color(23, 118, 69), tile4 }, + { new Color(113, 15, 65), tile5 }, + { new Color(158, 132, 110), tile6 }, + { new Color(195, 110, 40), tile7 }, + { new Color(217, 59, 120), tile8 }, + { new Color(17, 189, 14), tile9 }, + { new Color(24, 208, 83), tile10 }, + { new Color(105, 118, 33), tile11 }, + { new Color(179, 158, 172), tile12 }, + { new Color(23, 154, 161), tile13 }, + { new Color(4, 124, 200), tile14 }, + { new Color(42, 151, 79), tile15 }, + { new Color(13, 153, 244), tile16 }, + { new Color(58, 91, 39), tile17 }, + { new Color(69, 103, 174), tile18 }, + { new Color(252, 239, 246), tile19 }, + { new Color(155, 17, 31), tile20 }, + { new Color(111, 88, 189), tile21 }, + { new Color(2, 173, 0), tile22 }, + { new Color(36, 189, 112), tile23 }, + { new Color(148, 134, 233), tile24 }, + { new Color(204, 191, 242), tile25 }, + { new Color(95, 175, 163), tile26 }, + { new Color(41, 3, 36), tile27 }, + { new Color(25, 221, 117), tile28 }, + { new Color(44, 36, 14), tile29 }, + { new Color(114, 183, 174), tile30 }, + { new Color(181, 124, 137), tile31 }, + { new Color(130, 148, 36), tile32 }, + { new Color(11, 39, 233), tile33 }, + { new Color(79, 233, 220), tile34 }, + { new Color(132, 166, 213), tile35 }, + { new Color(62, 121, 168), tile36 }, + { new Color(188, 156, 64), tile37 }, + { new Color(83, 114, 13), tile38 }, + { new Color(251, 86, 122), tile39 }, + { new Color(72, 214, 137), tile40 }, + { new Color(241, 177, 5), tile41 }, + { new Color(194, 222, 9), tile42 }, + { new Color(95, 73, 42), tile43 }, + { new Color(205, 84, 136), tile44 }, + { new Color(185, 217, 26), tile45 }, + { new Color(71, 149, 55), tile46 }, + { new Color(160, 238, 171), tile47 }, + { new Color(102, 182, 27), tile48 }, + { new Color(110, 98, 10), tile49 }, + { new Color(123, 135, 62), tile50 }, + { new Color(170, 195, 81), tile51 }, + { new Color(96, 94, 55), tile52 }, + { new Color(214, 193, 199), tile53 }, + { new Color(203, 222, 47), tile54 }, + { new Color(125, 238, 71), tile55 }, + { new Color(183, 153, 152), tile56 }, + { new Color(243, 179, 193), tile57 }, + { new Color(66, 167, 232), tile58 }, + { new Color(222, 138, 251), tile59 }, + { new Color(234, 83, 123), tile60 }, + { new Color(255, 228, 194), tile61 }, + { new Color(236, 35, 145), tile62 }, + { new Color(55, 89, 123), tile63 }, + { new Color(226, 112, 211), tile64 }, + { new Color(111, 212, 15), tile65 }, + { new Color(123, 233, 199), tile66 }, + { new Color(211, 182, 201), tile67 }, + { new Color(113, 135, 212), tile68 }, + { new Color(125, 103, 27), tile69 }, + { new Color(105, 130, 211), tile70 }, + { new Color(59, 236, 110), tile71 }, + { new Color(76, 203, 249), tile72 }, + { new Color(108, 145, 203), tile73 }, + { new Color(182, 128, 63), tile74 }, + { new Color(29, 16, 66), tile75 }, + { new Color(237, 210, 211), tile76 }, + { new Color(216, 98, 161), tile77 }, + { new Color(52, 22, 156), tile78 }, + { new Color(178, 142, 92), tile79 }, + { new Color(237, 110, 187), tile80 }, + { new Color(117, 206, 214), tile81 }, + { new Color(168, 167, 131), tile82 }, + { new Color(101, 35, 8), tile83 }, + { new Color(22, 14, 87), tile84 }, + { new Color(252, 29, 54), tile85 }, + { new Color(137, 84, 119), tile86 }, + { new Color(145, 143, 148), tile87 }, + { new Color(72, 144, 32), tile88 }, + { new Color(50, 6, 214), tile89 }, + { new Color(209, 154, 61), tile90 }, + { new Color(157, 127, 34), tile91 }, + { new Color(15, 64, 178), tile92 }, + { new Color(105, 116, 104), tile93 }, + { new Color(190, 136, 175), tile94 }, + { new Color(202, 193, 83), tile95 }, + { new Color(73, 56, 249), tile96 }, + { new Color(102, 40, 57), tile97 }, + { new Color(229, 91, 223), tile98 }, + { new Color(39, 45, 61), tile99 }, + { new Color(182, 118, 160), tile100 }, + { new Color(173, 147, 137), tile101 }, + { new Color(202, 121, 143), tile102 }, + { new Color(53, 236, 220), tile103 }, + { new Color(131, 32, 223), tile104 }, + { new Color(14, 210, 6), tile105 }, + { new Color(229, 126, 207), tile106 }, + { new Color(205, 232, 206), tile107 }, + { new Color(221, 106, 113), tile108 }, + { new Color(4, 183, 35), tile109 }, + { new Color(67, 232, 18), tile110 }, + { new Color(117, 179, 254), tile111 }, + { new Color(200, 17, 244), tile112 }, + { new Color(37, 255, 72), tile113 }, + { new Color(195, 20, 75), tile114 }, + { new Color(28, 227, 7), tile115 }, + { new Color(89, 214, 137), tile116 }, + { new Color(216, 65, 175), tile117 }, + { new Color(110, 232, 141), tile118 }, + { new Color(210, 208, 41), tile119 }, + { new Color(23, 198, 193), tile120 }, + { new Color(108, 241, 4), tile121 }, + { new Color(201, 14, 109), tile122 }, + { new Color(224, 70, 193), tile123 }, + { new Color(17, 191, 126), tile124 }, + { new Color(134, 10, 212), tile125 }, + { new Color(130, 192, 134), tile126 }, + { new Color(106, 170, 225), tile127 }, + { new Color(154, 107, 166), tile128 }, + { new Color(99, 7, 202), tile129 }, + { new Color(113, 245, 65), tile130 }, + { new Color(203, 14, 56), tile131 }, + { new Color(135, 86, 34), tile132 }, + { new Color(70, 83, 213), tile133 }, + { new Color(154, 120, 144), tile134 }, + { new Color(199, 198, 129), tile135 }, + { new Color(48, 231, 222), tile136 }, + { new Color(185, 79, 16), tile137 }, + { new Color(162, 173, 28), tile138 }, + { new Color(224, 210, 133), tile139 }, + { new Color(94, 102, 6), tile140 }, + { new Color(163, 111, 80), tile141 }, + { new Color(128, 70, 177), tile142 }, + { new Color(70, 255, 179), tile143 }, + { new Color(177, 59, 109), tile144 }, + { new Color(177, 208, 49), tile145 }, + { new Color(80, 210, 165), tile146 }, + { new Color(36, 50, 31), tile147 }, + { new Color(235, 183, 165), tile148 }, + { new Color(48, 40, 97), tile149 }, + { new Color(28, 167, 132), tile150 }, + { new Color(156, 232, 236), tile151 }, + { new Color(206, 247, 9), tile152 }, + { new Color(64, 71, 127), tile153 }, + { new Color(208, 234, 232), tile154 }, + { new Color(43, 8, 20), tile155 }, + { new Color(163, 240, 221), tile156 }, + { new Color(235, 143, 255), tile157 }, + { new Color(224, 57, 52), tile158 }, + { new Color(230, 183, 184), tile159 }, + { new Color(170, 79, 29), tile160 }, + { new Color(79, 41, 88), tile161 }, + { new Color(47, 20, 82), tile162 }, + { new Color(128, 227, 216), tile163 }, + { new Color(40, 15, 139), tile164 }, + { new Color(37, 84, 71), tile165 }, + { new Color(55, 192, 175), tile166 }, + { new Color(145, 141, 56), tile167 }, + { new Color(132, 49, 23), tile168 }, + { new Color(132, 188, 175), tile169 }, + { new Color(184, 231, 63), tile170 }, + { new Color(80, 149, 247), tile171 }, + { new Color(98, 128, 192), tile172 }, + { new Color(144, 252, 243), tile173 }, + { new Color(193, 34, 13), tile174 }, + { new Color(4, 194, 127), tile175 }, + { new Color(116, 187, 228), tile176 }, + { new Color(236, 175, 246), tile177 }, + { new Color(8, 24, 193), tile178 }, + { new Color(229, 203, 248), tile179 }, + { new Color(65, 170, 88), tile180 }, + { new Color(162, 199, 251), tile181 }, + { new Color(153, 215, 122), tile182 }, + { new Color(148, 195, 211), tile183 }, + { new Color(134, 166, 196), tile184 }, + { new Color(187, 208, 106), tile185 }, + { new Color(42, 128, 110), tile186 }, + { new Color(151, 16, 1), tile187 }, + { new Color(203, 203, 55), tile188 }, + { new Color(73, 72, 124), tile189 }, + { new Color(53, 124, 181), tile190 }, + { new Color(199, 79, 81), tile191 }, + { new Color(155, 30, 90), tile192 }, + { new Color(18, 107, 235), tile193 }, + { new Color(5, 223, 247), tile194 }, + { new Color(17, 101, 9), tile195 }, + { new Color(49, 76, 72), tile196 }, + { new Color(86, 187, 75), tile197 }, + { new Color(138, 169, 154), tile198 }, + { new Color(86, 215, 251), tile199 }, + { new Color(195, 79, 143), tile200 }, + { new Color(253, 94, 70), tile201 }, + { new Color(30, 191, 87), tile202 }, + { new Color(115, 32, 177), tile203 }, + { new Color(16, 24, 21), tile204 }, + { new Color(131, 145, 48), tile205 }, + { new Color(9, 186, 102), tile206 }, + { new Color(46, 23, 251), tile207 }, + { new Color(52, 222, 193), tile208 }, + { new Color(106, 61, 165), tile209 }, + { new Color(183, 68, 70), tile210 }, + { new Color(94, 78, 27), tile211 }, + { new Color(91, 8, 129), tile212 }, + { new Color(177, 242, 166), tile213 }, + { new Color(177, 190, 44), tile214 }, + { new Color(151, 70, 162), tile215 }, + { new Color(53, 7, 24), tile216 }, + { new Color(105, 77, 29), tile217 }, + { new Color(149, 149, 56), tile218 }, + { new Color(148, 201, 128), tile219 }, + { new Color(132, 180, 129), tile220 }, + { new Color(177, 188, 219), tile221 }, + { new Color(106, 177, 201), tile222 }, + { new Color(249, 39, 136), tile223 }, + { new Color(175, 88, 199), tile224 }, + { new Color(192, 124, 88), tile225 }, + { new Color(207, 156, 151), tile226 }, + { new Color(30, 52, 54), tile227 }, + { new Color(140, 77, 247), tile228 }, + { new Color(41, 201, 185), tile229 }, + { new Color(227, 199, 63), tile230 }, + { new Color(1, 44, 62), tile231 }, + { new Color(36, 0, 2), tile232 }, + { new Color(80, 45, 149), tile233 }, + { new Color(217, 60, 224), tile234 }, + { new Color(144, 186, 245), tile235 }, + { new Color(86, 213, 24), tile236 }, + { new Color(223, 196, 44), tile237 }, + { new Color(232, 102, 127), tile238 }, + { new Color(75, 36, 110), tile239 }, + { new Color(228, 65, 232), tile240 }, + { new Color(16, 22, 95), tile241 }, + { new Color(72, 173, 43), tile242 }, + { new Color(136, 155, 124), tile243 }, + { new Color(85, 126, 111), tile244 }, + { new Color(2, 69, 248), tile245 }, + { new Color(86, 252, 146), tile246 }, + { new Color(2, 210, 243), tile247 }, + { new Color(160, 3, 2), tile248 }, + { new Color(19, 25, 198), tile249 }, + { new Color(191, 217, 219), tile250 }, + { new Color(147, 107, 235), tile251 }, + { new Color(173, 200, 37), tile252 }, + { new Color(128, 71, 13), tile253 }, + { new Color(201, 206, 58), tile254 }, + { new Color(155, 137, 70), tile255 }, + { new Color(188, 229, 32), tile256 }, + { new Color(135, 245, 40), tile257 }, + { new Color(220, 226, 110), tile258 }, + { new Color(244, 111, 18), tile259 }, + }; + return new ColorTileMap(colorTileMap); + } + } +} diff --git a/Schematics/AutoGeneratedContent/ResearchFacility2Schematic.png b/Schematics/AutoGeneratedContent/ResearchFacility2Schematic.png new file mode 100644 index 0000000000000000000000000000000000000000..19a1f4397966e0fe6509377802919b7017c834a2 GIT binary patch literal 2502 zcmV;%2|4zOP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz30p}-K~zXftyT#* zm+2P&`Afs7kf{FlgcNC$y-2u?D2X!Ev`-~Vkv5e?8f~_U(yGOhO1dp*2xEj8(fV(Z zC5=7nh~~S!hrj3ExpU{vJoldGd7t<9o%eUncfR+W_q-qeAJXHzos%E7h*PZkf~#}f zL4#qY6OQo#o?Jiue-e@Y`A>`btDRi;;81*=FrS{wt;S;YvE`82?23CgBw=aaf#yOr z6xY@f7K*`*0ytW3C#;kHlI%7F1t3vd>@Uagr-TK{cIwsojT~2<%`IDMz$r=3qB+iM zKG&->otq#&VqpCCxvCJyd#u}zq0#(_;oDR&7VYQM~no)1G{LNXM;GK zWPDo}g{rxdFm8K^x!WwzsWKAUDV<2@s)JGS8Pr)x!+4YjoU5n6y;}ogr@G^iwJ7;6 zw%Ub;+>eB}BNM@8gDGp~4=()SuK(@=+sz;SeudWhNDOhDM!Ep63XJaBMR-i16f&%g zVQ3_Q;=8BuXtW7}RgF;_mWcLUmc$t>V*r)6FA?{+8ne^$uretVVXgNO<=z8*vrOWQ zX}OJu3SmgG3x`gCA8p3g;7)|tm*7H-1I&Zs|9iQxT}{k!ptO6HOL2{l$|$`%n{2ol z+v2(KBT?Lk6fv$Svz4p#E~D9`!E*q!p*Lay7c_a~f8;QGhP6e<(#VK4r?N?Dy~IU5 z2%vH)i9OCaKkfOqQt8W2zj!Ua$GNTXf#_**m<7tA*mDcU2A3nzW*0*C@eyM15}})p z!Th5yA~oNky=x+rZk$B#rRgY&42Ju9dHAHQK=-|);7u`vq5mqxp2#JAYLN_XE9ntG zKz9jrCK;gQsV98>dJtMU8?sK%F=($PYGH~yDSY^UibqFeFL>+62GnOg*wY^(c>Oa4 zTM@1TgV8(Sw=xW3hkdd5ArDb{3rg<>LvWKrM8|pPKeZ-1$wn>Y-Q^+G zn2)II6Of=_iFlnRgbKp7pK9(w-gkz}< zW`1u5VJG3SV4Et!F-F=O@w`Bk>JCCwsV~wNhhj*D4RVg;QrG~i znsq3%eu9K*JFHV%0vydnfW=xwajnqzw}nJ<4iq^@w2$}#KOEeG_pw8X6Hyim$A zZ?(j-UytJouXn)bB(EA+=`P1@!$#^h-^>!n5?xQ!G)Yjh5dYj^Tn&}c$RCH`vxhNr^BGjSRv}`ofI0x<51)|;bxw}3 zP|rGpu#*f4yoVTT4Frsz49{qdfi9upI2pNey0{|u3fE>FpiaW%cy&6mZ)K4!>o&tT zW@1x%BFwy8`bxs#QZX&Is5a0Gnb_CW;nDh&gzwZ=!F&9ds1Nmrt$H$j5DSWNg#5U& z2*QG4jihJ6GGVqt{2{ZLIKp?aVDBGTj>s5ADud}K*TC;54{C=@1h6(KGp%)DSps72McTb;5^a;8Lw;b`0raWd}jfa#XWHI(|GC< zl6Pfb)X@g36{}FKc^J`eHOY3ksUn8ds-UZODqSLsGvaTyRB|na3eZzEMafrkxV7(V z47vAVy;<3>T>2!dH_JQXx&8Hu3%Bb78$YaoD?l_w1`prf0TH7|s#Y6J{Ktp7|V^H;k~XZZevxQ&2x&2C_w0>0Rbc4ybp# zin87B`>y8k$LDdpLz!5+LV#2$dw368PX7R|{C1p+%f=fA1MJ-P`NW?X3NJ+qShZy1 zROt!o#f;DX6Dof>M0gZ`1NGULaeEQrsz98Hi&fEb-4XoB$EX7cZQq>8hq2Eyguhe4 z5kUnCTKRZkF$E5b^r80ibodN=jt^NX81}OvY=a}AU1->M=&E=Z*+k;v;tNy0HXWXj z`k%0WnF2IgWvL`4T|Q47=~h(=iXEN9y5%WKX*ZZf@#liT>t2vx{oj^X*qg&u3pNmK7L;3>N&7KPD$g{|77>m4o zZ_I1gLP)9tstWut^?5QDy-^rQA1e>5&S)HUDS?0KMAYuCMYY8Xys{pIx5JhrNH!I5 z#(4;xDT9uc3K;oq2K2Wl;6rx<`MGJFgf!bqWb3aOC=W;Z&%OP#&n%-^(EGs^?b=mP zFV97Tj5~a)GSR9RgDY8bP;+|$k<&q*+~q2Bc*_Y8R<8l=9yfT8`#_GEgv1QR!>VGW zI!S!K5?f%tXB%u(wlPg@P*rt6mfLZt28|+YG_MSj91ok#UekNSo=N>n98412bs>`DIgT^h zQ;dBVCt|znBU)fsC`|V_$p+4mz@_wXbn5KH;E!W)F4h-HS1jP-zY>x)s;HT23F-Hz z2Jr0-#%Nrfjfc&?*seJo*IsNPzEDIRw_=~y4k&Z)@SUzLF65fvTGKbg{_6vO-F^F3awe`pGTTT4XgzU z*rjUK&jL)v&h{f9w`bY!KC?NnBAx8al19_oZ~Y5rrf2blolT;3m!)m^2O_VJ5wXqL Q&Hw-a07*qoM6N<$f&mxEi2wiq literal 0 HcmV?d00001 diff --git a/Schematics/AutoGeneratedContent/Workshop2Schematic.cs b/Schematics/AutoGeneratedContent/Workshop2Schematic.cs new file mode 100644 index 0000000000..e9462d5482 --- /dev/null +++ b/Schematics/AutoGeneratedContent/Workshop2Schematic.cs @@ -0,0 +1,741 @@ +using CalamityMod.Tiles; +using CalamityMod.Tiles.DraedonStructures; +using CalamityMod.Walls.DraedonStructures; +using Microsoft.Xna.Framework; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Schematics.AutoGeneratedContent +{ + public class Workshop2Schematic + { + [GeneratedCode("ScreenCaptureToSchematic", "1.0.2")] + public static ColorTileMap GetMap() + { + var tile1 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 0, 0); + var tile2 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 8224).UseFrame(72, 54); + var tile3 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(288, 0); + var tile4 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(90, 18); + var tile5 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(90, 0); + var tile6 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(90, 36); + var tile7 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 18); + var tile8 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32); + var tile9 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 16416).UseFrame(36, 72); + var tile10 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(54, 54); + var tile11 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(90, 72); + var tile12 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 3, 0).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile13 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 128, 2, 0).UseWall((ushort)ModContent.WallType(), 0, 72); + var tile14 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 0, 0).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile15 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 101, 1, 2144).UseFrame(162, 36).UseWall((ushort)ModContent.WallType(), 180, 36).MakeActuated(); + var tile16 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 2, 0).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile17 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 96, 1, 4128).UseFrame(90, 54).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile18 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 148, 4, 32).UseFrame(72, 18).UseWall((ushort)ModContent.WallType(), 144, 144); + var tile19 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 8224).UseFrame(72, 54); + var tile20 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 0); + var tile21 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 164, 3, 12320).UseFrame(144, 54).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile22 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 2, 0).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile23 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile24 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 4, 0).UseWall((ushort)ModContent.WallType(), 36, 144); + var tile25 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 2144).UseFrame(108, 72).MakeActuated(); + var tile26 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 0, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile27 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile28 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(162, 0); + var tile29 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 0); + var tile30 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 36); + var tile31 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 3, 0).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile32 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile33 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 3, 2144).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 72, 108).MakeActuated(); + var tile34 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 133, 2, 32).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile35 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 75, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile36 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile37 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(108, 72); + var tile38 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 0); + var tile39 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 36); + var tile40 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 0, 0, 32).UseFrame(0, 540); + var tile41 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 0, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile42 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 4, 2144).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 288, 144).MakeActuated(); + var tile43 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32).UseFrame(18, 0); + var tile44 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 1, 0, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile45 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile46 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(126, 72); + var tile47 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(288, 36); + var tile48 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 148, 3, 12320).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile49 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 64, 1, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile50 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile51 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile52 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 5, 0, 0).UseWall((ushort)ModContent.WallType(), 180, 0); + var tile53 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 2, 2144).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 108, 72).MakeActuated(); + var tile54 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile55 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(144, 72); + var tile56 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(36, 0); + var tile57 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 2144).UseFrame(108, 0).UseWall((ushort)ModContent.WallType(), 72, 0).MakeActuated(); + var tile58 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 43, 0, 2144).UseFrame(90, 36).UseWall((ushort)ModContent.WallType(), 396, 0).MakeActuated(); + var tile59 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 2144).UseFrame(90, 0).UseWall((ushort)ModContent.WallType(), 108, 36).MakeActuated(); + var tile60 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 2, 2144).UseFrame(90, 36).UseWall((ushort)ModContent.WallType(), 108, 72).MakeActuated(); + var tile61 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 2144).UseFrame(90, 36).MakeActuated(); + var tile62 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 140, 2, 2144).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 432, 72).MakeActuated(); + var tile63 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(72, 0); + var tile64 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile65 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile66 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 3, 0).UseWall((ushort)ModContent.WallType(), 180, 108); + var tile67 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(234, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile68 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(306, 36); + var tile69 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 16416).UseFrame(36, 72); + var tile70 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 0, 0, 32).UseFrame(0, 216); + var tile71 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 0, 0, 32).UseFrame(0, 234); + var tile72 = new TileDefinitionStructure(TileID.Lamps).UseHeaders(0, 0, 0, 32).UseFrame(0, 252); + var tile73 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 54); + var tile74 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(0, 18); + var tile75 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 16416).UseFrame(72, 72); + var tile76 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(72, 54); + var tile77 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile78 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile79 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 8224).UseFrame(144, 0); + var tile80 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 76, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 432, 36); + var tile81 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 4128).UseFrame(18, 54); + var tile82 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 72); + var tile83 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 16416).UseFrame(0, 72); + var tile84 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 8224).UseFrame(0, 54); + var tile85 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(270, 72); + var tile86 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 18); + var tile87 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 18); + var tile88 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 36); + var tile89 = new TileDefinitionStructure(TileID.TallGateOpen).UseHeaders(0, 0, 0, 32); + var tile90 = new TileDefinitionStructure(TileID.TallGateOpen).UseHeaders(0, 0, 0, 32).UseFrame(0, 20); + var tile91 = new TileDefinitionStructure(TileID.TallGateOpen).UseHeaders(0, 0, 0, 32).UseFrame(0, 38); + var tile92 = new TileDefinitionStructure(TileID.TallGateOpen).UseHeaders(0, 0, 0, 32).UseFrame(0, 56); + var tile93 = new TileDefinitionStructure(TileID.TallGateOpen).UseHeaders(0, 0, 0, 32).UseFrame(0, 74); + var tile94 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 0); + var tile95 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(270, 54); + var tile96 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile97 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 68, 1, 0).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile98 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 2, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile99 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 8224).UseFrame(144, 0); + var tile100 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 73, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 324, 36); + var tile101 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 4128).UseFrame(54, 54); + var tile102 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 54); + var tile103 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(270, 72); + var tile104 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 18); + var tile105 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(252, 54); + var tile106 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 3, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile107 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 12320).UseFrame(90, 72).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile108 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 128, 2, 0).UseWall((ushort)ModContent.WallType(), 0, 72); + var tile109 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 128, 2, 4128).UseFrame(18, 54).UseWall((ushort)ModContent.WallType(), 0, 72); + var tile110 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 4, 32).UseFrame(72, 18).UseWall((ushort)ModContent.WallType(), 72, 144); + var tile111 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(288, 54); + var tile112 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 140, 2, 0).UseWall((ushort)ModContent.WallType(), 432, 72); + var tile113 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile114 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 0, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile115 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 64, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile116 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 4128).UseFrame(90, 54).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile117 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 96, 1, 32).UseFrame(72, 36).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile118 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 4, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 0, 144); + var tile119 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(72, 36); + var tile120 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 3, 12320).UseFrame(90, 72).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile121 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile122 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile123 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 2, 0).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile124 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 4, 0, 32).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile125 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile126 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile127 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile128 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(162, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile129 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile130 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 64, 1, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile131 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 5, 0, 32).UseFrame(216, 0).UseWall((ushort)ModContent.WallType(), 180, 0); + var tile132 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile133 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile134 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 4, 0, 32).UseFrame(0, 54).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile135 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 64, 1, 12320).UseFrame(108, 54).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile136 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile137 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(16, 0); + var tile138 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile139 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile140 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile141 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile142 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 3, 0).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile143 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 0, 0).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile144 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile145 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile146 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile147 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32); + var tile148 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile149 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 139, 2, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile150 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 68, 1, 0).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile151 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 2, 0).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile152 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile153 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile154 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(144, 72); + var tile155 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 67, 3, 0).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile156 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile157 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile158 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 4, 0, 0).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile159 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 2, 0).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile160 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 133, 2, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile161 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile162 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile163 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile164 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile165 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile166 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 1, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile167 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 69, 1, 32).UseWall((ushort)ModContent.WallType(), 180, 36); + var tile168 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile169 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 67, 3, 0).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile170 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 87, 3, 32).UseFrame(216, 18).UseWall((ushort)ModContent.WallType(), 252, 108); + var tile171 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 0, 0, 32).UseFrame(0, 558); + var tile172 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(48, 0); + var tile173 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 3, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile174 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 2, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile175 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile176 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 2, 32).UseFrame(216, 36).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile177 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile178 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32); + var tile179 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 4, 0).UseWall((ushort)ModContent.WallType(), 288, 144); + var tile180 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(54, 0); + var tile181 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 0, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile182 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(72, 54).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile183 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(306, 54); + var tile184 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 0, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile185 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile186 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 2, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile187 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 4, 0).UseWall((ushort)ModContent.WallType(), 216, 144); + var tile188 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 0, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile189 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile190 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile191 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile192 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 4, 0).UseWall((ushort)ModContent.WallType(), 252, 144); + var tile193 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32); + var tile194 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32).UseFrame(0, 18); + var tile195 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile196 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile197 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 64, 1, 32).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile198 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 2, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile199 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 6, 0, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 216, 0); + var tile200 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 132, 4, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 144, 144); + var tile201 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32).UseFrame(36, 0); + var tile202 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 66, 0, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile203 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile204 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 137, 2, 0).UseWall((ushort)ModContent.WallType(), 324, 72); + var tile205 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 1, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile206 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 139, 2, 0).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile207 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile208 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile209 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32).UseFrame(18, 18); + var tile210 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 1, 0, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile211 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 4, 32).UseWall((ushort)ModContent.WallType(), 0, 144); + var tile212 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 3, 0).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile213 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile214 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 0, 0).UseWall((ushort)ModContent.WallType(), 252, 0); + var tile215 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 69, 1, 0).UseWall((ushort)ModContent.WallType(), 180, 36); + var tile216 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 69, 1, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 180, 36); + var tile217 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 66, 1, 32).UseFrame(54, 18).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile218 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile219 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile220 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile221 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 67, 4, 0).UseWall((ushort)ModContent.WallType(), 108, 144); + var tile222 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 0, 0).UseWall((ushort)ModContent.WallType(), 216, 0); + var tile223 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 0, 0, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile224 = new TileDefinitionStructure(TileID.FishingCrate).UseHeaders(0, 138, 2, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile225 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 2, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile226 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 138, 2, 0).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile227 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 1, 2144).UseFrame(72, 54).UseWall((ushort)ModContent.WallType(), 36, 36).MakeActuated(); + var tile228 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 2144).UseFrame(90, 18).MakeActuated(); + var tile229 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 2144).UseFrame(90, 0).MakeActuated(); + var tile230 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 2144).UseFrame(108, 54).UseWall((ushort)ModContent.WallType(), 36, 0).MakeActuated(); + var tile231 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(18, 54).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile232 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 1, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile233 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile234 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(162, 0); + var tile235 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile236 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 1, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile237 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 2144).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 36, 36).MakeActuated(); + var tile238 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32); + var tile239 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 3, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile240 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile241 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile242 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(162, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile243 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 75, 1, 0).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile244 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 2, 32).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile245 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 64, 1, 0).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile246 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 2, 0).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile247 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 69, 1, 0).UseWall((ushort)ModContent.WallType(), 180, 36); + var tile248 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 69, 1, 0).UseWall((ushort)ModContent.WallType(), 180, 36); + var tile249 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 68, 1, 0).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile250 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile251 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 64, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 0, 36); + var tile252 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile253 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 43, 0, 2144).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 396, 0).MakeActuated(); + var tile254 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 1, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile255 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 5, 0, 0).UseWall((ushort)ModContent.WallType(), 180, 0); + var tile256 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 133, 2, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 180, 72); + var tile257 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile258 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile259 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile260 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile261 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 3, 0).UseWall((ushort)ModContent.WallType(), 180, 108); + var tile262 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 4, 0, 0).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile263 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile264 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 4, 0).UseWall((ushort)ModContent.WallType(), 36, 144); + var tile265 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(234, 0); + var tile266 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 1, 32).UseFrame(54, 54).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile267 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 1, 16416).UseFrame(144, 54).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile268 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 74, 1, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile269 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 2144).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 108, 36).MakeActuated(); + var tile270 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 66, 2, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile271 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(32, 0); + var tile272 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile273 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile274 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile275 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile276 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 3, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 72, 108); + var tile277 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 4, 0).UseWall((ushort)ModContent.WallType(), 0, 144); + var tile278 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 8224).UseFrame(0, 54); + var tile279 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 83, 3, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile280 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 68, 1, 32).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile281 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 148, 2, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile282 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 16416).UseFrame(36, 72).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile283 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 2144).UseFrame(216, 0).UseWall((ushort)ModContent.WallType(), 72, 36).MakeActuated(); + var tile284 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile285 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile286 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile287 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile288 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 2, 32).UseFrame(216, 36).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile289 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 68, 1, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile290 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(306, 54); + var tile291 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 54); + var tile292 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(252, 72); + var tile293 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 99, 3, 32).UseFrame(270, 54).UseWall((ushort)ModContent.WallType(), 108, 108); + var tile294 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 20, 0, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 144, 0); + var tile295 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 2, 16416).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile296 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 100, 1, 8224).UseFrame(72, 54).UseWall((ushort)ModContent.WallType(), 144, 36); + var tile297 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 4, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 36, 144); + var tile298 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(306, 54); + var tile299 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile300 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 4, 8224).UseFrame(144, 0).UseWall((ushort)ModContent.WallType(), 144, 144); + var tile301 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(306, 72); + var tile302 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 12320).UseFrame(54, 72); + var tile303 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 4128).UseFrame(18, 54); + var tile304 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(252, 72); + var tile305 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 36); + var tile306 = new TileDefinitionStructure(TileID.TallGateClosed).UseHeaders(0, 0, 0, 32); + var tile307 = new TileDefinitionStructure(TileID.TallGateClosed).UseHeaders(0, 0, 0, 32).UseFrame(0, 20); + var tile308 = new TileDefinitionStructure(TileID.TallGateClosed).UseHeaders(0, 0, 0, 32).UseFrame(0, 38); + var tile309 = new TileDefinitionStructure(TileID.TallGateClosed).UseHeaders(0, 0, 0, 32).UseFrame(0, 56); + var tile310 = new TileDefinitionStructure(TileID.TallGateClosed).UseHeaders(0, 0, 0, 32).UseFrame(0, 74); + var tile311 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(252, 54); + var tile312 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 12320).UseFrame(90, 72); + var tile313 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(126, 0); + var tile314 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(90, 36); + var tile315 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 0, 32).UseFrame(90, 18).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile316 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(72, 72).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile317 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(216, 0).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile318 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 36); + var tile319 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 12320).UseFrame(18, 72); + var tile320 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(72, 18); + var tile321 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 12320).UseFrame(90, 72); + var tile322 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(90, 54); + var tile323 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 3, 0).UseWall((ushort)ModContent.WallType(), 144, 108); + var tile324 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile325 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(54, 0); + var tile326 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 3, 16416).UseFrame(36, 72).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile327 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile328 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 132, 4, 32).UseWall((ushort)ModContent.WallType(), 144, 144); + var tile329 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 0, 0, 32).UseFrame(0, 18); + var tile330 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 131, 0, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile331 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile332 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 0); + var tile333 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 36); + var tile334 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 131, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile335 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 6, 2, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile336 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile337 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 71, 2, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile338 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 0, 0, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 0, 0); + var tile339 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 131, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile340 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile341 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 75, 1, 0).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile342 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 131, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile343 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 6, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile344 = new TileDefinitionStructure(TileID.HeavyWorkBench).UseHeaders(0, 75, 1, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile345 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(306, 0); + var tile346 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 3, 16416).UseFrame(126, 54).UseWall((ushort)ModContent.WallType(), 36, 108); + var tile347 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 42, 0, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile348 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile349 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(216, 0); + var tile350 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(0, 54); + var tile351 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(72, 72); + var tile352 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 133, 3, 0).UseWall((ushort)ModContent.WallType(), 180, 108); + var tile353 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 164, 2, 32).UseFrame(216, 36).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile354 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 164, 2, 8224).UseFrame(72, 54).UseWall((ushort)ModContent.WallType(), 144, 72); + var tile355 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 165, 4, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 180, 144); + var tile356 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 4128).UseFrame(90, 54); + var tile357 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(306, 0); + var tile358 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(306, 18); + var tile359 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 12320).UseFrame(18, 72); + Dictionary colorTileMap = new Dictionary() + { + { new Color(0, 0, 0), tile1 }, + { new Color(114, 195, 225), tile2 }, + { new Color(226, 74, 12), tile3 }, + { new Color(228, 243, 191), tile4 }, + { new Color(144, 205, 196), tile5 }, + { new Color(39, 4, 64), tile6 }, + { new Color(112, 181, 57), tile7 }, + { new Color(106, 30, 171), tile8 }, + { new Color(8, 54, 212), tile9 }, + { new Color(26, 140, 167), tile10 }, + { new Color(233, 4, 18), tile11 }, + { new Color(173, 222, 58), tile12 }, + { new Color(173, 194, 45), tile13 }, + { new Color(67, 215, 12), tile14 }, + { new Color(71, 99, 37), tile15 }, + { new Color(6, 22, 237), tile16 }, + { new Color(28, 144, 14), tile17 }, + { new Color(209, 119, 142), tile18 }, + { new Color(75, 230, 38), tile19 }, + { new Color(191, 106, 140), tile20 }, + { new Color(13, 199, 189), tile21 }, + { new Color(100, 250, 238), tile22 }, + { new Color(172, 226, 239), tile23 }, + { new Color(138, 121, 66), tile24 }, + { new Color(19, 44, 222), tile25 }, + { new Color(44, 34, 187), tile26 }, + { new Color(133, 1, 31), tile27 }, + { new Color(230, 253, 252), tile28 }, + { new Color(153, 23, 141), tile29 }, + { new Color(132, 98, 248), tile30 }, + { new Color(20, 238, 88), tile31 }, + { new Color(161, 54, 15), tile32 }, + { new Color(79, 226, 104), tile33 }, + { new Color(55, 89, 52), tile34 }, + { new Color(254, 146, 22), tile35 }, + { new Color(203, 190, 74), tile36 }, + { new Color(176, 31, 195), tile37 }, + { new Color(106, 57, 104), tile38 }, + { new Color(109, 38, 202), tile39 }, + { new Color(193, 203, 227), tile40 }, + { new Color(96, 40, 127), tile41 }, + { new Color(246, 117, 139), tile42 }, + { new Color(233, 113, 246), tile43 }, + { new Color(206, 221, 63), tile44 }, + { new Color(82, 77, 167), tile45 }, + { new Color(234, 232, 106), tile46 }, + { new Color(230, 205, 88), tile47 }, + { new Color(67, 212, 67), tile48 }, + { new Color(53, 169, 180), tile49 }, + { new Color(239, 51, 15), tile50 }, + { new Color(69, 141, 23), tile51 }, + { new Color(133, 215, 49), tile52 }, + { new Color(180, 7, 28), tile53 }, + { new Color(138, 226, 77), tile54 }, + { new Color(83, 225, 65), tile55 }, + { new Color(131, 24, 235), tile56 }, + { new Color(192, 130, 61), tile57 }, + { new Color(95, 218, 253), tile58 }, + { new Color(139, 29, 84), tile59 }, + { new Color(60, 193, 204), tile60 }, + { new Color(215, 250, 62), tile61 }, + { new Color(230, 137, 79), tile62 }, + { new Color(39, 205, 118), tile63 }, + { new Color(118, 54, 225), tile64 }, + { new Color(78, 92, 235), tile65 }, + { new Color(11, 239, 242), tile66 }, + { new Color(1, 177, 145), tile67 }, + { new Color(200, 47, 177), tile68 }, + { new Color(210, 230, 179), tile69 }, + { new Color(26, 250, 186), tile70 }, + { new Color(220, 119, 69), tile71 }, + { new Color(80, 179, 232), tile72 }, + { new Color(14, 109, 88), tile73 }, + { new Color(241, 91, 74), tile74 }, + { new Color(116, 74, 76), tile75 }, + { new Color(92, 17, 125), tile76 }, + { new Color(17, 127, 45), tile77 }, + { new Color(97, 58, 16), tile78 }, + { new Color(58, 14, 203), tile79 }, + { new Color(140, 20, 162), tile80 }, + { new Color(155, 13, 211), tile81 }, + { new Color(188, 153, 190), tile82 }, + { new Color(155, 253, 169), tile83 }, + { new Color(3, 252, 130), tile84 }, + { new Color(154, 15, 85), tile85 }, + { new Color(70, 84, 229), tile86 }, + { new Color(100, 117, 213), tile87 }, + { new Color(53, 8, 122), tile88 }, + { new Color(140, 123, 61), tile89 }, + { new Color(53, 22, 164), tile90 }, + { new Color(28, 129, 88), tile91 }, + { new Color(181, 86, 78), tile92 }, + { new Color(119, 184, 176), tile93 }, + { new Color(142, 193, 19), tile94 }, + { new Color(212, 14, 131), tile95 }, + { new Color(170, 199, 43), tile96 }, + { new Color(186, 243, 186), tile97 }, + { new Color(230, 40, 158), tile98 }, + { new Color(205, 102, 4), tile99 }, + { new Color(88, 47, 30), tile100 }, + { new Color(129, 101, 231), tile101 }, + { new Color(4, 230, 122), tile102 }, + { new Color(41, 229, 185), tile103 }, + { new Color(7, 207, 155), tile104 }, + { new Color(52, 214, 180), tile105 }, + { new Color(193, 97, 250), tile106 }, + { new Color(247, 225, 179), tile107 }, + { new Color(17, 122, 34), tile108 }, + { new Color(234, 54, 89), tile109 }, + { new Color(186, 231, 239), tile110 }, + { new Color(73, 31, 136), tile111 }, + { new Color(145, 13, 91), tile112 }, + { new Color(44, 207, 39), tile113 }, + { new Color(9, 129, 225), tile114 }, + { new Color(113, 179, 36), tile115 }, + { new Color(30, 177, 81), tile116 }, + { new Color(234, 12, 5), tile117 }, + { new Color(10, 97, 77), tile118 }, + { new Color(106, 111, 235), tile119 }, + { new Color(196, 26, 175), tile120 }, + { new Color(32, 111, 253), tile121 }, + { new Color(202, 189, 175), tile122 }, + { new Color(19, 163, 201), tile123 }, + { new Color(89, 148, 145), tile124 }, + { new Color(210, 238, 96), tile125 }, + { new Color(210, 160, 198), tile126 }, + { new Color(253, 203, 133), tile127 }, + { new Color(7, 208, 218), tile128 }, + { new Color(234, 63, 190), tile129 }, + { new Color(58, 38, 158), tile130 }, + { new Color(111, 104, 181), tile131 }, + { new Color(119, 232, 18), tile132 }, + { new Color(227, 167, 245), tile133 }, + { new Color(116, 11, 13), tile134 }, + { new Color(136, 144, 120), tile135 }, + { new Color(115, 55, 115), tile136 }, + { new Color(237, 152, 206), tile137 }, + { new Color(36, 199, 78), tile138 }, + { new Color(41, 24, 158), tile139 }, + { new Color(34, 223, 126), tile140 }, + { new Color(241, 217, 125), tile141 }, + { new Color(43, 233, 44), tile142 }, + { new Color(219, 91, 5), tile143 }, + { new Color(78, 238, 249), tile144 }, + { new Color(209, 136, 192), tile145 }, + { new Color(120, 127, 63), tile146 }, + { new Color(98, 119, 7), tile147 }, + { new Color(74, 76, 141), tile148 }, + { new Color(207, 75, 161), tile149 }, + { new Color(103, 78, 207), tile150 }, + { new Color(115, 192, 200), tile151 }, + { new Color(118, 131, 49), tile152 }, + { new Color(144, 93, 167), tile153 }, + { new Color(76, 151, 220), tile154 }, + { new Color(109, 158, 170), tile155 }, + { new Color(213, 83, 62), tile156 }, + { new Color(141, 177, 153), tile157 }, + { new Color(95, 192, 104), tile158 }, + { new Color(119, 166, 140), tile159 }, + { new Color(239, 91, 158), tile160 }, + { new Color(139, 116, 12), tile161 }, + { new Color(53, 219, 45), tile162 }, + { new Color(49, 90, 5), tile163 }, + { new Color(143, 231, 34), tile164 }, + { new Color(152, 22, 223), tile165 }, + { new Color(43, 221, 174), tile166 }, + { new Color(227, 250, 247), tile167 }, + { new Color(98, 217, 156), tile168 }, + { new Color(54, 19, 0), tile169 }, + { new Color(95, 255, 220), tile170 }, + { new Color(165, 160, 1), tile171 }, + { new Color(8, 193, 34), tile172 }, + { new Color(207, 55, 195), tile173 }, + { new Color(124, 163, 249), tile174 }, + { new Color(57, 254, 201), tile175 }, + { new Color(118, 198, 169), tile176 }, + { new Color(136, 75, 201), tile177 }, + { new Color(222, 12, 97), tile178 }, + { new Color(166, 40, 155), tile179 }, + { new Color(112, 255, 199), tile180 }, + { new Color(45, 209, 90), tile181 }, + { new Color(41, 233, 71), tile182 }, + { new Color(32, 143, 85), tile183 }, + { new Color(188, 91, 165), tile184 }, + { new Color(234, 103, 86), tile185 }, + { new Color(254, 41, 219), tile186 }, + { new Color(210, 191, 77), tile187 }, + { new Color(86, 215, 180), tile188 }, + { new Color(18, 199, 148), tile189 }, + { new Color(160, 98, 152), tile190 }, + { new Color(135, 94, 56), tile191 }, + { new Color(251, 79, 210), tile192 }, + { new Color(159, 16, 21), tile193 }, + { new Color(130, 85, 54), tile194 }, + { new Color(84, 203, 239), tile195 }, + { new Color(36, 243, 165), tile196 }, + { new Color(10, 167, 255), tile197 }, + { new Color(191, 157, 63), tile198 }, + { new Color(122, 214, 250), tile199 }, + { new Color(166, 22, 33), tile200 }, + { new Color(178, 128, 45), tile201 }, + { new Color(189, 53, 252), tile202 }, + { new Color(108, 238, 23), tile203 }, + { new Color(132, 95, 25), tile204 }, + { new Color(198, 79, 105), tile205 }, + { new Color(22, 2, 11), tile206 }, + { new Color(196, 237, 212), tile207 }, + { new Color(239, 149, 186), tile208 }, + { new Color(153, 199, 193), tile209 }, + { new Color(249, 129, 121), tile210 }, + { new Color(216, 248, 249), tile211 }, + { new Color(243, 208, 213), tile212 }, + { new Color(9, 150, 150), tile213 }, + { new Color(243, 184, 4), tile214 }, + { new Color(141, 133, 72), tile215 }, + { new Color(230, 249, 77), tile216 }, + { new Color(213, 100, 211), tile217 }, + { new Color(238, 226, 40), tile218 }, + { new Color(77, 195, 234), tile219 }, + { new Color(115, 35, 109), tile220 }, + { new Color(59, 114, 109), tile221 }, + { new Color(158, 172, 102), tile222 }, + { new Color(31, 210, 127), tile223 }, + { new Color(148, 12, 107), tile224 }, + { new Color(117, 208, 53), tile225 }, + { new Color(207, 98, 16), tile226 }, + { new Color(114, 178, 205), tile227 }, + { new Color(115, 36, 28), tile228 }, + { new Color(165, 233, 22), tile229 }, + { new Color(208, 166, 13), tile230 }, + { new Color(234, 150, 115), tile231 }, + { new Color(40, 183, 69), tile232 }, + { new Color(151, 238, 217), tile233 }, + { new Color(225, 198, 39), tile234 }, + { new Color(206, 64, 87), tile235 }, + { new Color(103, 121, 17), tile236 }, + { new Color(243, 126, 96), tile237 }, + { new Color(218, 0, 112), tile238 }, + { new Color(159, 200, 78), tile239 }, + { new Color(80, 249, 194), tile240 }, + { new Color(80, 79, 43), tile241 }, + { new Color(114, 170, 118), tile242 }, + { new Color(248, 76, 25), tile243 }, + { new Color(239, 55, 116), tile244 }, + { new Color(55, 145, 236), tile245 }, + { new Color(166, 165, 227), tile246 }, + { new Color(197, 62, 112), tile247 }, + { new Color(5, 220, 40), tile248 }, + { new Color(172, 15, 149), tile249 }, + { new Color(2, 137, 238), tile250 }, + { new Color(247, 71, 245), tile251 }, + { new Color(22, 145, 119), tile252 }, + { new Color(251, 91, 150), tile253 }, + { new Color(224, 110, 44), tile254 }, + { new Color(247, 3, 70), tile255 }, + { new Color(236, 163, 111), tile256 }, + { new Color(132, 249, 35), tile257 }, + { new Color(107, 138, 186), tile258 }, + { new Color(82, 74, 114), tile259 }, + { new Color(3, 198, 155), tile260 }, + { new Color(225, 246, 195), tile261 }, + { new Color(42, 248, 240), tile262 }, + { new Color(126, 32, 0), tile263 }, + { new Color(117, 170, 73), tile264 }, + { new Color(77, 228, 207), tile265 }, + { new Color(68, 13, 217), tile266 }, + { new Color(225, 192, 107), tile267 }, + { new Color(38, 125, 143), tile268 }, + { new Color(203, 140, 188), tile269 }, + { new Color(58, 195, 70), tile270 }, + { new Color(4, 248, 148), tile271 }, + { new Color(251, 255, 119), tile272 }, + { new Color(104, 204, 11), tile273 }, + { new Color(86, 109, 130), tile274 }, + { new Color(111, 15, 78), tile275 }, + { new Color(217, 29, 166), tile276 }, + { new Color(234, 14, 60), tile277 }, + { new Color(153, 33, 6), tile278 }, + { new Color(47, 186, 121), tile279 }, + { new Color(51, 95, 108), tile280 }, + { new Color(51, 68, 93), tile281 }, + { new Color(185, 112, 178), tile282 }, + { new Color(180, 82, 229), tile283 }, + { new Color(88, 219, 65), tile284 }, + { new Color(206, 139, 82), tile285 }, + { new Color(233, 183, 110), tile286 }, + { new Color(65, 241, 110), tile287 }, + { new Color(22, 79, 181), tile288 }, + { new Color(9, 106, 214), tile289 }, + { new Color(142, 203, 69), tile290 }, + { new Color(254, 52, 109), tile291 }, + { new Color(158, 34, 41), tile292 }, + { new Color(37, 181, 158), tile293 }, + { new Color(155, 36, 203), tile294 }, + { new Color(193, 146, 50), tile295 }, + { new Color(251, 203, 150), tile296 }, + { new Color(179, 70, 3), tile297 }, + { new Color(10, 242, 109), tile298 }, + { new Color(254, 29, 244), tile299 }, + { new Color(167, 175, 5), tile300 }, + { new Color(220, 38, 134), tile301 }, + { new Color(159, 89, 166), tile302 }, + { new Color(211, 47, 104), tile303 }, + { new Color(41, 195, 1), tile304 }, + { new Color(208, 165, 204), tile305 }, + { new Color(163, 85, 189), tile306 }, + { new Color(130, 14, 159), tile307 }, + { new Color(64, 218, 133), tile308 }, + { new Color(65, 244, 66), tile309 }, + { new Color(255, 160, 5), tile310 }, + { new Color(52, 126, 6), tile311 }, + { new Color(152, 191, 254), tile312 }, + { new Color(68, 33, 56), tile313 }, + { new Color(140, 39, 155), tile314 }, + { new Color(45, 138, 130), tile315 }, + { new Color(2, 58, 77), tile316 }, + { new Color(161, 90, 199), tile317 }, + { new Color(55, 36, 161), tile318 }, + { new Color(102, 155, 75), tile319 }, + { new Color(0, 94, 101), tile320 }, + { new Color(100, 212, 143), tile321 }, + { new Color(98, 245, 69), tile322 }, + { new Color(251, 55, 229), tile323 }, + { new Color(205, 94, 52), tile324 }, + { new Color(132, 246, 230), tile325 }, + { new Color(3, 19, 80), tile326 }, + { new Color(2, 63, 185), tile327 }, + { new Color(245, 93, 69), tile328 }, + { new Color(62, 253, 89), tile329 }, + { new Color(100, 50, 36), tile330 }, + { new Color(179, 67, 194), tile331 }, + { new Color(211, 40, 83), tile332 }, + { new Color(12, 202, 149), tile333 }, + { new Color(61, 6, 2), tile334 }, + { new Color(103, 211, 252), tile335 }, + { new Color(147, 178, 45), tile336 }, + { new Color(186, 98, 136), tile337 }, + { new Color(250, 254, 31), tile338 }, + { new Color(171, 110, 118), tile339 }, + { new Color(74, 36, 247), tile340 }, + { new Color(235, 150, 5), tile341 }, + { new Color(193, 26, 26), tile342 }, + { new Color(113, 176, 206), tile343 }, + { new Color(147, 247, 72), tile344 }, + { new Color(187, 197, 56), tile345 }, + { new Color(183, 142, 138), tile346 }, + { new Color(72, 171, 74), tile347 }, + { new Color(43, 170, 207), tile348 }, + { new Color(156, 184, 69), tile349 }, + { new Color(163, 39, 185), tile350 }, + { new Color(221, 194, 165), tile351 }, + { new Color(157, 81, 112), tile352 }, + { new Color(252, 165, 185), tile353 }, + { new Color(225, 33, 1), tile354 }, + { new Color(95, 39, 107), tile355 }, + { new Color(63, 63, 56), tile356 }, + { new Color(230, 244, 224), tile357 }, + { new Color(236, 1, 121), tile358 }, + { new Color(173, 191, 236), tile359 }, + }; + return new ColorTileMap(colorTileMap); + } + } +} diff --git a/Schematics/AutoGeneratedContent/Workshop2Schematic.png b/Schematics/AutoGeneratedContent/Workshop2Schematic.png new file mode 100644 index 0000000000000000000000000000000000000000..b5907e5892fc7b1a62c1d0d0b1869354ff0a45b7 GIT binary patch literal 2037 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!Tj+9eXB%KidQW2xp-ZD(Nxs(u@vgvYRTlyT9lMBq^(G8Yp9`8(kv4eeQ4zh&3BQ6 zQZgkC^@zkwl}|~Js0WP-rsfI*M0u?`JMaR=f2O!^GJ{oO9XmwnC?!uwC~eb zhyEbxe<^c&p_vnz7bnq%?kYMWXUH{!i$yTS=kF5fK^x<;F$~Q9`WV)(wY8S0O9*%*esZe8%wyN*S779lryKKxAUxFi=%L&R8TF#fbABW@e~ z9>iW(H4)ct>3-C`ED-CrnmPxs%pOBZWf>H%ALjF1zB&i-`WdjaoCB)2Q$UlnGR78V zVM6OFPVtRxTm(t!{>$WMUa`R|}d9XU8tYmRk2tvFrZhW{D_qHU%ULZ^HT>;03k)_fe- zM&gKxAx`YsOm%Rq}hEXPPiS#$0cnjblkx0Y%JsKdWT?M zU?UnUX>O0wHM1aTnSq197{gAd6CbA7p*JC8AP{}&1z1$2fRKO>M5+9`YC5WVEQX}t zTrU>e11&M_!CCBEQjC7X`}lUv9O!f;Kvi-K> zGO{wW7g@5Pat-=BRYNG`4u8!OdR|4LzNxRah&M(MiCS zXLsQ9t{0B9R-?`A3)nv@NA;9Mn5vMNpBFCH$aLF>Jau&*5DSD=g_lNF^%*CdIn6@T z)|W$8!h&FW{0?n?B2?mw#W-vewjIvI+-+V1ej-{>kz>zSJZj@zF|I|Q6MFi!ur;*| zdON@8f$-9Jr@ar2a77qtUq*kVD#{*M@-~w(ZGXaCu|(vErL}xX9NempBhes+Pxi{O z0y#feij_7op@FxX73Xno|CHx2zO@=Ft1e>Q3>~Cw_QS!>4|yr;rb?hiA^@~eGX=N& z58!JFEtF*2;Xn3C2&uQ{B5^(fVH185O~6*}?ocka!r^e$!dr}!bWR3wtBbhL3ybo( zu(_rsm%~-x6C1ZY1<9M<;rEE3uNSFW1!#V<5g*kp zDXoB9c?{p#`@*-wD>j)wj6#YS*zqn~@Cj5S{85+diJ4X|Sm#>_!vYEZ!V77`LQ<%Q zMMLYKblN(cjOEm5b;=cTp0tyCQg!K3rKXVa7dmcMA}myzqTkP?%bknKI!lMXFc}SQ=uU>RtRWQ%1!$0#4?JCnE1x|M$E{bHc7g5Fo8^iGDufbovcFJ zDSeGI^)~&^`ujZr&G`8Cxu@B zA;P|#5BA1f&pHPmGatC-dc3jLJ~|q_uT#o~Yqn?D35#EmHRAqY7%?LZr()bm$0U*# z3)E?U@qUTP0v%z`P|Ud6BWw+zEMArChZ*%;kA$}d(&%}SYn%3K^z3LEwx=nRe4h4@ z6?UXcqin7$-6Lj$K*)MC-Wo`BEEjx9*W)kJFyXPjNCWlxADW(Tvn6`qbBk zR1O=F?u2eq`tn}>!;6f6J2T?7F$C=Oy`#7XnT>6byLk`o)jRQhqc;2sPrXYhY?4D27?rSV2|pfrL!7D|pV7t#L!Ar;t5 TPL!%Z00000NkvXXu0mjf^AF@H literal 0 HcmV?d00001 diff --git a/Schematics/SchematicLoader.cs b/Schematics/SchematicLoader.cs index 2d222f8e80..96cc4afed8 100644 --- a/Schematics/SchematicLoader.cs +++ b/Schematics/SchematicLoader.cs @@ -27,7 +27,9 @@ namespace CalamityMod.Schematics { // Texture loading does not require a .png at the end of the path string. ["Workshop"] = LoadSchematicCodeAndTexture(typeof(WorkshopSchematic), "Schematics/AutoGeneratedContent/WorkshopSchematic"), - ["Plague Research Facility"] = LoadSchematicCodeAndTexture(typeof(ResearchFacilitySchematic), "Schematics/AutoGeneratedContent/ResearchFacilitySchematic"), + ["Workshop 2"] = LoadSchematicCodeAndTexture(typeof(Workshop2Schematic), "Schematics/AutoGeneratedContent/Workshop2Schematic"), + ["Research Facility"] = LoadSchematicCodeAndTexture(typeof(ResearchFacilitySchematic), "Schematics/AutoGeneratedContent/ResearchFacilitySchematic"), + ["Research Facility 2"] = LoadSchematicCodeAndTexture(typeof(ResearchFacility2Schematic), "Schematics/AutoGeneratedContent/ResearchFacility2Schematic"), ["Astral Beacon"] = LoadSchematicCodeAndTexture(typeof(AstralBeaconSchematic), "Schematics/AutoGeneratedContent/AstralBeaconSchematic") }; } diff --git a/Schematics/TileDefinitionStructure.cs b/Schematics/TileDefinitionStructure.cs index aa91696846..503934a5ac 100644 --- a/Schematics/TileDefinitionStructure.cs +++ b/Schematics/TileDefinitionStructure.cs @@ -62,5 +62,10 @@ namespace CalamityMod.Schematics SpecifiedTile.honey(liquidType == LiquidState.Honey); return this; } + public TileDefinitionStructure MakeActuated() + { + SpecifiedTile.inActive(true); + return this; + } } } diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index 4cdfc17fee..c0f878f065 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -1,6 +1,9 @@ +using CalamityMod.TileEntities; +using CalamityMod.Tiles; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using static CalamityMod.Schematics.SchematicLoader; @@ -29,6 +32,7 @@ namespace CalamityMod.Schematics { PilePlacementMaps.TryGetValue(mapKey, out PilePlacementFunction pilePlacementFunction); Tile[,] tiles = TileMaps[mapKey]; + ushort[,] oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; int xOffset = placementPosition.X; int yOffset = placementPosition.Y; // Top-left is the default for terraria. There is no need to include it in this switch. @@ -49,6 +53,16 @@ namespace CalamityMod.Schematics yOffset += tiles.GetLength(1); break; } + for (int x = 0; x < oldWalls.GetLength(0); x++) + { + for (int y = 0; y < oldWalls.GetLength(1); y++) + { + if (WorldGen.InWorld(x + xOffset, y + yOffset)) + { + oldWalls[x, y] = CalamityUtils.ParanoidTileRetrieval(x + xOffset, y + yOffset).wall; + } + } + } for (int x = 0; x < tiles.GetLength(0); x++) { for (int y = 0; y < tiles.GetLength(1); y++) @@ -67,14 +81,17 @@ namespace CalamityMod.Schematics chestInteraction?.Invoke(chest); } } + if (tiles[x, y].type == ModContent.TileType()) + { + WorldGen.PlaceTile(x, y, tiles[x, y].type); + } - ushort oldWall = Main.tile[x + xOffset, y + yOffset].wall; Main.tile[x + xOffset, y + yOffset] = (Tile)tiles[x, y].Clone(); // If specified, preserve walls if they're not not being overrided and there's no active tile in its place. - if (preserveWalls && Main.tile[x + xOffset, y + yOffset].wall == 0 && !Main.tile[x + xOffset, y + yOffset].active()) + if (preserveWalls && oldWalls[x, y] != 0 && tiles[x, y].wall == 0) { - Main.tile[x + xOffset, y + yOffset].wall = oldWall; + Main.tile[x + xOffset, y + yOffset].wall = oldWalls[x, y]; } Rectangle placeInArea = new Rectangle(x, y, tiles.GetLength(0), tiles.GetLength(1)); diff --git a/TileEntities/TEDraedonFuelFactory.cs b/TileEntities/TEDraedonFuelFactory.cs index 3d09bac2c1..eeb25fb214 100644 --- a/TileEntities/TEDraedonFuelFactory.cs +++ b/TileEntities/TEDraedonFuelFactory.cs @@ -30,7 +30,8 @@ namespace CalamityMod.TileEntities } Time++; - if (Time % 5 == 4 && Main.tileFrame[Main.tile[Position.X, Position.Y].type] == 43) + bool rightTimeToMakeCell = Time % 5 == 4 && Main.tileFrame[Main.tile[Position.X, Position.Y].type] == 43; + if (HeldItem.stack < HeldItem.maxStack && rightTimeToMakeCell) { HeldItem.stack++; } diff --git a/TileEntities/TEDraedonItemCharger.cs b/TileEntities/TEDraedonItemCharger.cs index 08c983da02..3ea5b1c28d 100644 --- a/TileEntities/TEDraedonItemCharger.cs +++ b/TileEntities/TEDraedonItemCharger.cs @@ -151,7 +151,7 @@ namespace CalamityMod.TileEntities } if (FuelItem.stack > 0 && ItemBeingCharged.stack > 0 && - Charge < CalamityGlobalItem.ChargeMax) + Charge < ItemBeingCharged.Calamity().ChargeMax) { if (Time % 25 == 0) { diff --git a/Tiles/DraedonItemCharger.cs b/Tiles/DraedonItemCharger.cs index 11f22a7a77..15681d4322 100644 --- a/Tiles/DraedonItemCharger.cs +++ b/Tiles/DraedonItemCharger.cs @@ -33,6 +33,10 @@ namespace CalamityMod.Tiles { int left = i - Main.tile[i, j].frameX % (Width * 18) / 18; int top = j - Main.tile[i, j].frameY % (Height * 18) / 18; + if (!TileEntity.ByPosition.ContainsKey(new Point16(left, top))) + { + TileEntity.ByPosition[new Point16(left, top)] = ModTileEntity.ConstructFromType(ModContent.TileEntityType()); + } return (TEDraedonItemCharger)TileEntity.ByPosition[new Point16(left, top)]; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/InactiveDraedonFuelFactory.cs b/Tiles/InactiveDraedonFuelFactory.cs new file mode 100644 index 0000000000..c4b27ceef8 --- /dev/null +++ b/Tiles/InactiveDraedonFuelFactory.cs @@ -0,0 +1,50 @@ +using CalamityMod.Items.Placeables; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles +{ + public class InactiveDraedonFuelFactory : ModTile + { + public override void SetDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileWaterDeath[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16 }; + TileObjectData.newTile.CoordinatePadding = 0; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Inactive Fuel Factory"); + AddMapEntry(new Color(67, 72, 81), name); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 226); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 32, ModContent.ItemType()); + } + } +} diff --git a/Tiles/InactiveDraedonFuelFactory.png b/Tiles/InactiveDraedonFuelFactory.png new file mode 100644 index 0000000000000000000000000000000000000000..44a65635b3d6f94d9d87c60c197a2d291ec06a8e GIT binary patch literal 929 zcmV;S177@zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY12#!SK~#8N?U}o8 z6G0Hh9VE9rA`lheB;YEDhbU+eP(VikHGcyIJrz9#e*-lXbWi}Ip+G!DDnk+j6#|7v z>%wRz^PPNOZnVxhmy5LXlTP1mytdafb2GD-x$$`1$(eno*%AgY&6Y5LX|{v`OtU2n zV45vq0Ml#<1DIw@7{D}J!T_e(5(Y5MmO0az>2|xd9xjeXqaE8r9U=luX9f{)@9rI) zuMfYgF7%G6^8EgThpG_)Ez_6*#MAJ$!1KLAKH6xL-HM2a0Mo)_w{P9lIry>hNA>9ZK~?bR@e|eUdWs{X z?TCm7@H`LT>D23WJ=AtYLb1>`YVE*RaC)L#NKyHf&FfBSOFUuapIssXOp6Hc>OCxsbGO%n4_}_aY#*o=>X)Ssl*{ zu-@xy;xuS%sR9fl03Dv^c>qs%>%3Fiw5PXezaP1bBLGAdFt!*#>ZM%bdAa1?#%S94*V`Aa)4=Z8m#iRz**ZneKB4( z=JnpG&D)Q+9;ALpoCb|#72xOpUKZv$j3+P*_v!#WI?fslp7d;Y9~>zls(?`#Ks;S_ zAB)B1k_eFtS=s~HTux~?sZD~c%y@st=iqZaurKTr`)2reMh-}w0nh>Bb-s7e!2!=p zh?*)dPl9SuRkMZE_u+eRk9!?q@lWyt~x{H(}d00000NkvXXu0mjf DFd49@ literal 0 HcmV?d00001 diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index cf29374c75..86f145ba1d 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -907,19 +907,26 @@ namespace CalamityMod.World tasks.Insert(FinalIndex + 3, new PassLegacy("Rust and Dust", (GenerationProgress progress) => { List workshopPositions = new List(); - int workshopCount = Main.maxTilesX / 600; - int labCount = Main.maxTilesX / 1100; + int workshopCount = Main.maxTilesX / 1200; + int labCount = Main.maxTilesX / 1800; DraedonStructures.DraedonsLogWorkshopIndex = WorldGen.genRand.Next(workshopCount); for (int i = 0; i < workshopCount; i++) { - DraedonStructures.PlaceWorkshop(out Point placementPosition, workshopPositions); + DraedonStructures.PlaceWorkshop(out Point placementPosition, workshopPositions, "Workshop"); DraedonStructures.CurrentWorkshopIndex = i; workshopPositions.Add(placementPosition); + + DraedonStructures.PlaceWorkshop(out Point placementPosition2, workshopPositions, "Workshop 2"); + DraedonStructures.CurrentWorkshopIndex = i; + workshopPositions.Add(placementPosition2); } for (int i = 0; i < labCount; i++) { - DraedonStructures.PlacePlagueLab(out Point placementPosition2, workshopPositions); + DraedonStructures.PlaceResearchFacility(out Point placementPosition, workshopPositions, "Research Facility"); + workshopPositions.Add(placementPosition); + + DraedonStructures.PlaceResearchFacility(out Point placementPosition2, workshopPositions, "Research Facility 2"); workshopPositions.Add(placementPosition2); } })); diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index f835360954..526553d08d 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -89,7 +89,7 @@ namespace CalamityMod.World } return false; } - public static void PlaceWorkshop(out Point placementPoint, List workshopPoints) + public static void PlaceWorkshop(out Point placementPoint, List workshopPoints, string mapKey) { int tries = 0; @@ -99,7 +99,7 @@ namespace CalamityMod.World int placementPositionY = WorldGen.genRand.Next(underworldTop - 550, underworldTop - 50); placementPoint = new Point(placementPositionX, placementPositionY); - Vector2 schematicSize = new Vector2(SchematicLoader.TileMaps["Workshop"].GetLength(0), SchematicLoader.TileMaps["Workshop"].GetLength(1)); + Vector2 schematicSize = new Vector2(SchematicLoader.TileMaps[mapKey].GetLength(0), SchematicLoader.TileMaps[mapKey].GetLength(1)); int activeTilesInArea = 0; int xCheckArea = 40; bool canGenerateInLocation = true; @@ -127,9 +127,9 @@ namespace CalamityMod.World return; goto TryAgain; // Try again elsewhere if the correct conditions are not met. (Yes, I'm using a goto. Please don't kill me) } - SchematicPlacementHelpers.PlaceStructure("Workshop", new Point(placementPoint.X, placementPoint.Y), SchematicPlacementHelpers.PlacementAnchorType.TopLeft, FillWorkshopChest); + SchematicPlacementHelpers.PlaceStructure(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicPlacementHelpers.PlacementAnchorType.TopLeft, FillWorkshopChest); } - public static void PlacePlagueLab(out Point placementPoint, List workshopPoints) + public static void PlaceResearchFacility(out Point placementPoint, List workshopPoints, string mapKey) { int tries = 0; @@ -139,7 +139,7 @@ namespace CalamityMod.World int placementPositionY = WorldGen.genRand.Next(underworldTop - 400, underworldTop - 50); placementPoint = new Point(placementPositionX, placementPositionY); - Vector2 schematicSize = new Vector2(SchematicLoader.TileMaps["Plague Research Facility"].GetLength(0), SchematicLoader.TileMaps["Plague Research Facility"].GetLength(1)); + Vector2 schematicSize = new Vector2(SchematicLoader.TileMaps[mapKey].GetLength(0), SchematicLoader.TileMaps[mapKey].GetLength(1)); int activeTilesInArea = 0; int xCheckArea = 30; bool canGenerateInLocation = true; @@ -167,7 +167,7 @@ namespace CalamityMod.World return; goto TryAgain; // Try again elsewhere if the correct conditions are not met. (Yes, I'm using a goto. Please don't kill me) } - SchematicPlacementHelpers.PlaceStructure("Plague Research Facility", new Point(placementPoint.X, placementPoint.Y), SchematicPlacementHelpers.PlacementAnchorType.TopLeft, FillLaboratoryChest); + SchematicPlacementHelpers.PlaceStructure(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicPlacementHelpers.PlacementAnchorType.TopLeft, FillLaboratoryChest); } } } From 097601f5a089a855b13ac5943edb62ecae72a2c8 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Mon, 20 Jul 2020 15:38:45 -0500 Subject: [PATCH 02/71] Dumb error fix made by a merge conflict fix --- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 5c162e0523..643f2ba7fb 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -9,6 +9,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class PlasmaCaster : ModItem { + public const int BaseDamage = 1100; public override void SetStaticDefaults() { DisplayName.SetDefault("Plasma Caster"); @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 62; item.height = 30; item.magic = true; - item.damage = 1100; + item.damage = BaseDamage; item.knockBack = 7f; item.useTime = 45; item.useAnimation = 45; From 40ba66649bc88fc396650e4d4c668dc6e39a2aba Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 18:29:09 -0400 Subject: [PATCH 03/71] eclipse's fall randomization fix --- Projectiles/Rogue/EclipsesFallMain.cs | 91 ++++++++++++++------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/Projectiles/Rogue/EclipsesFallMain.cs b/Projectiles/Rogue/EclipsesFallMain.cs index bbe31e0aee..94dfe345b5 100644 --- a/Projectiles/Rogue/EclipsesFallMain.cs +++ b/Projectiles/Rogue/EclipsesFallMain.cs @@ -7,63 +7,64 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { - public class EclipsesFallMain : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Eclipse's Fall"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } + public class EclipsesFallMain : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eclipse's Fall"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } - public override void SetDefaults() - { - projectile.width = 26; - projectile.height = 26; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; - projectile.extraUpdates = 1; - projectile.ignoreWater = true; - projectile.tileCollide = false; - projectile.timeLeft = 300; - projectile.Calamity().rogue = true; - } + public override void SetDefaults() + { + projectile.width = 26; + projectile.height = 26; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.extraUpdates = 1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.timeLeft = 300; + projectile.Calamity().rogue = true; + } - public override void AI() - { - if (Main.rand.NextBool(8)) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 138, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); - } - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; - } + public override void AI() + { + if (Main.rand.NextBool(8)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 138, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; + } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { SpawnSpears(target.Center); - } + } - public override void OnHitPvp(Player target, int damage, bool crit) - { + public override void OnHitPvp(Player target, int damage, bool crit) + { SpawnSpears(target.Center); - } + } private void SpawnSpears(Vector2 targetPos) { - for (int n = 0; n < Main.rand.Next(3, 6); n++) //3 to 5 spears - { + int spearAmt = Main.rand.Next(3, 6); //3 to 5 spears + for (int n = 0; n < spearAmt; n++) + { float dmgMult = 0.08f * Main.rand.NextFloat(4f, 7f); float kBMult = 0.1f * Main.rand.NextFloat(7f, 10f); CalamityUtils.ProjectileRain(targetPos, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), (int)(projectile.damage * dmgMult), projectile.knockBack * kBMult, projectile.owner); - } + } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); - return false; - } - } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } } From 3072a3331bf7e45455223dc6c1166d19524533e3 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Mon, 20 Jul 2020 18:45:01 -0400 Subject: [PATCH 04/71] Gauss Dagger projectile name fix --- Projectiles/DraedonsArsenal/GaussFlux.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/DraedonsArsenal/GaussFlux.cs b/Projectiles/DraedonsArsenal/GaussFlux.cs index 1b900c0ad2..6c5c2ac096 100644 --- a/Projectiles/DraedonsArsenal/GaussFlux.cs +++ b/Projectiles/DraedonsArsenal/GaussFlux.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void SetStaticDefaults() { - DisplayName.SetDefault("Voltage Stream"); + DisplayName.SetDefault("Gauss Flux"); } public override void SetDefaults() From 364c33da8ea8cae1ee94e0cb97c0da535cf79083 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 19:31:48 -0400 Subject: [PATCH 05/71] boosted blighted gel drop rate on ebonian blight slimes --- NPCs/NormalNPCs/EbonianBlightSlime.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index ef34eb3210..60c5b8402d 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void NPCLoot() { - DropHelper.DropItem(npc, ModContent.ItemType(), 15, 16); + DropHelper.DropItem(npc, ModContent.ItemType(), 15, 20); DropHelper.DropItem(npc, ItemID.Gel, 10, 14); } } From d716ea1732d8e0522016536851f044dd3acd9951 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 19:39:51 -0400 Subject: [PATCH 06/71] changed deus ritual to use the boss message util --- NPCs/CalamityGlobalNPCLoot.cs | 2 +- Projectiles/Boss/DeusRitualDrama.cs | 45 ++++++++++++----------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 846816df4b..b8fbd408db 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1323,7 +1323,7 @@ namespace CalamityMod.NPCs // Blood Orb drops: Valid enemy during a blood moon on the Surface if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && Main.bloodMoon && npc.HasPlayerTarget && npc.position.Y / 16D < Main.worldSurface) { - if (Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].Calamity().bloodflareSet) + if (Main.player[Player.FindClosest(npc.Center, npc.width, npc.height)].Calamity().bloodflareSet) { DropHelper.DropItemChance(npc, ModContent.ItemType(), 2); // 50% chance of 1 orb with Bloodflare } diff --git a/Projectiles/Boss/DeusRitualDrama.cs b/Projectiles/Boss/DeusRitualDrama.cs index df72616b52..20f12a90fd 100644 --- a/Projectiles/Boss/DeusRitualDrama.cs +++ b/Projectiles/Boss/DeusRitualDrama.cs @@ -37,32 +37,25 @@ namespace CalamityMod.Projectiles.Boss projectile.timeLeft = TotalRitualTime; } - public override void AI() - { - Time++; - if (Time == TotalRitualTime - PulseTime) - { - int idx = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); - if (idx != -1) - { - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue("Announcement.HasAwoken", Main.npc[idx].TypeName), new Color(175, 75, 255)); - return; - } - - if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", new object[] - { - Main.npc[idx].GetTypeNetName() - }), new Color(175, 75, 255)); - return; - } - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); - } - } - } + public override void AI() + { + Time++; + if (Time == TotalRitualTime - PulseTime) + { + int idx = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); + if (idx != -1) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + CalamityUtils.BossAwakenMessage(idx); + } + else + { + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); + } + } + } + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { From 5a9ce35930314bbd5ec2a276bff23d711b1aa638 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 20:43:15 -0400 Subject: [PATCH 07/71] minor global npc cleanup --- NPCs/CalamityGlobalNPC.cs | 73 ++++++++++++++------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5bd2a8dca7..bd843df76a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3888,28 +3888,13 @@ namespace CalamityMod.NPCs if (Main.rand.NextBool(maxValue) && Main.wallDungeon[Main.tile[(int)npc.Center.X / 16, (int)npc.Center.Y / 16].wall]) { - int randomType = Main.rand.Next(4); - switch (randomType) - { - case 0: - randomType = NPCType(); - break; - - case 1: - randomType = NPCType(); - break; - - case 2: - randomType = NPCType(); - break; - - case 3: - randomType = NPCType(); - break; - - default: - break; - } + int randomType = Utils.SelectRandom(Main.rand, new int[] + { + NPCType(), + NPCType(), + NPCType(), + NPCType() + }); NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, randomType, 0, 0f, 0f, 0f, 0f, 255); } @@ -3931,25 +3916,22 @@ namespace CalamityMod.NPCs { if (Main.netMode != NetmodeID.MultiplayerClient) { - int num261 = Main.rand.Next(2) + 2; - int num; - for (int num262 = 0; num262 < num261; num262 = num + 1) + int slimeAmt = Main.rand.Next(2) + 2; //2 to 3 extra + for (int s = 0; s < slimeAmt; s++) { - int num263 = NPC.NewNPC((int)(npc.position.X + npc.width / 2), (int)(npc.position.Y + npc.height), 1, 0, 0f, 0f, 0f, 0f, 255); - NPC npc2 = Main.npc[num263]; - npc2.SetDefaults(-5, -1f); + int slime = NPC.NewNPC((int)npc.Center.X, (int)(npc.position.Y + npc.height), NPCID.BlueSlime, 0, 0f, 0f, 0f, 0f, 255); + NPC npc2 = Main.npc[slime]; + npc2.SetDefaults(NPCID.BabySlime); npc2.velocity.X = npc.velocity.X * 2f; npc2.velocity.Y = npc.velocity.Y; - npc2.velocity.X += Main.rand.Next(-20, 20) * 0.1f + num262 * npc.direction * 0.3f; - npc2.velocity.Y -= Main.rand.Next(0, 10) * 0.1f + num262; + npc2.velocity.X += Main.rand.Next(-20, 20) * 0.1f + s * npc.direction * 0.3f; + npc2.velocity.Y -= Main.rand.Next(0, 10) * 0.1f + s; npc2.ai[0] = -1000 * Main.rand.Next(3); - if (Main.netMode == NetmodeID.Server && num263 < 200) + if (Main.netMode == NetmodeID.Server && slime < Main.maxNPCs) { - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num263, 0f, 0f, 0f, 0, 0, 0); + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, slime, 0f, 0f, 0f, 0, 0, 0); } - - num = num262; } } } @@ -4445,7 +4427,6 @@ namespace CalamityMod.NPCs dust.alpha = 200; dust.velocity.Y -= 0.2f; dust.velocity *= 1.2f; - dust = Main.dust[num4]; dust.scale += Main.rand.NextFloat(); } } @@ -4547,10 +4528,8 @@ namespace CalamityMod.NPCs { if (Main.rand.NextBool(5)) { - Vector2 vector2_2 = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); - vector2_2.Normalize(); - vector2_2.X *= 0.66f; - int heart = Gore.NewGore(npc.position + new Vector2((float)Main.rand.Next(npc.width + 1), (float)Main.rand.Next(npc.height + 1)), vector2_2 * (float)Main.rand.Next(3, 6) * 0.33f, 331, (float)Main.rand.Next(40, 121) * 0.01f); + Vector2 velocity = CalamityUtils.RandomVelocity(10f, 1f, 1f, 0.66f); + int heart = Gore.NewGore(npc.position + new Vector2(Main.rand.Next(npc.width + 1), Main.rand.Next(npc.height + 1)), velocity * Main.rand.Next(3, 6) * 0.33f, 331, Main.rand.Next(40, 121) * 0.01f); Main.gore[heart].sticky = false; Main.gore[heart].velocity *= 0.4f; Main.gore[heart].velocity.Y -= 0.6f; @@ -6142,7 +6121,7 @@ namespace CalamityMod.NPCs } int players = 0; - for (int i = 0; i < 255; i++) + for (int i = 0; i < Main.maxPlayers; i++) { if (Main.player[i] != null && Main.player[i].active) { @@ -6188,14 +6167,14 @@ namespace CalamityMod.NPCs { if (plr == Main.myPlayer && projectile.ai[0] == 0f) { - for (int num13 = 0; num13 < Main.maxInventory; num13++) + for (int item = 0; item < Main.maxInventory; item++) { - if (player.inventory[num13].type == baitType) + if (player.inventory[item].type == baitType) { - player.inventory[num13].stack--; - if (player.inventory[num13].stack <= 0) + player.inventory[item].stack--; + if (player.inventory[item].stack <= 0) { - player.inventory[num13].SetDefaults(0, false); + player.inventory[item].SetDefaults(0, false); } break; } @@ -6206,8 +6185,8 @@ namespace CalamityMod.NPCs if (Main.netMode != NetmodeID.MultiplayerClient) { - int num8 = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y + 100, type); - CalamityUtils.BossAwakenMessage(num8); + int boss = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y + 100, type); + CalamityUtils.BossAwakenMessage(boss); } else { From 977d47d00138d9e34dd7cf63e20b1be99158ffed Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 20 Jul 2020 20:08:46 -0500 Subject: [PATCH 08/71] 1 - Eidolon Wyrms swim down and despawn when their target dies. 2 - Leviathan and Anahita hit their final phases at 20% instead of 10%. --- NPCs/Abyss/EidolonWyrmHead.cs | 27 ++++++++++++++++++++------- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 23 ++++++++++++++++++++--- NPCs/Leviathan/Leviathan.cs | 2 +- NPCs/Leviathan/Siren.cs | 2 +- 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index a544e54f1d..65e9ff160c 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.Abyss public override void AI() { - if (npc.justHit || npc.life <= npc.lifeMax * 0.98 || Main.player[npc.target].chaosState) + if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState) { detectsPlayer = true; npc.damage = Main.expertMode ? 340 : 170; @@ -221,16 +221,29 @@ namespace CalamityMod.NPCs.Abyss { npc.spriteDirection = 1; } - if (Main.player[npc.target].dead) - { - npc.TargetClosest(false); - } - npc.alpha -= 42; + if (Main.player[npc.target].dead) + { + npc.TargetClosest(false); + + npc.velocity.Y += 3f; + if (npc.position.Y > Main.worldSurface * 16.0) + npc.velocity.Y += 3f; + + if (npc.position.Y > (Main.maxTilesY - 200) * 16.0) + { + for (int a = 0; a < Main.maxNPCs; a++) + { + if (Main.npc[a].type == npc.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; + } + } + } + npc.alpha -= 42; if (npc.alpha < 0) { npc.alpha = 0; } - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType()) || !Main.player[npc.target].Calamity().ZoneAbyss) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType())) { npc.active = false; } diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 6df38e3267..91da677794 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.Abyss { npc.TargetClosest(true); } - if (npc.justHit || npc.life <= npc.lifeMax * 0.98 || Main.player[npc.target].chaosState) + if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState) { if (!detectsPlayer) { @@ -216,6 +216,7 @@ namespace CalamityMod.NPCs.Abyss } } } + if (npc.velocity.X < 0f) { npc.spriteDirection = -1; @@ -224,16 +225,32 @@ namespace CalamityMod.NPCs.Abyss { npc.spriteDirection = 1; } + if (Main.player[npc.target].dead) { npc.TargetClosest(false); - } + + npc.velocity.Y += 3f; + if (npc.position.Y > Main.worldSurface * 16.0) + npc.velocity.Y += 3f; + + if (npc.position.Y > (Main.maxTilesY - 200) * 16.0) + { + for (int a = 0; a < Main.maxNPCs; a++) + { + if (Main.npc[a].type == npc.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; + } + } + } + npc.alpha -= 42; if (npc.alpha < 0) { npc.alpha = 0; } - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType())) + + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType())) { npc.active = false; } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index f8e6cbef7e..3922b8cd9f 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.Leviathan // Phases bool phase2 = (lifeRatio < 0.7f && expertMode) || death; bool phase3 = lifeRatio < 0.4f; - bool phase4 = lifeRatio < 0.1f; + bool phase4 = lifeRatio < 0.2f; npc.spriteDirection = (npc.direction > 0) ? 1 : -1; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 4f2cebfad0..8bc68e7645 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.Leviathan // Phases bool phase2 = lifeRatio < 0.7f; bool phase3 = lifeRatio < 0.4f; - bool phase4 = lifeRatio < 0.1f; + bool phase4 = lifeRatio < 0.2f; // Spawn Leviathan and Clones, change music if (Main.netMode != NetmodeID.MultiplayerClient) From 8bc553c296e1a024ae635a5000f01afcb3c30ad1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 21:16:13 -0400 Subject: [PATCH 09/71] added world bools for every town npc that has patron names --- NPCs/CalamityGlobalNPC.cs | 78 +++++++++++++++++++- World/CalamityWorld.cs | 147 +++++++++++++++++++++++++++++++++++--- 2 files changed, 214 insertions(+), 11 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 47a323ba70..3f95c672e9 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -471,6 +471,33 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref SCalCatastrophe, NPCType()); ResetSavedIndex(ref SCal, NPCType()); ResetSavedIndex(ref SCalWorm, NPCType()); + + if (NPC.FindFirstNPC(NPCID.Guide) == -1) + CalamityWorld.guideName = false; + if (NPC.FindFirstNPC(NPCID.Wizard) == -1) + CalamityWorld.wizardName = false; + if (NPC.FindFirstNPC(NPCID.Steampunker) == -1) + CalamityWorld.steampunkerName = false; + if (NPC.FindFirstNPC(NPCID.Stylist) == -1) + CalamityWorld.stylistName = false; + if (NPC.FindFirstNPC(NPCID.WitchDoctor) == -1) + CalamityWorld.witchDoctorName = false; + if (NPC.FindFirstNPC(NPCID.TaxCollector) == -1) + CalamityWorld.taxCollectorName = false; + if (NPC.FindFirstNPC(NPCID.Pirate) == -1) + CalamityWorld.pirateName = false; + if (NPC.FindFirstNPC(NPCID.Mechanic) == -1) + CalamityWorld.mechanicName = false; + if (NPC.FindFirstNPC(NPCID.ArmsDealer) == -1) + CalamityWorld.armsDealerName = false; + if (NPC.FindFirstNPC(NPCID.Dryad) == -1) + CalamityWorld.dryadName = false; + if (NPC.FindFirstNPC(NPCID.Nurse) == -1) + CalamityWorld.nurseName = false; + if (NPC.FindFirstNPC(NPCID.Angler) == -1) + CalamityWorld.anglerName = false; + if (NPC.FindFirstNPC(NPCID.Clothier) == -1) + CalamityWorld.clothierName = false; } #endregion @@ -2453,43 +2480,55 @@ namespace CalamityMod.NPCs switch (npc.type) { case NPCID.Guide: + if (CalamityWorld.guideName) + break; switch (Main.rand.Next(38)) // 34 guide names { case 0: npc.GivenName = "Lapp"; + CalamityWorld.guideName = true; break; case 1: npc.GivenName = "Ben Shapiro"; + CalamityWorld.guideName = true; break; case 2: npc.GivenName = "StreakistYT"; + CalamityWorld.guideName = true; break; case 3: npc.GivenName = "Neoplasmatic"; + CalamityWorld.guideName = true; break; default: + CalamityWorld.guideName = true; break; } break; case NPCID.Wizard: + if (CalamityWorld.wizardName) + break; switch (Main.rand.Next(26)) // 23 wizard names { case 0: npc.GivenName = "Mage One-Trick"; + CalamityWorld.wizardName = true; break; case 1: npc.GivenName = "Inorim, son of Ivukey"; + CalamityWorld.wizardName = true; break; case 2: npc.GivenName = "Jensen"; + CalamityWorld.wizardName = true; break; default: @@ -2499,14 +2538,18 @@ namespace CalamityMod.NPCs break; case NPCID.Steampunker: + if (CalamityWorld.steampunkerName) + break; switch (Main.rand.Next(23)) // 21 steampunker names { case 0: npc.GivenName = "Vorbis"; + CalamityWorld.steampunkerName = true; break; case 1: npc.GivenName = "Angel"; + CalamityWorld.steampunkerName = true; break; default: @@ -2516,10 +2559,13 @@ namespace CalamityMod.NPCs break; case NPCID.Stylist: + if (CalamityWorld.stylistName) + break; switch (Main.rand.Next(21)) // 20 stylist names { case 0: npc.GivenName = "Amber"; + CalamityWorld.stylistName = true; break; default: @@ -2529,10 +2575,13 @@ namespace CalamityMod.NPCs break; case NPCID.WitchDoctor: + if (CalamityWorld.witchDoctorName) + break; switch (Main.rand.Next(11)) // 10 witch doctor names { case 0: npc.GivenName = "Sok'ar"; + CalamityWorld.witchDoctorName = true; break; default: @@ -2542,10 +2591,13 @@ namespace CalamityMod.NPCs break; case NPCID.TaxCollector: + if (CalamityWorld.taxCollectorName) + break; switch (Main.rand.Next(21)) // 20 tax collector names { case 0: npc.GivenName = "Emmett"; + CalamityWorld.taxCollectorName = true; break; default: @@ -2555,10 +2607,13 @@ namespace CalamityMod.NPCs break; case NPCID.Pirate: + if (CalamityWorld.pirateName) + break; switch (Main.rand.Next(12)) // 11 pirate names { case 0: npc.GivenName = "Tyler Van Hook"; + CalamityWorld.pirateName = true; break; default: @@ -2568,14 +2623,18 @@ namespace CalamityMod.NPCs break; case NPCID.Mechanic: + if (CalamityWorld.mechanicName) + break; switch (Main.rand.Next(26)) // 24 mechanic names { case 0: npc.GivenName = "Lilly"; + CalamityWorld.mechanicName = true; break; case 1: npc.GivenName = "Daawn"; + CalamityWorld.mechanicName = true; break; default: @@ -2585,14 +2644,18 @@ namespace CalamityMod.NPCs break; case NPCID.ArmsDealer: + if (CalamityWorld.armsDealer) + break; switch (Main.rand.Next(26)) // 24 arms dealer names { case 0: npc.GivenName = "Drifter"; + CalamityWorld.armsDealer = true; break; case 1: npc.GivenName = "Finchi"; + CalamityWorld.armsDealer = true; break; default: @@ -2602,14 +2665,18 @@ namespace CalamityMod.NPCs break; case NPCID.Dryad: + if (CalamityWorld.dryadName) + break; switch (Main.rand.Next(23)) // 21 Dryad names { case 0: npc.GivenName = "Rythmi"; + CalamityWorld.dryadName = true; break; case 1: - npc.GivenName = "Izuna"; + npc.GivenName = "Izuna"; + CalamityWorld.dryadName = true; break; default: @@ -2619,10 +2686,13 @@ namespace CalamityMod.NPCs break; case NPCID.Nurse: + if (CalamityWorld.nurseName) + break; switch (Main.rand.Next(25)) // 24 nurse names { case 0: npc.GivenName = "Farsni"; + CalamityWorld.nurseName = true; break; default: @@ -2632,10 +2702,13 @@ namespace CalamityMod.NPCs break; case NPCID.Angler: + if (CalamityWorld.anglerName) + break; switch (Main.rand.Next(23)) // 22 angler names { case 0: npc.GivenName = "Dazren"; + CalamityWorld.anglerName = true; break; default: @@ -2645,10 +2718,13 @@ namespace CalamityMod.NPCs break; case NPCID.Clothier: + if (CalamityWorld.clothierName) + break; switch (Main.rand.Next(26)) // 25 clothier names { case 0: npc.GivenName = "Joeseph Jostar"; + CalamityWorld.clothierName = true; break; default: diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index b78ecb7df1..583e9e8349 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -136,10 +136,23 @@ namespace CalamityMod.World public static int[] SChestY = new int[10]; public static bool roxShrinePlaced = false; - //Spawned NPCs + //Town NPC bools public static bool spawnedBandit = false; public static bool spawnedCirrus = false; public static bool foundHomePermafrost = false; + public static bool guideName = false; + public static bool wizardName = false; + public static bool steampunkerName = false; + public static bool stylistName = false; + public static bool witchDoctorName = false; + public static bool taxCollectorName = false; + public static bool pirateName = false; + public static bool mechanicName = false; + public static bool armsDealerName = false; + public static bool dryadName = false; + public static bool nurseName = false; + public static bool anglerName = false; + public static bool clothierName = false; #region Downed Bools public static bool downedBossAny = false; //Any boss @@ -222,6 +235,19 @@ namespace CalamityMod.World spawnedBandit = false; spawnedCirrus = false; foundHomePermafrost = false; + guideName = false; + wizardName = false; + steampunkerName = false; + stylistName = false; + witchDoctorName = false; + taxCollectorName = false; + pirateName = false; + mechanicName = false; + armsDealerName = false; + dryadName = false; + nurseName = false; + anglerName = false; + clothierName = false; downedDesertScourge = false; downedAquaticScourge = false; downedHiveMind = false; @@ -371,6 +397,32 @@ namespace CalamityMod.World downed.Add("drunkPrincess"); if (foundHomePermafrost) downed.Add("archmageHome"); + if (guideName) + downed.Add("guideName"); + if (wizardName) + downed.Add("wizardName"); + if (steampunkerName) + downed.Add("steampunkerName"); + if (stylistName) + downed.Add("stylistName"); + if (witchDoctorName) + downed.Add("witchDoctorName"); + if (taxCollectorName) + downed.Add("taxCollectorName"); + if (pirateName) + downed.Add("pirateName"); + if (mechanicName) + downed.Add("mechanicName"); + if (armsDealerName) + downed.Add("armsDealerName"); + if (dryadName) + downed.Add("dryadName"); + if (nurseName) + downed.Add("nurseName"); + if (anglerName) + downed.Add("anglerName"); + if (clothierName) + downed.Add("clothierName"); if (downedEoCAcidRain) downed.Add("eocRain"); if (downedAquaticScourgeAcidRain) @@ -457,6 +509,19 @@ namespace CalamityMod.World spawnedBandit = downed.Contains("bandit"); spawnedCirrus = downed.Contains("drunkPrincess"); foundHomePermafrost = downed.Contains("archmageHome"); + guideName = downed.Contains("guideName"); + wizardName = downed.Contains("wizardName"); + steampunkerName = downed.Contains("stylistName"); + stylistName = downed.Contains("stylistName"); + witchDoctorName = downed.Contains("witchDoctorName"); + taxCollectorName = downed.Contains("taxCollectorName"); + pirateName = downed.Contains("pirateName"); + mechanicName = downed.Contains("mechanicName"); + armsDealerName = downed.Contains("armsDealerName"); + dryadName = downed.Contains("dryadName"); + nurseName = downed.Contains("nurseName"); + anglerName = downed.Contains("anglerName"); + clothierName = downed.Contains("clothierName"); downedEoCAcidRain = downed.Contains("eocRain"); downedAquaticScourgeAcidRain = downed.Contains("hmRain"); triedToSummonOldDuke = downed.Contains("spawnedBoomer"); @@ -559,9 +624,29 @@ namespace CalamityMod.World downedSecondSentinels = flags8[2]; foundHomePermafrost = flags8[3]; downedCLAMHardMode = flags8[4]; - _ = flags8[5]; - _ = flags8[6]; - _ = flags8[7]; + guideName = flags8[5]; + wizardName = flags8[6]; + steampunkerName = flags8[7]; + + BitsByte flags9 = reader.ReadByte(); + stylistName = flags9[0]; + witchDoctorName = flags9[1]; + taxCollectorName = flags9[2]; + pirateName = flags9[3]; + mechanicName = flags9[4]; + armsDealerName = flags9[5]; + dryadName = flags9[6]; + nurseName = flags9[7]; + + BitsByte flags10 = reader.ReadByte(); + anglerName = flags10[0]; + clothierName = flags10[1]; + _ = flags10[2]; + _ = flags10[3]; + _ = flags10[4]; + _ = flags10[5]; + _ = flags10[6]; + _ = flags10[7]; } else { @@ -650,9 +735,29 @@ namespace CalamityMod.World flags8[2] = downedSecondSentinels; flags8[3] = foundHomePermafrost; flags8[4] = downedCLAMHardMode; - flags8[5] = false; - flags8[6] = false; - flags8[7] = false; + flags8[5] = guideName; + flags8[6] = wizardName; + flags8[7] = steampunkerName; + + BitsByte flags9 = new BitsByte(); + flags9[0] = stylistName; + flags9[1] = witchDoctorName; + flags9[2] = taxCollectorName; + flags9[3] = pirateName; + flags9[4] = mechanicName; + flags9[5] = armsDealerName; + flags9[6] = dryadName; + flags9[7] = nurseName; + + BitsByte flags10 = new BitsByte(); + flags10[0] = anglerName; + flags10[1] = clothierName; + flags10[2] = false; + flags10[3] = false; + flags10[4] = false; + flags10[5] = false; + flags10[6] = false; + flags10[7] = false; writer.Write(flags); writer.Write(flags2); @@ -662,6 +767,8 @@ namespace CalamityMod.World writer.Write(flags6); writer.Write(flags7); writer.Write(flags8); + writer.Write(flags9); + writer.Write(flags10); writer.Write(abyssChasmBottom); writer.Write(acidRainPoints); writer.Write(Reforges); @@ -749,9 +856,29 @@ namespace CalamityMod.World downedSecondSentinels = flags8[2]; foundHomePermafrost = flags8[3]; downedCLAMHardMode = flags8[4]; - _ = flags8[5]; - _ = flags8[6]; - _ = flags8[7]; + guideName = flags8[5]; + wizardName = flags8[6]; + steampunkerName = flags8[7]; + + BitsByte flags9 = reader.ReadByte(); + stylistName = flags9[0]; + witchDoctorName = flags9[1]; + taxCollectorName = flags9[2]; + pirateName = flags9[3]; + mechanicName = flags9[4]; + armsDealerName = flags9[5]; + dryadName = flags9[6]; + nurseName = flags9[7]; + + BitsByte flags10 = reader.ReadByte(); + anglerName = flags10[0]; + clothierName = flags10[1]; + _ = flags10[2]; + _ = flags10[3]; + _ = flags10[4]; + _ = flags10[5]; + _ = flags10[6]; + _ = flags10[7]; abyssChasmBottom = reader.ReadInt32(); acidRainPoints = reader.ReadInt32(); From ded0079a80f32c9055159deb2ee80658baa51900 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 21:21:22 -0400 Subject: [PATCH 10/71] fixed some compile errors --- NPCs/CalamityGlobalNPC.cs | 6 +++--- Schematics/TilePlacementHelpers.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3f95c672e9..08a7b4e4b4 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2644,18 +2644,18 @@ namespace CalamityMod.NPCs break; case NPCID.ArmsDealer: - if (CalamityWorld.armsDealer) + if (CalamityWorld.armsDealerName) break; switch (Main.rand.Next(26)) // 24 arms dealer names { case 0: npc.GivenName = "Drifter"; - CalamityWorld.armsDealer = true; + CalamityWorld.armsDealerName = true; break; case 1: npc.GivenName = "Finchi"; - CalamityWorld.armsDealer = true; + CalamityWorld.armsDealerName = true; break; default: diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index 2d2c4b69ba..88ba08b4f7 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Schematics yOffset += tiles.GetLength(1); break; } - ushort[,] oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; + oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; for (int x = 0; x < tiles.GetLength(0); x++) { for (int y = 0; y < tiles.GetLength(1); y++) From 231152a834fcb774fae7d77a23fa9846d4406b36 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Jul 2020 21:36:09 -0400 Subject: [PATCH 11/71] forgot to add the bools to default --- NPCs/CalamityGlobalNPC.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 08a7b4e4b4..41437ebb1f 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2532,6 +2532,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.wizardName = true; break; } @@ -2553,6 +2554,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.steampunkerName = true; break; } @@ -2569,6 +2571,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.stylistName = true; break; } @@ -2585,6 +2588,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.witchDoctorName = true; break; } @@ -2601,6 +2605,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.taxCollectorName = true; break; } @@ -2617,6 +2622,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.pirateName = true; break; } @@ -2638,6 +2644,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.mechanicName = true; break; } @@ -2659,6 +2666,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.armsDealerName = true; break; } @@ -2680,6 +2688,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.dryadName = true; break; } @@ -2696,6 +2705,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.nurseName = true; break; } @@ -2712,6 +2722,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.anglerName = true; break; } @@ -2728,6 +2739,7 @@ namespace CalamityMod.NPCs break; default: + CalamityWorld.clothierName = true; break; } From ad63f71dd876034c952298448503dee5de6c7501 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:24:59 -0400 Subject: [PATCH 12/71] updated some lists --- CalamityMod.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 9ecaf7bd76..4e9bcc20f7 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1178,7 +1178,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; iceWeaponList = new List() @@ -1354,7 +1355,13 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() }; alcoholList = new List() @@ -2242,7 +2249,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; flaskBombProjList = new List() @@ -2272,7 +2280,8 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType() }; spikyBallList = new List() @@ -2415,6 +2424,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), From e155effda25c9f10b8d4f672611fc4efacbaf8e8 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Tue, 21 Jul 2020 11:35:16 -0400 Subject: [PATCH 13/71] No waifu vocabulary allowed --- Projectiles/Summon/BrimstoneElementalMinion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/BrimstoneElementalMinion.cs b/Projectiles/Summon/BrimstoneElementalMinion.cs index 258574dd22..5b45e67e2d 100644 --- a/Projectiles/Summon/BrimstoneElementalMinion.cs +++ b/Projectiles/Summon/BrimstoneElementalMinion.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - DisplayName.SetDefault("Big Busty Rose"); + DisplayName.SetDefault("Brimstone Elemental"); Main.projFrames[projectile.type] = 4; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; From c1c7d6bd31e62f1121b1b56c04d4a3c7603851d7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:08:50 -0400 Subject: [PATCH 14/71] aerospec valkyrie nerf --- Items/Armor/AerospecHelmet.cs | 2 +- Projectiles/Summon/Valkyrie.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index 79efe6f96b..60b5e75c02 100644 --- a/Items/Armor/AerospecHelmet.cs +++ b/Items/Armor/AerospecHelmet.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Armor } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(25f * (player.allDamage + player.minionDamage - 1f)), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(20 * player.MinionDamage()), 0f, Main.myPlayer, 0f, 0f); } } player.minionDamage += 0.16f; diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index 0c492c0bc0..f2f17b540c 100644 --- a/Projectiles/Summon/Valkyrie.cs +++ b/Projectiles/Summon/Valkyrie.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon projectile.friendly = true; projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + projectile.localNPCHitCooldown = 20; projectile.minionSlots = 0f; projectile.timeLeft = 18000; projectile.penetrate = -1; From d9c98362444205b14a08b56f0d9f1b1b3fca6838 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:14:06 -0400 Subject: [PATCH 15/71] buffed star swallowers --- .../DraedonsArsenal/PoleWarperSummon.cs | 2 +- .../DraedonsArsenal/StarSwallowerSummon.cs | 32 ++----------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs index c9284e2c9e..68d31b2395 100644 --- a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs +++ b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } GrantBuffs(player); NPC potentialTarget = projectile.Center.MinionHoming(900f, player); - if (potentialTarget == null) + if (potentialTarget is null) { PlayerMovement(player); RepelMovement(); diff --git a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs index 845249ad2f..31ccf5d54d 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal FallThroughYPoint = player.Top.Y; } - AntiStickyMovement(0.05f); + projectile.MinionAntiClump(); ManipulateFrames(minimumFrame, maximumFrame); } @@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (AcidShootTimer > 48) { AcidShootTimer = 0; - AcidShootCooldown = 30f; + AcidShootCooldown = 20f; projectile.netUpdate = true; } } @@ -269,34 +269,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal AcidShootCooldown--; projectile.velocity.X *= 0.8f; } - public void AntiStickyMovement(float antiStickAcceleration = 0.05f) - { - for (int index = 0; index < Main.projectile.Length; index++) - { - Projectile proj = Main.projectile[index]; - if (index != projectile.whoAmI && - proj.active && proj.owner == projectile.owner && - proj.type == projectile.type && Math.Abs(projectile.position.X - proj.position.X) + Math.Abs(projectile.position.Y - proj.position.Y) < projectile.width) - { - if (projectile.position.X < proj.position.X) - { - projectile.velocity.X -= antiStickAcceleration; - } - else - { - projectile.velocity.X += antiStickAcceleration; - } - if (projectile.position.Y < proj.position.Y) - { - projectile.velocity.Y -= antiStickAcceleration; - } - else - { - projectile.velocity.Y += antiStickAcceleration; - } - } - } - } public void ManipulateFrames(int minimumFrame, int maximumFrame) { if (projectile.frame < minimumFrame) From 9be5a30711c23aa6a39b2971f856a009f7b032e9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:23:54 -0400 Subject: [PATCH 16/71] number tweaks on some arsenal weapons and typing fixes --- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 2 +- Items/Weapons/DraedonsArsenal/PulsePistol.cs | 2 +- Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs | 3 ++- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 2 +- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 2 +- Projectiles/DraedonsArsenal/PulsePistolShot.cs | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 18de89b972..25e55ff861 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.mana = 12; item.width = 38; item.height = 24; - item.useTime = item.useAnimation = 30; + item.useTime = item.useAnimation = 10; item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 8f; diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index 1baec0fcff..ea765bf459 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { item.width = 62; item.height = 22; - item.ranged = true; + item.magic = true; item.damage = 22; item.knockBack = 0f; item.useTime = item.useAnimation = 20; diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index c651736a51..567ab9b6e3 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -18,10 +18,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { item.width = 28; item.height = 26; + item.summon = true; item.sentry = true; item.damage = 100; item.knockBack = 0f; - item.useTime = item.useAnimation = 35; + item.useTime = item.useAnimation = 25; item.autoReuse = true; item.useStyle = ItemUseStyleID.HoldingUp; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 647e28108a..4d643860de 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.mana = 12; item.width = 38; item.height = 24; - item.useTime = item.useAnimation = 30; + item.useTime = item.useAnimation = 15; item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 3f; diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index d6974f5e0f..fc8b8eb86f 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class TeslaCannon : ModItem { - private int BaseDamage = 9000; + private int BaseDamage = 10000; public override void SetStaticDefaults() { diff --git a/Projectiles/DraedonsArsenal/PulsePistolShot.cs b/Projectiles/DraedonsArsenal/PulsePistolShot.cs index 4aac3ce503..b7617f922b 100644 --- a/Projectiles/DraedonsArsenal/PulsePistolShot.cs +++ b/Projectiles/DraedonsArsenal/PulsePistolShot.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.width = 16; projectile.height = 16; projectile.friendly = true; - projectile.ranged = true; + projectile.magic = true; projectile.penetrate = 1; projectile.extraUpdates = 10; projectile.timeLeft = 120 * (1 + projectile.extraUpdates); From be33dca72eaef0be1f583745514cf31c560bddc8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:29:14 -0400 Subject: [PATCH 17/71] can you shut up about oldWalls? thank you --- CalamityMod.cs | 1 + Schematics/TilePlacementHelpers.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 4e9bcc20f7..492d9d62ed 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -59,6 +59,7 @@ using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; +using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Projectiles.Enemy; using CalamityMod.Projectiles.Hybrid; using CalamityMod.Projectiles.Magic; diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index 2d2c4b69ba..88ba08b4f7 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Schematics yOffset += tiles.GetLength(1); break; } - ushort[,] oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; + oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; for (int x = 0; x < tiles.GetLength(0); x++) { for (int y = 0; y < tiles.GetLength(1); y++) From c2290823aefd54785987b93b51da97bd55621bb8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:29:51 -0400 Subject: [PATCH 18/71] oh and this too --- CalamityMod.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index 492d9d62ed..fec5ad71ff 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -20,6 +20,7 @@ using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Tools; using CalamityMod.Items.TreasureBags; +using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; From 89b575a72342a879453416cdb3c696b43a14d998 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 19:44:10 -0400 Subject: [PATCH 19/71] tesla cannon and pulse rifle now have a max charge --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 1 + Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 1 + Items/Weapons/Summon/CosmicImmaterializer.cs | 24 +------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index a1caa6d4b9..d068d58d7d 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -44,6 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.shootSpeed = 5f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index fc8b8eb86f..4572941d5f 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -43,6 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.shootSpeed = 5f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index a5fbf51a9a..a332199476 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -47,29 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon { CalamityPlayer modPlayer = player.Calamity(); bool hasSummonerSet = modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet; //demonshade included so summoner isn't forced to use auric for BR - player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num80 = item.shootSpeed; - } - else - { - num80 = item.shootSpeed / num80; - } - num78 = 0f; - num79 = 0f; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Projectile.NewProjectile(vector2.X, vector2.Y, num78, num79, type, (int)((double)damage * (hasSummonerSet ? 1.0 : 0.66)), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, (int)(damage * (hasSummonerSet ? 1 : 0.66)), knockBack, player.whoAmI, 0f, 0f); return false; } From 454623075a916db18147d85638d4a6e16a1f5021 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Jul 2020 20:12:25 -0400 Subject: [PATCH 20/71] voltage streams should now give diminishing returns --- Projectiles/DraedonsArsenal/VoltageStream.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Projectiles/DraedonsArsenal/VoltageStream.cs b/Projectiles/DraedonsArsenal/VoltageStream.cs index f0fce021cf..f1126050b0 100644 --- a/Projectiles/DraedonsArsenal/VoltageStream.cs +++ b/Projectiles/DraedonsArsenal/VoltageStream.cs @@ -97,8 +97,26 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.Kill(); } Time++; + + if (projectile.damage <= 0) + projectile.Kill(); } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + ReduceDamage(); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + ReduceDamage(); + } + + private void ReduceDamage() + { + projectile.damage = (int)(projectile.damage * 0.75); + } + public override void Kill(int timeLeft) { } From 315e74aef680cbb47a3d28129a2383a68c34e0d2 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Tue, 21 Jul 2020 21:44:51 -0500 Subject: [PATCH 21/71] 1 - Ravager fix?????????????? 2 - Post-ML town NPC damage and defense scaling. --- NPCs/CalamityGlobalNPC.cs | 40 ++++++++++++++++++++++++++++++++++--- NPCs/Ravager/RavagerBody.cs | 4 +--- NPCs/TownNPCs/FAP.cs | 2 +- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 47a323ba70..3ec1e0003d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5665,10 +5665,44 @@ namespace CalamityMod.NPCs break; } } - #endregion + #endregion - #region Shop Stuff - public override void SetupShop(int type, Chest shop, ref int nextSlot) + public override void BuffTownNPC(ref float damageMult, ref int defense) + { + if (NPC.downedMoonlord) + { + damageMult += 0.6f; + defense += 20; + } + if (CalamityWorld.downedProvidence) + { + damageMult += 0.2f; + defense += 12; + } + if (CalamityWorld.downedPolterghast) + { + damageMult += 0.2f; + defense += 12; + } + if (CalamityWorld.downedDoG) + { + damageMult += 0.2f; + defense += 12; + } + if (CalamityWorld.downedYharon) + { + damageMult += 0.2f; + defense += 12; + } + if (CalamityWorld.downedSCal) + { + damageMult += 0.6f; + defense += 20; + } + } + + #region Shop Stuff + public override void SetupShop(int type, Chest shop, ref int nextSlot) { if (type == NPCID.Merchant) { diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 0b96fbe8b6..34b67340f2 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -95,14 +95,12 @@ namespace CalamityMod.NPCs.Ravager public override void SendExtraAI(BinaryWriter writer) { writer.Write(npc.dontTakeDamage); - writer.Write(npc.noGravity); writer.Write(velocityY); } public override void ReceiveExtraAI(BinaryReader reader) { npc.dontTakeDamage = reader.ReadBoolean(); - npc.noGravity = reader.ReadBoolean(); velocityY = reader.ReadSingle(); } @@ -568,7 +566,7 @@ namespace CalamityMod.NPCs.Ravager { if (npc.Top.Y > aimY) { - if (npc.velocity.Y > 0f) + if (npc.velocity.Y >= 0f) npc.velocity.Y -= 0.5f + Math.Abs(npc.Top.Y - aimY) * 0.001f; } else diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 13c92b785d..f939886b3a 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.TownNPCs int random = Main.rand.Next(4); if (random == 0) { - return "Hey! Nice night. I'm gonna make some Bloody Marys. Celery included. Want one?"; + return "Hey, nice night! I'm gonna make some Bloody Marys, celery included. Want one?"; } else if (random == 1) { From caaa598b73c613efd8d82cd6f7225eef32c6ed96 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Tue, 21 Jul 2020 21:50:13 -0500 Subject: [PATCH 22/71] 1 - Added a region. 2 - Fixed an issue in TilePlacementHelpers.cs where oldWalls was declared twice and causing an error. --- NPCs/CalamityGlobalNPC.cs | 2 ++ Schematics/TilePlacementHelpers.cs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3ec1e0003d..a3dad836ab 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5667,6 +5667,7 @@ namespace CalamityMod.NPCs } #endregion + #region Buff Town NPC public override void BuffTownNPC(ref float damageMult, ref int defense) { if (NPC.downedMoonlord) @@ -5700,6 +5701,7 @@ namespace CalamityMod.NPCs defense += 20; } } + #endregion #region Shop Stuff public override void SetupShop(int type, Chest shop, ref int nextSlot) diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index 2d2c4b69ba..16e683b2f9 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Schematics { PilePlacementMaps.TryGetValue(mapKey, out PilePlacementFunction pilePlacementFunction); Tile[,] tiles = TileMaps[mapKey]; - ushort[,] oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; int xOffset = placementPosition.X; int yOffset = placementPosition.Y; // Top-left is the default for terraria. There is no need to include it in this switch. From baf922cd43a73d77da5cf2fadb1f7b4ff6a9804a Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Tue, 21 Jul 2020 21:52:23 -0500 Subject: [PATCH 23/71] 1 - FUCK OLD WALLS --- Schematics/TilePlacementHelpers.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index eeb27a928f..55c481437f 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -32,7 +32,8 @@ namespace CalamityMod.Schematics { PilePlacementMaps.TryGetValue(mapKey, out PilePlacementFunction pilePlacementFunction); Tile[,] tiles = TileMaps[mapKey]; - int xOffset = placementPosition.X; + ushort[,] oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; + int xOffset = placementPosition.X; int yOffset = placementPosition.Y; // Top-left is the default for terraria. There is no need to include it in this switch. switch (placementAnchor) @@ -52,8 +53,8 @@ namespace CalamityMod.Schematics yOffset += tiles.GetLength(1); break; } - oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; - for (int x = 0; x < tiles.GetLength(0); x++) + oldWalls = new ushort[tiles.GetLength(0), tiles.GetLength(1)]; + for (int x = 0; x < tiles.GetLength(0); x++) { for (int y = 0; y < tiles.GetLength(1); y++) { From 6b2ed5f54defa9578f09c60e23e6bd4dac979a9c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 21 Jul 2020 23:59:40 -0400 Subject: [PATCH 24/71] Fix for Piky's world/player corruption --- Prefixes/RoguePrefix.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Prefixes/RoguePrefix.cs b/Prefixes/RoguePrefix.cs index 2ecf8e31d6..3943122204 100644 --- a/Prefixes/RoguePrefix.cs +++ b/Prefixes/RoguePrefix.cs @@ -97,8 +97,13 @@ namespace CalamityMod.Prefixes invalid = true; if (item.useAnimation == Math.Round(item.useAnimation * useTimeMult) && useTimeMult != 1f) invalid = true; + // This code is commented out because CanRoll already guarantees that rogue prefixes will never appear on consumable items. + // Setting invalid to true doesn't do anything good. + // It just makes prefixed consumable rogue weapons put TML in an infinite loop looking for an appropriate prefix. + /* if (item.consumable) invalid = true; + */ } } From e41f365b4024fb5f55ebd346fbd83b0bdfb592c1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 09:29:22 -0400 Subject: [PATCH 25/71] increased god's bellows hitbox size & add some green dust --- Projectiles/Ranged/CosmicFire.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 5b3dccc63a..a55ec15ef8 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetDefaults() { - projectile.width = 6; - projectile.height = 6; + projectile.width = 10; + projectile.height = 10; projectile.friendly = true; projectile.ignoreWater = true; projectile.ranged = true; @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged scalar = 0.75f; } projectile.ai[0] += 1f; - int dustType = 62; + int dustType = Main.rand.NextBool(4) ? 61 : 62; if (Main.rand.NextBool(2)) { int fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); From 19d9ba2ac371f4db57b43d220fa75fad371f5963 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:14:01 -0400 Subject: [PATCH 26/71] weapon balancing --- Items/Weapons/DraedonsArsenal/GatlingLaser.cs | 2 +- .../Weapons/DraedonsArsenal/PlasmaGrenade.cs | 2 +- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 2 +- .../StarSwallowerContainmentUnit.cs | 2 +- Items/Weapons/Rogue/ToxicantTwister.cs | 20 ++++--------------- .../DraedonsArsenal/MassivePlasmaExplosion.cs | 2 +- .../DraedonsArsenal/MountedScannerLaser.cs | 2 +- .../PlasmaGrenadeProjectile.cs | 6 +++--- .../DraedonsArsenal/StarSwallowerSummon.cs | 2 +- Projectiles/Summon/RadiantResolutionAura.cs | 11 +++++++++- 10 files changed, 24 insertions(+), 27 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index 83ad263184..ded64e0f4e 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 58; item.height = 24; item.magic = true; - item.damage = 81; + item.damage = 54; item.knockBack = 1f; item.useTime = 2; item.useAnimation = 2; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index 5df934b1e7..cdad90b72e 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { item.width = 22; item.height = 28; - item.damage = 5000; + item.damage = 7143; item.noMelee = true; item.noUseGraphic = true; item.consumable = true; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 4d643860de..50248c4bd7 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetDefaults() { item.shootSpeed = 10f; - item.damage = 211; + item.damage = 75; item.mana = 12; item.width = 38; item.height = 24; diff --git a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs index 716fef4d87..674db44b29 100644 --- a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs +++ b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetDefaults() { item.shootSpeed = 10f; - item.damage = 20; + item.damage = 24; item.mana = 10; item.width = 18; item.height = 28; diff --git a/Items/Weapons/Rogue/ToxicantTwister.cs b/Items/Weapons/Rogue/ToxicantTwister.cs index 2c79249716..46c497b84d 100644 --- a/Items/Weapons/Rogue/ToxicantTwister.cs +++ b/Items/Weapons/Rogue/ToxicantTwister.cs @@ -13,14 +13,14 @@ namespace CalamityMod.Items.Weapons.Rogue DisplayName.SetDefault("Toxicant Twister"); Tooltip.SetDefault("Throws a slow moving boomerang\n" + "After a few moments, the boomerang chooses a target and rapidly homes in\n" + - "Stealth strikes fire three boomerangs that home in faster and rapidly release sand"); + "Stealth strikes home in faster and rapidly release sand"); } public override void SafeSetDefaults() { item.width = 42; item.height = 46; - item.damage = 750; + item.damage = 650; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = item.useTime = 20; @@ -38,20 +38,8 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.Calamity().StealthStrikeAvailable()) - { - for (int i = 0; i < 3; i++) - { - float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f; - float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f; - int stealth = Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, damage, knockBack, player.whoAmI); - Main.projectile[stealth].Calamity().stealthStrike = true; - } - } - else - { - Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); - } + int boomer = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[boomer].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; } } diff --git a/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs b/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs index a6a53ecaa2..517389e439 100644 --- a/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs +++ b/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.tileCollide = false; projectile.Calamity().rogue = true; projectile.usesIDStaticNPCImmunity = true; - projectile.idStaticNPCHitCooldown = 10; + projectile.idStaticNPCHitCooldown = 12; } public override void AI() diff --git a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs index a2b3469e74..32282d1d1b 100644 --- a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs +++ b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.friendly = true; projectile.minion = true; projectile.minionSlots = 0f; - projectile.penetrate = -1; + projectile.penetrate = 2; projectile.alpha = 255; projectile.localNPCHitCooldown = 15; projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs index 7c0657c4d0..21822a2fb7 100644 --- a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { if (Main.myPlayer == projectile.owner) { - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage * 3, projectile.knockBack * 3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage * 2, projectile.knockBack * 2f, projectile.owner); } if (!Main.dedServ) { @@ -74,8 +74,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal else { CalamityGlobalProjectile.ExpandHitboxBy(projectile, 360); - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; projectile.Damage(); if (!Main.dedServ) { diff --git a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs index 31ccf5d54d..a057b9e389 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs @@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (AcidShootTimer > 48) { AcidShootTimer = 0; - AcidShootCooldown = 20f; + AcidShootCooldown = 10f; projectile.netUpdate = true; } } diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs index 689d7c6820..a528614958 100644 --- a/Projectiles/Summon/RadiantResolutionAura.cs +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -72,7 +72,16 @@ namespace CalamityMod.Projectiles.Summon float allocatedSlots = projectile.ai[0]; projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f); - int radiantOrbDamage = (int)(projectile.damage * (Math.Log(allocatedSlots, 2.5) + 1f)); + float damageMult = Math.Log(allocatedSlots, 3) + 1f; + + //Softcap the mult after 9 slots + float newMult = damageMult; + if (newMult > 3f) + { + newMult = ((damageMult - 3f) * 0.1f) + 3f; + } + + int radiantOrbDamage = (int)(projectile.damage * newMult); int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, allocatedSlots)); if (radiantOrbAppearRate < 7) From 2471ae648168750280672f14d1383a9b433d4406 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:30:58 -0400 Subject: [PATCH 27/71] cast and some wrath of the ancients cleanup --- Items/Weapons/Magic/WrathoftheAncients.cs | 28 +----- Projectiles/Magic/GranitePulse.cs | 101 +++++++++----------- Projectiles/Summon/RadiantResolutionAura.cs | 2 +- 3 files changed, 48 insertions(+), 83 deletions(-) diff --git a/Items/Weapons/Magic/WrathoftheAncients.cs b/Items/Weapons/Magic/WrathoftheAncients.cs index d7aa63ac3d..4f8e3f1d7b 100644 --- a/Items/Weapons/Magic/WrathoftheAncients.cs +++ b/Items/Weapons/Magic/WrathoftheAncients.cs @@ -35,33 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int i = Main.myPlayer; - float num72 = item.shootSpeed; - int num73 = damage; - float num74 = knockBack; - num74 = player.GetWeaponKnockback(item, num74); - player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - } - else - { - num80 = num72 / num80; - } - num78 = 0f; - num79 = 0f; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Projectile.NewProjectile(vector2.X, vector2.Y, num78, num79, ModContent.ProjectileType(), num73, num74, i, 0f, 0f); + Projectile.NewProjectile(Main.mouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 0f); return false; } } diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index c085cb6789..8d3519cc99 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Magic { public class GranitePulse : ModProjectile { - public float count = 0f; + public bool initialized = false; public override void SetStaticDefaults() { @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - projectile.velocity = new Vector2(0f, (float)Math.Sin((double)(6.28318548f * projectile.ai[0] / 300f)) * 0.5f); + projectile.velocity = new Vector2(0f, (float)Math.Sin((double)(MathHelper.TwoPi * projectile.ai[0] / 300f)) * 0.5f); projectile.ai[0] += 1f; if (projectile.ai[0] >= 300f) { @@ -62,84 +62,75 @@ namespace CalamityMod.Projectiles.Magic if (projectile.localAI[0] >= 10f) { projectile.localAI[0] = 0f; - int num416 = 0; - int num417 = 0; - float num418 = 0f; - int num419 = projectile.type; - for (int num420 = 0; num420 < Main.maxProjectiles; num420++) + int projCount = 0; + int index = 0; + float findOldest = 0f; + int projType = projectile.type; + for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[num420].active && Main.projectile[num420].owner == projectile.owner && Main.projectile[num420].type == num419 && Main.projectile[num420].ai[1] < 3600f) + Projectile proj = Main.projectile[i]; + if (proj.active && proj.owner == projectile.owner && proj.type == projType && proj.ai[1] < 3600f) { - num416++; - if (Main.projectile[num420].ai[1] > num418) + projCount++; + if (proj.ai[1] > findOldest) { - num417 = num420; - num418 = Main.projectile[num420].ai[1]; + index = i; + findOldest = proj.ai[1]; } } } - if (num416 > 1) + if (projCount > 1) { - Main.projectile[num417].netUpdate = true; - Main.projectile[num417].ai[1] = 36000f; + Main.projectile[index].netUpdate = true; + Main.projectile[index].ai[1] = 36000f; return; } } - if (count == 0f) + if (!initialized) { - Main.PlaySound(SoundID.NPCHit53, projectile.position); - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); - projectile.width = 20; - projectile.height = 20; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 5; num621++) + Main.PlaySound(SoundID.NPCHit53, projectile.Center); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 20); + for (int d = 0; d < 5; d++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default, 0.5f); - Main.dust[num622].velocity *= 3f; + int ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 229, 0f, 0f, 100, default, 0.5f); + Main.dust[ecto].velocity *= 3f; if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[ecto].scale = 0.5f; + Main.dust[ecto].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 10; num623++) + for (int d = 0; d < 10; d++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default, 1f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default, 0.5f); - Main.dust[num624].velocity *= 2f; + int ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 206, 0f, 0f, 100, default, 1f); + Main.dust[ecto].noGravity = true; + Main.dust[ecto].velocity *= 5f; + ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 206, 0f, 0f, 100, default, 0.5f); + Main.dust[ecto].velocity *= 2f; } - count += 1f; + initialized = true; } - if (projectile.timeLeft % 50 == 49) + if (projectile.timeLeft % 50 == 49 && projectile.alpha <= 0) { - Main.PlaySound(SoundID.NPCHit53, projectile.position); - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); - projectile.width = 20; - projectile.height = 20; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 5; num621++) + Main.PlaySound(SoundID.NPCHit53, projectile.Center); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 20); + for (int d = 0; d < 5; d++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default, 0.5f); - Main.dust[num622].velocity *= 3f; + int ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 229, 0f, 0f, 100, default, 0.5f); + Main.dust[ecto].velocity *= 3f; if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[ecto].scale = 0.5f; + Main.dust[ecto].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 10; num623++) + for (int d = 0; d < 10; d++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default, 1f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default, 0.5f); - Main.dust[num624].velocity *= 2f; + int ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 206, 0f, 0f, 100, default, 1f); + Main.dust[ecto].noGravity = true; + Main.dust[ecto].velocity *= 5f; + ecto = Dust.NewDust(projectile.position, projectile.width, projectile.height, 206, 0f, 0f, 100, default, 0.5f); + Main.dust[ecto].velocity *= 2f; } float spread = 45f * 0.0174f; double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; @@ -165,7 +156,7 @@ namespace CalamityMod.Projectiles.Magic SpriteEffects spriteEffects = SpriteEffects.None; if (projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), projectile.scale, spriteEffects, 0f); return false; } diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs index a528614958..718b0202de 100644 --- a/Projectiles/Summon/RadiantResolutionAura.cs +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon float allocatedSlots = projectile.ai[0]; projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f); - float damageMult = Math.Log(allocatedSlots, 3) + 1f; + float damageMult = (float)Math.Log(allocatedSlots, 3) + 1f; //Softcap the mult after 9 slots float newMult = damageMult; From 49c80febf8ab130f963ba2c73b0c026065e83e0e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:34:44 -0400 Subject: [PATCH 28/71] fixed rover drive bonus always applying unless the accessory was equipped and on cooldown --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 85d6977afc..c9bd4e7bdd 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -996,7 +996,7 @@ namespace CalamityMod.CalPlayer modPlayer.roverDriveTimer = 0; } else - modPlayer.roverDriveTimer = CalamityUtils.SecondsToFrames(10f) + 1; //Doesn't reset to zero to prevent exploits + modPlayer.roverDriveTimer = 616; //Doesn't reset to zero to prevent exploits // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) From dbf13240949069ef775538b80da06188aa3567f0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:35:09 -0400 Subject: [PATCH 29/71] right --- Items/Weapons/Magic/WrathoftheAncients.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/WrathoftheAncients.cs b/Items/Weapons/Magic/WrathoftheAncients.cs index 4f8e3f1d7b..de252ca89e 100644 --- a/Items/Weapons/Magic/WrathoftheAncients.cs +++ b/Items/Weapons/Magic/WrathoftheAncients.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - Projectile.NewProjectile(Main.mouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 0f); return false; } } From f2d99dcdce125b0bc64254c4255f7a7983a6e803 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 11:07:21 -0400 Subject: [PATCH 30/71] spamming wrath of the ancients now just fucks you over --- Projectiles/Magic/GranitePulse.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index 8d3519cc99..6ca7cb8d9a 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Magic } initialized = true; } - if (projectile.timeLeft % 50 == 49 && projectile.alpha <= 0) + if (projectile.timeLeft % 50 == 1 && projectile.alpha <= 0) { Main.PlaySound(SoundID.NPCHit53, projectile.Center); CalamityGlobalProjectile.ExpandHitboxBy(projectile, 20); From c90796ea57ab4b02c662ad162b22e2dd4742ceb1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 14:47:32 -0400 Subject: [PATCH 31/71] added holdout offsets for acid gun, lazhar, and effervescence --- Items/Weapons/Magic/AcidGun.cs | 4 ++ Items/Weapons/Magic/Effervescence.cs | 2 + Items/Weapons/Magic/EidolicWail.cs | 5 +- Items/Weapons/Magic/IonBlaster.cs | 2 +- Items/Weapons/Magic/Lazhar.cs | 2 + Projectiles/Magic/AstralachneaFang.cs | 89 ++++++++++++--------------- 6 files changed, 51 insertions(+), 53 deletions(-) diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs index 21486d3c96..3c739f5a43 100644 --- a/Items/Weapons/Magic/AcidGun.cs +++ b/Items/Weapons/Magic/AcidGun.cs @@ -33,6 +33,9 @@ namespace CalamityMod.Items.Weapons.Magic item.shootSpeed = 14f; item.shoot = ModContent.ProjectileType(); } + + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { for (int i = 0; i < 3; i++) @@ -42,6 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic } return false; } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Magic/Effervescence.cs b/Items/Weapons/Magic/Effervescence.cs index cb97f27dda..cb8d9ce1e7 100644 --- a/Items/Weapons/Magic/Effervescence.cs +++ b/Items/Weapons/Magic/Effervescence.cs @@ -35,6 +35,8 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().customRarity = CalamityRarity.Turquoise; } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { for (int randomBullets = 0; randomBullets <= 4; randomBullets++) diff --git a/Items/Weapons/Magic/EidolicWail.cs b/Items/Weapons/Magic/EidolicWail.cs index 5e8e12c6f3..619cbca78c 100644 --- a/Items/Weapons/Magic/EidolicWail.cs +++ b/Items/Weapons/Magic/EidolicWail.cs @@ -37,9 +37,6 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().customRarity = CalamityRarity.PureGreen; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); } } diff --git a/Items/Weapons/Magic/IonBlaster.cs b/Items/Weapons/Magic/IonBlaster.cs index fad71a3dc0..849e6e5553 100644 --- a/Items/Weapons/Magic/IonBlaster.cs +++ b/Items/Weapons/Magic/IonBlaster.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Magic { float manaAmount = (float)player.statMana * 0.01f; float damageMult = manaAmount * 0.75f; - int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage * damageMult), knockBack, player.whoAmI, 0.0f, 0.0f); + int projectile = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * damageMult), knockBack, player.whoAmI); Main.projectile[projectile].scale = manaAmount; return false; } diff --git a/Items/Weapons/Magic/Lazhar.cs b/Items/Weapons/Magic/Lazhar.cs index 4ed61c734a..e02e3b06f3 100644 --- a/Items/Weapons/Magic/Lazhar.cs +++ b/Items/Weapons/Magic/Lazhar.cs @@ -34,6 +34,8 @@ namespace CalamityMod.Items.Weapons.Magic item.shoot = ModContent.ProjectileType(); } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { float SpeedX = speedX + (float)Main.rand.Next(-15, 16) * 0.05f; diff --git a/Projectiles/Magic/AstralachneaFang.cs b/Projectiles/Magic/AstralachneaFang.cs index 06f099f567..332e5899c2 100644 --- a/Projectiles/Magic/AstralachneaFang.cs +++ b/Projectiles/Magic/AstralachneaFang.cs @@ -8,62 +8,55 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { - public class AstralachneaFang : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Fang"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } + public class AstralachneaFang : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fang"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } - public override void SetDefaults() - { - projectile.width = 14; - projectile.height = 14; - projectile.friendly = true; - projectile.penetrate = 1; - projectile.magic = true; - projectile.tileCollide = true; - projectile.timeLeft = 240; - } + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.magic = true; + projectile.tileCollide = true; + projectile.timeLeft = 240; + } - public override void AI() - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); - Main.dust[num469].noGravity = true; + public override void AI() + { + int astral = Dust.NewDust(projectile.position, projectile.width, projectile.height, ModContent.DustType(), 0f, 0f, 100, default, 1f); + Main.dust[astral].noGravity = true; - if (projectile.velocity.X < 0f) - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); - } - else - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); - } + projectile.rotation = projectile.velocity.ToRotation(); CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 250f, 13f, 25f); - } + } - public override void Kill(int timeLeft) - { - Main.PlaySound(SoundID.Item10, projectile.position); - for (int k = 0; k < 3; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, ModContent.DustType(), 0f, 0f); + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item10, projectile.position); + for (int k = 0; k < 3; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, ModContent.DustType(), 0f, 0f); Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, ModContent.DustType(), 0f, 0f); } - } + } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); - return false; - } - } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } } From 0109d8b1381ed89b0637eeb5c720cb8c1096efe8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 18:30:05 -0400 Subject: [PATCH 32/71] added rusty drone and arsenal summons to summoner's association weak references --- ModSupport/WeakReferenceSupport.cs | 118 ++++++++++++++++------------- 1 file changed, 65 insertions(+), 53 deletions(-) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index e037e4d520..fcc8339950 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -21,6 +21,7 @@ using CalamityMod.Items.SummonItems.Invasion; using CalamityMod.Items.Tools; using CalamityMod.Items.Tools.ClimateChange; using CalamityMod.Items.TreasureBags; +using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -56,6 +57,7 @@ using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.TownNPCs; using CalamityMod.NPCs.Yharon; +using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Projectiles.Summon; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -811,61 +813,71 @@ namespace CalamityMod private static void SummonersAssociationSupport() { Mod sAssociation = ModLoader.GetMod("SummonersAssociation"); - if(sAssociation != null) + if (sAssociation is null) + return; + + void RegisterSummon(int summonItem, int summonBuff, int summonProjectile) { - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1-(1f/3f), 2f/3f, 2f/3f}); - //Entropy's Vigil is a bruh moment - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", summonItem, summonBuff, summonProjectile); } + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); + + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1-(1f/3f), 2f/3f, 2f/3f}); + //Entropy's Vigil is a bruh moment + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); } } } From b9fc7a8e69b621b22046dba26f46e33b58c06a95 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 22 Jul 2020 17:49:15 -0500 Subject: [PATCH 33/71] 1 - Added glowmask to ???. 2 - Fixed Ravager...I hope. 3 - Rev+ Plantera tentacle rings spread out more. 4 - Truffle Worms can now spawn in a surface mushroom biome. 5 - Free Golem Head spams less lasers. --- NPCs/CalamityGlobalAI.cs | 6 +-- NPCs/CalamityGlobalNPC.cs | 7 ++++ NPCs/Leviathan/LeviathanStart.cs | 24 +++++++++++- NPCs/Ravager/RavagerBody.cs | 65 +++++++++++++++++--------------- 4 files changed, 68 insertions(+), 34 deletions(-) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 97ff6db526..29210e7108 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -8695,7 +8695,7 @@ namespace CalamityMod.NPCs float radians = MathHelper.TwoPi / totalTentacles; for (int i = 0; i < totalTentacles; i++) { - Vector2 vector255 = new Vector2(0f, -60f * totalTentacles).RotatedBy(radians * i); + Vector2 vector255 = new Vector2(0f, -65f * totalTentacles).RotatedBy(radians * i); NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, vector255.X, vector255.Y, 1f, 0f, 255); } } @@ -8821,7 +8821,7 @@ namespace CalamityMod.NPCs float radians = MathHelper.TwoPi / totalTentacles; for (int i = 0; i < totalTentacles; i++) { - Vector2 vector255 = new Vector2(0f, -60f * totalTentacles).RotatedBy(radians * i); + Vector2 vector255 = new Vector2(0f, -65f * totalTentacles).RotatedBy(radians * i); NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI, vector255.X, vector255.Y, 2f, 0f, 255); } } @@ -10160,7 +10160,7 @@ namespace CalamityMod.NPCs if (!Collision.CanHit(Main.npc[NPC.golemBoss].Center, 1, 1, Main.player[npc.target].Center, 1, 1)) npc.ai[2] += 8f; - if (npc.ai[2] >= 150f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 160f) + if (npc.ai[2] >= 240f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 160f) { npc.ai[2] = 0f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0b6717acd3..24d8928033 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4257,6 +4257,13 @@ namespace CalamityMod.NPCs pool[NPCID.BlueJellyfish] = SpawnCondition.CaveJellyfish.Chance; } + // Add Truffle Worm spawns to surface mushroom biome + if (spawnInfo.player.ZoneGlowshroom && Main.hardMode && (spawnInfo.player.ZoneOverworldHeight || spawnInfo.player.ZoneSkyHeight)) + { + if (NPC.CountNPCS(NPCID.TruffleWorm) < 2) + pool[NPCID.TruffleWorm] = SpawnCondition.OverworldMushroom.Chance * 0.5f; + } + if (spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneCalamity || spawnInfo.player.Calamity().ZoneSulphur || diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index b083d0b277..d0414e331f 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -2,6 +2,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System.IO; using Terraria; using Terraria.ID; @@ -82,7 +83,28 @@ namespace CalamityMod.NPCs.Leviathan npc.active = false; } - public override float SpawnChance(NPCSpawnInfo spawnInfo) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanStartGlow"); + + spriteBatch.Draw(texture2D15, vector43, npc.frame, Color.White, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + return false; + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) { if (spawnInfo.playerSafe || NPC.AnyNPCs(NPCID.DukeFishron) || diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 34b67340f2..e6e6965c46 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -135,11 +135,11 @@ namespace CalamityMod.NPCs.Ravager if (npc.localAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[0] = 1f; - NPC.NewNPC((int)npc.Center.X - 70, (int)npc.Center.Y + 88, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X + 70, (int)npc.Center.Y + 88, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X - 120, (int)npc.Center.Y + 50, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X + 120, (int)npc.Center.Y + 50, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X + 1, (int)npc.Center.Y - 20, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC((int)npc.Center.X - 70, (int)npc.Center.Y + 88, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X + 70, (int)npc.Center.Y + 88, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X - 120, (int)npc.Center.Y + 50, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X + 120, (int)npc.Center.Y + 50, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X + 1, (int)npc.Center.Y - 20, ModContent.NPCType()); } if (npc.target >= 0 && Main.player[npc.target].dead) @@ -517,13 +517,13 @@ namespace CalamityMod.NPCs.Ravager if (!NPC.AnyNPCs(ModContent.NPCType())) { - NPC.NewNPC((int)npc.Center.X - spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X + spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC((int)npc.Center.X - spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X + spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType()); } else if (!NPC.AnyNPCs(ModContent.NPCType())) { - NPC.NewNPC((int)npc.Center.X - spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)npc.Center.X + spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC((int)npc.Center.X - spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType()); + NPC.NewNPC((int)npc.Center.X + spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType()); } } } @@ -532,6 +532,7 @@ namespace CalamityMod.NPCs.Ravager npc.Calamity().newAI[0] += 1f; npc.Calamity().newAI[1] = 0f; + npc.Calamity().newAI[3] = 0f; for (int stompDustArea = (int)npc.position.X - 30; stompDustArea < (int)npc.position.X + npc.width + 60; stompDustArea += 30) { @@ -558,22 +559,26 @@ namespace CalamityMod.NPCs.Ravager npc.noTileCollide = false; } - float amount = death ? 1f : 1f - lifeRatio; Vector2 targetVector = player.position; - float aimY = targetVector.Y - 320f; + float aimY = targetVector.Y - 480f; + float distanceFromTargetPos = Math.Abs(npc.Top.Y - aimY); + bool inRange = npc.Top.Y <= aimY + 16f && npc.Top.Y >= aimY - 16f; if (npc.ai[0] == 2f && npc.ai[1] == 0f) { - if (npc.Top.Y > aimY) - { - if (npc.velocity.Y >= 0f) - npc.velocity.Y -= 0.5f + Math.Abs(npc.Top.Y - aimY) * 0.001f; - } + npc.Calamity().newAI[3] += 1f; + + if (inRange) + npc.velocity.Y = 0f; + else if (npc.Top.Y > aimY) + npc.velocity.Y -= 0.2f + distanceFromTargetPos * 0.001f; else - { - if (npc.velocity.Y < 0f) - npc.velocity.Y += 0.5f + Math.Abs(npc.Top.Y - aimY) * 0.001f; - } + npc.velocity.Y += 0.2f + distanceFromTargetPos * 0.001f; + + if (npc.velocity.Y < velocityY) + npc.velocity.Y = velocityY; + if (npc.velocity.Y > -velocityY) + npc.velocity.Y = -velocityY; } float maxOffset = 160f + (death ? 160f : 160f * (1f - lifeRatio)); @@ -582,14 +587,16 @@ namespace CalamityMod.NPCs.Ravager // Set offset to 0 if the target stops moving if (Math.Abs(player.velocity.X) < 0.5f) npc.Calamity().newAI[2] = 0f; + else + npc.Calamity().newAI[2] = player.direction; - if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (npc.Top.Y <= aimY || npc.ai[0] != 2f)) || npc.ai[1] > 0f) + if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (inRange || npc.ai[0] != 2f)) || npc.ai[1] > 0f || npc.Calamity().newAI[3] >= 180f) { if (npc.ai[0] == 2f) { - float stopBeforeFallTime = npc.Calamity().newAI[2] == 0f ? 20f : 30f; + float stopBeforeFallTime = npc.Calamity().newAI[2] == 0f ? 15f : 20f; if (expertMode) - stopBeforeFallTime -= death ? 15f : 15f * (1f - lifeRatio); + stopBeforeFallTime -= death ? 10f : 10f * (1f - lifeRatio); if (npc.ai[1] < stopBeforeFallTime) { @@ -627,8 +634,12 @@ namespace CalamityMod.NPCs.Ravager } else { + float velocityMult = 1.8f; float velocityXChange = 0.2f + Math.Abs(npc.Center.X - player.Center.X) * 0.001f; + if (npc.ai[0] == 2f) + velocityXChange *= velocityMult; + if (npc.direction < 0) npc.velocity.X -= velocityXChange; else if (npc.direction > 0) @@ -651,7 +662,7 @@ namespace CalamityMod.NPCs.Ravager velocityX += 1f; if (npc.ai[0] == 2f) - velocityX *= 1.4f; + velocityX *= velocityMult; if (npc.velocity.X < -velocityX) npc.velocity.X = -velocityX; @@ -768,12 +779,6 @@ namespace CalamityMod.NPCs.Ravager } } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - cooldownSlot = 1; - return true; - } - public override void OnHitPlayer(Player player, int damage, bool crit) { if (CalamityWorld.revenge) From e282a819180e4a78fddab01975837d7bb10eda40 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 18:50:04 -0400 Subject: [PATCH 34/71] adjusted mounted scanner --- Projectiles/DraedonsArsenal/MountedScannerLaser.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs index 32282d1d1b..5d52edbbaf 100644 --- a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs +++ b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.friendly = true; projectile.minion = true; projectile.minionSlots = 0f; - projectile.penetrate = 2; + projectile.penetrate = -1; projectile.alpha = 255; projectile.localNPCHitCooldown = 15; projectile.usesLocalNPCImmunity = true; @@ -84,5 +84,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.damage /= 3; + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + projectile.damage /= 3; + } } } From d4cc1b036c51f16f154f48daff2561c69e99e6b7 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 22 Jul 2020 17:51:03 -0500 Subject: [PATCH 35/71] Initial upload of the weapon. --- CalamityMod.cs | 7 +- Effects/DistortionShader.xnb | Bin 0 -> 2808 bytes Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 72 ++++++ Items/Weapons/DraedonsArsenal/Phaseslayer.png | Bin 0 -> 922 bytes .../DraedonsArsenal/PhaseslayerBeam.cs | 67 ++++++ .../DraedonsArsenal/PhaseslayerBeam.png | Bin 0 -> 3205 bytes .../DraedonsArsenal/PhaseslayerBlade.png | Bin 0 -> 20243 bytes .../DraedonsArsenal/PhaseslayerBladeSmall.png | Bin 0 -> 3441 bytes .../DraedonsArsenal/PhaseslayerProjectile.cs | 227 ++++++++++++++++++ .../DraedonsArsenal/PhaseslayerProjectile.png | Bin 0 -> 922 bytes 10 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 Effects/DistortionShader.xnb create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.cs create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBlade.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 9ecaf7bd76..b0a769b5aa 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -89,6 +89,7 @@ using Terraria.UI; using CalamityMod.Schematics; using CalamityMod.Tiles; using CalamityMod.TileEntities; +using CalamityMod.Projectiles.DraedonsArsenal; namespace CalamityMod { @@ -125,6 +126,7 @@ namespace CalamityMod public static Effect CustomShader; public static Effect LightShader; public static Effect TentacleShader; + public static Effect LightDistortionShader; // DR data structure public static SortedDictionary DRValues; @@ -296,6 +298,7 @@ namespace CalamityMod CustomShader = GetEffect("Effects/CustomShader"); LightShader = GetEffect("Effects/LightBurstShader"); TentacleShader = GetEffect("Effects/TentacleShader"); + LightDistortionShader = GetEffect("Effects/DistortionShader"); Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -331,8 +334,9 @@ namespace CalamityMod Filters.Scene["CalamityMod:LightBurst"].Load(); GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref(TentacleShader), "BurstPass"); + GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref(LightDistortionShader), "DistortionPass"); - RipperUI.Reset(); + RipperUI.Reset(); AstralArcanumUI.Load(this); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); @@ -778,6 +782,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), //Some hostile boss projectiles ModContent.ProjectileType(), diff --git a/Effects/DistortionShader.xnb b/Effects/DistortionShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..fc85ee96391821edb06901b387203737ba654e9e GIT binary patch literal 2808 zcmbVNOKcle6uslviPNOG5-bV|!XS_e3YHTRaG;6ZIQ>KzaAO-RffP-haXqTz3F8^1 zsk#`6F3M*Cf(@UAB|fSgsmg-SCPGA_9f$ym|MY zckb`ao0sy7v#SxheSk=LPkBMFm`2m6T8VN)O`I^*Wo^|k&n2=(!_pd7;&`>HRjdU~ zUDC|a_ zaZYPYrzXZL)zlenY)P9;PEI~WEJ_~LeLr+-^N?$L4`s01`6J}%Sf((>h-U`RC^UP1 zSv{*INpLd3s;BfgW7G#o!LTHbz$AzUVAxrsZkQDKT#*QW=fkzz1+8Kt+#H-7&&5E{w^Aq@POJshPl1VYx_A7>2U&(qf;Ri{oCDeD~Jq_T`?hf_?#K zOvK)}Yo9TF4x=X74)jkXdlUM$WbZyK4!JGq@B1}h1GXjMK1^MR(8GL)L)~tto1|><*z5?*w|Nm5yRr?5 zU&3P!!+WP8ckg)NHH;8`T*DFu-xcDH3DYoe{(0hkE9>hVMaKQ*U|MM|jxQ!DxKHCp z79NkE$`x|)LXEH5c-B~6(d$sA65~%NrY6S|U6JDe&KjQ36)QDx{n6^yo$(- zaUE_y3dPINlNj71<0*_&7))jK z>*pU|iw|Zl-gounFBdMQKl;#>wD5c8t@4A1y?hG~;35H)G#rZpP-fs@48Xwffr( z;}PJue<}#>%z+<1oo2irIFS>aFT`@=4**vV-uOx#`udyo_7l&&dHM1b^P|Am+wD!z zzV-dm4|$)UgF9iv*WaZm{9Sy|>7$(%dcdCoPH6+am`TD2oKmZg+O2zCALfzM^Ko_X zORdKcN1>3rK7hDUDYil-2RU2t-SB+FE{~||;Qagf7%O4D-6CrHIT&j@5pW{N;nm<_ zy*Ms+PYrEH)Zq2Xb(J<|-77W*eaE4w*E?=k)K)^iZi~q44R@}KMci6=jlv-c`xx`u e+)pS(Q3vM%wc*kwj?4Y*xNF#F*gFoNi$4L3`EAJn literal 0 HcmV?d00001 diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs new file mode 100644 index 0000000000..a8facdbf6a --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -0,0 +1,72 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + public class Phaseslayer : ModItem + { + public const int MinDamage = 4500; + public const int MaxDamage = 12500; + public const float SmallPhaseDamageMultiplier = 0.66f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + + "Swinging quickly causes the blade to release energy forward"); + } + public override void SetDefaults() + { + item.damage = MinDamage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; + + item.noUseGraphic = true; + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + + item.UseSound = SoundID.Item1; + item.autoReuse = true; + + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; + + item.shoot = ModContent.ProjectileType(); + + item.channel = true; + } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.RedPhasesaber); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.png b/Items/Weapons/DraedonsArsenal/Phaseslayer.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ 40f && projectile.timeLeft > Lifetime - 60) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(potentialTarget.Center) * 24f) / 8f; + } + projectile.frameCounter++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture(Texture); + MiscShaderData distortationShader = GameShaders.Misc["CalamityMod:LightDistortion"]; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Rectangle frame = bladeTexture.Frame(1, 5, 0, projectile.frameCounter / 4 % 5); + var drawData2 = new DrawData(bladeTexture, projectile.Center - Main.screenPosition, frame, Color.White, projectile.rotation, bladeTexture.Size() * 0.5f, projectile.scale * 1.2f, SpriteEffects.None, 0); + distortationShader.Apply(drawData2); + drawData2.Draw(spriteBatch); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.png b/Projectiles/DraedonsArsenal/PhaseslayerBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..8c9c20d1fef70add4e0e64bb923a1804bff60e53 GIT binary patch literal 3205 zcmeH}`&ScZ8popqVT_=e5yDLU&SelClkAjBf7G0z@f@LHS zBcRYMAb85@Dj-=LOauT*fwoL z2NHm!+@0A3g1v6xSmfXx^ErWFyEvM&dAlraVlef<^N?km2D;}cBjTPboYcV{w0p64 zo$>?vDGFD7HE4d;b>@vh-IN4}K^`uHT(_gEmM8hrv`dr@bI7hbf32lXfBsgRo`pqN zlPGmaMsQn>F&LBBl-4{Vrds)RrpwD9H<~*V$IR-moDsYtd@%`M-4s5~OJ)+iX zOvd9`P3obnT+I7H!nn3qcApWOC z_@lz68o{^n;y5oX&B52YhiE!6jf_9@Z~c3We@0uh|GpF^cGfgO+(A)YMe2AN@UXlKnI+~s_fb-ypM8_H z{V^TXWu(JsN)c8jX;he#8`MK(_w(PP&Z-rv6)EVzXaC%B7`1%5rlCsaI1oE73A&1o z#6^Y$c)=i9wfM}%cRna(t~={g$YPfJc|KQa=kEIpQ_B`gO&?)NM}=6vymYDK8a8w2 zfZ!#5P=3$eG3X+6c}eo|KB6lU!euk6dB(k_wb=7T_9JxJkx}hWRr>EKR8Kae{9?l0 zkyLbf6PQNzEMQ2y{KU73zQLy^sZ^%#EiHqb&rX6%0EVRRKGSP@i)I|o}IugPn47goMx?jtX$i7>hwHl(gj zjFj~*B#+OlB&&%ay=^@C1yW>xf^?g}c7h1rZBPT6)}!>HOwosjSXjYg8#Gh?m1_^t z*C7vbJl_l}TtPT$KUfi3zyK?+Qmq)H-65-SZ&B4~)YF8&W`XSFAnoJ{&aCoGVpILs z5l*`u(Z3YE=w)P;nR8%BSg$vT?h!pm>!HbD_DVl^*Fl+fAVFGd&N)}BUvK!EZVk4j zDo^w%?AcD*orP$rp6d|PXZtp;Ltc|d@Mdla*R~WVeS5l=CYjS+RQ)DcykK1*7G9hr z7k0h_QrcV*A%9^%OH_WcpC)rDDJm)I=k-SLqkB1n(F(8i=&DYiYj}CF>vyHFe| z43}nghCGNL*IpF>CV9Ig?DX|$piX?5Z*(!NPW>>e+YDFe~t+Gc@)vv%Nw|MmX3-g(Ur3*;zI7Cyf@3{ctL7H^ier^%Io@y6{t=`)ux zYJej|{!iENL{p`EYw@|*H_C;qm)|P?;=BXA>sZ&)d1y_7)37W-nj}az*XkSP#iTyy zvTJgvMJ;GQcDr}Kyk*g8LlAa{Xb&r)rizd!GqL`MKHriLrFn!NI6{}bDdyTLQPUXm z=V`w2*h`}QDQ?LXzL<-c7Ub9t=!5rPpz$kRb9synqwzsVaZJf7QD-BK+u+*yOQ{eyv>?WSVcUGJbto>LCMGYRmRHqnau zh-aMpte&9X-1R|g?uMdS&qs)qq~`69>3PkWt@Rnm4!2AyHo$=0GCN>)hU{yB@SIBD z*=39vAd&jo>8>)@6g8(4b>r;tIae&CsxAtpznV#0F`iW+a<}17dvx-g&uQ zXV!5#;6CbA^l?d=F`5%(K^0(Ucr&Qayd3 QZ{aU7I)cY(4HwA&4XR(YO#lD@ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBlade.png b/Projectiles/DraedonsArsenal/PhaseslayerBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..a7058e9bce6ee8f2c379b5cae9de75e36517a3d4 GIT binary patch literal 20243 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 T%{mu*TiK2+CYv+$9Zvio#=7Kk literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png b/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..f52f934a8a507c13a0820e81617ea77af839cdfb GIT binary patch literal 3441 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 Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; + public float AngularSwingMomentum + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + + // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. + // That speed is 12 degrees per frame, or pi/15 radians per frame. + public const float MaxAngularDamage = MathHelper.Pi / 15f; + public const float DamageUpdateResponsiveness = 0.08f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.friendly = true; + projectile.localNPCHitCooldown = 3; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + + ManipulatePlayer(player); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + PlaySounds(player, deltaAngle); + HandleCooldowns(); + } + + public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + + float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); + float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + + float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); + projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); + } + + public void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. + if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) + { + float mouseDistance = projectile.Distance(Main.MouseWorld); + + // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). + float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + + float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } + else if (FadeoutTime == 0f) + { + if (!player.channel) + FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. + else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. + } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; + } + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } + + public void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + public void PlaySounds(Player player, float deltaAngle) + { + if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) + { + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); + } + bool wasBig = !IsSmall; + if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) + { + // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else player.HeldItem.Calamity().CurrentCharge--; + } + + // Make some visuals if the sword becomes small as a result of charging. + if (IsSmall && wasBig) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (!Main.dedServ) + { + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + } + } + projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + public void HandleCooldowns() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ Date: Wed, 22 Jul 2020 17:51:03 -0500 Subject: [PATCH 36/71] Initial upload of the weapon. --- CalamityMod.cs | 7 +- Effects/DistortionShader.xnb | Bin 0 -> 2808 bytes Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 72 ++++++ Items/Weapons/DraedonsArsenal/Phaseslayer.png | Bin 0 -> 922 bytes .../DraedonsArsenal/PhaseslayerBeam.cs | 67 ++++++ .../DraedonsArsenal/PhaseslayerBeam.png | Bin 0 -> 3205 bytes .../DraedonsArsenal/PhaseslayerBlade.png | Bin 0 -> 20243 bytes .../DraedonsArsenal/PhaseslayerBladeSmall.png | Bin 0 -> 3441 bytes .../DraedonsArsenal/PhaseslayerProjectile.cs | 227 ++++++++++++++++++ .../DraedonsArsenal/PhaseslayerProjectile.png | Bin 0 -> 922 bytes 10 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 Effects/DistortionShader.xnb create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.cs create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBlade.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 9ecaf7bd76..b0a769b5aa 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -89,6 +89,7 @@ using Terraria.UI; using CalamityMod.Schematics; using CalamityMod.Tiles; using CalamityMod.TileEntities; +using CalamityMod.Projectiles.DraedonsArsenal; namespace CalamityMod { @@ -125,6 +126,7 @@ namespace CalamityMod public static Effect CustomShader; public static Effect LightShader; public static Effect TentacleShader; + public static Effect LightDistortionShader; // DR data structure public static SortedDictionary DRValues; @@ -296,6 +298,7 @@ namespace CalamityMod CustomShader = GetEffect("Effects/CustomShader"); LightShader = GetEffect("Effects/LightBurstShader"); TentacleShader = GetEffect("Effects/TentacleShader"); + LightDistortionShader = GetEffect("Effects/DistortionShader"); Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -331,8 +334,9 @@ namespace CalamityMod Filters.Scene["CalamityMod:LightBurst"].Load(); GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref(TentacleShader), "BurstPass"); + GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref(LightDistortionShader), "DistortionPass"); - RipperUI.Reset(); + RipperUI.Reset(); AstralArcanumUI.Load(this); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); @@ -778,6 +782,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), //Some hostile boss projectiles ModContent.ProjectileType(), diff --git a/Effects/DistortionShader.xnb b/Effects/DistortionShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..fc85ee96391821edb06901b387203737ba654e9e GIT binary patch literal 2808 zcmbVNOKcle6uslviPNOG5-bV|!XS_e3YHTRaG;6ZIQ>KzaAO-RffP-haXqTz3F8^1 zsk#`6F3M*Cf(@UAB|fSgsmg-SCPGA_9f$ym|MY zckb`ao0sy7v#SxheSk=LPkBMFm`2m6T8VN)O`I^*Wo^|k&n2=(!_pd7;&`>HRjdU~ zUDC|a_ zaZYPYrzXZL)zlenY)P9;PEI~WEJ_~LeLr+-^N?$L4`s01`6J}%Sf((>h-U`RC^UP1 zSv{*INpLd3s;BfgW7G#o!LTHbz$AzUVAxrsZkQDKT#*QW=fkzz1+8Kt+#H-7&&5E{w^Aq@POJshPl1VYx_A7>2U&(qf;Ri{oCDeD~Jq_T`?hf_?#K zOvK)}Yo9TF4x=X74)jkXdlUM$WbZyK4!JGq@B1}h1GXjMK1^MR(8GL)L)~tto1|><*z5?*w|Nm5yRr?5 zU&3P!!+WP8ckg)NHH;8`T*DFu-xcDH3DYoe{(0hkE9>hVMaKQ*U|MM|jxQ!DxKHCp z79NkE$`x|)LXEH5c-B~6(d$sA65~%NrY6S|U6JDe&KjQ36)QDx{n6^yo$(- zaUE_y3dPINlNj71<0*_&7))jK z>*pU|iw|Zl-gounFBdMQKl;#>wD5c8t@4A1y?hG~;35H)G#rZpP-fs@48Xwffr( z;}PJue<}#>%z+<1oo2irIFS>aFT`@=4**vV-uOx#`udyo_7l&&dHM1b^P|Am+wD!z zzV-dm4|$)UgF9iv*WaZm{9Sy|>7$(%dcdCoPH6+am`TD2oKmZg+O2zCALfzM^Ko_X zORdKcN1>3rK7hDUDYil-2RU2t-SB+FE{~||;Qagf7%O4D-6CrHIT&j@5pW{N;nm<_ zy*Ms+PYrEH)Zq2Xb(J<|-77W*eaE4w*E?=k)K)^iZi~q44R@}KMci6=jlv-c`xx`u e+)pS(Q3vM%wc*kwj?4Y*xNF#F*gFoNi$4L3`EAJn literal 0 HcmV?d00001 diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs new file mode 100644 index 0000000000..a8facdbf6a --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -0,0 +1,72 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + public class Phaseslayer : ModItem + { + public const int MinDamage = 4500; + public const int MaxDamage = 12500; + public const float SmallPhaseDamageMultiplier = 0.66f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + + "Swinging quickly causes the blade to release energy forward"); + } + public override void SetDefaults() + { + item.damage = MinDamage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; + + item.noUseGraphic = true; + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + + item.UseSound = SoundID.Item1; + item.autoReuse = true; + + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; + + item.shoot = ModContent.ProjectileType(); + + item.channel = true; + } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.RedPhasesaber); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.png b/Items/Weapons/DraedonsArsenal/Phaseslayer.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ 40f && projectile.timeLeft > Lifetime - 60) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(potentialTarget.Center) * 24f) / 8f; + } + projectile.frameCounter++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture(Texture); + MiscShaderData distortationShader = GameShaders.Misc["CalamityMod:LightDistortion"]; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Rectangle frame = bladeTexture.Frame(1, 5, 0, projectile.frameCounter / 4 % 5); + var drawData2 = new DrawData(bladeTexture, projectile.Center - Main.screenPosition, frame, Color.White, projectile.rotation, bladeTexture.Size() * 0.5f, projectile.scale * 1.2f, SpriteEffects.None, 0); + distortationShader.Apply(drawData2); + drawData2.Draw(spriteBatch); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.png b/Projectiles/DraedonsArsenal/PhaseslayerBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..8c9c20d1fef70add4e0e64bb923a1804bff60e53 GIT binary patch literal 3205 zcmeH}`&ScZ8popqVT_=e5yDLU&SelClkAjBf7G0z@f@LHS zBcRYMAb85@Dj-=LOauT*fwoL z2NHm!+@0A3g1v6xSmfXx^ErWFyEvM&dAlraVlef<^N?km2D;}cBjTPboYcV{w0p64 zo$>?vDGFD7HE4d;b>@vh-IN4}K^`uHT(_gEmM8hrv`dr@bI7hbf32lXfBsgRo`pqN zlPGmaMsQn>F&LBBl-4{Vrds)RrpwD9H<~*V$IR-moDsYtd@%`M-4s5~OJ)+iX zOvd9`P3obnT+I7H!nn3qcApWOC z_@lz68o{^n;y5oX&B52YhiE!6jf_9@Z~c3We@0uh|GpF^cGfgO+(A)YMe2AN@UXlKnI+~s_fb-ypM8_H z{V^TXWu(JsN)c8jX;he#8`MK(_w(PP&Z-rv6)EVzXaC%B7`1%5rlCsaI1oE73A&1o z#6^Y$c)=i9wfM}%cRna(t~={g$YPfJc|KQa=kEIpQ_B`gO&?)NM}=6vymYDK8a8w2 zfZ!#5P=3$eG3X+6c}eo|KB6lU!euk6dB(k_wb=7T_9JxJkx}hWRr>EKR8Kae{9?l0 zkyLbf6PQNzEMQ2y{KU73zQLy^sZ^%#EiHqb&rX6%0EVRRKGSP@i)I|o}IugPn47goMx?jtX$i7>hwHl(gj zjFj~*B#+OlB&&%ay=^@C1yW>xf^?g}c7h1rZBPT6)}!>HOwosjSXjYg8#Gh?m1_^t z*C7vbJl_l}TtPT$KUfi3zyK?+Qmq)H-65-SZ&B4~)YF8&W`XSFAnoJ{&aCoGVpILs z5l*`u(Z3YE=w)P;nR8%BSg$vT?h!pm>!HbD_DVl^*Fl+fAVFGd&N)}BUvK!EZVk4j zDo^w%?AcD*orP$rp6d|PXZtp;Ltc|d@Mdla*R~WVeS5l=CYjS+RQ)DcykK1*7G9hr z7k0h_QrcV*A%9^%OH_WcpC)rDDJm)I=k-SLqkB1n(F(8i=&DYiYj}CF>vyHFe| z43}nghCGNL*IpF>CV9Ig?DX|$piX?5Z*(!NPW>>e+YDFe~t+Gc@)vv%Nw|MmX3-g(Ur3*;zI7Cyf@3{ctL7H^ier^%Io@y6{t=`)ux zYJej|{!iENL{p`EYw@|*H_C;qm)|P?;=BXA>sZ&)d1y_7)37W-nj}az*XkSP#iTyy zvTJgvMJ;GQcDr}Kyk*g8LlAa{Xb&r)rizd!GqL`MKHriLrFn!NI6{}bDdyTLQPUXm z=V`w2*h`}QDQ?LXzL<-c7Ub9t=!5rPpz$kRb9synqwzsVaZJf7QD-BK+u+*yOQ{eyv>?WSVcUGJbto>LCMGYRmRHqnau zh-aMpte&9X-1R|g?uMdS&qs)qq~`69>3PkWt@Rnm4!2AyHo$=0GCN>)hU{yB@SIBD z*=39vAd&jo>8>)@6g8(4b>r;tIae&CsxAtpznV#0F`iW+a<}17dvx-g&uQ zXV!5#;6CbA^l?d=F`5%(K^0(Ucr&Qayd3 QZ{aU7I)cY(4HwA&4XR(YO#lD@ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBlade.png b/Projectiles/DraedonsArsenal/PhaseslayerBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..a7058e9bce6ee8f2c379b5cae9de75e36517a3d4 GIT binary patch literal 20243 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 T%{mu*TiK2+CYv+$9Zvio#=7Kk literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png b/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..f52f934a8a507c13a0820e81617ea77af839cdfb GIT binary patch literal 3441 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 Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; + public float AngularSwingMomentum + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + + // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. + // That speed is 12 degrees per frame, or pi/15 radians per frame. + public const float MaxAngularDamage = MathHelper.Pi / 15f; + public const float DamageUpdateResponsiveness = 0.08f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.friendly = true; + projectile.localNPCHitCooldown = 3; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + + ManipulatePlayer(player); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + PlaySounds(player, deltaAngle); + HandleCooldowns(); + } + + public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + + float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); + float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + + float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); + projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); + } + + public void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. + if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) + { + float mouseDistance = projectile.Distance(Main.MouseWorld); + + // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). + float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + + float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } + else if (FadeoutTime == 0f) + { + if (!player.channel) + FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. + else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. + } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; + } + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } + + public void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + public void PlaySounds(Player player, float deltaAngle) + { + if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) + { + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); + } + bool wasBig = !IsSmall; + if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) + { + // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else player.HeldItem.Calamity().CurrentCharge--; + } + + // Make some visuals if the sword becomes small as a result of charging. + if (IsSmall && wasBig) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (!Main.dedServ) + { + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + } + } + projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + public void HandleCooldowns() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ Date: Wed, 22 Jul 2020 18:06:18 -0500 Subject: [PATCH 37/71] 1 - Providence now despawns the proper projectiles prior to cocoon phase. --- NPCs/Providence/Providence.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 08b830ed59..801ea6bccd 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1240,10 +1240,8 @@ namespace CalamityMod.NPCs.Providence if (projectile.active) { if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { projectile.Kill(); - } - else if (projectile.type == ModContent.ProjectileType()) + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) projectile.active = false; } } From 6393d55092d2073552094085ea38fad5b478398a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 20:55:49 -0400 Subject: [PATCH 38/71] made flak krab and gamma slime projectiles glow --- Projectiles/Enemy/FlakAcid.cs | 6 +++--- Projectiles/Enemy/GammaAcid.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Projectiles/Enemy/FlakAcid.cs b/Projectiles/Enemy/FlakAcid.cs index ea1941e212..e8b6eed3f0 100644 --- a/Projectiles/Enemy/FlakAcid.cs +++ b/Projectiles/Enemy/FlakAcid.cs @@ -54,9 +54,7 @@ namespace CalamityMod.Projectiles.Enemy } public override void Kill(int timeLeft) { - projectile.position = projectile.Center; - projectile.width = projectile.height = 150; - projectile.position -= projectile.Size / 2f; + CalamityGlobalProjectile.ExpandHitboxBy(150); projectile.Damage(); for (int i = 0; i <= 40; i++) { @@ -74,6 +72,8 @@ namespace CalamityMod.Projectiles.Enemy } } + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); diff --git a/Projectiles/Enemy/GammaAcid.cs b/Projectiles/Enemy/GammaAcid.cs index 3afba2d30d..49afa2fbd4 100644 --- a/Projectiles/Enemy/GammaAcid.cs +++ b/Projectiles/Enemy/GammaAcid.cs @@ -39,9 +39,7 @@ namespace CalamityMod.Projectiles.Enemy } public override void Kill(int timeLeft) { - projectile.position = projectile.Center; - projectile.width = projectile.height = 80; - projectile.position -= projectile.Size / 2f; + CalamityGlobalProjectile.ExpandHitboxBy(80); projectile.Damage(); for (int i = 0; i <= 40; i++) { @@ -59,6 +57,8 @@ namespace CalamityMod.Projectiles.Enemy } } + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); From e0d95a9f2ae642467fea89d9de197b30d6fafd92 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 22:15:59 -0400 Subject: [PATCH 39/71] changed shellfish and vile feeders to use CanDamage --- Items/Armor/MolluskShellmet.cs | 3 +- Items/Weapons/Summon/ShellfishStaff.cs | 5 +- Projectiles/Summon/Shellfish.cs | 172 ++++---- Projectiles/Summon/SiriusMinion.cs | 228 +++++----- Projectiles/Summon/VileFeederSummon.cs | 566 +++++++++---------------- 5 files changed, 412 insertions(+), 562 deletions(-) diff --git a/Items/Armor/MolluskShellmet.cs b/Items/Armor/MolluskShellmet.cs index 4b8ceb4030..ff09f23829 100644 --- a/Items/Armor/MolluskShellmet.cs +++ b/Items/Armor/MolluskShellmet.cs @@ -57,8 +57,7 @@ namespace CalamityMod.Items.Armor } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 2) { - int shellfish = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(200f * player.MinionDamage()), 0f, Main.myPlayer, 0f, 0f); - Main.projectile[shellfish].Calamity().lineColor = 1; + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(140 * player.MinionDamage()), 0f, player.whoAmI); } } player.Calamity().wearingRogueArmor = true; diff --git a/Items/Weapons/Summon/ShellfishStaff.cs b/Items/Weapons/Summon/ShellfishStaff.cs index 5d703af829..e339fc04cb 100644 --- a/Items/Weapons/Summon/ShellfishStaff.cs +++ b/Items/Weapons/Summon/ShellfishStaff.cs @@ -38,10 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - position = Main.MouseWorld; - speedX = 0; - speedY = 0; - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); } return false; } diff --git a/Projectiles/Summon/Shellfish.cs b/Projectiles/Summon/Shellfish.cs index 06b00ba9bb..6143ba4ff0 100644 --- a/Projectiles/Summon/Shellfish.cs +++ b/Projectiles/Summon/Shellfish.cs @@ -60,9 +60,17 @@ namespace CalamityMod.Projectiles.Summon } spawnDust = false; } - bool flag64 = projectile.type == ModContent.ProjectileType(); + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / + modProj.spawnedPlayerMinionDamageValue * + player.MinionDamage()); + projectile.damage = damage2; + } + + bool correctMinion = projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); - if (flag64) + if (correctMinion) { if (player.dead) { @@ -73,6 +81,7 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft = 2; } } + projectile.frameCounter++; if (projectile.frameCounter > 3) { @@ -83,19 +92,10 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = 0; } + if (projectile.ai[0] == 0f) { - //lineColor == 1 means it is spawned from Mollusk Armor rather than the weapon - projectile.damage = (int)((modProj.lineColor == 1 ? 140f : 70f) * player.MinionDamage()); - if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) - { - int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / - modProj.spawnedPlayerMinionDamageValue * - player.MinionDamage()); - projectile.damage = damage2; - } projectile.ai[1] += 1f; - Vector2 vector46 = projectile.position; if (!fly) { projectile.tileCollide = true; @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Summon float playerDistance = vector48.Length(); if (projectile.velocity.Y == 0f && (projectile.velocity.X != 0f || playerDistance > 200f)) { - switch (Main.rand.Next(1, 3)) + switch (Main.rand.Next(1, 4)) { case 1: @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Summon } } projectile.velocity.Y += 0.3f; - float num633 = 1000f; + float maxDistance = 1000f; bool chaseNPC = false; float npcPositionX = 0f; if (player.HasMinionAttackTargetNPC) @@ -129,29 +129,25 @@ namespace CalamityMod.Projectiles.Summon NPC npc = Main.npc[player.MinionAttackTargetNPC]; if (npc.CanBeChasedBy(projectile, false)) { - float num646 = Vector2.Distance(npc.Center, projectile.Center); - if (!chaseNPC && num646 < num633) + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + if (!chaseNPC && npcDist < maxDistance) { - num633 = num646; - vector46 = npc.Center; - npcPositionX = npc.position.X; + npcPositionX = npc.Center.X; chaseNPC = true; } } } if (!chaseNPC) { - for (int num645 = 0; num645 < Main.maxNPCs; num645++) + for (int index = 0; index < Main.maxNPCs; index++) { - NPC npcTarget = Main.npc[num645]; + NPC npcTarget = Main.npc[index]; if (npcTarget.CanBeChasedBy(projectile, false)) { - float num646 = Vector2.Distance(npcTarget.Center, projectile.Center); - if (!chaseNPC && num646 < num633) + float npcDist = Vector2.Distance(npcTarget.Center, projectile.Center); + if (!chaseNPC && npcDist < maxDistance) { - num633 = num646; - vector46 = npcTarget.Center; - npcPositionX = npcTarget.position.X; + npcPositionX = npcTarget.Center.X; chaseNPC = true; } } @@ -211,7 +207,7 @@ namespace CalamityMod.Projectiles.Summon { if (player.position.X - projectile.position.X > 0f) { - switch (Main.rand.Next(1, 3)) + switch (Main.rand.Next(1, 4)) { case 1: projectile.velocity.X += 0.05f; @@ -233,7 +229,7 @@ namespace CalamityMod.Projectiles.Summon } else { - switch (Main.rand.Next(1, 3)) + switch (Main.rand.Next(1, 4)) { case 1: projectile.velocity.X -= 0.05f; @@ -260,7 +256,7 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.velocity.X > 0.5f) { - switch (Main.rand.Next(1, 3)) + switch (Main.rand.Next(1, 4)) { case 1: projectile.velocity.X -= 0.05f; @@ -277,7 +273,7 @@ namespace CalamityMod.Projectiles.Summon } else if (projectile.velocity.X < -0.5f) { - switch (Main.rand.Next(1, 3)) + switch (Main.rand.Next(1, 4)) { case 1: projectile.velocity.X += 0.05f; @@ -302,12 +298,11 @@ namespace CalamityMod.Projectiles.Summon } else if (fly) { - Vector2 center2 = projectile.Center; - Vector2 vector48 = player.Center - center2 + new Vector2(0f, 0f); - float playerDistance = vector48.Length(); - vector48.Normalize(); - vector48 *= 14f; - projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; + Vector2 playerVec = player.Center - projectile.Center + new Vector2(0f, 0f); + float playerDistance = playerVec.Length(); + playerVec.Normalize(); + playerVec *= 14f; + projectile.velocity = (projectile.velocity * 40f + playerVec) / 41f; projectile.rotation = projectile.velocity.X * 0.03f; if (playerDistance > 1500f) @@ -336,11 +331,11 @@ namespace CalamityMod.Projectiles.Summon } } } - if ((double)projectile.velocity.X > 0.25) + if (projectile.velocity.X > 0.25f) { projectile.spriteDirection = -1; } - else if ((double)projectile.velocity.X < -0.25) + else if (projectile.velocity.X < -0.25f) { projectile.spriteDirection = 1; } @@ -349,37 +344,36 @@ namespace CalamityMod.Projectiles.Summon { projectile.rotation = 0; projectile.tileCollide = false; - int num988 = 10; - bool flag54 = false; - bool flag55 = false; + bool breakAway = false; + bool spawnDust = false; projectile.localAI[0] += 1f; if (projectile.localAI[0] % 30f == 0f) { - flag55 = true; + spawnDust = true; } - int num989 = (int)projectile.ai[1]; - if (projectile.localAI[0] >= (float)(60000 * num988)) //tryna make it stay on there "forever" without glitching + int npcIndex = (int)projectile.ai[1]; + if (projectile.localAI[0] >= 600000f) //tryna make it stay on there "forever" without glitching { - flag54 = true; + breakAway = true; } - else if (num989 < 0 || num989 >= Main.maxNPCs) + else if (npcIndex < 0 || npcIndex >= Main.maxNPCs) { - flag54 = true; + breakAway = true; } - else if (Main.npc[num989].active && !Main.npc[num989].dontTakeDamage && Main.npc[num989].defense < 9999) + else if (Main.npc[npcIndex].active && !Main.npc[npcIndex].dontTakeDamage && Main.npc[npcIndex].defense < 9999) { - projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f; - projectile.gfxOffY = Main.npc[num989].gfxOffY; - if (flag55) + projectile.Center = Main.npc[npcIndex].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[npcIndex].gfxOffY; + if (spawnDust) { - Main.npc[num989].HitEffect(0, 1.0); + Main.npc[npcIndex].HitEffect(0, 1.0); } } else { - flag54 = true; + breakAway = true; } - if (flag54) + if (breakAway) { projectile.ai[0] = 0f; projectile.velocity.X = 0f; @@ -390,60 +384,71 @@ namespace CalamityMod.Projectiles.Summon public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + Player player = Main.player[projectile.owner]; Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.maxNPCs; i++) + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && Main.npc[i].defense < 9999 && - ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == NPCID.Guide && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == NPCID.Clothier && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || - (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + NPC npc = Main.npc[npcIndex]; + //covers most edge cases like voodoo dolls + if (npc.active && !npc.dontTakeDamage && npc.defense < 9999 && + ((projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && projectile.owner < Main.maxPlayers && player.killClothier))) || + (projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles)) && (projectile.owner < 0 || npc.immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) { - if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + if (npc.noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(npc)) { - bool flag3; - if (Main.npc[i].type == NPCID.SolarCrawltipedeTail) + bool stickingToNPC; + //Solar Crawltipede tail has special collision + if (npc.type == NPCID.SolarCrawltipedeTail) { - Rectangle rect = Main.npc[i].getRect(); + Rectangle rect = npc.getRect(); int num5 = 8; rect.X -= num5; rect.Y -= num5; rect.Width += num5 * 2; rect.Height += num5 * 2; - flag3 = projectile.Colliding(myRect, rect); + stickingToNPC = projectile.Colliding(myRect, rect); } else { - flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + stickingToNPC = projectile.Colliding(myRect, npc.getRect()); } - if (flag3) + if (stickingToNPC) { - if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + //reflect projectile if the npc can reflect it (like Selenians) + if (npc.reflectingProjectiles && projectile.CanReflect()) { - Main.npc[i].ReflectProjectile(projectile.whoAmI); + npc.ReflectProjectile(projectile.whoAmI); return; } + + //let the projectile know it is sticking and the npc it is sticking too projectile.ai[0] = 1f; - projectile.ai[1] = (float)i; - projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; + projectile.ai[1] = (float)npcIndex; + + //follow the NPC + projectile.velocity = (npc.Center - projectile.Center) * 0.75f; + projectile.netUpdate = true; - projectile.StatusNPC(i); - projectile.damage = 0; - int num28 = 10; - Point[] array2 = new Point[num28]; - int num29 = 0; - for (int l = 0; l < Main.projectile.Length; l++) + + //Count how many projectiles are attached, delete as necessary + Point[] array2 = new Point[10]; + int projCount = 0; + for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) { - if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i) + Projectile proj = Main.projectile[projIndex]; + if (projIndex != projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == projectile.type && proj.ai[0] == 1f && proj.ai[1] == (float)npcIndex) { - array2[num29++] = new Point(l, Main.projectile[l].timeLeft); - if (num29 >= array2.Length) + array2[projCount++] = new Point(projIndex, proj.timeLeft); + if (projCount >= array2.Length) { break; } } } - if (num29 >= array2.Length) + if (projCount >= array2.Length) { int num30 = 0; for (int m = 1; m < array2.Length; m++) @@ -471,14 +476,7 @@ namespace CalamityMod.Projectiles.Summon return null; } - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (projectile.penetrate == 0) - { - projectile.Kill(); - } - return false; - } + public override bool CanDamage() => projectile.ai[0] == 0f; public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Summon/SiriusMinion.cs b/Projectiles/Summon/SiriusMinion.cs index bbf4898f32..a90ae92670 100644 --- a/Projectiles/Summon/SiriusMinion.cs +++ b/Projectiles/Summon/SiriusMinion.cs @@ -7,117 +7,117 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class SiriusMinion : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Sirius"); - ProjectileID.Sets.MinionSacrificable[projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; - } + public class SiriusMinion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sirius"); + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } - public override void SetDefaults() - { - projectile.width = 38; - projectile.height = 48; - projectile.netImportant = true; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.minionSlots = 1f; - projectile.timeLeft = 18000; - projectile.penetrate = -1; - projectile.tileCollide = false; - projectile.timeLeft *= 5; - projectile.minion = true; - } + public override void SetDefaults() + { + projectile.width = 38; + projectile.height = 48; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 1f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } - public override void AI() - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); - bool correctMinion = projectile.type == ModContent.ProjectileType(); - if (correctMinion) - { - if (player.dead) - { - modPlayer.sirius = false; - } - if (modPlayer.sirius) - { - projectile.timeLeft = 2; - } - } - player.AddBuff(ModContent.BuffType(), 3600); + bool correctMinion = projectile.type == ModContent.ProjectileType(); + if (correctMinion) + { + if (player.dead) + { + modPlayer.sirius = false; + } + if (modPlayer.sirius) + { + projectile.timeLeft = 2; + } + } + player.AddBuff(ModContent.BuffType(), 3600); - projectile.minionSlots = projectile.ai[0]; - Lighting.AddLight(projectile.Center, 1f, 0.5f, 5f); + projectile.minionSlots = projectile.ai[0]; + Lighting.AddLight(projectile.Center, 1f, 0.5f, 5f); - projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 60f); - if (player.gravDir == -1f) - { - projectile.position.Y += 120f; - projectile.rotation = MathHelper.Pi; - } - else - { - projectile.rotation = 0f; - } - projectile.position.X = (int)projectile.position.X; - projectile.position.Y = (int)projectile.position.Y; + projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 60f); + if (player.gravDir == -1f) + { + projectile.position.Y += 120f; + projectile.rotation = MathHelper.Pi; + } + else + { + projectile.rotation = 0f; + } + projectile.position.X = (int)projectile.position.X; + projectile.position.Y = (int)projectile.position.Y; - float scalar = (float)Main.mouseTextColor / 200f - 0.35f; - scalar *= 0.2f; - projectile.scale = scalar + 0.95f; + float scalar = (float)Main.mouseTextColor / 200f - 0.35f; + scalar *= 0.2f; + projectile.scale = scalar + 0.95f; - if (projectile.localAI[0] == 0f) - { - projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); - projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; - int dustAmt = 50; - for (int d = 0; d < dustAmt; d++) - { - int sirius = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 20, 0f, 0f, 0, default, 1f); - Main.dust[sirius].velocity *= 2f; - Main.dust[sirius].scale *= 1.15f; - } - projectile.localAI[0] += 1f; - } + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + int dustAmt = 50; + for (int d = 0; d < dustAmt; d++) + { + int sirius = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 20, 0f, 0f, 0, default, 1f); + Main.dust[sirius].velocity *= 2f; + Main.dust[sirius].scale *= 1.15f; + } + projectile.localAI[0] += 1f; + } - if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) - { - int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / - projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage()); - projectile.damage = damage2; - } - if (projectile.owner == Main.myPlayer) - { - if (projectile.ai[1] != 0f) - { - projectile.ai[1] -= 1f; - return; - } + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage()); + projectile.damage = damage2; + } + if (projectile.owner == Main.myPlayer) + { + if (projectile.ai[1] != 0f) + { + projectile.ai[1] -= 1f; + return; + } Vector2 targetVec = projectile.position; - float maxDistance = 7000f; - bool hasTarget = false; - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false)) - { + float maxDistance = 7000f; + bool hasTarget = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { float extraDistance = (npc.width / 2) + (npc.height / 2); if (Vector2.Distance(npc.Center, projectile.Center) < (maxDistance + extraDistance)) { targetVec = npc.Center; - hasTarget = true; - } - } - } - if (!hasTarget) - { - for (int i = 0; i < Main.maxNPCs; i++) - { + hasTarget = true; + } + } + } + if (!hasTarget) + { + for (int i = 0; i < Main.maxNPCs; i++) + { NPC npc = Main.npc[i]; if (npc.CanBeChasedBy(projectile, false)) { @@ -129,27 +129,27 @@ namespace CalamityMod.Projectiles.Summon hasTarget = true; } } - } - } - if (hasTarget) - { - float projSpeed = 15f; + } + } + if (hasTarget) + { + float projSpeed = 15f; Vector2 source = new Vector2(projectile.Center.X - 4f, projectile.Center.Y); Vector2 velocity = targetVec - projectile.Center; - float targetDist = velocity.Length(); - targetDist = projSpeed / targetDist; - velocity.X *= targetDist; - velocity.Y *= targetDist; + float targetDist = velocity.Length(); + targetDist = projSpeed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; float damageMult = ((float)Math.Log(projectile.ai[0], MathHelper.E)) + 1f; - int beam = Projectile.NewProjectile(source, velocity, ModContent.ProjectileType(), (int)(projectile.damage * damageMult), projectile.knockBack, projectile.owner); + int beam = Projectile.NewProjectile(source, velocity, ModContent.ProjectileType(), (int)(projectile.damage * damageMult), projectile.knockBack, projectile.owner); Main.projectile[beam].penetrate = (int)projectile.ai[0]; - projectile.ai[1] = 30f; - } - } - } + projectile.ai[1] = 30f; + } + } + } - public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); - public override bool CanDamage() => false; - } + public override bool CanDamage() => false; + } } diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index 01428ee118..c6b57bde79 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -10,70 +10,76 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class VileFeederSummon : ModProjectile - { - private bool spawnDust = true; - private float attackCooldown = 0f; + public class VileFeederSummon : ModProjectile + { + private bool spawnDust = true; private int eaterCooldown = 0; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Baby Eater"); - Main.projFrames[projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; - } + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Baby Eater"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } - public override void SetDefaults() - { - projectile.width = 30; - projectile.height = 30; - projectile.netImportant = true; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.minionSlots = 1f; - projectile.timeLeft = 18000; - projectile.penetrate = -1; - projectile.tileCollide = false; - projectile.timeLeft *= 5; - projectile.minion = true; - } + public override void SetDefaults() + { + projectile.width = projectile.height = 30; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 1f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } - public override void AI() - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); - if (spawnDust) - { - projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); - projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) - { - Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center; - Vector2 vector7 = vector6 - projectile.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 7, vector7.X * 1.75f, vector7.Y * 1.75f, 100, default, 1.1f); - Main.dust[num228].noGravity = true; - Main.dust[num228].velocity = vector7; - } - spawnDust = false; - } + if (spawnDust) + { + projectile.Calamity().lineColor = -1; + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + int dustAmt = 36; + for (int d = 0; d < dustAmt; d++) + { + Vector2 source = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + projectile.Center; + Vector2 dustVel = source - projectile.Center; + int num228 = Dust.NewDust(source + dustVel, 0, 0, 7, dustVel.X * 1.75f, dustVel.Y * 1.75f, 100, default, 1.1f); + Main.dust[num228].noGravity = true; + Main.dust[num228].velocity = dustVel; + } + spawnDust = false; + } + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + player.MinionDamage()); + projectile.damage = damage2; + } - bool correctMinion = projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (correctMinion) - { - if (player.dead) - { - modPlayer.vileFeeder = false; - } - if (modPlayer.vileFeeder) - { - projectile.timeLeft = 2; - } - } + bool correctMinion = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (correctMinion) + { + if (player.dead) + { + modPlayer.vileFeeder = false; + } + if (modPlayer.vileFeeder) + { + projectile.timeLeft = 2; + } + } if (eaterCooldown < 0) eaterCooldown = 0; @@ -82,15 +88,7 @@ namespace CalamityMod.Projectiles.Summon { if (eaterCooldown > 0) eaterCooldown--; - projectile.damage = (int)(VileFeeder.BaseDamage * player.MinionDamage()); - if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) - { - int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / - projectile.Calamity().spawnedPlayerMinionDamageValue * - player.MinionDamage()); - projectile.damage = damage2; - } - projectile.MinionAntiClump(); + projectile.ChargingMinionAI(640f, 1100f, 2400f, 150f, 0, 40f, 8f, 4f, 40f, 8f, false, false); projectile.frameCounter++; if (projectile.frameCounter > 3) { @@ -102,199 +100,46 @@ namespace CalamityMod.Projectiles.Summon projectile.frame = 0; } projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(270); - - bool flag24 = false; - if (projectile.ai[0] == 2f) - { - attackCooldown += 1f; - projectile.extraUpdates = 1; - if (attackCooldown > 40f) - { - attackCooldown = 1f; - projectile.ai[0] = 0f; - projectile.extraUpdates = 0; - projectile.numUpdates = 0; - projectile.netUpdate = true; - } - else - { - flag24 = true; - } - } - if (flag24) - { - return; - } - - Vector2 vector46 = projectile.position; - float num633 = 640f; //40 block detection range - bool targetFound = false; - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false)) - { - float npcDist = Vector2.Distance(npc.Center, projectile.Center); - if (npcDist < num633 && !targetFound && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) - { - num633 = npcDist; - vector46 = npc.Center; - targetFound = true; - } - } - } - if (!targetFound) - { - for (int num645 = 0; num645 < Main.maxNPCs; num645++) - { - NPC nPC2 = Main.npc[num645]; - if (nPC2.CanBeChasedBy(projectile, false)) - { - float npcDist = Vector2.Distance(nPC2.Center, projectile.Center); - if (npcDist < num633 && !targetFound && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, nPC2.position, nPC2.width, nPC2.height)) - { - num633 = npcDist; - vector46 = nPC2.Center; - targetFound = true; - } - } - } - } - float maxPlayerRange = 1100f; - if (targetFound) - { - maxPlayerRange = 2400f; - } - if (Vector2.Distance(player.Center, projectile.Center) > maxPlayerRange) - { - projectile.ai[0] = 1f; - projectile.netUpdate = true; - } - if (targetFound && projectile.ai[0] == 0f) - { - Vector2 vector47 = vector46 - projectile.Center; - float num648 = vector47.Length(); - vector47.Normalize(); - if (num648 > 200f) - { - float scaleFactor2 = 8f; - vector47 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - else - { - float num649 = 4f; - vector47 *= -num649; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - } - else - { - bool flag26 = false; - if (!flag26) - { - flag26 = projectile.ai[0] == 1f; - } - float num650 = 6f; - if (flag26) - { - num650 = 15f; - } - Vector2 center2 = projectile.Center; - Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); - float playerDist = vector48.Length(); - if (playerDist > 200f && num650 < 8f) - { - num650 = 8f; - } - if (playerDist < 150f && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - projectile.netUpdate = true; - } - if (playerDist > 2000f) - { - projectile.position.X = player.Center.X - (float)(projectile.width / 2); - projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (playerDist > 70f) - { - vector48.Normalize(); - vector48 *= num650; - projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; - } - else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) - { - projectile.velocity.X = -0.15f; - projectile.velocity.Y = -0.05f; - } - } - if (attackCooldown > 0f) - { - attackCooldown += (float)Main.rand.Next(1, 4); - } - if (attackCooldown > 40f) - { - attackCooldown = 0f; - projectile.netUpdate = true; - } - if (projectile.ai[0] == 0f) - { - if (attackCooldown == 0f && targetFound && num633 < 500f) - { - attackCooldown += 1f; - if (Main.myPlayer == projectile.owner) - { - projectile.ai[0] = 2f; - Vector2 value20 = vector46 - projectile.Center; - value20.Normalize(); - projectile.velocity = value20 * 8f; - projectile.netUpdate = true; - } - } - } } else { projectile.frame = 0; - projectile.extraUpdates = 0; - int num988 = 10; - bool flag54 = false; - bool flag55 = false; - projectile.localAI[0] += 1f; - if (projectile.localAI[0] % 30f == 0f) - { - flag55 = true; - } - int npcIndex = (int)projectile.ai[1]; - if (projectile.localAI[0] >= (float)(60000 * num988)) //tryna make it stay on there "forever" without glitching - { - flag54 = true; - } - else if (npcIndex < 0 || npcIndex >= Main.maxNPCs) - { - flag54 = true; - } - else if (Main.npc[npcIndex].active && !Main.npc[npcIndex].dontTakeDamage && Main.npc[npcIndex].defense < 9999) - { - projectile.Center = Main.npc[npcIndex].Center - projectile.velocity * 2f; - projectile.gfxOffY = Main.npc[npcIndex].gfxOffY; - if (flag55) - { - Main.npc[npcIndex].HitEffect(0, 1.0); - } - } - else - { - flag54 = true; - } - if (flag54) - { - projectile.ai[0] = 0f; - projectile.velocity.X = 0f; - projectile.velocity.Y = 0f; - } + projectile.extraUpdates = 0; + bool breakAway = false; + bool spawnDust = false; + projectile.localAI[0] += 1f; + if (projectile.localAI[0] % 30f == 0f) + { + spawnDust = true; + } + int npcIndex = projectile.Calamity().lineColor; + if (projectile.localAI[0] >= 600000f) //tryna make it stay on there "forever" without glitching + { + breakAway = true; + } + else if (npcIndex < 0 || npcIndex >= Main.maxNPCs) + { + breakAway = true; + } + else if (Main.npc[npcIndex].active && !Main.npc[npcIndex].dontTakeDamage && Main.npc[npcIndex].defense < 9999) + { + projectile.Center = Main.npc[npcIndex].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[npcIndex].gfxOffY; + if (spawnDust) + { + Main.npc[npcIndex].HitEffect(0, 1.0); + } + } + else + { + breakAway = true; + } + if (breakAway) + { + projectile.ai[0] = 0f; + projectile.velocity.X = 0f; + projectile.velocity.Y = 0f; + } if (projectile.owner == Main.myPlayer) { if (eaterCooldown > 0) @@ -309,112 +154,123 @@ namespace CalamityMod.Projectiles.Summon float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; xVector *= 10f; yVector *= 10f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), (int)(VileFeeder.BaseDamage * player.MinionDamage() * 1.25f), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), (int)(projectile.damage * 1.25f), projectile.knockBack, projectile.owner, 0f, 0f); } eaterCooldown = 80; } } } - } - - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[projectile.owner]; - Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); - if (projectile.owner == Main.myPlayer) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && npc.defense < 9999 && - ((projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && projectile.owner < Main.maxPlayers && player.killClothier))) && (projectile.owner < 0 || npc.immune[projectile.owner] == 0 || projectile.maxPenetrate == 1))) - { - if (npc.noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(npc)) - { - bool flag3; - if (npc.type == NPCID.SolarCrawltipedeTail) - { - Rectangle rect = npc.getRect(); - int num5 = 8; - rect.X -= num5; - rect.Y -= num5; - rect.Width += num5 * 2; - rect.Height += num5 * 2; - flag3 = projectile.Colliding(myRect, rect); - } - else - { - flag3 = projectile.Colliding(myRect, npc.getRect()); - } - if (flag3) - { - if (npc.reflectingProjectiles && projectile.CanReflect()) - { - npc.ReflectProjectile(projectile.whoAmI); - return; - } - projectile.ai[0] = 3f; - projectile.ai[1] = (float)i; - projectile.velocity = (npc.Center - projectile.Center) * 0.75f; - projectile.netUpdate = true; - projectile.StatusNPC(i); - projectile.damage = 0; - int num28 = 10; - Point[] array2 = new Point[num28]; - int num29 = 0; - for (int l = 0; l < Main.maxProjectiles; l++) - { - Projectile proj = Main.projectile[l]; - if (l != projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == projectile.type && proj.ai[0] == 3f && proj.ai[1] == (float)i) - { - array2[num29++] = new Point(l, Main.projectile[l].timeLeft); - if (num29 >= array2.Length) - { - break; - } - } - } - if (num29 >= array2.Length) - { - int num30 = 0; - for (int m = 1; m < array2.Length; m++) - { - if (array2[m].Y < array2[num30].Y) - { - num30 = m; - } - } - Main.projectile[array2[num30].X].Kill(); - } - } - } - } - } - } } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (targetHitbox.Width > 8 && targetHitbox.Height > 8) - { - targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); - } - return null; - } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Player player = Main.player[projectile.owner]; + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Main.projectileTexture[projectile.type]; - int num214 = texture.Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), projectile.scale, spriteEffects, 0f); - return false; - } + if (projectile.owner == Main.myPlayer) + { + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + //covers most edge cases like voodoo dolls + if (npc.active && !npc.dontTakeDamage && npc.defense < 9999 && + ((projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && projectile.owner < Main.maxPlayers && player.killClothier))) || + (projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles)) && (projectile.owner < 0 || npc.immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (npc.noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(npc)) + { + bool stickingToNPC; + //Solar Crawltipede tail has special collision + if (npc.type == NPCID.SolarCrawltipedeTail) + { + Rectangle rect = npc.getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + stickingToNPC = projectile.Colliding(myRect, rect); + } + else + { + stickingToNPC = projectile.Colliding(myRect, npc.getRect()); + } + if (stickingToNPC) + { + //reflect projectile if the npc can reflect it (like Selenians) + if (npc.reflectingProjectiles && projectile.CanReflect()) + { + npc.ReflectProjectile(projectile.whoAmI); + return; + } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.immune[projectile.owner] = 0; - } - } + //let the projectile know it is sticking and the npc it is sticking too + projectile.ai[0] = 1f; + projectile.Calamity().lineColor = npcIndex; + + //follow the NPC + projectile.velocity = (npc.Center - projectile.Center) * 0.75f; + + projectile.netUpdate = true; + + //Count how many projectiles are attached, delete as necessary + Point[] array2 = new Point[10]; + int projCount = 0; + for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) + { + Projectile proj = Main.projectile[projIndex]; + if (projIndex != projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == projectile.type && proj.ai[0] == 1f && proj.Calamity().lineColor == npcIndex) + { + array2[projCount++] = new Point(projIndex, proj.timeLeft); + if (projCount >= array2.Length) + { + break; + } + } + } + if (projCount >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + { + num30 = m; + } + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Texture2D texture = Main.projectileTexture[projectile.type]; + int num214 = texture.Height / Main.projFrames[projectile.type]; + int y6 = num214 * projectile.frame; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), projectile.scale, spriteEffects, 0f); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[projectile.owner] = 0; + } + + public override bool CanDamage() => projectile.ai[0] != 3f; + } } From 7faf5a58fba39f062676669b01af37224340ef7b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 22:53:58 -0400 Subject: [PATCH 40/71] fixed mounted scanner & pulse turret remote not using mana && fixed pulse turret recipe --- Items/Weapons/DraedonsArsenal/MountedScanner.cs | 1 + Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index 6c336c8ed4..a6fe86584d 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.summon = true; item.damage = 19; item.knockBack = 2f; + item.mana = 10; item.useTime = item.useAnimation = 25; item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 567ab9b6e3..d3e19d3d31 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.sentry = true; item.damage = 100; item.knockBack = 0f; + item.mana = 10; item.useTime = item.useAnimation = 25; item.autoReuse = true; @@ -65,7 +66,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); From 7642d3b5ac581da4747065c9650a1468dda9d669 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 22 Jul 2020 23:07:03 -0400 Subject: [PATCH 41/71] acid rain can now happen on the off chance of activating tier 2 in phm --- Events/AcidRainEvent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 26dc6bd101..80c62c783d 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -143,11 +143,11 @@ namespace CalamityMod.Events } } /// - /// Attempts to start the Acid Rain event. Will fail if there is another invasion going on or the EoC has not been killed yet (unless you're in hardmode). + /// Attempts to start the Acid Rain event. Will fail if there is another invasion or boss rush going on. It will also fail if the EoC, WoF, or AS has not been killed yet. /// public static void TryStartEvent(bool forceRain = false) { - if (CalamityWorld.rainingAcid || (!NPC.downedBoss1 && !Main.hardMode) || CalamityWorld.bossRushActive) + if (CalamityWorld.rainingAcid || (!NPC.downedBoss1 && !Main.hardMode && !CalamityWorld.downedAquaticScourge) || CalamityWorld.bossRushActive) return; int playerCount = 0; for (int i = 0; i < Main.player.Length; i++) From 3e16a5aac61d394524b27dd5d8a40ed09a6f7ca9 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 22 Jul 2020 23:14:03 -0400 Subject: [PATCH 42/71] Significant behavior tweaks to Phaseslayer. --- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 113 +++-- .../DraedonsArsenal/PhaseslayerProjectile.cs | 455 ++++++++++-------- 2 files changed, 323 insertions(+), 245 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index a8facdbf6a..e7d66b1527 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -8,65 +8,74 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class Phaseslayer : ModItem - { - public const int MinDamage = 4500; - public const int MaxDamage = 12500; - public const float SmallPhaseDamageMultiplier = 0.66f; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Phaseslayer"); - Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + - "Swinging quickly causes the blade to release energy forward"); - } - public override void SetDefaults() - { - item.damage = MinDamage; - item.melee = true; - item.width = 26; - item.height = 26; - item.useTime = 24; - item.useAnimation = 24; - item.useStyle = ItemUseStyleID.HoldingOut; - item.useTurn = false; - item.knockBack = 7f; + public class Phaseslayer : ModItem + { + public const int Damage = 12500; + // When below this percentage of charge, the sword is small instead of big. + public const float SizeChargeThreshold = 0.33f; + public const float SmallDamageMultiplier = 0.66f; - item.noUseGraphic = true; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Wield a colossal laser blade which is controlled by the cursor\n" + + "Faster swings deal more damage and release sword beams\n" + + "When at low charge, the blade is smaller and weaker"); + } + public override void SetDefaults() + { + item.damage = Damage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.noUseGraphic = true; - item.UseSound = SoundID.Item1; - item.autoReuse = true; + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.RareVariant; - item.Calamity().Chargeable = true; - item.Calamity().ChargeMax = 250; + item.UseSound = SoundID.Item1; + item.autoReuse = true; - item.shoot = ModContent.ProjectileType(); + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; - item.channel = true; - } + item.shoot = ModContent.ProjectileType(); + item.channel = true; + } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); - blade.rotation = blade.AngleTo(Main.MouseWorld); - return false; - } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.RedPhasesaber); - recipe.AddTile(ModContent.TileType()); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override void AddRecipes() + { + void AddIndividualRecipe(int saberID) + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(saberID); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + int[] phasesabers = { ItemID.WhitePhasesaber, ItemID.RedPhasesaber, ItemID.GreenPhasesaber, ItemID.BluePhasesaber, ItemID.PurplePhasesaber, ItemID.YellowPhasesaber }; + foreach (int id in phasesabers) + AddIndividualRecipe(id); + } + } } diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index b34e8674fb..95cc15d8d9 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -1,4 +1,5 @@ using CalamityMod.Dusts; +using CalamityMod.Items; using CalamityMod.Items.Weapons.DraedonsArsenal; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,219 +10,287 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.DraedonsArsenal { - public class PhaseslayerProjectile : ModProjectile - { - public bool IsSmall => Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; - public float AngularSwingMomentum - { - get => projectile.ai[0]; - set => projectile.ai[0] = value; - } - public float FadeoutTime - { - get => projectile.localAI[0]; - set => projectile.localAI[0] = value; - } - public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; - public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + public class PhaseslayerProjectile : ModProjectile + { + // The "average" or "expected" swing speed which the sword's damage balance is based off of. + // This is rotation EVERY FRAME. The "average" swing speed is 360 degrees in one second, aka pi/30 radians per frame. + public const float StandardSwingSpeed = MathHelper.Pi / 30f; - // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. - // That speed is 12 degrees per frame, or pi/15 radians per frame. - public const float MaxAngularDamage = MathHelper.Pi / 15f; - public const float DamageUpdateResponsiveness = 0.08f; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Phaseslayer"); - ProjectileID.Sets.TrailingMode[projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; - } + // How quickly the sword's damage updates to reflect its current speed. Higher values make it change damage more quickly. + public const float DamageUpdateResponsiveness = 0.08f; - public override void SetDefaults() - { - projectile.width = 46; // Collision logic is done manually. - projectile.height = 46; - projectile.penetrate = -1; - projectile.tileCollide = false; - projectile.melee = true; - projectile.ignoreWater = true; - projectile.usesLocalNPCImmunity = true; - projectile.friendly = true; - projectile.localNPCHitCooldown = 3; - } + // When the accumuluated "charge exhaustion" meter reaches this value, the Phaseslayer item loses one point of charge. + public const float ChargeLossBreakpoint = 300f; - public override void AI() - { - Player player = Main.player[projectile.owner]; - float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. - float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; - float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + private const float MaximumMouseRange = 360f; + private const float ProjCenterOffset = 36f; - ManipulatePlayer(player); - AdjustDamageBasedOnRotation(player, deltaAngle); - ManipulateFrames(); - PlaySounds(player, deltaAngle); - HandleCooldowns(); - } + public bool IsSmall + { + get + { + CalamityGlobalItem swordItem = Main.player[projectile.owner].ActiveItem().Calamity(); + float chargeRatio = swordItem.CurrentCharge / (float)swordItem.ChargeMax; + return chargeRatio < Phaseslayer.SizeChargeThreshold; + } + } + + // ai[0] wrapper. Stores a rolling lerped average of angular momentum which is used as the swing speed damage multiplier. + public float AngularDamageFactor + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } - public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) - { - AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + // ai[1] wrapper. Stores an accumulating "charge exhaustion" meter. When it reaches the limit, a charge point is lost. + public float ChargeLossProgress + { + get => projectile.ai[1]; + set => projectile.ai[1] = value; + } - float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); - float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + // localAI[0] wrapper + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } - float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); - projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); - } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; - public void ManipulatePlayer(Player player) - { - if (Main.myPlayer == player.whoAmI) - { - // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. - if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) - { - float mouseDistance = projectile.Distance(Main.MouseWorld); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } - // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). - float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.friendly = true; + projectile.melee = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; - float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); - projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); - } - else if (FadeoutTime == 0f) - { - if (!player.channel) - FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. - else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. - } - projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; - } - projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); - player.ChangeDir(projectile.direction); - player.heldProj = projectile.whoAmI; - player.itemTime = 2; - player.itemAnimation = 2; - player.itemRotation = projectile.rotation * projectile.direction; - } + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 3; + } - public void ManipulateFrames() - { - projectile.frame = 0; + public override void AI() + { + Player player = Main.player[projectile.owner]; + // Angles are wrapped to be 0 to 2pi instead of -pi to pi for convenience with absolute values. + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); - if (IsSmall) - { - // Fadeout frames. - if (FadeoutTime > 5) - projectile.frame = 1; - else if (FadeoutTime > 0) - projectile.frame = 2; - } - else - { - projectile.frameCounter++; - int adjustFrameCounter = projectile.frameCounter % 120; + ManipulatePlayer(player); + bool wasBig = !IsSmall; + UpdateCharge(player); + bool justShrunk = IsSmall && wasBig; + if (justShrunk) + OnShrinkEffects(); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + HandleSwordBeams(player, deltaAngle); + HandleFadeout(); + } - // Idle lightning frames. - if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) - projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); - if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) - projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + private void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // In addition to typical channel cancellation criteria, the sword fizzles out if it runs out of charge. + Item playerItem = player.ActiveItem(); + bool hasCharge = playerItem.Calamity().CurrentCharge > 0; + if (player.channel && !player.noItems && !player.CCed && playerItem.type == ModContent.ItemType() && hasCharge) + { + // The distance ratio ranges from 0 (your mouse is directly on the player) to 1 (your mouse is at the max range considered, or any further distance). + float mouseDistance = projectile.Distance(Main.MouseWorld); + float distRatio = Utils.InverseLerp(0f, MaximumMouseRange, mouseDistance, true); - // Fadeout frames. - if (FadeoutTime > 5) - projectile.frame = 19; - else if (FadeoutTime > 0) - projectile.frame = 20; - } - } + // This formula ensures that the sword has a sudden and extremely harsh responsiveness penalty when the mouse is close to the player. + // Otherwise it controls perfectly fine. + float aimResponsiveness = 0.035f + 0.3f * (float)Math.Pow(distRatio, 1D/3); - public void PlaySounds(Player player, float deltaAngle) - { - if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) - { - if (Main.myPlayer == player.whoAmI) - { - Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; - Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); - } - bool wasBig = !IsSmall; - if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) - { - // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. - if (Main.myPlayer == projectile.owner) - { - if (Main.mouseItem.active) - Main.mouseItem.Calamity().CurrentCharge--; - else player.HeldItem.Calamity().CurrentCharge--; - } + // Update the sword's angle with the responsiveness determined by mouse position. + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } - // Make some visuals if the sword becomes small as a result of charging. - if (IsSmall && wasBig) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); - if (!Main.dedServ) - { - for (int i = 0; i < 60; i++) - { - Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); - dust.velocity = Main.rand.NextVector2Circular(20f, 20f); - dust.scale = 2.5f; - dust.fadeIn = 1.2f; - dust.noGravity = true; - } - } - } - } - projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); - } - } + // If the player is not wielding the sword, determine whether it should fade out or instantly vanish. + else if (FadeoutTime == 0f) + { + // If the player voluntarily stopped holding left mouse, start the fadeout timer. + if (!player.channel) + FadeoutTime = 10f; + // If the player was killed, frozen, cursed, etc. just delete it immediately. + else + projectile.Kill(); + } - public void HandleCooldowns() - { - if (FadeoutTime > 0) - { - FadeoutTime--; - if (FadeoutTime <= 0f) - projectile.Kill(); - } - } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * ProjCenterOffset; + } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); - Texture2D hiltTexture = ModContent.GetTexture(Texture); - if (IsSmall) - bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); - Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; - Vector2 origin = bladeTexture.Size() * 0.5f; - origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); - Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + // These lines ensure the player and their arm are rotated the correct direction to hold the sword. + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } - // TODO: Update this afterimage drawcode to be more cool. - for (int i = 1; i < projectile.oldRot.Length; i++) - { - float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); - float angle = projectile.rotation + angleDelta; - angle += MathHelper.PiOver2; - Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); - Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); - spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); - } + private void UpdateCharge(Player player) + { + // Having the sword active at all costs some energy. + ChargeLossProgress += 1f; + + // If charge is due to be lost, reset the accumuluated charge exhaustion and update the player's held item. + if (ChargeLossProgress > ChargeLossBreakpoint) + { + ChargeLossProgress -= ChargeLossBreakpoint; - spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); - spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else + player.HeldItem.Calamity().CurrentCharge--; + } + } + } - return false; - } + private void OnShrinkEffects() + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (Main.dedServ) + return; - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float _ = 0f; - Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; - Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); - } - } + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + + private void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + // Update the rolling "blade angular momentum" average by gently lerping in the newest data point. + AngularDamageFactor = MathHelper.Lerp(AngularDamageFactor, deltaAngle, DamageUpdateResponsiveness); + + // 0x expected speed gives you 53.5% damage. + // 1x expected speed gives you 100.0% damage. + // 1.5x expected speed gives you 116.6% damage. + // 2x expected speed gives you 130.6% damage. + // 3x expected speed gives you 153.5% damage. + // 4x expected speed gives you 171.7% damage. + // 5x expected speed gives you 187.0% damage. + float speedDamageScalar = 0.166f + (float)Math.Log(AngularDamageFactor / StandardSwingSpeed + 1.5f, 3f); + float statDamageScalar = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallDamageMultiplier : 1f); + projectile.damage = (int)(Phaseslayer.Damage * speedDamageScalar * statDamageScalar); + } + + private void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + private void HandleSwordBeams(Player player, float deltaAngle) + { + // Producing a sword beam takes a bit higher of a speed than the "typical" speed the sword is balanced around. + if (projectile.soundDelay <= 0 && deltaAngle >= 1.3f * StandardSwingSpeed) + { + // Sword beams cost a noticeable amount of energy, but deal the blade's current damage. Swing harder to get more damage! + ChargeLossProgress += 30f; + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), projectile.damage, 0f, player.whoAmI); + } + + // The sound delay doubles as the sword beam's cooldown. + projectile.soundDelay = 15; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + private void HandleFadeout() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } } From b3a39e706d0b54a6b49c1b2ecffb434018f3ffe3 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 22 Jul 2020 23:38:07 -0400 Subject: [PATCH 43/71] boosted damage, lowered iframes, fixed insta beam --- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 2 +- Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index e7d66b1527..9023469ff9 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class Phaseslayer : ModItem { - public const int Damage = 12500; + public const int Damage = 19000; // When below this percentage of charge, the sword is small instead of big. public const float SizeChargeThreshold = 0.33f; public const float SmallDamageMultiplier = 0.66f; diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index 95cc15d8d9..70bf27abed 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // When the accumuluated "charge exhaustion" meter reaches this value, the Phaseslayer item loses one point of charge. public const float ChargeLossBreakpoint = 300f; + public const int SwordBeamCooldown = 15; private const float MaximumMouseRange = 360f; private const float ProjCenterOffset = 36f; @@ -77,7 +78,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 3; + projectile.localNPCHitCooldown = 7; } public override void AI() @@ -88,6 +89,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + // Frame 1 effect: Prevent the sword from instantly firing a sword beam. + if (projectile.localAI[1] == 0f) + { + projectile.localAI[1] = 1f; + projectile.soundDelay = SwordBeamCooldown; + } + ManipulatePlayer(player); bool wasBig = !IsSmall; UpdateCharge(player); @@ -242,7 +250,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } // The sound delay doubles as the sword beam's cooldown. - projectile.soundDelay = 15; + projectile.soundDelay = SwordBeamCooldown; Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); } } From 0691dc69abf45c242da48c18bfcb9aec71fb8f12 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 23 Jul 2020 00:35:27 -0400 Subject: [PATCH 44/71] fixed walls breaking into the wrong items --- Walls/DraedonStructures/RustedPlateBeam.cs | 6 +++--- Walls/DraedonStructures/RustedPlatePillar.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Walls/DraedonStructures/RustedPlateBeam.cs b/Walls/DraedonStructures/RustedPlateBeam.cs index 4dc8f86a73..e03ee628b2 100644 --- a/Walls/DraedonStructures/RustedPlateBeam.cs +++ b/Walls/DraedonStructures/RustedPlateBeam.cs @@ -1,7 +1,7 @@ -using Terraria; using Microsoft.Xna.Framework; -using Terraria.ID; +using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Walls.DraedonStructures { public class RustedPlateBeam : ModWall @@ -10,7 +10,7 @@ namespace CalamityMod.Walls.DraedonStructures public override void SetDefaults() { dustType = 32; - drop = ModContent.ItemType(); + drop = ModContent.ItemType(); Main.wallHouse[Type] = true; AddMapEntry(new Color(74, 47, 39)); diff --git a/Walls/DraedonStructures/RustedPlatePillar.cs b/Walls/DraedonStructures/RustedPlatePillar.cs index 4d2e22a510..c45e84988d 100644 --- a/Walls/DraedonStructures/RustedPlatePillar.cs +++ b/Walls/DraedonStructures/RustedPlatePillar.cs @@ -1,7 +1,7 @@ -using Terraria; using Microsoft.Xna.Framework; -using Terraria.ID; +using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Walls.DraedonStructures { public class RustedPlatePillar : ModWall @@ -10,7 +10,7 @@ namespace CalamityMod.Walls.DraedonStructures public override void SetDefaults() { dustType = 32; - drop = ModContent.ItemType(); + drop = ModContent.ItemType(); Main.wallHouse[Type] = true; AddMapEntry(new Color(99, 71, 60)); From 09b9bc7fe9cd195fcb2c56860f7cb417c2bf5161 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 23 Jul 2020 00:16:52 -0500 Subject: [PATCH 45/71] 1 - Version bump. 2 - SCal skulls spawn from both sides in bullet hell 5. 3 - Slime God Core spams less orbs. --- NPCs/SlimeGod/SlimeGodCore.cs | 4 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 74 ++++++++++++----------- build.txt | 2 +- 3 files changed, 41 insertions(+), 39 deletions(-) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index acccc15d7f..8670965432 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -364,7 +364,7 @@ namespace CalamityMod.NPCs.SlimeGod if (Main.netMode != NetmodeID.MultiplayerClient) { - if (npc.ai[1] % 10f == 0f && Vector2.Distance(player.Center, vectorCenter) > 160f) + if (npc.ai[1] % 15f == 0f && Vector2.Distance(player.Center, vectorCenter) > 160f) { if (expertMode && Main.rand.NextBool(2)) { @@ -446,7 +446,7 @@ namespace CalamityMod.NPCs.SlimeGod { if (Main.netMode != NetmodeID.MultiplayerClient && Vector2.Distance(player.Center, vectorCenter) > 160f) { - if (npc.ai[1] % 20f == 0f) + if (npc.ai[1] % 40f == 0f) { if (expertMode && Main.rand.NextBool(2)) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 70d40aece3..532867ac35 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -453,18 +453,18 @@ namespace CalamityMod.NPCs.SupremeCalamitas int damage = expertMode ? 200 : 250; //800 500 if (bulletHellCounter2 < 300) //blasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else if (bulletHellCounter2 < 600) //blasts from left and right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else //blasts from above, left, and right { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } } @@ -528,21 +528,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas { if (bulletHellCounter2 % 180 == 0) //blasts from top { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } else if (bulletHellCounter2 < 1500 && bulletHellCounter2 > 1200) { if (bulletHellCounter2 % 180 == 0) //blasts from right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } else if (bulletHellCounter2 > 1500) { if (bulletHellCounter2 % 180 == 0) //blasts from top { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } bulletHellCounter += 1; @@ -551,16 +551,16 @@ namespace CalamityMod.NPCs.SupremeCalamitas bulletHellCounter = 0; if (bulletHellCounter2 < 1200) //blasts from below { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else if (bulletHellCounter2 < 1500) //blasts from left { - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else //blasts from left and right { - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } } @@ -603,11 +603,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas int damage = expertMode ? 150 : 200; if (bulletHellCounter2 % 180 == 0) //blasts from top { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 240 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } bulletHellCounter += 1; if (bulletHellCounter > (enraged ? 9 : 11)) @@ -615,16 +615,16 @@ namespace CalamityMod.NPCs.SupremeCalamitas bulletHellCounter = 0; if (bulletHellCounter2 < 2100) //blasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else if (bulletHellCounter2 < 2400) //blasts from right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else //blasts from left and right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } } @@ -672,16 +672,16 @@ namespace CalamityMod.NPCs.SupremeCalamitas int damage = expertMode ? 150 : 200; if (bulletHellCounter2 % 180 == 0) //blasts from top { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 240 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } int divisor = revenge ? 225 : expertMode ? 450 : 675; if (bulletHellCounter2 % divisor == 0 && expertMode) //giant homing fireballs { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 1f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, passedVar); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 1f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, passedVar); passedVar += 1f; } bulletHellCounter += 1; @@ -690,16 +690,16 @@ namespace CalamityMod.NPCs.SupremeCalamitas bulletHellCounter = 0; if (bulletHellCounter2 < 3000) //blasts from below { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else if (bulletHellCounter2 < 3300) //blasts from left { - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else //blasts from left and right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } } @@ -747,34 +747,36 @@ namespace CalamityMod.NPCs.SupremeCalamitas int damage = expertMode ? 150 : 200; if (bulletHellCounter2 % 240 == 0) //blasts from top { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 360 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-500, 500), -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - } + int random = Main.rand.Next(-1000, 1001); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + } bulletHellCounter += 1; if (bulletHellCounter > (enraged ? 12 : 14)) { bulletHellCounter = 0; if (bulletHellCounter2 < 3900) //blasts from above { - Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else if (bulletHellCounter2 < 4200) //blasts from left and right { - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } else //blasts from above, left, and right { - Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1000), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/build.txt b/build.txt index b61b3f685b..10f7c9f146 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 1.4.4.004 +version = 1.4.5.001 displayName = Calamity Mod (No Calamity Music) homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes From dbdbc88d572dc2fe678d3ee3c35a5f4eed424548 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 23 Jul 2020 01:52:56 -0400 Subject: [PATCH 46/71] Unique Draedon rarity, fixed any price/recipe issues --- Items/CalamityGlobalItem.cs | 3 +++ Items/DraedonsLog.cs | 3 ++- Items/Materials/DubiousPlating.cs | 6 ++++-- Items/Materials/MysteriousCircuitry.cs | 6 ++++-- Items/Placeables/DraedonsChargingStation.cs | 11 +++++++---- Items/Placeables/DraedonsFuelFactoryItem.cs | 9 +++++++-- Items/PowerCell.cs | 7 +++---- Items/Weapons/DraedonsArsenal/GatlingLaser.cs | 6 +++--- Items/Weapons/DraedonsArsenal/GaussDagger.cs | 3 ++- Items/Weapons/DraedonsArsenal/GaussPistol.cs | 3 ++- Items/Weapons/DraedonsArsenal/GaussRifle.cs | 3 ++- .../Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs | 3 ++- Items/Weapons/DraedonsArsenal/LaserRifle.cs | 4 ++-- Items/Weapons/DraedonsArsenal/MountedScanner.cs | 3 ++- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 8 ++++---- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 4 ++-- Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs | 6 +++--- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 6 +++--- Items/Weapons/DraedonsArsenal/PulsePistol.cs | 3 ++- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 12 ++++++------ Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs | 3 ++- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 8 +++++--- .../DraedonsArsenal/StarSwallowerContainmentUnit.cs | 3 ++- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 6 +++--- Utilities/Enums.cs | 3 ++- 25 files changed, 79 insertions(+), 53 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index d52fac474c..001d63e635 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1068,6 +1068,9 @@ namespace CalamityMod.Items case CalamityRarity.Rainbow: tt2.overrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); break; + case CalamityRarity.DraedonRust: + tt2.overrideColor = new Color(204, 71, 35); + break; case CalamityRarity.RareVariant: tt2.overrideColor = new Color(255, 140, 0); break; diff --git a/Items/DraedonsLog.cs b/Items/DraedonsLog.cs index 337678cf9d..ac8fd422b7 100644 --- a/Items/DraedonsLog.cs +++ b/Items/DraedonsLog.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Items { item.width = 40; item.height = 40; - item.rare = 11; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.useAnimation = item.useTime = 20; item.useStyle = ItemUseStyleID.HoldingUp; } diff --git a/Items/Materials/DubiousPlating.cs b/Items/Materials/DubiousPlating.cs index 4ab4787e59..30d2dca04a 100644 --- a/Items/Materials/DubiousPlating.cs +++ b/Items/Materials/DubiousPlating.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Materials @@ -15,8 +16,9 @@ namespace CalamityMod.Items.Materials item.width = 30; item.height = 24; item.maxStack = 999; - item.value = Item.sellPrice(silver: 3); - item.rare = 1; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.value = Item.sellPrice(silver: 6); } } } diff --git a/Items/Materials/MysteriousCircuitry.cs b/Items/Materials/MysteriousCircuitry.cs index af61434ab7..374634ce67 100644 --- a/Items/Materials/MysteriousCircuitry.cs +++ b/Items/Materials/MysteriousCircuitry.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Materials @@ -15,8 +16,9 @@ namespace CalamityMod.Items.Materials item.width = 30; item.height = 24; item.maxStack = 999; - item.value = Item.sellPrice(silver: 3); - item.rare = 1; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.value = Item.sellPrice(silver: 6); } } } diff --git a/Items/Placeables/DraedonsChargingStation.cs b/Items/Placeables/DraedonsChargingStation.cs index fb3c05b0af..3346d2aa33 100644 --- a/Items/Placeables/DraedonsChargingStation.cs +++ b/Items/Placeables/DraedonsChargingStation.cs @@ -1,8 +1,7 @@ -using CalamityMod.Items.Placeables.Walls; -using CalamityMod.Items.Materials; +using CalamityMod.Tiles; +using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Tiles; namespace CalamityMod.Items.Placeables { @@ -11,11 +10,11 @@ namespace CalamityMod.Items.Placeables public override void SetStaticDefaults() { DisplayName.SetDefault("Draedon's Charging Station"); + Tooltip.SetDefault("Charges Draedon's weaponry using Power Cells"); } public override void SetDefaults() { - item.rare = 10; item.width = 26; item.height = 26; item.maxStack = 999; @@ -25,6 +24,10 @@ namespace CalamityMod.Items.Placeables item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; item.createTile = ModContent.TileType(); + + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.value = Item.buyPrice(gold: 50); } } } diff --git a/Items/Placeables/DraedonsFuelFactoryItem.cs b/Items/Placeables/DraedonsFuelFactoryItem.cs index 5b4d5378c8..a167ceacaf 100644 --- a/Items/Placeables/DraedonsFuelFactoryItem.cs +++ b/Items/Placeables/DraedonsFuelFactoryItem.cs @@ -1,6 +1,7 @@ +using CalamityMod.Tiles; +using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Tiles; namespace CalamityMod.Items.Placeables { @@ -9,11 +10,11 @@ namespace CalamityMod.Items.Placeables public override void SetStaticDefaults() { DisplayName.SetDefault("Draedon's Fuel Factory"); + Tooltip.SetDefault("Produces Draedon Power Cells over time"); } public override void SetDefaults() { - item.rare = 10; item.width = 26; item.height = 26; item.maxStack = 999; @@ -23,6 +24,10 @@ namespace CalamityMod.Items.Placeables item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; item.createTile = ModContent.TileType(); + + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.value = Item.buyPrice(gold: 50); } } } diff --git a/Items/PowerCell.cs b/Items/PowerCell.cs index d52091a977..4c6adf1574 100644 --- a/Items/PowerCell.cs +++ b/Items/PowerCell.cs @@ -1,5 +1,3 @@ -using CalamityMod.UI; -using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,14 +8,15 @@ namespace CalamityMod.Items public override void SetStaticDefaults() { DisplayName.SetDefault("Draedon Power Cell"); - Tooltip.SetDefault("Used at a charger to charge special weapons"); + Tooltip.SetDefault("Used to charge Draedon's weaponry at a charger"); } public override void SetDefaults() { item.width = 26; item.height = 14; - item.rare = 10; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.maxStack = 999; } } diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index 83ad263184..1f3ef04664 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.DraedonsArsenal; using Microsoft.Xna.Framework; using Terraria; @@ -8,7 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class GatlingLaser : ModItem + public class GatlingLaser : ModItem { public override void SetStaticDefaults() { @@ -35,7 +34,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity8BuyPrice; - item.rare = 8; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.cs b/Items/Weapons/DraedonsArsenal/GaussDagger.cs index 87130e9935..469696aa93 100644 --- a/Items/Weapons/DraedonsArsenal/GaussDagger.cs +++ b/Items/Weapons/DraedonsArsenal/GaussDagger.cs @@ -28,7 +28,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.knockBack = 7f; item.value = CalamityGlobalItem.Rarity3BuyPrice; - item.rare = 3; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item1; item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs index 81313d8487..cdfc6bf44c 100644 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ b/Items/Weapons/DraedonsArsenal/GaussPistol.cs @@ -28,7 +28,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity5BuyPrice; - item.rare = 5; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; diff --git a/Items/Weapons/DraedonsArsenal/GaussRifle.cs b/Items/Weapons/DraedonsArsenal/GaussRifle.cs index 2dab43881a..19437d886f 100644 --- a/Items/Weapons/DraedonsArsenal/GaussRifle.cs +++ b/Items/Weapons/DraedonsArsenal/GaussRifle.cs @@ -30,7 +30,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity8BuyPrice; - item.rare = 8; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 27f; diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index 5d3679aec1..a981ad2b35 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -27,8 +27,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item23; item.shoot = ModContent.ProjectileType(); - item.rare = 5; item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/DraedonsArsenal/LaserRifle.cs b/Items/Weapons/DraedonsArsenal/LaserRifle.cs index f09c2e3701..72046c1ff8 100644 --- a/Items/Weapons/DraedonsArsenal/LaserRifle.cs +++ b/Items/Weapons/DraedonsArsenal/LaserRifle.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index 6c336c8ed4..a6437997f2 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -30,7 +30,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity5BuyPrice; - item.rare = 5; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index 9023469ff9..b6b4f80708 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.value = CalamityGlobalItem.RarityVioletBuyPrice; item.rare = ItemRarityID.Red; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item1; item.autoReuse = true; @@ -64,9 +64,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal void AddIndividualRecipe(int saberID) { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(saberID); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 8541c26364..f3e15506d7 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index 5df934b1e7..fb7cfa6bf1 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -33,9 +33,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = Item.buyPrice(0, 2, 0, 0); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.value = Item.sellPrice(silver: 80); + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 19f; diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 18de89b972..818f019f1b 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.knockBack = 8f; item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item15; item.autoReuse = true; @@ -77,7 +77,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 6); recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index 1baec0fcff..8ca6eb06b4 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -31,7 +31,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity3BuyPrice; - item.rare = 3; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5.2f; // Keep in mind that the shot has extra updates. diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index a1caa6d4b9..fb44a652da 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -36,9 +36,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PulseRifleFire"); item.noMelee = true; - item.value = Item.buyPrice(1, 80, 0, 0); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; @@ -80,9 +80,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.LaserRifle); recipe.AddTile(ModContent.TileType()); diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index c651736a51..aee23e2c75 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -29,7 +29,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.Rarity5BuyPrice; - item.rare = 5; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 647e28108a..817c0d8a7e 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -26,9 +26,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 3f; - item.value = CalamityGlobalItem.Rarity10BuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; + + item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.UseSound = SoundID.Item15; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs index 716fef4d87..dab491d72d 100644 --- a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs +++ b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs @@ -27,7 +27,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.knockBack = 2.25f; item.value = CalamityGlobalItem.Rarity3BuyPrice; - item.rare = 3; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item15; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index d6974f5e0f..e6b4d54e8f 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -36,8 +36,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; @@ -81,7 +81,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(ItemID.ChargedBlasterCannon); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); diff --git a/Utilities/Enums.cs b/Utilities/Enums.cs index ee589e1ee3..831072c3f1 100644 --- a/Utilities/Enums.cs +++ b/Utilities/Enums.cs @@ -19,6 +19,7 @@ namespace CalamityMod Developer = 16, Rainbow = 30, RareVariant = 31, - Dedicated = 32 + Dedicated = 32, + DraedonRust = 33, } } From 84421ebbc2ac51f1335bdf29640c29d435f9b7ab Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 13:25:14 -0400 Subject: [PATCH 47/71] various sentry fixes among others 1. Fixed Ballistic Poison Bomb cloud velocity. 2. Fixed compile errors with Flak/Gamma Acid. 3. Fixed sentries not being able to be placed on platforms. 4. Fixed bugs with Pulse Turret. 5. Updated targetting util to check for tiles on minion targetted npcs. 6. Fixed rotational errors on cadaverous carrion. 7. Cadaverous carrion now checks for tile collision. --- CalamityMod.cs | 9 +++--- .../DraedonsArsenal/PulseTurretRemote.cs | 1 + Items/Weapons/Summon/CadaverousCarrion.cs | 7 ++--- Items/Weapons/Summon/HivePod.cs | 5 +--- Items/Weapons/Summon/SpikecragStaff.cs | 8 ++--- Projectiles/DraedonsArsenal/PulseTurret.cs | 10 ++++--- .../DraedonsArsenal/PulseTurretShot.cs | 13 +++++---- Projectiles/Enemy/FlakAcid.cs | 2 +- Projectiles/Enemy/GammaAcid.cs | 2 +- Projectiles/Rogue/BallisticPoisonBombProj.cs | 4 +-- Projectiles/Rogue/NastyChollaBol.cs | 2 +- .../Rogue/ScourgeoftheSeasProjectile.cs | 6 ++-- Projectiles/Rogue/StickyBol.cs | 2 +- Projectiles/Summon/Hive.cs | 16 +++------- Projectiles/Summon/MiniSandShark.cs | 6 ++-- Projectiles/Summon/OldDukeHeadCorpse.cs | 4 ++- Projectiles/Summon/OldDukeSharkVomit.cs | 29 +++++++++++++++---- Projectiles/Summon/Spikecrag.cs | 4 ++- Utilities/CalamityUtils.cs | 20 ++++++++++--- 19 files changed, 87 insertions(+), 63 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 39a5a49ccb..e0558c6762 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -69,8 +69,11 @@ using CalamityMod.Projectiles.Melee.Spears; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; -using CalamityMod.Tiles.LivingFire; +using CalamityMod.Schematics; using CalamityMod.Skies; +using CalamityMod.TileEntities; +using CalamityMod.Tiles; +using CalamityMod.Tiles.LivingFire; using CalamityMod.UI; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -88,10 +91,6 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Config; using Terraria.UI; -using CalamityMod.Schematics; -using CalamityMod.Tiles; -using CalamityMod.TileEntities; -using CalamityMod.Projectiles.DraedonsArsenal; namespace CalamityMod { diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index d3e19d3d31..fadf73f0b0 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal } } Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); + //player.UpdateMaxTurrets(); } return false; } diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs index 32a59de547..655a09d704 100644 --- a/Items/Weapons/Summon/CadaverousCarrion.cs +++ b/Items/Weapons/Summon/CadaverousCarrion.cs @@ -37,11 +37,10 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - position = Main.MouseWorld; - Point mouseTileCoords = position.ToTileCoordinates(); - if (WorldGen.SolidTile(mouseTileCoords.X, mouseTileCoords.Y)) + Point mouseTileCoords = Main.MouseWorld.ToTileCoordinates(); + if (CalamityUtils.ParanoidTileRetrieval(mouseTileCoords.X, mouseTileCoords.Y).active()) return false; - Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); player.UpdateMaxTurrets(); } return false; diff --git a/Items/Weapons/Summon/HivePod.cs b/Items/Weapons/Summon/HivePod.cs index 6b4c3d4bc5..e5046a6a05 100644 --- a/Items/Weapons/Summon/HivePod.cs +++ b/Items/Weapons/Summon/HivePod.cs @@ -36,10 +36,7 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - position = Main.MouseWorld; - speedX = 0; - speedY = 0; - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); player.UpdateMaxTurrets(); } return false; diff --git a/Items/Weapons/Summon/SpikecragStaff.cs b/Items/Weapons/Summon/SpikecragStaff.cs index 4e076e9e8b..59fe58d3b1 100644 --- a/Items/Weapons/Summon/SpikecragStaff.cs +++ b/Items/Weapons/Summon/SpikecragStaff.cs @@ -38,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - position = Main.MouseWorld; - speedX = 0; - speedY = 0; - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 120f, 0f); + Point mouseTileCoords = Main.MouseWorld.ToTileCoordinates(); + if (CalamityUtils.ParanoidTileRetrieval(mouseTileCoords.X, mouseTileCoords.Y).active()) + return false; + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 120f, 0f); player.UpdateMaxTurrets(); } return false; diff --git a/Projectiles/DraedonsArsenal/PulseTurret.cs b/Projectiles/DraedonsArsenal/PulseTurret.cs index a07b35e816..894391f217 100644 --- a/Projectiles/DraedonsArsenal/PulseTurret.cs +++ b/Projectiles/DraedonsArsenal/PulseTurret.cs @@ -49,9 +49,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.velocity.Y += 0.5f; } - NPC potentialTarget = projectile.Center.MinionHoming(850f, player); + NPC potentialTarget = projectile.Center.MinionHoming(850f, player, false); - if (potentialTarget != null && Collision.CanHit(projectile.position, projectile.width, projectile.height, potentialTarget.position, potentialTarget.width, potentialTarget.height)) + if (potentialTarget != null) { projectile.spriteDirection = (potentialTarget.Center.X - projectile.Center.X > 0).ToDirectionInt(); projectile.ai[0]++; @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PulseRifleFire"), shootPosition); Projectile.NewProjectile(shootPosition, - Vector2.Normalize(potentialTarget.Center - shootPosition) * 24f, + Vector2.Normalize(potentialTarget.Center - shootPosition) * 12f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = -1; i <= 1; i += 2) { Projectile.NewProjectile(shootPosition, - Vector2.Normalize(potentialTarget.Center - shootPosition).RotatedBy(i * MathHelper.ToRadians(28f)) * 14f, + Vector2.Normalize(potentialTarget.Center - shootPosition).RotatedBy(i * MathHelper.ToRadians(28f)) * 7f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, @@ -118,6 +118,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { projectile.rotation = projectile.rotation.AngleLerp(0f, MathHelper.TwoPi / 50f); } + + projectile.StickToTiles(false, false); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/DraedonsArsenal/PulseTurretShot.cs b/Projectiles/DraedonsArsenal/PulseTurretShot.cs index fdd6c339ed..21324b7336 100644 --- a/Projectiles/DraedonsArsenal/PulseTurretShot.cs +++ b/Projectiles/DraedonsArsenal/PulseTurretShot.cs @@ -1,6 +1,7 @@ using System; using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.DraedonsArsenal @@ -12,18 +13,20 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Pulse Bolt"); + ProjectileID.Sets.SentryShot[projectile.type] = true; } public override void SetDefaults() { - projectile.width = 4; - projectile.height = 4; + projectile.width = 10; + projectile.height = 10; projectile.friendly = true; - projectile.ranged = true; + projectile.minion = true; projectile.penetrate = 1; - projectile.timeLeft = 300; + projectile.timeLeft = 600; projectile.Calamity().hasInorganicEnemyHitBoost = true; projectile.Calamity().inorganicEnemyHitBoost = 0.002f; + projectile.extraUpdates = 1; } public override void AI() @@ -42,7 +45,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } if (projectile.ai[1] == 1f) { - NPC potentialTarget = projectile.Center.MinionHoming(850f, Main.player[projectile.owner]); + NPC potentialTarget = projectile.Center.MinionHoming(850f, Main.player[projectile.owner], false); if (potentialTarget != null) { float speed = projectile.velocity.Length(); diff --git a/Projectiles/Enemy/FlakAcid.cs b/Projectiles/Enemy/FlakAcid.cs index e8b6eed3f0..5abc682b56 100644 --- a/Projectiles/Enemy/FlakAcid.cs +++ b/Projectiles/Enemy/FlakAcid.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Enemy } public override void Kill(int timeLeft) { - CalamityGlobalProjectile.ExpandHitboxBy(150); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 150); projectile.Damage(); for (int i = 0; i <= 40; i++) { diff --git a/Projectiles/Enemy/GammaAcid.cs b/Projectiles/Enemy/GammaAcid.cs index 49afa2fbd4..cf04973c26 100644 --- a/Projectiles/Enemy/GammaAcid.cs +++ b/Projectiles/Enemy/GammaAcid.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Enemy } public override void Kill(int timeLeft) { - CalamityGlobalProjectile.ExpandHitboxBy(80); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 80); projectile.Damage(); for (int i = 0; i <= 40; i++) { diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index 9e5f0b8ab0..d6e9dbf72b 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Rogue { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 14, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } - projectile.StickToTiles(); + projectile.StickToTiles(true, false); if (projectile.owner == Main.myPlayer && projectile.timeLeft <= 3) { projectile.tileCollide = false; @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue int cloudAmt = Main.rand.Next(8, 13); for (int c = 0; c < cloudAmt; c++) { - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f); + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), 1f, projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); } } diff --git a/Projectiles/Rogue/NastyChollaBol.cs b/Projectiles/Rogue/NastyChollaBol.cs index 4602066ee9..65724c1574 100644 --- a/Projectiles/Rogue/NastyChollaBol.cs +++ b/Projectiles/Rogue/NastyChollaBol.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.StickyProjAI(15); if (projectile.ai[0] != 1f) { - projectile.StickToTiles(); + projectile.StickToTiles(true, false); projectile.localAI[1] += 1f; if (projectile.localAI[1] > 10f) { diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index f2563bde7e..33a18cf336 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue Main.PlaySound(SoundID.Item14, projectile.position); for (int dustIndex = 0; dustIndex < 8; dustIndex++) { - int dusty = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 85, 0f, 0f, 100, default, 1f); + int dusty = Dust.NewDust(projectile.position, projectile.width, projectile.height, 85, 0f, 0f, 100, default, 1f); Main.dust[dusty].velocity *= 1f; } if (projectile.owner == Main.myPlayer) @@ -74,9 +74,7 @@ namespace CalamityMod.Projectiles.Rogue int cloudNumber = Main.rand.Next(2, 6); for (int cloudIndex = 0; cloudIndex < cloudNumber; cloudIndex++) { - Vector2 velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - velocity.Normalize(); - velocity *= (float)Main.rand.Next(10, 201) * 0.01f; + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), 1f, projectile.owner, 0f, projectile.Calamity().stealthStrike ? 1f : 0f); } } diff --git a/Projectiles/Rogue/StickyBol.cs b/Projectiles/Rogue/StickyBol.cs index e3a95f9cba..13627e9af6 100644 --- a/Projectiles/Rogue/StickyBol.cs +++ b/Projectiles/Rogue/StickyBol.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.StickyProjAI(10); if (projectile.ai[0] != 1f) { - projectile.StickToTiles(); + projectile.StickToTiles(true, false); projectile.localAI[1] += 1f; if (projectile.localAI[1] > 10f) { diff --git a/Projectiles/Summon/Hive.cs b/Projectiles/Summon/Hive.cs index ee8779e206..9ff8667a41 100644 --- a/Projectiles/Summon/Hive.cs +++ b/Projectiles/Summon/Hive.cs @@ -59,6 +59,8 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity.Y = 10f; } + projectile.StickToTiles(false, false); + int target = 0; float num633 = 800f; Vector2 vector46 = projectile.position; @@ -112,18 +114,8 @@ namespace CalamityMod.Projectiles.Summon } } - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (projectile.penetrate == 0) - { - projectile.Kill(); - } - return false; - } + public override bool OnTileCollide(Vector2 oldVelocity) => false; - public override bool CanDamage() - { - return false; - } + public override bool CanDamage() => false; } } diff --git a/Projectiles/Summon/MiniSandShark.cs b/Projectiles/Summon/MiniSandShark.cs index 6add2fa1fc..a48187bf90 100644 --- a/Projectiles/Summon/MiniSandShark.cs +++ b/Projectiles/Summon/MiniSandShark.cs @@ -59,10 +59,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, spriteEffects, 0f); + Texture2D texture = Main.projectileTexture[projectile.type]; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), projectile.GetAlpha(lightColor), projectile.rotation, texture.Size() / 2f, projectile.scale, spriteEffects, 0f); return false; } diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index c46a72e220..1b8c893917 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon player.MinionDamage()); projectile.damage = trueDamage; } - NPC target = projectile.Center.MinionHoming(845f, player); + NPC target = projectile.Center.MinionHoming(845f, player, false); // No sense in targeting something below this sentry. if (target != null) { @@ -72,6 +72,8 @@ namespace CalamityMod.Projectiles.Summon { projectile.velocity.Y = 10f; } + + projectile.StickToTiles(false, false); } public override bool CanDamage() => false; diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index 3d74d06225..83bb554838 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -1,5 +1,7 @@ using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +36,16 @@ namespace CalamityMod.Projectiles.Summon projectile.alpha = 255 - (int)(255 * projectile.ai[0] / 10f); } projectile.velocity.Y += 0.2f; - projectile.rotation = projectile.velocity.ToRotation(); + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)projectile.velocity.Y, (double)-(double)projectile.velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } //Homing if (projectile.ai[0] > 20f) HomingAI(); @@ -52,7 +63,7 @@ namespace CalamityMod.Projectiles.Summon if (npc.CanBeChasedBy(projectile, false)) { float dist = (projectile.Center - npc.Center).Length(); - if (dist < maxHomingRange) + if (dist < maxHomingRange && Collision.CanHit(projectile.Center, projectile.width, projectile.height, npc.Center, npc.width, npc.height)) { targetIdx = player.MinionAttackTargetNPC; maxHomingRange = dist; @@ -60,18 +71,18 @@ namespace CalamityMod.Projectiles.Summon } } } - else + if (!hasHomingTarget) { for (int i = 0; i < Main.npc.Length; ++i) { NPC npc = Main.npc[i]; - if (npc == null || !npc.active) + if (npc is null || !npc.active) continue; if (npc.CanBeChasedBy(projectile, false)) { float dist = (projectile.Center - npc.Center).Length(); - if (dist < maxHomingRange) + if (dist < maxHomingRange && Collision.CanHit(projectile.Center, projectile.width, projectile.height, npc.Center, npc.width, npc.height)) { targetIdx = i; maxHomingRange = dist; @@ -91,6 +102,14 @@ namespace CalamityMod.Projectiles.Summon } } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Texture2D texture = Main.projectileTexture[projectile.type]; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), projectile.GetAlpha(lightColor), projectile.rotation, texture.Size() / 2f, projectile.scale, spriteEffects, 0f); + return false; + } + public override void Kill(int timeLeft) { for (int i = 0; i < Main.rand.Next(28, 41); i++) diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index c211265560..2d0a91b2c3 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -60,6 +60,8 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity.Y = 10f; } + projectile.StickToTiles(false, false); + if (projectile.ai[0] > 0f) { projectile.ai[0] -= 1f; @@ -75,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon { float extraDistance = (float)(Main.npc[i].width / 2) + (Main.npc[i].height / 2); - if (Vector2.Distance(Main.npc[i].Center, projectile.Center) < (maxDistance + extraDistance)) + if (Vector2.Distance(Main.npc[i].Center, projectile.Center) < (maxDistance + extraDistance) && Collision.CanHit(projectile.Center, projectile.width, projectile.height, Main.npc[i].Center, Main.npc[i].width, Main.npc[i].height)) { homeIn = true; break; diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index f610e634f4..0e125f4390 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -457,9 +457,15 @@ namespace CalamityMod /// Whether to ignore tiles when finding a target or not public static NPC MinionHoming(this Vector2 origin, float maxDistanceToCheck, Player owner, bool ignoreTiles = true) { - if (owner.HasMinionAttackTargetNPC) + if (owner is null || owner.whoAmI < 0 || owner.whoAmI > Main.maxPlayers || owner.MinionAttackTargetNPC < 0 || owner.MinionAttackTargetNPC > Main.maxNPCs) + return ClosestNPCAt(origin, maxDistanceToCheck, ignoreTiles); + NPC npc = Main.npc[owner.MinionAttackTargetNPC]; + bool canHit = true; + if (!ignoreTiles) + canHit = Collision.CanHit(origin, 1, 1, npc.Center, 1, 1); + if (owner.HasMinionAttackTargetNPC && canHit) { - return Main.npc[owner.MinionAttackTargetNPC]; + return npc; } return ClosestNPCAt(origin, maxDistanceToCheck, ignoreTiles); } @@ -964,7 +970,7 @@ namespace CalamityMod } } - public static void StickToTiles(this Projectile projectile) + public static void StickToTiles(this Projectile projectile, bool ignorePlatforms, bool stickToEverything) { try { @@ -993,7 +999,13 @@ namespace CalamityMod for (int y = yBottom; y < yTop; y++) { Tile tile = Main.tile[x, y]; - if (tile != null && !TileID.Sets.Platforms[tile.type] && tile.type != TileID.PlanterBox && tile.nactive() && (Main.tileSolid[tile.type] || (Main.tileSolidTop[tile.type] && tile.frameY == 0))) + bool platformCheck = true; + if (ignorePlatforms) + platformCheck = !TileID.Sets.Platforms[tile.type] && tile.type != TileID.PlanterBox; + bool tableCheck = false; + if (stickToEverything) + tableCheck = Main.tileSolidTop[tile.type] && tile.frameY == 0; + if (tile != null && tile.nactive() && platformCheck && (Main.tileSolid[tile.type] || tableCheck)) { Vector2 tileSize; tileSize.X = (float)(x * 16); From e4d8f05ba312817363b378cb3eb2f19769e3164d Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 23 Jul 2020 14:40:03 -0400 Subject: [PATCH 48/71] Reworked all Draedon's Arsenal recipes. --- Items/Weapons/DraedonsArsenal/GatlingLaser.cs | 9 ++++---- Items/Weapons/DraedonsArsenal/GaussDagger.cs | 5 ++-- Items/Weapons/DraedonsArsenal/GaussPistol.cs | 8 ++++--- Items/Weapons/DraedonsArsenal/GaussRifle.cs | 12 ++++++---- .../DraedonsArsenal/HydraulicVoltCrasher.cs | 9 ++++---- Items/Weapons/DraedonsArsenal/LaserRifle.cs | 17 +++----------- .../Weapons/DraedonsArsenal/MountedScanner.cs | 5 ++-- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 4 ++-- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 23 ++++++------------- .../Weapons/DraedonsArsenal/PlasmaGrenade.cs | 3 ++- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 8 ++++--- Items/Weapons/DraedonsArsenal/PulsePistol.cs | 13 ++++------- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 21 ++++------------- .../DraedonsArsenal/PulseTurretRemote.cs | 11 +++++---- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 8 ++++--- .../StarSwallowerContainmentUnit.cs | 10 ++++---- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 17 ++------------ 17 files changed, 75 insertions(+), 108 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index 1f3ef04664..9fc2a72125 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { DisplayName.SetDefault("Gatling Laser"); Tooltip.SetDefault("Large laser cannon used primarily by Yharim's fleet and base defense force\n" + - "Highly accurate, but lacks the power to punch through defensive targets"); + "Highly accurate, but lacks the power to punch through defensive targets"); } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.Calamity().ChargeMax = 135; } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { @@ -66,8 +66,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ItemID.LaserMachinegun); recipe.AddTile(TileID.LunarCraftingStation); diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.cs b/Items/Weapons/DraedonsArsenal/GaussDagger.cs index 469696aa93..a32a6401cd 100644 --- a/Items/Weapons/DraedonsArsenal/GaussDagger.cs +++ b/Items/Weapons/DraedonsArsenal/GaussDagger.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Gauss Dagger"); - Tooltip.SetDefault("Hitting enemies in rapid succession causes them to become enveloped in a magnetic flux"); + Tooltip.SetDefault("Repeat strikes envelop foes in magnetic flux"); } public override void SetDefaults() { @@ -56,7 +56,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddIngredient(ItemID.MeteoriteBar, 4); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs index cdfc6bf44c..8d6245d72b 100644 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ b/Items/Weapons/DraedonsArsenal/GaussPistol.cs @@ -10,6 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Gauss Pistol"); + Tooltip.SetDefault("Fires a devastating high velocity blast with extreme knockback"); } public override void SetDefaults() @@ -41,9 +42,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.HallowedBar, 10); + recipe.AddIngredient(ItemID.SpaceGun); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/GaussRifle.cs b/Items/Weapons/DraedonsArsenal/GaussRifle.cs index 19437d886f..144ac20e54 100644 --- a/Items/Weapons/DraedonsArsenal/GaussRifle.cs +++ b/Items/Weapons/DraedonsArsenal/GaussRifle.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Projectiles.DraedonsArsenal; using Microsoft.Xna.Framework; using Terraria; @@ -7,12 +8,12 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class GaussRifle : ModItem + public class GaussRifle : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Gauss Rifle"); - Tooltip.SetDefault("Fires an enormous pulse of energy"); + Tooltip.SetDefault("Fires a devastating high velocity blast with absurd knockback"); } public override void SetDefaults() @@ -48,10 +49,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 20); - recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 18); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.LaserRifle); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index a981ad2b35..2cdaa7ff59 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Hydraulic Volt Crasher"); - Tooltip.SetDefault("Zaps nearby enemies on hit"); + Tooltip.SetDefault("An electrically charged jackhammer which shocks all nearby foes on hit"); } public override void SetDefaults() @@ -43,9 +43,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.HallowedBar, 10); + recipe.AddIngredient(ItemID.SoulofMight, 20); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/LaserRifle.cs b/Items/Weapons/DraedonsArsenal/LaserRifle.cs index 72046c1ff8..18a9b59409 100644 --- a/Items/Weapons/DraedonsArsenal/LaserRifle.cs +++ b/Items/Weapons/DraedonsArsenal/LaserRifle.cs @@ -50,23 +50,12 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal velocity.Normalize(); velocity *= 5f; } - for (int i = 0; i < 2; i++) { float SpeedX = velocity.X + Main.rand.Next(-1, 2) * 0.05f; float SpeedY = velocity.Y + Main.rand.Next(-1, 2) * 0.05f; Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, i, 0f); } - - // Consume 4 ammo per shot - CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, 4); - - return false; - } - - // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) - { return false; } @@ -80,9 +69,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.LunarBar, 5); - recipe.AddIngredient(ItemID.LaserRifle); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.LunarBar, 4); + recipe.AddIngredient(ItemID.SniperRifle); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index a6437997f2..89b9eb6cfb 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -79,8 +79,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.HallowedBar, 5); - recipe.AddTile(TileID.Anvils); + recipe.AddIngredient(ItemID.HallowedBar, 10); + recipe.AddIngredient(ItemID.SoulofFright, 20); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index b6b4f80708..8b0da9e7cd 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -64,8 +64,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal void AddIndividualRecipe(int saberID) { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 20); - recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 25); recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(saberID); recipe.AddTile(ModContent.TileType()); diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index f3e15506d7..c1ab052d43 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.DraedonsArsenal; using Microsoft.Xna.Framework; using Terraria; @@ -7,7 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class PlasmaCaster : ModItem + public class PlasmaCaster : ModItem { public const int BaseDamage = 1100; public override void SetStaticDefaults() @@ -62,31 +63,19 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal velocity *= 5f; } - int ammoConsumed = 20; float SpeedX = velocity.X + (float)Main.rand.Next(-3, 4) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-3, 4) * 0.05f; float damageMult = 1f; float kbMult = 1f; if (player.altFunctionUse == 2) { - ammoConsumed = 5; SpeedX = velocity.X + (float)Main.rand.Next(-15, 16) * 0.05f; SpeedY = velocity.Y + (float)Main.rand.Next(-15, 16) * 0.05f; damageMult = 0.3333f; - kbMult = 3f/7f; + kbMult = 3f / 7f; } Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * damageMult), knockBack * kbMult, player.whoAmI, 0f, 0f); - - // Consume 20 or 5 ammo per shot - CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, ammoConsumed); - - return false; - } - - // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) - { return false; } @@ -100,8 +89,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.LunarBar, 4); + // still awkward that the item called Plasma Rifle is the same class and exact same tier as this item + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index fb7cfa6bf1..1c3689ece4 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.shootSpeed = 19f; item.Calamity().rogue = true; } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile grenade = Projectile.NewProjectileDirect(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); @@ -55,7 +56,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddTile(ModContent.TileType()); - recipe.SetResult(this, 800); + recipe.SetResult(this, 999); recipe.AddRecipe(); } } diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 818f019f1b..5915d29fce 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -8,7 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class PoleWarper : ModItem + public class PoleWarper : ModItem { public override void SetStaticDefaults() { @@ -75,9 +76,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 25); + recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index 8ca6eb06b4..f884470200 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.Calamity().customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 5.2f; // Keep in mind that the shot has extra updates. + item.shootSpeed = 5.2f; // This may seem low but the shot has 10 extra updates. item.Calamity().Chargeable = true; item.Calamity().ChargeMax = 50; @@ -44,24 +44,19 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); - - // Consume 6 ammo per shot - CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, 6); - return false; } public override Vector2? HoldoutOffset() => new Vector2(10f, 0f); - // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) => false; - public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddIngredient(ItemID.MeteoriteBar, 4); + recipe.AddIngredient(ItemID.FlintlockPistol); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index fb44a652da..726ce10f29 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -59,32 +59,19 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal float SpeedY = velocity.Y + (float)Main.rand.Next(-1, 2) * 0.05f; Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); - - // Consume 6 ammo per shot - CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, 6); - return false; } - // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) - { - return false; - } - - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 12); - recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 16); + recipe.AddIngredient(ModContent.ItemType(), 24); recipe.AddIngredient(ModContent.ItemType(), 4); + // The only arsenal weapon that is an upgrade of another arsenal weapon (and it makes sense). recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.LaserRifle); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index aee23e2c75..56eff42954 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -7,11 +7,13 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class PulseTurretRemote : ModItem + public class PulseTurretRemote : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Pulse Turret Remote"); + Tooltip.SetDefault("Summons a pulse turret which eradicates nearby foes with focused energy blasts\n" + + "Especially effective against inorganic targets"); } public override void SetDefaults() @@ -63,9 +65,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.HallowedBar, 10); + recipe.AddIngredient(ItemID.SoulofSight, 20); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 817c0d8a7e..8b1f2229ba 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.DraedonsArsenal; using Microsoft.Xna.Framework; using Terraria; @@ -7,7 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class SnakeEyes : ModItem + public class SnakeEyes : ModItem { public override void SetStaticDefaults() { @@ -49,8 +50,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.LunarBar, 4); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs index dab491d72d..73d217f786 100644 --- a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs +++ b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { DisplayName.SetDefault("Star Swallower Containment Unit"); - Tooltip.SetDefault("Summons a mechanical frog that vomits plasma onto enemies"); + Tooltip.SetDefault("Summons a biomechanical frog that vomits plasma onto enemies"); } public override void SetDefaults() @@ -49,9 +49,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddIngredient(ItemID.MeteoriteBar, 4); + recipe.AddIngredient(ItemID.Frog); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index e6b4d54e8f..7d95251538 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -58,28 +58,15 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal float SpeedY = velocity.Y + (float)Main.rand.Next(-1, 2) * 0.02f; Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); - - // Consume 30 ammo per shot - CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, 30); - return false; } - // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) - { - return false; - } - - public override Vector2? HoldoutOffset() - { - return new Vector2(-20, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-20, 0); public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 25); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(ItemID.ChargedBlasterCannon); From 35b5fea122a3aa5f0bcd8b998827ada989f1664e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 14:44:22 -0400 Subject: [PATCH 49/71] various boss rush touchups --- CalamityMod.cs | 12 +++++++-- NPCs/CalamityGlobalNPC.cs | 2 +- NPCs/CalamityGlobalNPCLoot.cs | 47 +++++++++++++++++++++++++++++++++++ World/CalamityWorld.cs | 45 +++++++++++++++++++++++++++++++-- 4 files changed, 101 insertions(+), 5 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index e0558c6762..839a8450ec 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -4016,9 +4016,17 @@ namespace CalamityMod int countdown2 = reader.ReadInt32(); CalamityWorld.bossSpawnCountdown = countdown2; break; - case CalamityModMessageType.DeathBossSpawnCountdownSync: + case CalamityModMessageType.BRHostileProjKillSync: int countdown3 = reader.ReadInt32(); - CalamityWorld.deathBossSpawnCooldown = countdown3; + CalamityWorld.bossRushHostileProjKillCounter = countdown3; + break; + case CalamityModMessageType.DeathBossSpawnCountdownSync: + int countdown4 = reader.ReadInt32(); + CalamityWorld.deathBossSpawnCooldown = countdown4; + break; + case CalamityModMessageType.ArmoredDiggerCountdownSync: + int countdown5 = reader.ReadInt32(); + CalamityWorld.ArmoredDiggerSpawnCooldown = countdown5; break; case CalamityModMessageType.BossTypeSync: int type = reader.ReadInt32(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9347ca6a64..2a361ea638 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3101,7 +3101,7 @@ namespace CalamityMod.NPCs case 33: if (npc.type != NPCType() && npc.type != NPCType() && npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) + npc.type != NPCType() && npc.type != NPCID.DetonatingBubble) { npc.active = false; npc.netUpdate = true; diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index b8fbd408db..21628206d0 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -407,91 +407,109 @@ namespace CalamityMod.NPCs { CalamityWorld.bossRushStage = 7; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 9; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 12; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 14; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 16; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 17; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 18; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 20; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 22; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 23; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 24; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 25; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 26; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 27; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 30; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 31; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 32; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 33; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType()) { @@ -500,12 +518,14 @@ namespace CalamityMod.NPCs { CalamityWorld.bossRushStage = 34; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 35; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType()) { @@ -514,24 +534,28 @@ namespace CalamityMod.NPCs { CalamityWorld.bossRushStage = 36; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType() && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && NPC.CountNPCS(ModContent.NPCType()) < 2 && !NPC.AnyNPCs(ModContent.NPCType())) { CalamityWorld.bossRushStage = 36; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType() && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && NPC.CountNPCS(ModContent.NPCType()) < 2 && !NPC.AnyNPCs(ModContent.NPCType())) { CalamityWorld.bossRushStage = 36; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 37; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; string key = "Mods.CalamityMod.BossRushTierFourEndText"; Color messageColor = Color.LightCoral; @@ -548,17 +572,20 @@ namespace CalamityMod.NPCs { CalamityWorld.bossRushStage = 38; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { CalamityWorld.bossRushStage = 39; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; } else if (npc.type == ModContent.NPCType()) { DropHelper.DropItem(npc, ModContent.ItemType(), true); CalamityWorld.bossRushStage = 0; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; CalamityWorld.bossRushActive = false; CalamityMod.UpdateServerBoolean(); @@ -589,31 +616,37 @@ namespace CalamityMod.NPCs case NPCID.QueenBee: CalamityWorld.bossRushStage = 1; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.BrainofCthulhu: CalamityWorld.bossRushStage = 2; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.KingSlime: CalamityWorld.bossRushStage = 3; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.EyeofCthulhu: CalamityWorld.bossRushStage = 4; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.SkeletronPrime: CalamityWorld.bossRushStage = 5; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.Golem: CalamityWorld.bossRushStage = 6; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.EaterofWorldsHead: @@ -621,11 +654,13 @@ namespace CalamityMod.NPCs case NPCID.EaterofWorldsTail: CalamityWorld.bossRushStage = 8; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.TheDestroyer: CalamityWorld.bossRushStage = 10; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; string key = "Mods.CalamityMod.BossRushTierOneEndText"; Color messageColor = Color.LightCoral; @@ -643,26 +678,31 @@ namespace CalamityMod.NPCs case NPCID.Spazmatism: CalamityWorld.bossRushStage = 11; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.Retinazer: CalamityWorld.bossRushStage = 11; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.WallofFlesh: CalamityWorld.bossRushStage = 13; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.SkeletronHead: CalamityWorld.bossRushStage = 15; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.CultistBoss: CalamityWorld.bossRushStage = 19; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; string key2 = "Mods.CalamityMod.BossRushTierTwoEndText"; Color messageColor2 = Color.LightCoral; @@ -680,11 +720,13 @@ namespace CalamityMod.NPCs case NPCID.Plantera: CalamityWorld.bossRushStage = 21; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; case NPCID.DukeFishron: CalamityWorld.bossRushStage = 28; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; string key3 = "Mods.CalamityMod.BossRushTierThreeEndText"; Color messageColor3 = Color.LightCoral; @@ -702,6 +744,7 @@ namespace CalamityMod.NPCs case NPCID.MoonLordCore: CalamityWorld.bossRushStage = 29; CalamityUtils.KillAllHostileProjectiles(); + CalamityWorld.bossRushHostileProjKillCounter = 3; break; default: @@ -714,6 +757,10 @@ namespace CalamityMod.NPCs netMessage.Write((byte)CalamityModMessageType.BossRushStage); netMessage.Write(CalamityWorld.bossRushStage); netMessage.Send(); + var netMessage2 = mod.GetPacket(); + netMessage2.Write((byte)CalamityModMessageType.BRHostileProjKillSync); + netMessage2.Write(CalamityWorld.bossRushHostileProjKillCounter); + netMessage2.Send(); } return false; diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 583e9e8349..71c312e6a5 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -69,6 +69,7 @@ namespace CalamityMod.World public static bool deactivateStupidFuckingBullshit = false; //Force Boss Rush to inactive public static int bossRushStage = 0; //Boss Rush Stage public static int bossRushSpawnCountdown = 180; //Delay before another Boss Rush boss can spawn + public static int bossRushHostileProjKillCounter = 0; //Death Mode natural boss spawns public static int bossSpawnCountdown = 0; //Death Mode natural boss spawn countdown @@ -226,6 +227,7 @@ namespace CalamityMod.World bossRushActive = false; bossRushSpawnCountdown = 180; bossSpawnCountdown = 0; + bossRushHostileProjKillCounter = 0; deathBossSpawnCooldown = 0; bossType = 0; newAltarX = 0; @@ -1543,7 +1545,7 @@ namespace CalamityMod.World // Spawn bosses if (Main.netMode != NetmodeID.MultiplayerClient) { - Main.PlaySound(SoundID.Roar, player.position, 0); + bool playSpecialSound = false; switch (bossRushStage) { case 0: @@ -1567,6 +1569,7 @@ namespace CalamityMod.World ChangeTime(true); int npc = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), NPCID.Golem, 1); Main.npc[npc].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc); break; case 6: ChangeTime(true); @@ -1604,6 +1607,7 @@ namespace CalamityMod.World ChangeTime(false); int npc6 = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), NPCID.SkeletronHead, 1); Main.npc[npc6].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc6); break; case 15: ChangeTime(true); @@ -1621,6 +1625,7 @@ namespace CalamityMod.World int npc2 = NPC.NewNPC((int)player.Center.X, (int)player.Center.Y - 400, NPCID.CultistBoss, 1); Main.npc[npc2].direction = Main.npc[npc2].spriteDirection = Math.Sign(player.Center.X - player.Center.X - 90f); Main.npc[npc2].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc2); break; case 19: for (int doom = 0; doom < Main.maxNPCs; doom++) @@ -1635,6 +1640,7 @@ namespace CalamityMod.World } int npc3 = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), ModContent.NPCType(), 1); Main.npc[npc3].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc3); break; case 20: NPC.SpawnOnPlayer(closestPlayer, NPCID.Plantera); @@ -1655,12 +1661,16 @@ namespace CalamityMod.World NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); break; case 26: + playSpecialSound = true; + Main.PlaySound(SoundID.Roar, player.position, 2); int npc4 = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), ModContent.NPCType(), 1); Main.npc[npc4].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc4); break; case 27: int npc5 = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), NPCID.DukeFishron, 1); Main.npc[npc5].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc5); break; case 28: NPC.SpawnOnPlayer(closestPlayer, NPCID.MoonLordCore); @@ -1687,6 +1697,7 @@ namespace CalamityMod.World case 34: int npc7 = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), ModContent.NPCType(), 1); Main.npc[npc7].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(npc7); break; case 35: NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); @@ -1695,7 +1706,11 @@ namespace CalamityMod.World break; case 36: ChangeTime(true); - NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); + playSpecialSound = true; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ProvidenceSpawn"), player.Center); + int prov = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-500, 501)), (int)(player.position.Y - 250f), ModContent.NPCType(), 1); + Main.npc[prov].timeLeft *= 20; + CalamityUtils.BossAwakenMessage(prov); break; case 37: NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); @@ -1705,9 +1720,13 @@ namespace CalamityMod.World NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); break; case 39: + playSpecialSound = true; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DevourerSpawn"), player.Center); NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); break; } + if (!playSpecialSound) + Main.PlaySound(SoundID.Roar, player.position, 0); } } } @@ -1727,6 +1746,19 @@ namespace CalamityMod.World } } } + if (bossRushHostileProjKillCounter > 0) + { + bossRushHostileProjKillCounter--; + if (bossRushHostileProjKillCounter == 1) + CalamityUtils.KillAllHostileProjectiles(); + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.BRHostileProjKillSync); + netMessage.Write(bossRushHostileProjKillCounter); + netMessage.Send(); + } + } if (DoGSecondStageCountdown > 0) { @@ -1832,7 +1864,16 @@ namespace CalamityMod.World } } if (ArmoredDiggerSpawnCooldown > 0) + { ArmoredDiggerSpawnCooldown--; + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.ArmoredDiggerCountdownSync); + netMessage.Write(ArmoredDiggerSpawnCooldown); + netMessage.Send(); + } + } if (Main.dayTime && Main.hardMode) { From 75a0865b30905fce935c26696d73f9710dede386 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:00:16 -0400 Subject: [PATCH 50/71] error fix --- CalamityMod.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index 839a8450ec..c1c5e06629 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -4191,6 +4191,8 @@ namespace CalamityMod BossRushStage, DoGCountdownSync, BossSpawnCountdownSync, + BRHostileProjKillSync, + ArmoredDiggerCountdownSync, BossTypeSync, DeathCountSync, RevengeanceBoolSync, From dcced08a1d39b78d0825e9be6445b4f433001f94 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:07:27 -0400 Subject: [PATCH 51/71] ion blaster now gets shafted by astral injection --- Items/Weapons/Magic/ApoctosisArray.cs | 100 +++++++++++++------------- Items/Weapons/Magic/IonBlaster.cs | 100 +++++++++++++------------- 2 files changed, 101 insertions(+), 99 deletions(-) diff --git a/Items/Weapons/Magic/ApoctosisArray.cs b/Items/Weapons/Magic/ApoctosisArray.cs index 72bf37f820..b91cc6fbd4 100644 --- a/Items/Weapons/Magic/ApoctosisArray.cs +++ b/Items/Weapons/Magic/ApoctosisArray.cs @@ -6,60 +6,60 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic { - public class ApoctosisArray : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Apoctosis Array"); - Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" + - "The higher your mana the more damage they will do\n" + + public class ApoctosisArray : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Apoctosis Array"); + Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" + + "The higher your mana the more damage they will do\n" + "Astral steroids can inhibit the potential of this weapon"); - } + } - public override void SetDefaults() - { - item.width = 98; - item.damage = 55; - item.magic = true; - item.mana = 12; - item.useAnimation = 7; - item.useTime = 7; - item.useStyle = ItemUseStyleID.HoldingOut; - item.knockBack = 6.75f; - item.UseSound = SoundID.Item91; - item.autoReuse = true; - item.noMelee = true; - item.height = 34; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 8f; - item.Calamity().customRarity = CalamityRarity.Turquoise; - } + public override void SetDefaults() + { + item.width = 98; + item.damage = 55; + item.magic = true; + item.mana = 12; + item.useAnimation = 7; + item.useTime = 7; + item.useStyle = ItemUseStyleID.HoldingOut; + item.knockBack = 6.75f; + item.UseSound = SoundID.Item91; + item.autoReuse = true; + item.noMelee = true; + item.height = 34; + item.value = Item.buyPrice(1, 20, 0, 0); + item.rare = 10; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 8f; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } - public override Vector2? HoldoutOffset() - { - return new Vector2(-25, 0); - } + public override Vector2? HoldoutOffset() + { + return new Vector2(-25, 0); + } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - float manaAmount = (float)player.statMana * 0.01f; - float damageMult = manaAmount; + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float manaAmount = (float)player.statMana * 0.01f; + float damageMult = manaAmount; float injectionNerf = player.Calamity().astralInjection ? 0.6f : 1f; - int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * damageMult * injectionNerf), knockBack, player.whoAmI, 0f, 0f); - Main.projectile[projectile].scale = manaAmount * 0.375f; - return false; - } + int projectile = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * damageMult * injectionNerf), knockBack, player.whoAmI); + Main.projectile[projectile].scale = manaAmount * 0.375f; + return false; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.LunarBar, 5); - recipe.AddTile(TileID.LunarCraftingStation); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } diff --git a/Items/Weapons/Magic/IonBlaster.cs b/Items/Weapons/Magic/IonBlaster.cs index 849e6e5553..f85659f136 100644 --- a/Items/Weapons/Magic/IonBlaster.cs +++ b/Items/Weapons/Magic/IonBlaster.cs @@ -6,57 +6,59 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic { - public class IonBlaster : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ion Blaster"); - Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" + - "The higher your mana the more damage they will do"); - } + public class IonBlaster : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ion Blaster"); + Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" + + "The higher your mana the more damage they will do\n" + + "Astral steroids can inhibit the potential of this weapon"); + } - public override void SetDefaults() - { - item.width = 44; - item.damage = 30; - item.magic = true; - item.mana = 6; - item.useAnimation = 10; - item.useTime = 10; - item.useStyle = ItemUseStyleID.HoldingOut; - item.knockBack = 5.5f; - item.UseSound = SoundID.Item91; - item.autoReuse = true; - item.noMelee = true; - item.height = 28; - item.value = Item.buyPrice(0, 36, 0, 0); - item.rare = 5; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 3f; - } + public override void SetDefaults() + { + item.width = 44; + item.damage = 30; + item.magic = true; + item.mana = 6; + item.useAnimation = 10; + item.useTime = 10; + item.useStyle = ItemUseStyleID.HoldingOut; + item.knockBack = 5.5f; + item.UseSound = SoundID.Item91; + item.autoReuse = true; + item.noMelee = true; + item.height = 28; + item.value = Item.buyPrice(0, 36, 0, 0); + item.rare = 5; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 3f; + } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } + public override Vector2? HoldoutOffset() + { + return new Vector2(-5, 0); + } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - float manaAmount = (float)player.statMana * 0.01f; - float damageMult = manaAmount * 0.75f; - int projectile = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * damageMult), knockBack, player.whoAmI); - Main.projectile[projectile].scale = manaAmount; - return false; - } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float manaAmount = (float)player.statMana * 0.01f; + float damageMult = manaAmount * 0.75f; + float injectionNerf = player.Calamity().astralInjection ? 0.6f : 1f; + int projectile = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * damageMult * injectionNerf), knockBack, player.whoAmI); + Main.projectile[projectile].scale = manaAmount; + return false; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.SoulofFright, 10); - recipe.AddRecipeGroup("AnyAdamantiteBar", 7); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SoulofFright, 10); + recipe.AddRecipeGroup("AnyAdamantiteBar", 7); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } From 67664f2b883bd13cc72d404a42475419b57161f1 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 23 Jul 2020 15:24:29 -0400 Subject: [PATCH 52/71] Power Cells can now be Extractinated --- Items/PowerCell.cs | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Items/PowerCell.cs b/Items/PowerCell.cs index 4c6adf1574..470fb14122 100644 --- a/Items/PowerCell.cs +++ b/Items/PowerCell.cs @@ -1,3 +1,5 @@ +using CalamityMod.Items.Materials; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,7 +10,8 @@ namespace CalamityMod.Items public override void SetStaticDefaults() { DisplayName.SetDefault("Draedon Power Cell"); - Tooltip.SetDefault("Used to charge Draedon's weaponry at a charger"); + Tooltip.SetDefault("Used to charge Draedon's weaponry at a charger\n" + + "Also can be processed by the Extractinator for spare parts"); } public override void SetDefaults() @@ -18,6 +21,36 @@ namespace CalamityMod.Items item.rare = ItemRarityID.Red; item.Calamity().customRarity = CalamityRarity.DraedonRust; item.maxStack = 999; + + ItemID.Sets.ExtractinatorMode[item.type] = item.type; + item.consumable = true; + item.useStyle = ItemUseStyleID.SwingThrow; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.useTurn = true; + } + + public override void ExtractinatorUse(ref int resultType, ref int resultStack) + { + float dropRand = Main.rand.NextFloat(); + resultStack = 1; + + // 2.5% chance for Mysterious Circuitry + // 2.5% chance for Dubious Plating + // 85% chance for 65-99 Copper Coins + // 10% chance for 1 Silver Coin + if (dropRand < 0.025f) + resultType = ModContent.ItemType(); + else if (dropRand < 0.05f) + resultType = ModContent.ItemType(); + else if (dropRand < 0.9f) + { + resultType = ItemID.CopperCoin; + resultStack = Main.rand.Next(65, 100); + } + else + resultType = ItemID.SilverCoin; } } } From 14bbed5a0f700a2c96e046b74b75a7e732a2a658 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 17:25:22 -0400 Subject: [PATCH 53/71] bandit can now detect platinum coins in portable storage systems --- NPCs/TownNPCs/FAP.cs | 11 +++-------- NPCs/TownNPCs/THIEF.cs | 3 ++- Utilities/CalamityUtils.cs | 11 +++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index f939886b3a..c40fd839fc 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -57,15 +57,10 @@ namespace CalamityMod.NPCs.TownNPCs for (int k = 0; k < Main.maxPlayers; k++) { Player player = Main.player[k]; - if (player.active) + bool hasVodka = player.InventoryHas(ModContent.ItemType())/* || player.PortableStorageHas(ModContent.ItemType())*/; + if (player.active && hasVodka) { - for (int j = 0; j < player.inventory.Length; j++) - { - if (player.inventory[j].type == ModContent.ItemType()) - { - return Main.hardMode; - } - } + return Main.hardMode; } } return CalamityWorld.spawnedCirrus; diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 417d4f3a62..67af2c687c 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -71,7 +71,8 @@ namespace CalamityMod.NPCs.TownNPCs for (int k = 0; k < Main.maxPlayers; k++) { Player player = Main.player[k]; - if (player.active && player.InventoryHas(ItemID.PlatinumCoin)) + bool rich = player.InventoryHas(ItemID.PlatinumCoin) || player.PortableStorageHas(ItemID.PlatinumCoin); + if (player.active && rich) { return NPC.downedBoss3; } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index f610e634f4..4ab705bafd 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -150,6 +150,17 @@ namespace CalamityMod { return player.inventory.Any(item => items.Contains(item.type)); } + public static bool PortableStorageHas(this Player player, params int[] items) + { + bool hasItem = false; + if (player.bank.item.Any(item => items.Contains(item.type))) + hasItem = true; + if (player.bank2.item.Any(item => items.Contains(item.type))) + hasItem = true; + if (player.bank3.item.Any(item => items.Contains(item.type))) + hasItem = true; + return hasItem; + } /// /// Inflict typical exo weapon debuffs in pvp. From c006071eeb59a6aa9981ad01185a56e91b11ca9a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 17:38:46 -0400 Subject: [PATCH 54/71] renamed strange orb stuff --- Buffs/Pets/SirenLightPetBuff.cs | 2 +- Items/LoreItems/KnowledgeLeviathanandSiren.cs | 6 +++--- Items/Pets/StrangeOrb.cs | 2 +- Projectiles/Pets/SirenYoung.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Buffs/Pets/SirenLightPetBuff.cs b/Buffs/Pets/SirenLightPetBuff.cs index a51ffaffb0..faf7694757 100644 --- a/Buffs/Pets/SirenLightPetBuff.cs +++ b/Buffs/Pets/SirenLightPetBuff.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Pets { public override void SetDefaults() { - DisplayName.SetDefault("Young Siren"); + DisplayName.SetDefault("Ocean Spirit"); Description.SetDefault("Small and cute"); Main.buffNoTimeDisplay[Type] = true; Main.lightPet[Type] = true; diff --git a/Items/LoreItems/KnowledgeLeviathanandSiren.cs b/Items/LoreItems/KnowledgeLeviathanandSiren.cs index 7dd1598dfe..2e4bc424c7 100644 --- a/Items/LoreItems/KnowledgeLeviathanandSiren.cs +++ b/Items/LoreItems/KnowledgeLeviathanandSiren.cs @@ -11,11 +11,11 @@ namespace CalamityMod.Items.LoreItems { public override void SetStaticDefaults() { - DisplayName.SetDefault("Leviathan and Siren"); + DisplayName.SetDefault("Leviathan and Anahita"); Tooltip.SetDefault("An odd pair of creatures; one seeking companionship and the other seeking sustenance.\n" + "Perhaps two genetic misfits outcast from their homes that found comfort in assisting one another.\n" + - "Favorite this item to gain increased max health while wearing the siren heart and treasure detect while wearing the strange orb.\n" + - "Allows the young siren pet to move normally while outside of liquids.\n" + + "Favorite this item to gain increased max health while wearing the aquatic heart and treasure detect while wearing the strange orb.\n" + + "Allows the young Ocean Spirit light pet to move normally while outside of liquids.\n" + "However, if you're not submerged in liquid you will have decreased defense and damage reduction."); } diff --git a/Items/Pets/StrangeOrb.cs b/Items/Pets/StrangeOrb.cs index 8dfb85d620..6a95995312 100644 --- a/Items/Pets/StrangeOrb.cs +++ b/Items/Pets/StrangeOrb.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Pets public override void SetStaticDefaults() { DisplayName.SetDefault("Strange Orb"); - Tooltip.SetDefault("Summons a young Siren light pet\n" + + Tooltip.SetDefault("Summons a miniature Ocean Spirit light pet\n" + "Provides a large amount of light while underwater"); } diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index ea4a75c9bf..70bd66a006 100644 --- a/Projectiles/Pets/SirenYoung.cs +++ b/Projectiles/Pets/SirenYoung.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - DisplayName.SetDefault("Siren"); + DisplayName.SetDefault("Ocean Spirit"); Main.projFrames[projectile.type] = 17; Main.projPet[projectile.type] = true; ProjectileID.Sets.LightPet[projectile.type] = true; From a643aea4a840794657415c3000055b33b318040b Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Thu, 23 Jul 2020 18:43:43 -0400 Subject: [PATCH 55/71] NPCs still appear if Hardmode is turned off e.g. via Cheat Sheet or whatever --- NPCs/TownNPCs/FAP.cs | 2 +- NPCs/TownNPCs/THIEF.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index c40fd839fc..65b26c7346 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.TownNPCs bool hasVodka = player.InventoryHas(ModContent.ItemType())/* || player.PortableStorageHas(ModContent.ItemType())*/; if (player.active && hasVodka) { - return Main.hardMode; + return Main.hardMode || CalamityWorld.spawnedCirrus; } } return CalamityWorld.spawnedCirrus; diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 67af2c687c..d7b43f5d9b 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.TownNPCs bool rich = player.InventoryHas(ItemID.PlatinumCoin) || player.PortableStorageHas(ItemID.PlatinumCoin); if (player.active && rich) { - return NPC.downedBoss3; + return NPC.downedBoss3 || CalamityWorld.spawnedBandit; } } return CalamityWorld.spawnedBandit; From d56a3745363457b581faf526468ffb519bd9be1f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:49:07 -0400 Subject: [PATCH 56/71] attempted to fix magnum line of guns not using their boosted crit --- Projectiles/CalamityGlobalProjectile.cs | 12 ++++++++++++ Projectiles/Typeless/FiniteUse/MagnumRound.cs | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 860127a9d0..b4f91f67e6 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -13,6 +13,7 @@ using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless.FiniteUse; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -1021,6 +1022,8 @@ namespace CalamityMod.Projectiles defCrit = modPlayer.critStats[3]; else if (projectile.IsSummon()) defCrit = 4; + else if (player.ActiveItem().crit > 0) + defCrit = player.ActiveItem().crit; } if (projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/) @@ -1118,6 +1121,15 @@ namespace CalamityMod.Projectiles if (!crit) crit = Main.rand.NextBool(10); } + + if (projectile.type == ProjectileType()) + { + if (crit) + { + damage = (int)(damage * 1.25); + knockback *= 1.25f; + } + } } } #endregion diff --git a/Projectiles/Typeless/FiniteUse/MagnumRound.cs b/Projectiles/Typeless/FiniteUse/MagnumRound.cs index 1b526a8421..e9d87d18e4 100644 --- a/Projectiles/Typeless/FiniteUse/MagnumRound.cs +++ b/Projectiles/Typeless/FiniteUse/MagnumRound.cs @@ -35,11 +35,6 @@ namespace CalamityMod.Projectiles.Typeless.FiniteUse } if (damage > target.lifeMax / 15 && CalamityPlayer.areThereAnyDamnBosses) damage = target.lifeMax / 15; - if (crit) - { - damage = (int)(damage * 1.25); - knockback *= 1.25f; - } } } } From 3d63f31d9f4d443134cfbdbe3cd61d18981e7601 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 23 Jul 2020 20:00:52 -0500 Subject: [PATCH 57/71] 1 - Fixed SCal's skulls in bullet hell 5. 2 - Buffed Draedon's Pulse Rifle. --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 2 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index a1caa6d4b9..4cd75a7c69 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class PulseRifle : ModItem { - private int BaseDamage = 2500; + private int BaseDamage = 4500; public override void SetStaticDefaults() { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 532867ac35..da653c78d0 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -757,7 +757,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { int random = Main.rand.Next(-1000, 1001); Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, -5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, 5f * uDieLul, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } bulletHellCounter += 1; if (bulletHellCounter > (enraged ? 12 : 14)) From 42d289c6ea80e398efad8e2b32a57964dab2aadf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 23 Jul 2020 21:22:42 -0400 Subject: [PATCH 58/71] fixed gauss rifle not having a max charge --- Items/Weapons/DraedonsArsenal/GaussRifle.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Weapons/DraedonsArsenal/GaussRifle.cs b/Items/Weapons/DraedonsArsenal/GaussRifle.cs index 144ac20e54..519060b14c 100644 --- a/Items/Weapons/DraedonsArsenal/GaussRifle.cs +++ b/Items/Weapons/DraedonsArsenal/GaussRifle.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.shootSpeed = 27f; item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 135; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) From 4e2d96837a09436f57fc8165a55ebc5d5b9a9ce3 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Thu, 23 Jul 2020 22:48:15 -0400 Subject: [PATCH 59/71] minor recipe nitpick 1 --- Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index ddef8ca272..956dc8c861 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 14); - recipe.AddIngredient(ModContent.ItemType(), 16); + recipe.AddIngredient(ModContent.ItemType(), 18); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); From e6fa6167bee66f675ef11668f0aea13482a2753f Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Thu, 23 Jul 2020 22:48:25 -0400 Subject: [PATCH 60/71] minor recipe nitpick 2 --- Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 956dc8c861..ea566a1b16 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 14); + recipe.AddIngredient(ModContent.ItemType(), 12); recipe.AddIngredient(ModContent.ItemType(), 18); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 5); From 3bb9829a3bbbf533326f7ccfdaba548a46609aaa Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 24 Jul 2020 00:58:29 -0500 Subject: [PATCH 61/71] 1 - Renamed Pulse Rifle to Pulse Rifle. 2 - Eradicator and a few other weapons can now fire beams at multiple enemies at once. --- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 23 +++++++++++++++++---- Projectiles/Hybrid/EradicatorProjectile.cs | 2 +- Projectiles/Magic/Climax2.cs | 10 ++++----- Projectiles/Magic/ClimaxProj.cs | 6 +++--- Projectiles/Magic/FabOrb.cs | 2 +- Projectiles/Magic/MagneticOrb.cs | 2 +- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index e2a5232828..98491abfae 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { - DisplayName.SetDefault("Draedon's Pulse Rifle"); + DisplayName.SetDefault("Pulse Rifle"); Tooltip.SetDefault("Draedon's high-efficiency electromagnetic pulse rifle\n" + "Incredibly accurate pulse weapon, crafted and wielded by Draedon to defend against his own creations\n" + "When the pulse hits a target it will arc to another nearby target\n" + diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 860127a9d0..afc850feda 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2104,7 +2104,7 @@ namespace CalamityMod.Projectiles } } - public static void MagnetSphereHitscan(Projectile projectile, float distanceRequired, float homingVelocity, float projectileTimer, int maxTargets, int spawnedProjectile, double damageMult = 1D) + public static void MagnetSphereHitscan(Projectile projectile, float distanceRequired, float homingVelocity, float projectileTimer, int maxTargets, int spawnedProjectile, double damageMult = 1D, bool attackMultiple = false) { float maxDistance = distanceRequired; bool homeIn = false; @@ -2147,6 +2147,24 @@ namespace CalamityMod.Projectiles Vector2 value = projectile.Center + projectile.velocity * 4f; Vector2 velocity = Vector2.Normalize(Main.npc[randomTarget].Center - value) * homingVelocity; + if (attackMultiple) + { + for (int i = 0; i < targetArrayIndex; i++) + { + velocity = Vector2.Normalize(Main.npc[targetArray[i]].Center - value) * homingVelocity; + + if (projectile.owner == Main.myPlayer) + { + int projectile2 = Projectile.NewProjectile(value.X, value.Y, velocity.X, velocity.Y, spawnedProjectile, (int)(projectile.damage * damageMult), projectile.knockBack, projectile.owner, 0f, 0f); + + if (projectile.type == ProjectileType() && projectile.Calamity().rogue) + Main.projectile[projectile2].Calamity().forceRogue = true; + } + } + + return; + } + if (projectile.type == ProjectileType()) { velocity.Y += Main.rand.Next(-30, 31) * 0.05f; @@ -2160,9 +2178,6 @@ namespace CalamityMod.Projectiles if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType() || (projectile.type == ProjectileType() && projectile.melee)) Main.projectile[projectile2].Calamity().forceMelee = true; - - else if (projectile.type == ProjectileType() && projectile.Calamity().rogue) - Main.projectile[projectile2].Calamity().forceRogue = true; } } } diff --git a/Projectiles/Hybrid/EradicatorProjectile.cs b/Projectiles/Hybrid/EradicatorProjectile.cs index 96c3f699a9..89990120da 100644 --- a/Projectiles/Hybrid/EradicatorProjectile.cs +++ b/Projectiles/Hybrid/EradicatorProjectile.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Hybrid public override void AI() { Lighting.AddLight(projectile.Center, 0.35f, 0f, 0.25f); - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 8f, 20, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 8f, 6, ModContent.ProjectileType(), 1D, true); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Magic/Climax2.cs b/Projectiles/Magic/Climax2.cs index 52e15ca516..1eedb8acfa 100644 --- a/Projectiles/Magic/Climax2.cs +++ b/Projectiles/Magic/Climax2.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { timeElapsed += 0.02; - projectile.velocity.X = (float)(Math.Sin(timeElapsed * (double)(0.5f * projectile.ai[0])) * circleSize); - projectile.velocity.Y = (float)(Math.Cos(timeElapsed * (double)(0.5f * projectile.ai[0])) * circleSize); + projectile.velocity.X = (float)(Math.Sin(timeElapsed * (0.5f * projectile.ai[0])) * circleSize); + projectile.velocity.Y = (float)(Math.Cos(timeElapsed * (0.5f * projectile.ai[0])) * circleSize); circleSize += circleGrowth; if (projectile.velocity.X > 0f) @@ -56,14 +56,14 @@ namespace CalamityMod.Projectiles.Magic } } - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 8f, 4f, 5, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 8f, 4f, 2, ModContent.ProjectileType(), 1D, true); } public override Color? GetAlpha(Color lightColor) { if (projectile.timeLeft < 30) { - float num7 = (float)projectile.timeLeft / 30f; + float num7 = projectile.timeLeft / 30f; projectile.alpha = (int)(255f - 255f * num7); } return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Magic Texture2D texture2D13 = Main.projectileTexture[projectile.type]; int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Magic/ClimaxProj.cs b/Projectiles/Magic/ClimaxProj.cs index 4260c256a8..fc81a69681 100644 --- a/Projectiles/Magic/ClimaxProj.cs +++ b/Projectiles/Magic/ClimaxProj.cs @@ -50,14 +50,14 @@ namespace CalamityMod.Projectiles.Magic } if (projectile.timeLeft % 2 == projectile.ai[0]) - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 5, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 2, ModContent.ProjectileType(), 1D, true); } public override Color? GetAlpha(Color lightColor) { if (projectile.timeLeft < 30) { - float num7 = (float)projectile.timeLeft / 30f; + float num7 = projectile.timeLeft / 30f; projectile.alpha = (int)(255f - 255f * num7); } return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic Texture2D texture2D13 = Main.projectileTexture[projectile.type]; int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Magic/FabOrb.cs b/Projectiles/Magic/FabOrb.cs index 4d13216330..140dacc724 100644 --- a/Projectiles/Magic/FabOrb.cs +++ b/Projectiles/Magic/FabOrb.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 6f, 6f, 2, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 6f, 6f, 2, ModContent.ProjectileType(), 1D, true); } } } diff --git a/Projectiles/Magic/MagneticOrb.cs b/Projectiles/Magic/MagneticOrb.cs index 6d34c01a26..86f9056fe1 100644 --- a/Projectiles/Magic/MagneticOrb.cs +++ b/Projectiles/Magic/MagneticOrb.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Magic } } - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 5, ModContent.ProjectileType()); + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 2, ModContent.ProjectileType(), 1D, true); } public override Color? GetAlpha(Color lightColor) From 2cc2b62253a464ad42c8f6c92327f65ce8fd64f9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:00:13 -0400 Subject: [PATCH 62/71] nerfed radiator and skyfin T1 HP --- NPCs/AcidRain/Radiator.cs | 2 +- NPCs/AcidRain/Skyfin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index 60c2065b34..e1bfbf1412 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.AcidRain npc.width = 24; npc.height = 24; npc.defense = 5; - npc.lifeMax = 100; + npc.lifeMax = 50; if (CalamityWorld.downedPolterghast) { diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index 16f09e13ae..3cef6de000 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AcidRain npc.aiStyle = aiType = -1; npc.damage = 12; - npc.lifeMax = 150; + npc.lifeMax = 70; npc.defense = 6; npc.knockBackResist = 1f; From 6dac4113142603525967f19ec5196fa51bc37b16 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:08:39 -0400 Subject: [PATCH 63/71] nerfed T1 water leech health --- NPCs/AcidRain/WaterLeech.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/AcidRain/WaterLeech.cs b/NPCs/AcidRain/WaterLeech.cs index b993de950c..adbf0242be 100644 --- a/NPCs/AcidRain/WaterLeech.cs +++ b/NPCs/AcidRain/WaterLeech.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AcidRain npc.height = 14; npc.damage = 20; - npc.lifeMax = 80; + npc.lifeMax = 60; npc.defense = 0; if (CalamityWorld.downedPolterghast) From 1e1e5da7f5a52b689b51f5e0205526f85d8657f9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:23:13 -0400 Subject: [PATCH 64/71] nerfed the health of tier 2 enemies --- NPCs/AcidRain/AcidEel.cs | 2 +- NPCs/AcidRain/FlakCrab.cs | 2 +- NPCs/AcidRain/IrradiatedSlime.cs | 2 +- NPCs/AcidRain/NuclearToad.cs | 2 +- NPCs/AcidRain/Orthocera.cs | 2 +- NPCs/AcidRain/Radiator.cs | 2 +- NPCs/AcidRain/Skyfin.cs | 2 +- NPCs/AcidRain/SulfurousSkater.cs | 2 +- NPCs/AcidRain/Trilobite.cs | 2 +- NPCs/AcidRain/WaterLeech.cs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index c64038ed8d..f8a6109622 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.AcidRain else if (CalamityWorld.downedAquaticScourge) { npc.damage = 80; - npc.lifeMax = 705; + npc.lifeMax = 420; } npc.value = Item.buyPrice(0, 0, 3, 32); diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index c11372763b..62078c88ce 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.AcidRain npc.height = 70; npc.damage = 0; - npc.lifeMax = 700; + npc.lifeMax = 600; npc.aiStyle = aiType = -1; diff --git a/NPCs/AcidRain/IrradiatedSlime.cs b/NPCs/AcidRain/IrradiatedSlime.cs index 2513fee920..9e529eed89 100644 --- a/NPCs/AcidRain/IrradiatedSlime.cs +++ b/NPCs/AcidRain/IrradiatedSlime.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.AcidRain npc.height = 30; npc.damage = 75; - npc.lifeMax = 640; + npc.lifeMax = 425; npc.defense = 5; npc.knockBackResist = 0f; diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs index 96de09bdc2..16b59240dd 100644 --- a/NPCs/AcidRain/NuclearToad.cs +++ b/NPCs/AcidRain/NuclearToad.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.AcidRain else if (CalamityWorld.downedAquaticScourge) { npc.damage = 80; - npc.lifeMax = 420; + npc.lifeMax = 380; } npc.knockBackResist = 0.7f; diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index a5667a3df9..bcfefb1355 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AcidRain npc.aiStyle = aiType = -1; npc.damage = 75; - npc.lifeMax = 605; + npc.lifeMax = 520; npc.defense = 15; npc.DR_NERD(0.075f); diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index e1bfbf1412..9f6c3f98a9 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.AcidRain else if (CalamityWorld.downedAquaticScourge) { npc.damage = 75; - npc.lifeMax = 640; + npc.lifeMax = 130; npc.defense = 10; } diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index 3cef6de000..882f287281 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.AcidRain else if (CalamityWorld.downedAquaticScourge) { npc.damage = 85; - npc.lifeMax = 700; + npc.lifeMax = 400; npc.DR_NERD(0.05f); } diff --git a/NPCs/AcidRain/SulfurousSkater.cs b/NPCs/AcidRain/SulfurousSkater.cs index 6698cbea48..001078709c 100644 --- a/NPCs/AcidRain/SulfurousSkater.cs +++ b/NPCs/AcidRain/SulfurousSkater.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.AcidRain npc.height = 48; npc.damage = 70; - npc.lifeMax = 660; + npc.lifeMax = 520; npc.defense = 3; if (CalamityWorld.downedPolterghast) diff --git a/NPCs/AcidRain/Trilobite.cs b/NPCs/AcidRain/Trilobite.cs index 2a283f81c3..04e13cc550 100644 --- a/NPCs/AcidRain/Trilobite.cs +++ b/NPCs/AcidRain/Trilobite.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AcidRain npc.aiStyle = aiType = -1; npc.damage = 66; - npc.lifeMax = 850; + npc.lifeMax = 600; npc.defense = 15; npc.DR_NERD(0.25f); diff --git a/NPCs/AcidRain/WaterLeech.cs b/NPCs/AcidRain/WaterLeech.cs index adbf0242be..335f6901a9 100644 --- a/NPCs/AcidRain/WaterLeech.cs +++ b/NPCs/AcidRain/WaterLeech.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.AcidRain else if (CalamityWorld.downedAquaticScourge) { npc.damage = 80; - npc.lifeMax = 320; + npc.lifeMax = 150; } npc.value = Item.buyPrice(0, 0, 2, 5); From c39e7527c2cb8cc3a6d2cf582f9c1cb5d28238ce Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:26:49 -0400 Subject: [PATCH 65/71] nerfed cragmaw mire health --- NPCs/AcidRain/CragmawMire.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index 2997931d62..b6d0e8b50b 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.AcidRain npc.aiStyle = aiType = -1; npc.damage = 66; - npc.lifeMax = 6000; + npc.lifeMax = 4000; npc.defense = 25; if (CalamityWorld.downedPolterghast) From 884941b60c1aed54b539c66828bf7e7f7ac12dcb Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 24 Jul 2020 20:39:20 -0500 Subject: [PATCH 66/71] 1 - Ravager doesn't stomp in phase 2 as quickly as its HP lowers. 2 - Tried to fix Abyss generation issues with small worlds. --- NPCs/Ravager/RavagerBody.cs | 2 +- World/Abyss.cs | 4 ++++ World/WorldGenerationMethods.cs | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index e6e6965c46..66217e8871 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -596,7 +596,7 @@ namespace CalamityMod.NPCs.Ravager { float stopBeforeFallTime = npc.Calamity().newAI[2] == 0f ? 15f : 20f; if (expertMode) - stopBeforeFallTime -= death ? 10f : 10f * (1f - lifeRatio); + stopBeforeFallTime -= death ? 5f : 5f * (1f - lifeRatio); if (npc.ai[1] < stopBeforeFallTime) { diff --git a/World/Abyss.cs b/World/Abyss.cs index e74b91323e..8751337d21 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -1099,9 +1099,13 @@ namespace CalamityMod.World islandLocationX -= 25; break; } + CalamityWorld.AbyssIslandX[CalamityWorld.numAbyssIslands] = islandLocationX; CalamityWorld.numAbyssIslands++; + islandLocationY += islandLocationOffset; + if (islandLocationY >= CalamityWorld.abyssChasmBottom - 50) + break; } CalamityWorld.AbyssItemArray = CalamityUtils.ShuffleArray(CalamityWorld.AbyssItemArray); diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 1206237398..06c82cc38c 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -4214,10 +4214,10 @@ namespace CalamityMod.World } } } - if (num <= 2f && vector.Y < (Main.rockLayer + Main.maxTilesY * 0.3)) + /*if (num <= 2f && vector.Y < (Main.rockLayer + Main.maxTilesY * 0.3)) { num = 2f; - } + }*/ vector += vector2; vector2.X += WorldGen.genRand.Next(-1, 2) * 0.01f; if (vector2.X > 0.02) From a6a10bcb4f0a763171b7b2d89ced3befa494cf08 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 25 Jul 2020 15:07:50 -0500 Subject: [PATCH 67/71] 1 - Removed anti-butcher from Yharon. --- NPCs/Yharon/Yharon.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 17b23cde45..7358ecabf4 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2867,9 +2867,6 @@ namespace CalamityMod.NPCs.Yharon #region Strike NPC public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { - if (CalamityUtils.AntiButcher(npc, ref damage, 0.5f)) - return false; - // Safeguard to prevent damage which would allow skipping phase 2. if (!startSecondAI && dropLoot) { From ea73a8d32a4a6365412e2794f25b929e5707ad76 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 25 Jul 2020 18:13:30 -0500 Subject: [PATCH 68/71] 1 - Yharon hopefully can no longer be taken from 10.1% to dead prior to phase 2. --- NPCs/Yharon/Yharon.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 7358ecabf4..9c01d658d7 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2867,6 +2867,13 @@ namespace CalamityMod.NPCs.Yharon #region Strike NPC public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { + // Safeguard if damage would kill phase 1 before phase 2. + if (phaseOneLoot && (damage >= npc.life || (crit && damage * 2 >= npc.life))) + { + float lifeAboveTenPercent = npc.life - npc.lifeMax * 0.1f; + damage = MathHelper.Clamp((float)damage, 0f, lifeAboveTenPercent); + } + // Safeguard to prevent damage which would allow skipping phase 2. if (!startSecondAI && dropLoot) { From 4a7fe12bfa969812f21f9a08dc49d1900c3ffa71 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 25 Jul 2020 21:11:23 -0500 Subject: [PATCH 69/71] 1 - Fixed ??? hitbox. --- NPCs/Leviathan/LeviathanStart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index d0414e331f..8fa2732d97 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.Leviathan Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector43 = npc.Center - Main.screenPosition; - vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); From 2c3ee256664ec6ab6cb88e627c9e216a9f367f18 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sun, 26 Jul 2020 16:21:07 -0500 Subject: [PATCH 70/71] 1 - Ceaseless Void projectiles last less time in smaller arenas. --- NPCs/CalamityAI.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index c8eb02733f..22518e08c0 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -3529,10 +3529,13 @@ namespace CalamityMod.NPCs // Increase projectile fire rate based on number of nearby active tiles float projectileFireRateMultiplier = MathHelper.Lerp(1f, 4f, 1f - ((tileEnrageMult - 1f) / 0.8f)); + // Decrease projectile time left based on number of nearby active tiles + int baseProjectileTimeLeft = (int)(333.4f * tileEnrageMult); + // Increase damage of projectiles and contact damage based on number of nearby active tiles int damageIncrease = 0; if (nearbyActiveTiles < 400) - damageIncrease += (400 - nearbyActiveTiles) / 20; // Ranges from 0 to 20 + damageIncrease += (400 - nearbyActiveTiles) / 40; // Ranges from 0 to 10 npc.damage = npc.defDamage + damageIncrease * 4; @@ -3615,7 +3618,7 @@ namespace CalamityMod.NPCs vector104.X += num942 * 5f; vector104.Y += num943 * 5f; int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, damage, 0f, Main.myPlayer, tileEnrageMult, 0f); - Main.projectile[num947].timeLeft = 300; + Main.projectile[num947].timeLeft = baseProjectileTimeLeft / 2; npc.netUpdate = true; } @@ -3626,7 +3629,8 @@ namespace CalamityMod.NPCs for (int i = 0; i < 12; i++) { float ai1 = player.ZoneDungeon ? 0f : 1f; - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, i * 30, ai1); + int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, i * 30, ai1); + Main.projectile[proj].timeLeft = baseProjectileTimeLeft; } } else @@ -3641,7 +3645,8 @@ namespace CalamityMod.NPCs for (i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType(), damage, 0f, Main.myPlayer, passedVar, 0f); + int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType(), damage, 0f, Main.myPlayer, passedVar, 0f); + Main.projectile[proj].timeLeft = baseProjectileTimeLeft; passedVar += 1f; } } From dd8710d90b05022d9a0a5d07d23c2332b883329d Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 27 Jul 2020 00:21:59 -0500 Subject: [PATCH 71/71] 1 - Moved evil islands closer to the ends of the world to hopefully prevent blowing up other islands. 2 - Made Nebulous Core projectile glowmasks fade in and out as the projectiles spawn in/fade. --- NPCs/TownNPCs/FAP.cs | 10 ++-------- Projectiles/Typeless/NebulaStar.cs | 2 +- World/SmallBiomes.cs | 30 +++++++++++++++--------------- World/WorldGenerationMethods.cs | 4 ++-- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 65b26c7346..7d5dd651c0 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -167,13 +167,6 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("My booze will always be better than " + Main.npc[tavernKeep].GivenName + "'s, and nobody can convince me otherwise."); } - // Doesn't seem like a necessary line - /* - int dryad = NPC.FindFirstNPC(NPCID.Dryad); - if (dryad != -1) - dialogue.Add(Main.npc[dryad].GivenName + " is cool too, but she'd outlive me."); - */ - int permadong = NPC.FindFirstNPC(ModContent.NPCType()); if (permadong != -1) dialogue.Add("I never realized how well-endowed " + Main.npc[permadong].GivenName + " was. It had to be the largest icicle I had ever seen."); @@ -184,7 +177,8 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("You still can't stop me from trying to move in with " + Main.npc[waifu].GivenName + "."); dialogue.Add("I love it when " + Main.npc[waifu].GivenName + "'s hands get sticky from all that...wax."); dialogue.Add(Main.npc[waifu].GivenName + " works wonders for my hair...among other things."); - } + dialogue.Add("Ever since " + Main.npc[waifu].GivenName + " moved in I haven't been drinking as much...it's a weird feeling."); + } if (Main.player[Main.myPlayer].Calamity().chibii) dialogue.Add("Is that a toy? Looks like something I'd carry around if I was 5 years old."); diff --git a/Projectiles/Typeless/NebulaStar.cs b/Projectiles/Typeless/NebulaStar.cs index a21ec81a21..4df7ad9f5d 100644 --- a/Projectiles/Typeless/NebulaStar.cs +++ b/Projectiles/Typeless/NebulaStar.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Typeless public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) { Rectangle frame = new Rectangle(0, 0, Main.projectileTexture[projectile.type].Width, Main.projectileTexture[projectile.type].Height); - spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Typeless/NebulaStarGlow"), projectile.Center - Main.screenPosition, frame, Color.White, projectile.rotation, projectile.Size / 2, 1f, SpriteEffects.None, 0f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Typeless/NebulaStarGlow"), projectile.Center - Main.screenPosition, frame, Color.White * ((255 - projectile.alpha) / 255f), projectile.rotation, projectile.Size / 2, 1f, SpriteEffects.None, 0f); } } } diff --git a/World/SmallBiomes.cs b/World/SmallBiomes.cs index 0e50d42249..1f72642e78 100644 --- a/World/SmallBiomes.cs +++ b/World/SmallBiomes.cs @@ -29,8 +29,8 @@ namespace CalamityMod.World { int x = Main.maxTilesX; int xIslandGen = WorldGen.crimson ? - WorldGen.genRand.Next((int)((double)x * 0.15), (int)((double)x * 0.2)) : - WorldGen.genRand.Next((int)((double)x * 0.8), (int)((double)x * 0.85)); + WorldGen.genRand.Next((int)(x * 0.1), (int)(x * 0.15)) : + WorldGen.genRand.Next((int)(x * 0.85), (int)(x * 0.9)); int yIslandGen = WorldGen.genRand.Next(90, 151); yIslandGen = Math.Min(yIslandGen, (int)WorldGen.worldSurfaceLow - 50); @@ -61,10 +61,10 @@ namespace CalamityMod.World int generateBack = genLimit - 80; //Small = 2020 int generateForward = genLimit + 80; //Small = 2180 - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Surface Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Surface Shrine { - int tilesX = WorldGen.genRand.Next((int)((double)x * 0.3), generateBack); - int tilesX2 = WorldGen.genRand.Next(generateForward, (int)((double)x * 0.7)); + int tilesX = WorldGen.genRand.Next((int)(x * 0.3), generateBack); + int tilesX2 = WorldGen.genRand.Next(generateForward, (int)(x * 0.7)); int tilesY = WorldGen.genRand.Next((int)(y * .3f), (int)(y * .35f)); if (Main.tile[tilesX, tilesY].type == TileID.Dirt || Main.tile[tilesX, tilesY].type == TileID.Stone) @@ -79,7 +79,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Evil Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Evil Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .3f), (int)(y * .35f)); @@ -93,10 +93,10 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Cavern Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Cavern Shrine { - int tilesX = WorldGen.genRand.Next((int)((double)x * 0.3), generateBack); - int tilesX2 = WorldGen.genRand.Next(generateForward, (int)((double)x * 0.7)); + int tilesX = WorldGen.genRand.Next((int)(x * 0.3), generateBack); + int tilesX2 = WorldGen.genRand.Next(generateForward, (int)(x * 0.7)); int tilesY = WorldGen.genRand.Next((int)(y * .55f), (int)(y * .8f)); if (Main.tile[tilesX, tilesY].type == TileID.Stone) @@ -111,7 +111,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Ice Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Ice Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); @@ -123,7 +123,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Desert Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Desert Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); @@ -135,7 +135,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Mushroom Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Mushroom Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); @@ -147,7 +147,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Granite Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Granite Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); @@ -159,7 +159,7 @@ namespace CalamityMod.World } } - for (int k = 0; k < (int)((double)(x * y) * 50E-05); k++) //Marble Shrine + for (int k = 0; k < (int)(x * y * 50E-05); k++) //Marble Shrine { int tilesX = WorldGen.genRand.Next(0, x); int tilesY = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); @@ -172,7 +172,7 @@ namespace CalamityMod.World } //Murasama Shrine - WorldGenerationMethods.SpecialHut(TileID.HellstoneBrick, TileID.Hellstone, WallID.HellstoneBrick, 8, WorldGen.genRand.Next((int)((double)x * 0.97), (int)((double)x * 0.98)), y - 60); + WorldGenerationMethods.SpecialHut(TileID.HellstoneBrick, TileID.Hellstone, WallID.HellstoneBrick, 8, WorldGen.genRand.Next((int)(x * 0.97), (int)(x * 0.98)), y - 60); } } } diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 06c82cc38c..63f775049f 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -2305,8 +2305,8 @@ namespace CalamityMod.World #region EvilIsland public static void EvilIsland(int i, int j) { - double num = (double)WorldGen.genRand.Next(100, 150); //100 150 - float num2 = (float)WorldGen.genRand.Next(20, 30); //20 30 + double num = (double)WorldGen.genRand.Next(100, 150); + float num2 = (float)WorldGen.genRand.Next(20, 30); int num3 = i; int num4 = i; int num5 = i;