From b1d4857379a7dd4062a32866bedc050a0fdf7fff Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 09:57:02 -0400 Subject: [PATCH 01/20] Galactic Singularity anim is no longer on crack --- Items/Materials/GalacticaSingularity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Materials/GalacticaSingularity.cs b/Items/Materials/GalacticaSingularity.cs index 705513e4c4..0e1647f5fb 100644 --- a/Items/Materials/GalacticaSingularity.cs +++ b/Items/Materials/GalacticaSingularity.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Materials { DisplayName.SetDefault("Galactica Singularity"); Tooltip.SetDefault("A shard of the cosmos"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 24)); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 24)); } public override void SetDefaults() From 80694d58dafb69cc5f1372fff53efcfbb0e1fad4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 10:23:41 -0400 Subject: [PATCH 02/20] aerodynamics --- Items/Weapons/Typeless/AeroDynamite.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Typeless/AeroDynamite.cs b/Items/Weapons/Typeless/AeroDynamite.cs index 96353fef66..2ad3769592 100644 --- a/Items/Weapons/Typeless/AeroDynamite.cs +++ b/Items/Weapons/Typeless/AeroDynamite.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Items.Weapons.Typeless public override void SetStaticDefaults() { DisplayName.SetDefault("Aero Dynamite"); - Tooltip.SetDefault("Throws a floaty explosive that defies gravity"); + Tooltip.SetDefault("You don't need an aerodynamics major to use this\n" + + "Throws a floaty explosive that defies gravity"); } public override void SetDefaults() From 28008d116aaccec32be39d2b0595d911b8fd3c08 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 13:55:47 -0400 Subject: [PATCH 03/20] 1. NPCs straight up can't open lab doors anymore 2. Lab doors can now be wired --- CalamityMod.cs | 34 +++++++++++++++++-- .../AgedLaboratoryDoorClosed.cs | 5 +++ .../AgedLaboratoryDoorOpen.cs | 5 +++ .../DraedonStructures/LaboratoryDoorClosed.cs | 5 +++ Tiles/DraedonStructures/LaboratoryDoorOpen.cs | 5 +++ 5 files changed, 52 insertions(+), 2 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 727c8611cd..5c4fb0d4e4 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -265,8 +265,38 @@ namespace CalamityMod CalamityLocalization.AddLocalizations(); On.Terraria.Player.TileInteractionsUse += Player_TileInteractionsUse; + On.Terraria.WorldGen.OpenDoor += LabDoorsOpen; + On.Terraria.WorldGen.CloseDoor += LabDoorsClose; } + private static bool LabDoorsOpen(On.Terraria.WorldGen.orig_OpenDoor orig, int i, int j, int direction) + { + Tile tile = Main.tile[i, j]; + if (tile.type == ModContent.TileType() || tile.type == ModContent.TileType() || + tile.type == ModContent.TileType() || tile.type == ModContent.TileType()) + { + return false; + } + else + { + return orig(i, j, direction); + } + } + + private static bool LabDoorsClose(On.Terraria.WorldGen.orig_CloseDoor orig, int i, int j, bool forced) + { + Tile tile = Main.tile[i, j]; + if (tile.type == ModContent.TileType() || tile.type == ModContent.TileType() || + tile.type == ModContent.TileType() || tile.type == ModContent.TileType()) + { + return false; + } + else + { + return orig(i, j, forced); + } + } + private static void Player_TileInteractionsUse(On.Terraria.Player.orig_TileInteractionsUse orig, Player player, int i, int j) { Tile tile = Main.tile[i, j]; @@ -292,9 +322,9 @@ namespace CalamityMod } } - private static void DoorSwap(int type1, int type2, int i, int j) + public static void DoorSwap(int type1, int type2, int i, int j, bool forced = false) { - if (PlayerInput.Triggers.JustPressed.MouseRight) + if (PlayerInput.Triggers.JustPressed.MouseRight || forced) { ushort type = (ushort)type1; short frameY = 0; diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs index 88c6d4d7fe..d84713a383 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs @@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures num = fail ? 1 : 3; } + public override void HitWire(int i, int j) + { + CalamityMod.DoorSwap(ModContent.TileType(), ModContent.TileType(), i, j, true); + } + public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType()); diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs index ed8985c7e6..1e07787d23 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs @@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures num = fail ? 1 : 3; } + public override void HitWire(int i, int j) + { + CalamityMod.DoorSwap(ModContent.TileType(), ModContent.TileType(), i, j, true); + } + public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType()); diff --git a/Tiles/DraedonStructures/LaboratoryDoorClosed.cs b/Tiles/DraedonStructures/LaboratoryDoorClosed.cs index 170cac3fe9..f7e5a431f3 100644 --- a/Tiles/DraedonStructures/LaboratoryDoorClosed.cs +++ b/Tiles/DraedonStructures/LaboratoryDoorClosed.cs @@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures num = fail ? 1 : 3; } + public override void HitWire(int i, int j) + { + CalamityMod.DoorSwap(ModContent.TileType(), ModContent.TileType(), i, j, true); + } + public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType()); diff --git a/Tiles/DraedonStructures/LaboratoryDoorOpen.cs b/Tiles/DraedonStructures/LaboratoryDoorOpen.cs index cffc7aa927..87c11cf966 100644 --- a/Tiles/DraedonStructures/LaboratoryDoorOpen.cs +++ b/Tiles/DraedonStructures/LaboratoryDoorOpen.cs @@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures num = fail ? 1 : 3; } + public override void HitWire(int i, int j) + { + CalamityMod.DoorSwap(ModContent.TileType(), ModContent.TileType(), i, j, true); + } + public override void KillMultiTile(int i, int j, int frameX, int frameY) { Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType()); From becd9af2476aae64542e3558dae53c7cb24da3a6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 13:56:46 -0400 Subject: [PATCH 04/20] fuel factories now sell for nothing --- Items/Placeables/DraedonsFuelFactoryItem.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/Placeables/DraedonsFuelFactoryItem.cs b/Items/Placeables/DraedonsFuelFactoryItem.cs index a167ceacaf..898462b134 100644 --- a/Items/Placeables/DraedonsFuelFactoryItem.cs +++ b/Items/Placeables/DraedonsFuelFactoryItem.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.Placeables item.rare = ItemRarityID.Red; item.Calamity().customRarity = CalamityRarity.DraedonRust; - item.value = Item.buyPrice(gold: 50); } } } From f42818f2bbff4ce1e81ee7753cc0b617e9d701ba Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 14:09:05 -0400 Subject: [PATCH 05/20] removed an unused line --- Items/Placeables/FurniturePlaguedPlate/PlaguedPlate.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/Placeables/FurniturePlaguedPlate/PlaguedPlate.cs b/Items/Placeables/FurniturePlaguedPlate/PlaguedPlate.cs index 817c688806..7067ed9f50 100644 --- a/Items/Placeables/FurniturePlaguedPlate/PlaguedPlate.cs +++ b/Items/Placeables/FurniturePlaguedPlate/PlaguedPlate.cs @@ -30,8 +30,7 @@ namespace CalamityMod.Items.Placeables.FurniturePlaguedPlate { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.StoneBlock, 10); - recipe.anyIronBar = true; - recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType()); recipe.SetResult(this, 10); recipe.AddTile(ModContent.TileType()); recipe.AddRecipe(); From 0422a5e5e14e1f8a99ce7e6fc7a95be032a41017 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 22 Aug 2020 13:15:22 -0500 Subject: [PATCH 06/20] Fixed Levi MP issues --- NPCs/Leviathan/Leviathan.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 70135af900..34ebf44c1d 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -744,6 +744,10 @@ namespace CalamityMod.NPCs.Leviathan public override void FindFrame(int frameHeight) { + // Don't run texture related code on the server since textures do not exist there. + if (Main.netMode == NetmodeID.Server) + return; + Texture2D texture = Main.npcTexture[npc.type]; if (npc.ai[0] == 1f || npc.Calamity().newAI[3] < 180f) { From 229d7f5b3e0b29535d6f8ed66a02f9d3605ff5e1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 14:17:42 -0400 Subject: [PATCH 07/20] fixed hydraulic volt crasher targetting passives --- Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index e805248d22..c03e821002 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.npc.Length; i++) { if (i != target.whoAmI && - target.CanBeChasedBy(projectile, false) && + Main.npc[i].CanBeChasedBy(projectile, false) && Main.npc[i].Distance(target.Center) < 240f) { if (TryToSuperchargeNPC(Main.npc[i])) From cb00df66791dac223c22018646e4a7e878d9149a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 14:26:18 -0400 Subject: [PATCH 08/20] aeries, pearl god, and alch flask resprites --- Items/Accessories/AlchemicalFlask.png | Bin 416 -> 456 bytes Items/Weapons/Ranged/Aeries.cs | 4 ++-- Items/Weapons/Ranged/Aeries.png | Bin 675 -> 792 bytes Items/Weapons/Ranged/PearlGod.cs | 4 ++-- Items/Weapons/Ranged/PearlGod.png | Bin 599 -> 877 bytes 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/AlchemicalFlask.png b/Items/Accessories/AlchemicalFlask.png index 5842c55cd909ec775991ad33ea27804b99f5dd07..5cb7345f9b1b0dda96e971f37de9c7d700a42b34 100644 GIT binary patch delta 431 zcmV;g0Z{&+1IPoABYy#pNkl}b#e)+6U zMEb)+uil!z;h60)HcZj~*NL<12~3g9Q&3w0sWkqccAJKg39%LDHlL0o{4}3 z=K%~&S^B3+?41Kvi@xX1QBP6Cpw*Wbai>~lY9!4&XjY!(%IPpjC){(&vSadu3ejZ> z)T>766hatxFt|;52c`C;6I}`8{Bax2cBMEN%f3Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf z5&!@T5&_cPe*6Fc00(qQO+^Rb3=s(tCE&@R0RR918FWQhbW?9;ba!ELWdLwtX>N2b zZe?^JG%heMF*(%MvSa`N0R2fsK~zXf&5f1(Z{aysGURD?lVBvS`r#Fu&HNW8PVv;0jvl|(R9VE=MPgatx~__t zu2%vgiq36cxCMdGs#Jw|{B=GqpwMJ{*bAH~RN+QI^g98Atb#)G%zG3gD*WZv1l?e! zvgq^&0)nA87Jm={KR>QZC#yW7w1A@UGS^s~CISU{s{_O-ku`x?d{sw{JP|9Skmv9} z0zd%Fv6^SGk*^6DG)0`f-BN=&R`ghj8S8>ZZ=@m^LPx%(n&-?R9J=On88aFQ5?rV6CU(XxrRg#WxGoT1&XPO8XY?2CAvhN1*s?_EB^>f zBa;$A0tu2X(ZyS*R76WCq}te(u0gr#B`at<%zoW{Z)e60G-Ky;*?qrxZ)Wy=_V?az z#vw~>yiQ*;cu-&8=m32EvgFxsXJv&0@ZtS}8*rQq!2W$vuhVS>4#3M-&yC=Ye|7ck zqAbsxLEpe#qdj=%p{LpI+gAYSy>T<}c;0!8xY`|OJB)tu!!?07p8WI~fQc6qf&EI} zpi>*K^PG8Mn;d`o41fz4&l_>gs2CX@0-)>C)xfygqM@m|s2iW3n+2e{danbpy0QYm zkDqHszwj8eXZrP`AKP~UFuLHHYddDPJ0Cp&pzmHkkoyPdv-^4v0F%>`0JOKZ z136RnKc-mhaiwoCk$h`LGV9`G)?H<@IVFx{4S}0;OsRXs7_D5eb6QN#%m9VCr??+> z?)p*s2JJv1^$vih`cnYZL=QOtBf~=($jx*^^9f^|Dhsmi%F8PNSX=uZn9KI~yz>MS zjl~>*#Z)S=U&$ME{0^Kxc}`z5kgN8!&uHIK<)WF7M5-Ksbb84!E{ZVZdrw{ztRWU9 zZ?GT-Wv*&Z6#z@$+$VUMQzhbu%-J=kM}-n-Y9lkn5*~vx7q5*0kW8eE+*5_1+_RtK z{GR&`9ISBw=I3TTSJTZh)gF>t2 z;Qaw3t{l{UmQJs~Cp8So+*aqQj6L7-e&mCyqWiT-|zc9 zgTK_3u0Gr8{_E_F!6B-FfXMf(MbDTDf$p9@04&P{Af3JoK+DOtL-_$A9~dHy)z-SM z($_C#65YLyBt$1#jsuYFzvlR!%ZY^NIB#+}rB1FhFQ)-0Eae04k!a+c4KOizUn#gf zG77-h*d1l&E7$kN0Z84r1;FyV@=RUmjC&3&b-MKD^g1E&X?@kGkJJ(}BANL@VGV%A z#aRGiXFJO2bgEUkZ(WS5YuGNouB-6}0N0zp191NIF94489#h88Ki&c0`L`wjvOkaR zeX07Xl8S*#EkjQ&J(WtE8vqnPya!-n>Ve`NH!?!PieK{dKsC8}Nwihk4wy%TM9ef5 z0;1x_6?N_B-+Gd%tYIOvFr%beq`mcz_7k`I@z6Z_Urm z*Gcy)q{JI;a@%REkq*xzwGxpO)4SL8&l`>&aU-Fpn53Ux9};mpkLVH-(*Nt8_-)1= zdo$^hr9%)Rp-23l5XBp^gNiqvJ$<6Daog*psMm$5<+s<$yn5kyHuk$;98@aRpGSs< zM*w*Aa8fA{kGS<#|B68U>?1L2@!ogx4L002ov JPDHLkV1o6sIRyX! diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index 516e4fc598..e4256e99c8 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged { item.damage = 40; item.ranged = true; - item.width = 50; - item.height = 32; + item.width = 54; + item.height = 38; item.useTime = 12; item.useAnimation = 12; item.useStyle = ItemUseStyleID.HoldingOut; diff --git a/Items/Weapons/Ranged/PearlGod.png b/Items/Weapons/Ranged/PearlGod.png index c6d7466c3a1233d7d907bec3a001557dde44be3f..1dd55905356b4e1d617c64da3290a2fd8a84c386 100644 GIT binary patch literal 877 zcmV-z1CsoSP)Px&CrLy>RA_qpUs_f=iD=A z=Ew8AuSZ25wZ__Q?^hl;2tc5!8i0z5$_=-5$|{rsn46oiegAXvW4^5vrG1{R_8+ON zh`Ab(pTB+pP#db#CiPtD0bt_kgf<=<9d;tBir7QJ+9M`9)o})Z_itVUxrF-qdTqyJ zqr(6Mx*h?LOASk+u4nwid)oV6^^m?L=9r46XG~ol_yRyS zVa;<&Lm?#OZXl3E6?StDqW}BY!caoWkLMmKWrvO%# zmw~;L;DS{a2nGSjW-`DQA?Xa>VtGouRUe5e*dk?mN;(bE^rxgYZftB)0Q2)!x_V7Y zuDAasb`)8dM)1)%jp%xW72U*r?LKfU7NR- z&dAGx>dDYE(I@~%!a;34-xB)^oGuKz-?)JJ00000NkvXXu0mjf DrHGWT literal 599 zcmV-d0;v6oP)4e-7>1vbOYTk(i3UU=;wqReL`{=lpdv(w_OS?7DX#K&SXtXy*cnAZ5}Ooh62gfn zo<%(HiZqcRf#_Wh&f(O8K*6=K&}^xR)CL_{nnsise%Pyt!ilc=^%v zuuVTfIgps!x!jNeXf}5N7>nCyW`6k-0ORqc#Dx`CqXIyA^$Y+@g(?8up1mvv-T~90 zLMXeU;{O)mIB;TQ1c2?Wtro!j(wr6exv~zx%HjgB@05^Z zLT5lcoS9DCz?G{LsT=(8zHE&jJ$+&ABOC{Y^LYRo^}1D!e7Wu_EC<|qw@S%L-*aD_ zi@q0*1N^Q+Qd~;<6!atod^nA_E~iAbd`UxAU)4KOiSu zXN7NF;Z{GuvTpDl7>}<32dj^89dQ-ywez}tBn#JpYBi85l#}wl+!t=AmGZ;+ya8y` z>+afe)XG_P{FTLpo^Ez7gYSSlapUfkHC7c!$n`@hubhq8bG9#6v+x`cDfL~-`Eoc> zdEfX?3C{uLysD7u@5$4n2H^X*O@*fBaKDxI5sm}Cj;fB?QMav5c+`aBfRxU+1jj002ovPDHLkV1jIB9wPt% From 0090d4f3e027333d88df8b4a3f0be9d015638bba Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 15:10:19 -0400 Subject: [PATCH 09/20] updated yellow candle tooltip --- Items/Placeables/Furniture/YellowCandle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/YellowCandle.cs b/Items/Placeables/Furniture/YellowCandle.cs index 476942ce18..7d297b3a1d 100644 --- a/Items/Placeables/Furniture/YellowCandle.cs +++ b/Items/Placeables/Furniture/YellowCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables.Furniture { DisplayName.SetDefault("Spiteful Candle"); Tooltip.SetDefault("When placed, nearby enemies take 5% more damage.\n" + - "This extra damage bypasses enemy damage reduction\n" + + "This extra damage bypasses enemy damage reduction and defense\n" + "'Its hateful glow flickers with ire'"); } From 242b0dee2c5c3a8b2ae58d98c6fa81db74b39fea Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 15:38:01 -0400 Subject: [PATCH 10/20] fixed cosmilite chest graphical issues --- Tiles/FurnitureCosmilite/CosmiliteChest.png | Bin 1164 -> 1164 bytes .../CosmiliteChest_Highlight.png | Bin 516 -> 510 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Tiles/FurnitureCosmilite/CosmiliteChest.png b/Tiles/FurnitureCosmilite/CosmiliteChest.png index 2b1bba6e4e2ad8ce65352110b5443ae10e7e15fc..549491a7cd0deb0e682383b655061683465809eb 100644 GIT binary patch delta 1124 zcmV-q1e^Pe35*GlB!5#$L_t(|UhP_INEJa8_QECn;g5c6@JAbV@dtHBv`cU~*K;Z8? zfW(M@=dGY14o;6Y1-l?7k%GG3SZiW%=lv#X*RSY;sXZ8#F(ze*4IluKF@ngzK;yba z6ja)>6P7u)X-^8>A~GgpDu5w2fB+;aG=U=eHF^M9L?|*7@wkO9J-W1!f|{LBV95~r z!TqgMB2Bp^GJn;@5L-a~C(NJ-d~e>9{gFG(G$FtY{7>snQBW!I>xrTM?r_Tq)b4Ae z>+Z3m$hN<{M^?#@)RP9AS=mb+P zc7QAg+`)^s_p)GN>>9Gvd0F(#y4$bFJ~^_Q?Bs1{$$!Sr8E@%#&74F*b>4kWIizYY z`m1i1nPwYbK#LC;jFj)KAiHEpD%mSvt1M?3{2R)a5<@4mE)zql_V8!!%b{e=Hhi?I_Z zS88^E@_#*>33;LSxG6%Mz+e0MBV8&f%Ap*}$t$58N*p%A*8S*T$q+k0N$J@XVNGQz zStNUN%{My7x&h#8wx$z9XO319Lx>#fT2#_tx(~BS>|eUyW=$FQ1jdG zrgomg#-4?vlkfrhR8A9n9YyMXU9RR^NK*8p`FNN=_0_fFkgk@mD-&5(*Y&CvhD zkhpTI)KgjH-R;M=3hNjkQS^jjCR4mr%s>EBX^R1SnYhV97Iq8}m=PlaP`kkXwx59A zo-H7#tfHz4-C3r>LS+qm_tTVK|4fAqIv{qUCp$o@y(QRwe}20?hD@ulewkS+3$qbD zMX|wgSyR)0I?H2*#TlFda?tgRak$yPuEMnR$={AC}m+bq9=xo4Ir(;3h%_y zzo&xz?ksyAzjtab%t+M_rvd6AQ;mRTNHe5jK;@T~p5n%y%E97;?dsKh0m;E|OvqR(o7fLOmfo7W&wH)T^PZ>YZ0tSv z^qfEU&bgoSyw`m__w#YC-L4R3mx~#m5DiE*BDNVC7dN-ls(-WB^|z=Gm0tw}{=Nf9 zjQDrn3JT)j^k`GC3t|!}sOycjCI)xjZ=!bniY}PigHah{Qij+70uUJ^hztxgu3JPw zr7b&QnPZ#wq|hrOV=|@!7-9nmK%znuD577Z2arXCA~O+>Tj*(D)bG_@#s~z= zGB$vateF18BaM}`wY7t+XZb=?K9}Dy#vFcerH+UQC4c5DBPVfrFJ7ZR;s4ZP>;%e{ znjN5g&wpk@Ug$k;iV!#O*M9y;k4lPiD2HBP{Pqm{%EBFDNGl{A>%!)y}!S2Dy75Ry7PCf1TEM2dE$6~~C7 z?2IkM5M~dU6`5&kY@mL-JgkWsN}B0VaYzuz?bWM8fYH+ECIigPba zxrdj<-;=J?pxALh(Ib-yL$W81Y;3IYb%4ve-Pq%BMU5Fme-K6z zT)9>1sVwsD_G4RxbqtUwdO|UiDPAgOAb_c~#els`++-mOI|c~Mh!Fv(U0{FPPrz=^ z77$ccQB{TREK^~jvWC6;X-cnurosjt5IfP6Eg-Ei`bE@#0MS#m`v%+3?>r=a+iMk8 zl!e7jm7VCx4iG!hlN}&-q9;2*T7~tO`*a=hwF>K}LMaQg5j`?UAeC#{r>#S{SM+YGFm48Wo>ng%v77MR|E(@dF|cB5HHTGrCt+$2bm%t>}qlbi6oM zwNM4y&u?=@4r!fQrc-Mb)?e%^EzZ>{tiO2IcG)01(UTn@cA_UcKw5>>Dr`@SbJ>WV qT7|VMda^6d4fff&}0BU*!+>za^9smFU07*p$PDHLkV1fWgqZP#f diff --git a/Tiles/FurnitureCosmilite/CosmiliteChest_Highlight.png b/Tiles/FurnitureCosmilite/CosmiliteChest_Highlight.png index 6c696cc468ba95a94a95ebdc1af8efb88caf1f40..e1065e4438a8c08e85e3b869aad2ce38a74df4ed 100644 GIT binary patch delta 484 zcmVe%%)K`3w$X0qir{)O>sfi+?YMzInE5TbL zM3C~=6-3IZay1^k?YxODoa`9N7Yd?3u8P;YQ?IH#`yLY_QYQ3&2#qo!)I9sTu4eMDggzUn0gzUmngM9ej>K|r5UvKJ|U9pTF?lVTo|Pv&?fD&1EJ;g!;+VF05VHpc4)|T&dG$;}%4u_95g>O`Y0=h>%@ayRg&| aA^r!SM(~jx_pwd@0000>^qBl}j=s1q!FR(GjF9xj>k#l_?Lb2jgiE5?iJ{2cbNCnD>syH`7C%{uh zNI}ByONf|Lg5t>!;EPtHxT{i21gmb;JRnANV zqTQHKRII;3v2S_nEcq@|zph(P?c08v+umQpOoB3Av-lWwG|?ToWcf$oWhbp-g0mC53Be0>#0{) ztm0cCQp^hNuh6QzsEV7Wu-BXv<|dLnTbBt@uB;Ly0%MPRY65<$$YVm;fEN{0iSI*5 zt?cQct}5Lxg`HLLES!FKnddT^%d8M76em}wuufqU$DDS#&T?cEA|>}x$WBd8ZG}i7 gr?5_8$q`}w2f$SDk&`718~^|S07*qoM6N<$g7q8nng9R* From d18fd75b069623960cde9f5d031814dd5315e438 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 16:59:36 -0400 Subject: [PATCH 11/20] fixed fuel factories and holograms duplicating I think --- Items/Placeables/DraedonsFuelFactoryItem.cs | 1 + Tiles/DraedonFuelFactory.cs | 2 +- Tiles/DraedonHologram.cs | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Items/Placeables/DraedonsFuelFactoryItem.cs b/Items/Placeables/DraedonsFuelFactoryItem.cs index 898462b134..4d385c8ce4 100644 --- a/Items/Placeables/DraedonsFuelFactoryItem.cs +++ b/Items/Placeables/DraedonsFuelFactoryItem.cs @@ -27,6 +27,7 @@ namespace CalamityMod.Items.Placeables item.rare = ItemRarityID.Red; item.Calamity().customRarity = CalamityRarity.DraedonRust; + item.value = Item.buyPrice(gold: 50); } } } diff --git a/Tiles/DraedonFuelFactory.cs b/Tiles/DraedonFuelFactory.cs index 1556e238eb..5eb7537282 100644 --- a/Tiles/DraedonFuelFactory.cs +++ b/Tiles/DraedonFuelFactory.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles TileObjectData.newTile.Origin = new Point16(0, 3); TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16 }; - TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); + //TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); ModTranslation name = CreateMapEntryName(); diff --git a/Tiles/DraedonHologram.cs b/Tiles/DraedonHologram.cs index 9d68c3c347..2f04a21eee 100644 --- a/Tiles/DraedonHologram.cs +++ b/Tiles/DraedonHologram.cs @@ -3,10 +3,11 @@ using CalamityMod.TileEntities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using Terraria.ObjectData; using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; namespace CalamityMod.Tiles { @@ -31,7 +32,8 @@ namespace CalamityMod.Tiles { TileObjectData.newTile.CoordinateHeights[i] = 16; } - TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 6, 0); + //TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); animationFrameHeight = 112; From 445947e826d57814d5d3a1da610a5e1781b441ce Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 17:10:22 -0400 Subject: [PATCH 12/20] security chests and holo boxes now use draedon rarity --- Items/Placeables/Furniture/AgedSecurityChest.cs | 1 + Items/Placeables/Furniture/HolographicDisplayBox.cs | 1 + Items/Placeables/Furniture/SecurityChest.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/Items/Placeables/Furniture/AgedSecurityChest.cs b/Items/Placeables/Furniture/AgedSecurityChest.cs index ffd6e29272..fd85fd5c97 100644 --- a/Items/Placeables/Furniture/AgedSecurityChest.cs +++ b/Items/Placeables/Furniture/AgedSecurityChest.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Placeables.Furniture item.useAnimation = 15; item.useTime = 14; item.rare = 2; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; item.value = 500; diff --git a/Items/Placeables/Furniture/HolographicDisplayBox.cs b/Items/Placeables/Furniture/HolographicDisplayBox.cs index bc54b6ff89..5e7898cc60 100644 --- a/Items/Placeables/Furniture/HolographicDisplayBox.cs +++ b/Items/Placeables/Furniture/HolographicDisplayBox.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Placeables.Furniture item.consumable = true; item.value = Item.buyPrice(0, 5, 0, 0); item.rare = 3; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.createTile = ModContent.TileType(); } } diff --git a/Items/Placeables/Furniture/SecurityChest.cs b/Items/Placeables/Furniture/SecurityChest.cs index a0ddc56b21..af80f8ea28 100644 --- a/Items/Placeables/Furniture/SecurityChest.cs +++ b/Items/Placeables/Furniture/SecurityChest.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Placeables.Furniture item.useAnimation = 15; item.useTime = 14; item.rare = 3; + item.Calamity().customRarity = CalamityRarity.DraedonRust; item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; item.value = 500; From 1cdd9a267c5ba3a76d263a5358c00742ee60137c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 19:22:54 -0400 Subject: [PATCH 13/20] fixed bleached angling kit having the wrong angler tackle bag drop chance --- Items/TreasureBags/BleachedAnglingKit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/TreasureBags/BleachedAnglingKit.cs b/Items/TreasureBags/BleachedAnglingKit.cs index fba2ff7f95..f8c4b2c3aa 100644 --- a/Items/TreasureBags/BleachedAnglingKit.cs +++ b/Items/TreasureBags/BleachedAnglingKit.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.TreasureBags public override void RightClick(Player player) { - int anglerTackleBagChance = !Main.expertMode ? 15 : 18; + int anglerTackleBagChance = !Main.expertMode ? 18 : 15; int fishingAccChance = !Main.expertMode ? 12 : 10; int fishFindAccChance = !Main.expertMode ? 9 : 8; int anglerArmorChance = !Main.expertMode ? 4 : 2; From 38e849e4de39999a19e48e7c17a63f4a037fd9ec Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 21:27:24 -0400 Subject: [PATCH 14/20] reversed the dupe glitch cuz it caused tile corruption why is Terraria --- Items/Placeables/DraedonsFuelFactoryItem.cs | 2 +- Items/Placeables/Furniture/HolographicDisplayBox.cs | 2 +- Tiles/DraedonFuelFactory.cs | 2 +- Tiles/DraedonHologram.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Placeables/DraedonsFuelFactoryItem.cs b/Items/Placeables/DraedonsFuelFactoryItem.cs index 4d385c8ce4..2a8b73d3a9 100644 --- a/Items/Placeables/DraedonsFuelFactoryItem.cs +++ b/Items/Placeables/DraedonsFuelFactoryItem.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Placeables item.rare = ItemRarityID.Red; item.Calamity().customRarity = CalamityRarity.DraedonRust; - item.value = Item.buyPrice(gold: 50); + //item.value = Item.buyPrice(gold: 5); } } } diff --git a/Items/Placeables/Furniture/HolographicDisplayBox.cs b/Items/Placeables/Furniture/HolographicDisplayBox.cs index 5e7898cc60..a60ff66c4f 100644 --- a/Items/Placeables/Furniture/HolographicDisplayBox.cs +++ b/Items/Placeables/Furniture/HolographicDisplayBox.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Placeables.Furniture item.useTime = 10; item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; - item.value = Item.buyPrice(0, 5, 0, 0); + //item.value = Item.buyPrice(0, 5, 0, 0); item.rare = 3; item.Calamity().customRarity = CalamityRarity.DraedonRust; item.createTile = ModContent.TileType(); diff --git a/Tiles/DraedonFuelFactory.cs b/Tiles/DraedonFuelFactory.cs index 5eb7537282..1556e238eb 100644 --- a/Tiles/DraedonFuelFactory.cs +++ b/Tiles/DraedonFuelFactory.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles TileObjectData.newTile.Origin = new Point16(0, 3); TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16 }; - //TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); ModTranslation name = CreateMapEntryName(); diff --git a/Tiles/DraedonHologram.cs b/Tiles/DraedonHologram.cs index 2f04a21eee..c5264810af 100644 --- a/Tiles/DraedonHologram.cs +++ b/Tiles/DraedonHologram.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles TileObjectData.newTile.CoordinateHeights[i] = 16; } TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 6, 0); - //TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance().Hook_AfterPlacement, -1, 0, true); TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); animationFrameHeight = 112; From d4c4ba671c5d731ee303198d9e2d6ea36b097a6b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 23:10:14 -0400 Subject: [PATCH 15/20] removed unused recipe groups, this causes a minor bug --- Utilities/CalamityRecipes.cs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 7208c959e1..89a2e24768 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -1013,28 +1013,6 @@ namespace CalamityMod }); RecipeGroup.RegisterGroup("SiltGroup", group); - group = new RecipeGroup(() => "Any Phaseblade", new int[] - { - ItemID.WhitePhaseblade, - ItemID.RedPhaseblade, - ItemID.GreenPhaseblade, - ItemID.BluePhaseblade, - ItemID.PurplePhaseblade, - ItemID.YellowPhaseblade - }); - RecipeGroup.RegisterGroup("AnyPhaseblade", group); - - group = new RecipeGroup(() => "Any Phasesaber", new int[] - { - ItemID.WhitePhasesaber, - ItemID.RedPhasesaber, - ItemID.GreenPhasesaber, - ItemID.BluePhasesaber, - ItemID.PurplePhasesaber, - ItemID.YellowPhasesaber - }); - RecipeGroup.RegisterGroup("AnyPhasesaber", group); - group = new RecipeGroup(() => "Any Hardmode Anvil", new int[] { ItemID.MythrilAnvil, From eebf8dd864be7bb46d760d85faea74dfdb0f40fe Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 22 Aug 2020 23:10:51 -0400 Subject: [PATCH 16/20] updated god slayer cooldown bufftip --- Buffs/Cooldowns/GodSlayerCooldown.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Buffs/Cooldowns/GodSlayerCooldown.cs b/Buffs/Cooldowns/GodSlayerCooldown.cs index 304c33027d..b5f234dee6 100644 --- a/Buffs/Cooldowns/GodSlayerCooldown.cs +++ b/Buffs/Cooldowns/GodSlayerCooldown.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Cooldowns public override void SetDefaults() { DisplayName.SetDefault("God Slayer Cooldown"); - Description.SetDefault("10% increase to all damage; godslayer effect is recharging"); + Description.SetDefault("Life regen is disabled; godslayer effect is recharging"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; From e491bd27389e15ad9c8a0b1d7d9e124dc60d553c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 23 Aug 2020 12:59:47 -0400 Subject: [PATCH 17/20] sped up singularity anim speed a tad --- Items/Materials/GalacticaSingularity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Materials/GalacticaSingularity.cs b/Items/Materials/GalacticaSingularity.cs index 0e1647f5fb..3c8d122210 100644 --- a/Items/Materials/GalacticaSingularity.cs +++ b/Items/Materials/GalacticaSingularity.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Materials { DisplayName.SetDefault("Galactica Singularity"); Tooltip.SetDefault("A shard of the cosmos"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 24)); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 24)); } public override void SetDefaults() From 6cefc6e433a553e9c9d0f68f0f36d18a52f5a753 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 23 Aug 2020 14:06:57 -0400 Subject: [PATCH 18/20] vivid laser cleanup --- Projectiles/Magic/VividBeam.cs | 218 ++++++++++++++++----------------- 1 file changed, 103 insertions(+), 115 deletions(-) diff --git a/Projectiles/Magic/VividBeam.cs b/Projectiles/Magic/VividBeam.cs index f58366c6eb..4e9eb0fc86 100644 --- a/Projectiles/Magic/VividBeam.cs +++ b/Projectiles/Magic/VividBeam.cs @@ -6,146 +6,134 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { - public class VividBeam : ModProjectile - { - private bool counter = true; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } + public class VividBeam : ModProjectile + { + private bool initialized = false; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Beam"); + } - public override void SetDefaults() - { - projectile.width = 4; - projectile.height = 4; - projectile.friendly = true; - projectile.magic = true; - projectile.penetrate = 1; - projectile.extraUpdates = 100; - projectile.timeLeft = 240; - } + public override void SetDefaults() + { + projectile.width = 4; + projectile.height = 4; + projectile.friendly = true; + projectile.magic = true; + projectile.penetrate = 1; + projectile.extraUpdates = 100; + projectile.timeLeft = 240; + } - public override void AI() - { - Vector2 value7 = new Vector2(5f, 10f); - projectile.ai[0] += 1f; - if (projectile.ai[0] == 48f) - { - projectile.ai[0] = 0f; - } - else - { - for (int num41 = 0; num41 < 2; num41++) - { - Vector2 value8 = Vector2.UnitX * -12f; - value8 = -Vector2.UnitY.RotatedBy((double)(projectile.ai[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7 - projectile.rotation.ToRotationVector2() * 10f; - int num42 = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); - Main.dust[num42].scale = 0.75f; - Main.dust[num42].noGravity = true; - Main.dust[num42].position = projectile.Center + value8; - Main.dust[num42].velocity = projectile.velocity; - } - } - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num447 = 0; num447 < 2; num447++) - { - Vector2 vector33 = projectile.position; - vector33 -= projectile.velocity * ((float)num447 * 0.25f); - int num448 = Dust.NewDust(vector33, 1, 1, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); - Main.dust[num448].noGravity = true; - Main.dust[num448].position = vector33; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[num448].velocity *= 0.1f; + public override void AI() + { + if (!initialized) + { + initialized = true; + float dustAmt = 16f; + int d = 0; + while ((float)d < dustAmt) + { + Vector2 offset = Vector2.UnitX * 0f; + offset += -Vector2.UnitY.RotatedBy((double)((float)d * (MathHelper.TwoPi / dustAmt)), default) * new Vector2(1f, 4f); + offset = offset.RotatedBy((double)projectile.velocity.ToRotation(), default); + int i = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + Main.dust[i].scale = 1.5f; + Main.dust[i].noGravity = true; + Main.dust[i].position = projectile.Center + offset; + Main.dust[i].velocity = projectile.velocity * 0f + offset.SafeNormalize(Vector2.UnitY) * 1f; + d++; } - } + } - if (counter) - { - counter = false; - float num98 = 16f; - int num99 = 0; - while ((float)num99 < num98) - { - Vector2 vector11 = Vector2.UnitX * 0f; - vector11 += -Vector2.UnitY.RotatedBy((double)((float)num99 * (6.28318548f / num98)), default) * new Vector2(1f, 4f); - vector11 = vector11.RotatedBy((double)projectile.velocity.ToRotation(), default); - int num100 = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); - Main.dust[num100].scale = 1.5f; - Main.dust[num100].noGravity = true; - Main.dust[num100].position = projectile.Center + vector11; - Main.dust[num100].velocity = projectile.velocity * 0f + vector11.SafeNormalize(Vector2.UnitY) * 1f; - num99++; - } - } - } + float pi = MathHelper.Pi; + projectile.ai[0] += 1f; + if (projectile.ai[0] == 48f) + { + projectile.ai[0] = 0f; + } + else + { + for (int d = 0; d < 2; d++) + { + Vector2 offset = Vector2.UnitX * -12f; + offset = -Vector2.UnitY.RotatedBy((double)(projectile.ai[0] * pi / 24f + (float)d * pi), default) * new Vector2(5f, 10f) - projectile.rotation.ToRotationVector2() * 10f; + int i = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + Main.dust[i].scale = 0.75f; + Main.dust[i].noGravity = true; + Main.dust[i].position = projectile.Center + offset; + Main.dust[i].velocity = projectile.velocity; + } + } + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 4f) + { + for (int d = 0; d < 2; d++) + { + Vector2 source = projectile.position; + source -= projectile.velocity * ((float)d * 0.25f); + int i = Dust.NewDust(source, 1, 1, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); + Main.dust[i].noGravity = true; + Main.dust[i].position = source; + Main.dust[i].scale = Main.rand.NextFloat(0.91f, 1.417f); + Main.dust[i].velocity *= 0.1f; + } + } + } - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (projectile.owner == Main.myPlayer) - { + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.owner == Main.myPlayer) + { SummonLasers(); } return true; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - if (projectile.owner == Main.myPlayer) - { + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.owner == Main.myPlayer) + { SummonLasers(); } target.ExoDebuffs(); - } + } - public override void OnHitPvp(Player target, int damage, bool crit) - { - if (projectile.owner == Main.myPlayer) - { + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (projectile.owner == Main.myPlayer) + { SummonLasers(); } target.ExoDebuffs(); - } + } private void SummonLasers() { - if (projectile.ai[1] == 0f) + switch (projectile.ai[1]) { - float xStart = projectile.position.X + (float)Main.rand.Next(-400, 400); - float yStart = projectile.position.Y - (float)Main.rand.Next(500, 800); - Vector2 startPos = new Vector2(xStart, yStart); - Vector2 velocity = projectile.Center - startPos; - velocity.X += (float)Main.rand.Next(-100, 101); - float speed = 6f; - float targetDist = velocity.Length(); - targetDist = speed / targetDist; - velocity.X *= targetDist; - velocity.Y *= targetDist; - int num19 = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.7f), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[num19].ai[1] = projectile.position.Y; - } - if (projectile.ai[1] == 1f) - { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(projectile.damage * 2f), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].Calamity().forceMagic = true; - } - if (projectile.ai[1] == 2f) - { - float spread = 30f * 0.01f * MathHelper.PiOver2; - double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - if (projectile.owner == Main.myPlayer) - { + case 0f: + CalamityUtils.ProjectileRain(projectile.Center, 400f, 100f, 500f, 800f, 6f, ModContent.ProjectileType(), (int)(projectile.damage * 0.7), projectile.knockBack, projectile.owner); + break; + + case 1f: + int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage * 2, projectile.knockBack, projectile.owner); + Main.projectile[boom].Calamity().forceMagic = true; + break; + + case 2f: + float spread = 30f * 0.01f * MathHelper.PiOver2; + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; + double deltaAngle = spread / 8f; + double offsetAngle; for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); } - } + break; } } - } + } } From 57afb143c9998be1ec2627bfe0052ab32f50a862 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 23 Aug 2020 14:15:35 -0400 Subject: [PATCH 19/20] added the Toxin witch doctor name --- NPCs/CalamityGlobalTownNPC.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index ad337af9e4..f6be9a5da6 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -165,12 +165,16 @@ namespace CalamityMod.NPCs if (CalamityWorld.witchDoctorName) break; CalamityWorld.witchDoctorName = true; - switch (Main.rand.Next(11)) // 10 witch doctor names + switch (Main.rand.Next(12)) // 10 witch doctor names { case 0: npc.GivenName = "Sok'ar"; break; + case 1: + npc.GivenName = "Toxin"; + break; + default: break; } From 632c027212cea2a1559701a3a13b31ced33729c0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 23 Aug 2020 14:17:20 -0400 Subject: [PATCH 20/20] ID --- NPCs/CalamityGlobalTownNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index f6be9a5da6..54e4428662 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -172,7 +172,7 @@ namespace CalamityMod.NPCs break; case 1: - npc.GivenName = "Toxin"; + npc.GivenName = "Toxin"; // patron name for <@!348174404984766465> (Toxin#9598) break; default: