diff --git a/Backgrounds/AstralUG0.png b/Backgrounds/AstralUG0.png index 1696af2e5d..8e436e758b 100644 Binary files a/Backgrounds/AstralUG0.png and b/Backgrounds/AstralUG0.png differ diff --git a/Backgrounds/AstralUG1.png b/Backgrounds/AstralUG1.png index 08180383d6..478e62a308 100644 Binary files a/Backgrounds/AstralUG1.png and b/Backgrounds/AstralUG1.png differ diff --git a/Backgrounds/AstralUG2.png b/Backgrounds/AstralUG2.png index e3ebba44ed..1641e95d7b 100644 Binary files a/Backgrounds/AstralUG2.png and b/Backgrounds/AstralUG2.png differ diff --git a/Backgrounds/AstralUG3.png b/Backgrounds/AstralUG3.png index 131f2342fc..5baacb89cb 100644 Binary files a/Backgrounds/AstralUG3.png and b/Backgrounds/AstralUG3.png differ diff --git a/Buffs/Alcohol/AlcoholPoisoning.cs b/Buffs/Alcohol/AlcoholPoisoning.cs new file mode 100644 index 0000000000..d66d052a76 --- /dev/null +++ b/Buffs/Alcohol/AlcoholPoisoning.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Alcohol +{ + public class AlcoholPoisoning : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Alcohol Poisoning"); + Description.SetDefault("You drank too much and you are now dying"); + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().alcoholPoisoning = true; + } + } +} diff --git a/Buffs/Alcohol/AlcoholPoisoning.png b/Buffs/Alcohol/AlcoholPoisoning.png new file mode 100644 index 0000000000..7c001df28c Binary files /dev/null and b/Buffs/Alcohol/AlcoholPoisoning.png differ diff --git a/Buffs/Potions/Revivify.cs b/Buffs/Potions/Revivify.cs new file mode 100644 index 0000000000..74fa3b07f3 --- /dev/null +++ b/Buffs/Potions/Revivify.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Potions +{ + public class Revivify : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Revivify"); + Description.SetDefault("You are healed by a fraction of the damage you take"); + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().revivify = true; + } + } +} diff --git a/Buffs/Potions/Revivify.png b/Buffs/Potions/Revivify.png new file mode 100644 index 0000000000..81f011fe86 Binary files /dev/null and b/Buffs/Potions/Revivify.png differ diff --git a/Buffs/StatBuffs/BossZen.cs b/Buffs/StatBuffs/BossZen.cs new file mode 100644 index 0000000000..626b051abc --- /dev/null +++ b/Buffs/StatBuffs/BossZen.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class BossZen : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Boss Zen"); + Description.SetDefault("The active boss is reducing spawn rates...a lot"); + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().bossZen = true; + } + } +} diff --git a/Buffs/StatBuffs/BossZen.png b/Buffs/StatBuffs/BossZen.png new file mode 100644 index 0000000000..db40beb59c Binary files /dev/null and b/Buffs/StatBuffs/BossZen.png differ diff --git a/Buffs/StatBuffs/TarraLifeRegen.png b/Buffs/StatBuffs/TarraLifeRegen.png index 648dc256df..c4899950bb 100644 Binary files a/Buffs/StatBuffs/TarraLifeRegen.png and b/Buffs/StatBuffs/TarraLifeRegen.png differ diff --git a/Buffs/Summon/DaedalusSummonSetBuff.png b/Buffs/Summon/DaedalusSummonSetBuff.png index 0d5b9e5bde..48b949c33d 100644 Binary files a/Buffs/Summon/DaedalusSummonSetBuff.png and b/Buffs/Summon/DaedalusSummonSetBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3b0b6681d1..39d319e857 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs; +using CalamityMod.Buffs.Alcohol; using CalamityMod.Buffs.Cooldowns; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Pets; @@ -68,7 +69,7 @@ namespace CalamityMod.CalPlayer public int sCalKillCount = 0; public int deathCount = 0; public double radiation = 0; - public bool killSpikyBalls = false; + public bool killSpikyBalls = false; // Timer and Counter public int bossRushImmunityFrameCurseTimer = 0; @@ -438,7 +439,8 @@ namespace CalamityMod.CalPlayer public bool chaosSpirit = false; public bool redDevil = false; - // Debuff + // Debuff + public bool alcoholPoisoning = false; public bool shadowflame = false; public bool wDeath = false; public bool lethalLavaBurn = false; @@ -482,6 +484,7 @@ namespace CalamityMod.CalPlayer public bool omniscience = false; public bool zerg = false; public bool zen = false; + public bool bossZen = false; public bool yPower = false; public bool aWeapon = false; public bool tScale = false; @@ -494,7 +497,7 @@ namespace CalamityMod.CalPlayer public bool shine = false; public bool anechoicCoating = false; public bool enraged = false; - public int revivifyTimer = 0; + public bool revivify = false; public bool permafrostsConcoction = false; public bool armorCrumbling = false; public bool armorShattering = false; @@ -821,8 +824,6 @@ namespace CalamityMod.CalPlayer dashMod = 0; alcoholPoisonLevel = 0; - killSpikyBalls = false; - thirdSage = false; if (player.immuneTime == 0) thirdSageH = false; @@ -1077,6 +1078,7 @@ namespace CalamityMod.CalPlayer gloveOfRecklessness = false; momentumCapacitor = false; + alcoholPoisoning = false; shadowflame = false; wDeath = false; lethalLavaBurn = false; @@ -1105,6 +1107,7 @@ namespace CalamityMod.CalPlayer enraged = false; snowmanNoseless = false; + revivify = false; trinketOfChiBuff = false; corrEffigy = false; crimEffigy = false; @@ -1118,6 +1121,7 @@ namespace CalamityMod.CalPlayer omniscience = false; zerg = false; zen = false; + bossZen = false; permafrostsConcoction = false; armorCrumbling = false; armorShattering = false; @@ -1150,6 +1154,8 @@ namespace CalamityMod.CalPlayer polarisBoost = false; polarisBoostTwo = false; polarisBoostThree = false; + + killSpikyBalls = false; vodka = false; redWine = false; @@ -1270,9 +1276,9 @@ namespace CalamityMod.CalPlayer aBulwarkRareMeleeBoostTimer = 0; theBeeDamage = 0; polarisBoostCounter = 0; + killSpikyBalls = false; - killSpikyBalls = false; - + alcoholPoisoning = false; shadowflame = false; wDeath = false; lethalLavaBurn = false; @@ -1348,6 +1354,7 @@ namespace CalamityMod.CalPlayer omniscience = false; zerg = false; zen = false; + bossZen = false; permafrostsConcoction = false; armorCrumbling = false; armorShattering = false; @@ -1410,7 +1417,7 @@ namespace CalamityMod.CalPlayer polarisBoost = false; polarisBoostTwo = false; polarisBoostThree = false; - revivifyTimer = 0; + revivify = false; healCounter = 300; #endregion @@ -2461,6 +2468,12 @@ namespace CalamityMod.CalPlayer areThereAnyDamnBosses = CalamityGlobalNPC.AnyBossNPCS(); + if (areThereAnyDamnBosses) + { + if (player.whoAmI == Main.myPlayer) + player.AddBuff(ModContent.BuffType(), 2, false); + } + #region RevengeanceEffects /*if (!areThereAnyDamnBosses) { @@ -3120,8 +3133,6 @@ namespace CalamityMod.CalPlayer } if (draconicSurgeCooldown > 0) draconicSurgeCooldown--; - if (revivifyTimer > 0) - revivifyTimer--; if (fleshTotemCooldown > 0) fleshTotemCooldown--; if (astralStarRainCooldown > 0) @@ -4192,7 +4203,10 @@ namespace CalamityMod.CalPlayer } if (alcoholPoisonLevel > 3) { - if (player.lifeRegen > 0) + if (player.whoAmI == Main.myPlayer) + player.AddBuff(ModContent.BuffType(), 2, false); + + if (player.lifeRegen > 0) { player.lifeRegen = 0; } @@ -4218,7 +4232,7 @@ namespace CalamityMod.CalPlayer { player.scope = true; } - if (CalamityMod.boomerangList.Contains(player.inventory[player.selectedItem].type) && player.invis) + if (CalamityMod.boomerangList.Contains(player.inventory[player.selectedItem].type) && player.invis) { player.Calamity().throwingDamage += 0.1f; } @@ -7245,6 +7259,8 @@ namespace CalamityMod.CalPlayer { if ((ZoneAstral || ZoneAbyss || ZoneSulphur) && bait.type == ModContent.ItemType()) fishingLevel = (int)(fishingLevel * 1.1f); + if (Main.player[Main.myPlayer].ZoneSnow && fishingRod.type == ModContent.ItemType()) + fishingLevel = (int)(fishingLevel * 1.1f); } #endregion @@ -7420,9 +7436,9 @@ namespace CalamityMod.CalPlayer } #region HealingEffects - if (revivifyTimer > 0) + if (revivify) { - int healAmt = damage / 20; + int healAmt = damage / 15; player.statLife += healAmt; player.HealEffect(healAmt); } @@ -9489,7 +9505,7 @@ namespace CalamityMod.CalPlayer break; } } - if (revivifyTimer > 0) + if (revivify) { if (Main.rand.NextBool(2) && drawInfo.shadow == 0f) { @@ -9951,7 +9967,7 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.1f; } - if (CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type) && player.invis) + if (CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type) && player.invis) { stealthGenMoving += 0.2f; } diff --git a/Items/Accessories/Affliction.png b/Items/Accessories/Affliction.png index ca8a4f772c..6fda0b406c 100644 Binary files a/Items/Accessories/Affliction.png and b/Items/Accessories/Affliction.png differ diff --git a/Items/Accessories/BadgeofBravery.png b/Items/Accessories/BadgeofBravery.png index eb84be6d15..797e815698 100644 Binary files a/Items/Accessories/BadgeofBravery.png and b/Items/Accessories/BadgeofBravery.png differ diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index f8a71c7f31..f8711265d5 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -5,7 +5,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class OrnateShield : ModItem + [AutoloadEquip(EquipType.Shield)] + public class OrnateShield : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Accessories/OrnateShield.png b/Items/Accessories/OrnateShield.png index bb299c9657..6e214b067b 100644 Binary files a/Items/Accessories/OrnateShield.png and b/Items/Accessories/OrnateShield.png differ diff --git a/Items/Accessories/OrnateShield_Shield.png b/Items/Accessories/OrnateShield_Shield.png new file mode 100644 index 0000000000..85c2ffa9e7 Binary files /dev/null and b/Items/Accessories/OrnateShield_Shield.png differ diff --git a/Items/Accessories/Wings/StarlightWings.png b/Items/Accessories/Wings/StarlightWings.png index 98ca99e449..fdf21bd66e 100644 Binary files a/Items/Accessories/Wings/StarlightWings.png and b/Items/Accessories/Wings/StarlightWings.png differ diff --git a/Items/Accessories/Wings/StarlightWings_Wings.png b/Items/Accessories/Wings/StarlightWings_Wings.png index 6a3c5ce4d9..da4a67a952 100644 Binary files a/Items/Accessories/Wings/StarlightWings_Wings.png and b/Items/Accessories/Wings/StarlightWings_Wings.png differ diff --git a/Items/Accessories/Wings/TarragonWings.png b/Items/Accessories/Wings/TarragonWings.png index ab0253fdc7..149d7b3ca4 100644 Binary files a/Items/Accessories/Wings/TarragonWings.png and b/Items/Accessories/Wings/TarragonWings.png differ diff --git a/Items/Accessories/Wings/TarragonWings_Wings.png b/Items/Accessories/Wings/TarragonWings_Wings.png index 2241190fb1..9961369c04 100644 Binary files a/Items/Accessories/Wings/TarragonWings_Wings.png and b/Items/Accessories/Wings/TarragonWings_Wings.png differ diff --git a/Items/Ammo/VeriumBullet.png b/Items/Ammo/VeriumBullet.png index 4019e0cf13..4c287996d9 100644 Binary files a/Items/Ammo/VeriumBullet.png and b/Items/Ammo/VeriumBullet.png differ diff --git a/Items/Armor/DaedalusBreastplate.png b/Items/Armor/DaedalusBreastplate.png index 022b7214cb..f04b345fb0 100644 Binary files a/Items/Armor/DaedalusBreastplate.png and b/Items/Armor/DaedalusBreastplate.png differ diff --git a/Items/Armor/DaedalusBreastplate_Arms.png b/Items/Armor/DaedalusBreastplate_Arms.png index 79fed3fa4b..0786b3a9a2 100644 Binary files a/Items/Armor/DaedalusBreastplate_Arms.png and b/Items/Armor/DaedalusBreastplate_Arms.png differ diff --git a/Items/Armor/DaedalusBreastplate_Body.png b/Items/Armor/DaedalusBreastplate_Body.png index 67ba7a041c..e22c9c33f4 100644 Binary files a/Items/Armor/DaedalusBreastplate_Body.png and b/Items/Armor/DaedalusBreastplate_Body.png differ diff --git a/Items/Armor/DaedalusBreastplate_FemaleBody.png b/Items/Armor/DaedalusBreastplate_FemaleBody.png index 67ba7a041c..96e7b548c8 100644 Binary files a/Items/Armor/DaedalusBreastplate_FemaleBody.png and b/Items/Armor/DaedalusBreastplate_FemaleBody.png differ diff --git a/Items/Armor/DaedalusHat.png b/Items/Armor/DaedalusHat.png index ff4a843fa5..69a359ad05 100644 Binary files a/Items/Armor/DaedalusHat.png and b/Items/Armor/DaedalusHat.png differ diff --git a/Items/Armor/DaedalusHat_Head.png b/Items/Armor/DaedalusHat_Head.png index c9abf9872e..e0ac5a268a 100644 Binary files a/Items/Armor/DaedalusHat_Head.png and b/Items/Armor/DaedalusHat_Head.png differ diff --git a/Items/Armor/DaedalusHeadgear.png b/Items/Armor/DaedalusHeadgear.png index 8aa44f5809..2799a5b73b 100644 Binary files a/Items/Armor/DaedalusHeadgear.png and b/Items/Armor/DaedalusHeadgear.png differ diff --git a/Items/Armor/DaedalusHeadgear_Head.png b/Items/Armor/DaedalusHeadgear_Head.png index ffe116773d..e6de5fdf16 100644 Binary files a/Items/Armor/DaedalusHeadgear_Head.png and b/Items/Armor/DaedalusHeadgear_Head.png differ diff --git a/Items/Armor/DaedalusHelm.png b/Items/Armor/DaedalusHelm.png index c235f9fca7..faab8ef689 100644 Binary files a/Items/Armor/DaedalusHelm.png and b/Items/Armor/DaedalusHelm.png differ diff --git a/Items/Armor/DaedalusHelm_Head.png b/Items/Armor/DaedalusHelm_Head.png index 59ae320ef5..7350ca2268 100644 Binary files a/Items/Armor/DaedalusHelm_Head.png and b/Items/Armor/DaedalusHelm_Head.png differ diff --git a/Items/Armor/DaedalusHelmet.png b/Items/Armor/DaedalusHelmet.png index 46270799b2..8d4c39e075 100644 Binary files a/Items/Armor/DaedalusHelmet.png and b/Items/Armor/DaedalusHelmet.png differ diff --git a/Items/Armor/DaedalusHelmet_Head.png b/Items/Armor/DaedalusHelmet_Head.png index 24e033643e..35e449a796 100644 Binary files a/Items/Armor/DaedalusHelmet_Head.png and b/Items/Armor/DaedalusHelmet_Head.png differ diff --git a/Items/Armor/DaedalusLeggings.png b/Items/Armor/DaedalusLeggings.png index 673577869d..33d5b03c96 100644 Binary files a/Items/Armor/DaedalusLeggings.png and b/Items/Armor/DaedalusLeggings.png differ diff --git a/Items/Armor/DaedalusLeggings_Legs.png b/Items/Armor/DaedalusLeggings_Legs.png index 10c1832cad..9b7fd0515f 100644 Binary files a/Items/Armor/DaedalusLeggings_Legs.png and b/Items/Armor/DaedalusLeggings_Legs.png differ diff --git a/Items/Armor/DaedalusVisor.png b/Items/Armor/DaedalusVisor.png index 0df26558fb..3216a1d3e9 100644 Binary files a/Items/Armor/DaedalusVisor.png and b/Items/Armor/DaedalusVisor.png differ diff --git a/Items/Armor/DaedalusVisor_Head.png b/Items/Armor/DaedalusVisor_Head.png index 7053f4ce2c..6b14ef9322 100644 Binary files a/Items/Armor/DaedalusVisor_Head.png and b/Items/Armor/DaedalusVisor_Head.png differ diff --git a/Items/Armor/TarragonBreastplate.png b/Items/Armor/TarragonBreastplate.png index c41ca85408..009c96006a 100644 Binary files a/Items/Armor/TarragonBreastplate.png and b/Items/Armor/TarragonBreastplate.png differ diff --git a/Items/Armor/TarragonBreastplate_Arms.png b/Items/Armor/TarragonBreastplate_Arms.png index aeed272d72..d3f897bf0d 100644 Binary files a/Items/Armor/TarragonBreastplate_Arms.png and b/Items/Armor/TarragonBreastplate_Arms.png differ diff --git a/Items/Armor/TarragonBreastplate_Body.png b/Items/Armor/TarragonBreastplate_Body.png index c72497c9d1..f807b3a9c8 100644 Binary files a/Items/Armor/TarragonBreastplate_Body.png and b/Items/Armor/TarragonBreastplate_Body.png differ diff --git a/Items/Armor/TarragonHelm.png b/Items/Armor/TarragonHelm.png index 83ebda3858..e476da3d8b 100644 Binary files a/Items/Armor/TarragonHelm.png and b/Items/Armor/TarragonHelm.png differ diff --git a/Items/Armor/TarragonHelm_Head.png b/Items/Armor/TarragonHelm_Head.png index 71433a937d..546c58eccc 100644 Binary files a/Items/Armor/TarragonHelm_Head.png and b/Items/Armor/TarragonHelm_Head.png differ diff --git a/Items/Armor/TarragonHelmet.png b/Items/Armor/TarragonHelmet.png index 2765f267fe..25d886bf03 100644 Binary files a/Items/Armor/TarragonHelmet.png and b/Items/Armor/TarragonHelmet.png differ diff --git a/Items/Armor/TarragonHelmet_Head.png b/Items/Armor/TarragonHelmet_Head.png index 4468d96679..f59b5190cb 100644 Binary files a/Items/Armor/TarragonHelmet_Head.png and b/Items/Armor/TarragonHelmet_Head.png differ diff --git a/Items/Armor/TarragonHornedHelm.png b/Items/Armor/TarragonHornedHelm.png index 1aa5e38d9e..96bd2a84d2 100644 Binary files a/Items/Armor/TarragonHornedHelm.png and b/Items/Armor/TarragonHornedHelm.png differ diff --git a/Items/Armor/TarragonHornedHelm_Head.png b/Items/Armor/TarragonHornedHelm_Head.png index 9d471eae38..b62acb2c36 100644 Binary files a/Items/Armor/TarragonHornedHelm_Head.png and b/Items/Armor/TarragonHornedHelm_Head.png differ diff --git a/Items/Armor/TarragonLeggings.png b/Items/Armor/TarragonLeggings.png index fc9508c927..772c649683 100644 Binary files a/Items/Armor/TarragonLeggings.png and b/Items/Armor/TarragonLeggings.png differ diff --git a/Items/Armor/TarragonLeggings_Legs.png b/Items/Armor/TarragonLeggings_Legs.png index 1a4c0b0367..379b4eacab 100644 Binary files a/Items/Armor/TarragonLeggings_Legs.png and b/Items/Armor/TarragonLeggings_Legs.png differ diff --git a/Items/Armor/TarragonMask.png b/Items/Armor/TarragonMask.png index c0a5f18a16..54774dfb2d 100644 Binary files a/Items/Armor/TarragonMask.png and b/Items/Armor/TarragonMask.png differ diff --git a/Items/Armor/TarragonMask_Head.png b/Items/Armor/TarragonMask_Head.png index c77eb3af99..d1e31da183 100644 Binary files a/Items/Armor/TarragonMask_Head.png and b/Items/Armor/TarragonMask_Head.png differ diff --git a/Items/Armor/TarragonVisage.png b/Items/Armor/TarragonVisage.png index 05aa2b48e4..4ae3de9bf7 100644 Binary files a/Items/Armor/TarragonVisage.png and b/Items/Armor/TarragonVisage.png differ diff --git a/Items/Armor/TarragonVisage_Head.png b/Items/Armor/TarragonVisage_Head.png index de4e64a472..9ca3e0671e 100644 Binary files a/Items/Armor/TarragonVisage_Head.png and b/Items/Armor/TarragonVisage_Head.png differ diff --git a/Items/DifficultyItems/Death.png b/Items/DifficultyItems/Death.png index 1f2977cc99..c58a8179c6 100644 Binary files a/Items/DifficultyItems/Death.png and b/Items/DifficultyItems/Death.png differ diff --git a/Items/Fishing/FeralDoubleRod.cs b/Items/Fishing/FeralDoubleRod.cs new file mode 100644 index 0000000000..e6f31d5b83 --- /dev/null +++ b/Items/Fishing/FeralDoubleRod.cs @@ -0,0 +1,56 @@ +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using CalamityMod.Items.Materials; +namespace CalamityMod.Items.Fishing +{ + public class FeralDoubleRod : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Feral Double Rod"); + Tooltip.SetDefault("Fires two lines at once.\n" + + "Just as you have tamed the jungle monster, you can now tame the fish in the sea."); + } + + public override void SetDefaults() + { + //item.CloneDefaults(2289); //Wooden Fishing Pole + item.width = 24; + item.height = 28; + item.useAnimation = 8; + item.useTime = 8; + item.useStyle = 1; + item.UseSound = SoundID.Item1; + item.fishingPole = 40; + item.shootSpeed = 16f; + item.shoot = ModContent.ProjectileType(); + item.value = Item.buyPrice(0, 60, 0, 0); + item.rare = 7; + } + + 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 index = 0; index < 2; ++index) + { + float SpeedX = speedX + (float)Main.rand.Next(-75, 76) * 0.05f; + float SpeedY = speedY + (float)Main.rand.Next(-75, 76) * 0.05f; + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0.0f, 0.0f); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Fishing/VerstaltiteFishingRod.cs b/Items/Fishing/VerstaltiteFishingRod.cs new file mode 100644 index 0000000000..7dd7673d5d --- /dev/null +++ b/Items/Fishing/VerstaltiteFishingRod.cs @@ -0,0 +1,45 @@ +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using CalamityMod.Items.Materials; +namespace CalamityMod.Items.Fishing +{ + public class VerstaltiteFishingRod : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Verstaltite Fishing Rod"); + Tooltip.SetDefault("Increased fishing power when in the tundra.\n" + + "The ancient alloy's prismatic qualities are perfect for attracting fish."); + } + + public override void SetDefaults() + { + //item.CloneDefaults(2289); //Wooden Fishing Pole + item.width = 24; + item.height = 28; + item.useAnimation = 8; + item.useTime = 8; + item.useStyle = 1; + item.UseSound = SoundID.Item1; + item.fishingPole = 35; + item.shootSpeed = 15f; + item.shoot = ModContent.ProjectileType(); + item.value = Item.buyPrice(0, 36, 0, 0); + item.rare = 5; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Materials/UeliaceBar.png b/Items/Materials/UeliaceBar.png index 92e0fb9a4e..edebcee92e 100644 Binary files a/Items/Materials/UeliaceBar.png and b/Items/Materials/UeliaceBar.png differ diff --git a/Items/Materials/VerstaltiteBar.png b/Items/Materials/VerstaltiteBar.png index ede014b815..a33cfbefdd 100644 Binary files a/Items/Materials/VerstaltiteBar.png and b/Items/Materials/VerstaltiteBar.png differ diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index b09f95bfd6..236c622bef 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.PermanentBoosters DisplayName.SetDefault("Ectoheart"); Tooltip.SetDefault("Permanently makes Adrenaline Mode take 5 less seconds to charge\n" + "Revengeance drop"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 5)); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 3)); } public override void SetDefaults() diff --git a/Items/PermanentBoosters/Ectoheart.png b/Items/PermanentBoosters/Ectoheart.png index 74fada8880..26d587ff6e 100644 Binary files a/Items/PermanentBoosters/Ectoheart.png and b/Items/PermanentBoosters/Ectoheart.png differ diff --git a/Items/Placeables/Banners/CryoSlimeBanner.png b/Items/Placeables/Banners/CryoSlimeBanner.png index 8806d133f1..3b8e84dfaa 100644 Binary files a/Items/Placeables/Banners/CryoSlimeBanner.png and b/Items/Placeables/Banners/CryoSlimeBanner.png differ diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index 42396d99bd..eb19616100 100644 --- a/Items/Potions/RevivifyPotion.cs +++ b/Items/Potions/RevivifyPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Revivify Potion"); - Tooltip.SetDefault("Causes enemy attacks to heal you for a fraction of their damage for 30 seconds"); + Tooltip.SetDefault("Causes enemy attacks to heal you for a fraction of their damage"); } public override void SetDefaults() @@ -26,18 +26,9 @@ namespace CalamityMod.Items.Potions item.useStyle = 2; item.UseSound = SoundID.Item3; item.consumable = true; - item.value = Item.buyPrice(0, 2, 0, 0); - } - - public override bool UseItem(Player player) - { - if (player.itemAnimation > 0 && player.itemTime == 0) - { - player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.revivifyTimer = 1800; - } - return true; + item.buffType = ModContent.BuffType(); + item.buffTime = 1800; + item.value = Item.buyPrice(0, 2, 0, 0); } public override void AddRecipes() diff --git a/Items/SummonItems/NecroplasmicBeacon.png b/Items/SummonItems/NecroplasmicBeacon.png index 1073d371d3..cfe4cab4ea 100644 Binary files a/Items/SummonItems/NecroplasmicBeacon.png and b/Items/SummonItems/NecroplasmicBeacon.png differ diff --git a/Items/Tools/AbyssalWarhammer.cs b/Items/Tools/AbyssalWarhammer.cs index c2051263a1..2deddd7be9 100644 --- a/Items/Tools/AbyssalWarhammer.cs +++ b/Items/Tools/AbyssalWarhammer.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Tools { item.damage = 42; item.melee = true; - item.width = 66; - item.height = 64; + item.width = 70; + item.height = 70; item.useTime = 38; item.useAnimation = 38; item.useTurn = true; diff --git a/Items/Tools/AbyssalWarhammer.png b/Items/Tools/AbyssalWarhammer.png index d97bc38be0..b20edc3726 100644 Binary files a/Items/Tools/AbyssalWarhammer.png and b/Items/Tools/AbyssalWarhammer.png differ diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 434396e8b1..9f732544e8 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Tools { item.damage = 90; item.melee = true; - item.width = 52; - item.height = 56; + item.width = 50; + item.height = 52; item.useTime = 5; item.useAnimation = 10; item.useTurn = true; diff --git a/Items/Tools/BlossomPickaxe.png b/Items/Tools/BlossomPickaxe.png index a0d84ae984..0c1ba97f05 100644 Binary files a/Items/Tools/BlossomPickaxe.png and b/Items/Tools/BlossomPickaxe.png differ diff --git a/Items/Tools/ShardlightPickaxe.png b/Items/Tools/ShardlightPickaxe.png index db19cc06a9..974a4907fd 100644 Binary files a/Items/Tools/ShardlightPickaxe.png and b/Items/Tools/ShardlightPickaxe.png differ diff --git a/Items/TreasureBags/PolterghastBag.png b/Items/TreasureBags/PolterghastBag.png index c43913884e..3139cc584c 100644 Binary files a/Items/TreasureBags/PolterghastBag.png and b/Items/TreasureBags/PolterghastBag.png differ diff --git a/Items/Weapons/Magic/FatesReveal.png b/Items/Weapons/Magic/FatesReveal.png index 2e626510ea..5f3790ff51 100644 Binary files a/Items/Weapons/Magic/FatesReveal.png and b/Items/Weapons/Magic/FatesReveal.png differ diff --git a/Items/Weapons/Magic/GammaFusillade.png b/Items/Weapons/Magic/GammaFusillade.png index ddf1e36a85..a17eb8852d 100644 Binary files a/Items/Weapons/Magic/GammaFusillade.png and b/Items/Weapons/Magic/GammaFusillade.png differ diff --git a/Items/Weapons/Magic/GhastlyVisage.png b/Items/Weapons/Magic/GhastlyVisage.png index 9da521c831..5f7e00ab99 100644 Binary files a/Items/Weapons/Magic/GhastlyVisage.png and b/Items/Weapons/Magic/GhastlyVisage.png differ diff --git a/Items/Weapons/Magic/ShadecrystalTome.png b/Items/Weapons/Magic/ShadecrystalTome.png index e1f00a47c6..01915d9c23 100644 Binary files a/Items/Weapons/Magic/ShadecrystalTome.png and b/Items/Weapons/Magic/ShadecrystalTome.png differ diff --git a/Items/Weapons/Magic/TheSwarmer.cs b/Items/Weapons/Magic/TheSwarmer.cs index ef5ccfb95c..948cc06157 100644 --- a/Items/Weapons/Magic/TheSwarmer.cs +++ b/Items/Weapons/Magic/TheSwarmer.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Magic item.damage = 30; item.magic = true; item.mana = 7; - item.width = 74; - item.height = 36; + item.width = 60; + item.height = 52; item.useTime = 8; item.useAnimation = 8; item.useStyle = 5; diff --git a/Items/Weapons/Melee/BansheeHook.png b/Items/Weapons/Melee/BansheeHook.png index a38706bb64..a9a2eaa190 100644 Binary files a/Items/Weapons/Melee/BansheeHook.png and b/Items/Weapons/Melee/BansheeHook.png differ diff --git a/Items/Weapons/Melee/BurntSienna.png b/Items/Weapons/Melee/BurntSienna.png index da12d0d3c8..39f5ba2dd8 100644 Binary files a/Items/Weapons/Melee/BurntSienna.png and b/Items/Weapons/Melee/BurntSienna.png differ diff --git a/Items/Weapons/Melee/DarklightGreatsword.cs b/Items/Weapons/Melee/DarklightGreatsword.cs index 5657cd3733..d49a5df557 100644 --- a/Items/Weapons/Melee/DarklightGreatsword.cs +++ b/Items/Weapons/Melee/DarklightGreatsword.cs @@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Darklight Greatsword"); - Tooltip.SetDefault("Fires a darklight orb that splits on death"); + Tooltip.SetDefault("Fires darklight blades that split on death"); } public override void SetDefaults() { - item.width = 56; + item.width = 58; item.damage = 55; item.melee = true; item.useAnimation = 24; @@ -30,12 +30,13 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 60; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.shoot = ModContent.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { + type = Main.rand.NextBool(2) ? type : ModContent.ProjectileType(); Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage * 0.6), knockBack, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Melee/DarklightGreatsword.png b/Items/Weapons/Melee/DarklightGreatsword.png index a21d093b08..e8cbb61103 100644 Binary files a/Items/Weapons/Melee/DarklightGreatsword.png and b/Items/Weapons/Melee/DarklightGreatsword.png differ diff --git a/Items/Weapons/Melee/LifefruitScythe.cs b/Items/Weapons/Melee/LifefruitScythe.cs index f108adc66a..027c2c94b4 100644 --- a/Items/Weapons/Melee/LifefruitScythe.cs +++ b/Items/Weapons/Melee/LifefruitScythe.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 60; + item.width = 62; item.damage = 250; item.melee = true; item.useAnimation = 18; diff --git a/Items/Weapons/Melee/LifefruitScythe.png b/Items/Weapons/Melee/LifefruitScythe.png index 0bd1c8432b..4b23ef334e 100644 Binary files a/Items/Weapons/Melee/LifefruitScythe.png and b/Items/Weapons/Melee/LifefruitScythe.png differ diff --git a/Items/Weapons/Melee/PhoenixBlade.png b/Items/Weapons/Melee/PhoenixBlade.png index 600eda9fdf..d55604a9a6 100644 Binary files a/Items/Weapons/Melee/PhoenixBlade.png and b/Items/Weapons/Melee/PhoenixBlade.png differ diff --git a/Items/Weapons/Melee/Shimmerspark.png b/Items/Weapons/Melee/Shimmerspark.png index ed95ccfa65..c2086e7caf 100644 Binary files a/Items/Weapons/Melee/Shimmerspark.png and b/Items/Weapons/Melee/Shimmerspark.png differ diff --git a/Items/Weapons/Melee/StarnightLance.png b/Items/Weapons/Melee/StarnightLance.png index bde3ddab6c..fd5be652c6 100644 Binary files a/Items/Weapons/Melee/StarnightLance.png and b/Items/Weapons/Melee/StarnightLance.png differ diff --git a/Items/Weapons/Melee/Terracotta.cs b/Items/Weapons/Melee/Terracotta.cs index a07a881d25..3b74e9998a 100644 --- a/Items/Weapons/Melee/Terracotta.cs +++ b/Items/Weapons/Melee/Terracotta.cs @@ -18,17 +18,17 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 48; + item.width = 50; item.damage = 125; item.melee = true; item.useAnimation = 17; item.useTime = 17; item.useTurn = true; item.useStyle = 1; - item.knockBack = 5.5f; + item.knockBack = 7f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 60; + item.height = 62; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shootSpeed = 5f; diff --git a/Items/Weapons/Melee/Terracotta.png b/Items/Weapons/Melee/Terracotta.png index 66d10b9a30..e018944826 100644 Binary files a/Items/Weapons/Melee/Terracotta.png and b/Items/Weapons/Melee/Terracotta.png differ diff --git a/Items/Weapons/Melee/TerrorBlade.png b/Items/Weapons/Melee/TerrorBlade.png index f382fbc6f0..b69d923e3f 100644 Binary files a/Items/Weapons/Melee/TerrorBlade.png and b/Items/Weapons/Melee/TerrorBlade.png differ diff --git a/Items/Weapons/Melee/Trinity.cs b/Items/Weapons/Melee/Trinity.cs index 115ffc91db..d05c555d63 100644 --- a/Items/Weapons/Melee/Trinity.cs +++ b/Items/Weapons/Melee/Trinity.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 4.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 46; + item.height = 54; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.shoot = 125; diff --git a/Items/Weapons/Melee/Trinity.png b/Items/Weapons/Melee/Trinity.png index 5f511ea1aa..57b6fc4a20 100644 Binary files a/Items/Weapons/Melee/Trinity.png and b/Items/Weapons/Melee/Trinity.png differ diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index 9aba35dc6b..64afb0a13c 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -94,11 +94,15 @@ namespace CalamityMod.Items.Weapons.Melee num80 = num72 / num80; num78 *= num80; num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-160, 161) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-160, 161) * 0.02f; - int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage / 3, num74, i, 0f, (float)Main.rand.Next(10)); + + float speedX2 = num78 + (float)Main.rand.Next(-160, 161) * 0.02f; + float speedY2 = num79 + (float)Main.rand.Next(-160, 161) * 0.02f; + int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX2, speedY2, 92, damage / 3, num74, i, 0f, (float)Main.rand.Next(10)); Main.projectile[proj].Calamity().forceMelee = true; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 3, num74, i, 0f, (float)Main.rand.Next(5)); + + speedX2 = num78 + (float)Main.rand.Next(-80, 81) * 0.02f; + speedY2 = num79 + (float)Main.rand.Next(-80, 81) * 0.02f; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX2, speedY2, ModContent.ProjectileType(), damage / 3, num74, i, 0f, (float)Main.rand.Next(5)); } return false; } diff --git a/Items/Weapons/Melee/Verdant.png b/Items/Weapons/Melee/Verdant.png index f7a926b2c6..10d2ed0422 100644 Binary files a/Items/Weapons/Melee/Verdant.png and b/Items/Weapons/Melee/Verdant.png differ diff --git a/Items/Weapons/Ranged/DaemonsFlame.png b/Items/Weapons/Ranged/DaemonsFlame.png index 622701afe1..fbd015af55 100644 Binary files a/Items/Weapons/Ranged/DaemonsFlame.png and b/Items/Weapons/Ranged/DaemonsFlame.png differ diff --git a/Items/Weapons/Ranged/DarkechoGreatbow.png b/Items/Weapons/Ranged/DarkechoGreatbow.png index 52f4544f17..3b5aa80480 100644 Binary files a/Items/Weapons/Ranged/DarkechoGreatbow.png and b/Items/Weapons/Ranged/DarkechoGreatbow.png differ diff --git a/Items/Weapons/Ranged/NettlelineGreatbow.png b/Items/Weapons/Ranged/NettlelineGreatbow.png index 7954f9c8d3..298e7d534c 100644 Binary files a/Items/Weapons/Ranged/NettlelineGreatbow.png and b/Items/Weapons/Ranged/NettlelineGreatbow.png differ diff --git a/Items/Weapons/Ranged/SulphuricAcidCannon.png b/Items/Weapons/Ranged/SulphuricAcidCannon.png index 82dc8b5801..3fd6ea43a5 100644 Binary files a/Items/Weapons/Ranged/SulphuricAcidCannon.png and b/Items/Weapons/Ranged/SulphuricAcidCannon.png differ diff --git a/Items/Weapons/Rogue/CrystalPiercer.png b/Items/Weapons/Rogue/CrystalPiercer.png index aa9783fb6e..4c6fc52206 100644 Binary files a/Items/Weapons/Rogue/CrystalPiercer.png and b/Items/Weapons/Rogue/CrystalPiercer.png differ diff --git a/Items/Weapons/Rogue/GhoulishGouger.png b/Items/Weapons/Rogue/GhoulishGouger.png index 409d9d01df..93333dc689 100644 Binary files a/Items/Weapons/Rogue/GhoulishGouger.png and b/Items/Weapons/Rogue/GhoulishGouger.png differ diff --git a/Items/Weapons/Rogue/Malachite.png b/Items/Weapons/Rogue/Malachite.png index fcd0137dba..7112e64fbf 100644 Binary files a/Items/Weapons/Rogue/Malachite.png and b/Items/Weapons/Rogue/Malachite.png differ diff --git a/Items/Weapons/Rogue/TarragonThrowingDart.png b/Items/Weapons/Rogue/TarragonThrowingDart.png index 0b2aceb318..b67f1a5199 100644 Binary files a/Items/Weapons/Rogue/TarragonThrowingDart.png and b/Items/Weapons/Rogue/TarragonThrowingDart.png differ diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index f993b88f17..d08423b872 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Items.Weapons.Summon { item.damage = 75; item.mana = 10; - item.width = 60; - item.height = 60; + item.width = 66; + item.height = 70; item.useTime = 36; item.useAnimation = 36; item.useStyle = 1; diff --git a/Items/Weapons/Summon/EtherealSubjugator.png b/Items/Weapons/Summon/EtherealSubjugator.png index b555172e5d..741971edcb 100644 Binary files a/Items/Weapons/Summon/EtherealSubjugator.png and b/Items/Weapons/Summon/EtherealSubjugator.png differ diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 7afaf13646..ff25b71687 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -188,10 +188,14 @@ namespace CalamityMod.NPCs.AstrumDeus { damage = (int)((double)damage * 0.5); } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } if (projectile.penetrate == -1 && !projectile.minion) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + if (projectile.type == ModContent.ProjectileType()) damage = (int)((double)damage * 0.3); else damage = (int)((double)damage * 0.2); diff --git a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs index aa2f88ad24..e6e4a760c7 100644 --- a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs @@ -292,39 +292,43 @@ namespace CalamityMod.NPCs.AstrumDeus return !npc.dontTakeDamage; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) - { - damage = (int)((double)damage * 0.1); - } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.type == ProjectileID.DD2BetsyArrow) - { - damage = (int)((double)damage * 0.3); - } - else if (projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.5); - } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) + { + damage = (int)((double)damage * 0.1); + } + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.2); + } + else if (projectile.type == ProjectileID.DD2BetsyArrow) + { + damage = (int)((double)damage * 0.3); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.5); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } - if (projectile.penetrate == -1 && !projectile.minion) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - damage = (int)((double)damage * 0.3); - else - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) - { - damage /= projectile.penetrate; - } - } + if (projectile.penetrate == -1 && !projectile.minion) + { + if (projectile.type == ModContent.ProjectileType()) + damage = (int)((double)damage * 0.3); + else + damage = (int)((double)damage * 0.2); + } + else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) + { + damage /= projectile.penetrate; + } + } - public override bool CheckActive() + public override bool CheckActive() { return false; } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index cc627f4999..846f308f8c 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -568,39 +568,43 @@ namespace CalamityMod.NPCs.AstrumDeus return false; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) - { - damage = (int)((double)damage * 0.1); - } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.type == ProjectileID.DD2BetsyArrow) - { - damage = (int)((double)damage * 0.3); - } - else if (projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.5); - } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) + { + damage = (int)((double)damage * 0.1); + } + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.2); + } + else if (projectile.type == ProjectileID.DD2BetsyArrow) + { + damage = (int)((double)damage * 0.3); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.5); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } - if (projectile.penetrate == -1 && !projectile.minion) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - damage = (int)((double)damage * 0.3); - else - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) - { - damage /= projectile.penetrate; - } - } + if (projectile.penetrate == -1 && !projectile.minion) + { + if (projectile.type == ModContent.ProjectileType()) + damage = (int)((double)damage * 0.3); + else + damage = (int)((double)damage * 0.2); + } + else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) + { + damage /= projectile.penetrate; + } + } - public override void HitEffect(int hitDirection, double damage) + public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 82b47a49a7..e78da72ca2 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -466,39 +466,43 @@ namespace CalamityMod.NPCs.AstrumDeus return true; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) - { - damage = (int)((double)damage * 0.1); - } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.type == ProjectileID.DD2BetsyArrow) - { - damage = (int)((double)damage * 0.3); - } - else if (projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.5); - } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) + { + damage = (int)((double)damage * 0.1); + } + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.2); + } + else if (projectile.type == ProjectileID.DD2BetsyArrow) + { + damage = (int)((double)damage * 0.3); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.5); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } - if (projectile.penetrate == -1 && !projectile.minion) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - damage = (int)((double)damage * 0.3); - else - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) - { - damage /= projectile.penetrate; - } - } + if (projectile.penetrate == -1 && !projectile.minion) + { + if (projectile.type == ModContent.ProjectileType()) + damage = (int)((double)damage * 0.3); + else + damage = (int)((double)damage * 0.2); + } + else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) + { + damage /= projectile.penetrate; + } + } - public override void HitEffect(int hitDirection, double damage) + public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 3803bea47b..f2cac153f7 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -128,39 +128,43 @@ namespace CalamityMod.NPCs.AstrumDeus return null; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) - { - damage = (int)((double)damage * 0.1); - } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.type == ProjectileID.DD2BetsyArrow) - { - damage = (int)((double)damage * 0.3); - } - else if (projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.5); - } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) + { + damage = (int)((double)damage * 0.1); + } + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.2); + } + else if (projectile.type == ProjectileID.DD2BetsyArrow) + { + damage = (int)((double)damage * 0.3); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.5); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } - if (projectile.penetrate == -1 && !projectile.minion) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - damage = (int)((double)damage * 0.3); - else - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) - { - damage /= projectile.penetrate; - } - } + if (projectile.penetrate == -1 && !projectile.minion) + { + if (projectile.type == ModContent.ProjectileType()) + damage = (int)((double)damage * 0.3); + else + damage = (int)((double)damage * 0.2); + } + else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) + { + damage /= projectile.penetrate; + } + } - public override void HitEffect(int hitDirection, double damage) + public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { diff --git a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs index 5f6f46f95e..f1e2e608b9 100644 --- a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs @@ -237,39 +237,43 @@ namespace CalamityMod.NPCs.AstrumDeus return !npc.dontTakeDamage; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) - { - damage = (int)((double)damage * 0.1); - } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.type == ProjectileID.DD2BetsyArrow) - { - damage = (int)((double)damage * 0.3); - } - else if (projectile.type == ModContent.ProjectileType()) - { - damage = (int)((double)damage * 0.5); - } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.type == ModContent.ProjectileType() || ProjectileID.Sets.StardustDragon[projectile.type]) + { + damage = (int)((double)damage * 0.1); + } + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.2); + } + else if (projectile.type == ProjectileID.DD2BetsyArrow) + { + damage = (int)((double)damage * 0.3); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.5); + } + else if (projectile.type == ModContent.ProjectileType()) + { + damage = (int)((double)damage * 0.3); + } - if (projectile.penetrate == -1 && !projectile.minion) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - damage = (int)((double)damage * 0.3); - else - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) - { - damage /= projectile.penetrate; - } - } + if (projectile.penetrate == -1 && !projectile.minion) + { + if (projectile.type == ModContent.ProjectileType()) + damage = (int)((double)damage * 0.3); + else + damage = (int)((double)damage * 0.2); + } + else if (projectile.penetrate > 1 && projectile.type != ModContent.ProjectileType()) + { + damage /= projectile.penetrate; + } + } - public override void HitEffect(int hitDirection, double damage) + public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index ab5e063e28..caa40ec059 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -3266,23 +3266,19 @@ namespace CalamityMod.NPCs npc.ai[3] = 0f; // Skull shooting - if ((num156 < 2 || lifeRatio < 0.66f) && npc.ai[1] == 0f) + if (handsDead && npc.ai[1] == 0f) { - float num158 = 120f; - if (handsDead) - num158 /= 2f; - - if (Main.netMode != NetmodeID.MultiplayerClient && calamityGlobalNPC.newAI[1] % num158 == 0f) + float num158 = 75f; + if (Main.netMode != NetmodeID.MultiplayerClient && calamityGlobalNPC.newAI[1] >= num158) { - Vector2 vector18 = npc.Center; + calamityGlobalNPC.newAI[1] = 0f; + Vector2 vector18 = npc.Center; float num159 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector18.X; float num160 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector18.Y; float num161 = (float)Math.Sqrt((double)(num159 * num159 + num160 * num160)); if (Collision.CanHit(vector18, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num162 = 3f; - if (handsDead) - num162 += 2f; + float num162 = 4f; if (CalamityWorld.bossRushActive) num162 *= 1.5f; @@ -3399,7 +3395,7 @@ namespace CalamityMod.NPCs // Increase speed while charging npc.damage = (int)((double)npc.defDamage * 1.3); - float num176 = (CalamityWorld.bossRushActive ? 12f : 4.5f) + (1f * (1f - lifeRatio)); + float num176 = (CalamityWorld.bossRushActive ? 10f : 4f) + (1f * (1f - lifeRatio)); if (enraged || configBossRushBoost) num176 += 3f; @@ -3412,7 +3408,7 @@ namespace CalamityMod.NPCs if (num175 > 300f) num176 *= 1.05f; if (num175 > 350f) - num176 *= 1.1f; + num176 *= 1.05f; if (num175 > 400f) num176 *= 1.1f; if (num175 > 450f) @@ -3420,9 +3416,9 @@ namespace CalamityMod.NPCs if (num175 > 500f) num176 *= 1.1f; if (num175 > 550f) - num176 *= 1.1f; + num176 *= 1.15f; if (num175 > 600f) - num176 *= 1.1f; + num176 *= 1.2f; num175 = num176 / num175; npc.velocity.X = num173 * num175; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 2d449245fd..9a5b4a2a3c 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2349,6 +2349,11 @@ namespace CalamityMod.NPCs #region Modify Hit By Projectile public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + if (npc.townNPC && projectile.hostile) + { + damage *= Main.expertMode ? 4 : 2; + } + if (npc.type == NPCID.TheDestroyerBody) { if (((projectile.penetrate == -1 || projectile.penetrate > 1) && !projectile.minion) || projectile.type == ModContent.ProjectileType()) @@ -2726,11 +2731,16 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 1.4); maxSpawns = (int)(maxSpawns * 0.4f); } - if (CalamityPlayer.areThereAnyDamnBosses || player.Calamity().zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) + if (player.Calamity().zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) { spawnRate = (int)(spawnRate * 1.5); maxSpawns = (int)(maxSpawns * 0.01f); } + if (player.Calamity().bossZen) + { + spawnRate *= 5; + maxSpawns = (int)(maxSpawns * 0.001f); + } } #endregion diff --git a/NPCs/NormalNPCs/CryoSlime.png b/NPCs/NormalNPCs/CryoSlime.png index 3d2da2dea7..2e9a5153ec 100644 Binary files a/NPCs/NormalNPCs/CryoSlime.png and b/NPCs/NormalNPCs/CryoSlime.png differ diff --git a/Projectiles/Boss/VileClot.cs b/Projectiles/Boss/VileClot.cs index fcc5fbf315..2877075c69 100644 --- a/Projectiles/Boss/VileClot.cs +++ b/Projectiles/Boss/VileClot.cs @@ -14,23 +14,47 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - projectile.width = 6; - projectile.height = 6; - projectile.hostile = true; - projectile.penetrate = 1; + projectile.width = 12; + projectile.height = 12; + projectile.light = 0.6f; + projectile.hostile = true; + projectile.penetrate = -1; projectile.timeLeft = 300; } public override void AI() { + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = 1f; + Main.PlaySound(SoundID.Item20, projectile.position); + } + int num104 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), - projectile.width, projectile.height, 75, projectile.velocity.X * 0.1f, projectile.velocity.Y * 0.1f, 100, default, 2f); + projectile.width, projectile.height, 75, projectile.velocity.X * 0.1f, projectile.velocity.Y * 0.1f, 100, default, 1.5f); Main.dust[num104].noGravity = true; + + projectile.rotation += 0.3f * (float)projectile.direction; } public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(BuffID.CursedInferno, 60); } - } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item10, projectile.position); + for (int num584 = 0; num584 < 6; num584++) + { + int num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 75, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 2.5f); + Main.dust[num585].noGravity = true; + Dust dust = Main.dust[num585]; + dust.velocity *= 2f; + num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 75, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 1.2f); + dust = Main.dust[num585]; + dust.velocity *= 2f; + } + } + } } diff --git a/Projectiles/Boss/VileClot.png b/Projectiles/Boss/VileClot.png index a3192f9461..638357ddc8 100644 Binary files a/Projectiles/Boss/VileClot.png and b/Projectiles/Boss/VileClot.png differ diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 7367dfee1b..05c542e651 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -104,6 +104,53 @@ namespace CalamityMod.Projectiles #region PreAI public override bool PreAI(Projectile projectile) { + if (projectile.type == ProjectileID.Starfury) + { + if (projectile.timeLeft > 60) + projectile.timeLeft = 60; + + if (projectile.ai[1] == 0f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[1] = 1f; + projectile.netUpdate = true; + } + + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 20 + Main.rand.Next(40); + Main.PlaySound(SoundID.Item9, projectile.position); + } + + if (projectile.localAI[0] == 0f) + projectile.localAI[0] = 1f; + + projectile.alpha += (int)(25f * projectile.localAI[0]); + if (projectile.alpha > 200) + { + projectile.alpha = 200; + projectile.localAI[0] = -1f; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + projectile.localAI[0] = 1f; + } + + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; + + if (projectile.ai[1] == 1f || projectile.type == 92) + { + projectile.light = 0.9f; + + if (Main.rand.Next(10) == 0) + Dust.NewDust(projectile.position, projectile.width, projectile.height, 58, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); + + if (Main.rand.Next(20) == 0) + Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); + } + return false; + } + if (CalamityWorld.revenge || CalamityWorld.bossRushActive) { if (projectile.type == ProjectileID.PoisonSeedPlantera) diff --git a/Projectiles/Enemy/SulphuricAcidBubble.png b/Projectiles/Enemy/SulphuricAcidBubble.png index ce648b6fdf..3bb08e0246 100644 Binary files a/Projectiles/Enemy/SulphuricAcidBubble.png and b/Projectiles/Enemy/SulphuricAcidBubble.png differ diff --git a/Projectiles/Enemy/SulphuricAcidMist.png b/Projectiles/Enemy/SulphuricAcidMist.png index ef3dd2b17d..7d12c2559f 100644 Binary files a/Projectiles/Enemy/SulphuricAcidMist.png and b/Projectiles/Enemy/SulphuricAcidMist.png differ diff --git a/Projectiles/Magic/AstralStarMagic.cs b/Projectiles/Magic/AstralStarMagic.cs index 5d378a1a58..f2316fd98a 100644 --- a/Projectiles/Magic/AstralStarMagic.cs +++ b/Projectiles/Magic/AstralStarMagic.cs @@ -6,6 +6,7 @@ using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Magic { public class AstralStarMagic : ModProjectile @@ -56,7 +57,6 @@ namespace CalamityMod.Projectiles.Magic { projectile.alpha = num58; } - projectile.localAI[0] += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; if (Main.rand.NextBool(16)) { diff --git a/Projectiles/Magic/GammaLaser.cs b/Projectiles/Magic/GammaLaser.cs index 0560e0a11a..7424f9dd7d 100644 --- a/Projectiles/Magic/GammaLaser.cs +++ b/Projectiles/Magic/GammaLaser.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetDefaults() { - projectile.width = 4; - projectile.height = 4; + projectile.width = 14; + projectile.height = 14; projectile.friendly = true; projectile.penetrate = 2; projectile.timeLeft = 150; @@ -30,9 +30,9 @@ namespace CalamityMod.Projectiles.Magic { Lighting.AddLight(projectile.Center, 0.1f, 0.35f, 0f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool(7)) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 74, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 74, 0f, 0f); } } diff --git a/Projectiles/Magic/GammaLaser.png b/Projectiles/Magic/GammaLaser.png index 5fe7b19ed5..d0fa5c57a4 100644 Binary files a/Projectiles/Magic/GammaLaser.png and b/Projectiles/Magic/GammaLaser.png differ diff --git a/Projectiles/Magic/GhastlyVisageProj.png b/Projectiles/Magic/GhastlyVisageProj.png index ae934f4ae9..1cd6e62b21 100644 Binary files a/Projectiles/Magic/GhastlyVisageProj.png and b/Projectiles/Magic/GhastlyVisageProj.png differ diff --git a/Projectiles/Melee/BurningMeteor.cs b/Projectiles/Melee/BurningMeteor.cs index 160a017c7f..0288610f3e 100644 --- a/Projectiles/Melee/BurningMeteor.cs +++ b/Projectiles/Melee/BurningMeteor.cs @@ -112,7 +112,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 175) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } } diff --git a/Projectiles/Melee/CosmicSpiritBomb1.cs b/Projectiles/Melee/CosmicSpiritBomb1.cs index c24bcfe2c8..1bac4206f5 100644 --- a/Projectiles/Melee/CosmicSpiritBomb1.cs +++ b/Projectiles/Melee/CosmicSpiritBomb1.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,25 +20,62 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = 1; projectile.tileCollide = false; - projectile.timeLeft = 120; + projectile.timeLeft = 150; projectile.melee = true; } - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 5; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 15, 0f, 0f, 100, default, 1.5f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - } + public override void AI() + { + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + float num947 = (projectile.Center - Main.player[projectile.owner].Center).Length() / 100f; + if (num947 <= 2f) + { + num947 = 1f; + } + else + { + if (num947 > 8f) + { + num947 = 12f; + } + else if (num947 > 6f) + { + num947 = 9f; + } + else if (num947 > 5f) + { + num947 = 7f; + } + else if (num947 > 4f) + { + num947 = 5f; + } + else if (num947 > 3f) + { + num947 = 4f; + } + else if (num947 > 2.5f) + { + num947 = 3f; + } + else + { + num947 = 2f; + } + } + projectile.velocity = Vector2.Normalize(Main.player[projectile.owner].Center - projectile.Center) * num947; + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, projectile.alpha); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Frostburn, 300); } diff --git a/Projectiles/Melee/CosmicSpiritBomb1.png b/Projectiles/Melee/CosmicSpiritBomb1.png index 6ea4de3903..80b55e105c 100644 Binary files a/Projectiles/Melee/CosmicSpiritBomb1.png and b/Projectiles/Melee/CosmicSpiritBomb1.png differ diff --git a/Projectiles/Melee/CosmicSpiritBomb2.cs b/Projectiles/Melee/CosmicSpiritBomb2.cs index 1029634e6c..e6a0f7bdb4 100644 --- a/Projectiles/Melee/CosmicSpiritBomb2.cs +++ b/Projectiles/Melee/CosmicSpiritBomb2.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,25 +20,62 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = 1; projectile.tileCollide = false; - projectile.timeLeft = 120; + projectile.timeLeft = 150; projectile.melee = true; } public override void AI() { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 5; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 73, 0f, 0f, 100, default, 1.5f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - } + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + float num947 = (projectile.Center - Main.player[projectile.owner].Center).Length() / 100f; + if (num947 <= 2f) + { + num947 = 1f; + } + else + { + if (num947 > 8f) + { + num947 = 12f; + } + else if (num947 > 6f) + { + num947 = 9f; + } + else if (num947 > 5f) + { + num947 = 7f; + } + else if (num947 > 4f) + { + num947 = 5f; + } + else if (num947 > 3f) + { + num947 = 4f; + } + else if (num947 > 2.5f) + { + num947 = 3f; + } + else + { + num947 = 2f; + } + } + projectile.velocity = Vector2.Normalize(Main.player[projectile.owner].Center - projectile.Center) * num947; + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, projectile.alpha); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.OnFire, 600); } diff --git a/Projectiles/Melee/CosmicSpiritBomb2.png b/Projectiles/Melee/CosmicSpiritBomb2.png index 6ea4de3903..d8ef69b775 100644 Binary files a/Projectiles/Melee/CosmicSpiritBomb2.png and b/Projectiles/Melee/CosmicSpiritBomb2.png differ diff --git a/Projectiles/Melee/CosmicSpiritBomb3.cs b/Projectiles/Melee/CosmicSpiritBomb3.cs index 8ec3a07126..fb61630970 100644 --- a/Projectiles/Melee/CosmicSpiritBomb3.cs +++ b/Projectiles/Melee/CosmicSpiritBomb3.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,25 +20,62 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = 1; projectile.tileCollide = false; - projectile.timeLeft = 120; + projectile.timeLeft = 150; projectile.melee = true; } public override void AI() { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 5; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1.5f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - } + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + float num947 = (projectile.Center - Main.player[projectile.owner].Center).Length() / 100f; + if (num947 <= 2f) + { + num947 = 1f; + } + else + { + if (num947 > 8f) + { + num947 = 12f; + } + else if (num947 > 6f) + { + num947 = 9f; + } + else if (num947 > 5f) + { + num947 = 7f; + } + else if (num947 > 4f) + { + num947 = 5f; + } + else if (num947 > 3f) + { + num947 = 4f; + } + else if (num947 > 2.5f) + { + num947 = 3f; + } + else + { + num947 = 2f; + } + } + projectile.velocity = Vector2.Normalize(Main.player[projectile.owner].Center - projectile.Center) * num947; + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, projectile.alpha); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Ichor, 180); } diff --git a/Projectiles/Melee/CosmicSpiritBomb3.png b/Projectiles/Melee/CosmicSpiritBomb3.png index 6ea4de3903..08eba7c027 100644 Binary files a/Projectiles/Melee/CosmicSpiritBomb3.png and b/Projectiles/Melee/CosmicSpiritBomb3.png differ diff --git a/Projectiles/Melee/DarkBeam.cs b/Projectiles/Melee/DarkBeam.cs new file mode 100644 index 0000000000..84bdab4cb2 --- /dev/null +++ b/Projectiles/Melee/DarkBeam.cs @@ -0,0 +1,81 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class DarkBeam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dark Beam"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 56; + projectile.height = 56; + projectile.aiStyle = 18; + aiType = 274; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.2f / 255f, 0f, (255 - projectile.alpha) * 0.6f / 255f); + + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 12f) + { + projectile.velocity *= 1.1f; + } + } + + public override Color? GetAlpha(Color lightColor) + { + if (projectile.timeLeft < 85) + { + byte b2 = (byte)(projectile.timeLeft * 3); + byte a2 = (byte)(100f * ((float)b2 / 255f)); + return new Color((int)b2, (int)b2, (int)b2, (int)a2); + } + return new Color(255, 255, 255, 100); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Frostburn, 240); + } + + public override void Kill(int timeLeft) + { + for (int num105 = 0; num105 < 20; num105++) + { + int num102 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 56, 0f, 0f, 0, default, 1f); + Main.dust[num102].noGravity = true; + Main.dust[num102].velocity += projectile.velocity * 0.1f; + } + if (projectile.owner == Main.myPlayer) + { + for (int k = 0; k < 3; k++) + { + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)Main.rand.Next(-35, 36) * 0.2f, (float)Main.rand.Next(-35, 36) * 0.2f, ModContent.ProjectileType(), + (int)((double)projectile.damage * 0.5), projectile.knockBack * 0.15f, Main.myPlayer, 0f, 0f); + } + } + } + } +} diff --git a/Projectiles/Melee/DarkBeam.png b/Projectiles/Melee/DarkBeam.png new file mode 100644 index 0000000000..ba27b2821d Binary files /dev/null and b/Projectiles/Melee/DarkBeam.png differ diff --git a/Projectiles/Melee/DarkIceZero.cs b/Projectiles/Melee/DarkIceZero.cs index 078cdd96d5..6d15c5f03c 100644 --- a/Projectiles/Melee/DarkIceZero.cs +++ b/Projectiles/Melee/DarkIceZero.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -15,6 +16,7 @@ namespace CalamityMod.Projectiles.Melee projectile.height = 28; projectile.aiStyle = 1; aiType = ProjectileID.Bullet; + projectile.timeLeft = 600; projectile.friendly = true; projectile.melee = true; projectile.penetrate = 1; @@ -28,7 +30,15 @@ namespace CalamityMod.Projectiles.Melee DisplayName.SetDefault("Dark Ice"); } - public override void AI() + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 595) + return false; + + return true; + } + + public override void AI() { if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 16f) { diff --git a/Projectiles/Melee/DepthOrb.cs b/Projectiles/Melee/DepthOrb.cs index af257e815d..dfedfe134b 100644 --- a/Projectiles/Melee/DepthOrb.cs +++ b/Projectiles/Melee/DepthOrb.cs @@ -37,7 +37,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 25) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/DracoBeam.cs b/Projectiles/Melee/DracoBeam.cs index 0c08e2011a..b082503000 100644 --- a/Projectiles/Melee/DracoBeam.cs +++ b/Projectiles/Melee/DracoBeam.cs @@ -38,7 +38,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/DracoBeam2.cs b/Projectiles/Melee/DracoBeam2.cs index 0af4cf3e8c..e32d8d95d4 100644 --- a/Projectiles/Melee/DracoBeam2.cs +++ b/Projectiles/Melee/DracoBeam2.cs @@ -59,7 +59,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 235) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/DragonRageProj.cs b/Projectiles/Melee/DragonRageProj.cs index fd61c1c4a9..30d9d1412c 100644 --- a/Projectiles/Melee/DragonRageProj.cs +++ b/Projectiles/Melee/DragonRageProj.cs @@ -54,7 +54,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 115) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/ElementBallShiv.cs b/Projectiles/Melee/ElementBallShiv.cs index cfbf3f8a38..18a41b3d30 100644 --- a/Projectiles/Melee/ElementBallShiv.cs +++ b/Projectiles/Melee/ElementBallShiv.cs @@ -1,9 +1,11 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Melee { public class ElementBallShiv : ModProjectile @@ -65,7 +67,15 @@ namespace CalamityMod.Projectiles.Melee } } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 115) + return false; + + return true; + } + + public override void Kill(int timeLeft) { for (int k = 0; k < 4; k++) { diff --git a/Projectiles/Melee/ElementalExcaliburBeam.cs b/Projectiles/Melee/ElementalExcaliburBeam.cs index f58a6153c7..fc445ec8fe 100644 --- a/Projectiles/Melee/ElementalExcaliburBeam.cs +++ b/Projectiles/Melee/ElementalExcaliburBeam.cs @@ -362,7 +362,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - if (projectile.timeLeft > 590) + if (projectile.timeLeft > 595) return false; CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); diff --git a/Projectiles/Melee/EonBeam.cs b/Projectiles/Melee/EonBeam.cs index 9fd6e33893..b44fa725a6 100644 --- a/Projectiles/Melee/EonBeam.cs +++ b/Projectiles/Melee/EonBeam.cs @@ -45,7 +45,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 295) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/EonBeamV2.cs b/Projectiles/Melee/EonBeamV2.cs index 3b65a17b19..d0f3457948 100644 --- a/Projectiles/Melee/EonBeamV2.cs +++ b/Projectiles/Melee/EonBeamV2.cs @@ -45,7 +45,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 295) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/EonBeamV3.cs b/Projectiles/Melee/EonBeamV3.cs index bd06a2d600..c5b385e72e 100644 --- a/Projectiles/Melee/EonBeamV3.cs +++ b/Projectiles/Melee/EonBeamV3.cs @@ -46,7 +46,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 195) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/EonBeamV4.cs b/Projectiles/Melee/EonBeamV4.cs index 75088041cc..2ee247796b 100644 --- a/Projectiles/Melee/EonBeamV4.cs +++ b/Projectiles/Melee/EonBeamV4.cs @@ -46,7 +46,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 195) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/EssenceFireball.cs b/Projectiles/Melee/EssenceFireball.cs index 186988b1b0..e44ed655d1 100644 --- a/Projectiles/Melee/EssenceFireball.cs +++ b/Projectiles/Melee/EssenceFireball.cs @@ -62,7 +62,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 115) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/Exobeam.cs b/Projectiles/Melee/Exobeam.cs index ea85627926..82ccdebbc5 100644 --- a/Projectiles/Melee/Exobeam.cs +++ b/Projectiles/Melee/Exobeam.cs @@ -155,7 +155,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/GalacticaComet.cs b/Projectiles/Melee/GalacticaComet.cs index c2f5435e40..fd38021efd 100644 --- a/Projectiles/Melee/GalacticaComet.cs +++ b/Projectiles/Melee/GalacticaComet.cs @@ -103,7 +103,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/GelWave.cs b/Projectiles/Melee/GelWave.cs index a2da052a6c..54dd954cf4 100644 --- a/Projectiles/Melee/GelWave.cs +++ b/Projectiles/Melee/GelWave.cs @@ -47,7 +47,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 195) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/GhastlySoulLarge.cs b/Projectiles/Melee/GhastlySoulLarge.cs index 3660170fba..892bf87a35 100644 --- a/Projectiles/Melee/GhastlySoulLarge.cs +++ b/Projectiles/Melee/GhastlySoulLarge.cs @@ -110,7 +110,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/GhastlySoulMedium.cs b/Projectiles/Melee/GhastlySoulMedium.cs index 39f9c7d9ea..000dea66c0 100644 --- a/Projectiles/Melee/GhastlySoulMedium.cs +++ b/Projectiles/Melee/GhastlySoulMedium.cs @@ -110,7 +110,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/GhastlySoulSmall.cs b/Projectiles/Melee/GhastlySoulSmall.cs index 03acc165f1..923b51fcd3 100644 --- a/Projectiles/Melee/GhastlySoulSmall.cs +++ b/Projectiles/Melee/GhastlySoulSmall.cs @@ -109,7 +109,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/HellionSpike.cs b/Projectiles/Melee/HellionSpike.cs index a8e132bce1..21a9f09d35 100644 --- a/Projectiles/Melee/HellionSpike.cs +++ b/Projectiles/Melee/HellionSpike.cs @@ -47,7 +47,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/LifeScythe.cs b/Projectiles/Melee/LifeScythe.cs index 4cf752a6ec..d777ca9ce7 100644 --- a/Projectiles/Melee/LifeScythe.cs +++ b/Projectiles/Melee/LifeScythe.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - projectile.width = 38; - projectile.height = 70; + projectile.width = 62; + projectile.height = 72; projectile.aiStyle = 18; projectile.alpha = 55; projectile.friendly = true; @@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = 3; projectile.timeLeft = 240; projectile.ignoreWater = true; + projectile.tileCollide = false; aiType = 274; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 4; @@ -33,27 +34,11 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (projectile.localAI[0] == 0f) - { - projectile.scale -= 0.02f; - projectile.alpha += 30; - if (projectile.alpha >= 250) - { - projectile.alpha = 255; - projectile.localAI[0] = 1f; - } - } - else if (projectile.localAI[0] == 1f) - { - projectile.scale += 0.02f; - projectile.alpha -= 30; - if (projectile.alpha <= 0) - { - projectile.alpha = 0; - projectile.localAI[0] = 0f; - } - } - Lighting.AddLight(projectile.Center, 0.1f, 0.5f, 0.15f); + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; + + Lighting.AddLight(projectile.Center, 0.1f, 0.5f, 0.15f); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Melee/LifeScythe.png b/Projectiles/Melee/LifeScythe.png index d39023aebd..5c3a96c0d9 100644 Binary files a/Projectiles/Melee/LifeScythe.png and b/Projectiles/Melee/LifeScythe.png differ diff --git a/Projectiles/Melee/LightBeam.cs b/Projectiles/Melee/LightBeam.cs new file mode 100644 index 0000000000..57928e2747 --- /dev/null +++ b/Projectiles/Melee/LightBeam.cs @@ -0,0 +1,81 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class LightBeam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light Beam"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 56; + projectile.height = 56; + projectile.aiStyle = 18; + aiType = 274; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.6f / 255f, 0f, (255 - projectile.alpha) * 0.2f / 255f); + + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 18f) + { + projectile.velocity *= 1.1f; + } + } + + public override Color? GetAlpha(Color lightColor) + { + if (projectile.timeLeft < 85) + { + byte b2 = (byte)(projectile.timeLeft * 3); + byte a2 = (byte)(100f * ((float)b2 / 255f)); + return new Color((int)b2, (int)b2, (int)b2, (int)a2); + } + return new Color(255, 255, 255, 100); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.OnFire, 240); + } + + public override void Kill(int timeLeft) + { + for (int num105 = 0; num105 < 20; num105++) + { + int num102 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 73, 0f, 0f, 0, default, 1f); + Main.dust[num102].noGravity = true; + Main.dust[num102].velocity += projectile.velocity * 0.1f; + } + if (projectile.owner == Main.myPlayer) + { + for (int k = 0; k < 3; k++) + { + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)Main.rand.Next(-35, 36) * 0.2f, (float)Main.rand.Next(-35, 36) * 0.2f, ModContent.ProjectileType(), + (int)((double)projectile.damage * 0.5), projectile.knockBack * 0.15f, Main.myPlayer, 1f, 0f); + } + } + } + } +} diff --git a/Projectiles/Melee/LightBeam.png b/Projectiles/Melee/LightBeam.png new file mode 100644 index 0000000000..5d95d6961b Binary files /dev/null and b/Projectiles/Melee/LightBeam.png differ diff --git a/Projectiles/Melee/MirrorBlast.cs b/Projectiles/Melee/MirrorBlast.cs index 1f3d2c4368..b296648602 100644 --- a/Projectiles/Melee/MirrorBlast.cs +++ b/Projectiles/Melee/MirrorBlast.cs @@ -54,7 +54,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 295) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } } diff --git a/Projectiles/Melee/NeptuneOrb.cs b/Projectiles/Melee/NeptuneOrb.cs index 8981162a18..017c541056 100644 --- a/Projectiles/Melee/NeptuneOrb.cs +++ b/Projectiles/Melee/NeptuneOrb.cs @@ -48,7 +48,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 295) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/ProfanedSwordProj.cs b/Projectiles/Melee/ProfanedSwordProj.cs index 58bbe4d886..b020a676fa 100644 --- a/Projectiles/Melee/ProfanedSwordProj.cs +++ b/Projectiles/Melee/ProfanedSwordProj.cs @@ -40,7 +40,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 595) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SHIV.cs b/Projectiles/Melee/SHIV.cs index c15b0eed32..fa9cbbcf4c 100644 --- a/Projectiles/Melee/SHIV.cs +++ b/Projectiles/Melee/SHIV.cs @@ -53,7 +53,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } } diff --git a/Projectiles/Melee/ShortBeam.cs b/Projectiles/Melee/ShortBeam.cs index 5dad34e761..61d1f69080 100644 --- a/Projectiles/Melee/ShortBeam.cs +++ b/Projectiles/Melee/ShortBeam.cs @@ -35,7 +35,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 55) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/ShortNightBeam.cs b/Projectiles/Melee/ShortNightBeam.cs index af9c53a444..68f43b3223 100644 --- a/Projectiles/Melee/ShortNightBeam.cs +++ b/Projectiles/Melee/ShortNightBeam.cs @@ -35,7 +35,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 55) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/ShortTerraBeam.cs b/Projectiles/Melee/ShortTerraBeam.cs index 86ae8c0a15..15c0285e0a 100644 --- a/Projectiles/Melee/ShortTerraBeam.cs +++ b/Projectiles/Melee/ShortTerraBeam.cs @@ -36,7 +36,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 115) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SolsticeBeam.cs b/Projectiles/Melee/SolsticeBeam.cs index 7f843e437a..f77223b217 100644 --- a/Projectiles/Melee/SolsticeBeam.cs +++ b/Projectiles/Melee/SolsticeBeam.cs @@ -130,7 +130,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 595) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SpatialSpear.cs b/Projectiles/Melee/SpatialSpear.cs index d4a397ad85..03276455b0 100644 --- a/Projectiles/Melee/SpatialSpear.cs +++ b/Projectiles/Melee/SpatialSpear.cs @@ -86,7 +86,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 175) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SpatialSpear2.cs b/Projectiles/Melee/SpatialSpear2.cs index fc6f1b0d06..25b9d3a735 100644 --- a/Projectiles/Melee/SpatialSpear2.cs +++ b/Projectiles/Melee/SpatialSpear2.cs @@ -74,7 +74,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 115) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SpatialSpear3.cs b/Projectiles/Melee/SpatialSpear3.cs index 762d9ce75e..8457ef3a9a 100644 --- a/Projectiles/Melee/SpatialSpear3.cs +++ b/Projectiles/Melee/SpatialSpear3.cs @@ -72,7 +72,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 75) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SpatialSpear4.cs b/Projectiles/Melee/SpatialSpear4.cs index 670ec7a7ab..a87beae174 100644 --- a/Projectiles/Melee/SpatialSpear4.cs +++ b/Projectiles/Melee/SpatialSpear4.cs @@ -57,7 +57,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 45) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/Spears/BansheeHookAlt.png b/Projectiles/Melee/Spears/BansheeHookAlt.png index d117ac966e..416d582d13 100644 Binary files a/Projectiles/Melee/Spears/BansheeHookAlt.png and b/Projectiles/Melee/Spears/BansheeHookAlt.png differ diff --git a/Projectiles/Melee/Spears/BansheeHookProj.png b/Projectiles/Melee/Spears/BansheeHookProj.png index 175e147b92..a9a2eaa190 100644 Binary files a/Projectiles/Melee/Spears/BansheeHookProj.png and b/Projectiles/Melee/Spears/BansheeHookProj.png differ diff --git a/Projectiles/Melee/Spears/StarnightLanceProjectile.png b/Projectiles/Melee/Spears/StarnightLanceProjectile.png index 88c7bec4a3..6f70525cd8 100644 Binary files a/Projectiles/Melee/Spears/StarnightLanceProjectile.png and b/Projectiles/Melee/Spears/StarnightLanceProjectile.png differ diff --git a/Projectiles/Melee/StarCrystal.cs b/Projectiles/Melee/StarCrystal.cs deleted file mode 100644 index 71d09587ab..0000000000 --- a/Projectiles/Melee/StarCrystal.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Melee -{ - public class StarCrystal : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Star"); - } - - public override void SetDefaults() - { - projectile.width = 16; - projectile.height = 16; - projectile.aiStyle = 29; - projectile.friendly = true; - projectile.melee = true; - projectile.penetrate = 1; - projectile.alpha = 255; - projectile.timeLeft = 600; - aiType = 121; - } - - public override void Kill(int timeLeft) - { - if (projectile.owner == Main.myPlayer) - { - for (int k = 0; k < 3; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 227, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - Projectile.NewProjectile(projectile.position.X, projectile.position.Y, (float)Main.rand.Next(-35, 36) * 0.2f, (float)Main.rand.Next(-35, 36) * 0.2f, ModContent.ProjectileType(), - (int)((double)projectile.damage * 0.5), projectile.knockBack * 0.15f, Main.myPlayer, 0f, 0f); - } - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Frostburn, 240); - } - } -} diff --git a/Projectiles/Melee/StarCrystal.png b/Projectiles/Melee/StarCrystal.png deleted file mode 100644 index 1925db3c36..0000000000 Binary files a/Projectiles/Melee/StarCrystal.png and /dev/null differ diff --git a/Projectiles/Melee/StarnightBeam.cs b/Projectiles/Melee/StarnightBeam.cs index 82fec979f9..8a1ca38173 100644 --- a/Projectiles/Melee/StarnightBeam.cs +++ b/Projectiles/Melee/StarnightBeam.cs @@ -29,12 +29,20 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Lighting.AddLight(projectile.Center, 0.2f, 0f, 0.2f); + Lighting.AddLight(projectile.Center, 0.4f, 0f, 0.4f); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/StarnightBeam.png b/Projectiles/Melee/StarnightBeam.png index 4ebcbc8d89..3920fefd19 100644 Binary files a/Projectiles/Melee/StarnightBeam.png and b/Projectiles/Melee/StarnightBeam.png differ diff --git a/Projectiles/Melee/StormBeam.cs b/Projectiles/Melee/StormBeam.cs index b9985d96c5..856f83b350 100644 --- a/Projectiles/Melee/StormBeam.cs +++ b/Projectiles/Melee/StormBeam.cs @@ -41,7 +41,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } } diff --git a/Projectiles/Melee/StormRulerProj.cs b/Projectiles/Melee/StormRulerProj.cs index e903ab31b3..84a8ea332e 100644 --- a/Projectiles/Melee/StormRulerProj.cs +++ b/Projectiles/Melee/StormRulerProj.cs @@ -63,7 +63,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } } diff --git a/Projectiles/Melee/TemporalFloeSwordProjectile.cs b/Projectiles/Melee/TemporalFloeSwordProjectile.cs index 4a48ba5fd3..6d526045ed 100644 --- a/Projectiles/Melee/TemporalFloeSwordProjectile.cs +++ b/Projectiles/Melee/TemporalFloeSwordProjectile.cs @@ -35,7 +35,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 595) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/TerraBall.cs b/Projectiles/Melee/TerraBall.cs index 00f45f9fa7..fcb42096c2 100644 --- a/Projectiles/Melee/TerraBall.cs +++ b/Projectiles/Melee/TerraBall.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -10,26 +11,45 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Ball"); - } + DisplayName.SetDefault("Terra Star"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } public override void SetDefaults() { - projectile.width = 12; - projectile.height = 12; + projectile.width = 20; + projectile.height = 20; projectile.friendly = true; projectile.melee = true; projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; + projectile.timeLeft = 180; } public override void AI() { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 74, 0f, 0f, 100, default, 2f); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 74, 0f, 0f, 100, default, 0.8f); Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - float num472 = projectile.Center.X; + + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 20 + Main.rand.Next(40); + if (Main.rand.NextBool(5)) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 9); + } + } + + if (Main.rand.NextBool(48)) + { + int num60 = Gore.NewGore(projectile.Center, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), 16, 1f); + Main.gore[num60].velocity *= 0.66f; + Main.gore[num60].velocity += projectile.velocity * 0.3f; + } + + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; + + float num472 = projectile.Center.X; float num473 = projectile.Center.Y; float num474 = 400f; bool flag17 = false; @@ -64,15 +84,50 @@ namespace CalamityMod.Projectiles.Melee } } - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 74, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, projectile.alpha); + } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void Kill(int timeLeft) + { + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 50; + projectile.height = 50; + 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++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 74, 0f, 0f, 100, default, 1.2f); + Main.dust[num622].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; + } + } + for (int num623 = 0; num623 < 5; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 74, 0f, 0f, 100, default, 1.7f); + 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, 74, 0f, 0f, 100, default, 1f); + Main.dust[num624].velocity *= 2f; + } + for (int num480 = 0; num480 < 3; num480++) + { + Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.05f, projectile.velocity.Y * 0.05f), Main.rand.Next(16, 18), 1f); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.CursedInferno, 300); } diff --git a/Projectiles/Melee/TerraBall.png b/Projectiles/Melee/TerraBall.png index 139ef2e822..12344049a9 100644 Binary files a/Projectiles/Melee/TerraBall.png and b/Projectiles/Melee/TerraBall.png differ diff --git a/Projectiles/Melee/TerraSpear.cs b/Projectiles/Melee/TerraSpear.cs index 81512ac0e6..f42dc90dc7 100644 --- a/Projectiles/Melee/TerraSpear.cs +++ b/Projectiles/Melee/TerraSpear.cs @@ -76,7 +76,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.timeLeft > 175) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/TerrorBeam.cs b/Projectiles/Melee/TerrorBeam.cs index 2ba4637a69..ddc64a4e38 100644 --- a/Projectiles/Melee/TerrorBeam.cs +++ b/Projectiles/Melee/TerrorBeam.cs @@ -88,7 +88,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/TinyCrystal.cs b/Projectiles/Melee/TinyCrystal.cs index 3b0af5f81b..b20c145260 100644 --- a/Projectiles/Melee/TinyCrystal.cs +++ b/Projectiles/Melee/TinyCrystal.cs @@ -1,4 +1,5 @@ -using Terraria; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,28 +16,54 @@ namespace CalamityMod.Projectiles.Melee { projectile.width = 8; projectile.height = 8; - projectile.aiStyle = 29; projectile.friendly = true; projectile.melee = true; projectile.penetrate = 1; projectile.alpha = 255; - projectile.timeLeft = 300; + projectile.timeLeft = 60; projectile.tileCollide = true; - aiType = 122; } + public override void AI() + { + int dustType = (projectile.ai[0] == 0f ? 56 : 73); + for (int num92 = 0; num92 < 2; num92++) + { + float num93 = projectile.velocity.X / 3f * (float)num92; + float num94 = projectile.velocity.Y / 3f * (float)num92; + int num95 = 4; + int num96 = Dust.NewDust(new Vector2(projectile.position.X + (float)num95, projectile.position.Y + (float)num95), projectile.width - num95 * 2, projectile.height - num95 * 2, dustType, 0f, 0f, 100, default, 1.2f); + Main.dust[num96].noGravity = true; + Main.dust[num96].velocity *= 0.1f; + Main.dust[num96].velocity += projectile.velocity * 0.1f; + Dust expr_47FA_cp_0 = Main.dust[num96]; + expr_47FA_cp_0.position.X -= num93; + Dust expr_4815_cp_0 = Main.dust[num96]; + expr_4815_cp_0.position.Y -= num94; + } + if (Main.rand.NextBool(10)) + { + int num97 = 4; + int num98 = Dust.NewDust(new Vector2(projectile.position.X + (float)num97, projectile.position.Y + (float)num97), projectile.width - num97 * 2, projectile.height - num97 * 2, dustType, 0f, 0f, 100, default, 0.6f); + Main.dust[num98].velocity *= 0.25f; + Main.dust[num98].velocity += projectile.velocity * 0.5f; + } + } + public override void Kill(int timeLeft) { - for (int k = 0; k < 5; k++) + int dustType = (projectile.ai[0] == 0f ? 56 : 73); + for (int k = 0; k < 5; k++) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 227, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, dustType, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); } Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 10); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(BuffID.Frostburn, 120); - } + int buffType = (projectile.ai[0] == 0f ? BuffID.Frostburn : BuffID.OnFire); + target.AddBuff(buffType, 120); + } } } diff --git a/Projectiles/Melee/TrueCausticEdgeProjectile.cs b/Projectiles/Melee/TrueCausticEdgeProjectile.cs index 108d8b1e2c..d3bb36cf18 100644 --- a/Projectiles/Melee/TrueCausticEdgeProjectile.cs +++ b/Projectiles/Melee/TrueCausticEdgeProjectile.cs @@ -33,7 +33,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + if (projectile.timeLeft > 595) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } diff --git a/Projectiles/Melee/VoidEssence.cs b/Projectiles/Melee/VoidEssence.cs index 70dc6a9f2f..c8d3d72553 100644 --- a/Projectiles/Melee/VoidEssence.cs +++ b/Projectiles/Melee/VoidEssence.cs @@ -133,7 +133,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + if (projectile.timeLeft > 95) + return false; + + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } diff --git a/Projectiles/Melee/Yoyos/ShimmersparkProjectile.png b/Projectiles/Melee/Yoyos/ShimmersparkProjectile.png index 6ddf95e9bc..18d3a7b017 100644 Binary files a/Projectiles/Melee/Yoyos/ShimmersparkProjectile.png and b/Projectiles/Melee/Yoyos/ShimmersparkProjectile.png differ diff --git a/Projectiles/Melee/Yoyos/VerdantProjectile.png b/Projectiles/Melee/Yoyos/VerdantProjectile.png index 4bf427bb0e..4944e5cb86 100644 Binary files a/Projectiles/Melee/Yoyos/VerdantProjectile.png and b/Projectiles/Melee/Yoyos/VerdantProjectile.png differ diff --git a/Projectiles/Ranged/DaemonsFlameBow.cs b/Projectiles/Ranged/DaemonsFlameBow.cs index 0875c9ef56..e894eff06f 100644 --- a/Projectiles/Ranged/DaemonsFlameBow.cs +++ b/Projectiles/Ranged/DaemonsFlameBow.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Daemon's Flame"); - Main.projFrames[projectile.type] = 3; + Main.projFrames[projectile.type] = 4; } public override void SetDefaults() @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.7f / 255f, (255 - projectile.alpha) * 0.5f / 255f); + Lighting.AddLight(projectile.Center, 0f, 0.7f, 0.5f); Player player = Main.player[projectile.owner]; float num = 0f; Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 2) + if (projectile.frame > 3) { projectile.frame = 0; } diff --git a/Projectiles/Ranged/DaemonsFlameBow.png b/Projectiles/Ranged/DaemonsFlameBow.png index 87c087929c..4def476710 100644 Binary files a/Projectiles/Ranged/DaemonsFlameBow.png and b/Projectiles/Ranged/DaemonsFlameBow.png differ diff --git a/Projectiles/Ranged/SulphuricAcidBubble2.png b/Projectiles/Ranged/SulphuricAcidBubble2.png index ce648b6fdf..3bb08e0246 100644 Binary files a/Projectiles/Ranged/SulphuricAcidBubble2.png and b/Projectiles/Ranged/SulphuricAcidBubble2.png differ diff --git a/Projectiles/Ranged/SulphuricAcidMist2.png b/Projectiles/Ranged/SulphuricAcidMist2.png index ef3dd2b17d..7d12c2559f 100644 Binary files a/Projectiles/Ranged/SulphuricAcidMist2.png and b/Projectiles/Ranged/SulphuricAcidMist2.png differ diff --git a/Projectiles/Ranged/VeriumBulletProj.png b/Projectiles/Ranged/VeriumBulletProj.png index c1252295f3..de510ceb92 100644 Binary files a/Projectiles/Ranged/VeriumBulletProj.png and b/Projectiles/Ranged/VeriumBulletProj.png differ diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.png b/Projectiles/Rogue/CrystalPiercerProjectile.png index 91ad01f4ce..eec2382c63 100644 Binary files a/Projectiles/Rogue/CrystalPiercerProjectile.png and b/Projectiles/Rogue/CrystalPiercerProjectile.png differ diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.png b/Projectiles/Rogue/GhoulishGougerBoomerang.png index 409d9d01df..93333dc689 100644 Binary files a/Projectiles/Rogue/GhoulishGougerBoomerang.png and b/Projectiles/Rogue/GhoulishGougerBoomerang.png differ diff --git a/Projectiles/Rogue/MalachiteBolt.png b/Projectiles/Rogue/MalachiteBolt.png index fcd0137dba..7112e64fbf 100644 Binary files a/Projectiles/Rogue/MalachiteBolt.png and b/Projectiles/Rogue/MalachiteBolt.png differ diff --git a/Projectiles/Rogue/MalachiteProj.png b/Projectiles/Rogue/MalachiteProj.png index fcd0137dba..7112e64fbf 100644 Binary files a/Projectiles/Rogue/MalachiteProj.png and b/Projectiles/Rogue/MalachiteProj.png differ diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.png b/Projectiles/Rogue/TarragonThrowingDartProjectile.png index dd05cffad4..91d11f0659 100644 Binary files a/Projectiles/Rogue/TarragonThrowingDartProjectile.png and b/Projectiles/Rogue/TarragonThrowingDartProjectile.png differ diff --git a/Projectiles/Summon/DaedalusCrystal.png b/Projectiles/Summon/DaedalusCrystal.png index 64d4138c1a..b60fcaf36d 100644 Binary files a/Projectiles/Summon/DaedalusCrystal.png and b/Projectiles/Summon/DaedalusCrystal.png differ diff --git a/Projectiles/Typeless/FeralDoubleBobber.cs b/Projectiles/Typeless/FeralDoubleBobber.cs new file mode 100644 index 0000000000..13bbc3d751 --- /dev/null +++ b/Projectiles/Typeless/FeralDoubleBobber.cs @@ -0,0 +1,151 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.Fishing; +namespace CalamityMod.Projectiles.Typeless +{ + public class FeralDoubleBobber : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Feral Bobber"); + } + + public override void SetDefaults() + { + //projectile.CloneDefaults(360); //Wooden Bobber + projectile.width = 14; + projectile.height = 14; + projectile.aiStyle = 61; + projectile.bobber = true; + projectile.penetrate = -1; + } + + public override bool PreDrawExtras(SpriteBatch spriteBatch) + { + Player player = Main.player[projectile.owner]; + if (projectile.bobber && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].holdStyle > 0) + { + float pPosX = player.MountedCenter.X; + float pPosY = player.MountedCenter.Y; + pPosY += Main.player[projectile.owner].gfxOffY; + int type = Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type; + float gravDir = Main.player[projectile.owner].gravDir; + + if (type == ModContent.ItemType()) + { + pPosX += (float)(45 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + { + pPosX -= 13f; + } + pPosY -= 35f * gravDir; + } + + if (gravDir == -1f) + { + pPosY -= 12f; + } + Vector2 value = new Vector2(pPosX, pPosY); + value = Main.player[projectile.owner].RotatedRelativePoint(value + new Vector2(8f), true) - new Vector2(8f); + float projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + float projPosY = projectile.position.Y + (float)projectile.height * 0.5f - value.Y; + Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + float rotation2 = (float)Math.Atan2((double)projPosY, (double)projPosX) - 1.57f; + bool flag2 = true; + if (projPosX == 0f && projPosY == 0f) + { + flag2 = false; + } + else + { + float projPosXY = (float)Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + projPosXY = 12f / projPosXY; + projPosX *= projPosXY; + projPosY *= projPosXY; + value.X -= projPosX; + value.Y -= projPosY; + projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + projPosY = projectile.position.Y + (float)projectile.height * 0.5f - value.Y; + } + while (flag2) + { + float num = 12f; + float num2 = (float)Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + float num3 = num2; + if (float.IsNaN(num2) || float.IsNaN(num3)) + { + flag2 = false; + } + else + { + if (num2 < 20f) + { + num = num2 - 8f; + flag2 = false; + } + num2 = 12f / num2; + projPosX *= num2; + projPosY *= num2; + value.X += projPosX; + value.Y += projPosY; + projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + projPosY = projectile.position.Y + (float)projectile.height * 0.1f - value.Y; + if (num3 > 12f) + { + float num4 = 0.3f; + float num5 = Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y); + if (num5 > 16f) + { + num5 = 16f; + } + num5 = 1f - num5 / 16f; + num4 *= num5; + num5 = num3 / 80f; + if (num5 > 1f) + { + num5 = 1f; + } + num4 *= num5; + if (num4 < 0f) + { + num4 = 0f; + } + num5 = 1f - projectile.localAI[0] / 100f; + num4 *= num5; + if (projPosY > 0f) + { + projPosY *= 1f + num4; + projPosX *= 1f - num4; + } + else + { + num5 = Math.Abs(projectile.velocity.X) / 3f; + if (num5 > 1f) + { + num5 = 1f; + } + num5 -= 0.5f; + num4 *= num5; + if (num4 > 0f) + { + num4 *= 2f; + } + projPosY *= 1f + num4; + projPosX *= 1f - num4; + } + } + rotation2 = (float)Math.Atan2((double)projPosY, (double)projPosX) - 1.57f; + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)value.X / 16, (int)(value.Y / 16f), new Microsoft.Xna.Framework.Color(220, 20, 60, 100)); //crimson + + Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2(value.X - Main.screenPosition.X + (float)Main.fishingLineTexture.Width * 0.5f, value.Y - Main.screenPosition.Y + (float)Main.fishingLineTexture.Height * 0.5f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.fishingLineTexture.Width, (int)num)), color2, rotation2, new Vector2((float)Main.fishingLineTexture.Width * 0.5f, 0f), 1f, SpriteEffects.None, 0f); + } + } + } + return false; + } + } +} diff --git a/Projectiles/Typeless/VerstaltiteBobber.cs b/Projectiles/Typeless/VerstaltiteBobber.cs new file mode 100644 index 0000000000..94bbb364b8 --- /dev/null +++ b/Projectiles/Typeless/VerstaltiteBobber.cs @@ -0,0 +1,151 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.Fishing; +namespace CalamityMod.Projectiles.Typeless +{ + public class VerstaltiteBobber : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Verstaltite Bobber"); + } + + public override void SetDefaults() + { + //projectile.CloneDefaults(360); //Wooden Bobber + projectile.width = 14; + projectile.height = 14; + projectile.aiStyle = 61; + projectile.bobber = true; + projectile.penetrate = -1; + } + + public override bool PreDrawExtras(SpriteBatch spriteBatch) + { + Player player = Main.player[projectile.owner]; + if (projectile.bobber && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].holdStyle > 0) + { + float pPosX = player.MountedCenter.X; + float pPosY = player.MountedCenter.Y; + pPosY += Main.player[projectile.owner].gfxOffY; + int type = Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type; + float gravDir = Main.player[projectile.owner].gravDir; + + if (type == ModContent.ItemType()) + { + pPosX += (float)(45 * Main.player[projectile.owner].direction); + if (Main.player[projectile.owner].direction < 0) + { + pPosX -= 13f; + } + pPosY -= 35f * gravDir; + } + + if (gravDir == -1f) + { + pPosY -= 12f; + } + Vector2 value = new Vector2(pPosX, pPosY); + value = Main.player[projectile.owner].RotatedRelativePoint(value + new Vector2(8f), true) - new Vector2(8f); + float projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + float projPosY = projectile.position.Y + (float)projectile.height * 0.5f - value.Y; + Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + float rotation2 = (float)Math.Atan2((double)projPosY, (double)projPosX) - 1.57f; + bool flag2 = true; + if (projPosX == 0f && projPosY == 0f) + { + flag2 = false; + } + else + { + float projPosXY = (float)Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + projPosXY = 12f / projPosXY; + projPosX *= projPosXY; + projPosY *= projPosXY; + value.X -= projPosX; + value.Y -= projPosY; + projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + projPosY = projectile.position.Y + (float)projectile.height * 0.5f - value.Y; + } + while (flag2) + { + float num = 12f; + float num2 = (float)Math.Sqrt((double)(projPosX * projPosX + projPosY * projPosY)); + float num3 = num2; + if (float.IsNaN(num2) || float.IsNaN(num3)) + { + flag2 = false; + } + else + { + if (num2 < 20f) + { + num = num2 - 8f; + flag2 = false; + } + num2 = 12f / num2; + projPosX *= num2; + projPosY *= num2; + value.X += projPosX; + value.Y += projPosY; + projPosX = projectile.position.X + (float)projectile.width * 0.5f - value.X; + projPosY = projectile.position.Y + (float)projectile.height * 0.1f - value.Y; + if (num3 > 12f) + { + float num4 = 0.3f; + float num5 = Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y); + if (num5 > 16f) + { + num5 = 16f; + } + num5 = 1f - num5 / 16f; + num4 *= num5; + num5 = num3 / 80f; + if (num5 > 1f) + { + num5 = 1f; + } + num4 *= num5; + if (num4 < 0f) + { + num4 = 0f; + } + num5 = 1f - projectile.localAI[0] / 100f; + num4 *= num5; + if (projPosY > 0f) + { + projPosY *= 1f + num4; + projPosX *= 1f - num4; + } + else + { + num5 = Math.Abs(projectile.velocity.X) / 3f; + if (num5 > 1f) + { + num5 = 1f; + } + num5 -= 0.5f; + num4 *= num5; + if (num4 > 0f) + { + num4 *= 2f; + } + projPosY *= 1f + num4; + projPosX *= 1f - num4; + } + } + rotation2 = (float)Math.Atan2((double)projPosY, (double)projPosX) - 1.57f; + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)value.X / 16, (int)(value.Y / 16f), new Microsoft.Xna.Framework.Color(95, 158, 160, 100)); //cadet blue + + Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2(value.X - Main.screenPosition.X + (float)Main.fishingLineTexture.Width * 0.5f, value.Y - Main.screenPosition.Y + (float)Main.fishingLineTexture.Height * 0.5f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.fishingLineTexture.Width, (int)num)), color2, rotation2, new Vector2((float)Main.fishingLineTexture.Width * 0.5f, 0f), 1f, SpriteEffects.None, 0f); + } + } + } + return false; + } + } +} diff --git a/Projectiles/Typeless/WulfrumBobber.cs b/Projectiles/Typeless/WulfrumBobber.cs index 18db59a19b..8aaed997c1 100644 --- a/Projectiles/Typeless/WulfrumBobber.cs +++ b/Projectiles/Typeless/WulfrumBobber.cs @@ -9,6 +9,11 @@ namespace CalamityMod.Projectiles.Typeless { public class WulfrumBobber : ModProjectile { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wulfrum Bobber"); + } + public override void SetDefaults() { //projectile.CloneDefaults(360); //Wooden Bobber @@ -32,12 +37,12 @@ namespace CalamityMod.Projectiles.Typeless if (type == ModContent.ItemType()) { - pPosX += (float)(45 * Main.player[projectile.owner].direction); + pPosX += (float)(45 * Main.player[projectile.owner].direction); //adjust this number to change x offset if (Main.player[projectile.owner].direction < 0) { pPosX -= 13f; } - pPosY -= 35f * gravDir; + pPosY -= 35f * gravDir; //adjust this number to change y offset } if (gravDir == -1f) @@ -134,7 +139,7 @@ namespace CalamityMod.Projectiles.Typeless } } rotation2 = (float)Math.Atan2((double)projPosY, (double)projPosX) - 1.57f; - Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)value.X / 16, (int)(value.Y / 16f), new Microsoft.Xna.Framework.Color(200, 200, 200, 100)); + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)value.X / 16, (int)(value.Y / 16f), new Microsoft.Xna.Framework.Color(200, 200, 200, 100)); //color of fishing line Main.spriteBatch.Draw(Main.fishingLineTexture, new Vector2(value.X - Main.screenPosition.X + (float)Main.fishingLineTexture.Width * 0.5f, value.Y - Main.screenPosition.Y + (float)Main.fishingLineTexture.Height * 0.5f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.fishingLineTexture.Width, (int)num)), color2, rotation2, new Vector2((float)Main.fishingLineTexture.Width * 0.5f, 0f), 1f, SpriteEffects.None, 0f); } diff --git a/Tiles/FurnitureProfaned/ProfanedPiano.png b/Tiles/FurnitureProfaned/ProfanedPiano.png index 3c29e6522a..e0a24c7064 100644 Binary files a/Tiles/FurnitureProfaned/ProfanedPiano.png and b/Tiles/FurnitureProfaned/ProfanedPiano.png differ diff --git a/Tiles/MonsterBanner.png b/Tiles/MonsterBanner.png index 6574e74525..fd8ba3bcbd 100644 Binary files a/Tiles/MonsterBanner.png and b/Tiles/MonsterBanner.png differ diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index e3ff3ad5a3..9f6cfaab50 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.Ores Main.tileLighted[Type] = true; Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - Main.tileValue[Type] = 700; + Main.tileValue[Type] = 900; Main.tileSpelunker[Type] = true; Main.tileShine2[Type] = true; diff --git a/Tiles/Ores/AuricOre.cs b/Tiles/Ores/AuricOre.cs index 5b0a4f1faa..0dc0a33cbf 100644 --- a/Tiles/Ores/AuricOre.cs +++ b/Tiles/Ores/AuricOre.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Ores Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; Main.tileSpelunker[Type] = true; - Main.tileValue[Type] = 1010; + Main.tileValue[Type] = 1000; TileMerge.MergeGeneralTiles(Type); diff --git a/Tiles/Ores/ChaoticOre.cs b/Tiles/Ores/ChaoticOre.cs index 4d3e93ad5e..9693c0c16b 100644 --- a/Tiles/Ores/ChaoticOre.cs +++ b/Tiles/Ores/ChaoticOre.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.Ores Main.tileLighted[Type] = true; Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - Main.tileValue[Type] = 750; + Main.tileValue[Type] = 850; TileMerge.MergeGeneralTiles(Type); TileMerge.MergeAbyssTiles(Type); diff --git a/Tiles/Ores/CharredOre.cs b/Tiles/Ores/CharredOre.cs index e9fd120df9..da9a242079 100644 --- a/Tiles/Ores/CharredOre.cs +++ b/Tiles/Ores/CharredOre.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.Ores Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; Main.tileLighted[Type] = true; - Main.tileValue[Type] = 710; + Main.tileValue[Type] = 720; TileMerge.MergeGeneralTiles(Type); TileMerge.MergeHellTiles(Type); diff --git a/Tiles/Ores/PerennialOre.cs b/Tiles/Ores/PerennialOre.cs index fd30d19db5..23e4df5d3e 100644 --- a/Tiles/Ores/PerennialOre.cs +++ b/Tiles/Ores/PerennialOre.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.Ores Main.tileSolid[Type] = true; Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - Main.tileValue[Type] = 690; + Main.tileValue[Type] = 710; TileMerge.MergeGeneralTiles(Type); diff --git a/Tiles/Ores/UelibloomOre.cs b/Tiles/Ores/UelibloomOre.cs index 785c7495b3..a197522a00 100644 --- a/Tiles/Ores/UelibloomOre.cs +++ b/Tiles/Ores/UelibloomOre.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.Ores { Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - Main.tileValue[Type] = 1005; + Main.tileValue[Type] = 950; TileMerge.MergeGeneralTiles(Type); diff --git a/Tiles/VerstaltiteBar.png b/Tiles/VerstaltiteBar.png new file mode 100644 index 0000000000..7e61bb0373 Binary files /dev/null and b/Tiles/VerstaltiteBar.png differ