From 17066622237753e8d765489cec105706beb9a88e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 6 Jun 2020 22:32:38 -0400 Subject: [PATCH 1/6] still needs buff sprite and animation --- Buffs/Pets/BendyBuff.cs | 28 ++++ Buffs/Pets/BendyBuff.png | Bin 0 -> 635 bytes CalPlayer/CalamityPlayer.cs | 4 + Items/Pets/ChromaticOrb.cs | 35 +++++ Items/Pets/ChromaticOrb.png | Bin 0 -> 429 bytes Projectiles/Pets/BendyPet.cs | 253 ++++++++++++++++++++++++++++++ Projectiles/Pets/BendyPet.png | Bin 0 -> 975 bytes Projectiles/Pets/BendyPetGlow.png | Bin 0 -> 366 bytes 8 files changed, 320 insertions(+) create mode 100644 Buffs/Pets/BendyBuff.cs create mode 100644 Buffs/Pets/BendyBuff.png create mode 100644 Items/Pets/ChromaticOrb.cs create mode 100644 Items/Pets/ChromaticOrb.png create mode 100644 Projectiles/Pets/BendyPet.cs create mode 100644 Projectiles/Pets/BendyPet.png create mode 100644 Projectiles/Pets/BendyPetGlow.png diff --git a/Buffs/Pets/BendyBuff.cs b/Buffs/Pets/BendyBuff.cs new file mode 100644 index 0000000000..8ce042d2c2 --- /dev/null +++ b/Buffs/Pets/BendyBuff.cs @@ -0,0 +1,28 @@ +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Pets +{ + public class BendyBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Chromadragon"); + Description.SetDefault("He supports you"); + Main.buffNoTimeDisplay[Type] = true; + Main.lightPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.Calamity().bendyPet = true; + bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; + if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); + } + } + } +} diff --git a/Buffs/Pets/BendyBuff.png b/Buffs/Pets/BendyBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..9d2c1038ca3ab399e6ce94a65f7a80822e4908d3 GIT binary patch literal 635 zcmV->0)+jEP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0uV_=K~z{r&6P_? z8$le#*B~BjFXAPFlF<6Vo6riy5)$G;Zz9^L1k^$a6^kuMs1H2)LXawo;zcSxqosHi z6hth6R_Li<&{k1M5u~R=^pNO&vmffD%X-jeez5$8eaz1Po86f-?TUoq{{`M{Lopx)h6ZDg#W7<@_KRG`(); + item.buffType = ModContent.BuffType(); + item.Calamity().customRarity = CalamityRarity.Dedicated; + } + + public override void UseStyle(Player player) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(item.buffType, 3600, true); + } + } + } +} diff --git a/Items/Pets/ChromaticOrb.png b/Items/Pets/ChromaticOrb.png new file mode 100644 index 0000000000000000000000000000000000000000..71b117535bb8870172aca96b5dc7510502e9aa49 GIT binary patch literal 429 zcmV;e0aE^nP)Q1)ym-W5+7K`Ua}{P>mm8b+EW3=tHVosI6oGt_9*}h@iN5&sBS@KHyjmsU6Tkj1=}* z#PH#uw-DwJbf3a}c;Wp!uo447Auvs`4=J_~W&kW`rE`N(B7^y?5(=O7)@>BN4kyG% z=%Ce-3ng`8lr#fwA-d1dePHN5CA%} X1Sl@?-ZlUL002ovPDHLkV1fVu*loLu literal 0 HcmV?d00001 diff --git a/Projectiles/Pets/BendyPet.cs b/Projectiles/Pets/BendyPet.cs new file mode 100644 index 0000000000..5441e05970 --- /dev/null +++ b/Projectiles/Pets/BendyPet.cs @@ -0,0 +1,253 @@ +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Pets +{ + public class BendyPet : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Siren"); + Main.projFrames[projectile.type] = 1; + Main.projPet[projectile.type] = true; + ProjectileID.Sets.LightPet[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.width = 38; + projectile.height = 56; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + projectile.ignoreWater = true; + projectile.tileCollide = false; + } + + public override void AI() + { + //Set up namespaces + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + + //If the player dies or something, kill thte projectile + if (!player.active) + { + projectile.active = false; + return; + } + if (player.dead) + { + modPlayer.bendyPet = false; + } + + //Prevent the projectile from losing its timeLeft + if (modPlayer.bendyPet) + { + projectile.timeLeft = 2; + } + + //Update frames + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + //Generate less light if returning to the player + if (projectile.localAI[0] == 0f) + { + Lighting.AddLight(projectile.Center, 0.6494f, 0.2023f, 1.0635f); //138, 43, 226 + } + else + { + Lighting.AddLight(projectile.Center, 0.4329f, 0.1349f, 0.709f); + } + + float idleMvt = 0.2f; + float projSpeed = 5f; + //Calculate where the pet should reside based on pressed controls + Vector2 projVec = player.Center - projectile.Center; + projVec.Y += player.gfxOffY; + if (player.controlLeft) + { + projVec.X -= 120f; + } + else if (player.controlRight) + { + projVec.X += 120f; + } + if (player.controlDown) + { + projVec.Y += 120f; + } + else + { + if (player.controlUp) + { + projVec.Y -= 120f; + } + projVec.Y -= 60f; + } + float playerDist = projVec.Length(); + if (playerDist > 1000f) + { + projectile.position.X += projVec.X; + projectile.position.Y += projVec.Y; + } + + //Returning to player AI + if (projectile.localAI[0] == 1f) + { + //If close enough, the player isn't moving too much, and isn't moving vertically, return to normal + if (playerDist < 10f && Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y) < projSpeed && player.velocity.Y == 0f) + { + projectile.localAI[0] = 0f; + } + + //Go faster + projSpeed = 12f; + if (playerDist < projSpeed) + { + projectile.velocity.X = projVec.X; + projectile.velocity.Y = projVec.Y; + } + else + { + playerDist = projSpeed / playerDist; + projectile.velocity.X = projVec.X * playerDist; + projectile.velocity.Y = projVec.Y * playerDist; + } + + //Set projectile direction and rotation + if (projectile.velocity.X > 0.5f) + { + projectile.direction = -1; + } + else if (projectile.velocity.X < -0.5f) + { + projectile.direction = 1; + } + projectile.spriteDirection = projectile.direction; + projectile.rotation = projectile.velocity.X * 0.05f; + return; + } + + //If too far, return to the player + if (playerDist > 200f) + { + projectile.localAI[0] = 1f; + } + + //Set projectile direction and rotation + if (projectile.velocity.X > 0.5f) + { + projectile.direction = -1; + } + else if (projectile.velocity.X < -0.5f) + { + projectile.direction = 1; + } + projectile.spriteDirection = projectile.direction; + + if (playerDist < 10f) + { + projectile.velocity.X = projVec.X; + projectile.velocity.Y = projVec.Y; + projectile.rotation = projectile.velocity.X * 0.05f; + if (playerDist < projSpeed) + { + projectile.position += projectile.velocity; + projectile.velocity *= 0f; + idleMvt = 0f; + } + projectile.direction = -player.direction; + } + playerDist = projSpeed / playerDist; + projVec.X *= playerDist; + projVec.Y *= playerDist; + if (projectile.velocity.X < projVec.X) + { + projectile.velocity.X += idleMvt; + if (projectile.velocity.X < 0f) + { + projectile.velocity.X *= 0.99f; + } + } + if (projectile.velocity.X > projVec.X) + { + projectile.velocity.X -= idleMvt; + if (projectile.velocity.X > 0f) + { + projectile.velocity.X *= 0.99f; + } + } + if (projectile.velocity.Y < projVec.Y) + { + projectile.velocity.Y += idleMvt; + if (projectile.velocity.Y < 0f) + { + projectile.velocity.Y *= 0.99f; + } + } + if (projectile.velocity.Y > projVec.Y) + { + projectile.velocity.Y -= idleMvt; + if (projectile.velocity.Y > 0f) + { + projectile.velocity.Y *= 0.99f; + } + } + + //Rotation if moving + if (projectile.velocity.X != 0f || projectile.velocity.Y != 0f) + { + projectile.rotation = projectile.velocity.X * 0.05f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = texture.Height / Main.projFrames[projectile.type]; + int frameHeight = height * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, spriteEffects, 0f); + return false; + } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Projectiles/Pets/BendyPetGlow"); + int height = texture.Height / Main.projFrames[projectile.type]; + int frameHeight = height * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + Color rainbow = CalamityUtils.MulticolorLerp(Main.GlobalTime / 2f % 1f, new Color[] + { + new Color(255, 0, 0, 50), //Red + new Color(255, 255, 0, 50), //Yellow + new Color(0, 255, 0, 50), //Green + new Color(0, 255, 255, 50), //Cyan + new Color(0, 0, 255, 50), //Blue + new Color(255, 0, 255, 50), //Fuschia + }); + + spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), rainbow, projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, spriteEffects, 0f); + } + } +} diff --git a/Projectiles/Pets/BendyPet.png b/Projectiles/Pets/BendyPet.png new file mode 100644 index 0000000000000000000000000000000000000000..7ec3dba2d8eeea22b8b33b01e746a4c8346f949d GIT binary patch literal 975 zcmV;=12FuFP)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2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 7 Jun 2020 11:18:49 -0400 Subject: [PATCH 2/6] buff name and tooltip changes --- Buffs/Pets/BendyBuff.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Buffs/Pets/BendyBuff.cs b/Buffs/Pets/BendyBuff.cs index 8ce042d2c2..9acece95d2 100644 --- a/Buffs/Pets/BendyBuff.cs +++ b/Buffs/Pets/BendyBuff.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Buffs.Pets { public override void SetDefaults() { - DisplayName.SetDefault("Chromadragon"); - Description.SetDefault("He supports you"); + DisplayName.SetDefault("Dreamfog"); + Description.SetDefault("Xi believes in Yuu"); Main.buffNoTimeDisplay[Type] = true; Main.lightPet[Type] = true; } From e2b82670df75d2e5bb456fae5132855cb82ecee2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 10 Jun 2020 21:29:32 -0400 Subject: [PATCH 3/6] updated with anims and buff icon --- Buffs/Pets/BendyBuff.png | Bin 635 -> 738 bytes Projectiles/Pets/BendyPet.cs | 4 ++-- Projectiles/Pets/BendyPet.png | Bin 975 -> 2985 bytes Projectiles/Pets/BendyPetGlow.png | Bin 366 -> 1053 bytes 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Buffs/Pets/BendyBuff.png b/Buffs/Pets/BendyBuff.png index 9d2c1038ca3ab399e6ce94a65f7a80822e4908d3..e1606a6350a651010ea9ad409f7d77e55cce01f0 100644 GIT binary patch delta 714 zcmV;*0yX{n1mXpdB!2{FK}|sb0I`n?{9y$E0004VQb$4nuFf3k0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00006VoOIv0RI600RN!9r;`8x z0x(HLK~z}7)tAj{6G0eA;HlJv5TjQYPkp}_T-}b4Z0hr@}k|OWer_W{N zfRIgYN<4CN7=T9;j{)dD8PW3NLzg@|o_jEBr~_`~ZtA?;BgB!uvh_1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+*`qtk_d#tzl*v+M9QWyO`b~kVT#Hg%0 zZ_{-2Qnj|_=4$jt?+tu&O`_I8?`pVkw3UEuJPEerbk^Aj2vxU0M-OD!I z*zx+9#NNHvubIcnCB-GTT$5jWgp_3G^~QXg&e_cA-FpRrxt_t()z4*}Q$iC10QM>G Ae*gdg delta 353 zcmV-n0iOPy2<`%q7JmRZ2nGNE0FmK}MF0Q+G)Y83RA@u(mN5##Fc^hf#EZB(Dz05b zaPb75!2>uI1Xsa3xQnw(SHaOm!3%f>Q3#}%#F)O&)_-_iO54};%h%VEG!eR`Lb(!x zp>Kx9Xbd%g=GieCLk*yLc8tbQ186?FW3y5I`h3{olt+*C4Sza%u-3rzgF-WJ8c5qK zjfn-D&UdOa-Rn(3+vci*qb2v{OJm}}>=|f-`h3+6hH@dZjxn)d&%xbb>zsSWaa$d9 zjEMu&S|*#7`Z~w`LY+EZGPU=atJ=L#r|j#_pIXUAv^HGt;XF&aY+pm}x-HTDJo)sQ)1>3J;x0000 Date: Wed, 10 Jun 2020 21:50:36 -0400 Subject: [PATCH 4/6] now highlights nearby danger sources --- Items/Pets/ChromaticOrb.cs | 2 +- Projectiles/Pets/BendyPet.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Items/Pets/ChromaticOrb.cs b/Items/Pets/ChromaticOrb.cs index 77e3f8f339..759d0c59a1 100644 --- a/Items/Pets/ChromaticOrb.cs +++ b/Items/Pets/ChromaticOrb.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Pets { DisplayName.SetDefault("Chromatic Orb"); Tooltip.SetDefault("It glows warmly in your hand\n" + - "Summons an ancient dragon light pet\n" + + "Summons an ancient dragon light pet that highlights nearby danger sources\n" + "Provides a small amount of light in the abyss"); } diff --git a/Projectiles/Pets/BendyPet.cs b/Projectiles/Pets/BendyPet.cs index c0b34b58ed..0a17c6483f 100644 --- a/Projectiles/Pets/BendyPet.cs +++ b/Projectiles/Pets/BendyPet.cs @@ -65,10 +65,13 @@ namespace CalamityMod.Projectiles.Pets projectile.frame = 0; } + //Highlight nearby danger sources + player.dangerSense = true; + //Generate less light if returning to the player if (projectile.localAI[0] == 0f) { - Lighting.AddLight(projectile.Center, 0.6494f, 0.2023f, 1.0635f); //138, 43, 226 + Lighting.AddLight(projectile.Center, 0.8118f, 0.2529f, 1.3294f); //138, 43, 226 } else { From c11b27739c13d716eae649a170c1f336601becfb Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 10 Jun 2020 21:51:36 -0400 Subject: [PATCH 5/6] also highlights enemies --- Items/Pets/ChromaticOrb.cs | 2 +- Projectiles/Pets/BendyPet.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Pets/ChromaticOrb.cs b/Items/Pets/ChromaticOrb.cs index 759d0c59a1..2880f8a9a3 100644 --- a/Items/Pets/ChromaticOrb.cs +++ b/Items/Pets/ChromaticOrb.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Pets { DisplayName.SetDefault("Chromatic Orb"); Tooltip.SetDefault("It glows warmly in your hand\n" + - "Summons an ancient dragon light pet that highlights nearby danger sources\n" + + "Summons an ancient dragon light pet that highlights nearby enemies and danger sources\n" + "Provides a small amount of light in the abyss"); } diff --git a/Projectiles/Pets/BendyPet.cs b/Projectiles/Pets/BendyPet.cs index 0a17c6483f..62b0184678 100644 --- a/Projectiles/Pets/BendyPet.cs +++ b/Projectiles/Pets/BendyPet.cs @@ -67,6 +67,7 @@ namespace CalamityMod.Projectiles.Pets //Highlight nearby danger sources player.dangerSense = true; + player.detectCreature = true; //Generate less light if returning to the player if (projectile.localAI[0] == 0f) From 15861a02313617e988beb233a827196b092eb9cf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 10 Jun 2020 21:55:05 -0400 Subject: [PATCH 6/6] added to deus loot pool --- Items/TreasureBags/AstrumDeusBag.cs | 7 +++---- ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Items/TreasureBags/AstrumDeusBag.cs b/Items/TreasureBags/AstrumDeusBag.cs index 67c8777c76..528c3942da 100644 --- a/Items/TreasureBags/AstrumDeusBag.cs +++ b/Items/TreasureBags/AstrumDeusBag.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.Materials; +using CalamityMod.Items.Pets; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Magic; @@ -33,10 +34,7 @@ namespace CalamityMod.Items.TreasureBags item.rare = 9; } - public override bool CanRightClick() - { - return true; - } + public override bool CanRightClick() => true; public override void PostUpdate() => CalamityUtils.ForceItemIntoWorld(item); @@ -58,6 +56,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItemRIV(player, ModContent.ItemType(), ModContent.ItemType(), 1f, DropHelper.RareVariantDropRateFloat); + DropHelper.DropItemChance(player, ModContent.ItemType(), 5); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 23b6437d50..ee867273d1 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -397,7 +397,7 @@ namespace CalamityMod List segments = new List() { NPCType(), NPCType(), NPCType() }; int summon = ItemType(); List loot = new List() { ItemType(), ItemType(), ItemID.FallenStar, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Defeat 3 empowered astral titans or use a [i:{summon}] at Night"; string despawn = CalamityUtils.ColorMessage("The infected deity retreats to the heavens.", new Color(0xFF, 0xD7, 0x00)); string bossLogTex = "CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist"; diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 027f0b42a3..335c13e2e7 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Pets; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Melee; @@ -233,6 +234,7 @@ namespace CalamityMod.NPCs.AstrumDeus // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 5); // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7);