From 04067bf9256500e2b1969951da85a55834d3e889 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 20:19:43 -0400 Subject: [PATCH] fixes and summoner association support --- Items/Weapons/Summon/BensUmbrella.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 72 ++++++++++++++----------- Projectiles/Summon/EndoHydraBody.cs | 2 +- Projectiles/Summon/MK2RocketHoming.cs | 9 ++++ Projectiles/Summon/MK2RocketNormal.cs | 9 ++++ Projectiles/Summon/OldDukeHeadCorpse.cs | 2 +- 6 files changed, 61 insertions(+), 35 deletions(-) diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs index 3e9f9987e3..f4d3f85284 100644 --- a/Items/Weapons/Summon/BensUmbrella.cs +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 99; - item.damage = 3001; + item.damage = 1234; item.useStyle = 1; item.width = 74; item.height = 72; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 31586a28d2..489b4fe785 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -347,7 +347,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}] in the Jungle Biome"; string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00)); @@ -410,7 +410,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Providence", out float order); List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; List summons = new List() { ItemType(), ItemType() }; - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use either [i:{ItemType()}] or [i:{ItemType()}] in the Hallow or Underworld Biomes"; string despawn = CalamityUtils.ColorMessage("The Profaned Goddess vanishes in a burning blaze.", new Color(0xFF, 0xA5, 0x00)); @@ -697,37 +697,45 @@ namespace CalamityMod private static void SummonersAssociationSupport() { - Mod SummonersAssociation = ModLoader.GetMod("SummonersAssociation"); - if(SummonersAssociation != null) + Mod sAssociation = ModLoader.GetMod("SummonersAssociation"); + if(sAssociation != null) { - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); + //Entropy's Vigil is a bruh moment + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); } } } diff --git a/Projectiles/Summon/EndoHydraBody.cs b/Projectiles/Summon/EndoHydraBody.cs index e5ede3f428..ba170ca56b 100644 --- a/Projectiles/Summon/EndoHydraBody.cs +++ b/Projectiles/Summon/EndoHydraBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Summon projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; - projectile.minionSlots = 1f; + projectile.minionSlots = 0f; projectile.timeLeft = 18000; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Projectiles/Summon/MK2RocketHoming.cs b/Projectiles/Summon/MK2RocketHoming.cs index b35947ef92..29d7cf5828 100644 --- a/Projectiles/Summon/MK2RocketHoming.cs +++ b/Projectiles/Summon/MK2RocketHoming.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -54,9 +55,17 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(ModContent.BuffType(), 180); } + public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item14, projectile.Center); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 599) + return false; + return true; + } } } diff --git a/Projectiles/Summon/MK2RocketNormal.cs b/Projectiles/Summon/MK2RocketNormal.cs index c3dbf12eba..0babae7582 100644 --- a/Projectiles/Summon/MK2RocketNormal.cs +++ b/Projectiles/Summon/MK2RocketNormal.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -48,9 +49,17 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(ModContent.BuffType(), 180); } + public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item14, projectile.Center); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 599) + return false; + return true; + } } } diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index ef269b7f5f..0ee335caf3 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f); angle *= Math.Sign(target.Center.X - projectile.Center.X); Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f, - new Vector2(0f, -Main.rand.NextFloat(21f, 30.5f)).RotatedBy(angle), + new Vector2(0f, -Main.rand.NextFloat(30f, 40f)).RotatedBy(angle), ModContent.ProjectileType(), projectile.damage, 5f, projectile.owner); }