From 18758d8a2b5ee48fda459eb6fdb5c3b5ef89131c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 13 Feb 2020 23:50:37 -0500 Subject: [PATCH] Dance of Light rework started --- Items/CalamityGlobalItem.cs | 2 + Items/Weapons/Magic/Judgement.cs | 101 ---------------------- Items/Weapons/Magic/Judgement.png | Bin 570 -> 0 bytes Items/Weapons/Magic/TheDanceofLight.cs | 83 ++++++++++++++++++ Items/Weapons/Magic/TheDanceofLight.png | Bin 0 -> 876 bytes ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 +- Projectiles/Magic/WhiteFlame.cs | 65 -------------- Projectiles/Magic/WhiteFlame.png | Bin 139 -> 0 bytes Projectiles/Magic/WhiteFlame2.cs | 51 ----------- Projectiles/Magic/WhiteFlame2.png | Bin 136 -> 0 bytes 11 files changed, 87 insertions(+), 219 deletions(-) delete mode 100644 Items/Weapons/Magic/Judgement.cs delete mode 100644 Items/Weapons/Magic/Judgement.png create mode 100644 Items/Weapons/Magic/TheDanceofLight.cs create mode 100644 Items/Weapons/Magic/TheDanceofLight.png delete mode 100644 Projectiles/Magic/WhiteFlame.cs delete mode 100644 Projectiles/Magic/WhiteFlame.png delete mode 100644 Projectiles/Magic/WhiteFlame2.cs delete mode 100644 Projectiles/Magic/WhiteFlame2.png diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 8aef4084d0..466d115280 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -846,6 +846,8 @@ namespace CalamityMod.Items tt2.overrideColor = new Color(Main.DiscoR, 100, 255); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(0, 0, 255); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(1f, 0.5f + 0.35f * Main.DiscoG / 255f, 1f); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); if (item.type == ModContent.ItemType()) diff --git a/Items/Weapons/Magic/Judgement.cs b/Items/Weapons/Magic/Judgement.cs deleted file mode 100644 index 98db41677a..0000000000 --- a/Items/Weapons/Magic/Judgement.cs +++ /dev/null @@ -1,101 +0,0 @@ -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Magic; -using CalamityMod.Tiles.Furniture.CraftingStations; -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Magic -{ - public class Judgement : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("The Dance of Light"); - Tooltip.SetDefault("Casts a swarm of white flames from the sky"); - } - - public override void SetDefaults() - { - item.damage = 700; - item.magic = true; - item.mana = 9; - item.width = 28; - item.height = 30; - item.useTime = 10; - item.useAnimation = 10; - item.useStyle = 5; - item.noMelee = true; - item.knockBack = 4f; - item.value = Item.buyPrice(5, 0, 0, 0); - item.rare = 10; - item.UseSound = SoundID.Item88; - item.autoReuse = true; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 30f; - item.Calamity().customRarity = CalamityRarity.Developer; - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.LunarFlareBook); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddTile(ModContent.TileType()); - recipe.SetResult(this); - recipe.AddRecipe(); - } - - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - float num72 = item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; - } - else - { - num80 = num72 / num80; - } - - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) - { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) - { - num79 *= -1f; - } - if (num79 < 20f) - { - num79 = 20f; - } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-20, 21) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-20, 21) * 0.02f; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); - } - return false; - } - } -} diff --git a/Items/Weapons/Magic/Judgement.png b/Items/Weapons/Magic/Judgement.png deleted file mode 100644 index e0678d8cc033d64b3560c358dc995365e635c1b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)itL7!Y?Qf=AJpXnUNTyh*E@X5Zx?)WKewg z^3i=TUxtGfOv6F~mrrr}kZu;jEYeaE1-tm#z1Lv+$&cS)+9x^^OxG7dXrI7*Fpcih z?rGs*@yMhlD5)32hjgW0;b_U zq??5>i=uNXz%E!ir2|ZBOR9irSgOoz$OiLI>^%#nVLpZNPai%37H56+1Wd0#x)w}V z$7X=(UDuvLd^lhhs_8p`U2yB-0Wb|KGhwL`EQrNturd^u57B+rx_AaypQ*7Qst@UI zA*QwHmm?ZxA^1xhhQbJ zk_bJOw#@4x%4hI6954%swHTJTU_Q$Y3tz-kFn zeTET-C~2O7fdSp8G`A4lr|1qMHqOxX5sYZ`z68twaxDY^S?QWu^$n=300000NkvXX Iu0mjf0LzW~<^TWy diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs new file mode 100644 index 0000000000..16dac68191 --- /dev/null +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -0,0 +1,83 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Magic +{ + public class TheDanceofLight : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Dance of Light"); + Tooltip.SetDefault("'Show them the wrath of a Lightbearer'"); + } + + public override void SetDefaults() + { + item.width = 40; + item.height = 42; + item.damage = 500; + item.knockBack = 4f; + item.magic = true; + item.mana = 4; + + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTime = 4; + item.useAnimation = 4; + item.UseSound = SoundID.Item105; + item.autoReuse = true; + item.noMelee = true; + + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 14f; + + item.value = Item.buyPrice(platinum: 5); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; + } + + public override Vector2? HoldoutOffset() + { + return Vector2.Zero; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float intendedSpeed = (float)Math.Sqrt(speedX * speedX + speedY * speedY); + Vector2 target = Main.MouseWorld; + float minOffsetX = -40f; + float maxOffsetX = 40f; + if (target.X > player.Center.X) + minOffsetX = -120f; + else + maxOffsetX = 120f; + + int numProjectiles = 3; + for (int i = 0; i < numProjectiles; ++i) + { + float speed = Main.rand.NextFloat(0.94f, 1.02f) * intendedSpeed; + Vector2 deviation = new Vector2(Main.rand.NextFloat(minOffsetX, maxOffsetX), Main.rand.NextFloat(-1400f, -1200f)); + Vector2 startPos = target + deviation; + Vector2 vel = Vector2.Normalize(-deviation) * speed; + Projectile.NewProjectileDirect(startPos, vel, type, damage, knockBack, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.LunarFlareBook); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Magic/TheDanceofLight.png b/Items/Weapons/Magic/TheDanceofLight.png new file mode 100644 index 0000000000000000000000000000000000000000..d7fc87853d56fe0fcab58c5a7a2884dd8ccff6a4 GIT binary patch literal 876 zcmV-y1C#uTP)=7J*em}|AF&4*SS~CId?YSe8+R|{eQptpYI&6(=kb( zDtGmte~$`8DxFpyX=$>R8_T)c3p`g50>NXo#VMh%fb3QIsEzX`jbO$E*7+kK!%r;n zOZjz!cZ&ca*cHV*Z$X{{g~Gj_TwGUovJH`59XCO31xjH@YuqSy{qiD(sAr=OL~^z- zLL@;F-STw`#)FS~74Pw97&AfJ2n@BKQatBttVZ6jw-WLG`HP5cvwkCz*qn7k$eUly zR>&$hb2uF1Ca9f2Z^>hLED;Z&SV>Ig;qKFz_o*Wrk>r@?xLu<{vP>{z0=LbrP*&fa z{@Rq{4=ioQyq;;-6@m{N+L0Hma3OYe_aHX5Y*1`Pa`dG1+~BQu7#e#18ZjwCTY)4p zI1qzkNlx}P*Z19+M}nn0_8~7h>_L3?CaORoStF80{f{?s+D72zw`D0kM}j2P+HzGP zbi4C`l853Skkd;`w$4LNlCc*NX*=YdiEzs2CkbjV@Mr!4RKn8-%OpYeH@RBry{wmg zxP*PK-amkx1pC786>?nVB$}3>wgOoe8!&UZQ*fLFH~ThWs6T5aV%f^ii0pGurhie0 zac}0}k8i_m*N9wl728Ijk>@12K+_QnvERk-eN;%%a~vG2_eK!3jleaF3t^63<@=$T ztBvGXNL6_~zS4`5lT5~6&n%MR-p9C)EUEDC3h4_&d7^5nyz3f2?k3KnIdPnis?b^1+rr95NmT!K(qhm zSwy*`u%Mcq$7O9wo^I!m7mqmNkf62#-!$o|NATtp-nx^@YF;{P00J(rfC zZ3If8B*XqCDq5Ctw2dq?g%_Va~{2Fb+sCiH2r2lu5S4fDB}W+ zJV}BRP0ny9NoQK=N$mtmlFTQ{bEf;CS(5)-;9t&;sK++v+A#nC002ovPDHLkV1fWs Cb(N3+ literal 0 HcmV?d00001 diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 5ea4671edb..9e64f16e48 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -534,7 +534,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("SupremeCalamitas", 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(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}]"; string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 069587dbf2..8470366d9b 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2165,7 +2165,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), // Staff of Blushie ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), ModContent.ItemType(), // The Dance of Light + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), // Voidragon ModContent.ItemType(), ModContent.ItemType(), diff --git a/Projectiles/Magic/WhiteFlame.cs b/Projectiles/Magic/WhiteFlame.cs deleted file mode 100644 index a47b226707..0000000000 --- a/Projectiles/Magic/WhiteFlame.cs +++ /dev/null @@ -1,65 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class WhiteFlame : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Flame"); - } - - public override void SetDefaults() - { - projectile.width = 12; - projectile.height = 12; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.penetrate = 1; - projectile.timeLeft = 120; - projectile.magic = true; - projectile.extraUpdates = 3; - } - - public override void AI() - { - if (projectile.timeLeft % 6f == 0f) - { - for (int num457 = 0; num457 < Main.rand.Next(3,6); num457++) - { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 91, 0f, 0f, 100, default, 1f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } - } - } - - public override void Kill(int timeLeft) - { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 122); - int num251 = 4; - if (projectile.owner == Main.myPlayer) - { - for (int num252 = 0; num252 < num251; num252++) - { - Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - while (value15.X == 0f && value15.Y == 0f) - { - value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - } - value15.Normalize(); - value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType(), projectile.damage, 0f, projectile.owner, 0f, 0f); - } - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 360); - } - } -} diff --git a/Projectiles/Magic/WhiteFlame.png b/Projectiles/Magic/WhiteFlame.png deleted file mode 100644 index 04c5646fded8c39b9fa4fb2cb4826b55a2aacdbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!{JxM1({$v_d#0*}aI z1_r((Aj~*bn@<`j$X?><>&pIsosmIag3oHse4vnor;B5V#`)ww|Nq-FYc_N?x)`iV cT#~`S@HK*2wD-*0YM>ehPgg&ebxsLQ0I1_7Bme*a diff --git a/Projectiles/Magic/WhiteFlame2.cs b/Projectiles/Magic/WhiteFlame2.cs deleted file mode 100644 index 7e58c62ae1..0000000000 --- a/Projectiles/Magic/WhiteFlame2.cs +++ /dev/null @@ -1,51 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class WhiteFlame2 : ModProjectile - { - float homeTimer = 100; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Flame"); - } - - public override void SetDefaults() - { - projectile.width = 6; - projectile.height = 6; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.tileCollide = false; - projectile.penetrate = 3; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 1; - projectile.timeLeft = 120; - projectile.magic = true; - } - - public override void AI() - { - if (projectile.timeLeft % 2f == 0f) - { - for (int num457 = 0; num457 < Main.rand.Next(3,6); num457++) - { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 91, 0f, 0f, 100, default, 0.5f); - Main.dust[num458].noGravity = true; - } - } - - homeTimer += 5f; - CalamityGlobalProjectile.HomeInOnNPC(projectile, false, homeTimer, 25f, 20f); - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 360); - } - } -} diff --git a/Projectiles/Magic/WhiteFlame2.png b/Projectiles/Magic/WhiteFlame2.png deleted file mode 100644 index a3192f94614dc2f6790aa57e1c0aa31cc0d6ee18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^Y#_`5A|IT2?*ZZ@dAqwX{0G4WdzViJif|TqL>4nJ z@ErkR#;MwT(m+A>5>H=O_6KY%{Dx*XIN1&Zg+x7F978y+C;$2X-=5j*z>x;#3(iao Y`*N8%pC){&2P$CjboFyt=akR{0HAOs6#xJL