From 42c6f8c75dd8fd2b7f83108e945684e2c621fa73 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 27 Nov 2019 22:17:16 -0500 Subject: [PATCH 01/82] COSMILITE BASIN MOMENT (I have no life) also skeleton merchant sells marrow & sand dollar bug fix --- CalamityMod.cs | 1 + .../FurnitureCosmilite/CosmiliteBasin.cs | 41 ++++++++++ .../FurnitureCosmilite/CosmiliteBasin.png | Bin 0 -> 698 bytes Items/Weapons/Rogue/SandDollar.cs | 15 ++-- NPCs/CalamityGlobalNPC.cs | 5 ++ .../FurnitureCosmilite/CosmiliteBasinTile.cs | 73 ++++++++++++++++++ .../FurnitureCosmilite/CosmiliteBasinTile.png | Bin 0 -> 4615 bytes 7 files changed, 129 insertions(+), 6 deletions(-) create mode 100644 Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs create mode 100644 Items/Placeables/FurnitureCosmilite/CosmiliteBasin.png create mode 100644 Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs create mode 100644 Tiles/FurnitureCosmilite/CosmiliteBasinTile.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 0e0906565b..7ec5082d2b 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -2011,6 +2011,7 @@ namespace CalamityMod ModContent.TileType(), ModContent.TileType(), ModContent.TileType(), + ModContent.TileType(), ModContent.TileType(), ModContent.TileType(), ModContent.TileType(), diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs new file mode 100644 index 0000000000..3d126504ff --- /dev/null +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Tiles.FurnitureCosmilite; +using CalamityMod.Tiles.Furniture.CraftingStations; + +namespace CalamityMod.Items.Placeables.FurnitureCosmilite +{ + public class CosmiliteBasin : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cosmilite Basin"); + } + + public override void SetDefaults() + { + item.width = 8; + item.height = 10; + item.maxStack = 999; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.consumable = true; + item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.IronBar, 5); + recipe.anyIronBar = true; + recipe.SetResult(this, 1); + recipe.AddTile(ModContent.TileType()); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.png b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.png new file mode 100644 index 0000000000000000000000000000000000000000..a2631e6bee4a32aa138237908861d58b21ed8577 GIT binary patch literal 698 zcmV;r0!96aP)ID zcK!}FF0BVQC&p7)^HFUA{r{BG8P^1k^zM0MyhRI5{I0P$ezbkokum&r=R9VaR^rg= zR&Z%_B>qa~@|!PiZj6)46;K)*v`V_uyYEGa~U6aBu1AYI;f-?i%3rd`Sjgijf zFtq4-0-Y_JGJYdd{aBJdr2rv10$r!? zr_kE^abP-}4O}_Drm8-3uk%0ESH9c_4%hxUr{i>ESmW87*FgKSz&wtl-9UC;yw5+E zJ_lPb|Asu(>G<}O;L_+|3cFWs0iT`((SNQVPBMy?BA7 z%&JpFRFzn}$fOdHX*>(_#gVrjzs5LXNqu-*)vfpt4BdT@*^#K%m3q5!!`g7_pZp7+ gjTb9lBKb0Y1w2{L(pr4`=Kufz07*qoM6N<$g1yyRy#N3J literal 0 HcmV?d00001 diff --git a/Items/Weapons/Rogue/SandDollar.cs b/Items/Weapons/Rogue/SandDollar.cs index 91876e1ece..9bc9c7200e 100644 --- a/Items/Weapons/Rogue/SandDollar.cs +++ b/Items/Weapons/Rogue/SandDollar.cs @@ -37,13 +37,16 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool CanUseItem(Player player) { - int launched = 0; + int UseMax = item.stack - 1; - foreach (Projectile projectile in Main.projectile) - if (projectile.type == item.shoot && projectile.owner == item.owner && projectile.active) - launched++; - - return launched < item.stack; + if (player.ownedProjectileCounts[item.shoot] > UseMax) + { + return false; + } + else + { + return true; + } } } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b6747d5657..4025792392 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3881,6 +3881,11 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedPlaguebringer, Item.buyPrice(0, 50)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedBumble, Item.buyPrice(5)); } + + if (type == NPCID.SkeletonMerchant) + { + SetShopItem(ref shop, ref nextSlot, ItemID.Marrow, Main.hardMode, Item.buyPrice(0, 36)); + } } public override void SetupTravelShop(int[] shop, ref int nextSlot) diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs new file mode 100644 index 0000000000..5baad8c96c --- /dev/null +++ b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs @@ -0,0 +1,73 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using CalamityMod.Items.Placeables.FurnitureCosmilite; + +namespace CalamityMod.Tiles.FurnitureCosmilite +{ + class CosmiliteBasinTile : ModTile + { + public override void SetDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Cosmilite Basin"); + AddMapEntry(new Color(238, 145, 105), name); + animationFrameHeight = 54; + adjTiles = new int[] { TileID.Torches }; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 132, 0f, 0f, 1, new Color(255, 255, 255), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 134, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + frameCounter++; + if (frameCounter >= 6) + { + frame = (frame + 1) % 6; + frameCounter = 0; + } + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + Tile tile = Main.tile[i, j]; + //227 79 79 + if (tile.frameX < 54) + { + r = 1f; + g = 0.6f; + b = 1f; + } + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType()); + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 3, 3); + } + } +} \ No newline at end of file diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png new file mode 100644 index 0000000000000000000000000000000000000000..4abbed3430fa79fa9203978407965f17d8b92b13 GIT binary patch literal 4615 zcmYkAdpy(a`@lbRphREFA;gojgd`J+Z$k}{VmOc9pG^ri*c`+zW?LACCz@@VC8e)OiXXz+ zI&)Q*pJ)r31<1Vao6%95F1RRh6Ptk&OW;Mqj`?Lc#7#3rt1Iu}j?eeCX!*YFBAQ2z zjv0GjWWVKj`{{VcI+6GV*Vp}Y*%r=2zm`>cKN{Mrr>H1Webk7jLD#x$rJ2IBC8X*B>hjiWNC@**04ec@v5eTp(l1Q*$aHpBd;aOVlVN;l@&tBQ2~U1=sd;l^}}$uDSbQ&Lb3 zt;b*{)Bx?F4K6RTnI|9fQ82$FM(@D`L5S}WAHUJ5CXF{;1uJb|@b166deJh6^8ztkBuIT2b&cYq67%b}f8ec^j|GZj4tS9+Pg;+4I39X~SD8&`TMDe`$V|ejVLHN*NAYer3}m@N zWJCxkl-RfR-v6$nPaQ>UW4`y4Y{b_^W(`;0`Yr?5%iSlBgs7hQfFJo;lZN*hb2Wgg zJOklqM!zyvsoCTuihuj`wI!RA(46x?TdO5|6ik}PL?1FD4ss*SG%SPDg)8KX7w&@? zL3lIa8-p1c6G>Q=^_g+Cn3Rp-8%Xh6x-M@=5C%eS7GyT3XKB^G)Ld?e;4Rmz_i{Hy zMdRGSR-g;*ydyqu-oOrjt@@NI~&_pr~Ox=o@GlK@-yd}K5i7AV;zXeo|B!R z)87KeAq)$4Led4%PIdr_lelc4YjL)0GR_d_tgU7A8JI&v8&9Q3h`9bo{}>gUp*C}G zdYhNO;amV4GIrS@^8O8^`8xNoK9h*qBoOPtJG!zfav@J;Tp88ksDxR?0{7R%21UP3 z{2dK=Y>cTORioS4X7g?K$c=-XjVCst!8=~%3=@abZeseBTf`cI5aZwd${`;6W74A=W657@q=h_9s=IY{Oy!aD5^6spR=*~t zcvt~~36!jC+4$JzXdi?Puc@H-bdcP|q$tyR;MJraZFpR-(Bb-_jJ{A2J%PR+@VQxH ztRFMl_&W69BxO$4x8WR1al%u3YB`lOw)*v{t-Z>G#3!Zf;h#zD+|W$H3|*H_a<_BI z$3qQNh54i1?jH!`sYQ&^C>LjWtxN6IH`uCyx5I-Mw15)5{+jXv%8MDZfd)~ES9)K^ zmqi|d4<9rg#)n4vyDxo756>PxX?(R7{f@Dfx;J7=!OU5a&iWB!Agk_HK2S#f8sE+A zznR9aDRWH9NdjP{o={+%^Jj(C%pm)DrE28tqwHZgafT!A<<)y+bHz6Difkopt0v+h zfkR_{0Nta;y<#UT!#jZWprQOgjFJnjp{~S@&-qhhCW8DKQRmNJ<8xH6Ooe~EpHnNZ zK71s?V>Dt_ddWbq;ba;r)qa;me0Rr_mGPiRY)6ec5>S}IsK$_N9TLjJ4{3fMH1TaQ z6d*1X4SkO*Nxzpua*u{1?NFIN4X{ES#;Ky$fRoFOSH3=bdOgrXP9#3bL$^jf@)4i) zqd6J9JdQFmp2Syy<@JnOWw=8N<-L)8K!$&>)P{#z%l^! z=}ShbDjw7Nn>UI8+#7D>V1Aac5PBAY?2!)#n!*LEZOKshQV(-~dI{^vQOBK$M{?o; zm0=YiZ1F&V+uzmH?kuv7=!8NbnW`SsPHjI(VpKRH^W|*z#c97gYZ+LGvzS5?N^*^e{GQVGi^SxC8wfT-{B`8@Z9t1pWCnp%fnx5jfs^zt z>hwD8OoQ$tVBCt)WT-`OA*<}v&8SNp%MD4U<;ED*ikxXae%H#a{!}DHiide$8MQik z8-~vP@Fg{@hvNw2j9vy$6pjx|o@Uy@(EY>Dp%h4Q1~jss`?Uh~j4k6v+NLMutO6wl z6Z+Jbkp_i3?{g#hG2|H5!jK>RB4?hOrGNYeH|TEA;dEQQv%_VLt?k%9Y5DVi2zmMX zoRN&MZd+ue`JENwj&@BaQ}Y~VJ2wgBQc)0>cYmFq()hg8sl77wOedYt_c^rb^}`+K zn(3Ya=*VkcQ!2ql=!(Z(`HN~X`_#vb5@gVbwheK4Frs7HwAzRgr^sNU!F&$<*ci+xj1gF7D}nYB5w2Yl`;4p1rUrj{pitOKg&8kX8k z1r#?z0y~<_<|gJ&IGll@L*OYa+^OE9G9ukZ|Ix+~3nD&Ym`@w}$x&j4h}+4lt1F>^ zvf`?as6uTJ?-3Ttw)urJc5>V6s%Rb2yZ*&BPXzN+%z^We=Q7N!#Jf9v=PSomV$2!8KPXRBAxiFHk$%xiO9^|ILaH#3>am&!> zP&ka6QGkMRJ-NraSmWU;q5OFZr5f5QKZyxS=Okl+d<+$fx2Ep>g#R>6$hPupKIqF7w0fh^-6|Pf7 zTbX{Z-IeFz<3(#eKV{5zcWs+{ER!Y)5^`CarbRXFB?O_uX3(1a$u(K-swT!ZZfhV- zM+ZUN>iY^Yf!%g#H#PLj>k-iCzl64WVeV~%#uEE8&{7f8Yv;N+FT6E%#6VVC`ya26 z$&c>X7~=eD<$K*dXJ6Ty8k#aw!z35Xr{RH_<4N<~0k@sN%DU5ZRUQHuC%j?al*{S> z$Czx7!MNp5X?5(_^j#V4bbWW>Xy&IT>Qjt)r*f1`hRa&mFd$e<1=;8E z*6PZw@cy1`C6npC?YWmKzT|@gS^PsyGgQeyEpni0MvZx#6?pQ`gYAV?OR5j#V{X97 z&GeV9Np*e;V+Gg7$!qP@$NG43wPpbs#U9VE|GESLFqJ&!`eHVu7>Oua?3D*pZo;KM z(tO=ArsEeKVCVt3=M~Vh4ab+IfR^d@{%_-27vA4Ymhu|w|9%C}1Ufmr&OHthBe=OE zUvLN&@Rr8{8J5b-){oICA0pzjxk*(grT+WK4oRrr^m0;W2%KtoT-Fl`5U@C59A4dU*NEQ*xSg zp(DD{uP!`ZR1C_U%f-(G}0bKM}&2_92h_WFK*y2 zZzGv1f3l%(g~M0W@A-_@1#7-jrV8=KG+}VKU1X_PGU3w}gJ=f1W4jfFm!3S>5o~*J zxsE2o^SpM-zDz>n5Qt7m8+iYM2-Sv?@?k@^L?xNqK8GB1KGmE7woY`Tr%{^X>BZwu_JN|HNyx%UQELmVfU&IgPxGHs*Vy=;%nYU6 z{HUe(!lE9O9`R>bc5jA=ypFtwC4x5aW7NNC8^A>^uJ%=Hg{5(2zu@%o{DY@Kj|G_0 zQnJ9F$+jTCk7?i`pvX?n2QkR1Q-yl<1Xe2!L8N6uEsCkvkt=>+)1qjBu7IJPF8DGo zehbsZf^t#E^U)q#Q>HINiXeQJwc-xC3g1#ft!*v+x7qy~k7$PJv#1N-i^cp+pUd?P zW-Z#>J1zxgbQjUCyi{k}roY?g+ya~*1__Fy91}vu zK!wL0cu}zQ%;xo+%T+MUSJbsn72sp*`t|Kz-U!6@PWPJ*MiCfSbD>ngggXDAy*IYU zcsITBjwl@bO~j$Y4mN$)mmyd65FEKGJJ#jer?wdn_W3M%R%TsZ``;GUU&7+IOA9jB zk7VO7{H&fyY*{^bk-Z^WfzlTCkRTWreA)t8@hNArl-INx@=Z_g2cjVh4bqJr2H8)6 zL}n($0ml6)G-xK2%_@S+LkgzqBuy0G57|e}w&D`N3CJGIVA|tU`tp~h9(D(tUlQJ; z`foSVC)Px&h0pa zH7?S`mjS^Dr#GBGLlCrn?#?g#UO+9%ginV<_%JWwu(TDFjmbYSfrN-3Iy1T{GG=9g VKg7wWfq(D-b~YESOV4=y@jq Date: Wed, 27 Nov 2019 23:23:17 -0500 Subject: [PATCH 02/82] buffed bloodfin because apparently it wasn't strong enough --- CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerLifeRegen.cs | 10 +++++++++- Items/Fishing/BrimstoneCragCatches/Bloodfin.cs | 7 +++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 657951571d..3272603388 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -591,6 +591,7 @@ namespace CalamityMod.CalPlayer public bool polarisBoostTwo = false; public bool polarisBoostThree = false; public bool bloodfinBoost = false; + public int bloodfinTimer = 30; // Minion public bool resButterfly = false; @@ -1487,6 +1488,7 @@ namespace CalamityMod.CalPlayer polarisBoostTwo = false; polarisBoostThree = false; bloodfinBoost = false; + bloodfinTimer = 0; revivify = false; healCounter = 300; #endregion diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index e70066ba74..d6fe6591f6 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -287,7 +287,15 @@ namespace CalamityMod.CalPlayer player.lifeRegen += 5; player.lifeRegenTime += 10; } - } + if (modPlayer.bloodfinTimer > 0) + { modPlayer.bloodfinTimer--; } + if (player.whoAmI == Main.myPlayer && modPlayer.bloodfinTimer <= 0) + { + modPlayer.bloodfinTimer = 30; + if (player.statLife <= (int)((double)player.statLifeMax2 * 0.75)) + player.statLife += 1; + } + } if (modPlayer.celestialJewel || modPlayer.astralArcanum) { diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index 0a44300c0a..b12c8fca28 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -11,8 +11,9 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { DisplayName.SetDefault("Bloodfin"); - Tooltip.SetDefault("Boosts life regen for 10 seconds\n" + - "Angiogenesis"); + Tooltip.SetDefault(@"Grants a buff that boosts life regen for 10 seconds +The life regen boost is stronger if below 75% health +Angiogenesis"); } public override void SetDefaults() @@ -31,8 +32,6 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches item.consumable = true; item.healLife = 240; item.potion = true; - item.buffType = ModContent.BuffType(); - item.buffTime = 600; } public override bool CanUseItem(Player player) From f86860bbfc046141e3745e9af56b22bc6fd08600 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 27 Nov 2019 23:28:43 -0500 Subject: [PATCH 03/82] made equanimity unobtainable for now --- Items/Weapons/Rogue/Equanimity.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/Equanimity.cs b/Items/Weapons/Rogue/Equanimity.cs index 0aa723e108..d9116c7e0e 100644 --- a/Items/Weapons/Rogue/Equanimity.cs +++ b/Items/Weapons/Rogue/Equanimity.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Rogue return true; } - public override void AddRecipes() + /*public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.EnchantedBoomerang); @@ -64,6 +64,6 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - } + }*/ } } From 32d341f731be9c51f76f6cfb0609e74a3c89bb7e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 28 Nov 2019 10:05:30 -0500 Subject: [PATCH 04/82] glowmasks really do be like that --- Items/Weapons/Magic/DeathhailStaff.cs | 4 ++-- Items/Weapons/Magic/FatesReveal.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index a93a35cb95..d3720de54d 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -39,10 +39,10 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 13; } - public override Vector2? HoldoutOrigin() + /*public override Vector2? HoldoutOrigin() { return new Vector2(15, 15); - } + }*/ public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index cf5a5da513..3e263576e2 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -38,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 13; } - public override Vector2? HoldoutOrigin() + /*public override Vector2? HoldoutOrigin() { return new Vector2(15, 15); - } + }*/ public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { From 7bd8c3c33750451e4ad838a6616aa6b2f369bc0b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 28 Nov 2019 15:33:39 -0500 Subject: [PATCH 05/82] sand shark suggestion --- NPCs/CalamityGlobalNPCLoot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index d47f111113..0e4f8b0cc9 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1142,7 +1142,7 @@ namespace CalamityMod.NPCs } } - if (NPC.downedPlantBoss && npc.type == NPCID.SandShark && !NPC.AnyNPCs(ModContent.NPCType())) + if (NPC.downedPlantBoss && (npc.type == NPCID.SandShark || npc.type == NPCID.SandSharkHallow || npc.type == NPCID.SandSharkCorrupt || npc.type == NPCID.SandSharkCrimson || npc.type == ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) { CalamityMod.sharkKillCount++; if (CalamityMod.sharkKillCount == 4) From e91b86432225bd9fee8ef1ccf404db1ec3181dd6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 28 Nov 2019 16:25:53 -0500 Subject: [PATCH 06/82] added metal detector recipe and made pitbull drop bandage nymphs are ass iirc --- NPCs/CalamityGlobalNPCLoot.cs | 2 +- NPCs/NormalNPCs/Pitbull.cs | 7 +++++++ Utilities/CalamityRecipes.cs | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 0e4f8b0cc9..d1952787fb 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1142,7 +1142,7 @@ namespace CalamityMod.NPCs } } - if (NPC.downedPlantBoss && (npc.type == NPCID.SandShark || npc.type == NPCID.SandSharkHallow || npc.type == NPCID.SandSharkCorrupt || npc.type == NPCID.SandSharkCrimson || npc.type == ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) + if (NPC.downedPlantBoss && (npc.type == NPCID.SandShark || npc.type == NPCID.SandsharkHallow || npc.type == NPCID.SandsharkCorrupt || npc.type == NPCID.SandsharkCrimson || npc.type == ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) { CalamityMod.sharkKillCount++; if (CalamityMod.sharkKillCount == 4) diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index 90ee4def13..1bd101d748 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/Pitbull.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Banners; +using CalamityMod.World; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -58,5 +59,11 @@ namespace CalamityMod.NPCs.NormalNPCs } } } + + public override void NPCLoot() + { + int bandageDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateInt : Main.expertMode ? 50 : 100; + DropHelper.DropItemCondition(npc, ItemID.AdhesiveBandage, Main.hardMode, bandageDropRate, 1, 1); + } } } diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 64aefeb672..7f956c9761 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -555,6 +555,15 @@ namespace CalamityMod r.AddTile(TileID.Anvils); r.SetResult(ItemID.Radar); r.AddRecipe(); + + // Metal Detector + r = GetNewRecipe(); + r.AddIngredient(ItemID.Wire, 10); + r.AddIngredient(ItemID.HallowedBar, 5); + r.AddIngredient(ItemID.SpelunkerGlowstick, 5); + r.AddTile(TileID.MythrilAnvil); + r.SetResult(ItemID.MetalDetector); + r.AddRecipe(); } #endregion From 4b32b156ede43b5d51f6278fdf9f9c47009b2aec Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 28 Nov 2019 16:36:12 -0500 Subject: [PATCH 07/82] please always make sure your code compiles and that you spelled it right It's "SandsharkHallowed" not "SandSharkHallowed". --- NPCs/CalamityGlobalNPCLoot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 0e4f8b0cc9..d1952787fb 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1142,7 +1142,7 @@ namespace CalamityMod.NPCs } } - if (NPC.downedPlantBoss && (npc.type == NPCID.SandShark || npc.type == NPCID.SandSharkHallow || npc.type == NPCID.SandSharkCorrupt || npc.type == NPCID.SandSharkCrimson || npc.type == ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) + if (NPC.downedPlantBoss && (npc.type == NPCID.SandShark || npc.type == NPCID.SandsharkHallow || npc.type == NPCID.SandsharkCorrupt || npc.type == NPCID.SandsharkCrimson || npc.type == ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) { CalamityMod.sharkKillCount++; if (CalamityMod.sharkKillCount == 4) From c0f6b32e1285548f844b882cea9ebc454dbfb134 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 28 Nov 2019 21:00:47 -0500 Subject: [PATCH 08/82] Removed erroneous todo and replaced with correct explanation --- World/CalamityWorld.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 6f5a23a294..256d5becd8 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1225,7 +1225,7 @@ namespace CalamityMod.World } } - // TODO -- remove random lorde spawn code + // DO NOT REMOVE -- this code is being kept for April Fools 2020 /*if (Main.rand.NextBool(100000000)) { string key = "Mods.CalamityMod.AprilFools"; From 435e991242661fdf85515eb220249c196fcf4acc Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 28 Nov 2019 21:04:33 -0500 Subject: [PATCH 09/82] optimized biome netcode --- CalPlayer/CalamityPlayer.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3272603388..f4dddf5150 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1706,17 +1706,16 @@ namespace CalamityMod.CalPlayer { CalamityPlayer modOther = other.Calamity(); - // efficiently short circuits to false if there are any discrepancies - // TODO -- order this list by how frequently players are in these various biomes - return ZoneSunkenSea == modOther.ZoneSunkenSea && - ZoneCalamity == modOther.ZoneCalamity && - ZoneAstral == modOther.ZoneAstral && - ZoneSulphur == modOther.ZoneSulphur && - ZoneAbyss == modOther.ZoneAbyss && - ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 && - ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 && + // least common biomes checked first so it short circuits as rapidly as possible + return ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4 && ZoneAbyssLayer3 == modOther.ZoneAbyssLayer3 && - ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4; + ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 && + ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 && + ZoneCalamity == modOther.ZoneCalamity && + ZoneSulphur == modOther.ZoneSulphur && + ZoneSunkenSea == modOther.ZoneSunkenSea && + ZoneAbyss == modOther.ZoneAbyss && + ZoneAstral == modOther.ZoneAstral; } public override void CopyCustomBiomesTo(Player other) From ee4e0171186dab61e10d4bb71d2945955179b3f7 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 28 Nov 2019 21:40:25 -0500 Subject: [PATCH 10/82] misk todo tag adjustments --- Items/Ammo/AstralSolution.cs | 1 - ModSupport/ModCalls.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Items/Ammo/AstralSolution.cs b/Items/Ammo/AstralSolution.cs index dfd6820718..22601bac44 100644 --- a/Items/Ammo/AstralSolution.cs +++ b/Items/Ammo/AstralSolution.cs @@ -16,7 +16,6 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { item.ammo = AmmoID.Solution; - // TODO -- what is even happening here item.shoot = ModContent.ProjectileType() - ProjectileID.PureSpray; item.width = 10; item.height = 12; diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 091cd094fc..e5c421e4fb 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -971,7 +971,7 @@ namespace CalamityMod case "silva_summon": case "silva summon": mp.silvaSet = enabled; - mp.silvaSummon = enabled; // TODO -- remove this when player.silvaSummon actually controls silva crystl + mp.silvaSummon = enabled; // TODO -- remove this when player.silvaSummon actually controls silva crystal return true; case "silva_rogue": case "silva rogue": diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 4025792392..0ae6544ed5 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3975,7 +3975,7 @@ namespace CalamityMod.NPCs Projectile projectile = Main.projectile[m]; if (projectile.active && projectile.bobber && projectile.owner == plr) { - // TODO -- Old Duke not added yet + // TODO -- Old Duke isn't added yet. int num8 = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y + 100, /* ModContent.NPCType() */ NPCID.DukeFishron); string typeName2 = Main.npc[num8].TypeName; if (Main.netMode == NetmodeID.SinglePlayer) From 91244772dac85a98f9390978ced6b324a4aaf8b5 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 28 Nov 2019 22:05:10 -0500 Subject: [PATCH 11/82] removed unnecessary netcode from aureus spawn --- NPCs/AstrumAureus/AureusSpawn.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 2127f12000..6599b57ea2 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -12,9 +12,6 @@ namespace CalamityMod.NPCs.AstrumAureus { public class AureusSpawn : ModNPC { - // TODO -- This value is never set, but is read and written by the network. Remove it? - private bool boostDR = false; - public override void SetStaticDefaults() { DisplayName.SetDefault("Aureus Spawn"); @@ -52,13 +49,11 @@ namespace CalamityMod.NPCs.AstrumAureus public override void SendExtraAI(BinaryWriter writer) { - writer.Write(boostDR); writer.Write(npc.dontTakeDamage); } public override void ReceiveExtraAI(BinaryReader reader) { - boostDR = reader.ReadBoolean(); npc.dontTakeDamage = reader.ReadBoolean(); } From 7931f0088b4e01f1f86c15197dc0c24ac31d0235 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Thu, 28 Nov 2019 22:30:48 -0600 Subject: [PATCH 12/82] Gael Greatsword typo fix --- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index baa49a9851..71b71020e3 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee "The first attack releases two blood-skulls that home in\n" + "The second attack releases an enormous slow-moving skull\n" + "This slow-moving skull becomes weaker with time and lasts for around 4 seconds seconds\n" + - "The second attack causes a true melee strike with increased damage\n" + + "The third attack causes a true melee strike to do more damage than normal\n" + "If you're below 50% life, swings release blood droplets\n" + "Pressing the Rage Key while holding this weapon resets Rage to 0 and releases a circle of\n" + "Slow-moving blood skulls. If Rage is full, the skulls do way more damage. Otherwise, the skull's damage is\n" + From 4133a5d79f2c1eea5d931d9aed23f2d46470a808 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 07:42:57 -0500 Subject: [PATCH 13/82] nerfs to gilded/gleaming dagger and fantasy talisman --- Items/Weapons/Rogue/FantasyTalisman.cs | 6 +++--- Items/Weapons/Rogue/GildedDagger.cs | 6 +++--- Items/Weapons/Rogue/GleamingDagger.cs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/Weapons/Rogue/FantasyTalisman.cs b/Items/Weapons/Rogue/FantasyTalisman.cs index a2bb54a43f..693d5784e2 100644 --- a/Items/Weapons/Rogue/FantasyTalisman.cs +++ b/Items/Weapons/Rogue/FantasyTalisman.cs @@ -20,12 +20,12 @@ Stealth strikes release more souls and leave behind souls as they travel"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 90; + item.damage = 80; item.noMelee = true; item.consumable = true; item.noUseGraphic = true; - item.useAnimation = 14; - item.useTime = 14; + item.useAnimation = 16; + item.useTime = 16; item.useStyle = 1; item.knockBack = 6f; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/GildedDagger.cs b/Items/Weapons/Rogue/GildedDagger.cs index 57d5074e1f..69c387ffcb 100644 --- a/Items/Weapons/Rogue/GildedDagger.cs +++ b/Items/Weapons/Rogue/GildedDagger.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 15; + item.damage = 14; item.noMelee = true; item.noUseGraphic = true; - item.useAnimation = 15; + item.useAnimation = 18; item.useStyle = 1; - item.useTime = 15; + item.useTime = 18; item.knockBack = 1f; item.UseSound = SoundID.Item1; item.autoReuse = true; diff --git a/Items/Weapons/Rogue/GleamingDagger.cs b/Items/Weapons/Rogue/GleamingDagger.cs index 4a413c7e92..7656d1344c 100644 --- a/Items/Weapons/Rogue/GleamingDagger.cs +++ b/Items/Weapons/Rogue/GleamingDagger.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 15; + item.damage = 14; item.noMelee = true; item.noUseGraphic = true; - item.useAnimation = 15; + item.useAnimation = 18; item.useStyle = 1; - item.useTime = 15; + item.useTime = 18; item.knockBack = 1f; item.UseSound = SoundID.Item1; item.autoReuse = true; From 75b4993eac6902015f16dbeed32ebd5764564dfd Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 08:31:50 -0500 Subject: [PATCH 14/82] fixed radiator black box and nerfs to god's paranoia/profaned partisan --- Items/Weapons/Rogue/GodsParanoia.cs | 2 +- Items/Weapons/Rogue/ProfanedPartisan.cs | 2 +- NPCs/AcidRain/Radiator.cs | 18 ++++++++++++++++-- Projectiles/Rogue/GodsParanoiaProj.cs | 2 +- Projectiles/Rogue/ProfanedPartisanproj.cs | 4 ++-- Projectiles/Rogue/ProfanedPartisanspear.cs | 1 - 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index 532604548d..6bf8bbc59e 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue { public class GodsParanoia : RogueWeapon { - private static int damage = 250; + private static int damage = 125; private static int knockBack = 5; public override void SetStaticDefaults() diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index f716346fc8..0fcb994e32 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 1500; + item.damage = 450; item.knockBack = 8f; item.crit += 15; diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index 8ab9c48f7f..064260e5f0 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.AcidRain npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; aiType = NPCID.GlowingSnail; - animationType = NPCID.GlowingSnail; + //animationType = NPCID.GlowingSnail; //banner = npc.type; //bannerItem = ModContent.ItemType(); } @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.AcidRain { if (npc.localAI[0] == 0f) { - npc.catchItem = (Main.rand.NextBool(20)) ? (short)ModContent.ItemType() : ItemID.None; + npc.catchItem = (Main.rand.NextBool(10)) ? (short)ModContent.ItemType() : ItemID.None; npc.localAI[0] = 1f; npc.velocity.Y = -3f; npc.netUpdate = true; @@ -63,6 +63,20 @@ namespace CalamityMod.NPCs.AcidRain } } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter > 8) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y > frameHeight * 2) + { + npc.frame.Y = 0; + } + } + } + public override float SpawnChance(NPCSpawnInfo spawnInfo) { if (spawnInfo.playerSafe || !spawnInfo.player.Calamity().ZoneSulphur || !Main.raining) diff --git a/Projectiles/Rogue/GodsParanoiaProj.cs b/Projectiles/Rogue/GodsParanoiaProj.cs index b3896de0ed..a6e3aa9f10 100644 --- a/Projectiles/Rogue/GodsParanoiaProj.cs +++ b/Projectiles/Rogue/GodsParanoiaProj.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 3; i++) { - int idx = Projectile.NewProjectile(startPos, kunaiSp, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, 0f, 0f); + int idx = Projectile.NewProjectile(startPos, kunaiSp, ModContent.ProjectileType(), projectile.damage/2, 1f, projectile.owner, 0f, 0f); Main.projectile[idx].rotation = angle; } } diff --git a/Projectiles/Rogue/ProfanedPartisanproj.cs b/Projectiles/Rogue/ProfanedPartisanproj.cs index c9ffbe416a..f0408a7134 100644 --- a/Projectiles/Rogue/ProfanedPartisanproj.cs +++ b/Projectiles/Rogue/ProfanedPartisanproj.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue stealthStrikeTimer++; if (stealthStrikeTimer >= 18) { - Projectile.NewProjectile(spearposition, spearspeed, ModContent.ProjectileType(), projectile.damage/2, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(spearposition, spearspeed, ModContent.ProjectileType(), projectile.damage/10, projectile.knockBack, projectile.owner, 0f, 0f); stealthStrikeTimer = 0; } } @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Rogue } Main.PlaySound(2, projectile.position, 45); Vector2 explode = new Vector2(0f, 0f); - Projectile.NewProjectile(projectile.Center, explode, ModContent.ProjectileType(), projectile.damage, projectile.knockBack * 1.3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, explode, ModContent.ProjectileType(), projectile.damage/2, projectile.knockBack * 1.3f, projectile.owner); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/ProfanedPartisanspear.cs b/Projectiles/Rogue/ProfanedPartisanspear.cs index b5f8203745..3f36d0ee09 100644 --- a/Projectiles/Rogue/ProfanedPartisanspear.cs +++ b/Projectiles/Rogue/ProfanedPartisanspear.cs @@ -8,7 +8,6 @@ using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Rogue { - //TODO -- This projectile literally does nothing so have fun public class ProfanedPartisanspear : ModProjectile { public int timer = 0; From 31e8586482a19b0992db0d0d0dc02d8f2cebc50a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 08:39:50 -0500 Subject: [PATCH 15/82] Update NastyChollaNeedle.cs --- Projectiles/Rogue/NastyChollaNeedle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/NastyChollaNeedle.cs b/Projectiles/Rogue/NastyChollaNeedle.cs index 99fde9efff..9c9bef00b1 100644 --- a/Projectiles/Rogue/NastyChollaNeedle.cs +++ b/Projectiles/Rogue/NastyChollaNeedle.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 3; projectile.timeLeft = 180; projectile.aiStyle = 1; - projectile.usesIDStaticNPCImmunity = true; - projectile.idStaticNPCHitCooldown = 10; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -2; } public override void AI() From d0a8d268be81a65ad183e93d61d3927f1a813b07 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 08:51:29 -0500 Subject: [PATCH 16/82] gael's nerf --- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- Projectiles/Melee/GaelSkull.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 71b71020e3..ab2107a6dd 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -255,7 +255,7 @@ namespace CalamityMod.Items.Weapons.Melee break; //Giant, slow, fading skull case 1: - int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, damage * 2, knockBack, player.whoAmI, ai1:1f); + int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, (int)((float)damage * 1.5f), knockBack, player.whoAmI, ai1:1f); Main.projectile[projectileIndex].scale = 1.75f; break; } diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index 1f2f97675a..f0bb0972d3 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -160,6 +160,7 @@ namespace CalamityMod.Projectiles.Melee projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); projectile.maxPenetrate = -1; projectile.penetrate = -1; + projectile.damage /= 2; projectile.Damage(); Main.PlaySound((int)SoundType.NPCKilled, (int)projectile.Center.X, (int)projectile.Center.Y, 52, 0.4f); for (int i = 0; i < 3; i++) From 4888b361f44b29c4d5865fb2e99552fd7309a2c7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 09:00:25 -0500 Subject: [PATCH 17/82] only nerf explosion if big skull --- Projectiles/Melee/GaelSkull.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index f0bb0972d3..bf3d5917e5 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -160,7 +160,8 @@ namespace CalamityMod.Projectiles.Melee projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); projectile.maxPenetrate = -1; projectile.penetrate = -1; - projectile.damage /= 2; + if (projectile.scale == 1.75f) + projectile.damage /= 2; projectile.Damage(); Main.PlaySound((int)SoundType.NPCKilled, (int)projectile.Center.X, (int)projectile.Center.Y, 52, 0.4f); for (int i = 0; i < 3; i++) From 7352f19e2c0d3fc924b049cd2b554461be7f47f9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 09:39:55 -0500 Subject: [PATCH 18/82] nerfed gael's pml & made large skull nerf only post yharon --- Items/Weapons/Melee/GaelsGreatsword.cs | 18 ++++++++++++++++-- Projectiles/Melee/GaelSkull.cs | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index ab2107a6dd..43b68c0e10 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee; +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly int HardmodeDamage = 24; - public static readonly int PostMoonLordDamage = 270; + public static readonly int PostMoonLordDamage = 170; public static readonly int PostYharonDamage = 10000; @@ -255,7 +256,20 @@ namespace CalamityMod.Items.Weapons.Melee break; //Giant, slow, fading skull case 1: - int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, (int)((float)damage * 1.5f), knockBack, player.whoAmI, ai1:1f); + int largeSkullDmg = damage * 2; + if (CalamityWorld.downedYharon) + { + largeSkullDmg = (int)((float)damage * 1.5f); + } + else if (NPC.downedMoonlord) + { + largeSkullDmg = damage * 2; + } + else if (Main.hardMode) + { + largeSkullDmg = damage * 2; + } + int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, largeSkullDmg, knockBack, player.whoAmI, ai1:1f); Main.projectile[projectileIndex].scale = 1.75f; break; } diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index bf3d5917e5..9df8217ab5 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Melee projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); projectile.maxPenetrate = -1; projectile.penetrate = -1; - if (projectile.scale == 1.75f) + if (projectile.scale == 1.75f && CalamityWorld.downedYharon) projectile.damage /= 2; projectile.Damage(); Main.PlaySound((int)SoundType.NPCKilled, (int)projectile.Center.X, (int)projectile.Center.Y, 52, 0.4f); From b189e1604488828ccca9d9d5f56d6844a3b70c6e Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Fri, 29 Nov 2019 14:52:52 +0000 Subject: [PATCH 19/82] Sand Cloak (Currently unobtainable) --- CalPlayer/CalamityPlayer.cs | 14 ++++ CalamityMod.cs | 3 + Items/Accessories/SandCloak.cs | 34 ++++++++ Items/Accessories/SandCloak.png | Bin 0 -> 663 bytes Projectiles/Typeless/SandCloakVeil.cs | 110 +++++++++++++++++++++++++ Projectiles/Typeless/SandCloakVeil.png | Bin 0 -> 10015 bytes 6 files changed, 161 insertions(+) create mode 100644 Items/Accessories/SandCloak.cs create mode 100644 Items/Accessories/SandCloak.png create mode 100644 Projectiles/Typeless/SandCloakVeil.cs create mode 100644 Projectiles/Typeless/SandCloakVeil.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f4dddf5150..595d3183df 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -395,6 +395,8 @@ namespace CalamityMod.CalPlayer public bool electricianGlove = false; public bool bloodyGlove = false; public bool filthyGlove = false; + public bool sandCloak = false; + public int sandCloakCooldown = 0; // Armor Set public bool victideSet = false; @@ -1141,6 +1143,7 @@ namespace CalamityMod.CalPlayer electricianGlove = false; bloodyGlove = false; filthyGlove = false; + sandCloak = false; alcoholPoisoning = false; shadowflame = false; @@ -1385,6 +1388,7 @@ namespace CalamityMod.CalPlayer moonCrownCooldown = 0; featherCrownCooldown = 0; sulphurPoison = false; + sandCloakCooldown = 0; #endregion #region Rogue @@ -1855,6 +1859,14 @@ namespace CalamityMod.CalPlayer } } } + if (CalamityMod.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f && + wearingRogueArmor && player.Calamity().rogueStealthMax > 0 && sandCloakCooldown == 0) + { + sandCloakCooldown = 900; + player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f; + Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), 7, 8, player.whoAmI, 0, 0); + Main.PlaySound(2, player.position, 45); + } if (CalamityMod.BossBarToggleHotKey.JustPressed) { if (drawBossHPBar) @@ -3320,6 +3332,8 @@ namespace CalamityMod.CalPlayer featherCrownCooldown--; if (moonCrownCooldown > 0) moonCrownCooldown--; + if (sandCloakCooldown > 0) + sandCloakCooldown--; if (ataxiaDmg > 0f) ataxiaDmg -= 1.5f; if (ataxiaDmg < 0f) diff --git a/CalamityMod.cs b/CalamityMod.cs index 7ec5082d2b..08999c1218 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -97,6 +97,7 @@ namespace CalamityMod public static ModHotKey BossBarToggleHotKey; public static ModHotKey BossBarToggleSmallTextHotKey; public static ModHotKey MomentumCapacitatorHotkey; + public static ModHotKey SandCloakHotkey; // Boss Spawners public static int ghostKillCount = 0; @@ -192,6 +193,7 @@ namespace CalamityMod AstralTeleportHotKey = RegisterHotKey("Astral Teleport", "P"); AstralArcanumUIHotkey = RegisterHotKey("Astral Arcanum UI Toggle", "O"); MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U"); + SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C"); BossBarToggleHotKey = RegisterHotKey("Boss Health Bar Toggle", "NumPad0"); BossBarToggleSmallTextHotKey = RegisterHotKey("Boss Health Bar Small Text Toggle", "NumPad1"); @@ -280,6 +282,7 @@ namespace CalamityMod AstralTeleportHotKey = null; AstralArcanumUIHotkey = null; MomentumCapacitatorHotkey = null; + SandCloakHotkey = null; BossBarToggleHotKey = null; BossBarToggleSmallTextHotKey = null; diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs new file mode 100644 index 0000000000..1cb283751d --- /dev/null +++ b/Items/Accessories/SandCloak.cs @@ -0,0 +1,34 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class SandCloak : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sand Cloak"); + Tooltip.SetDefault("+1 defense and 5% increased movement speed\n" + + "Press C to consume 25% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen\n" + + "This effect has a 30 second cooldown before it can be used again"); + } + + public override void SetDefaults() + { + item.width = 30; + item.height = 44; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.statDefense += 1; + player.moveSpeed += 0.05f; + player.Calamity().sandCloak = true; + } + } +} diff --git a/Items/Accessories/SandCloak.png b/Items/Accessories/SandCloak.png new file mode 100644 index 0000000000000000000000000000000000000000..311b82e2b2ecdf537523e3232a24345dba3e5362 GIT binary patch literal 663 zcmV;I0%-k-P)Vr*Ge(A|EkO0=#_M17L8N0`TGU41jF5*o!c`Ic7Bci#XQXH&O@vGY7Hidyn; z9*Z<-Irw~4EnAWLbawg#fVV@J<+H_74~Xj4h4a{Y+wZn($;KCR0EX`;mHXXxDq;Xy zQ4|5JO1A;l>+p3f^&h#&<*i61ODc(UgS^)3aKsNEIOxl(ymCYJ>hpA8g(JSaa`X1| zb${y@?wT|_u|8gJkAaWfZy|zeve%g zu2&CwN0o7;$aSW&zRIgSqEjLN6CO_)4RO@W7)``TP#lqLI zm9kt@%GS4}DzNJ$ksqW7b)>|gKDHMy?iY+5029?`|*q23*I9s_WY zI{05pcj~l}?koG=9R42xkteZ>B`=Ed{~mes*_#SJk8eaJ@-6z;4%8A_1tb0o^G)u4 x+R1>20000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1k8*J$L{B literal 0 HcmV?d00001 diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs new file mode 100644 index 0000000000..b4b0e1011a --- /dev/null +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -0,0 +1,110 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Typeless +{ + public class SandCloakVeil : ModProjectile + { + private const float radius = 225f; + private const int duration = 900; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dust Veil"); + } + + public override void SetDefaults() + { + projectile.width = 450; + projectile.height = 450; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = duration; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + projectile.rotation += 0.01f; + + Player player = Main.player[Main.myPlayer]; + Vector2 posDiff = player.Center - projectile.Center; + if (posDiff.Length() <= radius) + { + player.statDefense += 6; + player.lifeRegen += 2; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + // Sprite Circle + Texture2D tex = Main.projectileTexture[projectile.type]; + float scaleStep = 0.03f; + float rotationOffset = 0.03f; + Color drawCol = projectile.GetAlpha(lightColor); + float drawTransparency = 0.1f; + + if (projectile.timeLeft > duration - 10) + { + drawTransparency = (duration - projectile.timeLeft) * 0.01f; + } + else if (projectile.timeLeft < 25) + { + drawTransparency = projectile.timeLeft * 0.004f; + } + + // Dust effects + Circle dustCircle = new Circle(projectile.Center, radius); + + for (int i = 0; i < 20; i++) + { + // Sprite + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, drawCol * drawTransparency, projectile.rotation + (rotationOffset * i * i), tex.Size() / 2f, projectile.scale - (i * scaleStep), SpriteEffects.None, 0f); + + // Dust + Vector2 dustPos = dustCircle.RandomPointInCircle(); + if ((dustPos - projectile.Center).Length() > 48) + { + int dustIndex = Dust.NewDust(dustPos, 1, 1, 32); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].fadeIn = 1f; + Vector2 dustVelocity = projectile.Center - Main.dust[dustIndex].position; + float distToCenter = dustVelocity.Length(); + dustVelocity.Normalize(); + dustVelocity = dustVelocity.RotatedBy(MathHelper.ToRadians(-90f)); + dustVelocity *= distToCenter * 0.04f; + Main.dust[dustIndex].velocity = dustVelocity; + } + } + + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + // Knockback has to be done manually to ensure the enemies are repelled from the aura as opposed to thrown to one side of it + + if (!target.boss) + { + float knockbackMultiplier = knockback - target.knockBackResist; + if (knockbackMultiplier < 0) + { + knockbackMultiplier = 0; + } + Vector2 trueKnockback = target.Center - projectile.Center; + trueKnockback.Normalize(); + target.velocity = trueKnockback * knockbackMultiplier; + } + } + } +} diff --git a/Projectiles/Typeless/SandCloakVeil.png b/Projectiles/Typeless/SandCloakVeil.png new file mode 100644 index 0000000000000000000000000000000000000000..e1e0718885f32e5d1e1857c7a784afef4552f2b5 GIT binary patch literal 10015 zcmYj%2{e@L8~2d6kX~k_EKwMQEU!Nj4Oz$7v!$_1mKmgMHP$4e5VCLC*P$9?&0e8o zi;=On4F*G&kuiMZ(RaRY&T*VGb3gZUt-tGcUH2VpW&%IO&d&}4fleXxb<9B^rmn+3 z*5izCLU{Xh8UL94%;8#~nt^kRAkYO6LPyi`e$L8td-Cba<2`p*Z0~@-bRpGTj5d#eO2KaaTgqcG=6m+m#4F7B_9KEn8YK?FRsE&tuj?VwV3_fmMf`bd%= zWBS|ql8qzqZekyZMBzRzwF_WokdY{uzvTXO&M5lc(s$lePZz)2iHdxIz%xosL!!n^PI|ETSd zlB!J15_MQX^6@$z?~WsUPZA+cai-C2ZVTMsB3)U_;YV7(y^{R$SxfcF&BR+)W&GFv z>Qo>I?PL$C2zZRwI+(p4D__mCTYErT(hzAF#OOS`cJyeJCo*|sLwc^BApEP^=%g5*iP6F`<{=8I1&Z*5YKh50oW`rw zDs(cMb0_+GE9Jr4;+;baB($cx(6HYm!`Z2CuUynVlG5%{GK;QS$BTr`l4QZwOSfMT zSS-lQw%kQ&NVHsM&)o+JP|2BNfQNE#pW(}8xq;Zq(#f=hRP%`IE@lC_Jyr8=d!PI?=v5kB~|FbxK3(D3f z8tKnxjPI(gh!>XL;LyZ2ZnzsRAx!wYi86bN!^1DVzT2177hM}|&7UJ{36rm(<|nZ0=d4Vi(j-=Hc2tD1D2)+=4SQLQE!bn0uSDsKt*0|vD-_sf ze*SUnmFNmuJtgS-H^`GL`Co;@o0V=wc0*!;gTCIlDFq$=U{danL8$J8~g{sp_+% z?4JN#GHbyJSz>W`B>L8fQvRsdAiHDEmy{g?s_~{n+x_K~m?f&!PGj9(YwKFTkHm)W zDiu6JM-Q4toe+1AMZU(o%QuXU`SHWp*et1iPW7v<3|I-51l)J3v^N6(gB0^kzM4riD@Y_}FjSWh>Jm3Bv*_LEi7pQXE+Vc+9 zcXap5NIu!VY>C5B&_ChOaRYWDSIwHbLsZ`6*ngUA4O~cUq3+~sg#HK;qRyI6^XXmy zk5(FUStQTf6FyJ>yt@pz`}0)5JaM9sh%&4I7g|P6!ociLYA9-ENgQWuf}ajBdoN4~ zz^HcBmvdB~)={_Q@X`j0>xQ3&ZWAtoK*y6-5LtC?^|df8@RG57bM z!JFMZZ?+zf^duoUzrI$#ysIKg>8YHwPh~ZvIHKD7<-xlX#Z3toCpceEuA2{1?T_4x zh;k;e&l-nYF^{IbbqlELyE&w`uE3U7ssGHli}?9H#-<|5#aV$%o!$~9>L3IIio)quWr)ZhJuWlbnT3Se2tfon)62&y-h4maa zun4oK*IO#;5_bMcaUNZ8csa8~)i%jsHB=jU(VUTMXZgRGe-5FDxB@A#JR9tZRMYVg zSpT*Cxk{foy>?}qdrr0v+T9}FHMFo{1Qk{uOU46;&|)kyn#SUuc#Wd)O=cQF|M|2> zx7I#6|KFlyXY|UBEG6CC9P#>P(Qq1G8xV4Zd)^1(JNCq!eD^UsWIj#QWKY{xVY6CH zr*`Y^tPEfBVfuS#vj!m|k??28M5+kbN2%+b(&B&$P8IAKI?H+pP9*GT^SiidQ=yzM z2Vr7|_%`VigIPiNrYFtosX3*v+_@Mc#L4#GTZ0l8!B^?Q;S`Lz${H-gv~O({$m9A7 za575|l73$VubKSPxun&?HmKy<>lxR^_q2?|2=i{?FA!z>x1iju@jWZ#R;oHh&M~Cb z{D8zwH1s_s8QYzoQ(G!uZ&=_S${iE|Xzb_|jyhfcB0V=W<^G|Bm?@_1C=h&=lU`XnhNrm%Z? zxX{(+`bM**YPP~w@V<(5{y37-@O_WR_(@UHVF1W5pwDW2jnZ6W+WaYmJiGYk3)~zg zkSQ2Mr^c<<@%Zf@lz_+)r}D%+0m-8_O(f69s+!i^#i}!c|-c` z|8ODFnp|x#4paERuUQ=M&q6?e3goeNLl^krmM!u3QIeRDYFc+azpB+(+e`^zT$NPL zXASKxz`+rR6ee0sD|wC=r@CY&@b1?=QntmLHKj7`!nacza(nbhTFZ+nHiIBk-|$S+ zr|`C&0nJuGCbxe6Rx5}d%uxDmsjTnSQ5I*y`{iy+8F{NJ2v#uKEr?(+y}GoK@8~_Z zPY*T}0}@j4wGM9u+ssIL($I2J+N^!oEM-CPB~yG?fM*hNzJ!=RYkyxCHJ_?Be6tu} zL7!vgm6%oSy1fhW%DntaA|Iz~Hoat%FFcDAXMgB=xz2h4t8OY~5G?}8RLSjJQx%MY z_1mjSY$iN0&*iyCjtV^gkm-??7;a`-s*b=OgzzfqN#8xUm^I1hbG#ZjaD}=`mpG6~nkWLqlELZeVwN8FnbDM% zUtGtP=^eoS6_uJBC{CHU{d)*0{We>kZ?`s_hFjSN1bY+fyV?6eqT8Okpe)orep4yn z8cttRS;JR-SfPB~_2I z<8w$1&i^x~ic(;7D8G2yd1n;?#dMC6n)U7E)%hk&)Vpf4x!{w*WOM0rRp?cK^AVp3 zF6H{s0$wDUJi$F@VS?3-vS;Fa0lwso6dA3oyWz3;q%!cwSk_fUScH8EDU+DjizhX; z01WVd*{rs3MZBnVt&%XNWz2?YA!%~@!$Gk3sq40%*K6A~^4$`5iC#YS@<5i~7wKP7 zTR5PuoysCE?~Fzq^$(1TXUnoV-2DK6LzDbDohlrQeJLPm~cZbw3vV{zea^R zt`Zno2ZuM-3Q&CF6=q1|B_l*XL z&@hQZ1Q1ALbrZc>O~Nnm6iCVF}v#m&kX)%M-?I}o#u%(iD=EW zE#@!^vB$v>ksYBwk_&ER_hSZY&D+N@H0coRG1Xc)S&o9gE?-ON*g9%voUXtnA~ zbUpEMY#~9miVE|BwWl27$ZhTd)5w`hsLE2<$!+pq)PSRlmU|)5Mpw;dZ3VnC zZex({_Zqj=71>f)m~1XPhj)FN1r(>rf>9Nxw%OfJVjX7hb%aHLEJxbZ?dC#+R^)*O zA<#;6N`Wn!oxsN2aVZ^^ZM)JI_DXT0M73vA{3aktZLGYxz&qY_`yr;OM2gclwXAD; zaLCo%7yu(&l(ekynz}ex%+6xW`CPwh36|$1^uuF8?Tc@gu1?dgXabd~9`|h1%k**V zZ~yo#S5~Lg(Lb-1JU=%lOKklCx~WoSFs6cDY+$uFQ+YE7stvO0LKYm_po%Kp$6iE$W4xhS}5Xn{aiKgF)SIZopK>b$+M z3_gd~nsW=Bee7a=>Q3P2=Z6LEvx~@8vFfM9mwqO?3M>&NT~YN?e9^OaxLUgy%`+&& zO&F{P2Q@)?MfjL`uf2aztT^w9h%U+X$kPZt4LgWwH$7anz4hhyXY!5xa4Yegsow8v z6cILgQsLQ(%~?jZB!HQN{4-#c-`-AUExQFpc`g`ZcJ0=1L9ip`P*ElJAL;Ee`8y+B zQF<#}*J7}P0?v?}>FheoCBKJiHR4CSC1zr0%&d&(c7Pb^}Orp1%U;}?+3Jj*l zBq{>aZ>Zsu@}FqQ1l~a|`);bS$1C_?87aN#7;LVjOyFeZH8%XbR)g0nK z7kKdShDFV-r}Z15A9WQD>o=FdHveZa%{zhPcQug&5(A~|*tz@584c3LpJn<9chSQP zN6&|FGQFZsSQW<$u(&2t>&KqTt6$;HSHGb6T!mj^yI1QLV(yiO9hUD z&__}Cn+zh33>Og9BGDBW5LNV_!08T15kc_RzyXnPUMNALIc(_YC3#Af@sUt{8LkfV zqTrNY1aN6vZ75wBK%;S;o#nnFnLr(D#Wxq2n9ZEGWqI(Vd0)YA)f?1}vV)MCpMfO+ zYN`=fpXzZnnQji}@0?6_`Vtlmdet#1jcI{)k9u7Ph8EZdgoWiTkqYp;@`=JWx83>g z8dSsI$08c-lbzWCEd8q5HJrat(%{&f=pq>&9A<63iu@m_|K6}>X z#wC*bpdcGS^8~pI^66jeYE!M7CQM6k<)CY?OE-d6KYm@_xS%$A4D>1@Yg$52be^eE zV0QRpP$LSzv{zm-u6XDNF+&3{!|uQ_k5s*2sMsMLVwnV zpTVl}mbqQVi)%A-{A;cy_SFp^`pdK|rzc0T$M3B2=KlU>l83^k=tBa!sVP9Nq)&b? z6!i$?<7$9?wH-$+hkl*R1gN%5OZv=Fx14aP%XE#Hq_soC;@c9S_je~>Yr{Y?vZ%)* zr1iBB+euqXgFBGDpDUDQI4h{*H=VVlIia?4J&A?MjFd9!u?w1hU{6tj&Mnwi6sESz<(Jo8Ng z7bxNCu67+vSoD+j8Bou5n6`5~_o@!JUW+!kU zo`9l>C1=WE;9mo@w(i5}fo42ot1AA2O7N4j;u;5i`NYp!uiSX|VL~~yw3moz5NahE z6m&g{MH|2ZlzV*IN3nNIeM4$kZDBsg`C%io5Q#&K;${fB6MuALx$wZ`tKU1?cT zLMq-Hc97z0B>J%=gPw*l`jgrHJI?v?_G& ztKR81i7v@MDbO$YfU!P5Jd~Vsh<49tHF~@g1#P_x3ID6G7gy$eP@IE`2AR$I&#=0e z7)ZRkT0y%5OTov7O84=^kO zG)=eWG!tb3b*2BUIR^se0f>JEU*eOdS$Jx9#!0O!D zO8gGT2E=r9$Dd_Kwd(!z`s6<#9v}brl;0shBXh34&uXQ0TsmD<9$Mm zRpN*jBF1DPa|^_|v!o?=DiyhN#oY4$Z8O{XE=X~GHI1Vrs#WJi4Fj_?BZ;%mS$G%k zhCI+H3d~%y#?v)uAJibz>- zsaxVNeF>ckG@(dUv{+BP3Vshn#2Q4l&T$ z80`m3BW8MMc|!__0))u30U_gfUX;7-udw#fN>@Dv7N6Ts1Hy|u5RnxV)S~?a06qG2 zcr#%{ydV8iYp%O>;uFvm+%po98&qxQiD8VmhX?-@U(7wKi*J;=A664KqZWMtlg$x31hmHb8^w4k1*&5Y&}h8#a|R0t|M^ywf8Jv??@Q=k*CgeE)S$W z=VCiOlmaSodyTGQ`$gc4roA1xc^nkM6vyqH!Nuq%#lqy3>Kw^w)=24R&`#pJeXbTk zh{!7w6?aYBHv(8;HfwtXK#a(FN=votsHU_qZC$+9LukfstA!Sn@7n-Fm1@jt_jIze z&9N8Om^KlBtC>X2d!0|7Kle|c5e7P`6wLGW;pPKrr5H`A&Xqh4i}3RgCkl*7l83>s z7(1X)hF-!Y7o-iyaU;ZVqm;8^2-M@orW$Ffrj6lpx@nMcwB)J2HGhXHmQ=~M!}zHS&3a;oo=s!Qd&Q;Q>?;b-yC?H|`Sua06$ z;tu1%n>H;`*PoZAB0@HBJ1Z(aMlOp0V}gGZ2zz>BD%cw}T7ro*f5uFC*fDb%ASvRR ztm)$HGJU@FM6kDwtrr8uCJnaq_sNt&$DHh-8QxS5O4xpiL4+`n&#OAT146L=UpKQj zTCbA>4eo?Ht;kzR8`0@S8m5q_>msBw`3bCvD>CJ!rMK^CzznY$%siS1`LK-Mcc@9v zlX&(0o__frv;EV zQLu7A)&z`idmECI%fU&7L*6Mcv&nA-Tj6~w5-cmI2Q?)8P}cym5C~7kz^TIilpd8m zS1gCe3Uy5)>(lq0we<~8mX+Y%fxP$sZ0L;B##UwjlbTq@?6b4ky|z#i$OU}%t9sa% zWk~TGS}+s4dYqEjqQr;6wvR`+KJl!p<$P=AII*Hgyapf-uvSGvg?#R9-k53Lf|me3pXs zyS#moWqd^nJabza-7E3o=|n|3nIjkt(>U0zCsSXicav{>K&C?N?@4--O1js}9r6JX ztG@~^-MJZ8<5&FE*5cE!GIL7ce}>deV(isbB1vW!2^F6CvP`@X>zjFk)Fzl-4?TKo z#bl_~M@C1Njmg<=p6uNy?AEJ{xpl`>pVHZMr|+TbecQJhCx*6n>co%yzfvE&=H#JZ zw4!i#Jjs3M{t5Lqi*HcAneKvZPEGcp2WDyqP=HJ_77o?M2*A*zhGQeA2fjh9Cdb+} zzl7Zz5;KZq5SZO>Q+w31t{?vB7Q0Sh*gh!?t|#oIiO05xwVU;@s%?dwhP4OP@}MRk z7f>nZD%dI)#4zdnZC%nPwhm3eBNhjXGGCqD`kJ*Q+2LUWO{Ga&kNk9%rbah5=cd|X zUx}<^!*T-ycKgIS88LJkODQvFPdwPfOsvomhk;bD9skMzH6GP{2``i4jCz+|IV{O5 zoOfYu5dX zuJwG6#|c8Rfi|^;PCv$q@sB=~_XrS}Eo4!RQt+2&*?d3lW2#``y9=9dcaR|iOE-%O zCMajUDTC}%voS}*(RxJGj4pNei@v24xb$1h%16eD&ga9s02g^Pt@vQfGPwcc&pAx3 z6R(|xc6_3G{CFUkrDN#G*+lvy8|$m6OUktU>tOE|9bPG{pn-&rhT*_$O<|I)CFRKt zDZVuEu18L!*O%Dx>-G{ZEyzUMO7CJSUmstbYVTtfPRM9Xy?= z5S%~sJS`xyU@X`B-@#8<^g~IYOfiNml1;@6k>K!}GIuF(GzuPwQ$=`G@RYs~*RIe} zL7yq#tbV62kuF|^4!~he9FTTz2X$s0k0y#Op&~|CHVvwmVEhTi2JS@!@rs#A&sMs5 z5$dsn&%33cdNs)HgX~rlnRH&Pn5L;JSZapnTd_;MGNVj`(E3rC(C3EHIBw^amB%Q? zahyuA-ds}XNwi~&VW76n^lPY5v~|kM%Po41s5DeJ#{Lj2Bb3xu;Eni}0qak&8sFIl zLeF`GLM64uHkYM!=0|>IEM-?UFLY|296tKsr6?1|t@dA4;8+qavZo9|8Spv}4o?kw zE?%?1OqutHrg8+OWVc?yq`$Ckin`lCy4%nr`W#eLJ$4+3L`7WeT6#mf8p#9)uiD8< z-R!+&WYU!XMSR>)fx1(tUXx=+IkaQ|;85L9J5sBY-hwP3T+{ zGm5TA!V$oDf9%k#iKoJ5*Uf;6d|R1RP%$RlK;wLC7fCK;uVsvY`YAMSFVrwbJc4^Y zk^XYQ^#T52!^C%R!Jx%`KfF@LFiokZW|}d8C8!O0NT^6WB+fA%vL61}wd|U$C}*sh zEw)EMX;MidARNn9jQ4wLDRXCZrNk$kfEk>kI0sv`G}r*$O%U2}ZEJCwR80b}g$XzU-OYM#p7U;_!M z@ZgG@rN_s2afi?D9p78!|*?lt_H_JqegPc(t*Y8A>OUQ2c8C6 zb};mf3*fx{grpvvq9-M}`d(c?@8Yzx`eUNgxg&+-odXmu=|^#P-YqZhv{Gr^F6RC= zo$REN-2PSR_DAwH!+ZRHy$VX6+7t2vkdUiIi_h0ny$HyM3ent2vW_xHOrv99O( zT2m@)c|zfL22Brkm+`j0Q)YVnwyTM~X~(!# z6GY1KyW`OQdzJ_TW1JN>4}$;fup~RJ1keAzk4l+mpu7b&Je?F!KAh_-4(p@;t6Os9rgJutGj^~l9ud5KF3QiZ3@aQ5Ai`>Tz=L-#CBbIG}|n*oAd*rmE(@o271k2`15aGSN-= zj}_y>(UEs+uX6}1p=%UxmZBo|$s#yiO!s%a8DFt;CjKFom zSwM=FJ&rET#Bw!=SbYiJ{xRI$-ays;9S9d@3KV7I2WG;0BJX7Pp3v{XoNLZ}&0eSz z>;4B}hEo2yl%PG_qY0^FT*P8rP{J#G?TVyxg~qS_-e>f(v21IO02dpmNnzRoFy7LJDG`X}+xWyPM~)y!HOWkLoT8 zpMhdOQ9m#i#;ukq3fJV(5iXIp|C(<~Yf+Xb>BpFo;eY1Z{tTlr$WLCj;KKmFYs^Q< z!X<9sZ*DieUTifSoXNr(0x(O)*-&F?fEO-BG?tS$ilM;&_xa!ciMMLmAJnuz-aPyk Np=+X3qvaI&e*huszHtBm literal 0 HcmV?d00001 From 5a0b79222e50af37a31e30a1feb5d562eaaa0c41 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 10:16:04 -0500 Subject: [PATCH 20/82] smol changes --- NPCs/CalamityGlobalNPC.cs | 10 +++++----- Projectiles/Typeless/SandCloakVeil.cs | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0ae6544ed5..a47d4f3bd5 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2486,7 +2486,7 @@ namespace CalamityMod.NPCs if (Main.player[projectile.owner].Calamity().eGauntlet) { - if (projectile.melee && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if (projectile.melee && ShouldAffectNPC(npc) && !projectile.npcProj && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { @@ -2497,7 +2497,7 @@ namespace CalamityMod.NPCs if (Main.player[projectile.owner].Calamity().eTalisman) { - if (projectile.magic && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if (projectile.magic && ShouldAffectNPC(npc) && !projectile.npcProj && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { @@ -2508,7 +2508,7 @@ namespace CalamityMod.NPCs if (Main.player[projectile.owner].Calamity().nanotech) { - if (projectile.Calamity().rogue && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if (projectile.Calamity().rogue && ShouldAffectNPC(npc) && !projectile.npcProj && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { @@ -2519,7 +2519,7 @@ namespace CalamityMod.NPCs if (Main.player[projectile.owner].Calamity().eQuiver) { - if (projectile.ranged && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if (projectile.ranged && ShouldAffectNPC(npc) && !projectile.npcProj && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { @@ -2530,7 +2530,7 @@ namespace CalamityMod.NPCs if (Main.player[projectile.owner].Calamity().statisBeltOfCurses) { - if ((projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if ((projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && !projectile.npcProj && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index b4b0e1011a..30d5524276 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.NPCs; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -94,7 +95,7 @@ namespace CalamityMod.Projectiles.Typeless { // Knockback has to be done manually to ensure the enemies are repelled from the aura as opposed to thrown to one side of it - if (!target.boss) + if (CalamityGlobalNPC.ShouldAffectNPC(target)) { float knockbackMultiplier = knockback - target.knockBackResist; if (knockbackMultiplier < 0) From d853e3fbbc19a58ce1c86f4944293b0378273f62 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Fri, 29 Nov 2019 16:45:08 +0000 Subject: [PATCH 21/82] Sand cloak veil now has a circular hitbox --- Projectiles/Typeless/SandCloakVeil.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index 30d5524276..53c9619b7c 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -107,5 +107,24 @@ namespace CalamityMod.Projectiles.Typeless target.velocity = trueKnockback * knockbackMultiplier; } } + + // Circular hitbox code copied from HeliumFlashBlast + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float dist1 = Vector2.Distance(projectile.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(projectile.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(projectile.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(projectile.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= radius; + } } } From 5b44ae8706e376bd89d2e87129037bdd2c191708 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 11:52:22 -0500 Subject: [PATCH 22/82] added web balls (unobtainable) --- Buffs/CalamityGlobalBuff.cs | 11 ++++++ Items/Weapons/Rogue/WebBall.cs | 59 +++++++++++++++++++++++++++++++ Items/Weapons/Rogue/WebBall.png | Bin 0 -> 526 bytes NPCs/CalamityGlobalNPC.cs | 21 ++++++++++- Projectiles/Rogue/WebBallBol.cs | 48 +++++++++++++++++++++++++ Projectiles/Rogue/WebBallBol.png | Bin 0 -> 526 bytes 6 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 Items/Weapons/Rogue/WebBall.cs create mode 100644 Items/Weapons/Rogue/WebBall.png create mode 100644 Projectiles/Rogue/WebBallBol.cs create mode 100644 Projectiles/Rogue/WebBallBol.png diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 8a1bed0f1c..87c8f2f8d0 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -47,6 +47,17 @@ namespace CalamityMod.Buffs } } + public override void Update(int type, NPC npc, ref int buffIndex) + { + if (type == BuffID.Webbed) + { + if (npc.Calamity().webbed < npc.buffTime[buffIndex]) + npc.Calamity().webbed = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; + } + } + public override void ModifyBuffTip(int type, ref string tip, ref int rare) { if (type == BuffID.NebulaUpDmg1) diff --git a/Items/Weapons/Rogue/WebBall.cs b/Items/Weapons/Rogue/WebBall.cs new file mode 100644 index 0000000000..7351e1fa8b --- /dev/null +++ b/Items/Weapons/Rogue/WebBall.cs @@ -0,0 +1,59 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class WebBall : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Web Ball"); + Tooltip.SetDefault(@"Throws a web-covered ball that covers enemies in cobwebs to slow them down +Stealth strikes slow enemies down longer"); + } + + public override void SafeSetDefaults() + { + item.width = 20; + item.damage = 12; + item.noMelee = true; + item.noUseGraphic = true; + item.maxStack = 999; + item.consumable = true; + item.useAnimation = 20; + item.useStyle = 1; + item.useTime = 20; + item.knockBack = 3f; + item.UseSound = SoundID.Item1; + item.height = 18; + item.value = Item.buyPrice(0, 0, 0, 30); + item.rare = 0; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 4f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f); + Main.projectile[proj].Calamity().stealthStrike = true; + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.Cobweb, 3); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/WebBall.png b/Items/Weapons/Rogue/WebBall.png new file mode 100644 index 0000000000000000000000000000000000000000..3640d6596edc40b538fb9b452d323cd45e97a04e GIT binary patch literal 526 zcmV+p0`dKcP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00CS{L_t(I%e9oTO9D|G$3HIw$$}OY z5z>oDIOs@eGUz`jq?RHfqRp`-q}Bqr#x{w-!7+3!XsMxS2!kMqv_ZmJ8k?@+{3Y)? zH{W-;yWj8LyAPjt?{ zz6;>kX+sXPxx5RoTio!-tg!ZipHy;i)Bs?oFar!$d-M+fNcv>rXk~RV(BavIw=O@E{=#MPSj9EnVraj3GnJOGZJ2B7ua(M}uLLE=&zS8MfubD1HO8zGe>;xPa| zdY^$Ob|M~A{k~QoIpHssb#AnwTtbHc000tnMObu2SV=}YPjYExZggREX>V=-F@#v` Q?*IS*07*qoM6N<$f{0AhzW@LL literal 0 HcmV?d00001 diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a47d4f3bd5..c1804281c8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -95,6 +95,7 @@ namespace CalamityMod.NPCs public int tSad = 0; public int eFreeze = 0; public int silvaStun = 0; + public int webbed = 0; public int yellowCandle = 0; public int pearlAura = 0; public int wCleave = 0; @@ -605,6 +606,7 @@ namespace CalamityMod.NPCs npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[BuffID.Webbed] = true; } if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) @@ -2111,6 +2113,8 @@ namespace CalamityMod.NPCs eFreeze--; if (silvaStun > 0) silvaStun--; + if (webbed > 0) + webbed--; if (yellowCandle > 0) yellowCandle--; if (pearlAura > 0) @@ -2167,7 +2171,7 @@ namespace CalamityMod.NPCs { if (silvaStun > 0) npc.velocity = Vector2.Zero; - else if (timeSlow > 0) + else if (timeSlow > 0 || webbed > 0) npc.velocity *= 0.85f; } } @@ -3089,6 +3093,21 @@ namespace CalamityMod.NPCs } } } + if (webbed > 0) + { + if (Main.rand.Next(5) < 4) + { + int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 30, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.1f; + Main.dust[dust].velocity.Y += 0.25f; + if (Main.rand.NextBool(2)) + { + Main.dust[dust].noGravity = false; + Main.dust[dust].scale *= 0.5f; + } + } + } if (gState > 0 || eFreeze > 0) { diff --git a/Projectiles/Rogue/WebBallBol.cs b/Projectiles/Rogue/WebBallBol.cs new file mode 100644 index 0000000000..28106959aa --- /dev/null +++ b/Projectiles/Rogue/WebBallBol.cs @@ -0,0 +1,48 @@ +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class WebBallBol : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Web Ball"); + } + + public override void SetDefaults() + { + projectile.width = 18; + projectile.height = 18; + projectile.friendly = true; + projectile.penetrate = 3; + projectile.timeLeft = 300; + projectile.Calamity().rogue = true; + projectile.aiStyle = 14; + } + + public override void AI() + { + if (Main.rand.NextBool(12)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 30, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.Calamity().stealthStrike == true) + { + target.AddBuff(BuffID.Webbed, 180); + } + else + { + target.AddBuff(BuffID.Webbed, 30); + } + } + } +} + diff --git a/Projectiles/Rogue/WebBallBol.png b/Projectiles/Rogue/WebBallBol.png new file mode 100644 index 0000000000000000000000000000000000000000..3640d6596edc40b538fb9b452d323cd45e97a04e GIT binary patch literal 526 zcmV+p0`dKcP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00CS{L_t(I%e9oTO9D|G$3HIw$$}OY z5z>oDIOs@eGUz`jq?RHfqRp`-q}Bqr#x{w-!7+3!XsMxS2!kMqv_ZmJ8k?@+{3Y)? zH{W-;yWj8LyAPjt?{ zz6;>kX+sXPxx5RoTio!-tg!ZipHy;i)Bs?oFar!$d-M+fNcv>rXk~RV(BavIw=O@E{=#MPSj9EnVraj3GnJOGZJ2B7ua(M}uLLE=&zS8MfubD1HO8zGe>;xPa| zdY^$Ob|M~A{k~QoIpHssb#AnwTtbHc000tnMObu2SV=}YPjYExZggREX>V=-F@#v` Q?*IS*07*qoM6N<$f{0AhzW@LL literal 0 HcmV?d00001 From 1c8bf9fee22ffca0f6ca8de9993473786f7003cb Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 11:53:33 -0500 Subject: [PATCH 23/82] bol list --- CalamityMod.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 08999c1218..dd08a9622a 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1817,7 +1817,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; noGravityList = new List() From 8fe7a141ba34c637fae3915a171bf1c6f59a3ced Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 29 Nov 2019 14:24:10 -0600 Subject: [PATCH 24/82] Final Gael function change --- CalPlayer/CalamityPlayer.cs | 37 +++-- Items/Weapons/Melee/GaelsGreatsword.cs | 145 +++++++++---------- Projectiles/Melee/GaelExplosion.cs | 110 ++++++++++++++ Projectiles/Melee/GaelExplosion.png | Bin 0 -> 2837 bytes Projectiles/Melee/GaelSkull.cs | 28 ++-- Projectiles/Melee/GaelSkull2.cs | 192 +++++++++++++++++++++++++ Projectiles/Melee/GaelSkull2.png | Bin 0 -> 2474 bytes Projectiles/Melee/LightningThing.cs | 54 +++++++ Projectiles/Melee/LightningThing.png | Bin 0 -> 136 bytes 9 files changed, 466 insertions(+), 100 deletions(-) create mode 100644 Projectiles/Melee/GaelExplosion.cs create mode 100644 Projectiles/Melee/GaelExplosion.png create mode 100644 Projectiles/Melee/GaelSkull2.cs create mode 100644 Projectiles/Melee/GaelSkull2.png create mode 100644 Projectiles/Melee/LightningThing.cs create mode 100644 Projectiles/Melee/LightningThing.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f4dddf5150..1767fb3082 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -62,6 +62,11 @@ using Terraria.ModLoader.IO; namespace CalamityMod.CalPlayer { + public enum GaelSwitchPhase + { + LoseRage = 0, + None = 1 + } public class CalamityPlayer : ModPlayer { #region Variables @@ -110,16 +115,17 @@ namespace CalamityMod.CalPlayer public int hInfernoBoost = 0; public int pissWaterBoost = 0; public int gaelRageCooldown = 0; - public int gaelBloodShotCooldown = 0; public int packetTimer = 0; public int bloodflareHeartTimer = 180; public int bloodflareManaTimer = 180; public int moneyStolenByBandit = 0; public int polarisBoostCounter = 0; public int reforges = 0; + public int gaelSwipes = 0; public float modStealth = 1f; public float aquaticBoost = 1f; public float shieldInvinc = 5f; + public GaelSwitchPhase gaelSwitchTimer = 0; // Sound public bool playRogueStealthSound = false; @@ -871,6 +877,7 @@ namespace CalamityMod.CalPlayer thirdSage = false; if (player.immuneTime == 0) thirdSageH = false; + perfmini = false; akato = false; leviPet = false; @@ -1329,7 +1336,8 @@ namespace CalamityMod.CalPlayer #region Debuffs //distanceFromBoss = -1; gaelRageCooldown = 0; - gaelBloodShotCooldown = 0; + gaelSwipes = 0; + gaelSwitchTimer = (GaelSwitchPhase)0; stress = 0; adrenaline = 0; adrenalineMaxTimer = 300; @@ -1569,6 +1577,7 @@ namespace CalamityMod.CalPlayer elysianGuard = false; #endregion + if (CalamityWorld.bossRushActive) { if (!CalamityGlobalNPC.AnyLivingPlayers()) @@ -2051,24 +2060,26 @@ namespace CalamityMod.CalPlayer if (CalamityWorld.downedYharon) { skullCount = 20f; - skullSpeed = 16f; + skullSpeed = 12f; } else if (NPC.downedMoonlord) { skullCount = 13f; - skullSpeed = 13f; + skullSpeed = 10f; } else if (Main.hardMode) { skullCount = 9f; - skullSpeed = 8.75f; + skullSpeed = 6.8f; } for (float i = 0; i < skullCount; i += 1f) { float angle = MathHelper.TwoPi * i / skullCount; - Vector2 initialVelocity = angle.ToRotationVector2() * skullSpeed; - int projectileIndex = Projectile.NewProjectile(player.Center + initialVelocity * 3f, initialVelocity, ModContent.ProjectileType(), damage, 2f, player.whoAmI); + Vector2 initialVelocity = angle.ToRotationVector2().RotatedByRandom(MathHelper.ToRadians(12f)) * skullSpeed * new Vector2(0.82f, 1.5f) * + Main.rand.NextFloat(0.8f, 1.2f) * (i < skullCount / 2 ? 0.25f : 1f); + int projectileIndex = Projectile.NewProjectile(player.Center + initialVelocity * 3f, initialVelocity, ModContent.ProjectileType(), damage, 2f, player.whoAmI); Main.projectile[projectileIndex].tileCollide = false; + Main.projectile[projectileIndex].localAI[1] = (Main.projectile[projectileIndex].velocity.Y < 0f).ToInt(); } stress = 0; } @@ -2946,6 +2957,16 @@ namespace CalamityMod.CalPlayer #endregion #region MiscEffects + if (player.HeldItem.type == ModContent.ItemType()) + { + gaelSwitchTimer = GaelSwitchPhase.LoseRage; + stress += (int)MathHelper.Min(5, 10000 - stress); + } + else if (player.HeldItem.type != ModContent.ItemType() && gaelSwitchTimer == GaelSwitchPhase.LoseRage) + { + stress = 0; + gaelSwitchTimer = GaelSwitchPhase.None; + } if (Config.ProficiencyEnabled) { GetExactLevelUp(); @@ -3336,8 +3357,6 @@ namespace CalamityMod.CalPlayer aBulwarkRareMeleeBoostTimer--; if (bossRushImmunityFrameCurseTimer > 0) bossRushImmunityFrameCurseTimer--; - if (gaelBloodShotCooldown > 0) - gaelBloodShotCooldown--; if (gaelRageCooldown > 0) gaelRageCooldown--; diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 71b71020e3..6277d68bb5 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -1,10 +1,13 @@ using CalamityMod.Projectiles.Melee; +using CalamityMod.World; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.GameInput; using Terraria.Graphics.Capture; using Terraria.ModLoader; +using Terraria.World.Generation; namespace CalamityMod.Items.Weapons.Melee { @@ -28,6 +31,8 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly float TrueMeleeBoostHardmode = 2.5f; + public static readonly float GiantSkullDamageMultiplier = 1.5f; + //Weapon projectile attribute constants public static readonly int BaseSearchDistance = 400; @@ -46,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly int PostYharonImmunityFrames = 2; - public static readonly int SkullsplosionCooldownSeconds = 10; + public static readonly int SkullsplosionCooldownSeconds = 30; public static readonly int PreMoonlordPenetrate = 3; //Infinite after Moon lord is dead @@ -59,18 +64,15 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Gael's Greatsword"); - Tooltip.SetDefault("Raises the player's damage reduction by 10% when wielding this sword\n" + - "There are three random attacks that can occur when the blade is swung\n" + - "The first attack releases two blood-skulls that home in\n" + - "The second attack releases an enormous slow-moving skull\n" + - "This slow-moving skull becomes weaker with time and lasts for around 4 seconds seconds\n" + - "The third attack causes a true melee strike to do more damage than normal\n" + - "If you're below 50% life, swings release blood droplets\n" + - "Pressing the Rage Key while holding this weapon resets Rage to 0 and releases a circle of\n" + - "Slow-moving blood skulls. If Rage is full, the skulls do way more damage. Otherwise, the skull's damage is\n" + - "related to the amount of rage sacrificed\n" + - "This effect has a " + SkullsplosionCooldownSeconds + " second cooldown.\n" + - "The user can right click with the sword to deflect projectiles and enemy attacks 50% of the time"); + Tooltip.SetDefault("First swing fires homing skulls\n" + + "Second swing fires a giant, powerful skull\n" + + "Third swing deals massive damage\n" + + "Constantly generates rage when in use\n" + + "[Swings leave behind exploding blood trails [Below 50% health]]\n" + + "[Right click to swipe the sword, reflecting projectiles at a 50% chance]\n" + + "[Activating Rage Mode releases an enormous barrage of skulls]\n" + + "Upgrades after killing the Wall of Flesh, Moon Lord, and Yharon\n" + + "'Give me that thing, your dark soul'"); } //NOTE: GetWeaponDamage is in the CalamityPlayer file public override void SetDefaults() @@ -114,81 +116,68 @@ namespace CalamityMod.Items.Weapons.Melee } public override void MeleeEffects(Player player, Rectangle hitbox) { - SwingType = Main.rand.Next(3); - - //Almost entirely Ultimus Cleaver code. Feel free to clean it up if you wish. - if (player.whoAmI == Main.myPlayer && - player.statLife < player.statLifeMax * 0.5 && - player.Calamity().gaelBloodShotCooldown == 0) + if (CalamityUtils.CountProjectiles(ModContent.ProjectileType()) < 3 && + player.statLife <= player.statLifeMax2 * 0.5f) { - float velocityY = 0f; - float velocityX = 0f; - float spawnAdditiveY = 0f; - float spawnAdditiveX = 0f; - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.8)) + Point origin = (player.Center + Main.rand.Next(-300, 301) * Vector2.UnitX).ToTileCoordinates(); + Point p; + if (WorldUtils.Find(origin, Searches.Chain(new Searches.Down(400), new GenCondition[] { - velocityY = -7f; + new Conditions.IsSolid() + }), out p)) + { + Projectile.NewProjectile(p.ToWorldCoordinates(8f, 0f), Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI); } - if (player.direction == -1) + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5)) + { + player.Calamity().gaelSwipes++; + if (player.Calamity().gaelSwipes > 3) { - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) + player.Calamity().gaelSwipes = 0; + } + if (player.statLife <= player.statLifeMax2 * 0.5f) + { + for (int i = 0; i < 170; i++) { - spawnAdditiveX -= 8f; + float r = (float)Math.Sqrt(Main.rand.NextDouble()); + float t = Main.rand.NextFloat() * MathHelper.TwoPi; + Vector2 dustSpawn = t.ToRotationVector2() * r * item.Size; + if (dustSpawn.X > item.width / 2) + { + Dust.NewDustPerfect(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, 218, Vector2.Zero).noGravity = true; + } + else + { + //Don't waste this version of "i" just because we failed. Decrease so that we can try again. + i--; + continue; + } + if (Main.rand.NextBool(100)) + { + int damage = BaseDamage; + if (Main.hardMode) + { + damage = HardmodeDamage; + } + if (NPC.downedMoonlord) + { + damage = PostMoonLordDamage; + } + if (CalamityWorld.downedYharon) + { + damage = PostYharonDamage; + } + Projectile.NewProjectile(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI); + } } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) - { - spawnAdditiveX -= 6f; - } - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) - { - spawnAdditiveX = 26f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.6)) - { - velocityY = -6f; - velocityX = 2f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.4)) - { - velocityY = -4f; - velocityX = 4f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3)) - { - spawnAdditiveX -= 4f; - spawnAdditiveY -= 20f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.2)) - { - velocityY = -2f; - velocityX = 6f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) - { - velocityX = 7f; - } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) - { - spawnAdditiveY += 6f; - } - velocityY *= 1.35f; - velocityX *= 1.35f; - spawnAdditiveX *= (float)player.direction * Main.rand.NextFloat(0.9f, 1.1f); - spawnAdditiveY *= player.gravDir; - Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + spawnAdditiveX, (float)(hitbox.Y + hitbox.Height / 2) + spawnAdditiveY, - (float)player.direction * velocityX, velocityY * player.gravDir, ModContent.ProjectileType(), (int)((float)item.damage * 0.35f * player.meleeDamage), 0f, player.whoAmI, 0f, 0f); - - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) - { - player.Calamity().gaelBloodShotCooldown = 30; } } } public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { //True melee boost - if (SwingType == 2) + if (player.Calamity().gaelSwipes == 2) { damage = (int)((Main.hardMode ? TrueMeleeBoostHardmode : TrueMeleeBoostPreHardmode) * damage); } @@ -241,7 +230,7 @@ namespace CalamityMod.Items.Weapons.Melee } return false; } - switch (SwingType) + switch (player.Calamity().gaelSwipes) { //Two small, quick skulls case 0: @@ -255,7 +244,7 @@ namespace CalamityMod.Items.Weapons.Melee break; //Giant, slow, fading skull case 1: - int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, damage * 2, knockBack, player.whoAmI, ai1:1f); + int projectileIndex = Projectile.NewProjectile(position, new Vector2(speedX,speedY) * 0.5f, type, (int)(damage * GiantSkullDamageMultiplier), knockBack, player.whoAmI, ai1:1f); Main.projectile[projectileIndex].scale = 1.75f; break; } diff --git a/Projectiles/Melee/GaelExplosion.cs b/Projectiles/Melee/GaelExplosion.cs new file mode 100644 index 0000000000..961abdffb5 --- /dev/null +++ b/Projectiles/Melee/GaelExplosion.cs @@ -0,0 +1,110 @@ +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Melee +{ + public class GaelExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } + + public override void SetDefaults() + { + projectile.width = 45; + projectile.height = 45; + projectile.friendly = true; + projectile.ignoreWater = false; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = 15; + projectile.melee = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = GaelsGreatsword.BaseImmunityFrames; + + if (CalamityWorld.downedYharon) + { + projectile.localNPCHitCooldown = GaelsGreatsword.PostYharonImmunityFrames; + } + else if (NPC.downedMoonlord) + { + projectile.localNPCHitCooldown = GaelsGreatsword.PostMoonLordImmunityFrames; + } + else if (Main.hardMode) + { + projectile.localNPCHitCooldown = GaelsGreatsword.HardmodeImmunityFrames; + } + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.75f / 255f, (255 - projectile.alpha) * 0.75f / 255f); + if (projectile.localAI[0] == 0f) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 74); + projectile.localAI[0] += 1f; + } + bool flag15 = false; + bool flag16 = false; + if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) + { + flag15 = true; + } + if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) + { + flag15 = true; + } + if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) + { + flag16 = true; + } + if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) + { + flag16 = true; + } + if (flag15 && flag16) + { + projectile.Kill(); + } + float num461 = 25f; + if (projectile.ai[0] > 180f) + { + num461 -= (projectile.ai[0] - 180f) / 2f; + } + if (num461 <= 0f) + { + num461 = 0f; + projectile.Kill(); + } + num461 *= 0.7f; + projectile.ai[0] += 4f; + int num462 = 0; + while ((float)num462 < num461) + { + float num463 = (float)Main.rand.Next(-30, 31); + float num464 = (float)Main.rand.Next(-30, 31); + float num465 = (float)Main.rand.Next(9, 27); + float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464)); + num466 = num465 / num466; + num463 *= num466; + num464 *= num466; + int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 218, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num467].noGravity = true; + Main.dust[num467].position.X = projectile.Center.X; + Main.dust[num467].position.Y = projectile.Center.Y; + Dust dust = Main.dust[num467]; + dust.position.X += (float)Main.rand.Next(-10, 11); + dust = Main.dust[num467]; + dust.position.Y += (float)Main.rand.Next(-10, 11); + Main.dust[num467].velocity.X = num463; + Main.dust[num467].velocity.Y = num464; + num462++; + } + } + } +} diff --git a/Projectiles/Melee/GaelExplosion.png b/Projectiles/Melee/GaelExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..810820c0b4125b92ce89600a7b95716b7649ec32 GIT binary patch literal 2837 zcmV+w3+nWVP)004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000Uv zX+uL$Nkc;*P;zf(X>4Tx07%E3mUmQC*A|D*y?1({%`gH|hTglt0MdJtUPWP;8DJ;_ z4l^{dA)*2iMMRn+NKnLp(NH8-M6nPQRImpm2q-ZaMN}+rM%Ih2ti1Q~^84egZ|$@9 zx%=$B&srA%lBX}1mj+7#kjfMAgFKw+5s^`J>;QlP9$S?PR%=$HTzo3l9?ED;xoI3-JvF1F8#m>QQXW*8-A zz9>Nv%ZWK*kqtikEV84R*{M9Xh{ZXlvs2k(?iKO2Od&_ah_8qXGr62B5#JKAMv5?% zE8;ie*i;TP0{|3BY!`4?i6S-;F^L}%f`(o2L0Dz>ZZynda zx(`h}FNp#{x{a}MR#uh~m%}m=7xWMPPlvyuufAs_KJJh5&|Nw4Oks+EF0LCZEhSCJ zr)Q)ySsc3IpNIG#2mW;)20@&74xhslMTCi_jLS<9wVTK03b<)JI+ypKn)naH{-njZ z7KzgM5l~}{fYfy=Kz{89C<+lE(fh?+|D$id_%I-TdEqLPi*x_)H~nY9rQ#)noA5c# zB`Ac>67n+__r%Wu$9dISw03U@r;Pdb`_%=KWKZEBGfDjQH zqKX(I48#TTN1~8;gpaI8ijWGV0cl0Lkv`-mGK$O~Z&4T&1w}_0qHIx~s8AFOwFb2w zRf4KU9Y%GadQmq~W2jlwM>H9&h}K8jpuNx$=mc~Yx)5D~ZbG-CFQRXwC(y4k7z_=g zjj_UbVj?j~n6;P^%sxyT<{V}aGme?VVzKgAeXJeUAIroFu!Yzv>{0Al>=1SW`vynE zso>0T?zku%50{Utz#YMz!42UiaSM1Uye8fT?~iBWbMU43MtnE^I(`DbK#(SA6YK~f zge1ZyLM5SA?cA^NYNxAX$R>L=^W`U z=_Q#=)*?HSqsRjC4stX30{Id7jRZx)NWx2kEwMqOMxsMvNaDF9UQ$!iNpiJhu4IMe z3CZh{Gg5ddEh!f%rqp_=8mW^~BT{qH6lqgwf9X`|66qt-SEQ$8urgXQZZd3{0-1v{ z7i7jM2t}RZLSa!hQyM83DHBu-Rh#NXO`;Z4zoQONXJut%m&u07X3N&do|YY@Av7(T z7cGTWN;^&)roCIDw8Uu%XUX;@txJZM%*!p6bCl!A70I>9-IjYNPnUO-PnO>$-zoo4 z0i~d)5U7x)uwUV#!pu_YQro4hrA14RFTJM-E9xl*DXvvKsMxPKr=+app_HyvrF21Q zMwzDUsGOu+u6#y$T7{xwufkO+S2?TllrBqmqNmU+>Amz>RYg@#RiSFV>VWEknzmY~ zTE1GF+Cz1MIzv5Pys-#cBCZ~; zMXm#GGH#)6)ozd6)!Y-@Tijj2>R4y()XvmDLKXQ&yjjk&I!+oQOrohQ}U>eb4k~HZbSnyy9x( zW?3$*y{uH6t~>7#3G*6dj`%lF|oWk4CLGP(p*(a%)B zP)E2$IF@OjS(EuDD=h0owsbZxyFW)SXM4_Mu6ypcYf)=iYkTrk^ETy;t#evezaCm2 zx4vhC`i6oH6B|7?9^ORQl)UMue3SgL{8yX9H+L5(6>KaR-{P^QrBI@fUpTVWc5B@> z)Hd$6f$iqotG0hEVi#R4HYu(seqX{Wx%!RiH@;dd*9H0$NjB!N_E9`?+$Pe+^P4d?`Y6!s5po@n0fF?V_0L~w~TL_n-rRgn?4-k z9U46xbhx+Ks=4`y;*ru8xJB49eKh*$jqhB)>uNP@t#6~X6(0k~gvXwKAN&3Aai8No zCm1JMf6)A)ww=;m)B$zmbj)@pc8+#Mb`75NKH1Z4+ui=7(T|5tsh+AiEql834Bs>djZ*&hXA3QVUFm(Q=>&;8Iyl!2)z2f%ZaOm)z zk?4`pJM24CcT?`ZxR-fv;r_-4=m$j)r5;v1Qhe0#v+mDrqn4wm$6Uwy9|u3aKh7F| z_DjYu?mT-%DP~zdZD6*{hzpfVoGnQ(rI47rl{xbNDUeZQr}_casZQ@3HSIKj?nw{^;}Z z!Kc(upZ)~{nDhK^CfpAI000SaNLh0L01m_e01m_fl`9S#0000`NklKm00000NkvXXu0mjfb(L5v literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index 1f2f97675a..68db26dff4 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -62,17 +62,19 @@ namespace CalamityMod.Projectiles.Melee } //Targeting - - NPC target = projectile.Center.ClosestNPCAt(checkingDistance); - projectile.tileCollide = target != null; //Go through walls if we're hunting an NPC - if (target != null) + if (projectile.scale <= 1f) { - float velocityMagnitude = projectile.velocity.Length(); - Vector2 distanceNorm = projectile.DirectionTo(target.Center) * velocityMagnitude * (projectile.Distance(target.Center) < 220f ? 1.3f : 1f); - float inverseTurnSpeed = (projectile.Distance(target.Center) < 240f ? 4f : 13f); - projectile.velocity = (projectile.velocity * inverseTurnSpeed + distanceNorm) / (inverseTurnSpeed + 0.4f); - projectile.velocity.Normalize(); - projectile.velocity *= velocityMagnitude; + NPC target = projectile.Center.ClosestNPCAt(checkingDistance); + projectile.tileCollide = target != null; //Go through walls if we're hunting an NPC + if (target != null) + { + float velocityMagnitude = projectile.velocity.Length(); + Vector2 distanceNorm = projectile.DirectionTo(target.Center) * velocityMagnitude * (projectile.Distance(target.Center) < 220f ? 1.3f : 1f); + float inverseTurnSpeed = (projectile.Distance(target.Center) < 240f ? 4f : 13f); + projectile.velocity = (projectile.velocity * inverseTurnSpeed + distanceNorm) / (inverseTurnSpeed + 0.4f); + projectile.velocity.Normalize(); + projectile.velocity *= velocityMagnitude; + } } //Rotation @@ -93,12 +95,12 @@ namespace CalamityMod.Projectiles.Melee projectile.ai[0] += 1f; if (projectile.ai[0] % 20 == 0f) { - for (int l = 0; l < 24; l++) + for (int l = 0; l < 14; l++) { Vector2 spawnPositionAdditive = Vector2.UnitX * (float)-(float)projectile.width / 2f; - spawnPositionAdditive += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.TwoPi / 24f), default) * new Vector2(8f, 16f) * projectile.scale; + spawnPositionAdditive += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.TwoPi / 14f), default) * new Vector2(8f, 16f) * projectile.scale; spawnPositionAdditive = spawnPositionAdditive.RotatedBy((double)(projectile.rotation), default); - int dustIndex = Dust.NewDust(projectile.Center, 0, 0, 218, 0f, 0f, 0, default, 1.5f); + int dustIndex = Dust.NewDust(projectile.Center, 0, 0, 218, 0f, 0f, 0, new Color(188, 126, 154), 1.5f); Main.dust[dustIndex].noGravity = true; Main.dust[dustIndex].position = projectile.Center + spawnPositionAdditive; Main.dust[dustIndex].velocity = projectile.velocity * 0.1f; diff --git a/Projectiles/Melee/GaelSkull2.cs b/Projectiles/Melee/GaelSkull2.cs new file mode 100644 index 0000000000..be46aba460 --- /dev/null +++ b/Projectiles/Melee/GaelSkull2.cs @@ -0,0 +1,192 @@ +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Melee +{ + public class GaelSkull2 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Skull"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + Main.projFrames[projectile.type] = 5; + } + + public override void SetDefaults() + { + projectile.width = 16; + projectile.height = 16; + projectile.friendly = true; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.penetrate = 2; + projectile.timeLeft = 600; + projectile.light = 1f; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = GaelsGreatsword.BaseImmunityFrames; + + if (CalamityWorld.downedYharon) + { + projectile.localNPCHitCooldown = GaelsGreatsword.PostYharonImmunityFrames; + } + else if (NPC.downedMoonlord) + { + projectile.localNPCHitCooldown = GaelsGreatsword.PostMoonLordImmunityFrames; + } + else if (Main.hardMode) + { + projectile.localNPCHitCooldown = GaelsGreatsword.HardmodeImmunityFrames; + } + } + + public override void AI() + { + float checkingDistance = GaelsGreatsword.BaseSearchDistance; + if (CalamityWorld.downedYharon) + { + checkingDistance = GaelsGreatsword.PostYharonSearchDistance; + } + else if (NPC.downedMoonlord) + { + checkingDistance = GaelsGreatsword.PostMoonLordSearchDistance; + } + else if (Main.hardMode) + { + checkingDistance = GaelsGreatsword.HardmodeSearchDistance; + } + if (projectile.velocity.Length() < 7f) + { + projectile.velocity = Vector2.Normalize(projectile.velocity) * 7f; + } + + //Rotation + + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (-projectile.velocity).ToRotation(); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = projectile.velocity.ToRotation(); + } + + projectile.ai[0] += 1f; + if (projectile.localAI[1] == 1f && projectile.ai[0] < 35f) + { + projectile.velocity.Y += 0.5f; + return; + } + + //Targeting + + NPC target = projectile.Center.ClosestNPCAt(checkingDistance); + projectile.tileCollide = target != null; //Go through walls if we're hunting an NPC + if (target != null) + { + float velocityMagnitude = projectile.velocity.Length(); + Vector2 distanceNorm = projectile.DirectionTo(target.Center) * velocityMagnitude * (projectile.Distance(target.Center) < 220f ? 1.3f : 1f); + float inverseTurnSpeed = (projectile.Distance(target.Center) < 240f ? 4f : 13f); + projectile.velocity = (projectile.velocity * inverseTurnSpeed + distanceNorm) / (inverseTurnSpeed + 0.4f); + projectile.velocity.Normalize(); + projectile.velocity *= velocityMagnitude; + } + + //Dust circle + + if (projectile.ai[0] % 20 == 0f) + { + for (int l = 0; l < 14; l++) + { + Vector2 spawnPositionAdditive = Vector2.UnitX * (float)-(float)projectile.width / 2f; + spawnPositionAdditive += -Vector2.UnitY.RotatedBy((double)((float)l * MathHelper.TwoPi / 14f), default) * new Vector2(8f, 16f) * projectile.scale; + spawnPositionAdditive = spawnPositionAdditive.RotatedBy((double)(projectile.rotation), default); + int dustIndex = Dust.NewDust(projectile.Center, 0, 0, 218, 0f, 0f, 0, new Color(188, 126, 154), 1.5f); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].position = projectile.Center + spawnPositionAdditive; + Main.dust[dustIndex].velocity = projectile.velocity * 0.1f; + Main.dust[dustIndex].velocity = Vector2.Normalize(projectile.Center - projectile.velocity * 3f - Main.dust[dustIndex].position) * 1.25f; + } + } + + //Frame logic + + projectile.frameCounter++; + if (projectile.frameCounter % 5 == 0) + { + projectile.frame++; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + //Fat skull logic + if (projectile.ai[1] == 1f) + { + if (projectile.localAI[0] == 0f && !NPC.downedMoonlord) + { + projectile.penetrate = GaelsGreatsword.PreMoonlordPenetrate; + projectile.localAI[0] = 1f; + } + else if (NPC.downedMoonlord) + { + projectile.penetrate = 5; + } + projectile.alpha += 1; + projectile.damage = (int)Math.Ceiling(projectile.damage * 0.992); //Exponentially decays to a factor of 0.12896 of the original damage + if (projectile.alpha >= 255) + { + projectile.Kill(); + } + } + else if (projectile.alpha > 0) + { + projectile.alpha -= 15; + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + } + } + 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 = projectile.Center; + projectile.width = projectile.height = 240; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.Damage(); + Main.PlaySound((int)SoundType.NPCKilled, (int)projectile.Center.X, (int)projectile.Center.Y, 52, 0.4f); + for (int i = 0; i < 3; i++) + { + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 218, 0f, 0f, 100, default, 1.5f); + } + for (int i = 0; i < 30; i++) + { + float angle = MathHelper.TwoPi * i / 30f; + int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 218, 0f, 0f, 0, default, 2.5f); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].velocity *= 3f; + dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 218, 0f, 0f, 100, default, 1.5f); + Main.dust[dustIndex].velocity *= 2f; + Main.dust[dustIndex].noGravity = true; + Dust.NewDust(projectile.Center + angle.ToRotationVector2() * 160f, 0, 0, 218, 0f, 0f, 100, default, 1.5f); + } + } + } +} diff --git a/Projectiles/Melee/GaelSkull2.png b/Projectiles/Melee/GaelSkull2.png new file mode 100644 index 0000000000000000000000000000000000000000..706be9b2d82f793442671a32cd24c20ba22d68b2 GIT binary patch literal 2474 zcmV;b303xqP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TieDU^D{wD~-JB5)+MHEqMCVbhUe^}M#GZMZb5Tkrq% zRJu3gjeXD5BiH;lw_TC$%{ctdr8{_t-!6$n4*KcDmOLW!i=#lv$t*~7`3p9F19IfI**7D+wgy+d z|6RH_d}UCQAU}_AWSQEUw?HyzW&+Q^$75D1)h(;--ZFq@ro(eD3e>G;PLNg zCeHh*9@hT6WHy3(|JvAnm1!7$>yKF%pX^F&@Hbo;h1K;Ox@A{=%Vp<>2kTqaz0tuJ z;TrC{h5>3BUHO%BH?EK#yL@}Pw-KIy6+6B&)Ms74G#rs8K9>53GTz^9~#j?U(98&2cO5UtEq?E)KK6}Yy6G7BbW*cfAsF~*c)>1%0~GUe}& zOW{vTrI~-86`4Y$OF`c$QyVS~4CiJKL0>7;$r)amH+<=sub98UntX&VTDSyU@wQ$ zr2(N~Wvpqgi4AkQg;A+epfZOrul7$*&oIn1HHPO$&jV2nbE*{ZK4^d)vuv7=h{>l* zJJ)bq!!U|H(40W4lA;xnVHgDK_fA*Xa2h+))HEArqEsomF8-Q4L?qP5{%qVCPL8yR-Gv>}5VR!MJ_F$7MRW>Va6 z#Qba`Wf(YB3Y;!&$Y>1%%%=dg$=I-9G=@QL)(|T!bZgAd{5jc%(>NNqrj_ZY8x z%nUXUa}tHWnJ9%C7Rp;imLuSdp7~aP~0Z48zJC z|GX(|SY;2}W)1<&JA0TI%rHPIB{y@ZQZ7JU+r?|?T>3W6`J^aw$j<|~3ML!oy_Yr| zQL2_fH2(rN$$2Fw(-NU!)wLDT5dgz&Gl#&2Gg-P}28LlkCDIslT|A$U2wriyOZP>t zVXj>m2At(@nmGh`U9YtIBG+)!%wd!@~L>t+J*wM(ghBFar<;2-TWfs`*P;gBv)9Twy0P{AS7@c9j-5bWEvx~m&Au$@m z42<`cIRrL5Hlh_-Zsri!@L1t44sy+c$r(1rtTs#Q(or5keY)uz&%>pdub3$70I*XI zSH1Yi#a8wSytg{H=xJxpV7sJ$J$FAMMr3iMUm zPNt=?H<}t|lyQZc$2qBH!@0nq+EvSjm07i4TES-zan{huw1DC@92taZg-WVL2{k+) zfB$q1M>Ppl_l=Tkxit!S7p%%JVaL2O%{%!fyVBZJ8Tv1~l{sav4=SUux}GX&hO}7@ zRZ^|GRoxpMd=c)_Ok}s|e2lJ)y^)~p)$ss!)ccxgMEHiI8gEP0Wvg3dq`Fn+7tP6) zIZmNfpjJ`4xwwW=dwp3|waoC^8a1bqYAO}O8ARun(pZeB%PZr`u&;{Okj{pc!KU*w z&$nHZYHSwRa8sHZX6EOb#BN!hgOzdTmIR#*cO^0mcwPm*W?I1Dh5<~2uK6WjGc7S1 z!wlE9I+vu*J^7kxiP0Jcsx{*F~*FUrOm@m zrVT{#|Elw~Z;(i1!|I6WdL-Cz-@tH`NP}r)51SqlxlGRRXx}idjn?%VX^d;Q6x^+& zyi#s54VeZI)wT_n=Jbh^wdu%kTbxWIMpMI1rWK-h!)iwW@78fLZAtWIIM*zQ@<}l7 zWLigx)vz)f(KML`)VyxPY3z*JVW;4obGhUu)SOI93}zTC+6BLerU^Be2R7W5wuTwb zFsXzZcHB9c77!X{bG%EI|D1_Tvr+7H$Ip>r;9a%KFcK~gZkxT1cf_ah43xR9hPf+8 z3ANm08i>*@Hq1mdoXg?+pRZqs4dV!iR$g4wfDNLX+i;?ltsMBsh`O~h%;s_vYUl;- z(rN6SuJbcchI12YHk`(#gCl@VcTK1PHVbSxqOW-w@UB?34?0Sy!8CAgDKWTVFhBQ{ znQ1_+tNfC4ONn0W^ogqJ=u88jp+NQlz_bmI6|Qj@SLdEk>zrS*;jzOt4tTc@u;DbW oJj(p!=V4=vF~%5EhPAbS0d|evt~xS4LjV8(07*qoM6N<$f?in4p#T5? literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/LightningThing.cs b/Projectiles/Melee/LightningThing.cs new file mode 100644 index 0000000000..3b8c739181 --- /dev/null +++ b/Projectiles/Melee/LightningThing.cs @@ -0,0 +1,54 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.World; +namespace CalamityMod.Projectiles.Melee +{ + public class LightningThing : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lightning"); + } + + public override void SetDefaults() + { + projectile.width = 2; + projectile.height = 2; + projectile.friendly = true; + projectile.timeLeft = 90; + projectile.melee = true; + } + public override void Kill(int timeLeft) + { + int damage = GaelsGreatsword.BaseDamage; + int customIFrames = GaelsGreatsword.BaseImmunityFrames; + if (Main.hardMode) + { + damage = GaelsGreatsword.HardmodeDamage; + customIFrames = GaelsGreatsword.HardmodeImmunityFrames; + } + if (NPC.downedMoonlord) + { + damage = GaelsGreatsword.PostMoonLordDamage; + customIFrames = GaelsGreatsword.PostMoonLordImmunityFrames; + } + if (CalamityWorld.downedYharon) + { + damage = GaelsGreatsword.PostYharonDamage; + customIFrames = GaelsGreatsword.PostYharonImmunityFrames; + } + for (int i = 0; i < 3; i++) + { + int idx = Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.NextFloat(-35f, 35f), -1600f), Vector2.UnitY * 12f, + ProjectileID.CultistBossLightningOrbArc, damage, 0f, projectile.owner, + MathHelper.PiOver2, Main.rand.Next(100)); + Main.projectile[idx].Calamity().forceMelee = true; + Main.projectile[idx].usesLocalNPCImmunity = true; + Main.projectile[idx].localNPCHitCooldown = customIFrames; + } + } + } +} diff --git a/Projectiles/Melee/LightningThing.png b/Projectiles/Melee/LightningThing.png new file mode 100644 index 0000000000000000000000000000000000000000..0056fc1e2479e11bd6391fc4ccd1fe54fa0d671f GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPgflb|yv^-kZzH%z;9po-U3d5|@+z{QqyyY Date: Fri, 29 Nov 2019 17:32:37 -0600 Subject: [PATCH 25/82] Boosted Gael a bit --- Items/Weapons/Melee/GaelsGreatsword.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index d4e34003be..078b8fa1d3 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -19,13 +19,13 @@ namespace CalamityMod.Items.Weapons.Melee //Weapon attribute constants - public static readonly int BaseDamage = 8; + public static readonly int BaseDamage = 15; - public static readonly int HardmodeDamage = 24; + public static readonly int HardmodeDamage = 33; - public static readonly int PostMoonLordDamage = 170; + public static readonly int PostMoonLordDamage = 213; - public static readonly int PostYharonDamage = 10000; + public static readonly int PostYharonDamage = 14560; public static readonly float TrueMeleeBoostPreHardmode = 1.75f; From 70ac830e1aeda56585e8e4f72ead717a291af7f7 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 29 Nov 2019 18:39:00 -0600 Subject: [PATCH 26/82] Slight nerfs/rebalancing --- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- Items/Weapons/Rogue/FantasyTalisman.cs | 2 +- Items/Weapons/Rogue/GildedDagger.cs | 2 +- Items/Weapons/Rogue/GleamingDagger.cs | 2 +- Items/Weapons/Rogue/ProfanedPartisan.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 078b8fa1d3..281f772b8b 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly int PostMoonLordDamage = 213; - public static readonly int PostYharonDamage = 14560; + public static readonly int PostYharonDamage = 18775; public static readonly float TrueMeleeBoostPreHardmode = 1.75f; diff --git a/Items/Weapons/Rogue/FantasyTalisman.cs b/Items/Weapons/Rogue/FantasyTalisman.cs index 693d5784e2..56d4c7679c 100644 --- a/Items/Weapons/Rogue/FantasyTalisman.cs +++ b/Items/Weapons/Rogue/FantasyTalisman.cs @@ -20,7 +20,7 @@ Stealth strikes release more souls and leave behind souls as they travel"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 80; + item.damage = 69; item.noMelee = true; item.consumable = true; item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/GildedDagger.cs b/Items/Weapons/Rogue/GildedDagger.cs index 69c387ffcb..f2d68b8b35 100644 --- a/Items/Weapons/Rogue/GildedDagger.cs +++ b/Items/Weapons/Rogue/GildedDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 14; + item.damage = 12; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 18; diff --git a/Items/Weapons/Rogue/GleamingDagger.cs b/Items/Weapons/Rogue/GleamingDagger.cs index 7656d1344c..0fb446ba22 100644 --- a/Items/Weapons/Rogue/GleamingDagger.cs +++ b/Items/Weapons/Rogue/GleamingDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 14; + item.damage = 12; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 18; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 0fcb994e32..c7f0452f66 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 450; + item.damage = 395; item.knockBack = 8f; item.crit += 15; From 4d5ac7dd73e873b9e5b42b807cf3b64c7b286c0b Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 29 Nov 2019 18:42:58 -0600 Subject: [PATCH 27/82] Revert "Slight nerfs/rebalancing" This reverts commit 70ac830e1aeda56585e8e4f72ead717a291af7f7. --- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- Items/Weapons/Rogue/FantasyTalisman.cs | 2 +- Items/Weapons/Rogue/GildedDagger.cs | 2 +- Items/Weapons/Rogue/GleamingDagger.cs | 2 +- Items/Weapons/Rogue/ProfanedPartisan.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 281f772b8b..078b8fa1d3 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly int PostMoonLordDamage = 213; - public static readonly int PostYharonDamage = 18775; + public static readonly int PostYharonDamage = 14560; public static readonly float TrueMeleeBoostPreHardmode = 1.75f; diff --git a/Items/Weapons/Rogue/FantasyTalisman.cs b/Items/Weapons/Rogue/FantasyTalisman.cs index 56d4c7679c..693d5784e2 100644 --- a/Items/Weapons/Rogue/FantasyTalisman.cs +++ b/Items/Weapons/Rogue/FantasyTalisman.cs @@ -20,7 +20,7 @@ Stealth strikes release more souls and leave behind souls as they travel"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 69; + item.damage = 80; item.noMelee = true; item.consumable = true; item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/GildedDagger.cs b/Items/Weapons/Rogue/GildedDagger.cs index f2d68b8b35..69c387ffcb 100644 --- a/Items/Weapons/Rogue/GildedDagger.cs +++ b/Items/Weapons/Rogue/GildedDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 12; + item.damage = 14; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 18; diff --git a/Items/Weapons/Rogue/GleamingDagger.cs b/Items/Weapons/Rogue/GleamingDagger.cs index 0fb446ba22..7656d1344c 100644 --- a/Items/Weapons/Rogue/GleamingDagger.cs +++ b/Items/Weapons/Rogue/GleamingDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 12; + item.damage = 14; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 18; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index c7f0452f66..0fcb994e32 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 395; + item.damage = 450; item.knockBack = 8f; item.crit += 15; From 7a59352078136b8e40e27f7af5ceff9b70bb549c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 19:45:34 -0500 Subject: [PATCH 28/82] astral silt and any gold bar meme --- Items/Placeables/FurnitureSilva/SilvaChandelier.cs | 9 +-------- Items/Placeables/FurnitureSilva/SilvaChest.cs | 10 +--------- Items/Placeables/FurnitureSilva/SilvaClock.cs | 10 +--------- Utilities/CalamityRecipes.cs | 3 ++- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/Items/Placeables/FurnitureSilva/SilvaChandelier.cs b/Items/Placeables/FurnitureSilva/SilvaChandelier.cs index b7a95bae99..ad183ce0d3 100644 --- a/Items/Placeables/FurnitureSilva/SilvaChandelier.cs +++ b/Items/Placeables/FurnitureSilva/SilvaChandelier.cs @@ -29,14 +29,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(ModContent.ItemType(), 4); - recipe.AddIngredient(ItemID.GoldBar); - recipe.SetResult(this); - recipe.AddTile(ModContent.TileType()); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 4); - recipe.AddIngredient(ModContent.ItemType(), 4); - recipe.AddIngredient(ItemID.PlatinumBar); + recipe.AddRecipeGroup("AnyGoldBar"); recipe.SetResult(this); recipe.AddTile(ModContent.TileType()); recipe.AddRecipe(); diff --git a/Items/Placeables/FurnitureSilva/SilvaChest.cs b/Items/Placeables/FurnitureSilva/SilvaChest.cs index 5b3dd21f05..61ca4a0ef5 100644 --- a/Items/Placeables/FurnitureSilva/SilvaChest.cs +++ b/Items/Placeables/FurnitureSilva/SilvaChest.cs @@ -27,15 +27,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 8); - recipe.AddIngredient(ItemID.GoldBar); - recipe.anyIronBar = true; - recipe.SetResult(this); - recipe.AddTile(ModContent.TileType()); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 8); - recipe.AddIngredient(ItemID.PlatinumBar); - recipe.anyIronBar = true; + recipe.AddRecipeGroup("AnyGoldBar"); recipe.SetResult(this); recipe.AddTile(ModContent.TileType()); recipe.AddRecipe(); diff --git a/Items/Placeables/FurnitureSilva/SilvaClock.cs b/Items/Placeables/FurnitureSilva/SilvaClock.cs index 7cf838e5e1..3999459299 100644 --- a/Items/Placeables/FurnitureSilva/SilvaClock.cs +++ b/Items/Placeables/FurnitureSilva/SilvaClock.cs @@ -27,15 +27,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.GoldBar, 3); - recipe.anyIronBar = true; - recipe.AddIngredient(ItemID.Glass, 6); - recipe.SetResult(this); - recipe.AddTile(ModContent.TileType()); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ItemID.PlatinumBar, 3); + recipe.AddRecipeGroup("AnyGoldBar", 3); recipe.anyIronBar = true; recipe.AddIngredient(ItemID.Glass, 6); recipe.SetResult(this); diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 7f956c9761..52f7e1d434 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -798,7 +798,8 @@ namespace CalamityMod group = new RecipeGroup(() => "Any Silt", new int[] { ItemID.SiltBlock, - ItemID.SlushBlock + ItemID.SlushBlock, + ModContent.ItemType() }); RecipeGroup.RegisterGroup("SiltGroup", group); From 951a8f15295d1ff4d2f1bf7d63cc911dba9bc8ca Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 29 Nov 2019 19:59:00 -0500 Subject: [PATCH 29/82] more lists --- CalamityMod.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index dd08a9622a..ae0b42a5f5 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1731,6 +1731,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -1795,7 +1796,11 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() }; flaskBombList = new List() From 3b264514a189a5c429bfcb9c47adee26cf9bd68c Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 30 Nov 2019 10:24:38 -0600 Subject: [PATCH 30/82] I loathe this game --- CalPlayer/CalamityPlayer.cs | 31 +--------------- Items/Weapons/Melee/GaelsGreatsword.cs | 51 ++------------------------ 2 files changed, 6 insertions(+), 76 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1ba06e17e0..f4197e69a2 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7299,33 +7299,6 @@ namespace CalamityMod.CalPlayer #region Modify Hit By NPC public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit) { - if (player.HeldItem.type == ModContent.ItemType() - && npc.active && npc.CanBeChasedBy() && player.altFunctionUse == 2 && Main.rand.NextBool(2)) - { - int direction = -1; - if (npc.Center.X < player.Center.X) - { - direction = 1; - } - int damage2 = 15; - if (CalamityWorld.downedYharon) - { - damage2 = GaelsGreatsword.PostYharonDamage; - } - else if (NPC.downedMoonlord) - { - damage2 = GaelsGreatsword.PostMoonLordDamage; - } - else if (Main.hardMode) - { - damage2 = GaelsGreatsword.HardmodeDamage; - } - player.ApplyDamageToNPC(npc, damage2 * 5, 5, -direction, false); - player.immune = true; - player.immuneNoBlink = true; - player.immuneTime = 4; - damage = 0; - } int bossRushDamage = (Main.expertMode ? 500 : 300) + (CalamityWorld.bossRushStage * 2); if (CalamityWorld.bossRushActive) { @@ -7404,7 +7377,7 @@ namespace CalamityMod.CalPlayer int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default(Color), 1f); Main.dust[dustIndex].velocity *= 0.3f; } - int damage2 = 15; + int damage2 = GaelsGreatsword.BaseDamage; if (CalamityWorld.downedYharon) { damage2 = GaelsGreatsword.PostYharonDamage; @@ -7420,7 +7393,7 @@ namespace CalamityMod.CalPlayer proj.hostile = false; proj.friendly = true; proj.velocity *= -1f; - proj.damage = damage2 * 5; + proj.damage = damage2; proj.penetrate = 1; player.immune = true; player.immuneNoBlink = true; diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 078b8fa1d3..c0428dd374 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -15,17 +15,15 @@ namespace CalamityMod.Items.Weapons.Melee { //Help, they're forcing me to slave away at Calamity until I die! - Dominic - public int SwingType; - //Weapon attribute constants - public static readonly int BaseDamage = 15; + public static readonly int BaseDamage = 10; - public static readonly int HardmodeDamage = 33; + public static readonly int HardmodeDamage = 35; public static readonly int PostMoonLordDamage = 213; - public static readonly int PostYharonDamage = 14560; + public static readonly int PostYharonDamage = 16660; public static readonly float TrueMeleeBoostPreHardmode = 1.75f; @@ -184,50 +182,9 @@ namespace CalamityMod.Items.Weapons.Melee } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - //This is mostly from a function in Player.cs which handles the Brand of the Inferno alt click effect - //attackCD = The attack countdown. Can reflect attacks from projectiles and hostile npcs while > 0 - //shield_parry_cooldown = A simple count down variable for effects. if (player.altFunctionUse == 2) { - bool shieldRaised = false; - if (player.selectedItem != 58 && player.controlUseTile && !player.tileInteractionHappened && player.releaseUseItem && !player.controlUseItem && !player.mouseInterface && !CaptureManager.Instance.Active && !Main.HoveringOverAnNPC && !Main.SmartInteractShowingGenuine - && player.inventory[player.selectedItem].type == ModContent.ItemType() && !player.mount.Active && (player.itemAnimation == 0 || PlayerInput.Triggers.JustPressed.MouseRight)) - { - shieldRaised = true; - } - if (player.shield_parry_cooldown > 0) - { - player.shield_parry_cooldown--; - if (player.shield_parry_cooldown == 1) - { - Main.PlaySound(25, -1, -1, 1, 1f, 0f); - for (int i = 0; i < 10; i++) - { - int dustIndex = Dust.NewDust(player.Center + new Vector2((float)(player.direction * 6 + ((player.direction == -1) ? -10 : 0)), -14f), 10, 16, 45, 0f, 0f, 255, new Color(255, 100, 0, 127), (float)Main.rand.NextFloat(1f, 1.6f)); - Main.dust[dustIndex].noLight = true; - Main.dust[dustIndex].noGravity = true; - Main.dust[dustIndex].velocity *= 0.5f; - } - } - } - if (shieldRaised != player.shieldRaised) - { - player.shieldRaised = shieldRaised; - if (player.shieldRaised) - { - player.itemAnimation = 0; - player.itemTime = 0; - player.reuseDelay = 0; - } - else - { - player.shield_parry_cooldown = 15; - if (player.attackCD < 30) - { - player.attackCD = 30; - } - } - } + //CalamityPlayer.cs line 7373. Thank me later. return false; } switch (player.Calamity().gaelSwipes) From 320e2395fdfea50205ba792689836744fbb95cec Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 30 Nov 2019 13:02:55 -0500 Subject: [PATCH 31/82] ethereal extorter (unobtainable), partisan nerf, buff fixes, umbraphile hood fix --- Buffs/StatBuffs/BloodflareBloodFrenzy.cs | 2 +- Buffs/StatBuffs/ElysianGuard.cs | 2 +- Buffs/StatBuffs/PolarisBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorDefBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs | 1 + Buffs/StatBuffs/TarragonCloak.cs | 2 +- Buffs/StatBuffs/TarragonImmunity.cs | 2 +- CalPlayer/CalamityPlayer.cs | 170 +++++++++++++++++- CalPlayer/CalamityPlayerLifeRegen.cs | 3 + CalamityMod.cs | 130 ++++++++++++++ Items/Accessories/EtherealExtorter.cs | 39 ++++ Items/Accessories/EtherealExtorter.png | Bin 0 -> 458 bytes Items/Armor/UmbraphileHood.cs | 4 +- Items/CalamityGlobalItem.cs | 7 +- Items/Weapons/Rogue/ProfanedPartisan.cs | 2 +- Items/Weapons/Rogue/RogueWeapon.cs | 5 + Projectiles/CalamityGlobalProjectile.cs | 38 +++- ...{TyphonsGreed.cs => TyphonsGreedBubble.cs} | 2 +- ...yphonsGreed.png => TyphonsGreedBubble.png} | Bin Projectiles/Melee/TyphonsGreedStaff.cs | 2 +- 21 files changed, 401 insertions(+), 13 deletions(-) create mode 100644 Items/Accessories/EtherealExtorter.cs create mode 100644 Items/Accessories/EtherealExtorter.png rename Projectiles/Melee/{TyphonsGreed.cs => TyphonsGreedBubble.cs} (99%) rename Projectiles/Melee/{TyphonsGreed.png => TyphonsGreedBubble.png} (100%) diff --git a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs index 053a3378e4..8c9ad3837d 100644 --- a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs +++ b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Blood Frenzy"); Description.SetDefault("Contact damage is reduced and melee stats are greatly increased"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/Buffs/StatBuffs/ElysianGuard.cs b/Buffs/StatBuffs/ElysianGuard.cs index 04334f8bfb..018030bcc3 100644 --- a/Buffs/StatBuffs/ElysianGuard.cs +++ b/Buffs/StatBuffs/ElysianGuard.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Elysian Guard"); Description.SetDefault("Movement speed reduced, other stats buffed"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; Main.buffNoTimeDisplay[Type] = true; diff --git a/Buffs/StatBuffs/PolarisBuff.cs b/Buffs/StatBuffs/PolarisBuff.cs index 048a93d7fd..4654acdc1b 100644 --- a/Buffs/StatBuffs/PolarisBuff.cs +++ b/Buffs/StatBuffs/PolarisBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs b/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs index fb78bb33a9..c0feaf6629 100644 --- a/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs b/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs index 491717c3f3..b6f97b4e67 100644 --- a/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs b/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs index 77abb58f91..65a3e88a9c 100644 --- a/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/TarragonCloak.cs b/Buffs/StatBuffs/TarragonCloak.cs index 26400266e5..d6c7e218a2 100644 --- a/Buffs/StatBuffs/TarragonCloak.cs +++ b/Buffs/StatBuffs/TarragonCloak.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Tarragon Cloak"); Description.SetDefault("Contact damage is reduced"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/Buffs/StatBuffs/TarragonImmunity.cs b/Buffs/StatBuffs/TarragonImmunity.cs index 079614f2cb..9645bd17cf 100644 --- a/Buffs/StatBuffs/TarragonImmunity.cs +++ b/Buffs/StatBuffs/TarragonImmunity.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Tarragon Immunity"); Description.SetDefault("You are immune"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1ba06e17e0..05e565be73 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -167,6 +167,7 @@ namespace CalamityMod.CalPlayer public float throwingDamage = 1f; public float throwingVelocity = 1f; public int throwingCrit = 4; + public bool throwingAmmoCost75 = false; public bool throwingAmmoCost66 = false; public bool throwingAmmoCost50 = false; @@ -375,6 +376,7 @@ namespace CalamityMod.CalPlayer public bool ursaSergeant = false; public bool thiefsDime = false; public bool dynamoStemCells = false; + public bool etherealExtorter = false; //public bool dukeScales = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; @@ -870,6 +872,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; throwingCrit = 4; + throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; @@ -1077,6 +1080,7 @@ namespace CalamityMod.CalPlayer ursaSergeant = false; thiefsDime = false; dynamoStemCells = false; + etherealExtorter = false; //dukeScales = false; daedalusReflect = false; @@ -1407,6 +1411,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; throwingCrit = 4; + throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; #endregion @@ -3247,6 +3252,10 @@ namespace CalamityMod.CalPlayer { player.maxFallSpeed *= 1.1f; } + if (etherealExtorter && player.ZoneSkyHeight) + { + player.maxFallSpeed *= 1.25f; + } } if (normalityRelocator) { @@ -4388,6 +4397,84 @@ namespace CalamityMod.CalPlayer { player.Calamity().throwingCrit += 10; } + if (etherealExtorter) + { + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (player.ZoneUnderworldHeight && !ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.endurance += 0.03f; + } + if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type)) + { + player.scope = true; + } + if (ZoneSunkenSea) + { + player.gills = true; + player.ignoreWater = true; + } + if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.statDefense += 5; + } + if (ZoneAstral) + { + if (player.wingTimeMax > 0) + player.wingTimeMax = (int)((double)player.wingTimeMax * 1.05); + } + if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.AddBuff(165, 5, true); //Dryad's Blessing + } + if (ZoneAbyss) + { + player.blind = true; + player.headcovered = true; + player.blackout = true; + if (player.FindBuffIndex(BuffID.Shine) > -1) + { player.ClearBuff(BuffID.Shine); } + if (player.FindBuffIndex(BuffID.NightOwl) > -1) + { player.ClearBuff(BuffID.NightOwl); } + player.nightVision = false; + shine = false; + player.allDamage += 0.2f; + AllCritBoost(5); + player.statDefense += 8; + player.endurance += 0.05f; + } + if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.inventory[player.selectedItem].type)) + { + player.blackBelt = true; + } + if (player.ZoneHoly) + { + player.maxMinions += 1; + player.manaCost *= 0.9f; + player.ammoCost75 = true; //25% chance to not use ranged ammo + throwingAmmoCost75 = true; //25% chance to not consume rogue consumables + } + if (player.ZoneBeach) + { + player.moveSpeed += 0.05f; + } + if (player.ZoneGlowshroom) + { + player.statDefense += 3; + } + if (player.ZoneMeteor) + { + gravityNormalizer = true; + player.slowFall = true; + } + if (Main.moonPhase == 0) //full moon + { + player.fishingSkill += 30; + } + if (Main.moonPhase == 6) //first quarter + { + player.discount = true; + } + } if (harpyRing) { if (player.wingTimeMax > 0) @@ -5250,6 +5337,7 @@ namespace CalamityMod.CalPlayer (silvaSet ? 0.05f : 0f) + (eTracers ? 0.05f : 0f) + (blueCandle ? 0.05f : 0f) + + (etherealExtorter && player.ZoneBeach ? 0.05f : 0f) + ((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) + (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); @@ -5263,6 +5351,7 @@ namespace CalamityMod.CalPlayer (cTracers ? 0.1f : 0f) + (silvaSet ? 0.05f : 0f) + (eTracers ? 0.05f : 0f) + + (etherealExtorter && player.ZoneBeach ? 0.05f : 0f) + ((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) + ((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) + (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); @@ -5624,6 +5713,11 @@ namespace CalamityMod.CalPlayer item.Calamity().rogue && item.useTime > 3) return 1.1f; } + if (etherealExtorter) + { + if (Main.moonPhase == 1 && item.Calamity().rogue && item.useTime > 3) //Waning gibbous + return 1.1f; + } return 1f; } #endregion @@ -5678,6 +5772,10 @@ namespace CalamityMod.CalPlayer { add += 0.1f; } + if (etherealExtorter && player.ZoneDungeon && item.Calamity().rogue && !item.consumable) + { + add += 0.05f; + } if (theBee && player.statLife >= player.statLifeMax2) { @@ -5727,6 +5825,14 @@ namespace CalamityMod.CalPlayer if (moscowMule) { knockback *= 1.09f; + } + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (etherealExtorter) + { + if (player.ZoneOverworldHeight && ZoneForest) + { + knockback *= 1.15f; + } } } #endregion @@ -6264,6 +6370,26 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.Midas, 120, false); } } + if (etherealExtorter) + { + if (ZoneSunkenSea) + { + target.AddBuff(ModContent.BuffType(), 60, false); + } + if (ZoneSulphur) + { + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 300, false); + } + if (Main.moonPhase == 6) //first quarter + { + target.AddBuff(BuffID.Midas, 120, false); + } + if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + } } } #endregion @@ -6920,7 +7046,33 @@ namespace CalamityMod.CalPlayer } if ((filthyGlove || electricianGlove) && proj.Calamity().stealthStrike && proj.Calamity().rogue) { - damageMult += 0.01; + damageMult += 0.1; + } + if (etherealExtorter && proj.Calamity().rogue) + { + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (Main.moonPhase == 7 && crit) //Waxing Gibbous + { + damageMult += 0.05; + } + if (Main.moonPhase == 5) //Waxing Cresent + { + if (proj.penetrate == -1) + damageMult += 0.1; + else if (proj.penetrate >= 5) + damageMult += 0.08; + else if (proj.penetrate == 4) + damageMult += 0.06; + else if (proj.penetrate == 3) + damageMult += 0.03; + else if (proj.penetrate == 2) + damageMult += 0.02; + } + if (player.ZoneDirtLayerHeight && ZoneForest) + { + if (Main.rand.NextBool(20) && !crit) //5% chance to minicrit + damageMult += 0.5; + } } damage = (int)((double)damage * damageMult); @@ -6964,6 +7116,15 @@ namespace CalamityMod.CalPlayer int penetratedDefense = Math.Min(penetratableDefense, 10); damage += (int)(0.5f * penetratedDefense); } + if (proj.Calamity().rogue && etherealExtorter) + { + if (CalamityMod.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt) + { + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 6); + damage += (int)(0.5f * penetratedDefense); + } + } #endregion #region MultiplicativeReductions @@ -10832,7 +10993,7 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (mushy) + if (mushy || (etherealExtorter && player.ZoneGlowshroom)) { if (Main.rand.NextBool(6) && drawInfo.shadow == 0f) { @@ -11039,6 +11200,11 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.2f; } + if (etherealExtorter && Main.moonPhase == 3) //Waning Crescent + { + stealthGenMoving += 0.1f; + } + bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active; // Stealth gen acceleration diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index d6fe6591f6..fe95cc9855 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -585,6 +585,9 @@ namespace CalamityMod.CalPlayer player.lifeRegen += 2; } + if (modPlayer.etherealExtorter || player.ZoneGlowshroom) + player.lifeRegen += 1; + if (!player.shinyStone) { int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800; diff --git a/CalamityMod.cs b/CalamityMod.cs index ae0b42a5f5..9288ae663f 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -46,7 +46,10 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; +using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Typeless; using CalamityMod.Skies; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Furniture; @@ -163,6 +166,11 @@ namespace CalamityMod public static List daggerList; public static List flaskBombList; public static List spikyBallList; + public static List boomerangProjList; + public static List javelinProjList; + public static List daggerProjList; + public static List flaskBombProjList; + public static List spikyBallProjList; public static List noGravityList; public static List lavaFishList; public static List highTestFishList; @@ -336,6 +344,11 @@ namespace CalamityMod daggerList = null; flaskBombList = null; spikyBallList = null; + boomerangProjList = null; + javelinProjList = null; + daggerProjList = null; + flaskBombProjList = null; + spikyBallProjList = null; noGravityList = null; lavaFishList = null; highTestFishList = null; @@ -836,6 +849,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -998,6 +1013,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -1747,11 +1763,44 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() }; + boomerangProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + javelinList = new List() { ModContent.ItemType(), @@ -1772,6 +1821,26 @@ namespace CalamityMod ModContent.ItemType() }; + javelinProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + daggerList = new List() { ModContent.ItemType(), @@ -1803,6 +1872,44 @@ namespace CalamityMod ModContent.ItemType() }; + boomerangProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + flaskBombList = new List() { ModContent.ItemType(), @@ -1816,6 +1923,19 @@ namespace CalamityMod ModContent.ItemType() }; + flaskBombProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + spikyBallList = new List() { ModContent.ItemType(), @@ -1826,6 +1946,16 @@ namespace CalamityMod ModContent.ItemType() }; + spikyBallProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + noGravityList = new List() { ModContent.ItemType(), diff --git a/Items/Accessories/EtherealExtorter.cs b/Items/Accessories/EtherealExtorter.cs new file mode 100644 index 0000000000..0270046c6a --- /dev/null +++ b/Items/Accessories/EtherealExtorter.cs @@ -0,0 +1,39 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class EtherealExtorter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ethereal Extorter"); + Tooltip.SetDefault(@"Infuses souls into your weapons and body generating different boosts that vary with the environment +Rogue projectiles rarely explode into homing souls +10% rogue damage but reduced life regen"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 32; + item.accessory = true; + item.value = Item.buyPrice(0, 24, 0, 0); + item.rare = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.etherealExtorter = true; + modPlayer.throwingDamage += 0.1f; + player.lifeRegen -= 1; //canceled out in mushroom biome btw + if (Main.moonPhase == 4) //new moon + { + modPlayer.rogueStealthMax += 0.1f; + } + } + } +} diff --git a/Items/Accessories/EtherealExtorter.png b/Items/Accessories/EtherealExtorter.png new file mode 100644 index 0000000000000000000000000000000000000000..c257c4e747bea32ed037f9efc711d74ab4041944 GIT binary patch literal 458 zcmV;*0X6=KP)Xqx-uI0CfRke8L<88 zj70hl8V=-F@#v`?*IS*07*qoM6N<$f`&D| A0{{R3 literal 0 HcmV?d00001 diff --git a/Items/Armor/UmbraphileHood.cs b/Items/Armor/UmbraphileHood.cs index 53da9fde5e..86f6f5b55a 100644 --- a/Items/Armor/UmbraphileHood.cs +++ b/Items/Armor/UmbraphileHood.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor player.Calamity().throwingVelocity += 0.10f; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 12); @@ -63,6 +63,6 @@ namespace CalamityMod.Items.Armor recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 72e61dddcb..c8cac5b383 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -450,6 +450,10 @@ namespace CalamityMod.Items { return false; } + if ((item.type == ItemID.ShinePotion || item.type == ItemID.NightOwlPotion) && (modPlayer.etherealExtorter && modPlayer.ZoneAbyss)) + { + return false; + } if ((item.type == ItemID.SuperAbsorbantSponge || item.type == ItemID.EmptyBucket) && modPlayer.ZoneAbyss) { return false; @@ -2414,7 +2418,8 @@ Grants immunity to fire blocks, and temporary immunity to lava"; (modPlayer.soaring ? 0.1f : 0f) + (modPlayer.holyWrath ? 0.05f : 0f) + (modPlayer.profanedRage ? 0.05f : 0f) + - (modPlayer.draconicSurge ? 0.15f : 0f); + (modPlayer.draconicSurge ? 0.15f : 0f) + + (modPlayer.etherealExtorter && modPlayer.ZoneAstral ? 0.05f : 0f); if (flightSpeedMult > 1.2f) flightSpeedMult = 1.2f; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 0fcb994e32..faa79880b6 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 450; + item.damage = 410; item.knockBack = 8f; item.crit += 15; diff --git a/Items/Weapons/Rogue/RogueWeapon.cs b/Items/Weapons/Rogue/RogueWeapon.cs index 38511e189d..f4dc73825b 100644 --- a/Items/Weapons/Rogue/RogueWeapon.cs +++ b/Items/Weapons/Rogue/RogueWeapon.cs @@ -65,6 +65,11 @@ namespace CalamityMod.Items.Weapons.Rogue if (Main.rand.Next(1, 101) > 66) return false; } + if (player.Calamity().throwingAmmoCost75) + { + if (Main.rand.Next(1, 101) > 75) + return false; + } return true; } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 4d6ef70757..0c6a01bd3a 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Projectiles private int counter2 = 0; public bool lineColor = false; //holy mother of god, Eater of Shoals was a pain in the ass + public bool extorterBoost = false; #region SetDefaults public override void SetDefaults(Projectile projectile) @@ -582,6 +583,20 @@ namespace CalamityMod.Projectiles else if (projectile.type == ProjectileID.SoulDrain) projectile.magic = true; + if (Main.player[projectile.owner].Calamity().etherealExtorter) + { + if (CalamityMod.spikyBallProjList.Contains(projectile.type) && extorterBoost == false && Main.moonPhase == 2) //third quarter + { + projectile.timeLeft += 300; + extorterBoost = true; + } + if (CalamityMod.javelinProjList.Contains(projectile.type) && extorterBoost == false && Main.player[projectile.owner].ZoneCrimson) + { + projectile.knockBack *= 2; + extorterBoost = true; + } + } + if (!projectile.npcProj && projectile.friendly && projectile.damage > 0) { if (Main.player[projectile.owner].Calamity().eQuiver && projectile.ranged && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) @@ -1394,7 +1409,6 @@ namespace CalamityMod.Projectiles } } - if (playerC.Calamity().moonCrown && stealthStrike && playerC.Calamity().moonCrownCooldown <= 0) { for (int i = 0; i < 20; i++) @@ -1716,6 +1730,28 @@ namespace CalamityMod.Projectiles } } } + + if (rogue) + { + if (Main.player[projectile.owner].Calamity().etherealExtorter && Main.rand.Next(0, 100) >= 95) + { + for (int num252 = 0; num252 < 3; 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; + int newDamage = (int)((double)projectile.damage * 0.33); + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ProjectileID.LostSoulFriendly, newDamage, 0f, projectile.owner, 0f, 0f); + Main.projectile[soul].Calamity().forceRogue = true; + Main.projectile[soul].timeLeft = 300; + Main.projectile[soul].tileCollide = false; + } + } + } } } #endregion diff --git a/Projectiles/Melee/TyphonsGreed.cs b/Projectiles/Melee/TyphonsGreedBubble.cs similarity index 99% rename from Projectiles/Melee/TyphonsGreed.cs rename to Projectiles/Melee/TyphonsGreedBubble.cs index 4ca1979fd7..773ab62d18 100644 --- a/Projectiles/Melee/TyphonsGreed.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -6,7 +6,7 @@ using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class TyphonsGreed : ModProjectile + public class TyphonsGreedBubble : ModProjectile { public override void SetStaticDefaults() { diff --git a/Projectiles/Melee/TyphonsGreed.png b/Projectiles/Melee/TyphonsGreedBubble.png similarity index 100% rename from Projectiles/Melee/TyphonsGreed.png rename to Projectiles/Melee/TyphonsGreedBubble.png diff --git a/Projectiles/Melee/TyphonsGreedStaff.cs b/Projectiles/Melee/TyphonsGreedStaff.cs index f36befd0ab..651ab03052 100644 --- a/Projectiles/Melee/TyphonsGreedStaff.cs +++ b/Projectiles/Melee/TyphonsGreedStaff.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { float ai1 = Main.rand.NextFloat() + 0.5f; - Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0.0f, ai1); + Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0.0f, ai1); } } } From 501b2d3567254fb8f65aedf6f4ca62831192c7fd Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 30 Nov 2019 13:56:31 -0500 Subject: [PATCH 32/82] Updated some TODOs to be other types --- CalPlayer/CalamityPlayer.cs | 2 +- Items/Ammo/FiniteUse/ExplosiveShells.cs | 2 +- Items/Ammo/FiniteUse/GrenadeRounds.cs | 2 +- Items/Ammo/FiniteUse/MagnumRounds.cs | 2 +- Items/SuperDummy.cs | 2 +- Items/Weapons/Melee/ColdheartIcicle.cs | 2 +- Items/Weapons/Melee/SoulHarvester.cs | 2 +- ModSupport/ModCalls.cs | 24 ++++++++++---------- NPCs/CalamityGlobalNPCLoot.cs | 2 +- Projectiles/Melee/SoulScythe.cs | 2 +- Projectiles/Ranged/ChargedBlast3.cs | 6 ++--- Projectiles/Ranged/FrostsparkBulletProj.cs | 2 +- Projectiles/Ranged/VanquisherArrowMain.cs | 2 +- Projectiles/Typeless/VanquisherArrowSplit.cs | 2 +- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f4dddf5150..46eec458dc 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4959,7 +4959,7 @@ namespace CalamityMod.CalPlayer player.npcTypeNoAggro[ModContent.NPCType()] = true; player.npcTypeNoAggro[ModContent.NPCType()] = true; player.npcTypeNoAggro[ModContent.NPCType()] = true; - // TODO -- When Wulfrum Slimes start being definitely robots, remove this immunity. + // LATER -- When Wulfrum Slimes start being definitely robots, remove this immunity. player.npcTypeNoAggro[ModContent.NPCType()] = true; } diff --git a/Items/Ammo/FiniteUse/ExplosiveShells.cs b/Items/Ammo/FiniteUse/ExplosiveShells.cs index 7dbcb89086..46393b7ecd 100644 --- a/Items/Ammo/FiniteUse/ExplosiveShells.cs +++ b/Items/Ammo/FiniteUse/ExplosiveShells.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.ammo = ModContent.ItemType(); // TODO -- would item.type work here + item.ammo = ModContent.ItemType(); // CONSIDER -- Would item.type work here instead of a self reference? } } } diff --git a/Items/Ammo/FiniteUse/GrenadeRounds.cs b/Items/Ammo/FiniteUse/GrenadeRounds.cs index a7ba5dbf3d..f8921b4f9b 100644 --- a/Items/Ammo/FiniteUse/GrenadeRounds.cs +++ b/Items/Ammo/FiniteUse/GrenadeRounds.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.ammo = ModContent.ItemType(); // TODO -- would item.type work here + item.ammo = ModContent.ItemType(); // CONSIDER -- Would item.type work here instead of a self reference? } } } diff --git a/Items/Ammo/FiniteUse/MagnumRounds.cs b/Items/Ammo/FiniteUse/MagnumRounds.cs index 6cd9275875..95cb8a4c6e 100644 --- a/Items/Ammo/FiniteUse/MagnumRounds.cs +++ b/Items/Ammo/FiniteUse/MagnumRounds.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Ammo.FiniteUse item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.ammo = ModContent.ItemType(); // TODO -- would item.type work here + item.ammo = ModContent.ItemType(); // CONSIDER -- Would item.type work here instead of a self reference? } } } diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index 64f1af914a..7328bdd785 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items return true; } - // TODO -- Make Super Dummies work in multiplayer by spawning correctly. + // DEFECT -- Make Super Dummies work in multiplayer by spawning correctly. public override bool UseItem(Player player) { if (player.altFunctionUse == 2) diff --git a/Items/Weapons/Melee/ColdheartIcicle.cs b/Items/Weapons/Melee/ColdheartIcicle.cs index 56e76644bf..aa52321516 100644 --- a/Items/Weapons/Melee/ColdheartIcicle.cs +++ b/Items/Weapons/Melee/ColdheartIcicle.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee crit = false; } - // TODO -- Providence specifically is immune to Coldheart Icicle. There is probably a better way to do this + // LATER -- Providence specifically is immune to Coldheart Icicle. There is probably a better way to do this public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref float knockBack, ref bool crit) { damage = 1; diff --git a/Items/Weapons/Melee/SoulHarvester.cs b/Items/Weapons/Melee/SoulHarvester.cs index a8a85a387e..80a66f5cee 100644 --- a/Items/Weapons/Melee/SoulHarvester.cs +++ b/Items/Weapons/Melee/SoulHarvester.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee { Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 14); - // TODO -- HiveBombExplosion doesn't exist. Is it supposed to? + // DEFECT -- HiveBombExplosion does not exist. // Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer); for (int num621 = 0; num621 < 30; num621++) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index e5c421e4fb..a416b0cd43 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -445,7 +445,7 @@ namespace CalamityMod setBonus = setBonus.ToLower(); - // TODO -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function + // LATER -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function // Victide if (setBonus == "victide_summon" || setBonus == "victide summon") @@ -682,7 +682,7 @@ namespace CalamityMod if (setBonus == "victide_summon" || setBonus == "victide summon") { mp.victideSet = enabled; - mp.urchin = enabled; // TODO -- remove this when player.urchin actually controls victide summoner + mp.urchin = enabled; // LATER -- remove this when player.urchin actually controls victide summoner return true; } else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) @@ -695,7 +695,7 @@ namespace CalamityMod if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") { mp.aeroSet = enabled; - mp.valkyrie = enabled; // TODO -- remove this when player.valkyrie actually controls aerospec summoner + mp.valkyrie = enabled; // LATER -- remove this when player.valkyrie actually controls aerospec summoner return true; } else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) @@ -708,7 +708,7 @@ namespace CalamityMod if (setBonus == "statigel_summon" || setBonus == "statigel summon") { mp.statigelSet = enabled; - mp.slimeGod = enabled; // TODO -- remove this when player.slimeGod actually controls statigel summoner + mp.slimeGod = enabled; // LATER -- remove this when player.slimeGod actually controls statigel summoner return true; } else if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) @@ -743,7 +743,7 @@ namespace CalamityMod return true; case "daedalus_summon": case "daedalus summon": - mp.daedalusCrystal = enabled; // TODO -- remove this when player.daedalusCrystal actually controls daedalus summoner + mp.daedalusCrystal = enabled; // LATER -- remove this when player.daedalusCrystal actually controls daedalus summoner return true; case "daedalus_rogue": case "daedalus rogue": @@ -770,7 +770,7 @@ namespace CalamityMod return true; case "reaver_summon": case "reaver summon": - mp.reaverOrb = enabled; // TODO -- remove this when player.reaverOrb actually controls reaver summoner + mp.reaverOrb = enabled; // LATER -- remove this when player.reaverOrb actually controls reaver summoner return true; case "reaver_rogue": case "reaver rogue": @@ -804,7 +804,7 @@ namespace CalamityMod case "ataxia_summon": case "ataxia summon": mp.ataxiaBlaze = enabled; - mp.chaosSpirit = enabled; // TODO -- remove this when player.chaosSpirit actually controls ataxia summoner + mp.chaosSpirit = enabled; // LATER -- remove this when player.chaosSpirit actually controls ataxia summoner return true; case "ataxia_rogue": case "ataxia rogue": @@ -853,7 +853,7 @@ namespace CalamityMod case "tarragon_summon": case "tarragon summon": mp.tarraSet = enabled; - mp.tarraSummon = enabled; // TODO -- remove this when player.tarraSummon actually controls life aura + mp.tarraSummon = enabled; // LATER -- remove this when player.tarraSummon actually controls life aura return true; case "tarragon_rogue": case "tarragon rogue": @@ -888,7 +888,7 @@ namespace CalamityMod case "bloodflare_summon": case "bloodflare summon": mp.bloodflareSet = enabled; - mp.bloodflareSummon = enabled; // TODO -- remove this when player.bloodflareSummon actually controls bloodflare orbs + mp.bloodflareSummon = enabled; // LATER -- remove this when player.bloodflareSummon actually controls bloodflare orbs return true; case "bloodflare_rogue": case "bloodflare rogue": @@ -935,7 +935,7 @@ namespace CalamityMod case "godslayer summon": case "god slayer summon": mp.godSlayer = enabled; - mp.godSlayerSummon = enabled; // TODO -- remove this when player.godSlayerSummon actually controls mechworm + mp.godSlayerSummon = enabled; // LATER -- remove this when player.godSlayerSummon actually controls mechworm return true; case "godslayer_rogue": case "godslayer rogue": @@ -971,7 +971,7 @@ namespace CalamityMod case "silva_summon": case "silva summon": mp.silvaSet = enabled; - mp.silvaSummon = enabled; // TODO -- remove this when player.silvaSummon actually controls silva crystal + mp.silvaSummon = enabled; // LATER -- remove this when player.silvaSummon actually controls silva crystal return true; case "silva_rogue": case "silva rogue": @@ -1075,7 +1075,7 @@ namespace CalamityMod if (setBonus == "demonshade") { mp.dsSetBonus = enabled; - mp.rDevil = enabled; // TODO -- remove this when player.rDevil controls demonshade summoned minion + mp.rDevil = enabled; // LATER -- remove this when player.rDevil controls demonshade summoned minion return true; } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index d1952787fb..a66fcc74d7 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -701,7 +701,7 @@ namespace CalamityMod.NPCs { ResetAdrenaline(npc); - // TODO -- this could be abused to have Draedon Mayhem effects active nigh indefinitely or in all sorts of weird conditions + // LATER -- keeping bosses alive lets draedon mayhem continue even after killing mechs // Reset Draedon Mayhem to false if no bosses are alive if (CalamityGlobalNPC.DraedonMayhem) { diff --git a/Projectiles/Melee/SoulScythe.cs b/Projectiles/Melee/SoulScythe.cs index 183ff053ca..408fb40701 100644 --- a/Projectiles/Melee/SoulScythe.cs +++ b/Projectiles/Melee/SoulScythe.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(2, (int)target.position.X, (int)target.position.Y, 14); if (projectile.owner == Main.myPlayer) { - // TODO -- HiveBombExplosion does not exist. + // DEFECT -- HiveBombExplosion does not exist. // Projectile.NewProjectile(target.Center.X, target.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } projectile.position.X = projectile.position.X + (float)(projectile.width / 2); diff --git a/Projectiles/Ranged/ChargedBlast3.cs b/Projectiles/Ranged/ChargedBlast3.cs index 1d3c8443ae..9eca4e211a 100644 --- a/Projectiles/Ranged/ChargedBlast3.cs +++ b/Projectiles/Ranged/ChargedBlast3.cs @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool OnTileCollide(Vector2 oldVelocity) { - // TODO -- HiveExplosion does not exist. + // DEFECT -- HiveExplosion does not exist. // int explode = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack, projectile.owner, 0f, 0f); // Main.projectile[explode].penetrate = 1; Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62); @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Ranged public override void Kill(int timeLeft) { - // TODO -- HiveExplosion does not exist. + // DEFECT -- HiveExplosion does not exist. // int explode = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack, projectile.owner, 0f, 0f); // Main.projectile[explode].penetrate = 1; Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62); @@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.immune[projectile.owner] = 2; - // TODO -- HiveExplosion does not exist. + // DEFECT -- HiveExplosion does not exist. // int explode = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack, projectile.owner, 0f, 0f); // Main.projectile[explode].penetrate = 1; projectile.position.X = projectile.position.X + (float)(projectile.width / 2); diff --git a/Projectiles/Ranged/FrostsparkBulletProj.cs b/Projectiles/Ranged/FrostsparkBulletProj.cs index a1f30c2089..b7cbd4ae18 100644 --- a/Projectiles/Ranged/FrostsparkBulletProj.cs +++ b/Projectiles/Ranged/FrostsparkBulletProj.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Ranged public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); - // TODO -- BoltExplosion does not exist. + // DEFECT -- BoltExplosion does not exist. // Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); int num212 = Main.rand.Next(10, 20); for (int num213 = 0; num213 < num212; num213++) diff --git a/Projectiles/Ranged/VanquisherArrowMain.cs b/Projectiles/Ranged/VanquisherArrowMain.cs index cb5e0a69af..b90d3dae9e 100644 --- a/Projectiles/Ranged/VanquisherArrowMain.cs +++ b/Projectiles/Ranged/VanquisherArrowMain.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Ranged } } - // TODO -- Vanquisher Arrow projectile glowmask doesn't work. + // DEFECT -- Vanquisher Arrow projectile glowmask doesn't work. /* public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) { diff --git a/Projectiles/Typeless/VanquisherArrowSplit.cs b/Projectiles/Typeless/VanquisherArrowSplit.cs index 475242cda5..e8ea00ba8c 100644 --- a/Projectiles/Typeless/VanquisherArrowSplit.cs +++ b/Projectiles/Typeless/VanquisherArrowSplit.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Typeless } } - // TODO -- Vanquisher Arrow duplicate projectile glow doesn't work. + // DEFECT -- Vanquisher Arrow duplicate projectile glow doesn't work. /* public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) { From 88c6fd68ec8a88ef6bb6cb7bc2f043f916249548 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 30 Nov 2019 13:57:32 -0500 Subject: [PATCH 33/82] Refactored all tile code, mostly null safety Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently. --- CalamityMod.cs | 6 +- Tiles/Abyss/AbyssGravel.cs | 6 +- Tiles/Abyss/PlantyMush.cs | 6 +- Tiles/Abyss/SulphurousSand.cs | 6 +- Tiles/Abyss/Tenebris.cs | 6 +- Tiles/Abyss/Voidstone.cs | 6 +- Tiles/AerialiteBrick.cs | 2 +- Tiles/Astral/AstralChestLocked.cs | 2 +- Tiles/Astral/AstralClay.cs | 8 +- Tiles/Astral/AstralDirt.cs | 16 +- Tiles/Astral/AstralGrass.cs | 10 +- Tiles/Astral/AstralMonolith.cs | 14 +- Tiles/Astral/AstralSilt.cs | 8 +- Tiles/Astral/AstralStone.cs | 8 +- Tiles/AstralBrick.cs | 2 +- Tiles/AstralDesert/AstralFossil.cs | 8 +- Tiles/AstralDesert/AstralSand.cs | 10 +- Tiles/AstralDesert/AstralSandstone.cs | 10 +- Tiles/AstralDesert/HardenedAstralSand.cs | 10 +- Tiles/AstralSnow/AstralIce.cs | 8 +- Tiles/AstralSnow/AstralSnow.cs | 10 +- Tiles/CalamityGlobalTile.cs | 240 ++---- Tiles/Cinderplate.cs | 2 +- Tiles/Crags/BrimstoneSlag.cs | 8 +- Tiles/CryonicBrick.cs | 4 +- Tiles/FurnitureAbyss/AbyssBath.cs | 2 +- Tiles/FurnitureAbyss/AbyssBed.cs | 2 +- Tiles/FurnitureAbyss/AbyssBookcase.cs | 2 +- Tiles/FurnitureAbyss/AbyssCandelabra.cs | 2 +- Tiles/FurnitureAbyss/AbyssChair.cs | 2 +- Tiles/FurnitureAbyss/AbyssChandelier.cs | 2 +- Tiles/FurnitureAbyss/AbyssChest.cs | 2 +- Tiles/FurnitureAbyss/AbyssClock.cs | 2 +- Tiles/FurnitureAbyss/AbyssDoorClosed.cs | 2 +- Tiles/FurnitureAbyss/AbyssDoorOpen.cs | 2 +- Tiles/FurnitureAbyss/AbyssDresser.cs | 2 +- Tiles/FurnitureAbyss/AbyssLamp.cs | 2 +- Tiles/FurnitureAbyss/AbyssLantern.cs | 2 +- Tiles/FurnitureAbyss/AbyssPiano.cs | 2 +- Tiles/FurnitureAbyss/AbyssSink.cs | 2 +- Tiles/FurnitureAbyss/AbyssSofa.cs | 2 +- Tiles/FurnitureAbyss/AbyssTable.cs | 2 +- Tiles/FurnitureAbyss/AbyssTorch.cs | 2 +- Tiles/FurnitureAbyss/AbyssWorkbench.cs | 2 +- Tiles/FurnitureAbyss/SmoothAbyssGravel.cs | 8 +- .../SmoothAbyssGravelPlatform.cs | 2 +- Tiles/FurnitureAncient/AncientBath.cs | 2 +- Tiles/FurnitureAncient/AncientBed.cs | 2 +- Tiles/FurnitureAncient/AncientBookcase.cs | 2 +- Tiles/FurnitureAncient/AncientChair.cs | 2 +- Tiles/FurnitureAncient/AncientChandelier.cs | 2 +- Tiles/FurnitureAncient/AncientDoorClosed.cs | 2 +- Tiles/FurnitureAncient/AncientDoorOpen.cs | 2 +- Tiles/FurnitureAncient/AncientDresser.cs | 2 +- Tiles/FurnitureAncient/AncientLamp.cs | 2 +- Tiles/FurnitureAncient/AncientLantern.cs | 2 +- Tiles/FurnitureAncient/AncientMonolith.cs | 2 +- Tiles/FurnitureAncient/AncientSink.cs | 2 +- Tiles/FurnitureAncient/AncientSofa.cs | 2 +- Tiles/FurnitureAncient/AncientTable.cs | 2 +- Tiles/FurnitureAncient/AncientWorkbench.cs | 2 +- Tiles/FurnitureAshen/AshenBath.cs | 2 +- Tiles/FurnitureAshen/AshenBed.cs | 2 +- Tiles/FurnitureAshen/AshenBookcase.cs | 2 +- Tiles/FurnitureAshen/AshenCandelabra.cs | 2 +- Tiles/FurnitureAshen/AshenCandle.cs | 2 +- Tiles/FurnitureAshen/AshenChair.cs | 2 +- Tiles/FurnitureAshen/AshenChandelier.cs | 2 +- Tiles/FurnitureAshen/AshenChest.cs | 2 +- Tiles/FurnitureAshen/AshenDoorClosed.cs | 2 +- Tiles/FurnitureAshen/AshenDoorOpen.cs | 2 +- Tiles/FurnitureAshen/AshenDresser.cs | 2 +- Tiles/FurnitureAshen/AshenLamp.cs | 2 +- Tiles/FurnitureAshen/AshenLantern.cs | 2 +- Tiles/FurnitureAshen/AshenMonolith.cs | 2 +- Tiles/FurnitureAshen/AshenPlatform.cs | 2 +- Tiles/FurnitureAshen/AshenSink.cs | 2 +- Tiles/FurnitureAshen/AshenSofa.cs | 2 +- Tiles/FurnitureAshen/AshenTable.cs | 2 +- Tiles/FurnitureAshen/AshenWorkbench.cs | 2 +- Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs | 8 +- Tiles/FurnitureBotanic/BotanicBathtub.cs | 2 +- Tiles/FurnitureBotanic/BotanicBed.cs | 2 +- Tiles/FurnitureBotanic/BotanicBench.cs | 2 +- Tiles/FurnitureBotanic/BotanicBookcase.cs | 2 +- Tiles/FurnitureBotanic/BotanicCandelabra.cs | 2 +- Tiles/FurnitureBotanic/BotanicCandle.cs | 2 +- Tiles/FurnitureBotanic/BotanicChair.cs | 2 +- Tiles/FurnitureBotanic/BotanicChandelier.cs | 2 +- Tiles/FurnitureBotanic/BotanicChest.cs | 2 +- Tiles/FurnitureBotanic/BotanicClock.cs | 2 +- Tiles/FurnitureBotanic/BotanicDoorClosed.cs | 2 +- Tiles/FurnitureBotanic/BotanicDoorOpen.cs | 2 +- Tiles/FurnitureBotanic/BotanicDresser.cs | 2 +- Tiles/FurnitureBotanic/BotanicLamp.cs | 2 +- Tiles/FurnitureBotanic/BotanicLantern.cs | 2 +- Tiles/FurnitureBotanic/BotanicPiano.cs | 2 +- Tiles/FurnitureBotanic/BotanicPlatform.cs | 2 +- Tiles/FurnitureBotanic/BotanicSink.cs | 2 +- Tiles/FurnitureBotanic/BotanicTable.cs | 2 +- Tiles/FurnitureBotanic/BotanicWorkBench.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBath.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBed.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBookcase.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBrick.cs | 2 +- .../FurnitureCosmilite/CosmiliteCandelabra.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteCandle.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteChair.cs | 2 +- .../FurnitureCosmilite/CosmiliteChandelier.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteChest.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteClock.cs | 2 +- .../FurnitureCosmilite/CosmiliteDoorClosed.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteDresser.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteLamp.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteLantern.cs | 2 +- Tiles/FurnitureCosmilite/CosmilitePiano.cs | 2 +- Tiles/FurnitureCosmilite/CosmilitePlatform.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteSink.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteSofa.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteTable.cs | 2 +- .../FurnitureCosmilite/CosmiliteWorkbench.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicBathtub.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicBed.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicBench.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicBookcase.cs | 2 +- .../FurnitureEutrophic/EutrophicCandelabra.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicCandle.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicChair.cs | 2 +- .../FurnitureEutrophic/EutrophicChandelier.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicChest.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicClock.cs | 2 +- .../FurnitureEutrophic/EutrophicDoorClosed.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicDresser.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicLamp.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicLantern.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicPiano.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicPlatform.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicSink.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicTable.cs | 2 +- .../FurnitureEutrophic/EutrophicWorkBench.cs | 2 +- Tiles/FurnitureEutrophic/SmoothNavystone.cs | 8 +- Tiles/FurnitureOccult/OccultBathtub.cs | 2 +- Tiles/FurnitureOccult/OccultBed.cs | 2 +- Tiles/FurnitureOccult/OccultBookcase.cs | 2 +- Tiles/FurnitureOccult/OccultCandelabra.cs | 2 +- Tiles/FurnitureOccult/OccultCandle.cs | 2 +- Tiles/FurnitureOccult/OccultChair.cs | 2 +- Tiles/FurnitureOccult/OccultChandelier.cs | 2 +- Tiles/FurnitureOccult/OccultChest.cs | 2 +- Tiles/FurnitureOccult/OccultClock.cs | 2 +- Tiles/FurnitureOccult/OccultDoorClosed.cs | 2 +- Tiles/FurnitureOccult/OccultDoorOpen.cs | 2 +- Tiles/FurnitureOccult/OccultDresser.cs | 2 +- Tiles/FurnitureOccult/OccultLamp.cs | 2 +- Tiles/FurnitureOccult/OccultLantern.cs | 2 +- Tiles/FurnitureOccult/OccultPiano.cs | 2 +- Tiles/FurnitureOccult/OccultPlatform.cs | 2 +- Tiles/FurnitureOccult/OccultSink.cs | 2 +- Tiles/FurnitureOccult/OccultSofa.cs | 2 +- Tiles/FurnitureOccult/OccultStone.cs | 6 +- Tiles/FurnitureOccult/OccultTable.cs | 2 +- Tiles/FurnitureOccult/OccultWorkbench.cs | 2 +- Tiles/FurniturePlaguedPlate/PlaguedPlate.cs | 2 +- .../PlaguedPlateBathtub.cs | 2 +- .../PlaguedPlateBookcase.cs | 2 +- .../PlaguedPlateCandelabra.cs | 2 +- .../PlaguedPlateCandle.cs | 2 +- .../PlaguedPlateChair.cs | 2 +- .../PlaguedPlateChandelier.cs | 2 +- .../PlaguedPlateChest.cs | 2 +- .../PlaguedPlateClock.cs | 2 +- .../PlaguedPlateDoorClosed.cs | 2 +- .../PlaguedPlateDoorOpen.cs | 2 +- .../PlaguedPlateDresser.cs | 2 +- .../FurniturePlaguedPlate/PlaguedPlateLamp.cs | 2 +- .../PlaguedPlateLantern.cs | 2 +- .../PlaguedPlatePiano.cs | 2 +- .../PlaguedPlatePlatform.cs | 2 +- .../FurniturePlaguedPlate/PlaguedPlateSink.cs | 2 +- .../FurniturePlaguedPlate/PlaguedPlateSofa.cs | 2 +- .../PlaguedPlateTable.cs | 2 +- .../PlaguedPlateWorkbench.cs | 2 +- Tiles/FurnitureProfaned/ProfanedBath.cs | 2 +- Tiles/FurnitureProfaned/ProfanedBed.cs | 2 +- Tiles/FurnitureProfaned/ProfanedBench.cs | 2 +- Tiles/FurnitureProfaned/ProfanedBookcase.cs | 2 +- Tiles/FurnitureProfaned/ProfanedCandelabra.cs | 2 +- Tiles/FurnitureProfaned/ProfanedCandle.cs | 2 +- Tiles/FurnitureProfaned/ProfanedChair.cs | 2 +- Tiles/FurnitureProfaned/ProfanedChandelier.cs | 4 +- Tiles/FurnitureProfaned/ProfanedChest.cs | 2 +- Tiles/FurnitureProfaned/ProfanedClock.cs | 2 +- Tiles/FurnitureProfaned/ProfanedCrystal.cs | 8 +- Tiles/FurnitureProfaned/ProfanedDoorClosed.cs | 2 +- Tiles/FurnitureProfaned/ProfanedDoorOpen.cs | 2 +- Tiles/FurnitureProfaned/ProfanedDresser.cs | 2 +- Tiles/FurnitureProfaned/ProfanedLamp.cs | 2 +- Tiles/FurnitureProfaned/ProfanedLantern.cs | 2 +- Tiles/FurnitureProfaned/ProfanedPlatform.cs | 2 +- Tiles/FurnitureProfaned/ProfanedRock.cs | 6 +- Tiles/FurnitureProfaned/ProfanedSink.cs | 2 +- Tiles/FurnitureProfaned/ProfanedSlab.cs | 8 +- Tiles/FurnitureProfaned/ProfanedTable.cs | 2 +- Tiles/FurnitureProfaned/ProfanedWorkbench.cs | 2 +- Tiles/FurnitureProfaned/RunicProfanedBrick.cs | 6 +- Tiles/FurnitureSilva/SilvaBathtub.cs | 2 +- Tiles/FurnitureSilva/SilvaBed.cs | 2 +- Tiles/FurnitureSilva/SilvaBench.cs | 2 +- Tiles/FurnitureSilva/SilvaBookcase.cs | 2 +- Tiles/FurnitureSilva/SilvaCandelabra.cs | 2 +- Tiles/FurnitureSilva/SilvaCandle.cs | 2 +- Tiles/FurnitureSilva/SilvaChair.cs | 2 +- Tiles/FurnitureSilva/SilvaChandelier.cs | 2 +- Tiles/FurnitureSilva/SilvaChest.cs | 2 +- Tiles/FurnitureSilva/SilvaClock.cs | 2 +- Tiles/FurnitureSilva/SilvaCrystal.cs | 2 +- Tiles/FurnitureSilva/SilvaDoorClosed.cs | 2 +- Tiles/FurnitureSilva/SilvaDoorOpen.cs | 2 +- Tiles/FurnitureSilva/SilvaDresser.cs | 2 +- Tiles/FurnitureSilva/SilvaLamp.cs | 2 +- Tiles/FurnitureSilva/SilvaLantern.cs | 2 +- Tiles/FurnitureSilva/SilvaPiano.cs | 2 +- Tiles/FurnitureSilva/SilvaPlatform.cs | 2 +- Tiles/FurnitureSilva/SilvaSink.cs | 2 +- Tiles/FurnitureSilva/SilvaTable.cs | 2 +- Tiles/FurnitureSilva/SilvaWorkBench.cs | 2 +- Tiles/FurnitureStatigel/StatigelBath.cs | 2 +- Tiles/FurnitureStatigel/StatigelBed.cs | 2 +- Tiles/FurnitureStatigel/StatigelBlock.cs | 6 +- Tiles/FurnitureStatigel/StatigelBookcase.cs | 2 +- Tiles/FurnitureStatigel/StatigelCandelabra.cs | 2 +- Tiles/FurnitureStatigel/StatigelCandle.cs | 2 +- Tiles/FurnitureStatigel/StatigelChair.cs | 2 +- Tiles/FurnitureStatigel/StatigelChandelier.cs | 2 +- Tiles/FurnitureStatigel/StatigelChest.cs | 2 +- Tiles/FurnitureStatigel/StatigelClock.cs | 2 +- Tiles/FurnitureStatigel/StatigelDoorClosed.cs | 2 +- Tiles/FurnitureStatigel/StatigelDoorOpen.cs | 2 +- Tiles/FurnitureStatigel/StatigelDresser.cs | 2 +- Tiles/FurnitureStatigel/StatigelLamp.cs | 2 +- Tiles/FurnitureStatigel/StatigelLantern.cs | 2 +- Tiles/FurnitureStatigel/StatigelPiano.cs | 2 +- Tiles/FurnitureStatigel/StatigelPlatform.cs | 2 +- Tiles/FurnitureStatigel/StatigelSink.cs | 2 +- Tiles/FurnitureStatigel/StatigelSofa.cs | 2 +- Tiles/FurnitureStatigel/StatigelTable.cs | 2 +- Tiles/FurnitureStatigel/StatigelWorkbench.cs | 2 +- Tiles/FurnitureStratus/StratusBathtub.cs | 2 +- Tiles/FurnitureStratus/StratusBed.cs | 2 +- Tiles/FurnitureStratus/StratusBookcase.cs | 2 +- Tiles/FurnitureStratus/StratusBricks.cs | 4 +- Tiles/FurnitureStratus/StratusCandelabra.cs | 2 +- Tiles/FurnitureStratus/StratusCandle.cs | 2 +- Tiles/FurnitureStratus/StratusChair.cs | 2 +- Tiles/FurnitureStratus/StratusChandelier.cs | 2 +- Tiles/FurnitureStratus/StratusChest.cs | 2 +- Tiles/FurnitureStratus/StratusClock.cs | 2 +- Tiles/FurnitureStratus/StratusDoorClosed.cs | 2 +- Tiles/FurnitureStratus/StratusDoorOpen.cs | 2 +- Tiles/FurnitureStratus/StratusDresser.cs | 2 +- Tiles/FurnitureStratus/StratusLamp.cs | 2 +- Tiles/FurnitureStratus/StratusLantern.cs | 2 +- Tiles/FurnitureStratus/StratusPiano.cs | 2 +- Tiles/FurnitureStratus/StratusPlatform.cs | 2 +- Tiles/FurnitureStratus/StratusSink.cs | 2 +- Tiles/FurnitureStratus/StratusSofa.cs | 2 +- Tiles/FurnitureStratus/StratusTable.cs | 2 +- Tiles/FurnitureStratus/StratusWorkbench.cs | 2 +- Tiles/FurnitureVoid/SmoothVoidstone.cs | 8 +- .../FurnitureVoid/SmoothVoidstonePlatform.cs | 2 +- Tiles/FurnitureVoid/VoidBath.cs | 2 +- Tiles/FurnitureVoid/VoidBed.cs | 2 +- Tiles/FurnitureVoid/VoidBookcase.cs | 2 +- Tiles/FurnitureVoid/VoidCandelabra.cs | 2 +- Tiles/FurnitureVoid/VoidCandle.cs | 2 +- Tiles/FurnitureVoid/VoidChair.cs | 2 +- Tiles/FurnitureVoid/VoidChandelier.cs | 2 +- Tiles/FurnitureVoid/VoidChest.cs | 2 +- Tiles/FurnitureVoid/VoidClock.cs | 2 +- Tiles/FurnitureVoid/VoidDoorClosed.cs | 2 +- Tiles/FurnitureVoid/VoidDoorOpen.cs | 2 +- Tiles/FurnitureVoid/VoidDresser.cs | 2 +- Tiles/FurnitureVoid/VoidLamp.cs | 2 +- Tiles/FurnitureVoid/VoidLantern.cs | 2 +- Tiles/FurnitureVoid/VoidPiano.cs | 2 +- Tiles/FurnitureVoid/VoidSink.cs | 2 +- Tiles/FurnitureVoid/VoidSofa.cs | 2 +- Tiles/FurnitureVoid/VoidTable.cs | 2 +- Tiles/FurnitureVoid/VoidWorkbench.cs | 2 +- Tiles/Ores/AerialiteOre.cs | 2 +- Tiles/Ores/AstralOre.cs | 6 +- Tiles/Ores/AuricOre.cs | 2 +- Tiles/Ores/ChaoticOre.cs | 6 +- Tiles/Ores/CharredOre.cs | 6 +- Tiles/Ores/CryonicOre.cs | 6 +- Tiles/Ores/ExodiumOre.cs | 2 +- Tiles/Ores/PerennialOre.cs | 2 +- Tiles/Ores/UelibloomOre.cs | 4 +- Tiles/PerennialBrick.cs | 4 +- Tiles/SunkenSea/EutrophicSand.cs | 8 +- Tiles/SunkenSea/Navystone.cs | 8 +- Tiles/SunkenSea/SeaPrism.cs | 6 +- Tiles/UelibloomBrick.cs | 6 +- Utilities/CalamityUtils.cs | 791 ++++++++++++++---- .../{CustomTileFraming.cs => TileFraming.cs} | 709 ++++++---------- Utilities/TileMerge.cs | 241 ------ World/Abyss.cs | 10 +- World/WorldGenerationMethods.cs | 56 +- 310 files changed, 1406 insertions(+), 1473 deletions(-) rename Utilities/{CustomTileFraming.cs => TileFraming.cs} (72%) delete mode 100644 Utilities/TileMerge.cs diff --git a/CalamityMod.cs b/CalamityMod.cs index 7ec5082d2b..5a8ed39838 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -84,7 +84,7 @@ namespace CalamityMod { public class CalamityMod : Mod { - // TODO -- I have been advised by Jopo that Mods should never contain static variables + // CONSIDER -- I have been advised by Jopo that Mods should never contain static variables // Hotkeys public static ModHotKey NormalityRelocatorHotKey; @@ -204,6 +204,8 @@ namespace CalamityMod BossHealthBarManager.Load(this); + TileFraming.Load(); + Config.Load(); SetupLists(); @@ -349,6 +351,8 @@ namespace CalamityMod BossHealthBarManager.Unload(); base.Unload(); + TileFraming.Unload(); + AstralArcanumUI.Unload(); base.Unload(); diff --git a/Tiles/Abyss/AbyssGravel.cs b/Tiles/Abyss/AbyssGravel.cs index 5116120202..1d9026137e 100644 --- a/Tiles/Abyss/AbyssGravel.cs +++ b/Tiles/Abyss/AbyssGravel.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileBlockLight[Type] = true; Main.tileMergeDirt[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); drop = ModContent.ItemType(); AddMapEntry(new Color(0, 0, 0)); @@ -37,7 +37,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt); + TileFraming.CustomMergeFrame(i, j, Type, TileID.Dirt); return false; } } diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index ef0935465a..3790232a14 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); dustType = 2; drop = ModContent.ItemType(); @@ -88,7 +88,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index 8f32820263..5a3da8edc7 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); dustType = 32; drop = ModContent.ItemType(); @@ -189,7 +189,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Abyss/Tenebris.cs b/Tiles/Abyss/Tenebris.cs index aac7f768a4..d6a9075cee 100644 --- a/Tiles/Abyss/Tenebris.cs +++ b/Tiles/Abyss/Tenebris.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); dustType = 44; drop = ModContent.ItemType(); @@ -91,7 +91,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Abyss/Voidstone.cs b/Tiles/Abyss/Voidstone.cs index 2fb46a569c..04aee3d2d2 100644 --- a/Tiles/Abyss/Voidstone.cs +++ b/Tiles/Abyss/Voidstone.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); TileID.Sets.ChecksForMerge[Type] = true; soundType = 21; @@ -234,7 +234,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } diff --git a/Tiles/AerialiteBrick.cs b/Tiles/AerialiteBrick.cs index e91c36d415..80d7855dfe 100644 --- a/Tiles/AerialiteBrick.cs +++ b/Tiles/AerialiteBrick.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/Astral/AstralChestLocked.cs b/Tiles/Astral/AstralChestLocked.cs index e0d4acda49..7bf35851d0 100644 --- a/Tiles/Astral/AstralChestLocked.cs +++ b/Tiles/Astral/AstralChestLocked.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.Astral { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Astral Chest"); AddMapEntry(new Color(174, 129, 92), name, MapChestName); diff --git a/Tiles/Astral/AstralClay.cs b/Tiles/Astral/AstralClay.cs index ffa55478b2..f96309ea44 100644 --- a/Tiles/Astral/AstralClay.cs +++ b/Tiles/Astral/AstralClay.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.Astral Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeOreTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); + CalamityUtils.MergeWithOres(Type); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -29,7 +29,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 879e9ea2f0..84eac815ac 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -14,13 +14,13 @@ namespace CalamityMod.Tiles.Astral Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeOreTiles(Type); - TileMerge.MergeTile(Type, TileID.Grass); - TileMerge.MergeTile(Type, TileID.CorruptGrass); - TileMerge.MergeTile(Type, TileID.HallowedGrass); - TileMerge.MergeTile(Type, TileID.FleshGrass); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); + CalamityUtils.MergeWithOres(Type); + CalamityUtils.SetMerge(Type, TileID.Grass); + CalamityUtils.SetMerge(Type, TileID.CorruptGrass); + CalamityUtils.SetMerge(Type, TileID.HallowedGrass); + CalamityUtils.SetMerge(Type, TileID.FleshGrass); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt); + TileFraming.CustomMergeFrame(i, j, Type, TileID.Dirt); return false; } diff --git a/Tiles/Astral/AstralGrass.cs b/Tiles/Astral/AstralGrass.cs index 3e541ccdb9..a5669e8cc4 100644 --- a/Tiles/Astral/AstralGrass.cs +++ b/Tiles/Astral/AstralGrass.cs @@ -16,11 +16,11 @@ namespace CalamityMod.Tiles.Astral Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeTile(Type, ModContent.TileType()); - TileMerge.MergeTile(Type, TileID.Grass); - TileMerge.MergeTile(Type, TileID.CorruptGrass); - TileMerge.MergeTile(Type, TileID.HallowedGrass); - TileMerge.MergeTile(Type, TileID.FleshGrass); + CalamityUtils.SetMerge(Type, ModContent.TileType()); + CalamityUtils.SetMerge(Type, TileID.Grass); + CalamityUtils.SetMerge(Type, TileID.CorruptGrass); + CalamityUtils.SetMerge(Type, TileID.HallowedGrass); + CalamityUtils.SetMerge(Type, TileID.FleshGrass); dustType = ModContent.DustType(); drop = ModContent.ItemType(); diff --git a/Tiles/Astral/AstralMonolith.cs b/Tiles/Astral/AstralMonolith.cs index f966681f87..d545c6d9ef 100644 --- a/Tiles/Astral/AstralMonolith.cs +++ b/Tiles/Astral/AstralMonolith.cs @@ -15,12 +15,12 @@ namespace CalamityMod.Tiles.Astral Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeTile(Type, TileID.LeafBlock); - TileMerge.MergeTile(Type, TileID.LivingMahoganyLeaves); - TileMerge.MergeTile(Type, TileID.LivingWood); - TileMerge.MergeTile(Type, TileID.LivingMahogany); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); + CalamityUtils.SetMerge(Type, TileID.LeafBlock); + CalamityUtils.SetMerge(Type, TileID.LivingMahoganyLeaves); + CalamityUtils.SetMerge(Type, TileID.LivingWood); + CalamityUtils.SetMerge(Type, TileID.LivingMahogany); drop = ModContent.ItemType(); AddMapEntry(new Color(45, 36, 63)); @@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } diff --git a/Tiles/Astral/AstralSilt.cs b/Tiles/Astral/AstralSilt.cs index b319bda69b..2c8daae3a7 100644 --- a/Tiles/Astral/AstralSilt.cs +++ b/Tiles/Astral/AstralSilt.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.Astral Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeOreTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); + CalamityUtils.MergeWithOres(Type); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/Astral/AstralStone.cs b/Tiles/Astral/AstralStone.cs index f97efae691..b37d924ccd 100644 --- a/Tiles/Astral/AstralStone.cs +++ b/Tiles/Astral/AstralStone.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.Astral Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeOreTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); + CalamityUtils.MergeWithOres(Type); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralBrick.cs b/Tiles/AstralBrick.cs index b8787c954e..bb34563cd8 100644 --- a/Tiles/AstralBrick.cs +++ b/Tiles/AstralBrick.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) diff --git a/Tiles/AstralDesert/AstralFossil.cs b/Tiles/AstralDesert/AstralFossil.cs index 3d0f5626d0..4f27a702b4 100644 --- a/Tiles/AstralDesert/AstralFossil.cs +++ b/Tiles/AstralDesert/AstralFossil.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.AstralDesert Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -30,7 +30,7 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index 404ac1dc1c..0dfe3ca83c 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Tiles.AstralDesert Main.tileSand[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = 108; drop = ModContent.ItemType(); @@ -51,8 +51,8 @@ namespace CalamityMod.Tiles.AstralDesert WorldGen.SquareTileFrame(i, j); return false; } - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + // CustomTileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralDesert/AstralSandstone.cs b/Tiles/AstralDesert/AstralSandstone.cs index f975a3e14c..f4b527988c 100644 --- a/Tiles/AstralDesert/AstralSandstone.cs +++ b/Tiles/AstralDesert/AstralSandstone.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.AstralDesert Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -29,8 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + // CustomTileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralDesert/HardenedAstralSand.cs b/Tiles/AstralDesert/HardenedAstralSand.cs index 285fde36bc..adbb8d9dc5 100644 --- a/Tiles/AstralDesert/HardenedAstralSand.cs +++ b/Tiles/AstralDesert/HardenedAstralSand.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Tiles.AstralDesert Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = 108; @@ -29,8 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + // CustomTileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralSnow/AstralIce.cs b/Tiles/AstralSnow/AstralIce.cs index e1a335e13c..d840ba687e 100644 --- a/Tiles/AstralSnow/AstralIce.cs +++ b/Tiles/AstralSnow/AstralIce.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.AstralSnow Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSnowTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithSnow(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = 173; drop = ModContent.ItemType(); @@ -48,7 +48,7 @@ namespace CalamityMod.Tiles.AstralSnow public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/AstralSnow/AstralSnow.cs b/Tiles/AstralSnow/AstralSnow.cs index ec950b5379..83c0920d73 100644 --- a/Tiles/AstralSnow/AstralSnow.cs +++ b/Tiles/AstralSnow/AstralSnow.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.AstralSnow Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSnowTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithSnow(Type); + CalamityUtils.MergeAstralTiles(Type); dustType = 173; drop = ModContent.ItemType(); @@ -41,8 +41,8 @@ namespace CalamityMod.Tiles.AstralSnow public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + // CustomTileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 7ad42caefa..287c2cee96 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -1,4 +1,3 @@ - using CalamityMod.Items.Potions; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Astral; @@ -26,55 +25,29 @@ namespace CalamityMod.Tiles TileID.HallowedPlants, TileID.HallowedPlants2, TileID.FleshWeeds, - (ushort)ModContent.GetInstance().TileType("AstralShortPlants"), - (ushort)ModContent.GetInstance().TileType("AstralTallPlants") + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), }; - public override void SetDefaults() + public override bool PreHitWire(int i, int j, int type) { - if (CalamityMod.chairList != null) - { - foreach (int i in CalamityMod.chairList) - { - AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair, i); - } - } - if (CalamityMod.doorList != null) - { - foreach (int i in CalamityMod.doorList) - { - AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor, i); - } - } - if (CalamityMod.lightList != null) - { - foreach (int i in CalamityMod.lightList) - { - AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch, i); - } - } - if (CalamityMod.tableList != null) - { - foreach (int i in CalamityMod.tableList) - { - AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable, i); - } - } + return !CalamityWorld.bossRushActive; } public override bool TileFrame(int i, int j, int type, ref bool resetFrame, ref bool noBreak) { + // Custom plant framing for (int k = 0; k < PlantTypes.Length; k++) - { - if (PlantTypes[k] == type) + if (type == PlantTypes[k]) { - CustomTileFraming.CheckPlants(i, j); + TileFraming.PlantFrame(i, j); return false; } - } + + // Custom vine framing if (type == TileID.Vines || type == TileID.CrimsonVines || type == TileID.HallowedVines || type == ModContent.TileType()) { - CustomTileFraming.VineFrame(i, j); + TileFraming.VineFrame(i, j); return false; } return base.TileFrame(i, j, type, ref resetFrame, ref noBreak); @@ -82,140 +55,84 @@ namespace CalamityMod.Tiles public override void PostDraw(int i, int j, int type, SpriteBatch spriteBatch) { + // Guaranteed not null at this point Tile tile = Main.tile[i, j]; - if (type == TileID.Cactus) - { - //GRABBING VARIABLES FOR CERTAIN THINGS - Vector2 zero = new Vector2(Main.offScreenRange, Main.offScreenRange); - if (Main.drawToScreen) - zero = Vector2.Zero; - //TESTING STUFF - int frameX = tile.frameX; - int frameY = tile.frameY; - bool astralCactus = false; - if (!Main.canDrawColorTile(i, j)) - { - int xTile = i; - if (frameX == 36) - { - xTile--; - } - if (frameX == 54) - { - xTile++; - } - if (frameX == 108) - { - if (frameY == 18) - { - xTile--; - } - else - { - xTile++; - } - } - int yTile = j; - bool flag = false; - if (Main.tile[xTile, yTile].type == 80 && Main.tile[xTile, yTile].active()) - { - flag = true; - } - while (!Main.tile[xTile, yTile].active() || !Main.tileSolid[(int)Main.tile[xTile, yTile].type] || !flag) - { - if (Main.tile[xTile, yTile].type == 80 && Main.tile[xTile, yTile].active()) - { - flag = true; - } - yTile++; - if (yTile > i + 20) - { - break; - } - } - //CACTUS CHECK - if (Main.tile[xTile, yTile].type == (ushort)ModContent.TileType()) - { - astralCactus = true; - } - } - //Draw Glow - if (astralCactus) - { - spriteBatch.Draw(CalamityMod.AstralCactusGlowTexture, new Vector2((float)(i * 16 - (int)Main.screenPosition.X), (float)(j * 16 - (int)Main.screenPosition.Y)) + zero, new Rectangle((int)frameX, (int)frameY, 16, 18), Color.White * 0.75f, 0f, default, 1f, SpriteEffects.None, 0f); - } + // This function is only for Astral Cactus. If the tile isn't even cactus, forget about it. + if (type != TileID.Cactus) return; - } - } - public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem) - { - // TODO -- holy shit THAT IS NOT HOW YOU NULL CHECK OH MY GOD THIS EXPLAINS EVERYTHING - if(Main.tile[i,j] is null) - return; - - if (Main.tile[i, j].type != ModContent.TileType() && Main.tile[i, j].type != ModContent.TileType() && Main.tileSolid[Main.tile[i, j].type]) + Vector2 zero = new Vector2(Main.offScreenRange, Main.offScreenRange); + if (Main.drawToScreen) + zero = Vector2.Zero; + int frameX = tile.frameX; + int frameY = tile.frameY; + + // Search down the cactus to find out whether the block it is planted in is Astral Sand. + bool astralCactus = false; + if (!Main.canDrawColorTile(i, j)) { - if (Main.tile[i + 1, j] != null) + int xTile = i; + if (frameX == 36) // Cactus segment which splits left + xTile--; + if (frameX == 54) // Cactus segment which splits right + xTile++; + if (frameX == 108) // Cactus segment which splits both directions + xTile += (frameY == 18) ? -1 : 1; + + int yTile = j; + bool slidingDownCactus = Main.tile[xTile, yTile] != null && Main.tile[xTile, yTile].type == TileID.Cactus && Main.tile[xTile, yTile].active(); + while (!Main.tile[xTile, yTile].active() || !Main.tileSolid[Main.tile[xTile, yTile].type] || !slidingDownCactus) { - if (Main.tile[i + 1, j].active()) + if (Main.tile[xTile, yTile].type == TileID.Cactus && Main.tile[xTile, yTile].active()) { - if (Main.tile[i + 1, j].type == ModContent.TileType() || (Main.tile[i + 1, j].type == ModContent.TileType() && CalamityWorld.downedDesertScourge)) - { - WorldGen.KillTile(i + 1, j, false, false, false); - if (!Main.tile[i + 1, j].active() && Main.netMode != NetmodeID.SinglePlayer) - { - NetMessage.SendData(17, -1, -1, null, 0, (float)i + 1, (float)j, 0f, 0, 0, 0); - } - } - } - } - if (Main.tile[i - 1, j] != null) - { - if (Main.tile[i - 1, j].active()) - { - if (Main.tile[i - 1, j].type == ModContent.TileType() || (Main.tile[i - 1, j].type == ModContent.TileType() && CalamityWorld.downedDesertScourge)) - { - WorldGen.KillTile(i - 1, j, false, false, false); - if (!Main.tile[i - 1, j].active() && Main.netMode != NetmodeID.SinglePlayer) - { - NetMessage.SendData(17, -1, -1, null, 0, (float)i - 1, (float)j, 0f, 0, 0, 0); - } - } - } - } - if (Main.tile[i, j + 1] != null) - { - if (Main.tile[i, j + 1].active()) - { - if (Main.tile[i, j + 1].type == ModContent.TileType() || (Main.tile[i, j + 1].type == ModContent.TileType() && CalamityWorld.downedDesertScourge)) - { - WorldGen.KillTile(i, j + 1, false, false, false); - if (!Main.tile[i, j + 1].active() && Main.netMode != NetmodeID.SinglePlayer) - { - NetMessage.SendData(17, -1, -1, null, 0, (float)i, (float)j + 1, 0f, 0, 0, 0); - } - } - } - } - if (Main.tile[i, j - 1] != null) - { - if (Main.tile[i, j - 1].active()) - { - if (Main.tile[i, j - 1].type == ModContent.TileType() || (Main.tile[i, j - 1].type == ModContent.TileType() && CalamityWorld.downedDesertScourge)) - { - WorldGen.KillTile(i, j - 1, false, false, false); - if (!Main.tile[i, j - 1].active() && Main.netMode != NetmodeID.SinglePlayer) - { - NetMessage.SendData(17, -1, -1, null, 0, (float)i, (float)j - 1, 0f, 0, 0, 0); - } - } + slidingDownCactus = true; } + yTile++; + // Cacti are assumed to be no more than 20 blocks tall. + if (yTile > i + 20) + break; } + astralCactus = Main.tile[xTile, yTile].type == (ushort)ModContent.TileType(); + } + + // If it is actually astral cactus, then draw its glowmask. + if (astralCactus) + { + spriteBatch.Draw(CalamityMod.AstralCactusGlowTexture, new Vector2((float)(i * 16 - (int)Main.screenPosition.X), (float)(j * 16 - (int)Main.screenPosition.Y)) + zero, new Rectangle((int)frameX, (int)frameY, 16, 18), Color.White * 0.75f, 0f, default, 1f, SpriteEffects.None, 0f); } } + // This function exists only to shatter adjacent Lumenyl or Sea Prism crystals when a neighboring solid tile is destroyed. + public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem) + { + Tile tile = Main.tile[i, j]; + if(tile is null) + return; + + // Helper function to shatter crystals attached to neighboring solid tiles. + void CheckShatterCrystal(int xPos, int yPos) + { + Tile t = Main.tile[xPos, yPos]; + if (t != null && t.active() && (t.type == ModContent.TileType() || (t.type == ModContent.TileType() && CalamityWorld.downedDesertScourge))) + { + WorldGen.KillTile(xPos, yPos, false, false, false); + if (!Main.tile[xPos, yPos].active() && Main.netMode != NetmodeID.SinglePlayer) + NetMessage.SendData(17, -1, -1, null, 0, (float)xPos, (float)yPos, 0f, 0, 0, 0); + } + } + + // CONSIDER -- Lumenyl Crystals and Sea Prism Crystals aren't solid. They shouldn't need to be checked here. + if (Main.tileSolid[tile.type] && tile.type != ModContent.TileType() && tile.type != ModContent.TileType()) + { + CheckShatterCrystal(i + 1, j); + CheckShatterCrystal(i - 1, j); + CheckShatterCrystal(i, j + 1); + CheckShatterCrystal(i, j - 1); + } + } + + // LATER -- clean up copied decompiled pot code here public override bool Drop(int i, int j, int type) { if (type == 28) @@ -584,10 +501,5 @@ namespace CalamityMod.Tiles } return true; } - - public override bool PreHitWire(int i, int j, int type) - { - return !CalamityWorld.bossRushActive; - } } } diff --git a/Tiles/Cinderplate.cs b/Tiles/Cinderplate.cs index 37c972e415..14720b25c4 100644 --- a/Tiles/Cinderplate.cs +++ b/Tiles/Cinderplate.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Tiles Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); soundType = 21; mineResist = 1f; diff --git a/Tiles/Crags/BrimstoneSlag.cs b/Tiles/Crags/BrimstoneSlag.cs index 5e5b79f80f..c285a3198d 100644 --- a/Tiles/Crags/BrimstoneSlag.cs +++ b/Tiles/Crags/BrimstoneSlag.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.Crags Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeHellTiles(Type); - TileMerge.MergeTile(Type, ModContent.TileType()); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithHell(Type); + CalamityUtils.SetMerge(Type, ModContent.TileType()); soundType = 21; mineResist = 3f; @@ -40,7 +40,7 @@ namespace CalamityMod.Tiles.Crags public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BrimstoneFraming(i, j, resetFrame); + return TileFraming.BrimstoneFraming(i, j, resetFrame); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/CryonicBrick.cs b/Tiles/CryonicBrick.cs index 886df7adb6..4d83c033e9 100644 --- a/Tiles/CryonicBrick.cs +++ b/Tiles/CryonicBrick.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Tiles Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); soundType = 21; minPick = 100; diff --git a/Tiles/FurnitureAbyss/AbyssBath.cs b/Tiles/FurnitureAbyss/AbyssBath.cs index 0a863314e3..be56829128 100644 --- a/Tiles/FurnitureAbyss/AbyssBath.cs +++ b/Tiles/FurnitureAbyss/AbyssBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssBed.cs b/Tiles/FurnitureAbyss/AbyssBed.cs index 457da51ae1..f280441e35 100644 --- a/Tiles/FurnitureAbyss/AbyssBed.cs +++ b/Tiles/FurnitureAbyss/AbyssBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssBookcase.cs b/Tiles/FurnitureAbyss/AbyssBookcase.cs index 7e8c5e2c66..36b5317fc1 100644 --- a/Tiles/FurnitureAbyss/AbyssBookcase.cs +++ b/Tiles/FurnitureAbyss/AbyssBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssCandelabra.cs b/Tiles/FurnitureAbyss/AbyssCandelabra.cs index b76fd6629e..675df6d43b 100644 --- a/Tiles/FurnitureAbyss/AbyssCandelabra.cs +++ b/Tiles/FurnitureAbyss/AbyssCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssChair.cs b/Tiles/FurnitureAbyss/AbyssChair.cs index 8d558714f0..8218df02d2 100644 --- a/Tiles/FurnitureAbyss/AbyssChair.cs +++ b/Tiles/FurnitureAbyss/AbyssChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssChandelier.cs b/Tiles/FurnitureAbyss/AbyssChandelier.cs index c313963421..61003db166 100644 --- a/Tiles/FurnitureAbyss/AbyssChandelier.cs +++ b/Tiles/FurnitureAbyss/AbyssChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssChest.cs b/Tiles/FurnitureAbyss/AbyssChest.cs index 750de05d95..41b136759f 100644 --- a/Tiles/FurnitureAbyss/AbyssChest.cs +++ b/Tiles/FurnitureAbyss/AbyssChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureAbyss/AbyssClock.cs b/Tiles/FurnitureAbyss/AbyssClock.cs index cdeb188bf2..b2a76142a0 100644 --- a/Tiles/FurnitureAbyss/AbyssClock.cs +++ b/Tiles/FurnitureAbyss/AbyssClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssDoorClosed.cs b/Tiles/FurnitureAbyss/AbyssDoorClosed.cs index 53de06ea52..f2db6f1480 100644 --- a/Tiles/FurnitureAbyss/AbyssDoorClosed.cs +++ b/Tiles/FurnitureAbyss/AbyssDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssDoorOpen.cs b/Tiles/FurnitureAbyss/AbyssDoorOpen.cs index 4e63968308..01a156250e 100644 --- a/Tiles/FurnitureAbyss/AbyssDoorOpen.cs +++ b/Tiles/FurnitureAbyss/AbyssDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssDresser.cs b/Tiles/FurnitureAbyss/AbyssDresser.cs index b7c453cb8a..aeb0916653 100644 --- a/Tiles/FurnitureAbyss/AbyssDresser.cs +++ b/Tiles/FurnitureAbyss/AbyssDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssLamp.cs b/Tiles/FurnitureAbyss/AbyssLamp.cs index 3b259106ab..9703458159 100644 --- a/Tiles/FurnitureAbyss/AbyssLamp.cs +++ b/Tiles/FurnitureAbyss/AbyssLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssLantern.cs b/Tiles/FurnitureAbyss/AbyssLantern.cs index c94f0705dd..5301f21226 100644 --- a/Tiles/FurnitureAbyss/AbyssLantern.cs +++ b/Tiles/FurnitureAbyss/AbyssLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssPiano.cs b/Tiles/FurnitureAbyss/AbyssPiano.cs index a7871162de..c99b695592 100644 --- a/Tiles/FurnitureAbyss/AbyssPiano.cs +++ b/Tiles/FurnitureAbyss/AbyssPiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Synth"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssSink.cs b/Tiles/FurnitureAbyss/AbyssSink.cs index b9cb3193ce..f2efacc8e7 100644 --- a/Tiles/FurnitureAbyss/AbyssSink.cs +++ b/Tiles/FurnitureAbyss/AbyssSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssSofa.cs b/Tiles/FurnitureAbyss/AbyssSofa.cs index 2c345fb282..399f0ea036 100644 --- a/Tiles/FurnitureAbyss/AbyssSofa.cs +++ b/Tiles/FurnitureAbyss/AbyssSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssTable.cs b/Tiles/FurnitureAbyss/AbyssTable.cs index d34b586668..b7ab01d4b7 100644 --- a/Tiles/FurnitureAbyss/AbyssTable.cs +++ b/Tiles/FurnitureAbyss/AbyssTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/AbyssTorch.cs b/Tiles/FurnitureAbyss/AbyssTorch.cs index d5d6927b26..86e40febe1 100644 --- a/Tiles/FurnitureAbyss/AbyssTorch.cs +++ b/Tiles/FurnitureAbyss/AbyssTorch.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpTorch(Type, waterImmune: true); + this.SetUpTorch(waterImmune: true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Torch"); AddMapEntry(new Color(253, 221, 3), name); diff --git a/Tiles/FurnitureAbyss/AbyssWorkbench.cs b/Tiles/FurnitureAbyss/AbyssWorkbench.cs index dc016412ad..177c3822b3 100644 --- a/Tiles/FurnitureAbyss/AbyssWorkbench.cs +++ b/Tiles/FurnitureAbyss/AbyssWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Abyss Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAbyss/SmoothAbyssGravel.cs b/Tiles/FurnitureAbyss/SmoothAbyssGravel.cs index 9fd6a511e4..4908935f52 100644 --- a/Tiles/FurnitureAbyss/SmoothAbyssGravel.cs +++ b/Tiles/FurnitureAbyss/SmoothAbyssGravel.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Tiles.FurnitureAbyss Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSmoothTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithAbyss(Type); soundType = 21; mineResist = 2f; diff --git a/Tiles/FurnitureAbyss/SmoothAbyssGravelPlatform.cs b/Tiles/FurnitureAbyss/SmoothAbyssGravelPlatform.cs index 2ffcbfcaf7..7c7794f71f 100644 --- a/Tiles/FurnitureAbyss/SmoothAbyssGravelPlatform.cs +++ b/Tiles/FurnitureAbyss/SmoothAbyssGravelPlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); soundType = 21; AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); diff --git a/Tiles/FurnitureAncient/AncientBath.cs b/Tiles/FurnitureAncient/AncientBath.cs index bdcf7c9f93..8e4f3c3280 100644 --- a/Tiles/FurnitureAncient/AncientBath.cs +++ b/Tiles/FurnitureAncient/AncientBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type, true); + this.SetUpBathtub(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientBed.cs b/Tiles/FurnitureAncient/AncientBed.cs index 1fb3647845..0f9f772952 100644 --- a/Tiles/FurnitureAncient/AncientBed.cs +++ b/Tiles/FurnitureAncient/AncientBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type, true); + this.SetUpBed(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientBookcase.cs b/Tiles/FurnitureAncient/AncientBookcase.cs index f68b028d1c..324ffdf711 100644 --- a/Tiles/FurnitureAncient/AncientBookcase.cs +++ b/Tiles/FurnitureAncient/AncientBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type, true); + this.SetUpBookcase(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientChair.cs b/Tiles/FurnitureAncient/AncientChair.cs index b81db7b848..15b2ff26c1 100644 --- a/Tiles/FurnitureAncient/AncientChair.cs +++ b/Tiles/FurnitureAncient/AncientChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type, true); + this.SetUpChair(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientChandelier.cs b/Tiles/FurnitureAncient/AncientChandelier.cs index 2d6fd59670..d2dbcc66e9 100644 --- a/Tiles/FurnitureAncient/AncientChandelier.cs +++ b/Tiles/FurnitureAncient/AncientChandelier.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type, true); + this.SetUpChandelier(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientDoorClosed.cs b/Tiles/FurnitureAncient/AncientDoorClosed.cs index 553cb8a9cb..5bcd57e104 100644 --- a/Tiles/FurnitureAncient/AncientDoorClosed.cs +++ b/Tiles/FurnitureAncient/AncientDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type, true); + this.SetUpDoorClosed(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientDoorOpen.cs b/Tiles/FurnitureAncient/AncientDoorOpen.cs index 78e8efec85..4f5b56c82b 100644 --- a/Tiles/FurnitureAncient/AncientDoorOpen.cs +++ b/Tiles/FurnitureAncient/AncientDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type, true); + this.SetUpDoorOpen(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientDresser.cs b/Tiles/FurnitureAncient/AncientDresser.cs index 3fd8ea2f61..b8ff54f9ba 100644 --- a/Tiles/FurnitureAncient/AncientDresser.cs +++ b/Tiles/FurnitureAncient/AncientDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientLamp.cs b/Tiles/FurnitureAncient/AncientLamp.cs index 866e64dbad..5f1e49ba38 100644 --- a/Tiles/FurnitureAncient/AncientLamp.cs +++ b/Tiles/FurnitureAncient/AncientLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type, true); + this.SetUpLamp(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientLantern.cs b/Tiles/FurnitureAncient/AncientLantern.cs index 12615b5fac..9ded969cc5 100644 --- a/Tiles/FurnitureAncient/AncientLantern.cs +++ b/Tiles/FurnitureAncient/AncientLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type, true); + this.SetUpLantern(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientMonolith.cs b/Tiles/FurnitureAncient/AncientMonolith.cs index 3e720de742..0cde559566 100644 --- a/Tiles/FurnitureAncient/AncientMonolith.cs +++ b/Tiles/FurnitureAncient/AncientMonolith.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type, true); + this.SetUpClock(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Monolith"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientSink.cs b/Tiles/FurnitureAncient/AncientSink.cs index d7ffb234aa..4d6ec5bd57 100644 --- a/Tiles/FurnitureAncient/AncientSink.cs +++ b/Tiles/FurnitureAncient/AncientSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type, true); + this.SetUpSink(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientSofa.cs b/Tiles/FurnitureAncient/AncientSofa.cs index 136d3baadc..83e0bec7bd 100644 --- a/Tiles/FurnitureAncient/AncientSofa.cs +++ b/Tiles/FurnitureAncient/AncientSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type, true); + this.SetUpSofa(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientTable.cs b/Tiles/FurnitureAncient/AncientTable.cs index 9359dadbbd..71b3cca707 100644 --- a/Tiles/FurnitureAncient/AncientTable.cs +++ b/Tiles/FurnitureAncient/AncientTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type, true); + this.SetUpTable(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAncient/AncientWorkbench.cs b/Tiles/FurnitureAncient/AncientWorkbench.cs index 964b5801bb..ca2d080942 100644 --- a/Tiles/FurnitureAncient/AncientWorkbench.cs +++ b/Tiles/FurnitureAncient/AncientWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type, true); + this.SetUpWorkBench(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ancient Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenBath.cs b/Tiles/FurnitureAshen/AshenBath.cs index 0ea9b41168..8e0d8f68c7 100644 --- a/Tiles/FurnitureAshen/AshenBath.cs +++ b/Tiles/FurnitureAshen/AshenBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type, true); + this.SetUpBathtub(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenBed.cs b/Tiles/FurnitureAshen/AshenBed.cs index ab3d7d7aa0..342c7c7605 100644 --- a/Tiles/FurnitureAshen/AshenBed.cs +++ b/Tiles/FurnitureAshen/AshenBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type, true); + this.SetUpBed(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenBookcase.cs b/Tiles/FurnitureAshen/AshenBookcase.cs index 727ee925a1..81b3a10062 100644 --- a/Tiles/FurnitureAshen/AshenBookcase.cs +++ b/Tiles/FurnitureAshen/AshenBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type, true); + this.SetUpBookcase(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenCandelabra.cs b/Tiles/FurnitureAshen/AshenCandelabra.cs index 3d4e9f9748..2e31108a9d 100644 --- a/Tiles/FurnitureAshen/AshenCandelabra.cs +++ b/Tiles/FurnitureAshen/AshenCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type, true); + this.SetUpCandelabra(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenCandle.cs b/Tiles/FurnitureAshen/AshenCandle.cs index 1e64407e57..3f781a2325 100644 --- a/Tiles/FurnitureAshen/AshenCandle.cs +++ b/Tiles/FurnitureAshen/AshenCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type, true); + this.SetUpCandle(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenChair.cs b/Tiles/FurnitureAshen/AshenChair.cs index e0aa5d0ffd..cbc4769f9d 100644 --- a/Tiles/FurnitureAshen/AshenChair.cs +++ b/Tiles/FurnitureAshen/AshenChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type, true); + this.SetUpChair(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenChandelier.cs b/Tiles/FurnitureAshen/AshenChandelier.cs index 9ce827faad..fbfc652b28 100644 --- a/Tiles/FurnitureAshen/AshenChandelier.cs +++ b/Tiles/FurnitureAshen/AshenChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type, true); + this.SetUpChandelier(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenChest.cs b/Tiles/FurnitureAshen/AshenChest.cs index bdc7dbf68a..143eec1853 100644 --- a/Tiles/FurnitureAshen/AshenChest.cs +++ b/Tiles/FurnitureAshen/AshenChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureAshen/AshenDoorClosed.cs b/Tiles/FurnitureAshen/AshenDoorClosed.cs index 1b9e06b5c8..fc3b44f265 100644 --- a/Tiles/FurnitureAshen/AshenDoorClosed.cs +++ b/Tiles/FurnitureAshen/AshenDoorClosed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type, true); + this.SetUpDoorClosed(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenDoorOpen.cs b/Tiles/FurnitureAshen/AshenDoorOpen.cs index 51e381eeba..8534f1fdaf 100644 --- a/Tiles/FurnitureAshen/AshenDoorOpen.cs +++ b/Tiles/FurnitureAshen/AshenDoorOpen.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type, true); + this.SetUpDoorOpen(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenDresser.cs b/Tiles/FurnitureAshen/AshenDresser.cs index 4a6b4176df..bad5eb2b8c 100644 --- a/Tiles/FurnitureAshen/AshenDresser.cs +++ b/Tiles/FurnitureAshen/AshenDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); Main.tileLavaDeath[Type] = false; ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Dresser"); diff --git a/Tiles/FurnitureAshen/AshenLamp.cs b/Tiles/FurnitureAshen/AshenLamp.cs index aa8e6e10f4..771c8907b5 100644 --- a/Tiles/FurnitureAshen/AshenLamp.cs +++ b/Tiles/FurnitureAshen/AshenLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type, true); + this.SetUpLamp(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenLantern.cs b/Tiles/FurnitureAshen/AshenLantern.cs index 1bc6a78e5a..467718a52d 100644 --- a/Tiles/FurnitureAshen/AshenLantern.cs +++ b/Tiles/FurnitureAshen/AshenLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type, true); + this.SetUpLantern(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenMonolith.cs b/Tiles/FurnitureAshen/AshenMonolith.cs index 7854ab5eee..34405c0cba 100644 --- a/Tiles/FurnitureAshen/AshenMonolith.cs +++ b/Tiles/FurnitureAshen/AshenMonolith.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type, true); + this.SetUpClock(true); ModTranslation name = CreateMapEntryName(); AddMapEntry(new Color(191, 142, 111), name); name.SetDefault("Ashen Monolith"); diff --git a/Tiles/FurnitureAshen/AshenPlatform.cs b/Tiles/FurnitureAshen/AshenPlatform.cs index 1001fdfa9e..381c112814 100644 --- a/Tiles/FurnitureAshen/AshenPlatform.cs +++ b/Tiles/FurnitureAshen/AshenPlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type, true); + this.SetUpPlatform(true); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureAshen/AshenSink.cs b/Tiles/FurnitureAshen/AshenSink.cs index e3509f56c2..b42bcb0d96 100644 --- a/Tiles/FurnitureAshen/AshenSink.cs +++ b/Tiles/FurnitureAshen/AshenSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type, true); + this.SetUpSink(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenSofa.cs b/Tiles/FurnitureAshen/AshenSofa.cs index 41bc7a88b1..773e4650ab 100644 --- a/Tiles/FurnitureAshen/AshenSofa.cs +++ b/Tiles/FurnitureAshen/AshenSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type, true); + this.SetUpSofa(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenTable.cs b/Tiles/FurnitureAshen/AshenTable.cs index bc31df79b0..da30fa01ca 100644 --- a/Tiles/FurnitureAshen/AshenTable.cs +++ b/Tiles/FurnitureAshen/AshenTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type, true); + this.SetUpTable(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/AshenWorkbench.cs b/Tiles/FurnitureAshen/AshenWorkbench.cs index 61e91ddfd5..9eb7faae1e 100644 --- a/Tiles/FurnitureAshen/AshenWorkbench.cs +++ b/Tiles/FurnitureAshen/AshenWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type, true); + this.SetUpWorkBench(true); ModTranslation name = CreateMapEntryName(); name.SetDefault("Ashen Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs b/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs index ddabcd10ac..f260f2e062 100644 --- a/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs +++ b/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Tiles.FurnitureAshen Main.tileMergeDirt[Type] = false; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSmoothTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeHellTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithHell(Type); soundType = 21; mineResist = 5f; diff --git a/Tiles/FurnitureBotanic/BotanicBathtub.cs b/Tiles/FurnitureBotanic/BotanicBathtub.cs index 719fa0b00d..8facebf005 100644 --- a/Tiles/FurnitureBotanic/BotanicBathtub.cs +++ b/Tiles/FurnitureBotanic/BotanicBathtub.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicBed.cs b/Tiles/FurnitureBotanic/BotanicBed.cs index 22bf8ecec3..e38443be80 100644 --- a/Tiles/FurnitureBotanic/BotanicBed.cs +++ b/Tiles/FurnitureBotanic/BotanicBed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicBench.cs b/Tiles/FurnitureBotanic/BotanicBench.cs index 1d54c627b3..d00ff22607 100644 --- a/Tiles/FurnitureBotanic/BotanicBench.cs +++ b/Tiles/FurnitureBotanic/BotanicBench.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicBookcase.cs b/Tiles/FurnitureBotanic/BotanicBookcase.cs index 6ec27d61aa..0a30182edc 100644 --- a/Tiles/FurnitureBotanic/BotanicBookcase.cs +++ b/Tiles/FurnitureBotanic/BotanicBookcase.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicCandelabra.cs b/Tiles/FurnitureBotanic/BotanicCandelabra.cs index 28e8c3c759..f54e42c5be 100644 --- a/Tiles/FurnitureBotanic/BotanicCandelabra.cs +++ b/Tiles/FurnitureBotanic/BotanicCandelabra.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicCandle.cs b/Tiles/FurnitureBotanic/BotanicCandle.cs index 2507f42ba1..a64c996414 100644 --- a/Tiles/FurnitureBotanic/BotanicCandle.cs +++ b/Tiles/FurnitureBotanic/BotanicCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicChair.cs b/Tiles/FurnitureBotanic/BotanicChair.cs index 634156d044..94472a0b41 100644 --- a/Tiles/FurnitureBotanic/BotanicChair.cs +++ b/Tiles/FurnitureBotanic/BotanicChair.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicChandelier.cs b/Tiles/FurnitureBotanic/BotanicChandelier.cs index 524c65cd75..9abd6913f6 100644 --- a/Tiles/FurnitureBotanic/BotanicChandelier.cs +++ b/Tiles/FurnitureBotanic/BotanicChandelier.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicChest.cs b/Tiles/FurnitureBotanic/BotanicChest.cs index 5dcac00d85..113e6aa815 100644 --- a/Tiles/FurnitureBotanic/BotanicChest.cs +++ b/Tiles/FurnitureBotanic/BotanicChest.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureBotanic/BotanicClock.cs b/Tiles/FurnitureBotanic/BotanicClock.cs index fdd33b75ca..58c0d26079 100644 --- a/Tiles/FurnitureBotanic/BotanicClock.cs +++ b/Tiles/FurnitureBotanic/BotanicClock.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicDoorClosed.cs b/Tiles/FurnitureBotanic/BotanicDoorClosed.cs index 42735d3b21..518ffc9949 100644 --- a/Tiles/FurnitureBotanic/BotanicDoorClosed.cs +++ b/Tiles/FurnitureBotanic/BotanicDoorClosed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicDoorOpen.cs b/Tiles/FurnitureBotanic/BotanicDoorOpen.cs index 106602090e..c7c7dc2b07 100644 --- a/Tiles/FurnitureBotanic/BotanicDoorOpen.cs +++ b/Tiles/FurnitureBotanic/BotanicDoorOpen.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicDresser.cs b/Tiles/FurnitureBotanic/BotanicDresser.cs index c298deb61a..a68fb8cb97 100644 --- a/Tiles/FurnitureBotanic/BotanicDresser.cs +++ b/Tiles/FurnitureBotanic/BotanicDresser.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicLamp.cs b/Tiles/FurnitureBotanic/BotanicLamp.cs index 2cf3a6e307..bf5bf2fe12 100644 --- a/Tiles/FurnitureBotanic/BotanicLamp.cs +++ b/Tiles/FurnitureBotanic/BotanicLamp.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicLantern.cs b/Tiles/FurnitureBotanic/BotanicLantern.cs index 6d77e6d09e..5c4538eb6f 100644 --- a/Tiles/FurnitureBotanic/BotanicLantern.cs +++ b/Tiles/FurnitureBotanic/BotanicLantern.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicPiano.cs b/Tiles/FurnitureBotanic/BotanicPiano.cs index 26c2950a08..37a2e3247f 100644 --- a/Tiles/FurnitureBotanic/BotanicPiano.cs +++ b/Tiles/FurnitureBotanic/BotanicPiano.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicPlatform.cs b/Tiles/FurnitureBotanic/BotanicPlatform.cs index 697752c81e..47718f5454 100644 --- a/Tiles/FurnitureBotanic/BotanicPlatform.cs +++ b/Tiles/FurnitureBotanic/BotanicPlatform.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureBotanic/BotanicSink.cs b/Tiles/FurnitureBotanic/BotanicSink.cs index 259dda3780..d6df4cf26e 100644 --- a/Tiles/FurnitureBotanic/BotanicSink.cs +++ b/Tiles/FurnitureBotanic/BotanicSink.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicTable.cs b/Tiles/FurnitureBotanic/BotanicTable.cs index caee57f315..616b83a2a2 100644 --- a/Tiles/FurnitureBotanic/BotanicTable.cs +++ b/Tiles/FurnitureBotanic/BotanicTable.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureBotanic/BotanicWorkBench.cs b/Tiles/FurnitureBotanic/BotanicWorkBench.cs index 10684207dd..3ede514034 100644 --- a/Tiles/FurnitureBotanic/BotanicWorkBench.cs +++ b/Tiles/FurnitureBotanic/BotanicWorkBench.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Botanic Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteBath.cs b/Tiles/FurnitureCosmilite/CosmiliteBath.cs index b5c2faa17f..fa165e2b4a 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBath.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteBed.cs b/Tiles/FurnitureCosmilite/CosmiliteBed.cs index e667c593ea..baefb13234 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBed.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteBookcase.cs b/Tiles/FurnitureCosmilite/CosmiliteBookcase.cs index bb531fa440..bc0efba24a 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBookcase.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteBrick.cs b/Tiles/FurnitureCosmilite/CosmiliteBrick.cs index cd16588a4e..c391a8a0e4 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBrick.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBrick.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BrimstoneFraming(i, j, resetFrame); + return TileFraming.BrimstoneFraming(i, j, resetFrame); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/FurnitureCosmilite/CosmiliteCandelabra.cs b/Tiles/FurnitureCosmilite/CosmiliteCandelabra.cs index 6f724011df..f5b2055a39 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteCandelabra.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteCandle.cs b/Tiles/FurnitureCosmilite/CosmiliteCandle.cs index 596da90aca..e10eede421 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteCandle.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteChair.cs b/Tiles/FurnitureCosmilite/CosmiliteChair.cs index 3525770901..612ccc596f 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteChair.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteChandelier.cs b/Tiles/FurnitureCosmilite/CosmiliteChandelier.cs index 79fbab4989..65bd59f6a6 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteChandelier.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteChest.cs b/Tiles/FurnitureCosmilite/CosmiliteChest.cs index 13c4da657c..e7238b0804 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteChest.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureCosmilite/CosmiliteClock.cs b/Tiles/FurnitureCosmilite/CosmiliteClock.cs index 4b4904974f..7f60027a3a 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteClock.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs b/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs index 754be5a3b4..aed053387d 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs b/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs index 909a7d0556..b54e6169db 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteDresser.cs b/Tiles/FurnitureCosmilite/CosmiliteDresser.cs index ae210e904a..05d9706986 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteDresser.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteLamp.cs b/Tiles/FurnitureCosmilite/CosmiliteLamp.cs index c46eabb5c6..8083d96456 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteLamp.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteLantern.cs b/Tiles/FurnitureCosmilite/CosmiliteLantern.cs index 72662b1985..d25d2084d7 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteLantern.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmilitePiano.cs b/Tiles/FurnitureCosmilite/CosmilitePiano.cs index ed138964f0..9bb5ce82c3 100644 --- a/Tiles/FurnitureCosmilite/CosmilitePiano.cs +++ b/Tiles/FurnitureCosmilite/CosmilitePiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmilitePlatform.cs b/Tiles/FurnitureCosmilite/CosmilitePlatform.cs index c14a15868e..aab34d9eae 100644 --- a/Tiles/FurnitureCosmilite/CosmilitePlatform.cs +++ b/Tiles/FurnitureCosmilite/CosmilitePlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureCosmilite/CosmiliteSink.cs b/Tiles/FurnitureCosmilite/CosmiliteSink.cs index 095bc653e6..08d03e6fb2 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteSink.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteSofa.cs b/Tiles/FurnitureCosmilite/CosmiliteSofa.cs index 62553d9c6e..9c63374c7e 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteSofa.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteTable.cs b/Tiles/FurnitureCosmilite/CosmiliteTable.cs index 879594aa7f..1cb9f60fb4 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteTable.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureCosmilite/CosmiliteWorkbench.cs b/Tiles/FurnitureCosmilite/CosmiliteWorkbench.cs index 34aeaf6084..ef6f95077a 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteWorkbench.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Cosmilite Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicBathtub.cs b/Tiles/FurnitureEutrophic/EutrophicBathtub.cs index 616d65ce26..15eaa2f81c 100644 --- a/Tiles/FurnitureEutrophic/EutrophicBathtub.cs +++ b/Tiles/FurnitureEutrophic/EutrophicBathtub.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); TileObjectData.newTile.CopyFrom(TileObjectData.Style4x2); TileObjectData.addTile(Type); ModTranslation name = CreateMapEntryName(); diff --git a/Tiles/FurnitureEutrophic/EutrophicBed.cs b/Tiles/FurnitureEutrophic/EutrophicBed.cs index ecd34cd7a3..185c48aecc 100644 --- a/Tiles/FurnitureEutrophic/EutrophicBed.cs +++ b/Tiles/FurnitureEutrophic/EutrophicBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicBench.cs b/Tiles/FurnitureEutrophic/EutrophicBench.cs index baa77c9f77..d4bfdb7c09 100644 --- a/Tiles/FurnitureEutrophic/EutrophicBench.cs +++ b/Tiles/FurnitureEutrophic/EutrophicBench.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicBookcase.cs b/Tiles/FurnitureEutrophic/EutrophicBookcase.cs index 5c17801ab4..60125099f5 100644 --- a/Tiles/FurnitureEutrophic/EutrophicBookcase.cs +++ b/Tiles/FurnitureEutrophic/EutrophicBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicCandelabra.cs b/Tiles/FurnitureEutrophic/EutrophicCandelabra.cs index 8b4e111e9b..fd43dd889d 100644 --- a/Tiles/FurnitureEutrophic/EutrophicCandelabra.cs +++ b/Tiles/FurnitureEutrophic/EutrophicCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicCandle.cs b/Tiles/FurnitureEutrophic/EutrophicCandle.cs index c7737489c9..f706935c97 100644 --- a/Tiles/FurnitureEutrophic/EutrophicCandle.cs +++ b/Tiles/FurnitureEutrophic/EutrophicCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicChair.cs b/Tiles/FurnitureEutrophic/EutrophicChair.cs index 16b6a80824..d69b74cca3 100644 --- a/Tiles/FurnitureEutrophic/EutrophicChair.cs +++ b/Tiles/FurnitureEutrophic/EutrophicChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicChandelier.cs b/Tiles/FurnitureEutrophic/EutrophicChandelier.cs index ed21766556..1c83213322 100644 --- a/Tiles/FurnitureEutrophic/EutrophicChandelier.cs +++ b/Tiles/FurnitureEutrophic/EutrophicChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicChest.cs b/Tiles/FurnitureEutrophic/EutrophicChest.cs index afb7a22a70..4c9884c709 100644 --- a/Tiles/FurnitureEutrophic/EutrophicChest.cs +++ b/Tiles/FurnitureEutrophic/EutrophicChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureEutrophic/EutrophicClock.cs b/Tiles/FurnitureEutrophic/EutrophicClock.cs index dd452ac5a2..9481c58690 100644 --- a/Tiles/FurnitureEutrophic/EutrophicClock.cs +++ b/Tiles/FurnitureEutrophic/EutrophicClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs b/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs index ef47c15fc8..ab746a32ee 100644 --- a/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs +++ b/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs b/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs index 920cf96bcc..64fb41eda6 100644 --- a/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs +++ b/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicDresser.cs b/Tiles/FurnitureEutrophic/EutrophicDresser.cs index 624cc997b5..01830426b3 100644 --- a/Tiles/FurnitureEutrophic/EutrophicDresser.cs +++ b/Tiles/FurnitureEutrophic/EutrophicDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicLamp.cs b/Tiles/FurnitureEutrophic/EutrophicLamp.cs index baff72b438..7864e7e496 100644 --- a/Tiles/FurnitureEutrophic/EutrophicLamp.cs +++ b/Tiles/FurnitureEutrophic/EutrophicLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicLantern.cs b/Tiles/FurnitureEutrophic/EutrophicLantern.cs index d9921cdb18..215754fb24 100644 --- a/Tiles/FurnitureEutrophic/EutrophicLantern.cs +++ b/Tiles/FurnitureEutrophic/EutrophicLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicPiano.cs b/Tiles/FurnitureEutrophic/EutrophicPiano.cs index 7aa21150d0..403c2d04d0 100644 --- a/Tiles/FurnitureEutrophic/EutrophicPiano.cs +++ b/Tiles/FurnitureEutrophic/EutrophicPiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicPlatform.cs b/Tiles/FurnitureEutrophic/EutrophicPlatform.cs index 6b764effd8..79b1bb1596 100644 --- a/Tiles/FurnitureEutrophic/EutrophicPlatform.cs +++ b/Tiles/FurnitureEutrophic/EutrophicPlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureEutrophic/EutrophicSink.cs b/Tiles/FurnitureEutrophic/EutrophicSink.cs index 0d1c5fddc0..0a917459f3 100644 --- a/Tiles/FurnitureEutrophic/EutrophicSink.cs +++ b/Tiles/FurnitureEutrophic/EutrophicSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicTable.cs b/Tiles/FurnitureEutrophic/EutrophicTable.cs index c92cfa5e21..d90da2eb71 100644 --- a/Tiles/FurnitureEutrophic/EutrophicTable.cs +++ b/Tiles/FurnitureEutrophic/EutrophicTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/EutrophicWorkBench.cs b/Tiles/FurnitureEutrophic/EutrophicWorkBench.cs index ccf99ebfe0..52103a9b74 100644 --- a/Tiles/FurnitureEutrophic/EutrophicWorkBench.cs +++ b/Tiles/FurnitureEutrophic/EutrophicWorkBench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Eutrophic Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureEutrophic/SmoothNavystone.cs b/Tiles/FurnitureEutrophic/SmoothNavystone.cs index 46526f27bd..b354a98f67 100644 --- a/Tiles/FurnitureEutrophic/SmoothNavystone.cs +++ b/Tiles/FurnitureEutrophic/SmoothNavystone.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Tiles.FurnitureEutrophic Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSmoothTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeDesertTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithDesert(Type); TileID.Sets.ChecksForMerge[Type] = true; soundType = 21; diff --git a/Tiles/FurnitureOccult/OccultBathtub.cs b/Tiles/FurnitureOccult/OccultBathtub.cs index 4ac83af06b..4dd2d1e1fa 100644 --- a/Tiles/FurnitureOccult/OccultBathtub.cs +++ b/Tiles/FurnitureOccult/OccultBathtub.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultBed.cs b/Tiles/FurnitureOccult/OccultBed.cs index 326bd1377e..af6fbd8359 100644 --- a/Tiles/FurnitureOccult/OccultBed.cs +++ b/Tiles/FurnitureOccult/OccultBed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultBookcase.cs b/Tiles/FurnitureOccult/OccultBookcase.cs index 40e135aea9..865723a772 100644 --- a/Tiles/FurnitureOccult/OccultBookcase.cs +++ b/Tiles/FurnitureOccult/OccultBookcase.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultCandelabra.cs b/Tiles/FurnitureOccult/OccultCandelabra.cs index bf5c37e535..c253c7c730 100644 --- a/Tiles/FurnitureOccult/OccultCandelabra.cs +++ b/Tiles/FurnitureOccult/OccultCandelabra.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultCandle.cs b/Tiles/FurnitureOccult/OccultCandle.cs index b2097555ec..d93b4fb70c 100644 --- a/Tiles/FurnitureOccult/OccultCandle.cs +++ b/Tiles/FurnitureOccult/OccultCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultChair.cs b/Tiles/FurnitureOccult/OccultChair.cs index 1aedc4ac48..ac96949e67 100644 --- a/Tiles/FurnitureOccult/OccultChair.cs +++ b/Tiles/FurnitureOccult/OccultChair.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultChandelier.cs b/Tiles/FurnitureOccult/OccultChandelier.cs index 288fba6a40..0dc8072b9c 100644 --- a/Tiles/FurnitureOccult/OccultChandelier.cs +++ b/Tiles/FurnitureOccult/OccultChandelier.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultChest.cs b/Tiles/FurnitureOccult/OccultChest.cs index 875af69443..4caa15b748 100644 --- a/Tiles/FurnitureOccult/OccultChest.cs +++ b/Tiles/FurnitureOccult/OccultChest.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureOccult/OccultClock.cs b/Tiles/FurnitureOccult/OccultClock.cs index 155c19e9f6..a56246afa8 100644 --- a/Tiles/FurnitureOccult/OccultClock.cs +++ b/Tiles/FurnitureOccult/OccultClock.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultDoorClosed.cs b/Tiles/FurnitureOccult/OccultDoorClosed.cs index ff95568ba6..a9cbec9694 100644 --- a/Tiles/FurnitureOccult/OccultDoorClosed.cs +++ b/Tiles/FurnitureOccult/OccultDoorClosed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultDoorOpen.cs b/Tiles/FurnitureOccult/OccultDoorOpen.cs index 4dd9bacfa3..1f0c91cbd3 100644 --- a/Tiles/FurnitureOccult/OccultDoorOpen.cs +++ b/Tiles/FurnitureOccult/OccultDoorOpen.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultDresser.cs b/Tiles/FurnitureOccult/OccultDresser.cs index 91c46aee4f..796c2e5597 100644 --- a/Tiles/FurnitureOccult/OccultDresser.cs +++ b/Tiles/FurnitureOccult/OccultDresser.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultLamp.cs b/Tiles/FurnitureOccult/OccultLamp.cs index 649da26855..27bc92a8c7 100644 --- a/Tiles/FurnitureOccult/OccultLamp.cs +++ b/Tiles/FurnitureOccult/OccultLamp.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultLantern.cs b/Tiles/FurnitureOccult/OccultLantern.cs index 532734b466..6f5ac699e5 100644 --- a/Tiles/FurnitureOccult/OccultLantern.cs +++ b/Tiles/FurnitureOccult/OccultLantern.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultPiano.cs b/Tiles/FurnitureOccult/OccultPiano.cs index 71891ccda0..70beaf1e72 100644 --- a/Tiles/FurnitureOccult/OccultPiano.cs +++ b/Tiles/FurnitureOccult/OccultPiano.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultPlatform.cs b/Tiles/FurnitureOccult/OccultPlatform.cs index ba5752bd12..f765779440 100644 --- a/Tiles/FurnitureOccult/OccultPlatform.cs +++ b/Tiles/FurnitureOccult/OccultPlatform.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureOccult/OccultSink.cs b/Tiles/FurnitureOccult/OccultSink.cs index debf1a8cd1..bd76b59ebe 100644 --- a/Tiles/FurnitureOccult/OccultSink.cs +++ b/Tiles/FurnitureOccult/OccultSink.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultSofa.cs b/Tiles/FurnitureOccult/OccultSofa.cs index f99d5a7ac6..33cf7ced49 100644 --- a/Tiles/FurnitureOccult/OccultSofa.cs +++ b/Tiles/FurnitureOccult/OccultSofa.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultStone.cs b/Tiles/FurnitureOccult/OccultStone.cs index f004962a26..920adf1bd6 100644 --- a/Tiles/FurnitureOccult/OccultStone.cs +++ b/Tiles/FurnitureOccult/OccultStone.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Tiles.FurnitureOccult Main.tileMergeDirt[Type] = false; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); soundType = 21; mineResist = 10f; diff --git a/Tiles/FurnitureOccult/OccultTable.cs b/Tiles/FurnitureOccult/OccultTable.cs index 175b7870f1..cf00a26d5b 100644 --- a/Tiles/FurnitureOccult/OccultTable.cs +++ b/Tiles/FurnitureOccult/OccultTable.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureOccult/OccultWorkbench.cs b/Tiles/FurnitureOccult/OccultWorkbench.cs index dcaa8b5f76..bbe6141914 100644 --- a/Tiles/FurnitureOccult/OccultWorkbench.cs +++ b/Tiles/FurnitureOccult/OccultWorkbench.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Otherworldly Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs index 72ecf2f5f8..377e26ef99 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BrimstoneFraming(i, j, resetFrame); + return TileFraming.BrimstoneFraming(i, j, resetFrame); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateBathtub.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateBathtub.cs index 5d51d6725a..a5d139863c 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateBathtub.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateBathtub.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateBookcase.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateBookcase.cs index ebe4057dde..c5a3caaddf 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateBookcase.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateCandelabra.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateCandelabra.cs index a111cb0b19..cdd3bce422 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateCandelabra.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateCandle.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateCandle.cs index a9e2cd7e09..415c4c5eb8 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateCandle.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateChair.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateChair.cs index d76f872ae4..fad963fbc4 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateChair.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateChandelier.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateChandelier.cs index 7298cb1179..858b3573d8 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateChandelier.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs index 6aca75bd8f..3cb997487f 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs index 5c7436753f..e5561e60ad 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs index ceb769d604..d963e78f62 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs index 6db6af02ee..42cccce9ea 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDresser.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDresser.cs index 5d113a4dcb..4f5605ba8a 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDresser.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateLamp.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateLamp.cs index 6b33f9f630..f45aba7e55 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateLamp.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateLantern.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateLantern.cs index 3e29ecb079..63a827087b 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateLantern.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlatePiano.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlatePiano.cs index bf895ae112..1e5df8f95c 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlatePiano.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlatePiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlatePlatform.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlatePlatform.cs index 8bdf31a690..d0382cc708 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlatePlatform.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlatePlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateSink.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateSink.cs index f2be54e0bb..4c08be7b27 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateSink.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateSofa.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateSofa.cs index 27b2fd79bc..92d2aed8b4 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateSofa.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateTable.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateTable.cs index 053f4e5d47..5b8dfd2a37 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateTable.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateWorkbench.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateWorkbench.cs index 5e05608cf7..8270c355f0 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateWorkbench.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Plagued Plate Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedBath.cs b/Tiles/FurnitureProfaned/ProfanedBath.cs index d315dd238e..f9efa50b3e 100644 --- a/Tiles/FurnitureProfaned/ProfanedBath.cs +++ b/Tiles/FurnitureProfaned/ProfanedBath.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedBed.cs b/Tiles/FurnitureProfaned/ProfanedBed.cs index 04949d85a1..921ba7fa2c 100644 --- a/Tiles/FurnitureProfaned/ProfanedBed.cs +++ b/Tiles/FurnitureProfaned/ProfanedBed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedBench.cs b/Tiles/FurnitureProfaned/ProfanedBench.cs index 146bf21aca..045ad834ba 100644 --- a/Tiles/FurnitureProfaned/ProfanedBench.cs +++ b/Tiles/FurnitureProfaned/ProfanedBench.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedBookcase.cs b/Tiles/FurnitureProfaned/ProfanedBookcase.cs index 66e2f3c73e..a5b6bca7d8 100644 --- a/Tiles/FurnitureProfaned/ProfanedBookcase.cs +++ b/Tiles/FurnitureProfaned/ProfanedBookcase.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedCandelabra.cs b/Tiles/FurnitureProfaned/ProfanedCandelabra.cs index 8b2d384034..2bdf665ab9 100644 --- a/Tiles/FurnitureProfaned/ProfanedCandelabra.cs +++ b/Tiles/FurnitureProfaned/ProfanedCandelabra.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedCandle.cs b/Tiles/FurnitureProfaned/ProfanedCandle.cs index cd8b815ef2..189d0dc099 100644 --- a/Tiles/FurnitureProfaned/ProfanedCandle.cs +++ b/Tiles/FurnitureProfaned/ProfanedCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedChair.cs b/Tiles/FurnitureProfaned/ProfanedChair.cs index 2c25f6f5fa..8aefc380f3 100644 --- a/Tiles/FurnitureProfaned/ProfanedChair.cs +++ b/Tiles/FurnitureProfaned/ProfanedChair.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedChandelier.cs b/Tiles/FurnitureProfaned/ProfanedChandelier.cs index 51cff1d059..4af1e58b3c 100644 --- a/Tiles/FurnitureProfaned/ProfanedChandelier.cs +++ b/Tiles/FurnitureProfaned/ProfanedChandelier.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Chandelier"); AddMapEntry(new Color(191, 142, 111), name); @@ -52,7 +52,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void HitWire(int i, int j) { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); } } } diff --git a/Tiles/FurnitureProfaned/ProfanedChest.cs b/Tiles/FurnitureProfaned/ProfanedChest.cs index 4f9ab2872b..79dce48340 100644 --- a/Tiles/FurnitureProfaned/ProfanedChest.cs +++ b/Tiles/FurnitureProfaned/ProfanedChest.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureProfaned/ProfanedClock.cs b/Tiles/FurnitureProfaned/ProfanedClock.cs index b59a16b648..26e2ab6612 100644 --- a/Tiles/FurnitureProfaned/ProfanedClock.cs +++ b/Tiles/FurnitureProfaned/ProfanedClock.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedCrystal.cs b/Tiles/FurnitureProfaned/ProfanedCrystal.cs index 655aa8650e..418edb3b5c 100644 --- a/Tiles/FurnitureProfaned/ProfanedCrystal.cs +++ b/Tiles/FurnitureProfaned/ProfanedCrystal.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.FurnitureProfaned Main.tileNoAttach[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); soundType = 13; mineResist = 1f; @@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs b/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs index dfc7558ab7..be0956c8e6 100644 --- a/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs +++ b/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs b/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs index a4756e63e1..377154f463 100644 --- a/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs +++ b/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedDresser.cs b/Tiles/FurnitureProfaned/ProfanedDresser.cs index 54d5e3fede..92fedcb671 100644 --- a/Tiles/FurnitureProfaned/ProfanedDresser.cs +++ b/Tiles/FurnitureProfaned/ProfanedDresser.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedLamp.cs b/Tiles/FurnitureProfaned/ProfanedLamp.cs index 5ea676f6af..7b1bf3d349 100644 --- a/Tiles/FurnitureProfaned/ProfanedLamp.cs +++ b/Tiles/FurnitureProfaned/ProfanedLamp.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedLantern.cs b/Tiles/FurnitureProfaned/ProfanedLantern.cs index 948e03bccc..84047300d9 100644 --- a/Tiles/FurnitureProfaned/ProfanedLantern.cs +++ b/Tiles/FurnitureProfaned/ProfanedLantern.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedPlatform.cs b/Tiles/FurnitureProfaned/ProfanedPlatform.cs index b2ba6d6edd..28765ecb82 100644 --- a/Tiles/FurnitureProfaned/ProfanedPlatform.cs +++ b/Tiles/FurnitureProfaned/ProfanedPlatform.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureProfaned/ProfanedRock.cs b/Tiles/FurnitureProfaned/ProfanedRock.cs index 8f8b8f1b51..0b28736693 100644 --- a/Tiles/FurnitureProfaned/ProfanedRock.cs +++ b/Tiles/FurnitureProfaned/ProfanedRock.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Tiles.FurnitureProfaned Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); soundType = 21; mineResist = 4f; diff --git a/Tiles/FurnitureProfaned/ProfanedSink.cs b/Tiles/FurnitureProfaned/ProfanedSink.cs index 3d80db87d8..3054bb26a1 100644 --- a/Tiles/FurnitureProfaned/ProfanedSink.cs +++ b/Tiles/FurnitureProfaned/ProfanedSink.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedSlab.cs b/Tiles/FurnitureProfaned/ProfanedSlab.cs index 8431951683..08b7de818c 100644 --- a/Tiles/FurnitureProfaned/ProfanedSlab.cs +++ b/Tiles/FurnitureProfaned/ProfanedSlab.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Tiles.FurnitureProfaned Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); - TileMerge.MergeTile(Type, ModContent.TileType()); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.SetMerge(Type, ModContent.TileType()); soundType = 21; mineResist = 4f; diff --git a/Tiles/FurnitureProfaned/ProfanedTable.cs b/Tiles/FurnitureProfaned/ProfanedTable.cs index 40c471287c..2585599ab9 100644 --- a/Tiles/FurnitureProfaned/ProfanedTable.cs +++ b/Tiles/FurnitureProfaned/ProfanedTable.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/ProfanedWorkbench.cs b/Tiles/FurnitureProfaned/ProfanedWorkbench.cs index 68ca679f5c..9036aa2f7a 100644 --- a/Tiles/FurnitureProfaned/ProfanedWorkbench.cs +++ b/Tiles/FurnitureProfaned/ProfanedWorkbench.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Profaned Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs index 2a20cc9f67..455f53665c 100644 --- a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs +++ b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Tiles.FurnitureProfaned Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); soundType = 21; mineResist = 4f; diff --git a/Tiles/FurnitureSilva/SilvaBathtub.cs b/Tiles/FurnitureSilva/SilvaBathtub.cs index ed3d44ca38..c8639d8718 100644 --- a/Tiles/FurnitureSilva/SilvaBathtub.cs +++ b/Tiles/FurnitureSilva/SilvaBathtub.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaBed.cs b/Tiles/FurnitureSilva/SilvaBed.cs index 79b29383b2..06edbda356 100644 --- a/Tiles/FurnitureSilva/SilvaBed.cs +++ b/Tiles/FurnitureSilva/SilvaBed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaBench.cs b/Tiles/FurnitureSilva/SilvaBench.cs index ac06dfa210..d170c63c5d 100644 --- a/Tiles/FurnitureSilva/SilvaBench.cs +++ b/Tiles/FurnitureSilva/SilvaBench.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaBookcase.cs b/Tiles/FurnitureSilva/SilvaBookcase.cs index 2c85076608..ff6d4c069a 100644 --- a/Tiles/FurnitureSilva/SilvaBookcase.cs +++ b/Tiles/FurnitureSilva/SilvaBookcase.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaCandelabra.cs b/Tiles/FurnitureSilva/SilvaCandelabra.cs index 19a7b1ffad..884da7998e 100644 --- a/Tiles/FurnitureSilva/SilvaCandelabra.cs +++ b/Tiles/FurnitureSilva/SilvaCandelabra.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaCandle.cs b/Tiles/FurnitureSilva/SilvaCandle.cs index df9de0257e..17fbf60fbb 100644 --- a/Tiles/FurnitureSilva/SilvaCandle.cs +++ b/Tiles/FurnitureSilva/SilvaCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaChair.cs b/Tiles/FurnitureSilva/SilvaChair.cs index 00b295d5ee..079844f226 100644 --- a/Tiles/FurnitureSilva/SilvaChair.cs +++ b/Tiles/FurnitureSilva/SilvaChair.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaChandelier.cs b/Tiles/FurnitureSilva/SilvaChandelier.cs index 6b2f2c4e0a..b1cff31a2a 100644 --- a/Tiles/FurnitureSilva/SilvaChandelier.cs +++ b/Tiles/FurnitureSilva/SilvaChandelier.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaChest.cs b/Tiles/FurnitureSilva/SilvaChest.cs index fa70e41a25..e9154be443 100644 --- a/Tiles/FurnitureSilva/SilvaChest.cs +++ b/Tiles/FurnitureSilva/SilvaChest.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureSilva/SilvaClock.cs b/Tiles/FurnitureSilva/SilvaClock.cs index c3504da8e8..aebfb1db2b 100644 --- a/Tiles/FurnitureSilva/SilvaClock.cs +++ b/Tiles/FurnitureSilva/SilvaClock.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaCrystal.cs b/Tiles/FurnitureSilva/SilvaCrystal.cs index 2d052997c3..88cdd34d8b 100644 --- a/Tiles/FurnitureSilva/SilvaCrystal.cs +++ b/Tiles/FurnitureSilva/SilvaCrystal.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Tiles.FurnitureSilva public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } } } diff --git a/Tiles/FurnitureSilva/SilvaDoorClosed.cs b/Tiles/FurnitureSilva/SilvaDoorClosed.cs index 62dcc333d4..8ef1bcc480 100644 --- a/Tiles/FurnitureSilva/SilvaDoorClosed.cs +++ b/Tiles/FurnitureSilva/SilvaDoorClosed.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaDoorOpen.cs b/Tiles/FurnitureSilva/SilvaDoorOpen.cs index 14f54a1a9f..12ac6f22a3 100644 --- a/Tiles/FurnitureSilva/SilvaDoorOpen.cs +++ b/Tiles/FurnitureSilva/SilvaDoorOpen.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaDresser.cs b/Tiles/FurnitureSilva/SilvaDresser.cs index c50e001974..66ec338e01 100644 --- a/Tiles/FurnitureSilva/SilvaDresser.cs +++ b/Tiles/FurnitureSilva/SilvaDresser.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaLamp.cs b/Tiles/FurnitureSilva/SilvaLamp.cs index 6d710c53e9..462a8bf893 100644 --- a/Tiles/FurnitureSilva/SilvaLamp.cs +++ b/Tiles/FurnitureSilva/SilvaLamp.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaLantern.cs b/Tiles/FurnitureSilva/SilvaLantern.cs index f77dc68fbd..5e4ff6352a 100644 --- a/Tiles/FurnitureSilva/SilvaLantern.cs +++ b/Tiles/FurnitureSilva/SilvaLantern.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaPiano.cs b/Tiles/FurnitureSilva/SilvaPiano.cs index 7733ba2065..e32301a56f 100644 --- a/Tiles/FurnitureSilva/SilvaPiano.cs +++ b/Tiles/FurnitureSilva/SilvaPiano.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaPlatform.cs b/Tiles/FurnitureSilva/SilvaPlatform.cs index 4ea9a542ac..a77404b170 100644 --- a/Tiles/FurnitureSilva/SilvaPlatform.cs +++ b/Tiles/FurnitureSilva/SilvaPlatform.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureSilva/SilvaSink.cs b/Tiles/FurnitureSilva/SilvaSink.cs index 58ab4e6bec..3fc78bf4f3 100644 --- a/Tiles/FurnitureSilva/SilvaSink.cs +++ b/Tiles/FurnitureSilva/SilvaSink.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaTable.cs b/Tiles/FurnitureSilva/SilvaTable.cs index bea06bcaf5..30e9112489 100644 --- a/Tiles/FurnitureSilva/SilvaTable.cs +++ b/Tiles/FurnitureSilva/SilvaTable.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureSilva/SilvaWorkBench.cs b/Tiles/FurnitureSilva/SilvaWorkBench.cs index 636c53343c..ef8cf6f926 100644 --- a/Tiles/FurnitureSilva/SilvaWorkBench.cs +++ b/Tiles/FurnitureSilva/SilvaWorkBench.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Silva Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelBath.cs b/Tiles/FurnitureStatigel/StatigelBath.cs index 3c0fd349cb..7bac37c391 100644 --- a/Tiles/FurnitureStatigel/StatigelBath.cs +++ b/Tiles/FurnitureStatigel/StatigelBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelBed.cs b/Tiles/FurnitureStatigel/StatigelBed.cs index 902b21513e..c40946d7e3 100644 --- a/Tiles/FurnitureStatigel/StatigelBed.cs +++ b/Tiles/FurnitureStatigel/StatigelBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelBlock.cs b/Tiles/FurnitureStatigel/StatigelBlock.cs index 6acd70e87c..32290a99c0 100644 --- a/Tiles/FurnitureStatigel/StatigelBlock.cs +++ b/Tiles/FurnitureStatigel/StatigelBlock.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Tiles.FurnitureStatigel Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeSmoothTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeSmoothTiles(Type); drop = ModContent.ItemType(); AddMapEntry(new Color(215, 74, 121)); diff --git a/Tiles/FurnitureStatigel/StatigelBookcase.cs b/Tiles/FurnitureStatigel/StatigelBookcase.cs index f0dc433f44..170fc227f9 100644 --- a/Tiles/FurnitureStatigel/StatigelBookcase.cs +++ b/Tiles/FurnitureStatigel/StatigelBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelCandelabra.cs b/Tiles/FurnitureStatigel/StatigelCandelabra.cs index fe663096df..8fd0bbf336 100644 --- a/Tiles/FurnitureStatigel/StatigelCandelabra.cs +++ b/Tiles/FurnitureStatigel/StatigelCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelCandle.cs b/Tiles/FurnitureStatigel/StatigelCandle.cs index 43319b297b..957a19dc20 100644 --- a/Tiles/FurnitureStatigel/StatigelCandle.cs +++ b/Tiles/FurnitureStatigel/StatigelCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelChair.cs b/Tiles/FurnitureStatigel/StatigelChair.cs index 5b65a98ea7..269cab3648 100644 --- a/Tiles/FurnitureStatigel/StatigelChair.cs +++ b/Tiles/FurnitureStatigel/StatigelChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelChandelier.cs b/Tiles/FurnitureStatigel/StatigelChandelier.cs index c18b875a80..4d1f79d255 100644 --- a/Tiles/FurnitureStatigel/StatigelChandelier.cs +++ b/Tiles/FurnitureStatigel/StatigelChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelChest.cs b/Tiles/FurnitureStatigel/StatigelChest.cs index 7024b01340..c292d54d0e 100644 --- a/Tiles/FurnitureStatigel/StatigelChest.cs +++ b/Tiles/FurnitureStatigel/StatigelChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureStatigel/StatigelClock.cs b/Tiles/FurnitureStatigel/StatigelClock.cs index 40a3f3a0ec..72b2ec00ad 100644 --- a/Tiles/FurnitureStatigel/StatigelClock.cs +++ b/Tiles/FurnitureStatigel/StatigelClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelDoorClosed.cs b/Tiles/FurnitureStatigel/StatigelDoorClosed.cs index 2460f2abf0..859b50802b 100644 --- a/Tiles/FurnitureStatigel/StatigelDoorClosed.cs +++ b/Tiles/FurnitureStatigel/StatigelDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelDoorOpen.cs b/Tiles/FurnitureStatigel/StatigelDoorOpen.cs index bc5702e4f2..b0f3eee7c3 100644 --- a/Tiles/FurnitureStatigel/StatigelDoorOpen.cs +++ b/Tiles/FurnitureStatigel/StatigelDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelDresser.cs b/Tiles/FurnitureStatigel/StatigelDresser.cs index 03977d85e6..17ca56c32f 100644 --- a/Tiles/FurnitureStatigel/StatigelDresser.cs +++ b/Tiles/FurnitureStatigel/StatigelDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelLamp.cs b/Tiles/FurnitureStatigel/StatigelLamp.cs index 98e5c5b7b9..cca064e12e 100644 --- a/Tiles/FurnitureStatigel/StatigelLamp.cs +++ b/Tiles/FurnitureStatigel/StatigelLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelLantern.cs b/Tiles/FurnitureStatigel/StatigelLantern.cs index 7b53de4f06..a5bf8ae9d4 100644 --- a/Tiles/FurnitureStatigel/StatigelLantern.cs +++ b/Tiles/FurnitureStatigel/StatigelLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelPiano.cs b/Tiles/FurnitureStatigel/StatigelPiano.cs index 6ab966cf35..8d734ea1a4 100644 --- a/Tiles/FurnitureStatigel/StatigelPiano.cs +++ b/Tiles/FurnitureStatigel/StatigelPiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelPlatform.cs b/Tiles/FurnitureStatigel/StatigelPlatform.cs index 87f608e9fe..ba56da70f4 100644 --- a/Tiles/FurnitureStatigel/StatigelPlatform.cs +++ b/Tiles/FurnitureStatigel/StatigelPlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureStatigel/StatigelSink.cs b/Tiles/FurnitureStatigel/StatigelSink.cs index 7b85edc72e..49f15187a0 100644 --- a/Tiles/FurnitureStatigel/StatigelSink.cs +++ b/Tiles/FurnitureStatigel/StatigelSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelSofa.cs b/Tiles/FurnitureStatigel/StatigelSofa.cs index 6a0021c61e..be50113854 100644 --- a/Tiles/FurnitureStatigel/StatigelSofa.cs +++ b/Tiles/FurnitureStatigel/StatigelSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelTable.cs b/Tiles/FurnitureStatigel/StatigelTable.cs index 03167ecd58..702d167ea0 100644 --- a/Tiles/FurnitureStatigel/StatigelTable.cs +++ b/Tiles/FurnitureStatigel/StatigelTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStatigel/StatigelWorkbench.cs b/Tiles/FurnitureStatigel/StatigelWorkbench.cs index 354956fbec..f34431bfcc 100644 --- a/Tiles/FurnitureStatigel/StatigelWorkbench.cs +++ b/Tiles/FurnitureStatigel/StatigelWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Statigel Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusBathtub.cs b/Tiles/FurnitureStratus/StratusBathtub.cs index 9d7ad9edfb..7446911f45 100644 --- a/Tiles/FurnitureStratus/StratusBathtub.cs +++ b/Tiles/FurnitureStratus/StratusBathtub.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusBed.cs b/Tiles/FurnitureStratus/StratusBed.cs index 5844300124..b347463b93 100644 --- a/Tiles/FurnitureStratus/StratusBed.cs +++ b/Tiles/FurnitureStratus/StratusBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusBookcase.cs b/Tiles/FurnitureStratus/StratusBookcase.cs index 50a417b6e4..9f570b1afb 100644 --- a/Tiles/FurnitureStratus/StratusBookcase.cs +++ b/Tiles/FurnitureStratus/StratusBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusBricks.cs b/Tiles/FurnitureStratus/StratusBricks.cs index dc452dbc1b..47a8523680 100644 --- a/Tiles/FurnitureStratus/StratusBricks.cs +++ b/Tiles/FurnitureStratus/StratusBricks.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.FurnitureStratus Main.tileBlockLight[Type] = true; TileID.Sets.HasSlopeFrames[Type] = true; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); soundType = 21; mineResist = 5f; @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureStratus public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/FurnitureStratus/StratusCandelabra.cs b/Tiles/FurnitureStratus/StratusCandelabra.cs index 3e63ff033f..9e5a5753cc 100644 --- a/Tiles/FurnitureStratus/StratusCandelabra.cs +++ b/Tiles/FurnitureStratus/StratusCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusCandle.cs b/Tiles/FurnitureStratus/StratusCandle.cs index 6c6220a8f7..91385474ef 100644 --- a/Tiles/FurnitureStratus/StratusCandle.cs +++ b/Tiles/FurnitureStratus/StratusCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusChair.cs b/Tiles/FurnitureStratus/StratusChair.cs index 924c8f386d..9f48a73dd4 100644 --- a/Tiles/FurnitureStratus/StratusChair.cs +++ b/Tiles/FurnitureStratus/StratusChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusChandelier.cs b/Tiles/FurnitureStratus/StratusChandelier.cs index 886d3efd4f..af549c2547 100644 --- a/Tiles/FurnitureStratus/StratusChandelier.cs +++ b/Tiles/FurnitureStratus/StratusChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusChest.cs b/Tiles/FurnitureStratus/StratusChest.cs index 231f123dff..3b54090a54 100644 --- a/Tiles/FurnitureStratus/StratusChest.cs +++ b/Tiles/FurnitureStratus/StratusChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureStratus/StratusClock.cs b/Tiles/FurnitureStratus/StratusClock.cs index 5148467460..689558c938 100644 --- a/Tiles/FurnitureStratus/StratusClock.cs +++ b/Tiles/FurnitureStratus/StratusClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Clock"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusDoorClosed.cs b/Tiles/FurnitureStratus/StratusDoorClosed.cs index 97d2ad9b18..c5e0b4cafa 100644 --- a/Tiles/FurnitureStratus/StratusDoorClosed.cs +++ b/Tiles/FurnitureStratus/StratusDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusDoorOpen.cs b/Tiles/FurnitureStratus/StratusDoorOpen.cs index 7fe6efe512..294d81ec5f 100644 --- a/Tiles/FurnitureStratus/StratusDoorOpen.cs +++ b/Tiles/FurnitureStratus/StratusDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusDresser.cs b/Tiles/FurnitureStratus/StratusDresser.cs index b238615424..b9bf0a81c4 100644 --- a/Tiles/FurnitureStratus/StratusDresser.cs +++ b/Tiles/FurnitureStratus/StratusDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusLamp.cs b/Tiles/FurnitureStratus/StratusLamp.cs index 73e669cb57..d21fc33675 100644 --- a/Tiles/FurnitureStratus/StratusLamp.cs +++ b/Tiles/FurnitureStratus/StratusLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusLantern.cs b/Tiles/FurnitureStratus/StratusLantern.cs index 94f7a9a9c0..f0ef9600e7 100644 --- a/Tiles/FurnitureStratus/StratusLantern.cs +++ b/Tiles/FurnitureStratus/StratusLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusPiano.cs b/Tiles/FurnitureStratus/StratusPiano.cs index 3e21bdf0f8..ab0f513bdf 100644 --- a/Tiles/FurnitureStratus/StratusPiano.cs +++ b/Tiles/FurnitureStratus/StratusPiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusPlatform.cs b/Tiles/FurnitureStratus/StratusPlatform.cs index 36107ba539..cb879e2dd3 100644 --- a/Tiles/FurnitureStratus/StratusPlatform.cs +++ b/Tiles/FurnitureStratus/StratusPlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureStratus/StratusSink.cs b/Tiles/FurnitureStratus/StratusSink.cs index c05bc39334..c30a22097e 100644 --- a/Tiles/FurnitureStratus/StratusSink.cs +++ b/Tiles/FurnitureStratus/StratusSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusSofa.cs b/Tiles/FurnitureStratus/StratusSofa.cs index d31c124258..831506237d 100644 --- a/Tiles/FurnitureStratus/StratusSofa.cs +++ b/Tiles/FurnitureStratus/StratusSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusTable.cs b/Tiles/FurnitureStratus/StratusTable.cs index 00e099eb14..0d4dcda6fe 100644 --- a/Tiles/FurnitureStratus/StratusTable.cs +++ b/Tiles/FurnitureStratus/StratusTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureStratus/StratusWorkbench.cs b/Tiles/FurnitureStratus/StratusWorkbench.cs index bb0ac08fe4..5d02910fd9 100644 --- a/Tiles/FurnitureStratus/StratusWorkbench.cs +++ b/Tiles/FurnitureStratus/StratusWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Stratus Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/SmoothVoidstone.cs b/Tiles/FurnitureVoid/SmoothVoidstone.cs index 0575eeaa53..3c141139fd 100644 --- a/Tiles/FurnitureVoid/SmoothVoidstone.cs +++ b/Tiles/FurnitureVoid/SmoothVoidstone.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Tiles.FurnitureVoid Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSmoothTiles(Type); - TileMerge.MergeDecorativeTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithAbyss(Type); soundType = 21; mineResist = 7f; diff --git a/Tiles/FurnitureVoid/SmoothVoidstonePlatform.cs b/Tiles/FurnitureVoid/SmoothVoidstonePlatform.cs index 2c88fb8d2b..efafa9544f 100644 --- a/Tiles/FurnitureVoid/SmoothVoidstonePlatform.cs +++ b/Tiles/FurnitureVoid/SmoothVoidstonePlatform.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpPlatform(Type); + this.SetUpPlatform(); AddMapEntry(new Color(191, 142, 111)); drop = ModContent.ItemType(); disableSmartCursor = true; diff --git a/Tiles/FurnitureVoid/VoidBath.cs b/Tiles/FurnitureVoid/VoidBath.cs index 2a9f3f2189..38f82bf05c 100644 --- a/Tiles/FurnitureVoid/VoidBath.cs +++ b/Tiles/FurnitureVoid/VoidBath.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpBathtub(Type); + this.SetUpBathtub(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Bathtub"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidBed.cs b/Tiles/FurnitureVoid/VoidBed.cs index d895eab73a..3797a72a4c 100644 --- a/Tiles/FurnitureVoid/VoidBed.cs +++ b/Tiles/FurnitureVoid/VoidBed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpBed(Type); + this.SetUpBed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Bed"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidBookcase.cs b/Tiles/FurnitureVoid/VoidBookcase.cs index d464e42d7c..9e298e03c1 100644 --- a/Tiles/FurnitureVoid/VoidBookcase.cs +++ b/Tiles/FurnitureVoid/VoidBookcase.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpBookcase(Type); + this.SetUpBookcase(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Bookcase"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidCandelabra.cs b/Tiles/FurnitureVoid/VoidCandelabra.cs index 356e25194f..1909e4bc37 100644 --- a/Tiles/FurnitureVoid/VoidCandelabra.cs +++ b/Tiles/FurnitureVoid/VoidCandelabra.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpCandelabra(Type); + this.SetUpCandelabra(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Candelabra"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidCandle.cs b/Tiles/FurnitureVoid/VoidCandle.cs index 40a55f5500..0cf50ad857 100644 --- a/Tiles/FurnitureVoid/VoidCandle.cs +++ b/Tiles/FurnitureVoid/VoidCandle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpCandle(Type); + this.SetUpCandle(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Candle"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidChair.cs b/Tiles/FurnitureVoid/VoidChair.cs index 3049e71902..d7870d874e 100644 --- a/Tiles/FurnitureVoid/VoidChair.cs +++ b/Tiles/FurnitureVoid/VoidChair.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpChair(Type); + this.SetUpChair(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Chair"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidChandelier.cs b/Tiles/FurnitureVoid/VoidChandelier.cs index 31254b803f..1f15ef52db 100644 --- a/Tiles/FurnitureVoid/VoidChandelier.cs +++ b/Tiles/FurnitureVoid/VoidChandelier.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpChandelier(Type); + this.SetUpChandelier(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Chandelier"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidChest.cs b/Tiles/FurnitureVoid/VoidChest.cs index c67cfd032f..c83db58333 100644 --- a/Tiles/FurnitureVoid/VoidChest.cs +++ b/Tiles/FurnitureVoid/VoidChest.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpChest(Type); + this.SetUpChest(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Chest"); AddMapEntry(new Color(191, 142, 111), name, MapChestName); diff --git a/Tiles/FurnitureVoid/VoidClock.cs b/Tiles/FurnitureVoid/VoidClock.cs index 3530221f4c..506003f84a 100644 --- a/Tiles/FurnitureVoid/VoidClock.cs +++ b/Tiles/FurnitureVoid/VoidClock.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpClock(Type); + this.SetUpClock(); animationFrameHeight = 90; ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Obelisk"); diff --git a/Tiles/FurnitureVoid/VoidDoorClosed.cs b/Tiles/FurnitureVoid/VoidDoorClosed.cs index 703a377a2c..ecf7ac19ff 100644 --- a/Tiles/FurnitureVoid/VoidDoorClosed.cs +++ b/Tiles/FurnitureVoid/VoidDoorClosed.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpDoorClosed(Type); + this.SetUpDoorClosed(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidDoorOpen.cs b/Tiles/FurnitureVoid/VoidDoorOpen.cs index 60823e31a1..6e2be97437 100644 --- a/Tiles/FurnitureVoid/VoidDoorOpen.cs +++ b/Tiles/FurnitureVoid/VoidDoorOpen.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpDoorOpen(Type); + this.SetUpDoorOpen(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Door"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidDresser.cs b/Tiles/FurnitureVoid/VoidDresser.cs index f9e24d6052..828e33e204 100644 --- a/Tiles/FurnitureVoid/VoidDresser.cs +++ b/Tiles/FurnitureVoid/VoidDresser.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpDresser(Type); + this.SetUpDresser(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Dresser"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidLamp.cs b/Tiles/FurnitureVoid/VoidLamp.cs index 1e827bac0f..d7059ad8d5 100644 --- a/Tiles/FurnitureVoid/VoidLamp.cs +++ b/Tiles/FurnitureVoid/VoidLamp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpLamp(Type); + this.SetUpLamp(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Lamp"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidLantern.cs b/Tiles/FurnitureVoid/VoidLantern.cs index b949f1a530..296a12c03b 100644 --- a/Tiles/FurnitureVoid/VoidLantern.cs +++ b/Tiles/FurnitureVoid/VoidLantern.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpLantern(Type); + this.SetUpLantern(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Lantern"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidPiano.cs b/Tiles/FurnitureVoid/VoidPiano.cs index edfbd29499..6015d92fbf 100644 --- a/Tiles/FurnitureVoid/VoidPiano.cs +++ b/Tiles/FurnitureVoid/VoidPiano.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpPiano(Type); + this.SetUpPiano(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Piano"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidSink.cs b/Tiles/FurnitureVoid/VoidSink.cs index 4a4e5d8c0e..a61c59bd8a 100644 --- a/Tiles/FurnitureVoid/VoidSink.cs +++ b/Tiles/FurnitureVoid/VoidSink.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpSink(Type); + this.SetUpSink(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Sink"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidSofa.cs b/Tiles/FurnitureVoid/VoidSofa.cs index ea70f2b09f..50b4738c62 100644 --- a/Tiles/FurnitureVoid/VoidSofa.cs +++ b/Tiles/FurnitureVoid/VoidSofa.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpSofa(Type); + this.SetUpSofa(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Sofa"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidTable.cs b/Tiles/FurnitureVoid/VoidTable.cs index f91a102207..9a08c2ff57 100644 --- a/Tiles/FurnitureVoid/VoidTable.cs +++ b/Tiles/FurnitureVoid/VoidTable.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpTable(Type); + this.SetUpTable(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Table"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/FurnitureVoid/VoidWorkbench.cs b/Tiles/FurnitureVoid/VoidWorkbench.cs index c59d33a662..348ca1c050 100644 --- a/Tiles/FurnitureVoid/VoidWorkbench.cs +++ b/Tiles/FurnitureVoid/VoidWorkbench.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { public override void SetDefaults() { - CalamityUtils.SetUpWorkBench(Type); + this.SetUpWorkBench(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Void Work Bench"); AddMapEntry(new Color(191, 142, 111), name); diff --git a/Tiles/Ores/AerialiteOre.cs b/Tiles/Ores/AerialiteOre.cs index 91ffbb7ee2..283a487eb5 100644 --- a/Tiles/Ores/AerialiteOre.cs +++ b/Tiles/Ores/AerialiteOre.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.Ores Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); drop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); name.SetDefault("Aerialite Ore"); diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index 9f6cfaab50..c6543466b9 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Tiles.Ores Main.tileSpelunker[Type] = true; Main.tileShine2[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeAstralTiles(Type); minPick = 200; dustType = 173; @@ -79,7 +79,7 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Ores/AuricOre.cs b/Tiles/Ores/AuricOre.cs index 0dc0a33cbf..f740c52870 100644 --- a/Tiles/Ores/AuricOre.cs +++ b/Tiles/Ores/AuricOre.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.Ores Main.tileSpelunker[Type] = true; Main.tileValue[Type] = 1000; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); dustType = 55; drop = ModContent.ItemType(); diff --git a/Tiles/Ores/ChaoticOre.cs b/Tiles/Ores/ChaoticOre.cs index 9693c0c16b..08f5fdb648 100644 --- a/Tiles/Ores/ChaoticOre.cs +++ b/Tiles/Ores/ChaoticOre.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Tiles.Ores Main.tileBlockLight[Type] = true; Main.tileValue[Type] = 850; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAbyssTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); dustType = 105; drop = ModContent.ItemType(); @@ -77,7 +77,7 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Ores/CharredOre.cs b/Tiles/Ores/CharredOre.cs index da9a242079..2e9116f21d 100644 --- a/Tiles/Ores/CharredOre.cs +++ b/Tiles/Ores/CharredOre.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Tiles.Ores Main.tileLighted[Type] = true; Main.tileValue[Type] = 720; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeHellTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithHell(Type); drop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Ores/CryonicOre.cs b/Tiles/Ores/CryonicOre.cs index d43b288caa..8ffa13280f 100644 --- a/Tiles/Ores/CryonicOre.cs +++ b/Tiles/Ores/CryonicOre.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Tiles.Ores Main.tileBlockLight[Type] = true; Main.tileValue[Type] = 675; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeSnowTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithSnow(Type); drop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); @@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.SnowBlock); + TileFraming.CustomMergeFrame(i, j, Type, TileID.SnowBlock); return false; } diff --git a/Tiles/Ores/ExodiumOre.cs b/Tiles/Ores/ExodiumOre.cs index 671c85b6cb..9c08ce117c 100644 --- a/Tiles/Ores/ExodiumOre.cs +++ b/Tiles/Ores/ExodiumOre.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.Ores Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); ModTranslation name = CreateMapEntryName(); name.SetDefault("Exodium Ore"); diff --git a/Tiles/Ores/PerennialOre.cs b/Tiles/Ores/PerennialOre.cs index 23e4df5d3e..37974a382c 100644 --- a/Tiles/Ores/PerennialOre.cs +++ b/Tiles/Ores/PerennialOre.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Ores Main.tileBlockLight[Type] = true; Main.tileValue[Type] = 710; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); drop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); diff --git a/Tiles/Ores/UelibloomOre.cs b/Tiles/Ores/UelibloomOre.cs index a197522a00..251ec9bf2d 100644 --- a/Tiles/Ores/UelibloomOre.cs +++ b/Tiles/Ores/UelibloomOre.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.Ores Main.tileBlockLight[Type] = true; Main.tileValue[Type] = 950; - TileMerge.MergeGeneralTiles(Type); + CalamityUtils.MergeWithGeneral(Type); drop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); @@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.Ores public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Mud, false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, TileID.Mud, false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/PerennialBrick.cs b/Tiles/PerennialBrick.cs index 4a9efd6879..c9e10b5008 100644 --- a/Tiles/PerennialBrick.cs +++ b/Tiles/PerennialBrick.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Tiles Main.tileMergeDirt[Type] = false; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); drop = ModContent.ItemType(); soundType = 21; diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 5799b54228..1484ea1ec7 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); TileID.Sets.ChecksForMerge[Type] = true; dustType = 108; @@ -43,8 +43,8 @@ namespace CalamityMod.Tiles.SunkenSea public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Sandstone); + // CustomTileFraming.CustomMergeFrame(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, TileID.Sandstone); return false; } } diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index 295edd9f00..9fd08dd66c 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); TileID.Sets.ChecksForMerge[Type] = true; dustType = 96; @@ -102,8 +102,8 @@ namespace CalamityMod.Tiles.SunkenSea public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + // CustomTileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType()); return false; } } diff --git a/Tiles/SunkenSea/SeaPrism.cs b/Tiles/SunkenSea/SeaPrism.cs index 88337420d1..3e7157d9a1 100644 --- a/Tiles/SunkenSea/SeaPrism.cs +++ b/Tiles/SunkenSea/SeaPrism.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDesertTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); TileID.Sets.ChecksForMerge[Type] = true; dustType = 33; @@ -103,7 +103,7 @@ namespace CalamityMod.Tiles.SunkenSea public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index 8d1fbb6ccd..8143c2eb61 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Tiles Main.tileMergeDirt[Type] = false; Main.tileBlockLight[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); soundType = 21; minPick = 200; @@ -46,7 +46,7 @@ namespace CalamityMod.Tiles public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - return CustomTileFraming.BrimstoneFraming(i, j, resetFrame); + return TileFraming.BrimstoneFraming(i, j, resetFrame); } public override void SpecialDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index f0e56e7991..ac73be1d06 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -2,6 +2,20 @@ using CalamityMod.Items; using CalamityMod.NPCs; using CalamityMod.Projectiles; +using CalamityMod.Tiles; +using CalamityMod.Tiles.Abyss; +using CalamityMod.Tiles.Astral; +using CalamityMod.Tiles.AstralDesert; +using CalamityMod.Tiles.AstralSnow; +using CalamityMod.Tiles.Crags; +using CalamityMod.Tiles.FurnitureAbyss; +using CalamityMod.Tiles.FurnitureAshen; +using CalamityMod.Tiles.FurnitureEutrophic; +using CalamityMod.Tiles.FurnitureOccult; +using CalamityMod.Tiles.FurnitureProfaned; +using CalamityMod.Tiles.FurnitureVoid; +using CalamityMod.Tiles.Ores; +using CalamityMod.Tiles.SunkenSea; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,6 +23,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Text; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -312,6 +327,31 @@ namespace CalamityMod #endregion #region Tile Utilities + public static void SafeSquareTileFrame(int x, int y, bool resetFrame = true) + { + if (Main.tile[x, y] is null) + return; + + for (int xIter = x - 1; xIter <= x + 1; ++xIter) + { + if (xIter < 0 || xIter >= Main.maxTilesX) + continue; + for (int yIter = y - 1; yIter <= y + 1; yIter++) + { + if (yIter < 0 || yIter >= Main.maxTilesY) + continue; + if (xIter == x && yIter == y) + { + WorldGen.TileFrame(x, y, resetFrame, false); + } + else + { + WorldGen.TileFrame(xIter, yIter, false, false); + } + } + } + } + public static void LightHitWire(int type, int i, int j, int tileX, int tileY) { int x = i - Main.tile[i, j].frameX / 18 % tileX; @@ -349,6 +389,231 @@ namespace CalamityMod } } + #region Tile Merge Utilities + /// + /// Sets the mergeability state of two tiles. By default, enables tile merging. + /// + /// The first tile type which should merge (or not). + /// The second tile type which should merge (or not). + /// The mergeability state of the tiles. Defaults to true if omitted. + public static void SetMerge(int type1, int type2, bool merge = true) + { + if (type1 != type2) + { + Main.tileMerge[type1][type2] = merge; + Main.tileMerge[type2][type1] = merge; + } + } + + /// + /// Makes the first tile type argument merge with all the other tile type arguments. Also accepts arrays. + /// + /// The tile whose merging properties will be set. + /// Every tile that should be merged with. + public static void MergeWithSet(int myType, params int[] otherTypes) + { + for (int i = 0; i < otherTypes.Length; ++i) + SetMerge(myType, otherTypes[i]); + } + + /// + /// Makes the specified tile merge with the most common types of tiles found in world generation.

+ /// Notably excludes Ice. + ///
+ /// The tile whose merging properties will be set. + public static void MergeWithGeneral(int type) => MergeWithSet(type, new int[] { + // Soils + TileID.Dirt, + TileID.Mud, + TileID.ClayBlock, + // Stones + TileID.Stone, + TileID.Ebonstone, + TileID.Crimstone, + TileID.Pearlstone, + // Sands + TileID.Sand, + TileID.Ebonsand, + TileID.Crimsand, + TileID.Pearlsand, + // Snows + TileID.SnowBlock, + // Calamity Tiles + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + }); + + /// + /// Makes the specified tile merge with all ores, vanilla and Calamity. Particularly useful for stone blocks. + /// + /// The tile whose merging properties will be set. + public static void MergeWithOres(int type) => MergeWithSet(type, new int[] { + // Vanilla Ores + TileID.Copper, + TileID.Tin, + TileID.Iron, + TileID.Lead, + TileID.Silver, + TileID.Tungsten, + TileID.Gold, + TileID.Demonite, + TileID.Crimtane, + TileID.Cobalt, + TileID.Palladium, + TileID.Mythril, + TileID.Platinum, + TileID.Orichalcum, + TileID.Adamantite, + TileID.Titanium, + TileID.LunarOre, + // Calamity Ores + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + }); + + /// + /// Makes the specified tile merge with all types of desert tiles, including the Calamity Sunken Sea. + /// + /// The tile whose merging properties will be set. + public static void MergeWithDesert(int type) => MergeWithSet(type, new int[] { + // Sands + TileID.Sand, + TileID.Ebonsand, + TileID.Crimsand, + TileID.Pearlsand, + // Hardened Sands + TileID.HardenedSand, + TileID.CorruptHardenedSand, + TileID.CrimsonHardenedSand, + TileID.HallowHardenedSand, + // Sandstones + TileID.Sandstone, + TileID.CorruptSandstone, + TileID.CrimsonSandstone, + TileID.HallowSandstone, + // Miscellaneous Desert Tiles + TileID.FossilOre, + TileID.DesertFossil, + // Astral Desert + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + // Sunken Sea + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + }); + + /// + /// Makes the specified tile merge with all types of snow and ice tiles. + /// + /// The tile whose merging properties will be set. + public static void MergeWithSnow(int type) => MergeWithSet(type, new int[] { + // Snows + TileID.SnowBlock, + // Ices + TileID.IceBlock, + TileID.CorruptIce, + TileID.FleshIce, + TileID.HallowedIce, + // Astral Snow + ModContent.TileType(), + ModContent.TileType(), + }); + + /// + /// Makes the specified tile merge with all tiles which generate in hell. Does not include Charred Ore. + /// + /// The tile whose merging properties will be set. + public static void MergeWithHell(int type) => MergeWithSet(type, new int[] { + TileID.Ash, + TileID.Hellstone, + TileID.ObsidianBrick, + TileID.HellstoneBrick, + ModContent.TileType(), + }); + + /// + /// Makes the specified tile merge with all tiles which generate in the Abyss or the Sulphurous Sea. Includes Chaotic Ore. + /// + /// The tile whose merging properties will be set. + public static void MergeWithAbyss(int type) => MergeWithSet(type, new int[] { + // Sulphurous Sea + ModContent.TileType(), + // Abyss + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + }); + + /// + /// Makes the tile merge with all the tile types that generate within various types of astral tiles + /// + /// + public static void MergeAstralTiles(int type) + { + //Astral + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + //Astral Desert + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + //Astral Snow + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + } + + /// + /// Makes the tile merge with all the decorative 'smooth' tiles + /// + /// + public static void MergeSmoothTiles(int type) + { + //Vanilla + SetMerge(type, TileID.MarbleBlock); + SetMerge(type, TileID.GraniteBlock); + //Calam + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + } + + /// + /// Makes the tile merge with other mergable decorative tiles + /// + /// + public static void MergeDecorativeTiles(int type) + { + //Vanilla decor + Main.tileBrick[type] = true; + //Calam + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + SetMerge(type, ModContent.TileType()); + } + #endregion + + #region Furniture Interaction public static bool BedRightClick(int i, int j) { Player player = Main.LocalPlayer; @@ -860,14 +1125,20 @@ namespace CalamityMod player.showItemIcon2 = 0; } } + #endregion #region Furniture SetDefaults - public static void SetUpBathtub(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a bathtub. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpBathtub(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.Width = 4; TileObjectData.newTile.Height = 2; TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; @@ -882,15 +1153,23 @@ namespace CalamityMod TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; TileObjectData.addAlternate(1); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All bathtubs count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } - public static void SetUpBed(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a bed. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpBed(this ModTile mt, bool lavaImmune = false) { - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; - TileID.Sets.HasOutlines[type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; + TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.Width = 4; TileObjectData.newTile.Height = 2; TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; @@ -905,51 +1184,83 @@ namespace CalamityMod TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; TileObjectData.addAlternate(1); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All beds count as chairs. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); } - public static void SetUpBookcase(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a bookcase. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpBookcase(this ModTile mt, bool lavaImmune = false) { - Main.tileSolidTop[type] = true; - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileTable[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileSolidTop[mt.Type] = true; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileTable[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All bookcases count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } - public static void SetUpCandelabra(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a candelabra. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpCandelabra(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = true; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = true; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All candelabras count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpCandle(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a candle. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpCandle(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); TileObjectData.newTile.CoordinateHeights = new int[] { 20 }; TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All candles count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpChair(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a chair. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpChair(this ModTile mt, bool lavaImmune = false) { - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; @@ -960,16 +1271,24 @@ namespace CalamityMod TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; TileObjectData.addAlternate(1); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // As you could probably guess, all chairs count as chairs. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); } - public static void SetUpChandelier(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a chandelier. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpChandelier(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.Width = 3; TileObjectData.newTile.Height = 3; TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; @@ -979,19 +1298,26 @@ namespace CalamityMod TileObjectData.newTile.UsesCustomCanPlace = true; TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All chandeliers count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpChest(int type) + /// + /// Extension which initializes a ModTile to be a chest. + /// + /// The ModTile which is being initialized. + internal static void SetUpChest(this ModTile mt) { - Main.tileSpelunker[type] = true; - Main.tileContainer[type] = true; - Main.tileShine2[type] = true; - Main.tileShine[type] = 1200; - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileValue[type] = 500; - TileID.Sets.HasOutlines[type] = true; + Main.tileSpelunker[mt.Type] = true; + Main.tileContainer[mt.Type] = true; + Main.tileShine2[mt.Type] = true; + Main.tileShine[mt.Type] = 1200; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileValue[mt.Type] = 500; + TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.newTile.Origin = new Point16(0, 1); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; @@ -1001,15 +1327,20 @@ namespace CalamityMod TileObjectData.newTile.StyleHorizontal = true; TileObjectData.newTile.LavaDeath = false; TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); } - public static void SetUpClock(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a clock. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpClock(this ModTile mt, bool lavaImmune = false) { - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - TileID.Sets.HasOutlines[type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); TileObjectData.newTile.Height = 5; TileObjectData.newTile.CoordinateHeights = new int[] @@ -1023,20 +1354,25 @@ namespace CalamityMod TileObjectData.newTile.Origin = new Point16(0, 4); TileObjectData.newTile.UsesCustomCanPlace = true; TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); } - public static void SetUpDoorClosed(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a closed door. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpDoorClosed(this ModTile mt, bool lavaImmune = false) { - Main.tileFrameImportant[type] = true; - Main.tileBlockLight[type] = true; - Main.tileSolid[type] = true; - Main.tileNoAttach[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; - TileID.Sets.NotReallySolid[type] = true; - TileID.Sets.DrawsWalls[type] = true; - TileID.Sets.HasOutlines[type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileBlockLight[mt.Type] = true; + Main.tileSolid[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; + TileID.Sets.NotReallySolid[mt.Type] = true; + TileID.Sets.DrawsWalls[mt.Type] = true; + TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.Width = 1; TileObjectData.newTile.Height = 3; TileObjectData.newTile.Origin = new Point16(0, 0); @@ -1054,16 +1390,24 @@ namespace CalamityMod TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); TileObjectData.newAlternate.Origin = new Point16(0, 2); TileObjectData.addAlternate(0); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // As you could probably guess, all closed doors count as doors. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor); } - public static void SetUpDoorOpen(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be an open door. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpDoorOpen(this ModTile mt, bool lavaImmune = false) { - Main.tileFrameImportant[type] = true; - Main.tileSolid[type] = false; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; - Main.tileNoSunLight[type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileSolid[mt.Type] = false; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; + Main.tileNoSunLight[mt.Type] = true; TileObjectData.newTile.Width = 2; TileObjectData.newTile.Height = 3; TileObjectData.newTile.Origin = new Point16(0, 0); @@ -1103,21 +1447,28 @@ namespace CalamityMod TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; TileObjectData.addAlternate(1); - TileObjectData.addTile(type); - TileID.Sets.HousingWalls[type] = true; - TileID.Sets.HasOutlines[type] = true; + TileObjectData.addTile(mt.Type); + TileID.Sets.HousingWalls[mt.Type] = true; + TileID.Sets.HasOutlines[mt.Type] = true; + + // As you could probably guess, all open doors count as doors. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor); } - public static void SetUpDresser(int type) + /// + /// Extension which initializes a ModTile to be a dresser. + /// + /// The ModTile which is being initialized. + internal static void SetUpDresser(this ModTile mt) { - Main.tileSolidTop[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileTable[type] = true; - Main.tileContainer[type] = true; - Main.tileWaterDeath[type] = false; - Main.tileLavaDeath[type] = false; - TileID.Sets.HasOutlines[type] = true; + Main.tileSolidTop[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileTable[mt.Type] = true; + Main.tileContainer[mt.Type] = true; + Main.tileWaterDeath[mt.Type] = false; + Main.tileLavaDeath[mt.Type] = false; + TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.Origin = new Point16(1, 1); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; @@ -1127,102 +1478,170 @@ namespace CalamityMod TileObjectData.newTile.StyleHorizontal = true; TileObjectData.newTile.LavaDeath = false; TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All dressers count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } - public static void SetUpLamp(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a floor lamp. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpLamp(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style1xX); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All floor lamps count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpLantern(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a hanging lantern. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpLantern(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All hanging lanterns count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpPiano(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a piano. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpPiano(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All pianos count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } - public static void SetUpSink(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a platform. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpPlatform(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileSolidTop[mt.Type] = true; + Main.tileSolid[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileTable[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + TileID.Sets.Platforms[mt.Type] = true; + TileObjectData.newTile.CoordinateHeights = new int[] { 16 }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 27; + TileObjectData.newTile.StyleWrapLimit = 27; + TileObjectData.newTile.UsesCustomCanPlace = false; + TileObjectData.newTile.LavaDeath = !lavaImmune; + TileObjectData.addTile(mt.Type); + + // All platforms count as doors (so that you may have top-or-bottom entry/exit rooms) + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor); + } + + /// + /// Extension which initializes a ModTile to be a sink. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpSink(this ModTile mt, bool lavaImmune = false) + { + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); } - public static void SetUpSofa(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a sofa. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpSofa(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All sofas count as chairs. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); } - public static void SetUpTable(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a table. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpTable(this ModTile mt, bool lavaImmune = false) { - Main.tileSolidTop[type] = true; - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileTable[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; + Main.tileSolidTop[mt.Type] = true; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileTable[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // As you could probably guess, all tables count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } - public static void SetUpWorkBench(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a torch. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpTorch(this ModTile mt, bool lavaImmune = false, bool waterImmune = false) { - Main.tileSolidTop[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileNoAttach[type] = true; - Main.tileTable[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - Main.tileWaterDeath[type] = false; - TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); - TileObjectData.newTile.CoordinateHeights = new int[] { 18 }; - TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); - } - - public static void SetUpTorch(int type, bool lavaImmune = false, bool waterImmune = false) - { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileSolid[type] = false; - Main.tileNoAttach[type] = true; - Main.tileNoFail[type] = true; - Main.tileWaterDeath[type] = !waterImmune; - Main.tileLavaDeath[type] = !lavaImmune; + Main.tileLighted[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileSolid[mt.Type] = false; + Main.tileNoAttach[mt.Type] = true; + Main.tileNoFail[mt.Type] = true; + Main.tileWaterDeath[mt.Type] = !waterImmune; + Main.tileLavaDeath[mt.Type] = !lavaImmune; TileObjectData.newTile.CopyFrom(TileObjectData.StyleTorch); TileObjectData.newTile.WaterDeath = !waterImmune; TileObjectData.newTile.LavaDeath = !lavaImmune; @@ -1241,31 +1660,34 @@ namespace CalamityMod TileObjectData.newAlternate.WaterDeath = false; TileObjectData.newAlternate.AnchorWall = true; TileObjectData.addAlternate(0); - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All torches count as light sources. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); } - public static void SetUpPlatform(int type, bool lavaImmune = false) + /// + /// Extension which initializes a ModTile to be a work bench. + /// + /// The ModTile which is being initialized. + /// Whether this tile is supposed to be immune to lava. Defaults to false. + internal static void SetUpWorkBench(this ModTile mt, bool lavaImmune = false) { - Main.tileLighted[type] = true; - Main.tileFrameImportant[type] = true; - Main.tileSolidTop[type] = true; - Main.tileSolid[type] = true; - Main.tileNoAttach[type] = true; - Main.tileTable[type] = true; - Main.tileLavaDeath[type] = !lavaImmune; - TileID.Sets.Platforms[type] = true; - TileObjectData.newTile.CoordinateHeights = new int[] { 16 }; - TileObjectData.newTile.CoordinateWidth = 16; - TileObjectData.newTile.CoordinatePadding = 2; - TileObjectData.newTile.StyleHorizontal = true; - TileObjectData.newTile.StyleMultiplier = 27; - TileObjectData.newTile.StyleWrapLimit = 27; - TileObjectData.newTile.UsesCustomCanPlace = false; + Main.tileSolidTop[mt.Type] = true; + Main.tileFrameImportant[mt.Type] = true; + Main.tileNoAttach[mt.Type] = true; + Main.tileTable[mt.Type] = true; + Main.tileLavaDeath[mt.Type] = !lavaImmune; + Main.tileWaterDeath[mt.Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new int[] { 18 }; TileObjectData.newTile.LavaDeath = !lavaImmune; - TileObjectData.addTile(type); + TileObjectData.addTile(mt.Type); + + // All work benches count as tables. + mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); } #endregion - #endregion #region Drawing Utilities @@ -1433,6 +1855,33 @@ namespace CalamityMod #endregion #region Miscellaneous Utilities + public static T[] ShuffleArray(T[] array, Random rand = null) + { + if (rand is null) + rand = new Random(); + + for (int i = array.Length; i > 0; --i) + { + int j = rand.Next(i); + T tempElement = array[j]; + array[j] = array[i - 1]; + array[i - 1] = tempElement; + } + return array; + } + + public static string CombineStrings(params object[] args) + { + StringBuilder result = new StringBuilder(1024); + for(int i = 0; i < args.Length; ++i) + { + object o = args[i]; + result.Append(o.ToString()); + result.Append(' '); + } + return result.ToString(); + } + public static void StartSandstorm() { typeof(Terraria.GameContent.Events.Sandstorm).GetMethod("StartSandstorm", BindingFlags.Static | BindingFlags.NonPublic).Invoke(null, null); diff --git a/Utilities/CustomTileFraming.cs b/Utilities/TileFraming.cs similarity index 72% rename from Utilities/CustomTileFraming.cs rename to Utilities/TileFraming.cs index cd4e6164d7..a36f95ea47 100644 --- a/Utilities/CustomTileFraming.cs +++ b/Utilities/TileFraming.cs @@ -1,5 +1,4 @@ -using CalamityMod.Tiles; -using CalamityMod.Tiles.Abyss; +using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Astral; using CalamityMod.Tiles.AstralDesert; using CalamityMod.Tiles.AstralSnow; @@ -14,22 +13,40 @@ using Terraria.ModLoader; namespace CalamityMod { - public static class CustomTileFraming + public static class TileFraming { private static int[][] PlantCheckAgainst; private static Dictionary VineToGrass; + + // CONSIDER -- This is a triangle array, but does it need to be? Main.tileMerge is a triangle array as well public static bool[][] tileMergeTypes; - static CustomTileFraming() + #region Similarity Enum + private enum Similarity { - Setup(); + Same, + MergeLink, + None } - private static void Setup() + private static Similarity GetSimilarity(Tile check, int myType, int mergeType) { - int size = CalamityGlobalTile.PlantTypes.Length; - PlantCheckAgainst = new int[TileLoader.TileCount][]; + if (check is null || !check.active()) + return Similarity.None; + if (check.type == myType || Main.tileMerge[myType][check.type]) + return Similarity.Same; + else if (check.type == mergeType) + return Similarity.MergeLink; + + return Similarity.None; + } + #endregion + + #region Load/Unload + internal static void Load() + { + PlantCheckAgainst = new int[TileLoader.TileCount][]; PlantCheckAgainst[TileID.Plants] = new int[3] { TileID.Grass, TileID.PlanterBox, TileID.ClayPot }; PlantCheckAgainst[TileID.CorruptPlants] = new int[1] { TileID.CorruptGrass }; PlantCheckAgainst[TileID.JunglePlants] = new int[1] { TileID.JungleGrass }; @@ -42,18 +59,17 @@ namespace CalamityMod PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; - VineToGrass = new Dictionary(); - VineToGrass[TileID.Vines] = TileID.Grass; - VineToGrass[TileID.CrimsonVines] = TileID.FleshGrass; - VineToGrass[TileID.HallowedVines] = TileID.HallowedGrass; - VineToGrass[(ushort)ModContent.TileType()] = (ushort)ModContent.TileType(); + VineToGrass = new Dictionary + { + [TileID.Vines] = TileID.Grass, + [TileID.CrimsonVines] = TileID.FleshGrass, + [TileID.HallowedVines] = TileID.HallowedGrass, + [(ushort)ModContent.TileType()] = (ushort)ModContent.TileType() + }; tileMergeTypes = new bool[TileLoader.TileCount][]; - for (int i = 0; i < tileMergeTypes.Length; i++) - { + for (int i = 0; i < tileMergeTypes.Length; ++i) tileMergeTypes[i] = new bool[TileLoader.TileCount]; - } - tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; @@ -77,261 +93,149 @@ namespace CalamityMod tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; - } - private static bool PlantNeedsUpdate(int plantType, int checkType) + internal static void Unload() { - if (PlantCheckAgainst[plantType] == null) + PlantCheckAgainst = null; + VineToGrass.Clear(); + VineToGrass = null; + tileMergeTypes = null; + } + #endregion + + #region Framing Helpers + private static bool GetMerge(Tile myTile, Tile mergeTile) + { + if (myTile is null || mergeTile is null) return false; - int size = PlantCheckAgainst[plantType].Length; - for (int i = 0; i < size; i++) - { - if (PlantCheckAgainst[plantType][i] == checkType) - { - return false; - } - } - return true; + return mergeTile.active() && (mergeTile.type == myTile.type || Main.tileMerge[myTile.type][mergeTile.type]); } - public static void CheckPlants(int x, int y) + private static void SetFrameAt(int x, int y, int frameX, int frameY) { - int checkType = -1; - int plantType = Main.tile[x, y].type; - - if (y + 1 >= Main.maxTilesY) - checkType = plantType; - Tile tile = Main.tile[x, y]; - Tile below = Main.tile[x, y + 1]; - if (y + 1 < Main.maxTilesY && below != null && below.nactive() && !below.halfBrick() && below.slope() == 0) - checkType = below.type; + if (tile != null) + { + tile.frameX = (short)frameX; + tile.frameY = (short)frameY; + } + } + #endregion - if (checkType == -1) + #region Specific Framing Code + internal static void PlantFrame(int x, int y) + { + Tile tile = Main.tile[x, y]; + if (tile is null) return; - //Check if this plant needs an update - if (PlantNeedsUpdate(plantType, checkType)) - { - if ((plantType == TileID.Plants || plantType == TileID.Plants2) && checkType != TileID.Grass && tile.frameX >= 162) - { - Main.tile[x, y].frameX = 126; - } - if (plantType == TileID.JunglePlants2 && checkType != TileID.JungleGrass && tile.frameX >= 162) - { - Main.tile[x, y].frameX = 126; - } + int checkType = -1; + int plantType = tile.type; - if (checkType == TileID.CorruptGrass) - { - plantType = TileID.CorruptPlants; - if (tile.frameX >= 162) - { - Main.tile[x, y].frameX = 126; - } - } - else if (checkType == TileID.Grass) - { - if (plantType == TileID.HallowedPlants2) - { - plantType = TileID.Plants2; - } - else - { - plantType = TileID.Plants; - } - } - else if (checkType == TileID.HallowedGrass) - { - if (plantType == TileID.Plants2) - { - plantType = TileID.HallowedPlants2; - } - else - { - plantType = TileID.HallowedPlants; - } - } - else if (checkType == TileID.FleshGrass) - { - plantType = TileID.FleshWeeds; - } - else if (checkType == TileID.MushroomGrass) - { - plantType = TileID.MushroomPlants; - while (Main.tile[x, y].frameX > 72) - { - Main.tile[x, y].frameX -= 72; - } - } - else if (checkType == ModContent.GetInstance().TileType("AstralGrass")) //ASTRAL - { - if (plantType == TileID.Plants || plantType == TileID.CorruptPlants || - plantType == TileID.FleshWeeds || plantType == TileID.HallowedPlants || - plantType == TileID.MushroomPlants || plantType == TileID.JunglePlants) - { - plantType = ModContent.GetInstance().TileType("AstralShortPlants"); - } - else - { - plantType = ModContent.GetInstance().TileType("AstralTallPlants"); - } - } - if (plantType != Main.tile[x, y].type) - { - Main.tile[x, y].type = (ushort)plantType; - return; - } - WorldGen.KillTile(x, y, false, false, false); - } - } - - public static void VineFrame(int x, int y) - { - Tile tile = Main.tile[x, y]; - int myType = tile.type; - Tile tile2 = Main.tile[x, y - 1]; - Tile tile3 = Main.tile[x, y + 1]; - Tile tile4 = Main.tile[x - 1, y]; - Tile tile5 = Main.tile[x + 1, y]; - Tile tile6 = Main.tile[x - 1, y + 1]; - Tile tile7 = Main.tile[x + 1, y + 1]; - Tile tile8 = Main.tile[x - 1, y - 1]; - Tile tile9 = Main.tile[x + 1, y - 1]; - if (tile4 != null && tile4.active()) - { - if (Main.tileStone[(int)tile4.type]) - { - } - else - { - int num55 = (int)tile4.type; - } - if (tile4.slope() == 1 || tile4.slope() == 3) - { - } - } - if (tile5 != null && tile5.active()) - { - if (Main.tileStone[(int)tile5.type]) - { - } - else - { - int num56 = (int)tile5.type; - } - if (tile5.slope() == 2 || tile5.slope() == 4) - { - } - } - - int num53; - if (tile2 != null && tile2.active()) - { - if (Main.tileStone[(int)tile2.type]) - { - } - else - { - num53 = (int)tile2.type; - } - if (tile2.slope() == 3 || tile2.slope() == 4) - { - } - } - if (tile3 != null && tile3.active()) - { - if (Main.tileStone[(int)tile3.type]) - { - } - else - { - int num58 = (int)tile3.type; - } - if (tile3.slope() == 1 || tile3.slope() == 2) - { - } - } - if (tile8 != null && tile8.active()) - { - if (Main.tileStone[(int)tile8.type]) - { - } - else - { - int num52 = (int)tile8.type; - } - } - if (tile9 != null && tile9.active()) - { - if (Main.tileStone[(int)tile9.type]) - { - } - else - { - int num54 = (int)tile9.type; - } - } - if (tile6 != null && tile6.active()) - { - if (Main.tileStone[(int)tile6.type]) - { - } - else - { - int num57 = (int)tile6.type; - } - } - if (tile7 != null && tile7.active()) - { - if (Main.tileStone[(int)tile7.type]) - { - } - else - { - int num59 = (int)tile7.type; - } - } - if (tile.slope() == 2) - { - } - if (tile.slope() == 1) - { - } - if (tile.slope() == 4) - { - } - if (tile.slope() == 3) - { - } - - if (tile2 != null) - { - if (!tile2.active()) - { - num53 = -1; - } - else if (tile2.bottomSlope()) - { - num53 = -1; - } - else - { - num53 = (int)tile2.type; - } - } + // If the tile below is off the bottom of the map, then assume it's the same tile type. + if (y + 1 >= Main.maxTilesY) + checkType = plantType; else { - num53 = myType; + Tile below = Main.tile[x, y + 1]; + if (below != null && below.nactive() && !below.halfBrick() && below.slope() == 0) + checkType = below.type; } - ushort[] vines = VineToGrass.Keys.ToArray(); - - for (int i = 0; i < vines.Length; i++) + // Sub function to determine whether the plant needs an update + bool PlantNeedsUpdate(int plant, int check) { - ushort myGrassType = VineToGrass[(ushort)vines[i]]; - if (myType != vines[i] && (num53 == myGrassType || num53 == vines[i])) + if (PlantCheckAgainst[plant] is null) + return false; + + for (int i = 0; i < PlantCheckAgainst[plant].Length; ++i) + if (PlantCheckAgainst[plant][i] == check) + return false; + + return true; + } + + // If no valid below tile type could be determined, then don't do anything. + // Additionally, don't do anything if the plant doesn't need a framing update. + if (checkType == -1 || !PlantNeedsUpdate(plantType, checkType)) + return; + + if ((plantType == TileID.Plants || plantType == TileID.Plants2) && checkType != TileID.Grass && tile.frameX >= 162) + { + Main.tile[x, y].frameX = 126; + } + if (plantType == TileID.JunglePlants2 && checkType != TileID.JungleGrass && tile.frameX >= 162) + { + Main.tile[x, y].frameX = 126; + } + + if (checkType == TileID.CorruptGrass) + { + plantType = TileID.CorruptPlants; + if (tile.frameX >= 162) + { + Main.tile[x, y].frameX = 126; + } + } + else if (checkType == TileID.Grass) + { + plantType = plantType == TileID.HallowedPlants2 ? TileID.Plants2 : TileID.Plants; + } + else if (checkType == TileID.HallowedGrass) + { + plantType = plantType == TileID.Plants2 ? TileID.HallowedPlants2 : TileID.HallowedPlants; + } + else if (checkType == TileID.FleshGrass) + { + plantType = TileID.FleshWeeds; + } + else if (checkType == TileID.MushroomGrass) + { + plantType = TileID.MushroomPlants; + while (Main.tile[x, y].frameX > 72) + { + Main.tile[x, y].frameX -= 72; + } + } + + // Astral grass and plant behavior + else if (checkType == ModContent.GetInstance().TileType("AstralGrass")) + { + bool isShortPlant = plantType == TileID.Plants || + plantType == TileID.CorruptPlants || + plantType == TileID.FleshWeeds || + plantType == TileID.HallowedPlants || + plantType == TileID.MushroomPlants || + plantType == TileID.JunglePlants; + plantType = ModContent.GetInstance().TileType(isShortPlant ? "AstralShortPlants" : "AstralTallPlants"); + } + + // If the tile type is not the same as the plant type, then set it equal. Otherwise, destroy it. + if (Main.tile[x, y].type != plantType) + Main.tile[x, y].type = (ushort)plantType; + else + WorldGen.KillTile(x, y, false, false, false); + } + + internal static void VineFrame(int x, int y) + { + Tile tile = Main.tile[x, y]; + if (tile is null) + return; + + int myType = tile.type; + + // Get the type of the tile above this vine. If that tile doesn't exist, just assume it's another vine. + Tile north = y <= 0 ? null : Main.tile[x, y - 1]; + int northType = north is null ? myType : (!north.active() || north.bottomSlope()) ? -1 : north.type; + + // Make this vine match the tile above it if that's another vine or a grass tile. + ushort[] vines = VineToGrass.Keys.ToArray(); + for (int i = 0; i < vines.Length; ++i) + { + ushort correspondingGrass = VineToGrass[vines[i]]; + if (myType != vines[i] && (northType == correspondingGrass || northType == vines[i])) { Main.tile[x, y].type = vines[i]; WorldGen.SquareTileFrame(x, y, true); @@ -339,57 +243,52 @@ namespace CalamityMod } } - if (num53 != myType) + // If the tile above is an identical vine, nothing else needs to be done. + if (northType == myType) + return; + + // If the tile above isn't sloped correctly or otherwise isn't a valid anchor for this vine, check whether the vine must die. + bool tileMustDie = northType == -1; + if(northType != -1) { - bool flag17 = false; - if (num53 == -1) + // Vanilla vines can hang from vanilla grass and vanilla leaf blocks. + if (myType == TileID.Vines && northType != TileID.Grass && northType != TileID.LeafBlock) + tileMustDie = true; + else for (int i = 0; i < vines.Length; ++i) { - flag17 = true; - } - else - { - for (int i = 0; i < vines.Length; i++) + // Not matching grass? Die. + if (myType == vines[i] && northType != VineToGrass[vines[i]]) { - if (myType != TileID.Vines) - { - if (myType == vines[i] && num53 != VineToGrass[vines[i]]) - { - flag17 = true; - } - } - else if (num53 != TileID.Grass && num53 != TileID.LeafBlock) - { - flag17 = true; - } + tileMustDie = true; + break; } } - if (flag17) - { - WorldGen.KillTile(x, y, false, false, false); - } } - return; + + if (tileMustDie) + WorldGen.KillTile(x, y, false, false, false); } - public static bool BetterGemsparkFraming(int x, int y, bool resetFrame) + internal static bool BetterGemsparkFraming(int x, int y, bool resetFrame) { Tile tile = Main.tile[x, y]; + if (tile is null) + return false; if (tile.slope() > 0 && TileID.Sets.HasSlopeFrames[tile.type]) { return true; } - Tile tile2 = Main.tile[x, y - 1]; - Tile tile3 = Main.tile[x, y + 1]; - Tile tile4 = Main.tile[x - 1, y]; - Tile tile5 = Main.tile[x + 1, y]; - Tile tile6 = Main.tile[x - 1, y + 1]; - Tile tile7 = Main.tile[x + 1, y + 1]; - Tile tile8 = Main.tile[x - 1, y - 1]; - Tile tile9 = Main.tile[x + 1, y - 1]; - - int myType = tile.type; + // these all get null checked in the GetMerge function + Tile north = Main.tile[x, y - 1]; + Tile south = Main.tile[x, y + 1]; + Tile west = Main.tile[x - 1, y]; + Tile east = Main.tile[x + 1, y]; + Tile southwest = Main.tile[x - 1, y + 1]; + Tile southeast = Main.tile[x + 1, y + 1]; + Tile northwest = Main.tile[x - 1, y - 1]; + Tile northeast = Main.tile[x + 1, y - 1]; bool left = false; bool right = false; @@ -400,23 +299,24 @@ namespace CalamityMod bool downLeft = false; bool downRight = false; - if (GetMerge(tile, tile2) && (tile2.slope() == 0 || tile2.slope() == 1 || tile2.slope() == 2)) + if (GetMerge(tile, north) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 2)) up = true; - if (GetMerge(tile, tile3) && (tile3.slope() == 0 || tile3.slope() == 3 || tile3.slope() == 4)) + if (GetMerge(tile, south) && (south.slope() == 0 || south.slope() == 3 || south.slope() == 4)) down = true; - if (GetMerge(tile, tile4) && (tile4.slope() == 0 || tile4.slope() == 2 || tile4.slope() == 4)) + if (GetMerge(tile, west) && (west.slope() == 0 || west.slope() == 2 || west.slope() == 4)) left = true; - if (GetMerge(tile, tile5) && (tile5.slope() == 0 || tile5.slope() == 1 || tile5.slope() == 3)) + if (GetMerge(tile, east) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 3)) right = true; - if (GetMerge(tile, tile2) && GetMerge(tile, tile4) && GetMerge(tile, tile8) && (tile8.slope() == 0 || tile8.slope() == 2) && (tile2.slope() == 0 || tile2.slope() == 1 || tile2.slope() == 3) && (tile4.slope() == 0 || tile4.slope() == 3 || tile4.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, west) && GetMerge(tile, northwest) && (northwest.slope() == 0 || northwest.slope() == 2) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 3) && (west.slope() == 0 || west.slope() == 3 || west.slope() == 4)) upLeft = true; - if (GetMerge(tile, tile2) && GetMerge(tile, tile5) && GetMerge(tile, tile9) && (tile9.slope() == 0 || tile9.slope() == 1) && (tile2.slope() == 0 || tile2.slope() == 2 || tile2.slope() == 4) && (tile5.slope() == 0 || tile5.slope() == 3 || tile5.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, east) && GetMerge(tile, northeast) && (northeast.slope() == 0 || northeast.slope() == 1) && (north.slope() == 0 || north.slope() == 2 || north.slope() == 4) && (east.slope() == 0 || east.slope() == 3 || east.slope() == 4)) upRight = true; - if (GetMerge(tile, tile3) && GetMerge(tile, tile4) && GetMerge(tile, tile6) && !tile6.halfBrick() && (tile6.slope() == 0 || tile6.slope() == 4) && (tile3.slope() == 0 || tile3.slope() == 1 || tile3.slope() == 3) && (tile4.slope() == 0 || tile4.slope() == 1 || tile4.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, west) && GetMerge(tile, southwest) && !southwest.halfBrick() && (southwest.slope() == 0 || southwest.slope() == 4) && (south.slope() == 0 || south.slope() == 1 || south.slope() == 3) && (west.slope() == 0 || west.slope() == 1 || west.slope() == 2)) downLeft = true; - if (GetMerge(tile, tile3) && GetMerge(tile, tile5) && GetMerge(tile, tile7) && !tile7.halfBrick() && (tile7.slope() == 0 || tile7.slope() == 3) && (tile3.slope() == 0 || tile3.slope() == 2 || tile3.slope() == 4) && (tile5.slope() == 0 || tile5.slope() == 1 || tile5.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, east) && GetMerge(tile, southeast) && !southeast.halfBrick() && (southeast.slope() == 0 || southeast.slope() == 3) && (south.slope() == 0 || south.slope() == 2 || south.slope() == 4) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 2)) downRight = true; + // Reset the tile's random frame style if the frame is being reset. int randomFrame; if (resetFrame) { @@ -647,25 +547,26 @@ namespace CalamityMod return true; } - public static bool BrimstoneFraming(int x, int y, bool resetFrame) + internal static bool BrimstoneFraming(int x, int y, bool resetFrame) { Tile tile = Main.tile[x, y]; + if (tile is null) + return false; if (tile.slope() > 0 && TileID.Sets.HasSlopeFrames[tile.type]) { return true; } - Tile tile2 = Main.tile[x, y - 1]; - Tile tile3 = Main.tile[x, y + 1]; - Tile tile4 = Main.tile[x - 1, y]; - Tile tile5 = Main.tile[x + 1, y]; - Tile tile6 = Main.tile[x - 1, y + 1]; - Tile tile7 = Main.tile[x + 1, y + 1]; - Tile tile8 = Main.tile[x - 1, y - 1]; - Tile tile9 = Main.tile[x + 1, y - 1]; - - int myType = tile.type; + // these all get null checked in the GetMerge function + Tile north = Main.tile[x, y - 1]; + Tile south = Main.tile[x, y + 1]; + Tile west = Main.tile[x - 1, y]; + Tile east = Main.tile[x + 1, y]; + Tile southwest = Main.tile[x - 1, y + 1]; + Tile southeast = Main.tile[x + 1, y + 1]; + Tile northwest = Main.tile[x - 1, y - 1]; + Tile northeast = Main.tile[x + 1, y - 1]; bool left = false; bool right = false; @@ -676,23 +577,24 @@ namespace CalamityMod bool downLeft = false; bool downRight = false; - if (GetMerge(tile, tile2) && (tile2.slope() == 0 || tile2.slope() == 1 || tile2.slope() == 2)) + if (GetMerge(tile, north) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 2)) up = true; - if (GetMerge(tile, tile3) && (tile3.slope() == 0 || tile3.slope() == 3 || tile3.slope() == 4)) + if (GetMerge(tile, south) && (south.slope() == 0 || south.slope() == 3 || south.slope() == 4)) down = true; - if (GetMerge(tile, tile4) && (tile4.slope() == 0 || tile4.slope() == 2 || tile4.slope() == 4)) + if (GetMerge(tile, west) && (west.slope() == 0 || west.slope() == 2 || west.slope() == 4)) left = true; - if (GetMerge(tile, tile5) && (tile5.slope() == 0 || tile5.slope() == 1 || tile5.slope() == 3)) + if (GetMerge(tile, east) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 3)) right = true; - if (GetMerge(tile, tile2) && GetMerge(tile, tile4) && GetMerge(tile, tile8) && (tile8.slope() == 0 || tile8.slope() == 2) && (tile2.slope() == 0 || tile2.slope() == 1 || tile2.slope() == 3) && (tile4.slope() == 0 || tile4.slope() == 3 || tile4.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, west) && GetMerge(tile, northwest) && (northwest.slope() == 0 || northwest.slope() == 2) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 3) && (west.slope() == 0 || west.slope() == 3 || west.slope() == 4)) upLeft = true; - if (GetMerge(tile, tile2) && GetMerge(tile, tile5) && GetMerge(tile, tile9) && (tile9.slope() == 0 || tile9.slope() == 1) && (tile2.slope() == 0 || tile2.slope() == 2 || tile2.slope() == 4) && (tile5.slope() == 0 || tile5.slope() == 3 || tile5.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, east) && GetMerge(tile, northeast) && (northeast.slope() == 0 || northeast.slope() == 1) && (north.slope() == 0 || north.slope() == 2 || north.slope() == 4) && (east.slope() == 0 || east.slope() == 3 || east.slope() == 4)) upRight = true; - if (GetMerge(tile, tile3) && GetMerge(tile, tile4) && GetMerge(tile, tile6) && !tile6.halfBrick() && (tile6.slope() == 0 || tile6.slope() == 4) && (tile3.slope() == 0 || tile3.slope() == 1 || tile3.slope() == 3) && (tile4.slope() == 0 || tile4.slope() == 1 || tile4.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, west) && GetMerge(tile, southwest) && !southwest.halfBrick() && (southwest.slope() == 0 || southwest.slope() == 4) && (south.slope() == 0 || south.slope() == 1 || south.slope() == 3) && (west.slope() == 0 || west.slope() == 1 || west.slope() == 2)) downLeft = true; - if (GetMerge(tile, tile3) && GetMerge(tile, tile5) && GetMerge(tile, tile7) && !tile7.halfBrick() && (tile7.slope() == 0 || tile7.slope() == 3) && (tile3.slope() == 0 || tile3.slope() == 2 || tile3.slope() == 4) && (tile5.slope() == 0 || tile5.slope() == 1 || tile5.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, east) && GetMerge(tile, southeast) && !southeast.halfBrick() && (southeast.slope() == 0 || southeast.slope() == 3) && (south.slope() == 0 || south.slope() == 2 || south.slope() == 4) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 2)) downRight = true; + // Reset the tile's random frame style if the frame is being reset. int randomFrame; if (resetFrame) { @@ -922,21 +824,23 @@ namespace CalamityMod return true; } + #endregion - enum Similarity + #region Generic Custom Framing Code + internal static void CustomMergeFrameExplicit(int x, int y, int myType, int mergeType, out bool mergedUp, + out bool mergedLeft, out bool mergedRight, out bool mergedDown, bool forceSameDown = false, + bool forceSameUp = false, bool forceSameLeft = false, bool forceSameRight = false, bool resetFrame = true) { - Same, - MergeLink, - None - } - public static void FrameTileForCustomMerge(int x, int y, int myType, int mergeType, bool forceSameDown = false, bool forceSameUp = false, bool forceSameLeft = false, bool forceSameRight = false, bool resetFrame = true) - { - bool tmp; - FrameTileForCustomMerge(x, y, myType, mergeType, out tmp, out tmp, out tmp, out tmp, forceSameDown, forceSameUp, forceSameLeft, forceSameRight, resetFrame); - } + if (Main.tile[x, y] is null) + { + mergedUp = mergedLeft = mergedRight = mergedDown = false; + return; + } - public static void FrameTileForCustomMerge(int x, int y, int myType, int mergeType, out bool mergedUp, out bool mergedLeft, out bool mergedRight, out bool mergedDown, bool forceSameDown = false, bool forceSameUp = false, bool forceSameLeft = false, bool forceSameRight = false, bool resetFrame = true) - { + // Disable vanilla trying to merge these tiles automtaically. + Main.tileMerge[myType][mergeType] = false; + + // these all get null checked in the GetSimilarity and GetMerge functions Tile tileLeft = Main.tile[x - 1, y]; Tile tileRight = Main.tile[x + 1, y]; Tile tileUp = Main.tile[x, y - 1]; @@ -946,28 +850,19 @@ namespace CalamityMod Tile tileBottomLeft = Main.tile[x - 1, y + 1]; Tile tileBottomRight = Main.tile[x + 1, y + 1]; - Main.tileMerge[myType][mergeType] = false; + // Cardinal directions + Similarity leftSim = forceSameLeft ? Similarity.Same : GetSimilarity(tileLeft, myType, mergeType); + Similarity rightSim = forceSameRight ? Similarity.Same : GetSimilarity(tileRight, myType, mergeType); + Similarity upSim = forceSameUp ? Similarity.Same : GetSimilarity(tileUp, myType, mergeType); + Similarity downSim = forceSameDown ? Similarity.Same : GetSimilarity(tileDown, myType, mergeType); - //CARDINAL - Similarity leftSim = GetSimilarity(tileLeft, myType, mergeType); - if (forceSameLeft) - leftSim = Similarity.Same; - Similarity rightSim = GetSimilarity(tileRight, myType, mergeType); - if (forceSameRight) - rightSim = Similarity.Same; - Similarity upSim = GetSimilarity(tileUp, myType, mergeType); - if (forceSameUp) - upSim = Similarity.Same; - Similarity downSim = GetSimilarity(tileDown, myType, mergeType); - if (forceSameDown) - downSim = Similarity.Same; - - //DIAGONAL + // Diagonal directions Similarity topLeftSim = GetSimilarity(tileTopLeft, myType, mergeType); Similarity topRightSim = GetSimilarity(tileTopRight, myType, mergeType); Similarity bottomLeftSim = GetSimilarity(tileBottomLeft, myType, mergeType); Similarity bottomRightSim = GetSimilarity(tileBottomRight, myType, mergeType); + // Reset the tile's random frame style if the frame is being reset. int randomFrame; if (resetFrame) { @@ -979,14 +874,10 @@ namespace CalamityMod randomFrame = Main.tile[x, y].frameNumber(); } - /* DEBUGGING - if (Player.tileTargetX == x && Player.tileTargetY == y) - { - Main.NewText(StringWriter(leftSim, rightSim, upSim, downSim, topLeftSim, topRightSim, bottomLeftSim, bottomRightSim, forceSameDown, forceSameUp, forceSameLeft, forceSameRight)); - }*/ - + // Initialize all merged variables to false. mergedDown = mergedLeft = mergedRight = mergedUp = false; + #region Custom Merge Conditional Tree if (leftSim == Similarity.None) { if (upSim == Similarity.Same) @@ -1481,111 +1372,69 @@ namespace CalamityMod } SetFrameAt(x, y, 216, 18 * randomFrame); return; + #endregion } - public static void FrameTileForCustomMergeFrom(int x, int y, int myType, int mergeType) + internal static void CustomMergeFrame(int x, int y, int myType, int mergeType, bool forceSameDown = false, + bool forceSameUp = false, bool forceSameLeft = false, bool forceSameRight = false, bool resetFrame = true) + => CustomMergeFrameExplicit(x, y, myType, mergeType, out _, out _, out _, out _, forceSameDown, forceSameUp, forceSameLeft, forceSameRight, resetFrame); + + internal static void CustomMergeFrame(int x, int y, int myType, int mergeType) { + Tile tile = Main.tile[x, y]; + if (tile is null) + return; + bool forceSameUp = false; bool forceSameDown = false; bool forceSameLeft = false; bool forceSameRight = false; - Tile up = Main.tile[x, y - 1]; - Tile down = Main.tile[x, y + 1]; - Tile left = Main.tile[x - 1, y]; - Tile right = Main.tile[x + 1, y]; + Tile north = Main.tile[x, y - 1]; + Tile south = Main.tile[x, y + 1]; + Tile west = Main.tile[x - 1, y]; + Tile east = Main.tile[x + 1, y]; - bool tmp; - - if (up.active() && tileMergeTypes[myType][up.type]) + if (north != null && north.active() && tileMergeTypes[myType][north.type]) { - TileMerge.MergeTile(myType, up.type, false); + // Register this tile as not automatically merging with the tile above it. + CalamityUtils.SetMerge(myType, north.type, false); TileID.Sets.ChecksForMerge[myType] = true; - bool mergedDown; - FrameTileForCustomMerge(x, y - 1, up.type, myType, out tmp, out tmp, out tmp, out mergedDown, false, false, false, false, false); - if (mergedDown) - { - forceSameUp = true; - } + // Properly frame the tile given this constraint. + CustomMergeFrameExplicit(x, y - 1, north.type, myType, out _, out _, out _, out forceSameUp, false, false, false, false, false); } - if (left.active() && tileMergeTypes[myType][left.type]) + if (west != null && west.active() && tileMergeTypes[myType][west.type]) { - TileMerge.MergeTile(myType, left.type, false); + // Register this tile as not automatically merging with the tile to the left of it. + CalamityUtils.SetMerge(myType, west.type, false); TileID.Sets.ChecksForMerge[myType] = true; - bool mergedRight; - FrameTileForCustomMerge(x - 1, y, left.type, myType, out tmp, out tmp, out mergedRight, out tmp, false, false, false, false, false); - if (mergedRight) - { - forceSameLeft = true; - } + // Properly frame the tile given this constraint. + CustomMergeFrameExplicit(x - 1, y, west.type, myType, out _, out _, out forceSameLeft, out _, false, false, false, false, false); } - if (right.active() && tileMergeTypes[myType][right.type]) + if (east != null && east.active() && tileMergeTypes[myType][east.type]) { - TileMerge.MergeTile(myType, right.type, false); + // Register this tile as not automatically merging with the tile to the right of it. + CalamityUtils.SetMerge(myType, east.type, false); TileID.Sets.ChecksForMerge[myType] = true; - bool mergedLeft; - FrameTileForCustomMerge(x + 1, y, right.type, myType, out tmp, out mergedLeft, out tmp, out tmp, false, false, false, false, false); - if (mergedLeft) - { - forceSameRight = true; - } + // Properly frame the tile given this constraint. + CustomMergeFrameExplicit(x + 1, y, east.type, myType, out _, out forceSameRight , out _, out _, false, false, false, false, false); } - if (down.active() && tileMergeTypes[myType][down.type]) + if (south != null && south.active() && tileMergeTypes[myType][south.type]) { - TileMerge.MergeTile(myType, down.type, false); + // Register this tile as not automatically merging with the tile below it. + CalamityUtils.SetMerge(myType, south.type, false); TileID.Sets.ChecksForMerge[myType] = true; - bool mergedUp; - FrameTileForCustomMerge(x, y + 1, down.type, myType, out mergedUp, out tmp, out tmp, out tmp, false, false, false, false, false); - if (mergedUp) - { - forceSameDown = true; - } + // Properly frame the tile given this constraint. + CustomMergeFrameExplicit(x, y + 1, south.type, myType, out forceSameDown, out _, out _, out _, false, false, false, false, false); } - FrameTileForCustomMerge(x, y, myType, mergeType, forceSameDown, forceSameUp, forceSameLeft, forceSameRight); - } - - private static void SetFrameAt(int x, int y, int frameX, int frameY) - { - Main.tile[x, y].frameX = (short)frameX; - Main.tile[x, y].frameY = (short)frameY; - } - - private static Similarity GetSimilarity(Tile check, int myType, int mergeType) - { - if (check is null || !check.active()) - return Similarity.None; - - if (check.type == myType || Main.tileMerge[myType][check.type]) - return Similarity.Same; - else if (check.type == mergeType) - return Similarity.MergeLink; - - return Similarity.None; - } - - private static bool GetMerge(Tile myTile, Tile mergeTile) - { - if (!mergeTile.active()) - return false; - return (mergeTile.type == myTile.type || Main.tileMerge[myTile.type][mergeTile.type]); - } - private static string StringWriter(params object[] strings) - { - string s = ""; - for (int i = 0; i < strings.Length; i++) - { - s += strings[i].ToString(); - if (i != strings.Length - 1) - { - s += ", "; - } - } - return s; + // With all constraints determined, properly frame the tile a final time. + CustomMergeFrameExplicit(x, y, myType, mergeType, out _, out _, out _, out _, forceSameDown, forceSameUp, forceSameLeft, forceSameRight, true); } + #endregion } } diff --git a/Utilities/TileMerge.cs b/Utilities/TileMerge.cs deleted file mode 100644 index 632c157a14..0000000000 --- a/Utilities/TileMerge.cs +++ /dev/null @@ -1,241 +0,0 @@ -using CalamityMod.Tiles; -using CalamityMod.Tiles.Abyss; -using CalamityMod.Tiles.Astral; -using CalamityMod.Tiles.AstralDesert; -using CalamityMod.Tiles.AstralSnow; -using CalamityMod.Tiles.Crags; -using CalamityMod.Tiles.FurnitureAbyss; -using CalamityMod.Tiles.FurnitureAshen; -using CalamityMod.Tiles.FurnitureEutrophic; -using CalamityMod.Tiles.FurnitureOccult; -using CalamityMod.Tiles.FurnitureProfaned; -using CalamityMod.Tiles.FurnitureVoid; -using CalamityMod.Tiles.Ores; -using CalamityMod.Tiles.SunkenSea; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod -{ - public static class TileMerge - { - public static void MergeTile(int type, int mergeType, bool merge = true) - { - if (type != mergeType) - { - Main.tileMerge[type][mergeType] = merge; - Main.tileMerge[mergeType][type] = merge; - } - } - - /// - /// Makes the tile merge with the most common types of naturally generated tiles - /// - /// - public static void MergeGeneralTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Soils - MergeTile(type, TileID.ClayBlock); - MergeTile(type, TileID.Dirt); - MergeTile(type, TileID.Mud); - //Sands - MergeTile(type, TileID.Sand); - MergeTile(type, TileID.Ebonsand); - MergeTile(type, TileID.Crimsand); - MergeTile(type, TileID.Pearlsand); - //Snows - MergeTile(type, TileID.SnowBlock); - //Stones - MergeTile(type, TileID.Stone); - MergeTile(type, TileID.Ebonstone); - MergeTile(type, TileID.Crimstone); - MergeTile(type, TileID.Pearlstone); - //Calam general tiles - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - public static void MergeOreTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Vanilla Ores - MergeTile(type, TileID.Copper); - MergeTile(type, TileID.Tin); - MergeTile(type, TileID.Iron); - MergeTile(type, TileID.Lead); - MergeTile(type, TileID.Silver); - MergeTile(type, TileID.Tungsten); - MergeTile(type, TileID.Gold); - MergeTile(type, TileID.Demonite); - MergeTile(type, TileID.Crimtane); - MergeTile(type, TileID.Cobalt); - MergeTile(type, TileID.Palladium); - MergeTile(type, TileID.Mythril); - MergeTile(type, TileID.Platinum); - MergeTile(type, TileID.Orichalcum); - MergeTile(type, TileID.Adamantite); - MergeTile(type, TileID.Titanium); - MergeTile(type, TileID.LunarOre); - //Calam Ores - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the tile types that generate within various types of desert, sunken sea and related tiles - /// - /// - public static void MergeDesertTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Sands - MergeTile(type, TileID.Sand); - MergeTile(type, TileID.Ebonsand); - MergeTile(type, TileID.Crimsand); - MergeTile(type, TileID.Pearlsand); - //Hardened Sands - MergeTile(type, TileID.HardenedSand); - MergeTile(type, TileID.CorruptHardenedSand); - MergeTile(type, TileID.CrimsonHardenedSand); - MergeTile(type, TileID.HallowHardenedSand); - //Sandstones - MergeTile(type, TileID.Sandstone); - MergeTile(type, TileID.CorruptSandstone); - MergeTile(type, TileID.CrimsonSandstone); - MergeTile(type, TileID.HallowSandstone); - //Misc relevant desert tiles - MergeTile(type, TileID.FossilOre); - MergeTile(type, TileID.DesertFossil); - //Calam desert tiles - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - //Sunken Sea tiles - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the tile types that generate within various types of snow or snow biome related tiles - /// - /// - public static void MergeSnowTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Snow - MergeTile(type, TileID.SnowBlock); - //Ices - MergeTile(type, TileID.IceBlock); - MergeTile(type, TileID.CorruptIce); - MergeTile(type, TileID.FleshIce); - MergeTile(type, TileID.HallowedIce); - //Calam snow tiles - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the tile types that generate within various types of hell or hell biome related tiles - /// - /// - public static void MergeHellTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Terrain - MergeTile(type, TileID.Ash); - MergeTile(type, TileID.Hellstone); - //Houses - MergeTile(type, TileID.ObsidianBrick); - MergeTile(type, TileID.HellstoneBrick); - //Crag tiles - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the tile types that generate within various types of abyss or abyss biome related tiles - /// - /// - public static void MergeAbyssTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Sulphurous Sea - MergeTile(type, ModContent.TileType()); - //Abyss - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the tile types that generate within various types of astral tiles - /// - /// - public static void MergeAstralTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Astral - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - //Astral Desert - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - //Astral Snow - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with all the decorative 'smooth' tiles - /// - /// - public static void MergeSmoothTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Vanilla - MergeTile(type, TileID.MarbleBlock); - MergeTile(type, TileID.GraniteBlock); - //Calam - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - - /// - /// Makes the tile merge with other mergable decorative tiles - /// - /// - public static void MergeDecorativeTiles(int type) - { - Mod mod = ModContent.GetInstance(); - //Vanilla decor - Main.tileBrick[type] = true; - //Calam - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - MergeTile(type, ModContent.TileType()); - } - } -} diff --git a/World/Abyss.cs b/World/Abyss.cs index 1b1510a95f..6a63a7044e 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -390,7 +390,7 @@ namespace CalamityMod.World islandLocationY += islandLocationOffset; } - CalamityWorld.AbyssItemArray = WorldGenerationMethods.ShuffleArray(CalamityWorld.AbyssItemArray); + CalamityWorld.AbyssItemArray = CalamityUtils.ShuffleArray(CalamityWorld.AbyssItemArray); for (int abyssHouse = 0; abyssHouse < CalamityWorld.numAbyssIslands; abyssHouse++) //11 15 19 { if (abyssHouse != 20) @@ -415,7 +415,7 @@ namespace CalamityMod.World { int style = WorldGen.genRand.Next(13, 16); WorldGen.PlacePot(abyssIndex, abyssIndex2, 28, style); - WorldGenerationMethods.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); } } else if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && @@ -425,7 +425,7 @@ namespace CalamityMod.World { int style = WorldGen.genRand.Next(25, 28); WorldGen.PlacePot(abyssIndex, abyssIndex2, 28, style); - WorldGenerationMethods.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); } } } @@ -447,7 +447,7 @@ namespace CalamityMod.World { int style = WorldGen.genRand.Next(13, 16); WorldGen.PlacePot(abyssIndex, abyssIndex2, 28, style); - WorldGenerationMethods.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); } } else if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && @@ -457,7 +457,7 @@ namespace CalamityMod.World { int style = WorldGen.genRand.Next(25, 28); WorldGen.PlacePot(abyssIndex, abyssIndex2, 28, style); - WorldGenerationMethods.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); } } } diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 6abc32d137..4d40bfdd7d 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1179,46 +1179,6 @@ namespace CalamityMod.World } #endregion - #region SafeTileFrame - public static void SafeSquareTileFrame(int i, int j, bool resetFrame = true) - { - if (Main.tile[i, j] != null) - { - for (int x = i - 1; x <= i + 1; x++) - { - for (int y = j - 1; y <= j + 1; y++) - { - if (x < 0 || y < 0 || x >= Main.maxTilesX || y >= Main.maxTilesY) - continue; - if (x == i && y == j) - { - WorldGen.TileFrame(i, j, resetFrame, false); - } - else - { - WorldGen.TileFrame(x, y, false, false); - } - } - } - } - } - #endregion - - #region ShuffleArray - public static int[] ShuffleArray(int[] array) - { - Random random = new Random(); - for (int index = array.Length; index > 0; index--) - { - int j = random.Next(index); - int k = array[j]; - array[j] = array[index - 1]; - array[index - 1] = k; - } - return array; - } - #endregion - #region OreSpawn public static void SpawnOre(int type, double frequency, float depth, float depthLimit) { @@ -3258,7 +3218,7 @@ namespace CalamityMod.World } Main.tile[k, l].active(true); Main.tile[k, l].type = (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType()); - SafeSquareTileFrame(k, l, true); + CalamityUtils.SafeSquareTileFrame(k, l, true); } } } @@ -3310,7 +3270,7 @@ namespace CalamityMod.World { Main.tile[n, num17].active(true); Main.tile[n, num17].type = (ushort)num16; - SafeSquareTileFrame(n, num17, true); + CalamityUtils.SafeSquareTileFrame(n, num17, true); } } } @@ -3342,7 +3302,7 @@ namespace CalamityMod.World { Main.tile[n, num17].active(true); Main.tile[n, num17].type = (ushort)num16; - SafeSquareTileFrame(n, num17, true); + CalamityUtils.SafeSquareTileFrame(n, num17, true); } } } @@ -3414,7 +3374,7 @@ namespace CalamityMod.World if (Math.Sqrt((double)(arg_890_0 * arg_890_0 + num29 * num29)) < (double)num25) { Main.tile[num27, num28].type = (ushort)num26; - SafeSquareTileFrame(num27, num28, true); + CalamityUtils.SafeSquareTileFrame(num27, num28, true); } } } @@ -3463,21 +3423,21 @@ namespace CalamityMod.World Main.tile[num37, num35].active(false); Main.tile[num37, num35].liquid = 255; Main.tile[num37, num35].lava(false); - SafeSquareTileFrame(num34, num35, true); + CalamityUtils.SafeSquareTileFrame(num34, num35, true); } if (Main.tile[num37, num35 + 1].type == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) { Main.tile[num37, num35 + 1].active(false); Main.tile[num37, num35 + 1].liquid = 255; Main.tile[num37, num35 + 1].lava(false); - SafeSquareTileFrame(num34, num35 + 1, true); + CalamityUtils.SafeSquareTileFrame(num34, num35 + 1, true); } if (num37 > num34 - num36 && num37 < num34 + 2 && Main.tile[num37, num35 + 2].type == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) { Main.tile[num37, num35 + 2].active(false); Main.tile[num37, num35 + 2].liquid = 255; Main.tile[num37, num35 + 2].lava(false); - SafeSquareTileFrame(num34, num35 + 2, true); + CalamityUtils.SafeSquareTileFrame(num34, num35 + 2, true); } } } @@ -3486,7 +3446,7 @@ namespace CalamityMod.World Main.tile[num34, num35].liquid = 255; } Main.tile[num34, num35].lava(false); - SafeSquareTileFrame(num34, num35, true); + CalamityUtils.SafeSquareTileFrame(num34, num35, true); } } } From 3df18f01d40d74ec0ba3c1bd10ff84996bc37f68 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 30 Nov 2019 15:15:23 -0500 Subject: [PATCH 34/82] added colors to sea's searing --- Projectiles/Ranged/SeasSearingBubble.cs | 52 +++++++++++++--------- Projectiles/Ranged/SeasSearingSecondary.cs | 4 +- Projectiles/Ranged/SeasSearingSpout.cs | 5 +++ 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/Projectiles/Ranged/SeasSearingBubble.cs b/Projectiles/Ranged/SeasSearingBubble.cs index a9e21d1a19..7a71e9c7c6 100644 --- a/Projectiles/Ranged/SeasSearingBubble.cs +++ b/Projectiles/Ranged/SeasSearingBubble.cs @@ -41,27 +41,35 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.alpha < 0) projectile.alpha = 0; } - for (int num105 = 0; num105 < 2; num105++) - { - float num99 = projectile.velocity.X / 3f * (float)num105; - float num100 = projectile.velocity.Y / 3f * (float)num105; - int num101 = 4; - int num102 = Dust.NewDust(new Vector2(projectile.position.X + (float)num101, projectile.position.Y + (float)num101), projectile.width - num101 * 2, projectile.height - num101 * 2, 202, 0f, 0f, 100, default, 1.2f); - Main.dust[num102].noGravity = true; - Main.dust[num102].velocity *= 0.1f; - Main.dust[num102].velocity += projectile.velocity * 0.1f; - Dust expr_47FA_cp_0 = Main.dust[num102]; - expr_47FA_cp_0.position.X -= num99; - Dust expr_4815_cp_0 = Main.dust[num102]; - expr_4815_cp_0.position.Y -= num100; - } - if (Main.rand.NextBool(10)) - { - int num103 = 4; - int num104 = Dust.NewDust(new Vector2(projectile.position.X + (float)num103, projectile.position.Y + (float)num103), projectile.width - num103 * 2, projectile.height - num103 * 2, 202, 0f, 0f, 100, default, 0.6f); - Main.dust[num104].velocity *= 0.25f; - Main.dust[num104].velocity += projectile.velocity * 0.5f; - } + if (projectile.timeLeft < 475) + { + for (int num105 = 0; num105 < 2; num105++) + { + float num99 = projectile.velocity.X / 3f * (float)num105; + float num100 = projectile.velocity.Y / 3f * (float)num105; + int num101 = 4; + int num102 = Dust.NewDust(new Vector2(projectile.position.X + (float)num101, projectile.position.Y + (float)num101), projectile.width - num101 * 2, projectile.height - num101 * 2, 202, 0f, 0f, 150, new Color(60, Main.DiscoG, 190), 1.2f); + Main.dust[num102].noGravity = true; + Main.dust[num102].velocity *= 0.1f; + Main.dust[num102].velocity += projectile.velocity * 0.1f; + Dust expr_47FA_cp_0 = Main.dust[num102]; + expr_47FA_cp_0.position.X -= num99; + Dust expr_4815_cp_0 = Main.dust[num102]; + expr_4815_cp_0.position.Y -= num100; + } + if (Main.rand.NextBool(10)) + { + int num103 = 4; + int num104 = Dust.NewDust(new Vector2(projectile.position.X + (float)num103, projectile.position.Y + (float)num103), projectile.width - num103 * 2, projectile.height - num103 * 2, 202, 0f, 0f, 150, new Color(60, Main.DiscoG, 190), 0.6f); + Main.dust[num104].velocity *= 0.25f; + Main.dust[num104].velocity += projectile.velocity * 0.5f; + } + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(60, Main.DiscoG, 190, projectile.alpha); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -75,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 96); for (int k = 0; k < 5; k++) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 202, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 202, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, new Color(60, Main.DiscoG, 190)); } } diff --git a/Projectiles/Ranged/SeasSearingSecondary.cs b/Projectiles/Ranged/SeasSearingSecondary.cs index 3f8c27d761..5c58ff72b3 100644 --- a/Projectiles/Ranged/SeasSearingSecondary.cs +++ b/Projectiles/Ranged/SeasSearingSecondary.cs @@ -41,10 +41,10 @@ namespace CalamityMod.Projectiles.Ranged { for (int num468 = 0; num468 < 3; num468++) { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 217, 0f, 0f, 100, default, projectile.scale); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 217, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), projectile.scale); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; - int num470 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 202, 0f, 0f, 100, default, projectile.scale); + int num470 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 202, 0f, 0f, 100, new Color(60, Main.DiscoG, 190), projectile.scale); Main.dust[num470].noGravity = true; Main.dust[num470].velocity *= 0f; } diff --git a/Projectiles/Ranged/SeasSearingSpout.cs b/Projectiles/Ranged/SeasSearingSpout.cs index 10db19cacb..e3df36dfb8 100644 --- a/Projectiles/Ranged/SeasSearingSpout.cs +++ b/Projectiles/Ranged/SeasSearingSpout.cs @@ -111,6 +111,11 @@ namespace CalamityMod.Projectiles.Ranged } } + public override Color? GetAlpha(Color lightColor) + { + return new Color(60, Main.DiscoG, 190, projectile.alpha); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D texture2D13 = Main.projectileTexture[projectile.type]; From 205ae35c31cadb573f18ead7403b0a5d2ba4f65b Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 30 Nov 2019 20:07:44 -0600 Subject: [PATCH 35/82] Gael PreHM buff --- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index c0428dd374..e55339556f 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee //Weapon attribute constants - public static readonly int BaseDamage = 10; + public static readonly int BaseDamage = 13; public static readonly int HardmodeDamage = 35; From d40b24f2027f176a12a9d201bb16b4c86ce25518 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 1 Dec 2019 03:02:38 -0600 Subject: [PATCH 36/82] Removed Gael scaling Also more test tweaks --- CalPlayer/CalamityPlayer.cs | 40 +---------------- Items/Weapons/Melee/GaelsGreatsword.cs | 59 ++++--------------------- NPCs/CalamityGlobalNPC.cs | 7 +++ Projectiles/Melee/GaelExplosion.cs | 15 +------ Projectiles/Melee/GaelSkull.cs | 33 ++------------ Projectiles/Melee/GaelSkull2.cs | 57 ++---------------------- Projectiles/Melee/GaelSpark.cs | 40 ----------------- Projectiles/Melee/GaelSpark.png | Bin 130 -> 0 bytes Projectiles/Melee/LightningThing.cs | 20 +-------- 9 files changed, 27 insertions(+), 244 deletions(-) delete mode 100644 Projectiles/Melee/GaelSpark.cs delete mode 100644 Projectiles/Melee/GaelSpark.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 028a15bc78..f7f6825a1d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2057,21 +2057,8 @@ namespace CalamityMod.CalPlayer Dust.NewDust(player.Center + angle.ToRotationVector2() * 160f, 0, 0, 218, 0f, 0f, 100, default, 1f); } gaelRageCooldown = 60 * GaelsGreatsword.SkullsplosionCooldownSeconds; - int damage2 = 15; - if (CalamityWorld.downedYharon) - { - damage2 = GaelsGreatsword.PostYharonDamage; - } - else if (NPC.downedMoonlord) - { - damage2 = GaelsGreatsword.PostMoonLordDamage; - } - else if (Main.hardMode) - { - damage2 = GaelsGreatsword.HardmodeDamage; - } float rageRatio = (float)stress / stressMax; - int damage = (int)((stress == stressMax ? GaelsGreatsword.MaxRageBoost : rageRatio * GaelsGreatsword.RageBoostMultiplier) * damage2); + int damage = (int)(rageRatio * GaelsGreatsword.MaxRageBoost * GaelsGreatsword.BaseDamage); float skullCount = 5f; float skullSpeed = 5f; if (CalamityWorld.downedYharon) @@ -5743,18 +5730,7 @@ namespace CalamityMod.CalPlayer } if (item.type == ModContent.ItemType()) { - if (CalamityWorld.downedYharon) - { - add += GaelsGreatsword.PostYharonDamage / (float)GaelsGreatsword.BaseDamage - 1f; - } - else if (NPC.downedMoonlord) - { - add += GaelsGreatsword.PostMoonLordDamage / (float)GaelsGreatsword.BaseDamage - 1f; - } - else if (Main.hardMode) - { - add += GaelsGreatsword.HardmodeDamage / (float)GaelsGreatsword.BaseDamage - 1f; - } + add += GaelsGreatsword.BaseDamage / (float)GaelsGreatsword.BaseDamage - 1f; } if (flamethrowerBoost && item.ranged && (item.useAmmo == 23 || item.type == ModContent.ItemType())) { @@ -7539,18 +7515,6 @@ namespace CalamityMod.CalPlayer Main.dust[dustIndex].velocity *= 0.3f; } int damage2 = GaelsGreatsword.BaseDamage; - if (CalamityWorld.downedYharon) - { - damage2 = GaelsGreatsword.PostYharonDamage; - } - else if (NPC.downedMoonlord) - { - damage2 = GaelsGreatsword.PostMoonLordDamage; - } - else if (Main.hardMode) - { - damage2 = GaelsGreatsword.HardmodeDamage; - } proj.hostile = false; proj.friendly = true; proj.velocity *= -1f; diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index e55339556f..953f32c1ce 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -17,47 +17,23 @@ namespace CalamityMod.Items.Weapons.Melee //Weapon attribute constants - public static readonly int BaseDamage = 13; + public static readonly int BaseDamage = 11145; - public static readonly int HardmodeDamage = 35; - - public static readonly int PostMoonLordDamage = 213; - - public static readonly int PostYharonDamage = 16660; - - public static readonly float TrueMeleeBoostPreHardmode = 1.75f; - - public static readonly float TrueMeleeBoostHardmode = 2.5f; + public static readonly float TrueMeleeBoost = 2.5f; public static readonly float GiantSkullDamageMultiplier = 1.5f; //Weapon projectile attribute constants - public static readonly int BaseSearchDistance = 400; + public static readonly int SearchDistance = 1450; - public static readonly int HardmodeSearchDistance = 660; - - public static readonly int PostMoonLordSearchDistance = 940; - - public static readonly int PostYharonSearchDistance = 1450; - - public static readonly int BaseImmunityFrames = 11; - - public static readonly int HardmodeImmunityFrames = 7; - - public static readonly int PostMoonLordImmunityFrames = 4; - - public static readonly int PostYharonImmunityFrames = 2; + public static readonly int ImmunityFrames = 2; public static readonly int SkullsplosionCooldownSeconds = 30; - public static readonly int PreMoonlordPenetrate = 3; //Infinite after Moon lord is dead - //Skull ring attribute constants - public static readonly float MaxRageBoost = 2.5f; - - public static readonly float RageBoostMultiplier = 1.5f; + public static readonly float MaxRageBoost = 1.5f; public override void SetStaticDefaults() { @@ -130,10 +106,6 @@ namespace CalamityMod.Items.Weapons.Melee if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5)) { player.Calamity().gaelSwipes++; - if (player.Calamity().gaelSwipes > 3) - { - player.Calamity().gaelSwipes = 0; - } if (player.statLife <= player.statLifeMax2 * 0.5f) { for (int i = 0; i < 170; i++) @@ -153,20 +125,7 @@ namespace CalamityMod.Items.Weapons.Melee } if (Main.rand.NextBool(100)) { - int damage = BaseDamage; - if (Main.hardMode) - { - damage = HardmodeDamage; - } - if (NPC.downedMoonlord) - { - damage = PostMoonLordDamage; - } - if (CalamityWorld.downedYharon) - { - damage = PostYharonDamage; - } - Projectile.NewProjectile(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI); + Projectile.NewProjectile(player.MountedCenter + dustSpawn.RotatedBy(player.itemRotation) * player.direction, Vector2.Zero, ModContent.ProjectileType(), BaseDamage, 0f, player.whoAmI); } } } @@ -175,9 +134,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { //True melee boost - if (player.Calamity().gaelSwipes == 2) + if (player.Calamity().gaelSwipes % 3 == 2) { - damage = (int)((Main.hardMode ? TrueMeleeBoostHardmode : TrueMeleeBoostPreHardmode) * damage); + damage = (int)(TrueMeleeBoost * damage); } } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -187,7 +146,7 @@ namespace CalamityMod.Items.Weapons.Melee //CalamityPlayer.cs line 7373. Thank me later. return false; } - switch (player.Calamity().gaelSwipes) + switch (player.Calamity().gaelSwipes % 3) { //Two small, quick skulls case 0: diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index c1804281c8..ab3eca7f43 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2542,6 +2542,13 @@ namespace CalamityMod.NPCs } } } + if (projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() && + npc.type >= NPCID.SkeletronHead && + npc.type <= NPCID.SkeletronHand) + { + damage = (int)(damage * 0.85); + } } #endregion diff --git a/Projectiles/Melee/GaelExplosion.cs b/Projectiles/Melee/GaelExplosion.cs index 961abdffb5..631965c72e 100644 --- a/Projectiles/Melee/GaelExplosion.cs +++ b/Projectiles/Melee/GaelExplosion.cs @@ -25,20 +25,7 @@ namespace CalamityMod.Projectiles.Melee projectile.timeLeft = 15; projectile.melee = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = GaelsGreatsword.BaseImmunityFrames; - - if (CalamityWorld.downedYharon) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostYharonImmunityFrames; - } - else if (NPC.downedMoonlord) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostMoonLordImmunityFrames; - } - else if (Main.hardMode) - { - projectile.localNPCHitCooldown = GaelsGreatsword.HardmodeImmunityFrames; - } + projectile.localNPCHitCooldown = GaelsGreatsword.ImmunityFrames; } public override void AI() diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index cd2e65182e..5116e5cebb 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -29,42 +29,15 @@ namespace CalamityMod.Projectiles.Melee projectile.timeLeft = 600; projectile.light = 1f; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = GaelsGreatsword.BaseImmunityFrames; - - if (CalamityWorld.downedYharon) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostYharonImmunityFrames; - } - else if (NPC.downedMoonlord) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostMoonLordImmunityFrames; - } - else if (Main.hardMode) - { - projectile.localNPCHitCooldown = GaelsGreatsword.HardmodeImmunityFrames; - } + projectile.localNPCHitCooldown = GaelsGreatsword.ImmunityFrames; } public override void AI() { - float checkingDistance = GaelsGreatsword.BaseSearchDistance; - if (CalamityWorld.downedYharon) - { - checkingDistance = GaelsGreatsword.PostYharonSearchDistance; - } - else if (NPC.downedMoonlord) - { - checkingDistance = GaelsGreatsword.PostMoonLordSearchDistance; - } - else if (Main.hardMode) - { - checkingDistance = GaelsGreatsword.HardmodeSearchDistance; - } - //Targeting if (projectile.scale <= 1f) { - NPC target = projectile.Center.ClosestNPCAt(checkingDistance); + NPC target = projectile.Center.ClosestNPCAt(GaelsGreatsword.SearchDistance); projectile.tileCollide = target != null; //Go through walls if we're hunting an NPC if (target != null) { @@ -125,7 +98,7 @@ namespace CalamityMod.Projectiles.Melee { if (projectile.localAI[0] == 0f && !NPC.downedMoonlord) { - projectile.penetrate = GaelsGreatsword.PreMoonlordPenetrate; + projectile.penetrate = -1; projectile.localAI[0] = 1f; } else if (NPC.downedMoonlord) diff --git a/Projectiles/Melee/GaelSkull2.cs b/Projectiles/Melee/GaelSkull2.cs index be46aba460..e9410baadb 100644 --- a/Projectiles/Melee/GaelSkull2.cs +++ b/Projectiles/Melee/GaelSkull2.cs @@ -29,42 +29,11 @@ namespace CalamityMod.Projectiles.Melee projectile.timeLeft = 600; projectile.light = 1f; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = GaelsGreatsword.BaseImmunityFrames; - - if (CalamityWorld.downedYharon) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostYharonImmunityFrames; - } - else if (NPC.downedMoonlord) - { - projectile.localNPCHitCooldown = GaelsGreatsword.PostMoonLordImmunityFrames; - } - else if (Main.hardMode) - { - projectile.localNPCHitCooldown = GaelsGreatsword.HardmodeImmunityFrames; - } + projectile.localNPCHitCooldown = GaelsGreatsword.ImmunityFrames; } public override void AI() { - float checkingDistance = GaelsGreatsword.BaseSearchDistance; - if (CalamityWorld.downedYharon) - { - checkingDistance = GaelsGreatsword.PostYharonSearchDistance; - } - else if (NPC.downedMoonlord) - { - checkingDistance = GaelsGreatsword.PostMoonLordSearchDistance; - } - else if (Main.hardMode) - { - checkingDistance = GaelsGreatsword.HardmodeSearchDistance; - } - if (projectile.velocity.Length() < 7f) - { - projectile.velocity = Vector2.Normalize(projectile.velocity) * 7f; - } - //Rotation if (projectile.velocity.X < 0f) @@ -87,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee //Targeting - NPC target = projectile.Center.ClosestNPCAt(checkingDistance); + NPC target = projectile.Center.ClosestNPCAt(GaelsGreatsword.SearchDistance); projectile.tileCollide = target != null; //Go through walls if we're hunting an NPC if (target != null) { @@ -127,27 +96,7 @@ namespace CalamityMod.Projectiles.Melee { projectile.frame = 0; } - - //Fat skull logic - if (projectile.ai[1] == 1f) - { - if (projectile.localAI[0] == 0f && !NPC.downedMoonlord) - { - projectile.penetrate = GaelsGreatsword.PreMoonlordPenetrate; - projectile.localAI[0] = 1f; - } - else if (NPC.downedMoonlord) - { - projectile.penetrate = 5; - } - projectile.alpha += 1; - projectile.damage = (int)Math.Ceiling(projectile.damage * 0.992); //Exponentially decays to a factor of 0.12896 of the original damage - if (projectile.alpha >= 255) - { - projectile.Kill(); - } - } - else if (projectile.alpha > 0) + if (projectile.alpha > 0) { projectile.alpha -= 15; if (projectile.alpha < 0) diff --git a/Projectiles/Melee/GaelSpark.cs b/Projectiles/Melee/GaelSpark.cs deleted file mode 100644 index 8e6dc66b51..0000000000 --- a/Projectiles/Melee/GaelSpark.cs +++ /dev/null @@ -1,40 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee -{ - public class GaelSpark : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Spark"); - } - - public override void SetDefaults() - { - projectile.width = 6; - projectile.height = 6; - projectile.friendly = true; - projectile.melee = true; - projectile.ignoreWater = true; - projectile.penetrate = 1; - projectile.timeLeft = 180; - projectile.alpha = 255; - } - public override bool OnTileCollide(Vector2 oldVelocity) - { - projectile.velocity.X = 0f; - return false; - } - public override void AI() - { - Lighting.AddLight(projectile.Center, 0.7f, 0f, 0f); - projectile.velocity.Y += 0.3f; - int dustIndex = Dust.NewDust(projectile.Center, 0, 0, DustID.Blood, 0f, 0f, 0, default, 1.4f); - Main.dust[dustIndex].noGravity = true; - } - } -} diff --git a/Projectiles/Melee/GaelSpark.png b/Projectiles/Melee/GaelSpark.png deleted file mode 100644 index 1740dec81a5591a5aa7301dc6eceb8652d5a4658..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=7>k44ofy`glX(e}Nq6*hWMJ6X z&;2Kn70Bl-@Q5sCVBk9h!i=ICUJXD&aZeY=5Q*^QKmY&RGaDr|T`F+!XlP_)IM&C^ UI_W^pPgg&ebxsLQ082+9WdHyG diff --git a/Projectiles/Melee/LightningThing.cs b/Projectiles/Melee/LightningThing.cs index 3b8c739181..41dbe60439 100644 --- a/Projectiles/Melee/LightningThing.cs +++ b/Projectiles/Melee/LightningThing.cs @@ -24,30 +24,14 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { int damage = GaelsGreatsword.BaseDamage; - int customIFrames = GaelsGreatsword.BaseImmunityFrames; - if (Main.hardMode) - { - damage = GaelsGreatsword.HardmodeDamage; - customIFrames = GaelsGreatsword.HardmodeImmunityFrames; - } - if (NPC.downedMoonlord) - { - damage = GaelsGreatsword.PostMoonLordDamage; - customIFrames = GaelsGreatsword.PostMoonLordImmunityFrames; - } - if (CalamityWorld.downedYharon) - { - damage = GaelsGreatsword.PostYharonDamage; - customIFrames = GaelsGreatsword.PostYharonImmunityFrames; - } for (int i = 0; i < 3; i++) { int idx = Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.NextFloat(-35f, 35f), -1600f), Vector2.UnitY * 12f, - ProjectileID.CultistBossLightningOrbArc, damage, 0f, projectile.owner, + ProjectileID.CultistBossLightningOrbArc, GaelsGreatsword.BaseDamage, 0f, projectile.owner, MathHelper.PiOver2, Main.rand.Next(100)); Main.projectile[idx].Calamity().forceMelee = true; Main.projectile[idx].usesLocalNPCImmunity = true; - Main.projectile[idx].localNPCHitCooldown = customIFrames; + Main.projectile[idx].localNPCHitCooldown = GaelsGreatsword.ImmunityFrames; } } } From 331ac1d340bca410d61ef4829cbb6cdfc27a5ace Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 1 Dec 2019 12:49:19 -0500 Subject: [PATCH 37/82] shroomerang/phantasmal ruin nerfs --- Items/Weapons/Rogue/PhantasmalRuin.cs | 4 ++-- Projectiles/Rogue/ShroomerangProj.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index cbbc2c5a50..6bdcf73686 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -29,8 +29,8 @@ Stealth strikes summon ghost clones instead of lost souls"); item.noUseGraphic = true; item.value = Item.buyPrice(1, 40, 0, 0); - item.useTime = 15; - item.useAnimation = 15; + item.useTime = 25; + item.useAnimation = 25; item.UseSound = SoundID.Item1; item.rare = 10; item.Calamity().postMoonLordRarity = 13; diff --git a/Projectiles/Rogue/ShroomerangProj.cs b/Projectiles/Rogue/ShroomerangProj.cs index 82f6ed444a..940f04969f 100644 --- a/Projectiles/Rogue/ShroomerangProj.cs +++ b/Projectiles/Rogue/ShroomerangProj.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.Calamity().stealthStrike == true) { stealthCounter++; - if (stealthCounter == 8 && projectile.owner == Main.myPlayer) + if (stealthCounter == 15 && projectile.owner == Main.myPlayer) { Vector2 vector62 = Main.player[projectile.owner].Center - projectile.Center; stealthCounter = 0; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue vector63.Normalize(); vector63 *= (float)Main.rand.Next(45, 65) * 0.1f; vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * 1.5707963705062866, default); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.6), projectile.knockBack * 0.2f, projectile.owner, -10f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1), projectile.knockBack * 0.2f, projectile.owner, -10f, 0f); } } } From 3e063cc207abb3cc959e8db5e9eeb4c48a4abcdb Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 1 Dec 2019 12:49:34 -0500 Subject: [PATCH 38/82] silencing sheath recipe group --- Items/Accessories/SilencingSheath.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Items/Accessories/SilencingSheath.cs b/Items/Accessories/SilencingSheath.cs index 3bd73b4b6c..c751a8f490 100644 --- a/Items/Accessories/SilencingSheath.cs +++ b/Items/Accessories/SilencingSheath.cs @@ -35,15 +35,7 @@ namespace CalamityMod.Items.Accessories ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.DemoniteBar, 8); recipe.AddIngredient(ItemID.Silk, 10); - recipe.AddIngredient(ItemID.ShadowScale, 3); - recipe.AddTile(TileID.TinkerersWorkbench); - recipe.SetResult(this); - recipe.AddRecipe(); - - recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.CrimtaneBar, 8); - recipe.AddIngredient(ItemID.Silk, 10); - recipe.AddIngredient(ItemID.TissueSample, 3); + recipe.AddRecipeGroup("Boss2Material", 3); recipe.AddTile(TileID.TinkerersWorkbench); recipe.SetResult(this); recipe.AddRecipe(); From 15b36e1789aaa6e015cbecbeb795a3fc4fe9ade5 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 1 Dec 2019 16:50:52 -0600 Subject: [PATCH 39/82] Various MP fixes in description * Partially fixed Golem Free Head in rev (a little jittery, but I couldn't locate the root cause of that) * Added packets for toggleable items, such as the defiled rune, so that the server and client don't bitch at each other over the boolean * Added various logic checks and netcode to the mechworm. Hopefully removed most, if not all mechworm bugs. --- CalamityMod.cs | 38 +++++++++++++++++++++++++++- Items/DifficultyItems/Armageddon.cs | 8 ++++++ Items/DifficultyItems/Death.cs | 8 ++++++ Items/DifficultyItems/DefiledRune.cs | 10 ++++++++ Items/DifficultyItems/IronHeart.cs | 8 ++++++ Items/DifficultyItems/MLGRune.cs | 7 +++++ Items/DifficultyItems/Revenge.cs | 7 +++++ NPCs/CalamityGlobalAI.cs | 10 +++++--- NPCs/CalamityGlobalNPC.cs | 2 +- Projectiles/Melee/GaelSkull.cs | 2 +- Projectiles/Melee/GaelSkull2.cs | 2 +- Projectiles/Summon/MechwormBody.cs | 17 +++++++++++++ Projectiles/Summon/MechwormBody2.cs | 17 +++++++++++++ Projectiles/Summon/MechwormHead.cs | 1 + Projectiles/Summon/MechwormTail.cs | 19 +++++++++++++- 15 files changed, 147 insertions(+), 9 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 927af218d4..be9db6a4ec 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -15,6 +15,7 @@ using CalamityMod.Items.Fishing.AstralCatches; using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.Localization; +using CalamityMod.NPCs; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; @@ -3265,6 +3266,32 @@ namespace CalamityMod case CalamityModMessageType.DeathCountSync: Main.player[reader.ReadInt32()].Calamity().HandleDeathCount(reader); break; + case CalamityModMessageType.RevengeanceBoolSync: + bool revActive = reader.ReadBoolean(); + CalamityWorld.revenge = revActive; + break; + case CalamityModMessageType.DeathBoolSync: + bool revActive2 = reader.ReadBoolean(); + CalamityWorld.revenge = revActive2; + bool deathActive = reader.ReadBoolean(); + CalamityWorld.death = deathActive; + break; + case CalamityModMessageType.DefiledBoolSync: + bool defiledActive = reader.ReadBoolean(); + CalamityWorld.defiled = defiledActive; + break; + case CalamityModMessageType.IronHeartBoolSync: + bool ironHeartActive = reader.ReadBoolean(); + CalamityWorld.ironHeart = ironHeartActive; + break; + case CalamityModMessageType.ArmageddonBoolSync: + bool armaActive = reader.ReadBoolean(); + CalamityWorld.armageddon = armaActive; + break; + case CalamityModMessageType.NPCRegenerationSync: + byte npcIndex = reader.ReadByte(); + Main.npc[npcIndex].lifeRegen = reader.ReadInt32(); + break; default: Logger.Warn("Unknown Message type: " + msgType); break; @@ -3286,7 +3313,9 @@ namespace CalamityMod public static void UpdateServerBoolean() { if (Main.netMode == NetmodeID.Server) + { NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } } #endregion } @@ -3318,7 +3347,14 @@ namespace CalamityMod DoGCountdownSync, BossSpawnCountdownSync, BossTypeSync, - DeathCountSync + DeathCountSync, + RevengeanceBoolSync, + DeathBoolSync, + DefiledBoolSync, + IronHeartBoolSync, + ArmageddonBoolSync, + DemonTrophyBoolSync, + NPCRegenerationSync //DistanceFromBossSync } } diff --git a/Items/DifficultyItems/Armageddon.cs b/Items/DifficultyItems/Armageddon.cs index 8d265a0007..c42330f06d 100644 --- a/Items/DifficultyItems/Armageddon.cs +++ b/Items/DifficultyItems/Armageddon.cs @@ -72,6 +72,14 @@ namespace CalamityMod.Items.DifficultyItems } CalamityMod.UpdateServerBoolean(); + + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((uint)CalamityModMessageType.ArmageddonBoolSync); + netMessage.Write(CalamityWorld.armageddon); + netMessage.Send(); + } return true; } diff --git a/Items/DifficultyItems/Death.cs b/Items/DifficultyItems/Death.cs index 0e5a68eb3c..20322b64dd 100644 --- a/Items/DifficultyItems/Death.cs +++ b/Items/DifficultyItems/Death.cs @@ -86,6 +86,14 @@ namespace CalamityMod.Items.DifficultyItems } CalamityMod.UpdateServerBoolean(); + + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DeathBoolSync); + netMessage.Write(CalamityWorld.death); + netMessage.Send(); + } return true; } diff --git a/Items/DifficultyItems/DefiledRune.cs b/Items/DifficultyItems/DefiledRune.cs index c86876f8ec..8a633f5557 100644 --- a/Items/DifficultyItems/DefiledRune.cs +++ b/Items/DifficultyItems/DefiledRune.cs @@ -83,6 +83,16 @@ namespace CalamityMod.Items.DifficultyItems } CalamityMod.UpdateServerBoolean(); + + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync); + netMessage.Write(CalamityWorld.revenge); + netMessage.Write((byte)CalamityModMessageType.DefiledBoolSync); + netMessage.Write(CalamityWorld.defiled); + netMessage.Send(); + } return true; } diff --git a/Items/DifficultyItems/IronHeart.cs b/Items/DifficultyItems/IronHeart.cs index fcc45eeafe..58236f96e4 100644 --- a/Items/DifficultyItems/IronHeart.cs +++ b/Items/DifficultyItems/IronHeart.cs @@ -83,6 +83,14 @@ namespace CalamityMod.Items.DifficultyItems } } CalamityMod.UpdateServerBoolean(); + + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.IronHeartBoolSync); + netMessage.Write(CalamityWorld.ironHeart); + netMessage.Send(); + } return true; } } diff --git a/Items/DifficultyItems/MLGRune.cs b/Items/DifficultyItems/MLGRune.cs index cdb8ef2931..3fbbabeb5f 100644 --- a/Items/DifficultyItems/MLGRune.cs +++ b/Items/DifficultyItems/MLGRune.cs @@ -31,6 +31,13 @@ namespace CalamityMod.Items.DifficultyItems { CalamityWorld.demonMode = true; CalamityMod.UpdateServerBoolean(); + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DemonTrophyBoolSync); + netMessage.Write(CalamityWorld.demonMode); + netMessage.Send(); + } return true; } } diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index a1ad1ae0f5..0b66eabc2f 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -128,6 +128,13 @@ namespace CalamityMod.Items.DifficultyItems } CalamityMod.UpdateServerBoolean(); + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync); + netMessage.Write(CalamityWorld.revenge); + netMessage.Send(); + } } return true; } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index dd9c4d6099..7a11c65f06 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -9222,9 +9222,6 @@ namespace CalamityMod.NPCs bool phase3 = lifeRatio < 0.4f || golemLifeRatio < 0.7f || CalamityWorld.death || CalamityWorld.bossRushActive; bool phase4 = lifeRatio < 0.1f || golemLifeRatio < 0.55f || CalamityWorld.death || CalamityWorld.bossRushActive; - // Target - npc.TargetClosest(true); - // Float through tiles or not bool flag44 = false; if (!Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1) || phase3) @@ -9252,6 +9249,10 @@ namespace CalamityMod.NPCs // Move to new location if (npc.ai[3] <= 0f) { + // Target + npc.TargetClosest(true); + npc.netSpam = 5; + npc.ai[3] = 300f; float maxDistance = 300f; @@ -9315,7 +9316,7 @@ namespace CalamityMod.NPCs calamityGlobalNPC.newAI[1] = -maxDistance; } - npc.netUpdate = true; + npc.netUpdate = true; } npc.ai[3] -= 1f + @@ -9470,6 +9471,7 @@ namespace CalamityMod.NPCs } } } + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); if (ModLoader.GetMod("FargowiltasSouls") != null) ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ab3eca7f43..a6bccab994 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs // private int ironHeartDamage = 0; // NewAI - private const int maxAIMod = 4; + internal const int maxAIMod = 4; public float[] newAI = new float[maxAIMod]; // Town NPC Patreon diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index 5116e5cebb..a00e03f1d2 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Skull"); + DisplayName.SetDefault("Ark of the Cosmos' Superior Cousin"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; ProjectileID.Sets.TrailingMode[projectile.type] = 0; Main.projFrames[projectile.type] = 5; diff --git a/Projectiles/Melee/GaelSkull2.cs b/Projectiles/Melee/GaelSkull2.cs index e9410baadb..35c69be239 100644 --- a/Projectiles/Melee/GaelSkull2.cs +++ b/Projectiles/Melee/GaelSkull2.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Skull"); + DisplayName.SetDefault("Ark of the Cosmos' Superior Cousin"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; ProjectileID.Sets.TrailingMode[projectile.type] = 0; Main.projFrames[projectile.type] = 5; diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 344b84a2aa..35360d9ab3 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -79,6 +79,22 @@ namespace CalamityMod.Projectiles.Summon float scaleFactor18; if (chase >= 0 && Main.projectile[chase].active) { + //Delete the player's mechworm if it's attaching to something weird + if (Main.projectile[chase].type != ModContent.ProjectileType() && + Main.projectile[chase].type != ModContent.ProjectileType()) + { + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && + (Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType())) + { + Main.projectile[i].Kill(); + } + } + } value68 = Main.projectile[chase].Center; Vector2 arg_2DE6A_0 = Main.projectile[chase].velocity; num1064 = Main.projectile[chase].rotation; @@ -113,6 +129,7 @@ namespace CalamityMod.Projectiles.Summon projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; } projectile.spriteDirection = (vector134.X > 0f) ? 1 : -1; + projectile.netSpam = 5; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index dba4f74489..dee4b8bf91 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -79,6 +79,22 @@ namespace CalamityMod.Projectiles.Summon float scaleFactor18; if (chase >= 0 && Main.projectile[chase].active) { + //Delete the player's mechworm if it's attaching to something weird + if (Main.projectile[chase].type != ModContent.ProjectileType() && + Main.projectile[chase].type != ModContent.ProjectileType()) + { + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && + (Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType())) + { + Main.projectile[i].Kill(); + } + } + } value68 = Main.projectile[chase].Center; Vector2 arg_2DE6A_0 = Main.projectile[chase].velocity; num1064 = Main.projectile[chase].rotation; @@ -112,6 +128,7 @@ namespace CalamityMod.Projectiles.Summon projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; } projectile.spriteDirection = (vector134.X > 0f) ? 1 : -1; + projectile.netSpam = 5; return; } diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index 41e8821143..3e51a80044 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -208,6 +208,7 @@ namespace CalamityMod.Projectiles.Summon projectile.alpha = 0; } } + projectile.netSpam = 5; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 91b121c1a6..80c0f4f77d 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -79,11 +79,27 @@ namespace CalamityMod.Projectiles.Summon float scaleFactor18; if (chase >= 0 && Main.projectile[chase].active) { + //Delete the player's mechworm if it's attaching to something weird + if (Main.projectile[chase].type != ModContent.ProjectileType() && + Main.projectile[chase].type != ModContent.ProjectileType()) + { + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && + (Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType() || + Main.projectile[chase].type == ModContent.ProjectileType())) + { + Main.projectile[i].Kill(); + } + } + } value68 = Main.projectile[chase].Center; Vector2 arg_2DE6A_0 = Main.projectile[chase].velocity; num1064 = Main.projectile[chase].rotation; scaleFactor18 = MathHelper.Clamp(Main.projectile[chase].scale, 0f, 50f); - scaleFactor17 = 16f; + scaleFactor17 = 6f; Main.projectile[chase].localAI[0] = projectile.localAI[0] + 1f; } else @@ -113,6 +129,7 @@ namespace CalamityMod.Projectiles.Summon projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; } projectile.spriteDirection = (vector134.X > 0f) ? 1 : -1; + projectile.netSpam = 5; return; } From 7e4ca60fc6cff825a00fbf21980ed970c5f15b7a Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 1 Dec 2019 18:06:11 -0600 Subject: [PATCH 40/82] PBG fix --- NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 8 ++++++-- NPCs/PlaguebringerGoliath/PlaguebringerShade.cs | 5 +++++ Projectiles/Summon/MechwormBody.cs | 3 ++- Projectiles/Summon/MechwormBody2.cs | 3 ++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 6adc5372f7..7b671b4850 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -226,7 +226,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath break; } } - npc.ai[0] = (float)num596; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -349,7 +348,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (npc.netSpam > 10) npc.netSpam = 10; - } + } // Slow down after charge else @@ -860,6 +859,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.netSpam = 10; } } + + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } } private void Movement(float xPos, float yPos, float yPos2) diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs index aae807cff6..a5b7875cc1 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs @@ -573,6 +573,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.netUpdate = true; } } + + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 35360d9ab3..905679e40c 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -81,7 +81,8 @@ namespace CalamityMod.Projectiles.Summon { //Delete the player's mechworm if it's attaching to something weird if (Main.projectile[chase].type != ModContent.ProjectileType() && - Main.projectile[chase].type != ModContent.ProjectileType()) + Main.projectile[chase].type != ModContent.ProjectileType() && + Main.projectile[chase].type != ModContent.ProjectileType()) { for (int i = 0; i < Main.projectile.Length; i++) { diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index dee4b8bf91..d4950f64ef 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -81,7 +81,8 @@ namespace CalamityMod.Projectiles.Summon { //Delete the player's mechworm if it's attaching to something weird if (Main.projectile[chase].type != ModContent.ProjectileType() && - Main.projectile[chase].type != ModContent.ProjectileType()) + Main.projectile[chase].type != ModContent.ProjectileType() && + Main.projectile[chase].type != ModContent.ProjectileType()) { for (int i = 0; i < Main.projectile.Length; i++) { From 2d1e15a5f5b8a86c64f893798058d79e79cadcfd Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 1 Dec 2019 22:23:03 -0500 Subject: [PATCH 41/82] boosted solar veil drop rates and changed fantasy talisman recipe --- Items/Weapons/Rogue/FantasyTalisman.cs | 7 ++++--- NPCs/CalamityGlobalNPCLoot.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/FantasyTalisman.cs b/Items/Weapons/Rogue/FantasyTalisman.cs index 693d5784e2..4201d9f041 100644 --- a/Items/Weapons/Rogue/FantasyTalisman.cs +++ b/Items/Weapons/Rogue/FantasyTalisman.cs @@ -53,10 +53,11 @@ Stealth strikes release more souls and leave behind souls as they travel"); public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.Ectoplasm); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddIngredient(ItemID.Silk, 3); + recipe.AddIngredient(ItemID.Ectoplasm, 5); recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this, 5); + recipe.SetResult(this, 100); recipe.AddRecipe(); } } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index a66fcc74d7..3c7d3b7b7f 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1629,7 +1629,7 @@ namespace CalamityMod.NPCs case NPCID.Reaper: case NPCID.Psycho: - DropHelper.DropItemCondition(npc, ModContent.ItemType(), (CalamityWorld.downedCalamitas || NPC.downedPlantBoss), Main.expertMode ? 0.1f : 0.05f, 1, 3); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), (CalamityWorld.downedCalamitas || NPC.downedPlantBoss), Main.expertMode ? 0.75f : 0.5f, 1, 4); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedBuffedMothron, Main.expertMode ? 0.06f : 0.04f, 1, 1); break; From 90abd92ed72a0dd4fe58c8ac3b39f76cb3ba6922 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 1 Dec 2019 22:25:39 -0500 Subject: [PATCH 42/82] added hardened honeycomb (unobtainable) --- Items/Weapons/Rogue/HardenedHoneycomb.cs | 64 +++++++++++ Items/Weapons/Rogue/HardenedHoneycomb.png | Bin 0 -> 546 bytes Projectiles/Rogue/Honeycomb.cs | 132 ++++++++++++++++++++++ Projectiles/Rogue/Honeycomb.png | Bin 0 -> 546 bytes Projectiles/Rogue/HoneycombFragment.cs | 64 +++++++++++ Projectiles/Rogue/HoneycombFragment.png | Bin 0 -> 343 bytes Projectiles/Rogue/HoneycombFragment2.png | Bin 0 -> 268 bytes Projectiles/Rogue/HoneycombFragment3.png | Bin 0 -> 362 bytes 8 files changed, 260 insertions(+) create mode 100644 Items/Weapons/Rogue/HardenedHoneycomb.cs create mode 100644 Items/Weapons/Rogue/HardenedHoneycomb.png create mode 100644 Projectiles/Rogue/Honeycomb.cs create mode 100644 Projectiles/Rogue/Honeycomb.png create mode 100644 Projectiles/Rogue/HoneycombFragment.cs create mode 100644 Projectiles/Rogue/HoneycombFragment.png create mode 100644 Projectiles/Rogue/HoneycombFragment2.png create mode 100644 Projectiles/Rogue/HoneycombFragment3.png diff --git a/Items/Weapons/Rogue/HardenedHoneycomb.cs b/Items/Weapons/Rogue/HardenedHoneycomb.cs new file mode 100644 index 0000000000..44a8eb5287 --- /dev/null +++ b/Items/Weapons/Rogue/HardenedHoneycomb.cs @@ -0,0 +1,64 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class HardenedHoneycomb : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hardened Honeycomb"); + Tooltip.SetDefault(@"Fires a honeycomb that shatters into fragments +Grants the honey buff to players it touches +Stealth strikes can bounce off walls and enemies"); + } + + public override void SafeSetDefaults() + { + item.width = 30; + item.damage = 25; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 21; + item.useTime = 21; + item.useStyle = 1; + item.knockBack = 3f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 32; + item.maxStack = 999; + item.value = 300; + item.rare = 3; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + Main.projectile[stealth].penetrate = 3; + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.Hive); + recipe.AddIngredient(ItemID.CrispyHoneyBlock); + recipe.AddIngredient(ItemID.BeeWax); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this, 5); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/HardenedHoneycomb.png b/Items/Weapons/Rogue/HardenedHoneycomb.png new file mode 100644 index 0000000000000000000000000000000000000000..a29278afaa6f4bfcffd9099c77b11d1238f1a626 GIT binary patch literal 546 zcmV+-0^R+IP)Q;*TO2WJQ=TiwqP*gu#kI!?2q~SXeWP z|G@?_!EReI3}G-Z3>L)Vz+iC6sLmpqGIhjkz_;!rQf6T z=lc1s8`z1HdN+_fJ|0`rLecfqlGTpS0chPm0dQE_2<(u&7kPY$C6S8AD(8(NU0a+6 z{N8Jwyq2OTw%%Ha?3*P2HJ%y_Rg!q^ZG-EG*{;crPJC;kL>GVN^JQLm2x000tnMObu2 kSV=}YPjYExZggREX>V=-F@#v`?*IS*07*qoM6N<$f;8j!zyJUM literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs new file mode 100644 index 0000000000..047c6ca249 --- /dev/null +++ b/Projectiles/Rogue/Honeycomb.cs @@ -0,0 +1,132 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.Weapons.Rogue; + +namespace CalamityMod.Projectiles.Rogue +{ + public class Honeycomb : ModProjectile + { + private const float radius = 15f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Honeycomb"); + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.aiStyle = 2; + projectile.timeLeft = 300; + aiType = 48; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + Player player = Main.player[Main.myPlayer]; + Vector2 posDiff = player.Center - projectile.Center; + if (posDiff.Length() <= radius) + { + player.AddBuff(BuffID.Honey, 300); + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + int split = 0; + while (split < 3) + { + //Calculate the velocity of the projectile + float shardspeedX = -projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); + float shardspeedY = -projectile.velocity.Y * Main.rand.Next(50, 70) * 0.01f + Main.rand.Next(-8, 9) * 0.2f; + //Prevents the projectile speed from being too low + if (shardspeedX < 2f && shardspeedX > -2f) + { + shardspeedX += -projectile.velocity.X; + } + if (shardspeedY > 2f && shardspeedY < 2f) + { + shardspeedY += -projectile.velocity.Y; + } + + //Spawn the projectile + Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); + split += 1; + } + projectile.penetrate--; + if (projectile.penetrate <= 0) + { + projectile.Kill(); + } + else + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.velocity.X = -projectile.velocity.X; + projectile.velocity.Y = -projectile.velocity.Y; + int split = 0; + while (split < 3) + { + //Calculate the velocity of the projectile + float shardspeedX = -projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); + float shardspeedY = -projectile.velocity.Y * Main.rand.Next(50, 70) * 0.01f + Main.rand.Next(-8, 9) * 0.2f; + //Prevents the projectile speed from being too low + if (shardspeedX < 2f && shardspeedX > -2f) + { + shardspeedX += -projectile.velocity.X; + } + if (shardspeedY > 2f && shardspeedY < 2f) + { + shardspeedY += -projectile.velocity.Y; + } + + //Spawn the projectile + Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); + split += 1; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(4, (int)projectile.position.X, (int)projectile.position.Y, 1); + //Dust on impact + int dust_splash = 0; + while (dust_splash < 9) + { + Dust.NewDust(projectile.position, projectile.width, projectile.height, 9, -projectile.velocity.X * 0.15f, -projectile.velocity.Y * 0.15f, 159, default, 1.5f); + dust_splash += 1; + } + if (Main.rand.NextBool(2)) + { + Item.NewItem((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height, ModContent.ItemType()); + } + } + } +} diff --git a/Projectiles/Rogue/Honeycomb.png b/Projectiles/Rogue/Honeycomb.png new file mode 100644 index 0000000000000000000000000000000000000000..a29278afaa6f4bfcffd9099c77b11d1238f1a626 GIT binary patch literal 546 zcmV+-0^R+IP)Q;*TO2WJQ=TiwqP*gu#kI!?2q~SXeWP z|G@?_!EReI3}G-Z3>L)Vz+iC6sLmpqGIhjkz_;!rQf6T z=lc1s8`z1HdN+_fJ|0`rLecfqlGTpS0chPm0dQE_2<(u&7kPY$C6S8AD(8(NU0a+6 z{N8Jwyq2OTw%%Ha?3*P2HJ%y_Rg!q^ZG-EG*{;crPJC;kL>GVN^JQLm2x000tnMObu2 kSV=}YPjYExZggREX>V=-F@#v`?*IS*07*qoM6N<$f;8j!zyJUM literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/HoneycombFragment.cs b/Projectiles/Rogue/HoneycombFragment.cs new file mode 100644 index 0000000000..00f6d5121b --- /dev/null +++ b/Projectiles/Rogue/HoneycombFragment.cs @@ -0,0 +1,64 @@ +using Terraria; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace CalamityMod.Projectiles.Rogue +{ + public class HoneycombFragment : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Honeycomb Fragment"); + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 14; + projectile.height = 14; + projectile.Calamity().rogue = true; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + //Changes the texture of the projectile + if (projectile.ai[0] == 1f) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Projectiles/Rogue/HoneycombFragment2"); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 12, 14)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; + } + if (projectile.ai[0] == 2f) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Projectiles/Rogue/HoneycombFragment3"); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 16, 14)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; + } + return true; + } + + public override void AI() + { + //Rotation and gravity + projectile.rotation += 0.6f * projectile.direction; + projectile.velocity.Y = projectile.velocity.Y + 0.27f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + + public override void Kill(int timeLeft) + { + //Dust effect + int splash = 0; + while (splash < 4) + { + Dust.NewDust(projectile.position, projectile.width, projectile.height, 9, -projectile.velocity.X * 0.15f, -projectile.velocity.Y * 0.10f, 159, default, 0.9f); + splash += 1; + } + } + } +} diff --git a/Projectiles/Rogue/HoneycombFragment.png b/Projectiles/Rogue/HoneycombFragment.png new file mode 100644 index 0000000000000000000000000000000000000000..993bd2ee3b9a76a3493c22eeb15ea0828308cdcd GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^d_XM3!3HF=W8NDADYhhUcNd2LAh=-f^2tDvcb+be zAr`0CUQ+aS4isT{@V+zmAp7A3%NA-MauGS)B*oHw^ntuVXTk?@j(^ROTW0IB3AQvY zN)SEV#GNhX=&RHb)4Y4b_XC?=d$w1fd-`}z^=7v?*43v=3yN>^vMmafX5ReuBahWx zaf75261v`RPycl~d^?z5X4|^M3v9N`F#VL}*yZ&5)y4}uw%Lh4JtBFUJ#g3SJ!0p! zf6My&X8#e3=*TSDeDPO?myTN8K6lDGBFC?>zs@$#ICjpw6)6Qp7r6_{ws2~B&wudc z!JZoRzt0<<{ZZLbU%|Iw_s8FPPj#1f8+Lv=1O3$l$n}Wl30?NpT}U>67l9eP?o{d)z4*}Q$iB}1DBR^ literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/HoneycombFragment2.png b/Projectiles/Rogue/HoneycombFragment2.png new file mode 100644 index 0000000000000000000000000000000000000000..032f46b4b94706db070d71a9d26448efcee383e1 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq}Y|gW!U_%O?Xx7JIrl zhG?8m?lB5UN&o_Zhsntxy5jT8>-B6Z1wa3}r|2;YGj}$y-c6C#Rb&H!baPvgR>hyv zC$})(eKJ9&9wgTGefv9O10Z;Fx3tsA{(yvm`C*^DIRy->**@hqFqW7HpJ$tK(tX`t zpz#NK66^B9+&<+bq^6~$0BxJG@2j1c)T3t!X&~N@Uyt>ff#C4*_4`kLW@cF3X3*Wr u6TA)RT%i)z2q5xwv+^&>OwB7vEXmBzV=!!qc=H}8%i!ti=d#Wzp$P!DK4K*R literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/HoneycombFragment3.png b/Projectiles/Rogue/HoneycombFragment3.png new file mode 100644 index 0000000000000000000000000000000000000000..15350be722992b7d0e3b773ee60005420f0fa78c GIT binary patch literal 362 zcmV-w0hRuVP)r45OWPv1P zk$wutyKA8J@)5(u;b0^08*kwJHkWwNZ1+H|S{lz3qP>+lu(~)oaDMuWM+t*-HZvVT zum3xq4E_PW?ny9-v1FzI000tnMObu2SV=}YPjYExZggREX>V=-F@#v`?*IS*07*qo IM6N<$f Date: Sun, 1 Dec 2019 22:33:26 -0500 Subject: [PATCH 43/82] nerfed equanimity shards --- Projectiles/Rogue/EquanimityDarkShard.cs | 2 +- Projectiles/Rogue/EquanimityLightShard.cs | 2 +- Projectiles/Rogue/EquanimityProj.cs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Projectiles/Rogue/EquanimityDarkShard.cs b/Projectiles/Rogue/EquanimityDarkShard.cs index 8e8ed18543..30842639d3 100644 --- a/Projectiles/Rogue/EquanimityDarkShard.cs +++ b/Projectiles/Rogue/EquanimityDarkShard.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.alpha = 0; projectile.penetrate = 1; projectile.tileCollide = true; - projectile.timeLeft = 150; + projectile.timeLeft = 120; projectile.Calamity().rogue = true; } diff --git a/Projectiles/Rogue/EquanimityLightShard.cs b/Projectiles/Rogue/EquanimityLightShard.cs index 5b6bb62daf..cbccfad414 100644 --- a/Projectiles/Rogue/EquanimityLightShard.cs +++ b/Projectiles/Rogue/EquanimityLightShard.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.alpha = 0; projectile.penetrate = 3; projectile.tileCollide = true; - projectile.timeLeft = 150; + projectile.timeLeft = 120; projectile.Calamity().rogue = true; } diff --git a/Projectiles/Rogue/EquanimityProj.cs b/Projectiles/Rogue/EquanimityProj.cs index 4c5ddd6b65..9f46ef762d 100644 --- a/Projectiles/Rogue/EquanimityProj.cs +++ b/Projectiles/Rogue/EquanimityProj.cs @@ -41,15 +41,15 @@ namespace CalamityMod.Projectiles.Rogue if (recall) { - if (Main.rand.Next(0, 7) == 0) + if (Main.rand.Next(0, 10) == 0) { Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.5f), 0f, projectile.owner); + Projectile.NewProjectile(projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.15f), 0f, projectile.owner); if (projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.5f), 0f, projectile.owner); + Projectile.NewProjectile(projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.15f), 0f, projectile.owner); } } @@ -80,10 +80,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.25f), 0f, projectile.owner); + Projectile.NewProjectile(projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.1f), 0f, projectile.owner); if (projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.25f), 0f, projectile.owner); + Projectile.NewProjectile(projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.1f), 0f, projectile.owner); } } } From 8ac4ba7aecbc13150397790ae1291271934af004 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 1 Dec 2019 22:37:58 -0500 Subject: [PATCH 44/82] randomized honeycomb fragment texture --- Projectiles/Rogue/Honeycomb.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 047c6ca249..bbb6ed729c 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); + Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner, Main.rand.Next(3), 0f); split += 1; } projectile.penetrate--; @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); + Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner, Main.rand.Next(3), 0f); split += 1; } } From 5ac6fba01b2f0ac0208477cc1f6f4ac4a9ba13f0 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Mon, 2 Dec 2019 13:58:03 +0000 Subject: [PATCH 45/82] Spectral Veil --- CalPlayer/CalamityPlayer.cs | 149 +++++++++++++++++++++++++++++ CalamityMod.cs | 3 + Items/Accessories/SpectralVeil.cs | 32 +++++++ Items/Accessories/SpectralVeil.png | Bin 0 -> 692 bytes 4 files changed, 184 insertions(+) create mode 100644 Items/Accessories/SpectralVeil.cs create mode 100644 Items/Accessories/SpectralVeil.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f7f6825a1d..4ea0c767c8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -405,6 +405,8 @@ namespace CalamityMod.CalPlayer public bool filthyGlove = false; public bool sandCloak = false; public int sandCloakCooldown = 0; + public bool spectralVeil = false; + public int spectralVeilImmunity = 0; // Armor Set public bool victideSet = false; @@ -1155,6 +1157,7 @@ namespace CalamityMod.CalPlayer bloodyGlove = false; filthyGlove = false; sandCloak = false; + spectralVeil = false; alcoholPoisoning = false; shadowflame = false; @@ -1401,6 +1404,7 @@ namespace CalamityMod.CalPlayer featherCrownCooldown = 0; sulphurPoison = false; sandCloakCooldown = 0; + spectralVeilImmunity = 0; #endregion #region Rogue @@ -1881,6 +1885,69 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), 7, 8, player.whoAmI, 0, 0); Main.PlaySound(2, player.position, 45); } + if (CalamityMod.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f && + wearingRogueArmor && player.Calamity().rogueStealthMax > 0) + { + float teleportRange = 320f; + Vector2 teleportLocation; + teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X; + if (player.gravDir == 1f) + { + teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height; + } + else + { + teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY; + } + teleportLocation.X -= (float)(player.width / 2); + Vector2 playerToTeleport = teleportLocation - player.position; + if (playerToTeleport.Length() > teleportRange) + { + playerToTeleport.Normalize(); + playerToTeleport *= teleportRange; + teleportLocation = player.position + playerToTeleport; + } + if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50)) + { + int x = (int)(teleportLocation.X / 16f); + int y = (int)(teleportLocation.Y / 16f); + if (!Collision.SolidCollision(teleportLocation, player.width, player.height)) + { + player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f; + + player.Teleport(teleportLocation, 1, 0); + NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0); + if (player.chaosState) + { + player.statLife -= player.statLifeMax2 / 7; + PlayerDeathReason damageSource = PlayerDeathReason.ByOther(13); + if (player.statLife <= 0) + { + player.KillMe(damageSource, 1.0, 0, false); + } + } + player.AddBuff(BuffID.ChaosState, 360, true); + + int numDust = 40; + Vector2 step = playerToTeleport / numDust; + for (int i = 0; i < numDust; i++) + { + int dustIndex = Dust.NewDust(player.Center - (step * i), 1, 1, 21, step.X, step.Y); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].noLight = true; + } + + player.immune = true; + player.immuneTime = 120; + spectralVeilImmunity = 120; + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + } + } + + } if (CalamityMod.BossBarToggleHotKey.JustPressed) { if (drawBossHPBar) @@ -3351,6 +3418,8 @@ namespace CalamityMod.CalPlayer moonCrownCooldown--; if (sandCloakCooldown > 0) sandCloakCooldown--; + if (spectralVeilImmunity > 0) + spectralVeilImmunity--; if (ataxiaDmg > 0f) ataxiaDmg -= 1.5f; if (ataxiaDmg < 0f) @@ -3897,6 +3966,86 @@ namespace CalamityMod.CalPlayer } } } + if (spectralVeil && spectralVeilImmunity > 0) + { + Rectangle sVeilRectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && !Main.npc[i].townNPC && Main.npc[i].immune[player.whoAmI] <= 0 && Main.npc[i].damage > 0) + { + NPC nPC = Main.npc[i]; + Rectangle rect = nPC.getRect(); + if (sVeilRectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + { + if (player.whoAmI == Main.myPlayer) + { + player.noKnockback = true; + rogueStealth = rogueStealthMax; + spectralVeilImmunity = 0; + + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + + Vector2 sVeilDustDir = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); + sVeilDustDir.Normalize(); + sVeilDustDir *= 0.5f; + for (int j = 0; j < 20; j++) + { + int sVeilDustIndex1 = Dust.NewDust(player.Center, 1, 1, 21, sVeilDustDir.X * j, sVeilDustDir.Y * j); + int sVeilDustIndex2 = Dust.NewDust(player.Center, 1, 1, 21, -sVeilDustDir.X * j, -sVeilDustDir.Y * j); + Main.dust[sVeilDustIndex1].noGravity = false; + Main.dust[sVeilDustIndex1].noLight = false; + Main.dust[sVeilDustIndex2].noGravity = false; + Main.dust[sVeilDustIndex2].noLight = false; + } + + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y); + } + break; + } + } + } + for (int i = 0; i < 1000; i++) + { + if (Main.projectile[i].active && !Main.projectile[i].friendly && Main.projectile[i].hostile && Main.projectile[i].damage > 0) + { + Projectile proj = Main.projectile[i]; + Rectangle rect = proj.getRect(); + if (sVeilRectangle.Intersects(rect)) + { + if (player.whoAmI == Main.myPlayer) + { + player.noKnockback = true; + rogueStealth = rogueStealthMax; + spectralVeilImmunity = 0; + + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + + Vector2 sVeilDustDir = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); + sVeilDustDir.Normalize(); + sVeilDustDir *= 0.5f; + for (int j = 0; j < 20; j++) + { + int sVeilDustIndex1 = Dust.NewDust(player.Center, 1, 1, 21, sVeilDustDir.X * j, sVeilDustDir.Y * j); + int sVeilDustIndex2 = Dust.NewDust(player.Center, 1, 1, 21, -sVeilDustDir.X * j, -sVeilDustDir.Y * j); + Main.dust[sVeilDustIndex1].noGravity = false; + Main.dust[sVeilDustIndex1].noLight = false; + Main.dust[sVeilDustIndex2].noGravity = false; + Main.dust[sVeilDustIndex2].noLight = false; + } + + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y); + } + break; + } + } + } + } #endregion #region StandingStillEffects diff --git a/CalamityMod.cs b/CalamityMod.cs index 927af218d4..4a9ce1c6f0 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -101,6 +101,7 @@ namespace CalamityMod public static ModHotKey BossBarToggleSmallTextHotKey; public static ModHotKey MomentumCapacitatorHotkey; public static ModHotKey SandCloakHotkey; + public static ModHotKey SpectralVeilHotKey; // Boss Spawners public static int ghostKillCount = 0; @@ -202,6 +203,7 @@ namespace CalamityMod AstralArcanumUIHotkey = RegisterHotKey("Astral Arcanum UI Toggle", "O"); MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U"); SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C"); + SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z"); BossBarToggleHotKey = RegisterHotKey("Boss Health Bar Toggle", "NumPad0"); BossBarToggleSmallTextHotKey = RegisterHotKey("Boss Health Bar Small Text Toggle", "NumPad1"); @@ -293,6 +295,7 @@ namespace CalamityMod AstralArcanumUIHotkey = null; MomentumCapacitatorHotkey = null; SandCloakHotkey = null; + SpectralVeilHotKey = null; BossBarToggleHotKey = null; BossBarToggleSmallTextHotKey = null; diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs new file mode 100644 index 0000000000..f06ad15c1a --- /dev/null +++ b/Items/Accessories/SpectralVeil.cs @@ -0,0 +1,32 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class SpectralVeil : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Veil"); + Tooltip.SetDefault("The inside of the cloak is full of teeth...\n" + + "Press Z to consume 25% of your maximum stealth to perform a short range teleport and render you momentarily invulnerable\n" + + "If you dodge something while invulnerable, you instantly gain full stealth"); + } + + public override void SetDefaults() + { + item.width = 30; + item.height = 38; + item.value = Item.buyPrice(1, 40, 0, 0); + item.Calamity().postMoonLordRarity = 13; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.Calamity().spectralVeil = true; + } + } +} diff --git a/Items/Accessories/SpectralVeil.png b/Items/Accessories/SpectralVeil.png new file mode 100644 index 0000000000000000000000000000000000000000..a095d7a028a6c2c051af2d41fbdf6ef4decc7f97 GIT binary patch literal 692 zcmV;l0!#ggP)s7x@hMM6SiVnisIJGNPha-{Sk7$HjhnBm@_64|2jlI3dU16; zt_5{Nx|nHzwZ^6VFRnKMSik<;D{E#QCf*d-IMr7Sw?e8_F5mwiJX zoaFag8DjBPRxVN0yl<7K$#L$;MCmp8{Zm%3YOP#hPBdE&tVK6+8%q7u9WiI#t6Bj3 zoi*M5k!RxUOAEYRC3i%Ulvw8fbTZ2I+8^;MZzXz*yv|4mdsaD{?-R32xnBDtcD>D_ zG9^6Yp+k0t&{2`s{-e4`l4;0(>#krTcO}b4N@8WQV{lWi{S%9~MMN&STTe{xeTfOz zYyZSW5&|JBB0u@{(U7H{_K$b0`)(%VpLm+CFj2F-f#lIKhFr4DQ7=xfrk{GlI@Mk=;pa^JUBBZRm1c^VX*_($QqwB5Y-qZ-720G{>k^6eqBhyVZp5_CmabVXQ6MmkS&X=QG7 aVRUJ4ZU8ZaSnTfr0000 Date: Mon, 2 Dec 2019 17:45:28 +0000 Subject: [PATCH 46/82] Aerialite brick tile merge fix --- Tiles/AerialiteBrick.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Tiles/AerialiteBrick.cs b/Tiles/AerialiteBrick.cs index 80d7855dfe..64e48a6a35 100644 --- a/Tiles/AerialiteBrick.cs +++ b/Tiles/AerialiteBrick.cs @@ -8,7 +8,6 @@ namespace CalamityMod.Tiles public override void SetDefaults() { Main.tileSolid[Type] = true; - Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; soundType = 21; minPick = 50; From b6939189174153a12d61ed4e11ca04d9344a7ab7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 2 Dec 2019 21:13:00 -0500 Subject: [PATCH 47/82] abyssal crate changes & ancient ore helm fixes --- Items/CalamityGlobalItem.cs | 8 ++++---- Items/Fishing/SulphurCatches/AbyssalCrate.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index c8cac5b383..8fdf03046d 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -850,7 +850,7 @@ namespace CalamityMod.Items } } } - if (item.type == ItemID.IronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves) + if (item.type == ItemID.AncientIronHelmet || item.type == ItemID.IronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves) { foreach (TooltipLine line2 in tooltips) { @@ -890,7 +890,7 @@ namespace CalamityMod.Items } } } - if (item.type == ItemID.GoldHelmet || item.type == ItemID.GoldChainmail || item.type == ItemID.GoldGreaves) + if (item.type == ItemID.AncientGoldHelmet || item.type == ItemID.GoldHelmet || item.type == ItemID.GoldChainmail || item.type == ItemID.GoldGreaves) { foreach (TooltipLine line2 in tooltips) { @@ -1991,7 +1991,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; return "Copper"; if (head.type == ItemID.TinHelmet && body.type == ItemID.TinChainmail && legs.type == ItemID.TinGreaves) return "Tin"; - if (head.type == ItemID.IronHelmet && body.type == ItemID.IronChainmail && legs.type == ItemID.IronGreaves) + if ((head.type == ItemID.IronHelmet || head.type == ItemID.AncientIronHelmet) && body.type == ItemID.IronChainmail && legs.type == ItemID.IronGreaves) return "Iron"; if (head.type == ItemID.LeadHelmet && body.type == ItemID.LeadChainmail && legs.type == ItemID.LeadGreaves) return "Lead"; @@ -1999,7 +1999,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; return "Silver"; if (head.type == ItemID.TungstenHelmet && body.type == ItemID.TungstenChainmail && legs.type == ItemID.TungstenGreaves) return "Tungsten"; - if (head.type == ItemID.GoldHelmet && body.type == ItemID.GoldChainmail && legs.type == ItemID.GoldGreaves) + if ((head.type == ItemID.GoldHelmet || head.type == ItemID.AncientGoldHelmet) && body.type == ItemID.GoldChainmail && legs.type == ItemID.GoldGreaves) return "Gold"; if (head.type == ItemID.PlatinumHelmet && body.type == ItemID.PlatinumChainmail && legs.type == ItemID.PlatinumGreaves) return "Platinum"; diff --git a/Items/Fishing/SulphurCatches/AbyssalCrate.cs b/Items/Fishing/SulphurCatches/AbyssalCrate.cs index 44abd00e0f..135b557a6f 100644 --- a/Items/Fishing/SulphurCatches/AbyssalCrate.cs +++ b/Items/Fishing/SulphurCatches/AbyssalCrate.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches } // Equipment - DropHelper.DropItemFromSetCondition(player, Main.hardMode, 0.2f, + DropHelper.DropItemFromSetCondition(player, NPC.downedBoss3, 0.25f, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -85,7 +85,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches DropHelper.DropItemChance(player, ModContent.ItemType(), 10, 1, 3); if (Main.hardMode) { - DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.GreaterHealingPotion: ItemID.GreaterManaPotion, 5, 10); + DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.GreaterHealingPotion : ItemID.GreaterManaPotion, 5, 10); } else { From 5b6f65269f50836f530eae9258cafcf9b2930555 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 2 Dec 2019 22:07:12 -0500 Subject: [PATCH 48/82] made shroomerang obtainable/nerfed phantasmal ruin --- Items/TreasureBags/CrabulonBag.cs | 1 + NPCs/Crabulon/CrabulonIdle.cs | 1 + Projectiles/Rogue/PhantasmalRuinProj.cs | 6 +++--- Projectiles/Rogue/PhantasmalSoul.cs | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Items/TreasureBags/CrabulonBag.cs b/Items/TreasureBags/CrabulonBag.cs index d8600e6c10..cafa89a774 100644 --- a/Items/TreasureBags/CrabulonBag.cs +++ b/Items/TreasureBags/CrabulonBag.cs @@ -50,6 +50,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 6d55189e62..765de1a5d1 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -506,6 +506,7 @@ namespace CalamityMod.NPCs.Crabulon DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); diff --git a/Projectiles/Rogue/PhantasmalRuinProj.cs b/Projectiles/Rogue/PhantasmalRuinProj.cs index 8b21f6f27e..4a9afbf038 100644 --- a/Projectiles/Rogue/PhantasmalRuinProj.cs +++ b/Projectiles/Rogue/PhantasmalRuinProj.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue double deltaAngle = spread / 8f; double offsetAngle; int i; - if (projectile.owner == Main.myPlayer) //bringing super efficient and readable code to a CalamityMod near you + if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 16) { for (i = 0; i < 8; i++) { @@ -79,8 +79,8 @@ namespace CalamityMod.Projectiles.Rogue float randomSpeed = (float)Main.rand.Next(1, 7); float randomSpeed2 = (float)Main.rand.Next(1, 7); offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int num23 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.2), 0f, projectile.owner, 1f, ai1); - int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.2), 0f, projectile.owner, 1f, ai1); + int num23 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1), 0f, projectile.owner, 1f, ai1); + int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1), 0f, projectile.owner, 1f, ai1); } } } diff --git a/Projectiles/Rogue/PhantasmalSoul.cs b/Projectiles/Rogue/PhantasmalSoul.cs index f757d8f55b..84ab21f81f 100644 --- a/Projectiles/Rogue/PhantasmalSoul.cs +++ b/Projectiles/Rogue/PhantasmalSoul.cs @@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; - projectile.damage /= 2; + projectile.damage /= 4; projectile.Damage(); int num226 = 36; for (int num227 = 0; num227 < num226; num227++) From 9131ff2dfaaade790313004d79e1bbc8fa33fdc7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 2 Dec 2019 22:42:25 -0500 Subject: [PATCH 49/82] cryonic ore can generate in the astral snow biome now --- World/WorldGenerationMethods.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 4d40bfdd7d..da10bf1360 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1201,22 +1201,22 @@ namespace CalamityMod.World WorldGen.OreRunner(tilesX, tilesY, (double)WorldGen.genRand.Next(12, 18), WorldGen.genRand.Next(12, 18), (ushort)type); } else if (type == ModContent.TileType()) - { + { //mud if (Main.tile[tilesX, tilesY].type == 59) { WorldGen.OreRunner(tilesX, tilesY, (double)WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(3, 8), (ushort)type); } } else if (type == ModContent.TileType()) - { + { //dirt, stone if (Main.tile[tilesX, tilesY].type == 0 || Main.tile[tilesX, tilesY].type == 1) { WorldGen.OreRunner(tilesX, tilesY, (double)WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(3, 8), (ushort)type); } } else if (type == ModContent.TileType()) - { - if (Main.tile[tilesX, tilesY].type == 147 || Main.tile[tilesX, tilesY].type == 161 || Main.tile[tilesX, tilesY].type == 163 || Main.tile[tilesX, tilesY].type == 164 || Main.tile[tilesX, tilesY].type == 200) + { //snow, ice, purple ice, pink ice, red ice, astral snow, astral ice + if (Main.tile[tilesX, tilesY].type == 147 || Main.tile[tilesX, tilesY].type == 161 || Main.tile[tilesX, tilesY].type == 163 || Main.tile[tilesX, tilesY].type == 164 || Main.tile[tilesX, tilesY].type == 200 || Main.tile[tilesX, tilesY].type == ModContent.TileType() || Main.tile[tilesX, tilesY].type == ModContent.TileType()) { WorldGen.OreRunner(tilesX, tilesY, (double)WorldGen.genRand.Next(3, 8), WorldGen.genRand.Next(3, 8), (ushort)type); } From c4816598683b34b78fbae3d3ffd480430156c6dd Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 2 Dec 2019 23:15:05 -0500 Subject: [PATCH 50/82] these had fucked glowmasks too --- Items/Weapons/Magic/SoulPiercer.cs | 4 ++-- Items/Weapons/Magic/Vesuvius.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index c0fad19bde..a7ac01484b 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -39,10 +39,10 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 14; } - public override Vector2? HoldoutOrigin() + /*public override Vector2? HoldoutOrigin() { return new Vector2(15, 15); - } + }*/ public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index 3487a57200..f2b94fda2d 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -41,10 +41,10 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 17; } - public override Vector2? HoldoutOrigin() + /*public override Vector2? HoldoutOrigin() { return new Vector2(30, 30); - } + }*/ public override bool AltFunctionUse(Player player) { From 8c34115ac320e99868635a458b99a6448e1f2683 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Tue, 3 Dec 2019 19:06:25 +0000 Subject: [PATCH 51/82] Ashen Stalactite --- Items/Weapons/Rogue/AshenStalactite.cs | 54 +++++++++++++++++ Items/Weapons/Rogue/AshenStalactite.png | Bin 0 -> 567 bytes Projectiles/Rogue/AshenStalactiteDebris.cs | 59 +++++++++++++++++++ Projectiles/Rogue/AshenStalactiteDebris.png | Bin 0 -> 231 bytes Projectiles/Rogue/AshenStalactiteProj.cs | 61 +++++++++++++++++++ Projectiles/Rogue/AshenStalactiteProj.png | Bin 0 -> 633 bytes Projectiles/Rogue/AshenStalagmiteProj.cs | 62 ++++++++++++++++++++ Projectiles/Rogue/AshenStalagmiteProj.png | Bin 0 -> 671 bytes 8 files changed, 236 insertions(+) create mode 100644 Items/Weapons/Rogue/AshenStalactite.cs create mode 100644 Items/Weapons/Rogue/AshenStalactite.png create mode 100644 Projectiles/Rogue/AshenStalactiteDebris.cs create mode 100644 Projectiles/Rogue/AshenStalactiteDebris.png create mode 100644 Projectiles/Rogue/AshenStalactiteProj.cs create mode 100644 Projectiles/Rogue/AshenStalactiteProj.png create mode 100644 Projectiles/Rogue/AshenStalagmiteProj.cs create mode 100644 Projectiles/Rogue/AshenStalagmiteProj.png diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs new file mode 100644 index 0000000000..3be2413dfb --- /dev/null +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -0,0 +1,54 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class AshenStalactite : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ashen Stalactite"); + Tooltip.SetDefault("Throws a fast, small stalactite that crumbles to dust after travelling a short distance\n" + + "Stealth strikes cause a larger, more damaging stalagmite to be thrown which travels slower and further before crumbling to damaging dust"); + } + + public override void SafeSetDefaults() + { + item.width = 36; + item.height = 34; + item.damage = 50; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 20; + item.knockBack = 1f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.maxStack = 1; + item.value = Item.buyPrice(0, 1, 0, 0); + item.rare = 3; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 15f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) + { + int stealthType = ModContent.ProjectileType(); + float stealthSpeedMult = 0.6f; + float stealthDamageMult = 1.5f; + float stealthKnockbackMult = 2.5f; + int p = Projectile.NewProjectile(position.X, position.Y, speedX * stealthSpeedMult, speedY * stealthSpeedMult, stealthType, (int)(damage * stealthDamageMult), (int)(knockBack * stealthKnockbackMult), player.whoAmI, 0f, 1f); + Main.projectile[p].Calamity().stealthStrike = true; + return false; + } + return true; + } + } +} diff --git a/Items/Weapons/Rogue/AshenStalactite.png b/Items/Weapons/Rogue/AshenStalactite.png new file mode 100644 index 0000000000000000000000000000000000000000..aafd03c7af72b746ef673322541f5bd0c8807ca8 GIT binary patch literal 567 zcmV-70?7S|P)JP!Xb%f`}3lU34&UG;wiu;BVA_z{OSL z7kf zua>o^dJ|wW9tU8vunxfE)m2BCvQtA#p@COfFOjJK`tm{^fYr4n>GMG{XTF?vLTw!q z0&2n`Pr{0rl8ER?#-5hmugYw1?E;X?%@_dZ=Qom!h;~BVIwVcuw?@PJ2V)lS*^$M0 zPiP`QwqKb)DI`gV2oW`@xkUgfm&Gs1{9Pecq77bV832{a{g-Y? zJE4ybiSEQ>;{dq+tWtMm5wV&cT({$Q_PeUI7YYd(D;nu26C{#OdgmE&3J|mIyU|Yw zf2u#fywWODcJ3sRL~PuE&y(V9RX*trD_RNx?a$aTD=LZ9p6Wj$qP>uj&t{uJ*G3_t zMmwQ*L7}(-bqkP~0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLk FV1nQ6`ZoXo literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/AshenStalactiteDebris.cs b/Projectiles/Rogue/AshenStalactiteDebris.cs new file mode 100644 index 0000000000..97dc29b133 --- /dev/null +++ b/Projectiles/Rogue/AshenStalactiteDebris.cs @@ -0,0 +1,59 @@ + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class AshenStalactiteDebris : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ashen Debris"); + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 50; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.rotation += 0.2f; + projectile.velocity.Y += 0.2f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 3; i++) + { + Dust.NewDust(projectile.Center, 1, 1, 1, projectile.velocity.X, projectile.velocity.Y); + } + } + } +} diff --git a/Projectiles/Rogue/AshenStalactiteDebris.png b/Projectiles/Rogue/AshenStalactiteDebris.png new file mode 100644 index 0000000000000000000000000000000000000000..c19bebc35fbbf75585eb7090ca30d4851ed49ad9 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}3q4&NLo_DN zowSkbkb{8B{bLR-E!<|BhfLXztR)&yLUI!7b|G{t0re(5qe_mR|kUH`7`x+C+ZLhC>H=1SH@HfxH zO2(hz%w!ie!AI|YGCjC>Ga+H22t)1vG$F^HYYbCd`3`(7D;LPgRXQl`9~8;uaQW5) d_8zqw2Kz9T;%TMJzX2V~;OXk;vd$@?2>@_8R>=SW literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/AshenStalactiteProj.cs b/Projectiles/Rogue/AshenStalactiteProj.cs new file mode 100644 index 0000000000..93d3d8522d --- /dev/null +++ b/Projectiles/Rogue/AshenStalactiteProj.cs @@ -0,0 +1,61 @@ + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class AshenStalactiteProj : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ashen Stalactite"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 25; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; + + projectile.velocity.Y += 0.1f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Dust.NewDust(projectile.Center, 1, 1, 1, projectile.velocity.X, projectile.velocity.Y); + } + } + } +} diff --git a/Projectiles/Rogue/AshenStalactiteProj.png b/Projectiles/Rogue/AshenStalactiteProj.png new file mode 100644 index 0000000000000000000000000000000000000000..2bc70a87aa25e1ad542b6ad7c54b88110b6efa03 GIT binary patch literal 633 zcmV-<0*3vGP)Px%Gf6~2R9J=Om_bhyK^TUgsnw!j8_~2%tFS>xkOK+fq%lpr;( z>NWtCYBj3t%9Fa5yCg_j4%Xf*X#?Buzq$~Rl8l;^afH;Xwx6MZVn-FDK{|=Kq__1 zU)vr6|B`yQ{SkmaCno?D3X=-p=;&Ch8%E4HLg}~x`6Yo%r$9hRQg}KCKzYThzweXX z+T026vtpk{e~cqE^jpWdR9>;PIw2!z`h;Z-yq!)ffW7_wf%h|xP^?3eIG4U3dfhbl zEUVQwLtXSB>y2mbcn?E}$93DyBP5ZTH#afv?;IO01cbhP+NJ+ooGSa*%N~6!lNso( zafB{4H}q$IW(I(s<7jJK*rl*zA3j$AI6wcZ0PL3MV%R0)2wmDCNzZWxj?26w-6fG3 z{@ahrK$naol-MCFn2{s@6L|c{dw=V6J(70oRCBFXZvfD9dJ3S`?f`*H#t};FP+ubH z{_=N>lB_>(i913{&cmN)9HGPxC50KwVB T?)-cQ00000NkvXXu0mjf>h2wO literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/AshenStalagmiteProj.cs b/Projectiles/Rogue/AshenStalagmiteProj.cs new file mode 100644 index 0000000000..a4becec216 --- /dev/null +++ b/Projectiles/Rogue/AshenStalagmiteProj.cs @@ -0,0 +1,62 @@ + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class AshenStalagmiteProj : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ashen Stalagmite"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = 2; + projectile.timeLeft = 100; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; + + projectile.velocity.Y += 0.075f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 6; i++) + { + int dustIndex = Dust.NewDust(projectile.Center, 1, 1, 1, projectile.velocity.X, projectile.velocity.Y); + Projectile.NewProjectile(projectile.Center, Main.dust[dustIndex].velocity, ModContent.ProjectileType(), projectile.damage / 2, 0, projectile.owner, 0, 0); + } + } + } +} diff --git a/Projectiles/Rogue/AshenStalagmiteProj.png b/Projectiles/Rogue/AshenStalagmiteProj.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1751aaa4dd8277ebc8be280a23b2d1ad12e52e GIT binary patch literal 671 zcmV;Q0$}}#P)Px%SxH1eR9J=8m%&aGQ51&1sRONmG)96*s?Z=N%0gq@XktuUyWj=%;ot?jkS#7u zbZ5c>Othq68Z<-_YawH7dr9#oARYU>*S z%*|bM0Csmj1NoD)mYDmk-2tHEdB()0N(F%DFM{jp%9;-$IVmr4))I57T{1IMWgzJ_ zk&{+e)`0x;oVCPUMOrErfuz^oz1ad_@x~+&<~!xNygX+uvD0XKd2M$3it&KR$$Ro# zsaSLX-fwUJmyKCV?6g+O8zXKo^y~N-2#Li>NtY*s@zU5R0JrAnjpyU*4=VeKN%2TU zN@{l_7rAH4j{$gDd+nz^PsGPrWG%5oG}X{UshzFz*vC)b0l5F@4v-|N(>mh14#0<< zolG0EmRQ1L5yffx5R#JOq$Hiz;%Kmp{)s_Pr?tfTo)|@1o)`z9P`Hp<5#+V2*B1e( zzkLOS9dOoeWO#{5w-*)w=y;wFuyix%*WwkS-GhY4>77GM?5tC1NPSv)V!Z2>10OSea`M{&XdNB_y}f2Fv4K4%MZO7AD}$s{ zs0yIGw^?ua0Am+R4)m@F))M=xUMZ?x-N?*Tkm-MPg8r;^cx2?i&3eOFr_pR0d$E>S zW{;gABjPV#TgIe3C67hEPg57Ome@agY*6*Uz002ovPDHLk FV1kR1K@b1{ literal 0 HcmV?d00001 From 1be9c618c3e52e645b35986b30283c59d462eaac Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 3 Dec 2019 18:22:39 -0500 Subject: [PATCH 52/82] balance changes, made web ball & nasty cholla obtainable --- CalamityMod.cs | 3 +++ Items/Weapons/Rogue/NastyCholla.cs | 4 ++-- Items/Weapons/Rogue/WebBall.cs | 4 ++-- Projectiles/Melee/Spears/InsidiousImpalerProj.cs | 4 ++-- Projectiles/Rogue/StickyBol.cs | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 6ea48f6040..ad0cad838b 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1851,6 +1851,7 @@ namespace CalamityMod daggerList = new List() { + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -1882,6 +1883,8 @@ namespace CalamityMod boomerangProjList = new List() { + ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Items/Weapons/Rogue/NastyCholla.cs b/Items/Weapons/Rogue/NastyCholla.cs index 46aaae11bc..cf461a903e 100644 --- a/Items/Weapons/Rogue/NastyCholla.cs +++ b/Items/Weapons/Rogue/NastyCholla.cs @@ -56,13 +56,13 @@ Stealth strikes throw five at once"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cactus, 2); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(this, 15); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/WebBall.cs b/Items/Weapons/Rogue/WebBall.cs index 7351e1fa8b..6afe6d92db 100644 --- a/Items/Weapons/Rogue/WebBall.cs +++ b/Items/Weapons/Rogue/WebBall.cs @@ -48,12 +48,12 @@ Stealth strikes slow enemies down longer"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cobweb, 3); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs index a310e205cf..eaf23a7c08 100644 --- a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs +++ b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ownerHitCheck = true; projectile.hide = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 8; } public override void AI() @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Melee.Spears { projectile.localAI[0] = 1f; Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y, - projectile.velocity.X * 2.4f, projectile.velocity.Y * 2.4f, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); + projectile.velocity.X * 2.4f, projectile.velocity.Y * 2.4f, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); } } else diff --git a/Projectiles/Rogue/StickyBol.cs b/Projectiles/Rogue/StickyBol.cs index 11c761cc5b..9978c34129 100644 --- a/Projectiles/Rogue/StickyBol.cs +++ b/Projectiles/Rogue/StickyBol.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.Calamity().rogue = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 15; + projectile.localNPCHitCooldown = 50; } public override void AI() From ce5f7191122f9006b9929c6e29d03af1278cf9df Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 3 Dec 2019 18:31:22 -0500 Subject: [PATCH 53/82] Eat the jam, not the infected robot cells --- Items/Potions/AstralJelly.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Items/Potions/AstralJelly.cs b/Items/Potions/AstralJelly.cs index e4451a7c2d..a81d078260 100644 --- a/Items/Potions/AstralJelly.cs +++ b/Items/Potions/AstralJelly.cs @@ -26,15 +26,14 @@ namespace CalamityMod.Items.Potions item.UseSound = SoundID.Item3; item.consumable = true; item.value = Item.buyPrice(0, 4, 50, 0); - item.buffType = BuffID.WellFed; - item.buffTime = 108000; + item.buffType = BuffID.MagicPower; + item.buffTime = 21600; } public override void OnConsumeItem(Player player) { - player.AddBuff(BuffID.ManaRegeneration, 21600); player.AddBuff(BuffID.MagicPower, 21600); - player.AddBuff(BuffID.WellFed, 108000); + player.AddBuff(BuffID.ManaRegeneration, 21600); } } } From 18779a13047178ba278de21476b8ca5f132a20ea Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Wed, 4 Dec 2019 15:14:01 +0000 Subject: [PATCH 54/82] Plagued Fuel Pack --- CalPlayer/CalamityPlayer.cs | 46 +++++++++++++++ CalamityMod.cs | 3 + Items/Accessories/PlaguedFuelPack.cs | 35 +++++++++++ Items/Accessories/PlaguedFuelPack.png | Bin 0 -> 536 bytes Projectiles/Rogue/PlaguedFuelPackCloud.cs | 65 +++++++++++++++++++++ Projectiles/Rogue/PlaguedFuelPackCloud.png | Bin 0 -> 477 bytes 6 files changed, 149 insertions(+) create mode 100644 Items/Accessories/PlaguedFuelPack.cs create mode 100644 Items/Accessories/PlaguedFuelPack.png create mode 100644 Projectiles/Rogue/PlaguedFuelPackCloud.cs create mode 100644 Projectiles/Rogue/PlaguedFuelPackCloud.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4ea0c767c8..330294da96 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -407,6 +407,10 @@ namespace CalamityMod.CalPlayer public int sandCloakCooldown = 0; public bool spectralVeil = false; public int spectralVeilImmunity = 0; + public bool plaguedFuelPack = false; + public int plaguedFuelPackCooldown = 0; + public int plaguedFuelPackDash = 0; + public int plaguedFuelPackDirection = 0; // Armor Set public bool victideSet = false; @@ -1158,6 +1162,7 @@ namespace CalamityMod.CalPlayer filthyGlove = false; sandCloak = false; spectralVeil = false; + plaguedFuelPack = false; alcoholPoisoning = false; shadowflame = false; @@ -1405,6 +1410,9 @@ namespace CalamityMod.CalPlayer sulphurPoison = false; sandCloakCooldown = 0; spectralVeilImmunity = 0; + plaguedFuelPackCooldown = 0; + plaguedFuelPackDash = 0; + plaguedFuelPackDirection = 0; #endregion #region Rogue @@ -1948,6 +1956,16 @@ namespace CalamityMod.CalPlayer } } + if (CalamityMod.PlaguePackHotKey.JustPressed && plaguedFuelPack && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f && + wearingRogueArmor && player.Calamity().rogueStealthMax > 0 && plaguedFuelPackCooldown == 0 && !player.mount.Active) + { + plaguedFuelPackCooldown = 90; + plaguedFuelPackDash = 10; + plaguedFuelPackDirection = player.direction; + player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f; + Main.PlaySound(2, player.position, 66); + Main.PlaySound(2, player.position, 34); + } if (CalamityMod.BossBarToggleHotKey.JustPressed) { if (drawBossHPBar) @@ -3420,6 +3438,10 @@ namespace CalamityMod.CalPlayer sandCloakCooldown--; if (spectralVeilImmunity > 0) spectralVeilImmunity--; + if (plaguedFuelPackCooldown > 0) + plaguedFuelPackCooldown--; + if (plaguedFuelPackDash > 0) + plaguedFuelPackDash--; if (ataxiaDmg > 0f) ataxiaDmg -= 1.5f; if (ataxiaDmg < 0f) @@ -4046,6 +4068,30 @@ namespace CalamityMod.CalPlayer } } } + if (plaguedFuelPack && plaguedFuelPackDash > 0) + { + if (plaguedFuelPackDash > 1) + player.velocity = new Vector2(plaguedFuelPackDirection, -1) * 25; + else + player.velocity = new Vector2(plaguedFuelPackDirection, -1) * 5; + + int numClouds = Main.rand.Next(2, 10); + for (int i = 0; i < numClouds; i++) + { + Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); + cloudVelocity.Normalize(); + cloudVelocity *= Main.rand.NextFloat(0f, 1f); + int projectile = Projectile.NewProjectile(player.Center, cloudVelocity, ModContent.ProjectileType(), 20, 0, player.whoAmI, 0, 0); + Main.projectile[projectile].timeLeft = Main.rand.Next(75, 125); + } + for (int i = 0; i < 3; i++) + { + int dust = Dust.NewDust(player.Center, 1, 1, 89, player.velocity.X * -0.1f, player.velocity.Y * -0.1f, 100, default, 3.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.2f; + Main.dust[dust].velocity.Y -= 0.15f; + } + } #endregion #region StandingStillEffects diff --git a/CalamityMod.cs b/CalamityMod.cs index 6ea48f6040..2786a7b52d 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -103,6 +103,7 @@ namespace CalamityMod public static ModHotKey MomentumCapacitatorHotkey; public static ModHotKey SandCloakHotkey; public static ModHotKey SpectralVeilHotKey; + public static ModHotKey PlaguePackHotKey; // Boss Spawners public static int ghostKillCount = 0; @@ -205,6 +206,7 @@ namespace CalamityMod MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U"); SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C"); SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z"); + PlaguePackHotKey = RegisterHotKey("Plagued Fuel Pack Dash", "Q"); BossBarToggleHotKey = RegisterHotKey("Boss Health Bar Toggle", "NumPad0"); BossBarToggleSmallTextHotKey = RegisterHotKey("Boss Health Bar Small Text Toggle", "NumPad1"); @@ -297,6 +299,7 @@ namespace CalamityMod MomentumCapacitatorHotkey = null; SandCloakHotkey = null; SpectralVeilHotKey = null; + PlaguePackHotKey = null; BossBarToggleHotKey = null; BossBarToggleSmallTextHotKey = null; diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs new file mode 100644 index 0000000000..238b57cecf --- /dev/null +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -0,0 +1,35 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class PlaguedFuelPack : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Plagued Fuel Pack"); + Tooltip.SetDefault("*5 increased rogue damage\n" + + "15% increased rogue projectile velocity\n" + + "Press [Hotkey] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds\n" + + "This effect has a 3 second cooldown before it can be used again"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 36; + item.value = Item.buyPrice(0, 24, 0, 0); + item.rare = 8; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.Calamity().throwingDamage += 0.08f; + player.Calamity().throwingVelocity += 0.15f; + player.Calamity().plaguedFuelPack = true; + } + } +} diff --git a/Items/Accessories/PlaguedFuelPack.png b/Items/Accessories/PlaguedFuelPack.png new file mode 100644 index 0000000000000000000000000000000000000000..41549f5fcf4d395a1e216b30be04c1ec34bfacba GIT binary patch literal 536 zcmV+z0_XjSP)F@$ix%T>bE`Kd3SwHpGv)p}`SLsWoE%M$XYtJCXQlzP zp05Dt`Jt0g)BO{R%d>$SubrwgK0B@i?)!bh^l%D*$J?4hV%ix1N=GLEBnJlpsNdf! z4&KjaqaoDvc-H->-T25z;Kow995}zXd)W3BEn&t=DhpCGzxg$+R_YxhlxF2802s3S z0}tFe4FD>|(@(x4A=G0jLj#DV3>RQ+UB06U!2X^fy1p0!pyi01z06MnFj^G%G~U-s zG#aMuDf#RIJeaxg5~(N`NuwzFvfV2(8uqVXA_or%cxb`|OvVVIdq zIRHup5!D0R0$|jui^;SR(LMA}$f$zQaA8qo%+~geAn|g1-VtQ722?9`x4Rm4FUl`9 zk+ZRsp)9PdHkI*rQBDl>{nvWfCd^G+%7VX|Nb~<|K6DTr$`si#$a^Nu-`j+J!S53$ z(+SPf;>-RptU?jsO4v5_CmabVXQ6MmkS&X=QG7 aVRUJ4ZU8ZaSnTfr0000(), 300); + } + + public override void Kill(int timeLeft) + { + if (timeLeft != 0) + { + for (int i = 0; i < 5; i++) + { + int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 89, projectile.velocity.X * 0.4f, projectile.velocity.Y * 0.4f, 100, default, 3.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.2f; + Main.dust[dust].velocity.Y -= 0.15f; + } + } + } + } +} diff --git a/Projectiles/Rogue/PlaguedFuelPackCloud.png b/Projectiles/Rogue/PlaguedFuelPackCloud.png new file mode 100644 index 0000000000000000000000000000000000000000..1df6d88999c1b108427403b6c8705eebdab38e6b GIT binary patch literal 477 zcmV<30V4j1P)71Q{00006VoOIv0RI60 z0RN!9r;`8x0dz@3K~zY`#g;!$!ax{@pA(FYgqT2JU?8wDv*`qmEPentK8S-K#ElQo z#Zj1Kb7q4uI6&w^AXS4nT+j9{cb37lzomWuw0)nx@AWD;QQhGHfJXBG!27arwBZuK6z$V{!~6#)FX?oX^k04_?O`K-gDE8wm?Ffu*O3Ksk5DE-yeUI2XT#Y;{*{_k$wy6pi_uF3szySD$8m8$ZZ z-3DvCT$5j}?Ya<=O|*FCgg?vpoXAbQ;Bx=~01|XXSad~LNk%$Pa%p95bYXO9Z*BlF TgjnqF00000NkvXXu0mjfKxf-t literal 0 HcmV?d00001 From c1ca35afc10f065b281753b1c88a53fa6877c283 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Wed, 4 Dec 2019 22:04:31 +0000 Subject: [PATCH 55/82] Deep Wounder --- Items/Weapons/Rogue/DeepWounder.cs | 55 +++++++++++++ Items/Weapons/Rogue/DeepWounder.png | Bin 0 -> 823 bytes Projectiles/Rogue/DeepWounderProjectile.cs | 85 ++++++++++++++++++++ Projectiles/Rogue/DeepWounderProjectile.png | Bin 0 -> 823 bytes Projectiles/Rogue/DeepWounderWater.cs | 57 +++++++++++++ Projectiles/Rogue/DeepWounderWater.png | Bin 0 -> 259 bytes 6 files changed, 197 insertions(+) create mode 100644 Items/Weapons/Rogue/DeepWounder.cs create mode 100644 Items/Weapons/Rogue/DeepWounder.png create mode 100644 Projectiles/Rogue/DeepWounderProjectile.cs create mode 100644 Projectiles/Rogue/DeepWounderProjectile.png create mode 100644 Projectiles/Rogue/DeepWounderWater.cs create mode 100644 Projectiles/Rogue/DeepWounderWater.png diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs new file mode 100644 index 0000000000..5493ed4de2 --- /dev/null +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -0,0 +1,55 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class DeepWounder : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Deep Wounder"); + Tooltip.SetDefault("Throws an abyssal hatchet that inflicts Armor Crunch and Marked for Death to the enemies it hits\n" + + "Stealth strikes cause the hatchet to be thrown faster and trail water, inflicting Crush Depth in addition to the other debuffs"); + } + + public override void SafeSetDefaults() + { + item.width = 52; + item.damage = 200; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 35; + item.useStyle = 1; + item.useTime = 35; + item.knockBack = 3f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 48; + item.maxStack = 1; + item.rare = 8; + item.value = Item.buyPrice(0, 60, 0, 0); + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) + { + float stealthSpeedMult = 1.5f; + Vector2 velocity = new Vector2(speedX, speedY); + velocity.Normalize(); + velocity *= item.shootSpeed * stealthSpeedMult; + + int p = Projectile.NewProjectile(position.X, position.Y, velocity.X, velocity.Y, type, damage, knockBack, player.whoAmI, 0f, 1f); + Main.projectile[p].Calamity().stealthStrike = true; + return false; + } + return true; + } + } +} diff --git a/Items/Weapons/Rogue/DeepWounder.png b/Items/Weapons/Rogue/DeepWounder.png new file mode 100644 index 0000000000000000000000000000000000000000..0212f6a971cfd8dad7ecf8d0fba7d3a9e090a47f GIT binary patch literal 823 zcmV-71IYY|P)1pK3H-P|57z5euNCIDE|>>sw$tZnoc*p;+sWize0$h^{QKB)A(Q|HbCaQD{j z$ard~UiKe49J!u-KckN!K<{Zco*x{K%(I5uwq+yZOH75}p`l>;k4T1A+OBYrZ3iIN z*9E}v)jN@K&2Q~=^Ol$e;QYl40Nl884e-#=UyC7;>B~i~-;7Nyd~$}YLCe8@7i*73 z#{W2;8mblTFUn%#^V<>t8@n<96btii{(`~MXuhuROARGOW;V2KiQHGrY(Lr)xi4eN zcBN5wKQ6oJz9ltOD~b^r5FOcd06ZIb0Q{c)EXr=vuL}Tl?R42N|MWQk^FO`=siFG$ zHth^4c9hjDGG>t(k=xe`lq-bvJX9+>&je$o5MX`xZlD}H`O)dfd>dmnyXiVEc7%6^ z8dh!F>e^;8oqK|x&P-elXUzzmR24hIJ3}iLL;XDmLVy<^i$M8=YIk^?KDkVR%r?%4!D%Z~2I_=k6H|Hx3e60o(I?dFI$Ga@x4tQm2<Db<8|1H4(V936wiK~X6+;=sZveNKmN1}bE(fDsjeiolILj zi)Ljti@$~z-(8+L0l-ATRmrxKsp@&TJ9?w=*N{bhv|_<^KJ}(8oKu%&hSi9FhHQ66 z9m-wp&dlS59)Pl5@!_jx|K^JLXGkCHnO>DZY4OC#s;C62;hmu%?tgJs>poKr?+pC{ z4BHGj7_1B70000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1f^b BgYEzT literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/DeepWounderProjectile.cs b/Projectiles/Rogue/DeepWounderProjectile.cs new file mode 100644 index 0000000000..ac761e3c26 --- /dev/null +++ b/Projectiles/Rogue/DeepWounderProjectile.cs @@ -0,0 +1,85 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class DeepWounderProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Deep Wounder Projectile"); + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.rotation += 0.2f * projectile.direction; + + if (projectile.Calamity().stealthStrike) + { + int spriteWidth = 52; + int spriteHeight = 48; + Vector2 spriteCenter = projectile.Center - new Vector2(spriteWidth / 2, spriteHeight / 2); + + for (int i = 0; i < 30; i++) + { + int dust = Dust.NewDust(spriteCenter, spriteWidth, spriteHeight, 33, projectile.velocity.X * 0.1f, projectile.velocity.Y * 0.1f, 0, default, 1f); + Main.dust[dust].noGravity = true; + } + + if (Main.rand.NextBool(5)) + { + Vector2 waterVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); + waterVelocity.Normalize(); + waterVelocity *= 3; + Projectile.NewProjectile(spriteCenter, waterVelocity, ModContent.ProjectileType(), 20, 1, projectile.owner, 0, 0); + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + if (projectile.Calamity().stealthStrike) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.direction > 0) + { + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + } + else + { + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.FlipHorizontally, 0f); + } + return false; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + } +} diff --git a/Projectiles/Rogue/DeepWounderProjectile.png b/Projectiles/Rogue/DeepWounderProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..0212f6a971cfd8dad7ecf8d0fba7d3a9e090a47f GIT binary patch literal 823 zcmV-71IYY|P)1pK3H-P|57z5euNCIDE|>>sw$tZnoc*p;+sWize0$h^{QKB)A(Q|HbCaQD{j z$ard~UiKe49J!u-KckN!K<{Zco*x{K%(I5uwq+yZOH75}p`l>;k4T1A+OBYrZ3iIN z*9E}v)jN@K&2Q~=^Ol$e;QYl40Nl884e-#=UyC7;>B~i~-;7Nyd~$}YLCe8@7i*73 z#{W2;8mblTFUn%#^V<>t8@n<96btii{(`~MXuhuROARGOW;V2KiQHGrY(Lr)xi4eN zcBN5wKQ6oJz9ltOD~b^r5FOcd06ZIb0Q{c)EXr=vuL}Tl?R42N|MWQk^FO`=siFG$ zHth^4c9hjDGG>t(k=xe`lq-bvJX9+>&je$o5MX`xZlD}H`O)dfd>dmnyXiVEc7%6^ z8dh!F>e^;8oqK|x&P-elXUzzmR24hIJ3}iLL;XDmLVy<^i$M8=YIk^?KDkVR%r?%4!D%Z~2I_=k6H|Hx3e60o(I?dFI$Ga@x4tQm2<Db<8|1H4(V936wiK~X6+;=sZveNKmN1}bE(fDsjeiolILj zi)Ljti@$~z-(8+L0l-ATRmrxKsp@&TJ9?w=*N{bhv|_<^KJ}(8oKu%&hSi9FhHQ66 z9m-wp&dlS59)Pl5@!_jx|K^JLXGkCHnO>DZY4OC#s;C62;hmu%?tgJs>poKr?+pC{ z4BHGj7_1B70000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1f^b BgYEzT literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/DeepWounderWater.cs b/Projectiles/Rogue/DeepWounderWater.cs new file mode 100644 index 0000000000..bd36f500e3 --- /dev/null +++ b/Projectiles/Rogue/DeepWounderWater.cs @@ -0,0 +1,57 @@ + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class DeepWounderWater : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Water Droplet"); + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 50; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + for (int i = 0; i < 5; i++) + { + int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, projectile.velocity.X, projectile.velocity.Y); + Main.dust[dust].noGravity = true; + } + + projectile.rotation += 0.2f; + + projectile.velocity.Y += 0.2f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + projectile.Kill(); + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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/Rogue/DeepWounderWater.png b/Projectiles/Rogue/DeepWounderWater.png new file mode 100644 index 0000000000000000000000000000000000000000..86fe129183beb51d556754d9a0ea7d5292394562 GIT binary patch literal 259 zcmV+e0sQ`nP)Px#y-7qtR49?1(J@K`VH5=5@0aa_EjGm#DK?eWf|4pkNaYPu=^0Xr2k;Qy!D|R< z141gRY!PsaqzJZgEzF;|cAIJ5V;E+J_d+i(LE6v2ZoO^%!KPjY$crJk&;fO|kVNP2 zy#~tZs3ls>vj(d7x6nBOlGr&q&t`Yv`RNr5Zm+=C=dZ4N!hhoN{soL5Zd&~EFgquN zxD?luhEwN=)%*iorpb9%3VAV9SBoRj%gffM(|#6Ux86D{;Ro!0Ew7b4JpBLw002ov JPDHLkV1iZHZp;7x literal 0 HcmV?d00001 From c84ce03ef6103c3f5a97291beeb6bd52826295d8 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Wed, 4 Dec 2019 22:48:30 +0000 Subject: [PATCH 56/82] Hopefully this fixes the deep wounder ground deletion issue --- Projectiles/Rogue/DeepWounderProjectile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/DeepWounderProjectile.cs b/Projectiles/Rogue/DeepWounderProjectile.cs index ac761e3c26..74f0f8e029 100644 --- a/Projectiles/Rogue/DeepWounderProjectile.cs +++ b/Projectiles/Rogue/DeepWounderProjectile.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 30; - projectile.height = 30; + projectile.width = 20; + projectile.height = 20; projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft = 600; From 44b84af5c1620c0766e540eeceafe48828736d01 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 4 Dec 2019 19:46:04 -0500 Subject: [PATCH 57/82] weapon balancing --- Items/Accessories/Wings/SoulofCryogen.cs | 1 + Items/CalamityGlobalItem.cs | 5 +++++ Items/Weapons/Rogue/AshenStalactite.cs | 2 +- Items/Weapons/Rogue/HardenedHoneycomb.cs | 4 ++-- Items/Weapons/Rogue/StickySpikyBall.cs | 2 +- NPCs/CalamityGlobalNPCLoot.cs | 4 ++++ Projectiles/Rogue/PhantasmalRuinProj.cs | 8 ++++---- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index dc3e858619..44e1e470fd 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -61,6 +61,7 @@ namespace CalamityMod.Items.Accessories.Wings player.pickSpeed -= 0.05f; player.allDamage += 0.05f; player.wingTimeMax = 100; + player.noFallDmg = true; } } } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 8fdf03046d..a057ed5469 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1923,6 +1923,11 @@ Grants immunity to fire blocks, and temporary immunity to lava"; DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); break; + // Queen Bee + case ItemID.QueenBeeBossBag: + DropHelper.DropItem(player, ModContent.ItemType(), 50, 75); + break; + // Skeletron case ItemID.SkeletronBossBag: DropHelper.DropItemChance(player, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs index 3be2413dfb..759157b709 100644 --- a/Items/Weapons/Rogue/AshenStalactite.cs +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue { int stealthType = ModContent.ProjectileType(); float stealthSpeedMult = 0.6f; - float stealthDamageMult = 1.5f; + float stealthDamageMult = 1.2f; float stealthKnockbackMult = 2.5f; int p = Projectile.NewProjectile(position.X, position.Y, speedX * stealthSpeedMult, speedY * stealthSpeedMult, stealthType, (int)(damage * stealthDamageMult), (int)(knockBack * stealthKnockbackMult), player.whoAmI, 0f, 1f); Main.projectile[p].Calamity().stealthStrike = true; diff --git a/Items/Weapons/Rogue/HardenedHoneycomb.cs b/Items/Weapons/Rogue/HardenedHoneycomb.cs index 44a8eb5287..bd004f53b3 100644 --- a/Items/Weapons/Rogue/HardenedHoneycomb.cs +++ b/Items/Weapons/Rogue/HardenedHoneycomb.cs @@ -50,7 +50,7 @@ Stealth strikes can bounce off walls and enemies"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Hive); @@ -59,6 +59,6 @@ Stealth strikes can bounce off walls and enemies"); recipe.AddTile(TileID.Anvils); recipe.SetResult(this, 5); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index 5915e0bf65..3f8480a2bd 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -19,7 +19,7 @@ Stealth strikes throw seven at once and last a lot longer"); public override void SafeSetDefaults() { item.width = 14; - item.damage = 20; + item.damage = 12; item.noMelee = true; item.noUseGraphic = true; item.maxStack = 999; diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 3c7d3b7b7f..aa6e40f50d 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1590,6 +1590,10 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ModContent.ItemType(), !Main.expertMode, 5, 1, 1); break; + case NPCID.QueenBee: + DropHelper.DropItemCondition(npc, ModContent.ItemType(), !Main.expertMode, 30, 50); + break; + case NPCID.DevourerHead: case NPCID.SeekerHead: DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 2 : 3); diff --git a/Projectiles/Rogue/PhantasmalRuinProj.cs b/Projectiles/Rogue/PhantasmalRuinProj.cs index 4a9afbf038..ceccfe47a1 100644 --- a/Projectiles/Rogue/PhantasmalRuinProj.cs +++ b/Projectiles/Rogue/PhantasmalRuinProj.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.75), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); } else { @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue double deltaAngle = spread / 8f; double offsetAngle; int i; - if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 16) + if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 8) { for (i = 0; i < 8; i++) { @@ -79,8 +79,8 @@ namespace CalamityMod.Projectiles.Rogue float randomSpeed = (float)Main.rand.Next(1, 7); float randomSpeed2 = (float)Main.rand.Next(1, 7); offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int num23 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1), 0f, projectile.owner, 1f, ai1); - int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1), 0f, projectile.owner, 1f, ai1); + int num23 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.05), 0f, projectile.owner, 1f, ai1); + int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.05), 0f, projectile.owner, 1f, ai1); } } } From 1afae05d3f0b925341e825b8f111aed788fcd1fb Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 4 Dec 2019 19:46:54 -0500 Subject: [PATCH 58/82] added desecrated water (unobtainable) --- CalamityMod.cs | 4 +- Items/Weapons/Rogue/DesecratedWater.cs | 62 ++++++++++++ Items/Weapons/Rogue/DesecratedWater.png | Bin 0 -> 593 bytes Projectiles/Rogue/DesecratedBubble.cs | 115 ++++++++++++++++++++++ Projectiles/Rogue/DesecratedBubble.png | Bin 0 -> 377 bytes Projectiles/Rogue/DesecratedWaterProj.cs | 62 ++++++++++++ Projectiles/Rogue/DesecratedWaterProj.png | Bin 0 -> 593 bytes 7 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 Items/Weapons/Rogue/DesecratedWater.cs create mode 100644 Items/Weapons/Rogue/DesecratedWater.png create mode 100644 Projectiles/Rogue/DesecratedBubble.cs create mode 100644 Projectiles/Rogue/DesecratedBubble.png create mode 100644 Projectiles/Rogue/DesecratedWaterProj.cs create mode 100644 Projectiles/Rogue/DesecratedWaterProj.png diff --git a/CalamityMod.cs b/CalamityMod.cs index ad0cad838b..fd8ac59385 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1929,6 +1929,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() @@ -1944,7 +1945,8 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType() }; spikyBallList = new List() diff --git a/Items/Weapons/Rogue/DesecratedWater.cs b/Items/Weapons/Rogue/DesecratedWater.cs new file mode 100644 index 0000000000..41dbdaa29e --- /dev/null +++ b/Items/Weapons/Rogue/DesecratedWater.cs @@ -0,0 +1,62 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class DesecratedWater : RogueWeapon + { + public const int BaseDamage = 55; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Desecrated Water"); + Tooltip.SetDefault(@"Throws an unholy flask of water that explodes into an explosion of bubbles on death +Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno"); + } + + public override void SafeSetDefaults() + { + item.damage = BaseDamage; + item.width = 22; + item.height = 24; + item.useAnimation = 29; + item.useTime = 29; + item.noMelee = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.SwingThrow; + item.knockBack = 4.5f; + item.rare = 6; + item.UseSound = SoundID.Item106; + item.autoReuse = true; + item.value = Item.buyPrice(gold: 48); //sell price of 9 gold 60 silver + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 12f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddRecipeGroup("AnyEvilWater", 100); //make sure to add to CalamityRecipes.cs + recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddRecipeGroup("CursedFlameIchor", 5); + recipe.AddIngredient(ItemID.SoulofLight, 7); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/DesecratedWater.png b/Items/Weapons/Rogue/DesecratedWater.png new file mode 100644 index 0000000000000000000000000000000000000000..e9fbc43d8cb04a33cb2911384e17577930b85668 GIT binary patch literal 593 zcmV-X0b* z833%X1wbqs0pOz3u`$F#DkT7Z53T_ij)nlVdo2J0coZQeeUeTAaNd?e%aY=kt1HGA z4=YuBTAGL@#PqsnVxh!5pVTV1IsFx@C@mHNXtbLEe9OcE*l1m8@+qm$ z;$SccKq4k(m%XlSlDnm<8V17w0F%iC&&Ar^CLhasepW01&}{YYO`uM4+3jfa-izJ! zo6S4odR3EWGxPVJMBTl2z2dHgql0}-s74j;DshK*cf9y?34m_Duhp$vrmEzwo}unG zYDFHXSEzd4O1}r-bNe0eZ_jYoFTVAP$fLL#ZGcyqH`>M*!H>oSn~gC5*Ed(f8Szvc zQeV|VK4;ueEF}ThJxTyj4)=}w)QQi|YaWYdZTNKj1Auksd3Pk`cIdS;^TGI@|6)}I z-~UMKPN1x3|HLbn5CEHvu?_GwH>b&ePNeutOIE{D zxFi5hM<@P>g?plqUsiGe_J+3c|JW_9)_?gU{tJI`r@h_MQl|g_01|XXSad~LNk%$P fa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjfK#~pB literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/DesecratedBubble.cs b/Projectiles/Rogue/DesecratedBubble.cs new file mode 100644 index 0000000000..4e8c86ecb1 --- /dev/null +++ b/Projectiles/Rogue/DesecratedBubble.cs @@ -0,0 +1,115 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class DesecratedBubble : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bubble"); + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.penetrate = 1; + projectile.alpha = 255; + projectile.timeLeft = 120; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.scale += 0.002f; + if (projectile.alpha <= 0) + { + projectile.alpha = 0; + } + else if (projectile.alpha > 50) + { + projectile.alpha -= 20; + } + if (projectile.timeLeft <= 100) + { + projectile.ai[1] = 0f; + } + else + { + projectile.velocity *= 0.995f; + } + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) + { + if (projectile.ai[1] == 0f) + { + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 600f; + bool flag17 = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 8f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + } + } + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 54); + int num190 = Main.rand.Next(5, 9); + for (int num191 = 0; num191 < num190; num191++) + { + int num192 = Dust.NewDust(projectile.Center, 0, 0, 179, 0f, 0f, 100, default, 1.4f); + Main.dust[num192].velocity *= 0.8f; + Main.dust[num192].position = Vector2.Lerp(Main.dust[num192].position, projectile.Center, 0.5f); + Main.dust[num192].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.ai[0] == 1f) + { + target.AddBuff(BuffID.Ichor, 180); + target.AddBuff(BuffID.CursedInferno, 180); + } + } + + // Cannot deal damage for the first several frames of existence. + public override bool CanDamage() + { + return projectile.timeLeft < 100; + } + } +} \ No newline at end of file diff --git a/Projectiles/Rogue/DesecratedBubble.png b/Projectiles/Rogue/DesecratedBubble.png new file mode 100644 index 0000000000000000000000000000000000000000..75961e87700da2782421e846744edaaf886ff139 GIT binary patch literal 377 zcmV-<0fzpGP)dKHU#v@*Fl)y{*eD}vWS20)V_zHl)&jZlY-5DF? z`B?=p)nfqauQdQ1b}W@dc71efTzvj+80+Dn4M1`4Qvo!;(sl^lB(l@Of%%kH2te7N z#2Y8^Q0eDp%cNF3+(`D)85!&I)ZN-Zm442ShrbRO>I|XI>@MIoxk(4B-bo!^E|LBX zVG^0>$teSH;hX`WqI=7PfuC0Z)wc(u9v7MCL?R&*J-+V)5O|TjPKh(D^z_Z)$6D`1 z^4rJ@d%A1KLnV_1sTakhQ}=)T*gq~AUF{ikG2#FK01|XXSad~LNk%$Pa%p95bYXO9 XZ*BlFgjnqF00000NkvXXu0mjfv?ZRT literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/DesecratedWaterProj.cs b/Projectiles/Rogue/DesecratedWaterProj.cs new file mode 100644 index 0000000000..36e46ac15d --- /dev/null +++ b/Projectiles/Rogue/DesecratedWaterProj.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class DesecratedWaterProj : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Desecrated Water"); + } + + public override void SetDefaults() + { + projectile.width = 25; + projectile.height = 25; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.aiStyle = 2; + projectile.timeLeft = 300; + aiType = 48; + projectile.Calamity().rogue = true; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(13, (int) projectile.position.X, (int) projectile.position.Y, 1, 1f, 0.0f); + Vector2 vector2 = new Vector2(20f, 20f); + for (int index = 0; index < 10; ++index) + Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 191, 0.0f, 0.0f); + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 179, 0.0f, 0.0f, 100, new Color(), 2.5f); + Main.dust[index2].noGravity = true; + Dust dust1 = Main.dust[index2]; + dust1.velocity = dust1.velocity * 5f; + int index3 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 179, 0.0f, 0.0f, 100, new Color(), 1.5f); + Dust dust2 = Main.dust[index3]; + dust2.velocity = dust2.velocity * 3f; + } + int num220 = (projectile.Calamity().stealthStrike ? Main.rand.Next(10, 16) : Main.rand.Next(5, 11)); + if (projectile.owner == Main.myPlayer) + { + for (int num221 = 0; num221 < num220; num221++) + { + Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + value17.Normalize(); + value17 *= (float)Main.rand.Next(10, 201) * 0.01f; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, (projectile.Calamity().stealthStrike ? 1f : 0f), 1f); + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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/Rogue/DesecratedWaterProj.png b/Projectiles/Rogue/DesecratedWaterProj.png new file mode 100644 index 0000000000000000000000000000000000000000..e9fbc43d8cb04a33cb2911384e17577930b85668 GIT binary patch literal 593 zcmV-X0b* z833%X1wbqs0pOz3u`$F#DkT7Z53T_ij)nlVdo2J0coZQeeUeTAaNd?e%aY=kt1HGA z4=YuBTAGL@#PqsnVxh!5pVTV1IsFx@C@mHNXtbLEe9OcE*l1m8@+qm$ z;$SccKq4k(m%XlSlDnm<8V17w0F%iC&&Ar^CLhasepW01&}{YYO`uM4+3jfa-izJ! zo6S4odR3EWGxPVJMBTl2z2dHgql0}-s74j;DshK*cf9y?34m_Duhp$vrmEzwo}unG zYDFHXSEzd4O1}r-bNe0eZ_jYoFTVAP$fLL#ZGcyqH`>M*!H>oSn~gC5*Ed(f8Szvc zQeV|VK4;ueEF}ThJxTyj4)=}w)QQi|YaWYdZTNKj1Auksd3Pk`cIdS;^TGI@|6)}I z-~UMKPN1x3|HLbn5CEHvu?_GwH>b&ePNeutOIE{D zxFi5hM<@P>g?plqUsiGe_J+3c|JW_9)_?gU{tJI`r@h_MQl|g_01|XXSad~LNk%$P fa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjfK#~pB literal 0 HcmV?d00001 From b2cdc5c3073604e93cd86ab66459fa73e50b88d8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 4 Dec 2019 21:19:35 -0500 Subject: [PATCH 59/82] slush gets converted to novae slag --- World/WorldGenerationMethods.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index da10bf1360..e3dd921a67 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1723,6 +1723,7 @@ namespace CalamityMod.World Main.tile[x, y].type = (ushort)ModContent.TileType(); break; case TileID.Silt: + case TileID.Slush: Main.tile[x, y].type = (ushort)ModContent.TileType(); break; case TileID.DesertFossil: From 7c5bd3d1de74d813ab20b77dcf4796b9df023d8a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 5 Dec 2019 18:44:54 -0500 Subject: [PATCH 60/82] made shit obtainable & weapon balancing --- Items/Weapons/Rogue/AshenStalactite.cs | 2 +- Items/Weapons/Rogue/Celestus.cs | 2 +- Items/Weapons/Rogue/DeepWounder.cs | 4 ++-- Items/Weapons/Rogue/Equanimity.cs | 4 ++-- Items/Weapons/Rogue/PhantasmalRuin.cs | 4 ++-- Items/Weapons/Rogue/StickySpikyBall.cs | 4 ++-- Projectiles/Melee/Spears/InsidiousImpalerProj.cs | 2 +- Projectiles/Rogue/DesecratedWaterProj.cs | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs index 759157b709..30cbc72856 100644 --- a/Items/Weapons/Rogue/AshenStalactite.cs +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue { int stealthType = ModContent.ProjectileType(); float stealthSpeedMult = 0.6f; - float stealthDamageMult = 1.2f; + float stealthDamageMult = 1.15f; float stealthKnockbackMult = 2.5f; int p = Projectile.NewProjectile(position.X, position.Y, speedX * stealthSpeedMult, speedY * stealthSpeedMult, stealthType, (int)(damage * stealthDamageMult), (int)(knockBack * stealthKnockbackMult), player.whoAmI, 0f, 1f); Main.projectile[p].Calamity().stealthStrike = true; diff --git a/Items/Weapons/Rogue/Celestus.cs b/Items/Weapons/Rogue/Celestus.cs index 36470ea2e8..8a162dd099 100644 --- a/Items/Weapons/Rogue/Celestus.cs +++ b/Items/Weapons/Rogue/Celestus.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs index 5493ed4de2..948d800fff 100644 --- a/Items/Weapons/Rogue/DeepWounder.cs +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 52; - item.damage = 200; + item.damage = 165; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 35; @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.rare = 8; item.value = Item.buyPrice(0, 60, 0, 0); item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 10f; + item.shootSpeed = 14f; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/Equanimity.cs b/Items/Weapons/Rogue/Equanimity.cs index d9116c7e0e..0aa723e108 100644 --- a/Items/Weapons/Rogue/Equanimity.cs +++ b/Items/Weapons/Rogue/Equanimity.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Rogue return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.EnchantedBoomerang); @@ -64,6 +64,6 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index 6bdcf73686..b1a48225a6 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -52,7 +52,7 @@ Stealth strikes summon ghost clones instead of lost souls"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); @@ -62,6 +62,6 @@ Stealth strikes summon ghost clones instead of lost souls"); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index 3f8480a2bd..e3a3c32131 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -55,7 +55,7 @@ Stealth strikes throw seven at once and last a lot longer"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpikyBall, 3); @@ -63,6 +63,6 @@ Stealth strikes throw seven at once and last a lot longer"); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(this, 3); recipe.AddRecipe(); - }*/ + } } } diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs index eaf23a7c08..3dbcb06ff6 100644 --- a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs +++ b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Melee.Spears { projectile.localAI[0] = 1f; Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y, - projectile.velocity.X * 2.4f, projectile.velocity.Y * 2.4f, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); + projectile.velocity.X * 2.4f, projectile.velocity.Y * 2.4f, ModContent.ProjectileType(), (int)(projectile.damage * 0.75), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); } } else diff --git a/Projectiles/Rogue/DesecratedWaterProj.cs b/Projectiles/Rogue/DesecratedWaterProj.cs index 36e46ac15d..25e32ea4af 100644 --- a/Projectiles/Rogue/DesecratedWaterProj.cs +++ b/Projectiles/Rogue/DesecratedWaterProj.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); value17.Normalize(); value17 *= (float)Main.rand.Next(10, 201) * 0.01f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, (projectile.Calamity().stealthStrike ? 1f : 0f), 1f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.7), 1f, projectile.owner, (projectile.Calamity().stealthStrike ? 1f : 0f), 1f); } } } From 91f8f9a5872e3fd8dffd78905332f86be43f32a1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 5 Dec 2019 21:10:19 -0500 Subject: [PATCH 61/82] added frostcrush valari (unobtainable) --- CalamityMod.cs | 9 +- Items/Weapons/Rogue/FrostcrushValari.cs | 82 +++++++++++ Items/Weapons/Rogue/FrostcrushValari.png | Bin 0 -> 892 bytes Projectiles/Rogue/KylieBoomerang.cs | 1 + Projectiles/Rogue/ValariBoomerang.cs | 172 +++++++++++++++++++++++ Projectiles/Rogue/ValariBoomerang.png | Bin 0 -> 892 bytes Projectiles/Rogue/Valaricicle.cs | 49 +++++++ Projectiles/Rogue/Valaricicle.png | Bin 0 -> 388 bytes Projectiles/Rogue/Valaricicle2.cs | 49 +++++++ Projectiles/Rogue/Valaricicle2.png | Bin 0 -> 364 bytes 10 files changed, 359 insertions(+), 3 deletions(-) create mode 100644 Items/Weapons/Rogue/FrostcrushValari.cs create mode 100644 Items/Weapons/Rogue/FrostcrushValari.png create mode 100644 Projectiles/Rogue/ValariBoomerang.cs create mode 100644 Projectiles/Rogue/ValariBoomerang.png create mode 100644 Projectiles/Rogue/Valaricicle.cs create mode 100644 Projectiles/Rogue/Valaricicle.png create mode 100644 Projectiles/Rogue/Valaricicle2.cs create mode 100644 Projectiles/Rogue/Valaricicle2.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 6bba7d3f4f..4ae432a045 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -907,6 +907,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), //Cryonic Bar set stuff, could potentially be removed ModContent.ItemType(), ModContent.ItemType(), @@ -1777,7 +1778,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; boomerangProjList = new List() @@ -1809,7 +1811,8 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType() }; javelinList = new List() @@ -1884,7 +1887,7 @@ namespace CalamityMod ModContent.ItemType() }; - boomerangProjList = new List() + daggerProjList = new List() { ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs new file mode 100644 index 0000000000..b8a779b998 --- /dev/null +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -0,0 +1,82 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class FrostcrushValari : RogueWeapon + { + public static float Speed = 15f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Frostcrush Valari"); + Tooltip.SetDefault(@"Fires a long ranged boomerang that explodes into icicles on hit +Stealth strikes throws three short ranged boomerangs along with a spread of icicles"); + } + + public override void SafeSetDefaults() + { + item.damage = 120; + item.knockBack = 12; + item.thrown = true; + item.crit = 16; + item.value = Item.buyPrice(0, 60, 0, 0); + item.rare = 7; + item.useTime = 19; + item.useAnimation = 19; + item.width = 32; + item.height = 46; + item.useStyle = 1; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.shootSpeed = Speed; + item.shoot = ModContent.ProjectileType(); + item.noMelee = true; + item.noUseGraphic = true; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity(); + //If stealth is full, shoot a spread of 3 boomerangs with reduced range and 6 to 10 icicles + if (modPlayer.StealthStrikeAvailable()) + { + int spread = 10; + for (int i = 0; i < 3; i++) + { + Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread)); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 1f); + Main.projectile[proj].Calamity().stealthStrike = true; + spread -= 10; + } + int spread2 = 3; + for (int i = 0; i < Main.rand.Next(6,11); i++) + { + Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread2)); + Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, (Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType()), damage / 2, 0f, player.whoAmI, 0f, 0f); + spread2 -= Main.rand.Next(1,4); + } + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 40); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/FrostcrushValari.png b/Items/Weapons/Rogue/FrostcrushValari.png new file mode 100644 index 0000000000000000000000000000000000000000..1dd40a54e710451544f125c967fdb2186bda9978 GIT binary patch literal 892 zcmV-?1B3jDP))0k}GL2Y{hdM*tYT|HdJv zt0gsh^CVDQ)tWy$K}rZp@294MFfpr%*Iyk1B6{Q6J%>=GN)JJ4eE630+4etqOJ1}q zjrC$VvZ*5I^vs_A(*WeAC!ICfdeQblUq8%EPZn+lT;j(ST~tT@g1c5jlcYI)0-8!d6I!7ZIflaXes*^^lML70Hl)^j5AVPCSA*1vrM5uk(O}4cOfFGYf?y1V9#O_I|@gM*V*;c2TcR+e`qV11b+f}vpgdz3> zYjHMHa)0dGlgNuJi*wGq{J&>2mXy4wt5S~UiCkS{a|U30Ya{YYQcV!>drws>sn6N9 zTIAAy!m1S0kUa!IXWubkHy1v7`T*GVnxsA#S|Mx-imYBKeFQPpYds~|R8#J|5=+oq z#UWw= ReboundTime) + { + projectile.ai[0] = 1f; + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + } + else + { + projectile.tileCollide = false; + float returnSpeed = FrostcrushValari.Speed * 1.5f; + float acceleration = 3.2f; + Player owner = Main.player[projectile.owner]; + + // Delete the boomerang if it's excessively far away. + Vector2 playerCenter = owner.Center; + float xDist = playerCenter.X - projectile.Center.X; + float yDist = playerCenter.Y - projectile.Center.Y; + float dist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); + if (dist > 3000f) + projectile.Kill(); + + dist = returnSpeed / dist; + xDist *= dist; + yDist *= dist; + + // Home back in on the player. + if (projectile.velocity.X < xDist) + { + projectile.velocity.X = projectile.velocity.X + acceleration; + if (projectile.velocity.X < 0f && xDist > 0f) + projectile.velocity.X += acceleration; + } + else if (projectile.velocity.X > xDist) + { + projectile.velocity.X = projectile.velocity.X - acceleration; + if (projectile.velocity.X > 0f && xDist < 0f) + projectile.velocity.X -= acceleration; + } + if (projectile.velocity.Y < yDist) + { + projectile.velocity.Y = projectile.velocity.Y + acceleration; + if (projectile.velocity.Y < 0f && yDist > 0f) + projectile.velocity.Y += acceleration; + } + else if (projectile.velocity.Y > yDist) + { + projectile.velocity.Y = projectile.velocity.Y - acceleration; + if (projectile.velocity.Y > 0f && yDist < 0f) + projectile.velocity.Y -= acceleration; + } + + + // Delete the projectile if it touches its owner. + if (Main.myPlayer == projectile.owner) + if (projectile.Hitbox.Intersects(owner.Hitbox)) + projectile.Kill(); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + //Start homing at player if you hit an enemy + projectile.ai[0] = 1; + + int num251 = Main.rand.Next(2, 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; + int shard = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, (Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType()), projectile.damage / 3, 0f, projectile.owner, 0f, 0f); + } + } + + target.AddBuff(BuffID.Frostburn, 240); + target.AddBuff(ModContent.BuffType(), 240); + if (Main.rand.NextBool(5)) + target.AddBuff(ModContent.BuffType(), 60); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + //Bounce off tiles and start homing on player if it hits a tile + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + projectile.ai[0] = 1; + return false; + } + } +} diff --git a/Projectiles/Rogue/ValariBoomerang.png b/Projectiles/Rogue/ValariBoomerang.png new file mode 100644 index 0000000000000000000000000000000000000000..1dd40a54e710451544f125c967fdb2186bda9978 GIT binary patch literal 892 zcmV-?1B3jDP))0k}GL2Y{hdM*tYT|HdJv zt0gsh^CVDQ)tWy$K}rZp@294MFfpr%*Iyk1B6{Q6J%>=GN)JJ4eE630+4etqOJ1}q zjrC$VvZ*5I^vs_A(*WeAC!ICfdeQblUq8%EPZn+lT;j(ST~tT@g1c5jlcYI)0-8!d6I!7ZIflaXes*^^lML70Hl)^j5AVPCSA*1vrM5uk(O}4cOfFGYf?y1V9#O_I|@gM*V*;c2TcR+e`qV11b+f}vpgdz3> zYjHMHa)0dGlgNuJi*wGq{J&>2mXy4wt5S~UiCkS{a|U30Ya{YYQcV!>drws>sn6N9 zTIAAy!m1S0kUa!IXWubkHy1v7`T*GVnxsA#S|Mx-imYBKeFQPpYds~|R8#J|5=+oq z#UWw&rW!&P{`}X zJp15{>c=>!to6cbsm>(=MMz>PN>8+0*E}_to(~IQ}ap^ aOEUBG7z|q?-n<9OGI+ZBxvXNn{1`8H>WEU80*8_m%i{zdvFk_nDO7NW zbsJnrn6v$X>WUkCSQaZ7%?Lauu%}7#S>xQqn;&!U^WXpcm-BYXPc6m8`%*a@etcwl zuqB=`V9|n8mB+8dGZ)->Bh>J1gEqr49aGM=j{FT898(XZ82@-bWv1qpB$j06=P?+zM7((qlx6UA^>bP0l+XkK DtM-Y& literal 0 HcmV?d00001 From cee4281f58aae7e24aa5e2a8195d476d26df963d Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 5 Dec 2019 22:33:25 -0500 Subject: [PATCH 62/82] dynamo stem cell balancing --- Items/CalamityGlobalItem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index a057ed5469..7d0d8d81a5 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -290,9 +290,14 @@ namespace CalamityMod.Items { if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 80) { + double damageMult = 1.0; + damageMult = (double)(item.useTime) / 30.0; + + double newDamage = (double)damage * 2 * damageMult; + if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, ModContent.ProjectileType(), (int)((double)damage * 2), 2f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, ModContent.ProjectileType(), (int)newDamage, 2f, player.whoAmI, 0f, 0f); } } } From ea20c4d6ecde34e843cdb2ba8d5ad18beae4d7c4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 6 Dec 2019 15:45:48 -0500 Subject: [PATCH 63/82] more balancing, made desecrated water & ashen stalactite obtainable --- Items/Weapons/Rogue/DeepWounder.cs | 6 +++--- Items/Weapons/Rogue/DesecratedWater.cs | 6 +++--- Items/Weapons/Rogue/FrostcrushValari.cs | 2 +- Items/Weapons/Rogue/TotalityBreakers.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 2 +- NPCs/CalamityGlobalNPCLoot.cs | 5 +++++ Projectiles/Rogue/ValariBoomerang.cs | 2 +- Utilities/CalamityRecipes.cs | 7 +++++++ 8 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs index 948d800fff..930ac3ad1b 100644 --- a/Items/Weapons/Rogue/DeepWounder.cs +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 52; - item.damage = 165; + item.damage = 125; item.noMelee = true; item.noUseGraphic = true; - item.useAnimation = 35; + item.useAnimation = 23; item.useStyle = 1; - item.useTime = 35; + item.useTime = 23; item.knockBack = 3f; item.UseSound = SoundID.Item1; item.autoReuse = true; diff --git a/Items/Weapons/Rogue/DesecratedWater.cs b/Items/Weapons/Rogue/DesecratedWater.cs index 41dbdaa29e..d8bb2d81be 100644 --- a/Items/Weapons/Rogue/DesecratedWater.cs +++ b/Items/Weapons/Rogue/DesecratedWater.cs @@ -47,16 +47,16 @@ Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno") return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddRecipeGroup("AnyEvilWater", 100); //make sure to add to CalamityRecipes.cs + recipe.AddRecipeGroup("AnyEvilWater", 100); recipe.AddIngredient(ItemID.HallowedBar, 5); recipe.AddRecipeGroup("CursedFlameIchor", 5); recipe.AddIngredient(ItemID.SoulofLight, 7); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index b8a779b998..d6fd9f9830 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -21,7 +21,7 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic public override void SafeSetDefaults() { - item.damage = 120; + item.damage = 75; item.knockBack = 12; item.thrown = true; item.crit = 16; diff --git a/Items/Weapons/Rogue/TotalityBreakers.cs b/Items/Weapons/Rogue/TotalityBreakers.cs index 648507d2d6..e2ee1cd793 100644 --- a/Items/Weapons/Rogue/TotalityBreakers.cs +++ b/Items/Weapons/Rogue/TotalityBreakers.cs @@ -54,7 +54,7 @@ Stealth strikes leak tar as they fly"); recipe.AddIngredient(ItemID.MolotovCocktail, 50); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType()); - //recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a6bccab994..5fc4541595 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2460,7 +2460,7 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.5); } - else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) { damage = (int)(damage * 0.75); } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index aa6e40f50d..8864574e0a 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1289,6 +1289,11 @@ namespace CalamityMod.NPCs DropHelper.DropItemChance(npc, ModContent.ItemType(), eyeballDropRate, 1, 1); break; + case NPCID.FireImp: + int stalactiteDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateInt : Main.expertMode ? 100 : 150; + DropHelper.DropItemChance(npc, ModContent.ItemType(), stalactiteDropRate, 1, 1); + break; + case NPCID.PossessedArmor: int amuletDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateInt : Main.expertMode ? 150 : 200; DropHelper.DropItemChance(npc, ModContent.ItemType(), amuletDropRate, 1, 1); diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index d2990d47a1..807754a9c0 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 360; projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + projectile.localNPCHitCooldown = 15; projectile.coldDamage = true; projectile.Calamity().rogue = true; diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 52f7e1d434..471dab5f2e 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -795,6 +795,13 @@ namespace CalamityMod }); RecipeGroup.RegisterGroup("CursedFlameIchor", group); + group = new RecipeGroup(() => "Any Evil Water", new int[] + { + ItemID.UnholyWater, + ItemID.BloodWater + }); + RecipeGroup.RegisterGroup("AnyEvilWater", group); + group = new RecipeGroup(() => "Any Silt", new int[] { ItemID.SiltBlock, From 7bf5e8c30d677dc54f0fbf22fa4af4d65980ce5f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 6 Dec 2019 16:54:56 -0500 Subject: [PATCH 64/82] nerfed throwing brick sell price & rarity --- Items/Weapons/Rogue/ThrowingBrick.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/ThrowingBrick.cs b/Items/Weapons/Rogue/ThrowingBrick.cs index d36ccd353f..9aa919a78f 100644 --- a/Items/Weapons/Rogue/ThrowingBrick.cs +++ b/Items/Weapons/Rogue/ThrowingBrick.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Rogue item.useStyle = 1; item.knockBack = 10; item.crit = 20; - item.value = Item.buyPrice(0, 0, 2, 0); - item.rare = 2; + item.value = Item.buyPrice(0, 0, 0, 50); + item.rare = 0; item.maxStack = 999; item.UseSound = SoundID.Item1; item.consumable = true; From bcf87a90dd8e8848ff8f037382b18402e1a35834 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Fri, 6 Dec 2019 22:04:20 +0000 Subject: [PATCH 65/82] Leviathan Teeth and Jaws of Oblivion Jaws are obtainable, Teeth are not currently --- Items/Weapons/Rogue/JawsOfOblivion.cs | 77 ++++++++ Items/Weapons/Rogue/JawsOfOblivion.png | Bin 0 -> 997 bytes Items/Weapons/Rogue/LeviathanTeeth.cs | 85 +++++++++ Items/Weapons/Rogue/LeviathanTeeth.png | Bin 0 -> 760 bytes NPCs/CalamityGlobalNPC.cs | 2 +- Projectiles/Rogue/JawsProjectile.cs | 232 +++++++++++++++++++++++++ Projectiles/Rogue/JawsProjectile.png | Bin 0 -> 442 bytes Projectiles/Rogue/JawsShockwave.cs | 86 +++++++++ Projectiles/Rogue/JawsShockwave.png | Bin 0 -> 1139 bytes Projectiles/Rogue/LeviathanTooth.cs | 196 +++++++++++++++++++++ Projectiles/Rogue/LeviathanTooth.png | Bin 0 -> 542 bytes Projectiles/Rogue/LeviathanTooth2.cs | 196 +++++++++++++++++++++ Projectiles/Rogue/LeviathanTooth2.png | Bin 0 -> 385 bytes Projectiles/Rogue/LeviathanTooth3.cs | 196 +++++++++++++++++++++ Projectiles/Rogue/LeviathanTooth3.png | Bin 0 -> 437 bytes 15 files changed, 1069 insertions(+), 1 deletion(-) create mode 100644 Items/Weapons/Rogue/JawsOfOblivion.cs create mode 100644 Items/Weapons/Rogue/JawsOfOblivion.png create mode 100644 Items/Weapons/Rogue/LeviathanTeeth.cs create mode 100644 Items/Weapons/Rogue/LeviathanTeeth.png create mode 100644 Projectiles/Rogue/JawsProjectile.cs create mode 100644 Projectiles/Rogue/JawsProjectile.png create mode 100644 Projectiles/Rogue/JawsShockwave.cs create mode 100644 Projectiles/Rogue/JawsShockwave.png create mode 100644 Projectiles/Rogue/LeviathanTooth.cs create mode 100644 Projectiles/Rogue/LeviathanTooth.png create mode 100644 Projectiles/Rogue/LeviathanTooth2.cs create mode 100644 Projectiles/Rogue/LeviathanTooth2.png create mode 100644 Projectiles/Rogue/LeviathanTooth3.cs create mode 100644 Projectiles/Rogue/LeviathanTooth3.png diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs new file mode 100644 index 0000000000..3a05f5a7d9 --- /dev/null +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -0,0 +1,77 @@ +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class JawsOfOblivion : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Jaws of Oblivion"); + Tooltip.SetDefault("Throws a tight spread of six venomous reaper fangs that stick in enemies\n" + + "Stealth strikes cause the teeth to emit a crushing shockwave on impact"); + } + + public override void SafeSetDefaults() + { + item.width = 42; + item.damage = 350; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 1f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 40; + item.maxStack = 1; + item.value = Item.buyPrice(1, 40, 0, 0); + item.rare = 10; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 20f; + item.Calamity().postMoonLordRarity = 13; + item.Calamity().rogue = true; + } + + 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 spreadAngle = MathHelper.ToRadians(2.5f); + Vector2 direction = new Vector2(speedX, speedY); + Vector2 baseDirection = direction.RotatedBy(-spreadAngle * 2.5f); + + for (int i = 0; i < 6; i++) + { + Vector2 currentDirection = baseDirection.RotatedBy(spreadAngle * i); + currentDirection = currentDirection.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-1f, 1f))); + + if (player.Calamity().StealthStrikeAvailable()) + { + int p = Projectile.NewProjectile(position.X, position.Y, currentDirection.X, currentDirection.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[p].Calamity().stealthStrike = true; + } + else + { + int p = Projectile.NewProjectile(position.X, position.Y, currentDirection.X, currentDirection.Y, type, (int)(damage * 1.5f), 10, player.whoAmI, 0f, 0f); + } + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this, 1); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Rogue/JawsOfOblivion.png b/Items/Weapons/Rogue/JawsOfOblivion.png new file mode 100644 index 0000000000000000000000000000000000000000..31df3efa2a2658c95d125a335f38e0d21a8673ad GIT binary patch literal 997 zcmV?00006VoOIv0RI60 z0RN!9r;`8x1AIwDK~z}7)tF02R8bhmf7h-SSvh8=(nIVCHl#t2tAcRT1EN(B1nu3_ zs+DbOUr^g1D56%;qS{1YtAwBj)1t&8(j-bWU**iuv^ewEIp5433yL`Z&D`^tGxz@H zf4=WKH(J-&MyXP%ZUE}%YYO~D)oo5k0NGC?t|LF`jlcYKzv}mE{^rg6OT~akZgTPk z04@720WkMI1Hj6TGytm)Z1)!UeEqK1t}@U4jv={X+pY+ptJqE=8w}BCU1M7TU}urw z?-JW`;Rpcl`W*pFUb5?1ja@kpK-|zC0p!1Z0LsaRM|5TVDgZX6FH|HUvPm8sxzz_i z!-g|nzveaf?f~G+qqpAp^uQ1RGp}yAjyM$o3tkr4V2H-L*q(Nzei(u+r;h`Wt9w)& zNqZzLS+zATl2#g*YF6(7;OF%70+dIC@Q6y^MlS=<&~XMRA=}|Hn22kai(tzJKf@_1 zNb;ujvewZ*2kvw1%6Y~2C~Tr4GnDBEpsD^u)dg|`7c2JL-EHTIWcud0s^23{0U;4x zlWL3rhBBD~z`kRjJ#3UO}t(38X zAsXj$Sx0CIuUgr-X$ear-Pw1l;yN~yB`F-DUnd-~+S)n*L|C$fL~heo=WXrwB$ASd zDf1<%HrrdVKNzBsE_51gZfgZ#c524+sw9FUn%=$38^3<_n%A~omgIfK)ufYvP5|K$ zwdeXccIiK#&ldn%H?~(KbLjYCubp}I+H2cPC4y5E;{bH_-3H3*RpokH`3FO^w0bHO zNdk*!C=n1*c~g3L_d!*1lA?u3O3Lv|DHx)q9xVVIJ?YnNsDCCF1NB7 zZ`rsbuBu7;IsM%A|8G*itFj7Tq$HbhMA&-Jl1%cd-W$|r?ODl5yIm&$DHx&)9<5ux z9DwZnyjPdXo7R)6Q|D%9fW;`G-E9eLz9n0J3iTCUX3~Y-{UU02r%1gVbcEwLjsW6f z_4VWXocAuv61LtI*(3#*nG%Uw*_(); + item.shootSpeed = 12f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + bool stealthStrike = false; + int teethCount; + if (player.Calamity().StealthStrikeAvailable()) + { + teethCount = 3; + stealthStrike = true; + } + else + { + teethCount = Main.rand.Next(1, 4); + } + + float spreadAngle = MathHelper.ToRadians(10); + + for (int i = 0; i < teethCount; i++) + { + float toothType = Main.rand.Next(0, 3); + int projectileType = type; + switch (toothType) + { + case 1: + projectileType = ModContent.ProjectileType(); + break; + case 2: + projectileType = ModContent.ProjectileType(); + break; + } + + float offsetSpeedX = speedX + Main.rand.NextFloat(-4f, 4f); + float offsetSpeedY = speedY + Main.rand.NextFloat(-4f, 4f); + + if (stealthStrike) + { + int p = Projectile.NewProjectile(position.X, position.Y, offsetSpeedX * 1.5f, offsetSpeedY * 1.5f, projectileType, damage, 10f, player.whoAmI, 0f, 0f); + Main.projectile[p].Calamity().stealthStrike = true; + } + else + { + int p = Projectile.NewProjectile(position.X, position.Y, offsetSpeedX, offsetSpeedY, projectileType, damage, knockBack, player.whoAmI, 0f, 0f); + } + } + return false; + } + } +} diff --git a/Items/Weapons/Rogue/LeviathanTeeth.png b/Items/Weapons/Rogue/LeviathanTeeth.png new file mode 100644 index 0000000000000000000000000000000000000000..482780b6bfb619a233f0fe12f0f8db19ea6f57f0 GIT binary patch literal 760 zcmVNCOIytFB%kdr zcMq2rpZh+iXi~23ISjy=OJ@Oi_3%Z-xI_U=ef!*S9bdB^s9EthOU6l@&}7o?GytQK zk!`KlK0;odN#0NW*8{b_&}N;HNO$_r9a8}BpTBEUAra{gbpa3`bO6ZAX6klka%@67 z7MacFPwNSZOvLE}z|GEA0Nh+2sO^m8(d1(Qc1J=AVA=iNaQ)U3@{+lbyaB-Jp`&#d z$~>Ldjzvbgb1N|jKykSQ)OOKYA+=BRz^TNLCM04qcg&dGldhREsVhkU4h-}uJB6ar zT>unRx!RpxM-zGTa!$KJI^iWD5fQT^lJxC6=6ZGt`9(&$BQn>g(sggRcWo5-*Cn$X zX5@Ey8_W9+X);~G4h8UgrHqwA${!1ALeqX1sO^$O{$a;ruI_n>*{Roa9{`w1-31`x zRNpE$TkV+adDaPS?DisK#+)-=bIFvD$h?|aU&l*EVx^EW&S`s)myFpNkzoD2IcK5= z_bPy|9x~Pn)qD@huD{@0)xPAs_Bb=+U$WZqa3HJz!bM+08T*AyDTyiOB_%RFodE@~ zuv*ftTU%P$(gWEqR7XmaF}ou&M|SK~03Ux9wjKn&jzd4E%Tlu%PiU0rr q5_CmabVXQ6MmkS&X=QG7VRUJ4ZU8ZaSnTfr0000() || Main.projectile[j].type == ModContent.ProjectileType()) && + (Main.projectile[j].type == ModContent.ProjectileType() || Main.projectile[j].type == ModContent.ProjectileType() || Main.projectile[j].type == ModContent.ProjectileType() || Main.projectile[j].type == ModContent.ProjectileType() || Main.projectile[j].type == ModContent.ProjectileType() || Main.projectile[j].type == ModContent.ProjectileType()) && Main.projectile[j].ai[0] == 1f && Main.projectile[j].ai[1] == npc.whoAmI) { projectileCount++; diff --git a/Projectiles/Rogue/JawsProjectile.cs b/Projectiles/Rogue/JawsProjectile.cs new file mode 100644 index 0000000000..a695c112b8 --- /dev/null +++ b/Projectiles/Rogue/JawsProjectile.cs @@ -0,0 +1,232 @@ +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class JawsProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Reaper Tooth"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + if (projectile.ai[0] == 0f) + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + if (projectile.Calamity().stealthStrike) + { + int dustToUse = Main.rand.Next(0, 4); + int dustType = 0; + switch (dustToUse) + { + case 0: + dustType = 33; + break; + case 1: + dustType = 101; + break; + case 2: + dustType = 111; + break; + case 3: + dustType = 180; + break; + } + + int dust = Dust.NewDust(projectile.Center, 1, 1, dustType, projectile.velocity.X, projectile.velocity.Y, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + if (projectile.ai[0] == 1f) + { + projectile.tileCollide = false; + int num988 = 15; + bool flag54 = false; + bool flag55 = false; + float[] var_2_2CB4E_cp_0 = projectile.localAI; + int var_2_2CB4E_cp_1 = 0; + float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1]; + var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f; + if (projectile.localAI[0] % 30f == 0f) + { + flag55 = true; + } + int num989 = (int)projectile.ai[1]; + if (projectile.localAI[0] >= (float)(60 * num988)) + { + flag54 = true; + } + else if (num989 < 0 || num989 >= 200) + { + flag54 = true; + } + else if (Main.npc[num989].active && !Main.npc[num989].dontTakeDamage) + { + projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[num989].gfxOffY; + if (flag55) + { + Main.npc[num989].HitEffect(0, 1.0); + } + } + else + { + flag54 = true; + } + if (flag54) + { + projectile.Kill(); + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && + ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || + (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + { + bool flag3; + if (Main.npc[i].type == 414) + { + Rectangle rect = Main.npc[i].getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + flag3 = projectile.Colliding(myRect, rect); + } + else + { + flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + } + if (flag3) + { + if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + { + Main.npc[i].ReflectProjectile(projectile.whoAmI); + return; + } + projectile.ai[0] = 1f; + projectile.ai[1] = (float)i; + projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; + projectile.netUpdate = true; + projectile.StatusNPC(i); + projectile.damage = 0; + int num28 = 6; + Point[] array2 = new Point[num28]; + int num29 = 0; + for (int l = 0; l < 1000; l++) + { + if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i) + { + array2[num29++] = new Point(l, Main.projectile[l].timeLeft); + if (num29 >= array2.Length) + { + break; + } + } + } + if (num29 >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + { + num30 = m; + } + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 240); + if (projectile.Calamity().stealthStrike) + { + target.AddBuff(ModContent.BuffType(), 240); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 100, 10f, projectile.owner, 0, 0); + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 3); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dustToUse = Main.rand.Next(0, 4); + int dustType = 0; + switch (dustToUse) + { + case 0: + dustType = 33; + break; + case 1: + dustType = 101; + break; + case 2: + dustType = 111; + break; + case 3: + dustType = 180; + break; + } + + int dust = Dust.NewDust(projectile.Center, 1, 1, dustType, 0, 0, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Rogue/JawsProjectile.png b/Projectiles/Rogue/JawsProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..fe03c24c6a6e630e749375cfefc00f3ad477714d GIT binary patch literal 442 zcmV;r0Y(0aP)0(>65}F<>ns-U=S|<_mZi1Ruqd?;?2j z1-$7|$gN1Jt+axsHChh_iHBrcc3Fy$ol~;R&V2u$osESOt<4aCaJLP>_<5KqDHg!n zbPT{6C8Me?)Ed6j`Skn@fZOXEZ2@xxLVMkB6eP`m6);C&+fJ^1C~H@vQju*dPaw26 zTLA#`41U7C;jB zrCZwESMYV=-F@#v`?*IS*07*qoM6N<$f*= 5) + { + for (int i = 0; i < 50; i++) + { + int dustToUse = Main.rand.Next(0, 4); + int dustType = 0; + switch (dustToUse) + { + case 0: + dustType = 33; + break; + case 1: + dustType = 101; + break; + case 2: + dustType = 111; + break; + case 3: + dustType = 180; + break; + } + + Vector2 dustVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); + dustVelocity.Normalize(); + dustVelocity *= 16; + + int dust = Dust.NewDust(projectile.Center, 1, 1, dustType, dustVelocity.X, dustVelocity.Y, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 240); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float dist1 = Vector2.Distance(projectile.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(projectile.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(projectile.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(projectile.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 160; + } + } +} diff --git a/Projectiles/Rogue/JawsShockwave.png b/Projectiles/Rogue/JawsShockwave.png new file mode 100644 index 0000000000000000000000000000000000000000..d86a683fca67fa909a296b391df87ade0ed0781d GIT binary patch literal 1139 zcmeAS@N?(olHy`uVBq!ia0y~yU~~Xs4mP03*$GQm0V&4fAa^H*b?0PWGBB{{db&7< zRLpsM#gLIff#-n1f&I@Flih_`_g1ApV-VTuTa ek(n31GKS7!t>xJyYXU4q7(8A5T-G@yGywpurX`vH literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/LeviathanTooth.cs b/Projectiles/Rogue/LeviathanTooth.cs new file mode 100644 index 0000000000..291ae41594 --- /dev/null +++ b/Projectiles/Rogue/LeviathanTooth.cs @@ -0,0 +1,196 @@ +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class LeviathanTooth : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Leviathan Tooth"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + if (projectile.ai[0] == 0f) + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + if (projectile.timeLeft < 575 && !projectile.Calamity().stealthStrike) + { + projectile.velocity.Y += 0.5f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + } + if (projectile.ai[0] == 1f) + { + projectile.tileCollide = false; + int num988 = 15; + bool flag54 = false; + bool flag55 = false; + float[] var_2_2CB4E_cp_0 = projectile.localAI; + int var_2_2CB4E_cp_1 = 0; + float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1]; + var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f; + if (projectile.localAI[0] % 30f == 0f) + { + flag55 = true; + } + int num989 = (int)projectile.ai[1]; + if (projectile.localAI[0] >= (float)(60 * num988)) + { + flag54 = true; + } + else if (num989 < 0 || num989 >= 200) + { + flag54 = true; + } + else if (Main.npc[num989].active && !Main.npc[num989].dontTakeDamage) + { + projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[num989].gfxOffY; + if (flag55) + { + Main.npc[num989].HitEffect(0, 1.0); + } + } + else + { + flag54 = true; + } + if (flag54) + { + projectile.Kill(); + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && + ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || + (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + { + bool flag3; + if (Main.npc[i].type == 414) + { + Rectangle rect = Main.npc[i].getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + flag3 = projectile.Colliding(myRect, rect); + } + else + { + flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + } + if (flag3) + { + if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + { + Main.npc[i].ReflectProjectile(projectile.whoAmI); + return; + } + projectile.ai[0] = 1f; + projectile.ai[1] = (float)i; + projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; + projectile.netUpdate = true; + projectile.StatusNPC(i); + projectile.damage = 0; + int num28 = 6; + Point[] array2 = new Point[num28]; + int num29 = 0; + for (int l = 0; l < 1000; l++) + { + if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i) + { + array2[num29++] = new Point(l, Main.projectile[l].timeLeft); + if (num29 >= array2.Length) + { + break; + } + } + } + if (num29 >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + { + num30 = m; + } + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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); + if (projectile.Calamity().stealthStrike) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 3, tex); + } + return false; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust = Dust.NewDust(projectile.Center, 1, 1, 33, 0, 0, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Rogue/LeviathanTooth.png b/Projectiles/Rogue/LeviathanTooth.png new file mode 100644 index 0000000000000000000000000000000000000000..349391a6fc49a3992a5a4dae2498a515cc9fda4b GIT binary patch literal 542 zcmV+(0^$9MP)_lFb%(#mJ5Dgh!9q2mY;2&st=$jn{U}<$`zz8L}`-=9Fe`-sPZy#oL$g&&)j?i0#~N-Ca-mqNO@y$-XPj;18-q~AjeU8x-L zPCB)Ct-Vs(zMF+KSQ)p?_wPV=-F@#v`?*IS*07*qoM6N<$f 16f) + { + projectile.velocity.Y = 16f; + } + } + } + if (projectile.ai[0] == 1f) + { + projectile.tileCollide = false; + int num988 = 15; + bool flag54 = false; + bool flag55 = false; + float[] var_2_2CB4E_cp_0 = projectile.localAI; + int var_2_2CB4E_cp_1 = 0; + float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1]; + var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f; + if (projectile.localAI[0] % 30f == 0f) + { + flag55 = true; + } + int num989 = (int)projectile.ai[1]; + if (projectile.localAI[0] >= (float)(60 * num988)) + { + flag54 = true; + } + else if (num989 < 0 || num989 >= 200) + { + flag54 = true; + } + else if (Main.npc[num989].active && !Main.npc[num989].dontTakeDamage) + { + projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[num989].gfxOffY; + if (flag55) + { + Main.npc[num989].HitEffect(0, 1.0); + } + } + else + { + flag54 = true; + } + if (flag54) + { + projectile.Kill(); + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && + ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || + (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + { + bool flag3; + if (Main.npc[i].type == 414) + { + Rectangle rect = Main.npc[i].getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + flag3 = projectile.Colliding(myRect, rect); + } + else + { + flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + } + if (flag3) + { + if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + { + Main.npc[i].ReflectProjectile(projectile.whoAmI); + return; + } + projectile.ai[0] = 1f; + projectile.ai[1] = (float)i; + projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; + projectile.netUpdate = true; + projectile.StatusNPC(i); + projectile.damage = 0; + int num28 = 6; + Point[] array2 = new Point[num28]; + int num29 = 0; + for (int l = 0; l < 1000; l++) + { + if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i) + { + array2[num29++] = new Point(l, Main.projectile[l].timeLeft); + if (num29 >= array2.Length) + { + break; + } + } + } + if (num29 >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + { + num30 = m; + } + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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); + if (projectile.Calamity().stealthStrike) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 3, tex); + } + return false; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust = Dust.NewDust(projectile.Center, 1, 1, 33, 0, 0, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Rogue/LeviathanTooth2.png b/Projectiles/Rogue/LeviathanTooth2.png new file mode 100644 index 0000000000000000000000000000000000000000..9d885c4805f3416d2c69d279e5687f176dffb272 GIT binary patch literal 385 zcmeAS@N?(olHy`uVBq!ia0vp^d_b(n!3HEHo@hJ=Qfx`y?k)`fL2$v|<&zm07$rPi z978;gC#M`>Jmf0+U-@(RzJ2FA&ZH+P2yYMw3fQ$u`Vfcq-~Jrqw>ekJ0}g5VZR`DV zz2kEKq*F~Ln*^sNCEZ&6;*ERENB51r%?fgbN9AMwe67{G>7ns2;nDepKZ`WlwANkN zQ}IA{B6Do0y03uH}EB~U* d)Vz|!lFa-(2E&$!H}8S644$rjF6*2UngBEgsDc0h literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/LeviathanTooth3.cs b/Projectiles/Rogue/LeviathanTooth3.cs new file mode 100644 index 0000000000..8edb699761 --- /dev/null +++ b/Projectiles/Rogue/LeviathanTooth3.cs @@ -0,0 +1,196 @@ +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class LeviathanTooth3 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Leviathan Tooth"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + if (projectile.ai[0] == 0f) + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + if (projectile.timeLeft < 575 && !projectile.Calamity().stealthStrike) + { + projectile.velocity.Y += 0.5f; + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + } + if (projectile.ai[0] == 1f) + { + projectile.tileCollide = false; + int num988 = 15; + bool flag54 = false; + bool flag55 = false; + float[] var_2_2CB4E_cp_0 = projectile.localAI; + int var_2_2CB4E_cp_1 = 0; + float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1]; + var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f; + if (projectile.localAI[0] % 30f == 0f) + { + flag55 = true; + } + int num989 = (int)projectile.ai[1]; + if (projectile.localAI[0] >= (float)(60 * num988)) + { + flag54 = true; + } + else if (num989 < 0 || num989 >= 200) + { + flag54 = true; + } + else if (Main.npc[num989].active && !Main.npc[num989].dontTakeDamage) + { + projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f; + projectile.gfxOffY = Main.npc[num989].gfxOffY; + if (flag55) + { + Main.npc[num989].HitEffect(0, 1.0); + } + } + else + { + flag54 = true; + } + if (flag54) + { + projectile.Kill(); + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && + ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || + (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + { + bool flag3; + if (Main.npc[i].type == 414) + { + Rectangle rect = Main.npc[i].getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + flag3 = projectile.Colliding(myRect, rect); + } + else + { + flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + } + if (flag3) + { + if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + { + Main.npc[i].ReflectProjectile(projectile.whoAmI); + return; + } + projectile.ai[0] = 1f; + projectile.ai[1] = (float)i; + projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; + projectile.netUpdate = true; + projectile.StatusNPC(i); + projectile.damage = 0; + int num28 = 6; + Point[] array2 = new Point[num28]; + int num29 = 0; + for (int l = 0; l < 1000; l++) + { + if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i) + { + array2[num29++] = new Point(l, Main.projectile[l].timeLeft); + if (num29 >= array2.Length) + { + break; + } + } + } + if (num29 >= array2.Length) + { + int num30 = 0; + for (int m = 1; m < array2.Length; m++) + { + if (array2[m].Y < array2[num30].Y) + { + num30 = m; + } + } + Main.projectile[array2[num30].X].Kill(); + } + } + } + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + 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); + if (projectile.Calamity().stealthStrike) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 3, tex); + } + return false; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + projectile.Kill(); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust = Dust.NewDust(projectile.Center, 1, 1, 33, 0, 0, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Rogue/LeviathanTooth3.png b/Projectiles/Rogue/LeviathanTooth3.png new file mode 100644 index 0000000000000000000000000000000000000000..3c083b2880964991b92d9050946f7f2bd3c02f3d GIT binary patch literal 437 zcmV;m0ZRUfP)k00006VoOIv0RI60 z0RN!9r;`8x0Zd6mK~zY`wUi-C1VI#lzdg2@3<{e>MGOjFIoN0sqo8<#2>JsohAsX9 z!&Qr2gUSkK%SFNBfyHolm=^ZJCELOp=4N!Cd%7^Qugzm--pBXejE9JWxyAhF`gSz* z_#+xvhA%5ecO3va?WocP_5`}}bs7V3b9Mzluso}FjD|H6$i(aO3jocqrQGz#IZW?{ zdxEvyeMRzcU+DsO1ikJ6fRkujty?R=|MTG9fsT#MCE$B9X-B2quqJ54eoE}8CeiB- zjE_ne)aIZng*Aca2QxXq>B1@iM;GUX4R4Q60Ict90T3P@1CS-3o*M`HrX*9ZPFIw# zvOWg}MYzzFHA&JR7Y^##sc#OXgJxLF^WmC6c0>Qlrs5=wi^)lMT`)+Z8?v(V|KL{_ zw2MpLOG#w7cQDP#UN&FIYZvuRqI41mX(@>{!53_@eyZnsipu~101|XXSad~LNk%$P fa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjfyb-># literal 0 HcmV?d00001 From fca15f6e137892d6461b9cd1bc637e4cead3cd51 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 6 Dec 2019 17:16:54 -0600 Subject: [PATCH 66/82] Couple of multiplayer fixes --- NPCs/Bumblebirb/Bumblefuck2.cs | 5 +++++ NPCs/CalamityAI.cs | 7 ++++++- NPCs/CalamityGlobalAI.cs | 6 ++++++ Projectiles/Summon/MechwormBody.cs | 10 ++++++---- Projectiles/Summon/MechwormBody2.cs | 11 ++++++----- Projectiles/Summon/MechwormHead.cs | 2 ++ Projectiles/Summon/MechwormTail.cs | 10 ++++++---- 7 files changed, 37 insertions(+), 14 deletions(-) diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index c4506ccb52..e28d0b3f1b 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -194,6 +194,11 @@ namespace CalamityMod.NPCs.Bumblebirb value45.Normalize(); value45 *= scaleFactor21; npc.velocity = (npc.velocity * (num1378 - 1f) + value45) / num1378; + npc.netSpam = 5; + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } return; } if (npc.ai[0] == 2f) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index c0a52a3553..4c753aed33 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -2773,7 +2773,12 @@ namespace CalamityMod.NPCs value52.Normalize(); value52 *= scaleFactor16; npc.velocity = (npc.velocity * (num1308 - 1f) + value52) / num1308; - return; + npc.netSpam = 5; + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } + return; } // Fly towards target quickly diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 7a11c65f06..6c7c638847 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -3050,6 +3050,12 @@ namespace CalamityMod.NPCs if (ModLoader.GetMod("FargowiltasSouls") != null) ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } + npc.netSpam = 5; + return false; } #endregion diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 905679e40c..4de9f5960d 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -87,10 +87,10 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < Main.projectile.Length; i++) { if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && - (Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType())) + (Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType())) { Main.projectile[i].Kill(); } @@ -122,9 +122,11 @@ namespace CalamityMod.Projectiles.Summon } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; + projectile.netSpam = 5; projectile.scale = scaleFactor18; projectile.width = projectile.height = (int)((float)num1051 * projectile.scale); projectile.Center = projectile.position; + projectile.netSpam = 5; if (vector134 != Vector2.Zero) { projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index d4950f64ef..ed9f836338 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -87,10 +87,10 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < Main.projectile.Length; i++) { if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && - (Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType())) + (Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType())) { Main.projectile[i].Kill(); } @@ -121,15 +121,16 @@ namespace CalamityMod.Projectiles.Summon } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; + projectile.netSpam = 5; projectile.scale = scaleFactor18; projectile.width = projectile.height = (int)((float)num1051 * projectile.scale); projectile.Center = projectile.position; + projectile.netSpam = 5; if (vector134 != Vector2.Zero) { projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; } projectile.spriteDirection = (vector134.X > 0f) ? 1 : -1; - projectile.netSpam = 5; return; } diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index 3e51a80044..1e22b54a7c 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -197,9 +197,11 @@ namespace CalamityMod.Projectiles.Summon } float num1061 = MathHelper.Clamp(projectile.localAI[0], 0f, 50f); projectile.position = projectile.Center; + projectile.netSpam = 5; projectile.scale = 1f + num1061 * 0.01f; projectile.width = projectile.height = (int)((float)num1051 * projectile.scale); projectile.Center = projectile.position; + projectile.netSpam = 5; if (projectile.alpha > 0) { projectile.alpha -= 42; diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 80c0f4f77d..4c89873cac 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -86,10 +86,10 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < Main.projectile.Length; i++) { if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && - (Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType() || - Main.projectile[chase].type == ModContent.ProjectileType())) + (Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType() || + Main.projectile[i].type == ModContent.ProjectileType())) { Main.projectile[i].Kill(); } @@ -121,9 +121,11 @@ namespace CalamityMod.Projectiles.Summon } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; + projectile.netSpam = 5; projectile.scale = scaleFactor18; projectile.width = projectile.height = (int)((float)num1051 * projectile.scale); projectile.Center = projectile.position; + projectile.netSpam = 5; if (vector134 != Vector2.Zero) { projectile.Center = value68 - Vector2.Normalize(vector134) * scaleFactor17 * scaleFactor18; From b5a0e60d50948acbbdff039c64d04ced669a5e78 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 6 Dec 2019 23:47:16 -0500 Subject: [PATCH 67/82] added Phantom Lance --- CalamityMod.cs | 2 + Items/Weapons/Rogue/PhantomLance.cs | 68 ++++++++++++++++++ Items/Weapons/Rogue/PhantomLance.png | Bin 0 -> 999 bytes Projectiles/Rogue/PhantomLanceProj.cs | 91 +++++++++++++++++++++++++ Projectiles/Rogue/PhantomLanceProj.png | Bin 0 -> 999 bytes 5 files changed, 161 insertions(+) create mode 100644 Items/Weapons/Rogue/PhantomLance.cs create mode 100644 Items/Weapons/Rogue/PhantomLance.png create mode 100644 Projectiles/Rogue/PhantomLanceProj.cs create mode 100644 Projectiles/Rogue/PhantomLanceProj.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 4ae432a045..660aa7d041 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1832,6 +1832,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -1846,6 +1847,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Items/Weapons/Rogue/PhantomLance.cs b/Items/Weapons/Rogue/PhantomLance.cs new file mode 100644 index 0000000000..3ce5c04a4e --- /dev/null +++ b/Items/Weapons/Rogue/PhantomLance.cs @@ -0,0 +1,68 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Rogue; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class PhantomLance : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phantom Lance"); + Tooltip.SetDefault(@"Fires a spectral javelin that rapidly releases lost souls +Fades away and slows down over time +Lost souls released later deal less damage +Stealth strikes don't slow down and souls always deal full damage"); + } + + public override void SafeSetDefaults() + { + item.damage = 150; + item.knockBack = 5f; + + item.width = 62; + item.height = 68; + item.useStyle = 1; + item.noMelee = true; + item.noUseGraphic = true; + + item.value = Item.buyPrice(0, 0, 50, 0); + item.rare = 8; + item.useTime = 19; + item.useAnimation = 19; + item.maxStack = 999; + item.UseSound = SoundID.Item1; + item.consumable = true; + item.Calamity().rogue = true; + + item.autoReuse = true; + item.shootSpeed = 10f; + item.shoot = ModContent.ProjectileType(); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SpectreBar, 2); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 100); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/PhantomLance.png b/Items/Weapons/Rogue/PhantomLance.png new file mode 100644 index 0000000000000000000000000000000000000000..55db8c10ed750a573e0732a068a32031750de1f3 GIT binary patch literal 999 zcmVA`=rpLN^00{0X1r#>E=^9_FX>;2HZS8=< z#y3slcBaMb>$eX9Xc_PW(QS_ezW@pwPx;2zYuc)9<&CFo<4#SRIa%!kpvj_bL0RJ| z*SMIjs;>uNu)Et}y1n^@;r?rPFBq;*oj4CbMMM?v@MP(fTmu}qv?DynWC~G|7jpyZT2Vjeq4M2WIp$>5RTq6KoKRy8w)5X4G z0H*v?05rc^{j)Ulp4iL(4FPcWc;kw%BW(w^ z76JCA1=o12kcOR7wtt`DT3QyQ@kdXt0`T(L?G;~V;b&k?@9P?m1GXSI zQd*YT{cC57;r`IyISs&@k-MS6xyIu~ZNnh|CdL9lbi-xk#yR0b?^6Iq`@aF;$t}#?ecJ$-_D|{nUSIfe*^!y)ZT-CJ7+vErV#AG_cWN0~SwO_J?98NHLH6J)`~@WB z#Hg(C4gYqR88__Iq-nvf?YyG!dL0bJXBIc3tnrwy<5s7wRhkA8XIgNLJHL)otjS7S=$a} zjYl=^)O1ckzP9u{korxVagD2DT2R-x)s8G(O$*8z&t&P8CF^jyn--Kd4p{HV(#^D> ztZ~h^BmAF*vTiSb4${xGpsewK$o{A>4=K+<0000IbVXQnMOaBjI!|(GWo~p~bZKvH V05ODE?C$^o002ovPDHLkV1n>E-kksd literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/PhantomLanceProj.cs b/Projectiles/Rogue/PhantomLanceProj.cs new file mode 100644 index 0000000000..e45fe6e55a --- /dev/null +++ b/Projectiles/Rogue/PhantomLanceProj.cs @@ -0,0 +1,91 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class PhantomLanceProj : ModProjectile + { + private int projCount = 18; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phantom Lance"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.timeLeft = 300; + projectile.extraUpdates = 1; + projectile.Calamity().rogue = true; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void AI() + { + if (projectile.Calamity().stealthStrike != true) + { + if (projectile.timeLeft <= 255) + projectile.alpha += 1; + if (projectile.timeLeft >= 75) + { + projectile.velocity.X *= 0.995f; + projectile.velocity.Y *= 0.995f; + } + } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default(Color), 0.85f); + projCount--; + if (projCount <= 0) + { + if (projectile.owner == Main.myPlayer) + { + if (projectile.Calamity().stealthStrike) + { + int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Main.projectile[stealthSoul].Calamity().forceRogue = true; + Main.projectile[stealthSoul].usesLocalNPCImmunity = true; + Main.projectile[stealthSoul].localNPCHitCooldown = -2; + } + else + { + double damageMult = 1.0; + damageMult = (double)(projectile.timeLeft) / 300.0; + double newDamage = projectile.damage * damageMult; + + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)newDamage, projectile.knockBack, projectile.owner, 0f, 0f); + Main.projectile[soul].Calamity().forceRogue = true; + Main.projectile[soul].usesLocalNPCImmunity = true; + Main.projectile[soul].localNPCHitCooldown = -2; + } + } + projCount = 18; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 10; i++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + } + } +} diff --git a/Projectiles/Rogue/PhantomLanceProj.png b/Projectiles/Rogue/PhantomLanceProj.png new file mode 100644 index 0000000000000000000000000000000000000000..55db8c10ed750a573e0732a068a32031750de1f3 GIT binary patch literal 999 zcmVA`=rpLN^00{0X1r#>E=^9_FX>;2HZS8=< z#y3slcBaMb>$eX9Xc_PW(QS_ezW@pwPx;2zYuc)9<&CFo<4#SRIa%!kpvj_bL0RJ| z*SMIjs;>uNu)Et}y1n^@;r?rPFBq;*oj4CbMMM?v@MP(fTmu}qv?DynWC~G|7jpyZT2Vjeq4M2WIp$>5RTq6KoKRy8w)5X4G z0H*v?05rc^{j)Ulp4iL(4FPcWc;kw%BW(w^ z76JCA1=o12kcOR7wtt`DT3QyQ@kdXt0`T(L?G;~V;b&k?@9P?m1GXSI zQd*YT{cC57;r`IyISs&@k-MS6xyIu~ZNnh|CdL9lbi-xk#yR0b?^6Iq`@aF;$t}#?ecJ$-_D|{nUSIfe*^!y)ZT-CJ7+vErV#AG_cWN0~SwO_J?98NHLH6J)`~@WB z#Hg(C4gYqR88__Iq-nvf?YyG!dL0bJXBIc3tnrwy<5s7wRhkA8XIgNLJHL)otjS7S=$a} zjYl=^)O1ckzP9u{korxVagD2DT2R-x)s8G(O$*8z&t&P8CF^jyn--Kd4p{HV(#^D> ztZ~h^BmAF*vTiSb4${xGpsewK$o{A>4=K+<0000IbVXQnMOaBjI!|(GWo~p~bZKvH V05ODE?C$^o002ovPDHLkV1n>E-kksd literal 0 HcmV?d00001 From a51765b7acfd84099c0dc1e64ccb12c22048381e Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Sat, 7 Dec 2019 10:57:33 +0000 Subject: [PATCH 68/82] Removed Jaws of Oblivion recipe --- Items/Weapons/Rogue/JawsOfOblivion.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index 3a05f5a7d9..ee6595daed 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -62,6 +62,7 @@ namespace CalamityMod.Items.Weapons.Rogue return false; } + /* public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -73,5 +74,6 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.SetResult(this, 1); recipe.AddRecipe(); } + */ } } From 2635612d3467688be8d6579f5f21d6f3a71e8c12 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 7 Dec 2019 10:25:32 -0500 Subject: [PATCH 69/82] valari balancing & bandit wares --- Items/Weapons/Rogue/DeepWounder.cs | 2 +- Items/Weapons/Rogue/FrostcrushValari.cs | 2 +- Items/Weapons/Rogue/MonkeyDarts.cs | 2 +- NPCs/TownNPCs/THIEF.cs | 11 +++++------ Projectiles/Rogue/ValariBoomerang.cs | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs index 930ac3ad1b..940802e836 100644 --- a/Items/Weapons/Rogue/DeepWounder.cs +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.height = 48; item.maxStack = 1; - item.rare = 8; + item.rare = 7; item.value = Item.buyPrice(0, 60, 0, 0); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index d6fd9f9830..ac389b854a 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -21,7 +21,7 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic public override void SafeSetDefaults() { - item.damage = 75; + item.damage = 90; item.knockBack = 12; item.thrown = true; item.crit = 16; diff --git a/Items/Weapons/Rogue/MonkeyDarts.cs b/Items/Weapons/Rogue/MonkeyDarts.cs index 03175521d1..b6cfcb5c74 100644 --- a/Items/Weapons/Rogue/MonkeyDarts.cs +++ b/Items/Weapons/Rogue/MonkeyDarts.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.UseSound = SoundID.Item1; item.useTime = 20; item.useAnimation = 20; - item.value = Item.buyPrice(0, 0, 1, 0); + item.value = Item.buyPrice(0, 0, 4, 0); item.rare = 7; item.shootSpeed = 8f; item.shoot = ModContent.ProjectileType(); diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 49bc3326d5..0c20b3b5a6 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -251,24 +251,23 @@ namespace CalamityMod.NPCs.TownNPCs { shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; - /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++;*/ } if (NPC.downedPlantBoss) { shop.item[nextSlot].SetDefaults(ModContent.ItemType()); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 4, 0); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; - /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); - nextSlot++;*/ + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; } /*if (NPC.downedGolemBoss) { - shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(1, 0, 0, 0); nextSlot++; }*/ @@ -280,7 +279,7 @@ namespace CalamityMod.NPCs.TownNPCs } /*if (CalamityWorld.downedProvidence) { - shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(5, 0, 0, 0); nextSlot++; }*/ diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index 807754a9c0..f627a26d94 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.timeLeft = 360; projectile.tileCollide = false; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 15; + projectile.usesIDStaticNPCImmunity = true; + projectile.idStaticNPCHitCooldown = 5; projectile.coldDamage = true; projectile.Calamity().rogue = true; From be4032cf4d6da4baf1c192459696108d6ac861f0 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 7 Dec 2019 10:35:32 -0600 Subject: [PATCH 70/82] Fixed Gael tooltip mentioning scaling --- Items/Weapons/Melee/GaelsGreatsword.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 953f32c1ce..a36466a014 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons.Melee "[Swings leave behind exploding blood trails [Below 50% health]]\n" + "[Right click to swipe the sword, reflecting projectiles at a 50% chance]\n" + "[Activating Rage Mode releases an enormous barrage of skulls]\n" + - "Upgrades after killing the Wall of Flesh, Moon Lord, and Yharon\n" + "'Give me that thing, your dark soul'"); } //NOTE: GetWeaponDamage is in the CalamityPlayer file From 85aaa0872173af138eae5ecc4398edf2cd273906 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 7 Dec 2019 18:49:07 -0500 Subject: [PATCH 71/82] added bouncy spiky balls (unobtainable) --- CalamityMod.cs | 2 + Items/Weapons/Rogue/BouncySpikyBall.cs | 62 +++++++++++++ Items/Weapons/Rogue/BouncySpikyBall.png | Bin 0 -> 301 bytes Projectiles/Rogue/BouncyBol.cs | 115 ++++++++++++++++++++++++ Projectiles/Rogue/BouncyBol.png | Bin 0 -> 301 bytes 5 files changed, 179 insertions(+) create mode 100644 Items/Weapons/Rogue/BouncySpikyBall.cs create mode 100644 Items/Weapons/Rogue/BouncySpikyBall.png create mode 100644 Projectiles/Rogue/BouncyBol.cs create mode 100644 Projectiles/Rogue/BouncyBol.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 660aa7d041..b80626c1a1 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1959,6 +1959,7 @@ namespace CalamityMod spikyBallList = new List() { + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -1969,6 +1970,7 @@ namespace CalamityMod spikyBallProjList = new List() { + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Items/Weapons/Rogue/BouncySpikyBall.cs b/Items/Weapons/Rogue/BouncySpikyBall.cs new file mode 100644 index 0000000000..93981d333d --- /dev/null +++ b/Items/Weapons/Rogue/BouncySpikyBall.cs @@ -0,0 +1,62 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class BouncySpikyBall : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bouncy Spiky Ball"); + Tooltip.SetDefault(@"Throws a very bouncy ball that richochets off walls and enemies +Receives a small boost in damage and velocity after bouncing off an enemy +Stealth strikes provide a bigger boost after richocheting"); + } + + public override void SafeSetDefaults() + { + item.width = 14; + item.damage = 10; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 1f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.consumable = true; + item.maxStack = 999; + item.height = 14; + item.value = Item.buyPrice(0, 0, 1, 0); + item.rare = 1; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 8f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SpikyBall, 3); + recipe.AddIngredient(ItemID.PinkGel); + recipe.AddTile(TileID.WorkBenches); + recipe.SetResult(this, 3); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/BouncySpikyBall.png b/Items/Weapons/Rogue/BouncySpikyBall.png new file mode 100644 index 0000000000000000000000000000000000000000..d409a6b5715f6ea598d496cd8460bae187a0b499 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v}}Ko-U3d z8t0czTF7-MK%{NIc360LOk_y&h6Nn&SlP}!u)e{P*uOF5izJWVhM8(Bjy{vlNew(( z#QXSw*|cr;bLSWH-T!MD&by{}*@CH-!3^zhmc8Dy!r8fWDaUU+hQdji4X2B^54@|m z&aiOm_hyqU&o5PdT9aZ<>+p8;Pv&7bf8zOU;q&*?H4op|$oRwe-p=ECx-6MXq6M#3 z?O=cKt1`2pb>6i!>y_*b#mQHU7EgH6SEMe!-$m<7blRGKp(hpeS5^fkKa#h$^}POQ ugU?T(e}qb0BY?=$&C0(hGc~Uyu_QA;kHN4d;>~-YEQ6=3pUXO@geCwP<9nn4 literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/BouncyBol.cs b/Projectiles/Rogue/BouncyBol.cs new file mode 100644 index 0000000000..c9e3476b2c --- /dev/null +++ b/Projectiles/Rogue/BouncyBol.cs @@ -0,0 +1,115 @@ +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class BouncyBol : ModProjectile + { + private bool hasHitEnemy = false; + private int targetNPC = -1; + private List previousNPCs = new List() { -1 }; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bouncy Ball"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.friendly = true; + projectile.penetrate = 8; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + projectile.aiStyle = 14; + } + + public override void AI() + { + if (hasHitEnemy == true && projectile.timeLeft < 575) + { + projectile.velocity.X *= 1.005f; //you broke up, time to yeet yourself out + projectile.velocity.Y *= 1.005f; + if (projectile.velocity.X > 16f) + { + projectile.velocity.X = 16f; + } + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + float minDist = 999f; + int index = 0; + for (int i = 0; i < Main.npc.Length; i++) + { + bool hasHitNPC = false; + for (int j = 0; j < previousNPCs.Count; j++) + { + if (previousNPCs[j] == i) + { + hasHitNPC = true; + } + } + + NPC npc = Main.npc[i]; + if (npc == target) + { + previousNPCs.Add(i); + } + if (!npc.friendly && !npc.townNPC && npc.active && !npc.dontTakeDamage && npc.chaseable && npc != target && !hasHitNPC) + { + float dist = (projectile.Center - npc.Center).Length(); + if (dist < minDist) + { + minDist = dist; + index = i; + } + } + } + + Vector2 velocityNew; + if (minDist < 999f) + { + if (projectile.Calamity().stealthStrike && hasHitEnemy == false) + { + projectile.damage = (int)(projectile.damage * 1.5f); + } + else + { + projectile.damage = (int)(projectile.damage * 1.1f); + } + hasHitEnemy = true; + targetNPC = index; + velocityNew = Main.npc[index].Center - projectile.Center; + velocityNew.Normalize(); + velocityNew *= 15f; + projectile.velocity = velocityNew; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X * 1.001f; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y * 1.001f; + } + return false; + } + } +} diff --git a/Projectiles/Rogue/BouncyBol.png b/Projectiles/Rogue/BouncyBol.png new file mode 100644 index 0000000000000000000000000000000000000000..d409a6b5715f6ea598d496cd8460bae187a0b499 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v}}Ko-U3d z8t0czTF7-MK%{NIc360LOk_y&h6Nn&SlP}!u)e{P*uOF5izJWVhM8(Bjy{vlNew(( z#QXSw*|cr;bLSWH-T!MD&by{}*@CH-!3^zhmc8Dy!r8fWDaUU+hQdji4X2B^54@|m z&aiOm_hyqU&o5PdT9aZ<>+p8;Pv&7bf8zOU;q&*?H4op|$oRwe-p=ECx-6MXq6M#3 z?O=cKt1`2pb>6i!>y_*b#mQHU7EgH6SEMe!-$m<7blRGKp(hpeS5^fkKa#h$^}POQ ugU?T(e}qb0BY?=$&C0(hGc~Uyu_QA;kHN4d;>~-YEQ6=3pUXO@geCwP<9nn4 literal 0 HcmV?d00001 From ddee313bd0560a2f1448edc05a4dc400f6822753 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 7 Dec 2019 19:20:17 -0500 Subject: [PATCH 72/82] nerfed frostcrush valari and fixed bugs w/ kylie, nasty cholla, and sticky spiky ball --- Items/Weapons/Rogue/FrostcrushValari.cs | 2 +- Items/Weapons/Rogue/Kylie.cs | 2 +- Items/Weapons/Rogue/NastyCholla.cs | 2 +- Items/Weapons/Rogue/StickySpikyBall.cs | 2 +- Projectiles/Rogue/ValariBoomerang.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index ac389b854a..0ad5b1006d 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -21,7 +21,7 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic public override void SafeSetDefaults() { - item.damage = 90; + item.damage = 70; item.knockBack = 12; item.thrown = true; item.crit = 16; diff --git a/Items/Weapons/Rogue/Kylie.cs b/Items/Weapons/Rogue/Kylie.cs index 4c95f8da8a..fbb8eb6a17 100644 --- a/Items/Weapons/Rogue/Kylie.cs +++ b/Items/Weapons/Rogue/Kylie.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue for (int i = 0; i < 3; i++) { Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), item.damage, item.knockBack, player.whoAmI, 0f, 1f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 1f); Main.projectile[proj].Calamity().stealthStrike = true; spread -= 10; } diff --git a/Items/Weapons/Rogue/NastyCholla.cs b/Items/Weapons/Rogue/NastyCholla.cs index cf461a903e..84b0b01ee7 100644 --- a/Items/Weapons/Rogue/NastyCholla.cs +++ b/Items/Weapons/Rogue/NastyCholla.cs @@ -47,7 +47,7 @@ Stealth strikes throw five at once"); for (int i = 0; i < 5; i++) { Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = true; spread -= Main.rand.Next(1,4); } diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index e3a3c32131..738ebac6fd 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -45,7 +45,7 @@ Stealth strikes throw seven at once and last a lot longer"); for (int i = 0; i < 7; i++) { Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = true; Main.projectile[proj].timeLeft *= 4; spread -= Main.rand.Next(1,4); diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index f627a26d94..ef4505afa0 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 360; projectile.tileCollide = false; projectile.usesIDStaticNPCImmunity = true; - projectile.idStaticNPCHitCooldown = 5; + projectile.idStaticNPCHitCooldown = 10; projectile.coldDamage = true; projectile.Calamity().rogue = true; From 704a0106b9902ae40a228dfc88e7482ca3c3be8f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 7 Dec 2019 21:30:46 -0500 Subject: [PATCH 73/82] damage fixes and weapon balancing --- Items/Weapons/Rogue/JawsOfOblivion.cs | 4 ++-- Items/Weapons/Rogue/LeviathanTeeth.cs | 2 +- Items/Weapons/Rogue/PhantomLance.cs | 2 +- Projectiles/Magic/VolatileStarcore.cs | 2 +- Projectiles/Rogue/BlastBarrelProjectile.cs | 4 ++-- Projectiles/Rogue/CelestialReaperProjectile.cs | 4 ++-- Projectiles/Rogue/ConsecratedWaterProjectile.cs | 4 ++-- Projectiles/Rogue/PhantomLanceProj.cs | 4 ++-- Projectiles/Rogue/ValariBoomerang.cs | 2 +- Projectiles/Typeless/GalaxySmasherHammer.cs | 2 +- Projectiles/Typeless/NanoblackMain.cs | 2 +- Projectiles/Typeless/StellarContemptHammer.cs | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index ee6595daed..8631b376d5 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 42; - item.damage = 350; + item.damage = 438; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 15; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 20f; + item.shootSpeed = 25f; item.Calamity().postMoonLordRarity = 13; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/LeviathanTeeth.cs b/Items/Weapons/Rogue/LeviathanTeeth.cs index def6b51abc..42d004a446 100644 --- a/Items/Weapons/Rogue/LeviathanTeeth.cs +++ b/Items/Weapons/Rogue/LeviathanTeeth.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 36; - item.damage = 70; + item.damage = 94; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 10; diff --git a/Items/Weapons/Rogue/PhantomLance.cs b/Items/Weapons/Rogue/PhantomLance.cs index 3ce5c04a4e..7ce313eb20 100644 --- a/Items/Weapons/Rogue/PhantomLance.cs +++ b/Items/Weapons/Rogue/PhantomLance.cs @@ -20,7 +20,7 @@ Stealth strikes don't slow down and souls always deal full damage"); public override void SafeSetDefaults() { - item.damage = 150; + item.damage = 75; item.knockBack = 5f; item.width = 62; diff --git a/Projectiles/Magic/VolatileStarcore.cs b/Projectiles/Magic/VolatileStarcore.cs index 6799a04788..32a066213e 100644 --- a/Projectiles/Magic/VolatileStarcore.cs +++ b/Projectiles/Magic/VolatileStarcore.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Magic // Spawn a Helium Flash on impact int type = ModContent.ProjectileType(); - int damage = HeliumFlash.BaseDamage; + int damage = projectile.damage; float kb = 9.5f; Projectile.NewProjectile(projectile.Center, Vector2.Zero, type, damage, kb, projectile.owner, 0f, 0f); } diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index 918a27479c..ae462c7733 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -77,14 +77,14 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(30f)); Projectile.NewProjectile(projectile.Center, projectile.velocity + shrapnelVelocity, - ModContent.ProjectileType(), BlastBarrel.BaseDamage, 3f, projectile.owner); + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); } else { Vector2 fireVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); int fireIndex = Projectile.NewProjectile(projectile.Center, projectile.velocity + fireVelocity, Main.rand.Next(ProjectileID.MolotovFire, ProjectileID.MolotovFire3 + 1), - BlastBarrel.BaseDamage, 1f, projectile.owner); + projectile.damage, 1f, projectile.owner); Main.projectile[fireIndex].Calamity().forceRogue = true; Main.projectile[fireIndex].penetrate = -1; Main.projectile[fireIndex].usesLocalNPCImmunity = true; diff --git a/Projectiles/Rogue/CelestialReaperProjectile.cs b/Projectiles/Rogue/CelestialReaperProjectile.cs index 2cfc9b10b5..1866d0657d 100644 --- a/Projectiles/Rogue/CelestialReaperProjectile.cs +++ b/Projectiles/Rogue/CelestialReaperProjectile.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue framesNeeded /= 6f - projectile.penetrate + 1f; //1 is to prevent division by zero. The more hits, the more afterimages if (projectile.timeLeft % (int)framesNeeded == 0f) { - Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), CelestialReaper.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue for (float i = 0f; i < 7f; i += 1f) { float angle = MathHelper.TwoPi * i / 7f; - Projectile.NewProjectile(projectile.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType(), CelestialReaper.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(projectile.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } diff --git a/Projectiles/Rogue/ConsecratedWaterProjectile.cs b/Projectiles/Rogue/ConsecratedWaterProjectile.cs index b5b38e8234..3607442eed 100644 --- a/Projectiles/Rogue/ConsecratedWaterProjectile.cs +++ b/Projectiles/Rogue/ConsecratedWaterProjectile.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find(projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), ConsecratedWater.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } //stealth strike @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find((projectile.Top + i * Main.rand.NextFloat(56f, 108f) * Vector2.UnitX).ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), ConsecratedWater.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } diff --git a/Projectiles/Rogue/PhantomLanceProj.cs b/Projectiles/Rogue/PhantomLanceProj.cs index e45fe6e55a..b98b9cd88e 100644 --- a/Projectiles/Rogue/PhantomLanceProj.cs +++ b/Projectiles/Rogue/PhantomLanceProj.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike) { - int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((float)projectile.damage * 0.75f), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[stealthSoul].Calamity().forceRogue = true; Main.projectile[stealthSoul].usesLocalNPCImmunity = true; Main.projectile[stealthSoul].localNPCHitCooldown = -2; @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue { double damageMult = 1.0; damageMult = (double)(projectile.timeLeft) / 300.0; - double newDamage = projectile.damage * damageMult; + double newDamage = projectile.damage * damageMult * 0.75; int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)newDamage, projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[soul].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index ef4505afa0..93fdfef95e 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 360; projectile.tileCollide = false; projectile.usesIDStaticNPCImmunity = true; - projectile.idStaticNPCHitCooldown = 10; + projectile.idStaticNPCHitCooldown = 15; projectile.coldDamage = true; projectile.Calamity().rogue = true; diff --git a/Projectiles/Typeless/GalaxySmasherHammer.cs b/Projectiles/Typeless/GalaxySmasherHammer.cs index 351efbe04b..469e88e2ba 100644 --- a/Projectiles/Typeless/GalaxySmasherHammer.cs +++ b/Projectiles/Typeless/GalaxySmasherHammer.cs @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Typeless // Three death lasers (aka "Nebula Shots") swarm the target. int laserID = ModContent.ProjectileType(); - int laserDamage = (int)(0.2f * GalaxySmasherMelee.BaseDamage); + int laserDamage = (int)(0.2f * projectile.damage); float laserKB = 2.5f; int numLasers = 3; for (int i = 0; i < numLasers; ++i) diff --git a/Projectiles/Typeless/NanoblackMain.cs b/Projectiles/Typeless/NanoblackMain.cs index 7c774402a5..f97cade254 100644 --- a/Projectiles/Typeless/NanoblackMain.cs +++ b/Projectiles/Typeless/NanoblackMain.cs @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Typeless private void SpawnEnergyBlade() { int bladeID = ModContent.ProjectileType(); - int bladeDamage = NanoblackReaperMelee.BaseDamage / 5; + int bladeDamage = projectile.damage / 5; float bladeKB = 3f; float spin = (projectile.direction <= 0) ? -1f : 1f; float d = 16f; diff --git a/Projectiles/Typeless/StellarContemptHammer.cs b/Projectiles/Typeless/StellarContemptHammer.cs index 45a306c150..407ef89340 100644 --- a/Projectiles/Typeless/StellarContemptHammer.cs +++ b/Projectiles/Typeless/StellarContemptHammer.cs @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Typeless projectile.netUpdate = true; int numFlares = 2; - int flareDamage = (int)(0.3f * StellarContemptMelee.BaseDamage); + int flareDamage = (int)(0.3f * projectile.damage); float flareKB = 4f; for (int i = 0; i < numFlares; ++i) { From 113569841e20b3bc52192ca0f2ed137dd185ba41 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 8 Dec 2019 00:13:47 -0500 Subject: [PATCH 74/82] added terra disk (unobtainable) --- Items/Weapons/Melee/TerraDiskMelee.cs | 74 ++++++++++++ Items/Weapons/Melee/TerraDiskMelee.png | Bin 0 -> 1071 bytes Items/Weapons/Rogue/TerraDisk.cs | 74 ++++++++++++ Items/Weapons/Rogue/TerraDisk.png | Bin 0 -> 1071 bytes Projectiles/Typeless/TerraDiskProjectile.cs | 114 ++++++++++++++++++ Projectiles/Typeless/TerraDiskProjectile.png | Bin 0 -> 1071 bytes Projectiles/Typeless/TerraDiskProjectile2.cs | 45 +++++++ Projectiles/Typeless/TerraDiskProjectile2.png | Bin 0 -> 487 bytes 8 files changed, 307 insertions(+) create mode 100644 Items/Weapons/Melee/TerraDiskMelee.cs create mode 100644 Items/Weapons/Melee/TerraDiskMelee.png create mode 100644 Items/Weapons/Rogue/TerraDisk.cs create mode 100644 Items/Weapons/Rogue/TerraDisk.png create mode 100644 Projectiles/Typeless/TerraDiskProjectile.cs create mode 100644 Projectiles/Typeless/TerraDiskProjectile.png create mode 100644 Projectiles/Typeless/TerraDiskProjectile2.cs create mode 100644 Projectiles/Typeless/TerraDiskProjectile2.png diff --git a/Items/Weapons/Melee/TerraDiskMelee.cs b/Items/Weapons/Melee/TerraDiskMelee.cs new file mode 100644 index 0000000000..3c7dbd4612 --- /dev/null +++ b/Items/Weapons/Melee/TerraDiskMelee.cs @@ -0,0 +1,74 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Melee +{ + public class TerraDiskMelee : ModItem + { + public static int BaseDamage = 70; + public static float Speed = 12f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Disk"); + Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it +A max of three disks can be active at a time"); + } + + public override void SetDefaults() + { + item.width = 46; + item.height = 46; + item.damage = BaseDamage; + item.knockBack = 4f; + item.useAnimation = 16; + item.useTime = 16; + item.autoReuse = true; + item.noMelee = true; + item.noUseGraphic = true; + + item.useStyle = 1; + item.UseSound = SoundID.Item1; + + item.value = Item.buyPrice(0, 80, 0, 0); + item.rare = 8; + + item.melee = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + if (player.ownedProjectileCounts[item.shoot] >= 3) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + Main.projectile[proj].Calamity().forceMelee = true; + return false; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.SetResult(this); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(TileID.MythrilAnvil); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Melee/TerraDiskMelee.png b/Items/Weapons/Melee/TerraDiskMelee.png new file mode 100644 index 0000000000000000000000000000000000000000..32b39a6f1e1774179573d39b8fc54461cca1d507 GIT binary patch literal 1071 zcmV+~1kn45P)cXo@s+()d_?7|q=pG`6O@s!ZM2K1z)cjm zk!sN{Xi?EdNZJGi(XM@2K}HcoBo@{9sHhaJq%w6(3Z})mpLfogdmUc|cl>W=?m6e4 z^YOpm`G4Q}j)fOi*8vbH%miRnK^_3(-Gecf5V_$}3t+7KqiXo^U{3F?SV|-QC#-}P zo9WQ*-vIPHOp5_z?A!oAMN2&ZM=Gu?YT@gB#{hV7;-;);+3TqRNtjOo#yyz6boVC! z$7>pAov7nk=b{X0Ysk@UN>#=K3uRguK6ARvZYk6He?9;5PYw4i<5uq8!vKtRf7F;Z z;V`R^zi%3V*2Yf&w0D*O@ZsVZ0JT;R028Z*>f;ux>tX;qE*}IO zeHNYVyLu0Be0Jl>Ty26q*M_v`n#yVI`NrcxXD#6A_wP$$xNjK`m<{5~zn-gzRvpT+ z0A4{1pzX;!076Yw0BrAS0^sGXJ^-$^zXu>P`c|8FO{R*7wdA=PGT$%ZTgGR6T#y}B zDzKtoF;+Pli2+bpSH$4j?OpT7O-IN+#{Aefc`Ky98< zo4GRYTgDUeacsRda~3m_UI@O?`i0>&nQ0clw@LNo%C@ZsVBqyvO`S}=AByE$07Dea zZn5nlzGXb%)e(0hv7sWVWPR)^1|0Pe#)at_Uw!R9zwC|3sCpivAX)W5J0GVMY700GvBNV7I8>r1cgXzGd8+?+X&)uzlStA_`2Omc7w+ zv`B0Jd|$Q8Nvp6tXaNlOM_uRjE#ra3P7s&n0gf+=zMFZv=yyxbN`0dJYHOVAR&k(-QJrk}~Vo{sr!?+hr zwJ~+u^mS8Jqypwuhd1>-g&FralbXn80)UdBQjM%Br2(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + if (player.ownedProjectileCounts[item.shoot] >= 3) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + Main.projectile[proj].Calamity().forceRogue = true; + return false; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.SetResult(this); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(TileID.MythrilAnvil); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/TerraDisk.png b/Items/Weapons/Rogue/TerraDisk.png new file mode 100644 index 0000000000000000000000000000000000000000..32b39a6f1e1774179573d39b8fc54461cca1d507 GIT binary patch literal 1071 zcmV+~1kn45P)cXo@s+()d_?7|q=pG`6O@s!ZM2K1z)cjm zk!sN{Xi?EdNZJGi(XM@2K}HcoBo@{9sHhaJq%w6(3Z})mpLfogdmUc|cl>W=?m6e4 z^YOpm`G4Q}j)fOi*8vbH%miRnK^_3(-Gecf5V_$}3t+7KqiXo^U{3F?SV|-QC#-}P zo9WQ*-vIPHOp5_z?A!oAMN2&ZM=Gu?YT@gB#{hV7;-;);+3TqRNtjOo#yyz6boVC! z$7>pAov7nk=b{X0Ysk@UN>#=K3uRguK6ARvZYk6He?9;5PYw4i<5uq8!vKtRf7F;Z z;V`R^zi%3V*2Yf&w0D*O@ZsVZ0JT;R028Z*>f;ux>tX;qE*}IO zeHNYVyLu0Be0Jl>Ty26q*M_v`n#yVI`NrcxXD#6A_wP$$xNjK`m<{5~zn-gzRvpT+ z0A4{1pzX;!076Yw0BrAS0^sGXJ^-$^zXu>P`c|8FO{R*7wdA=PGT$%ZTgGR6T#y}B zDzKtoF;+Pli2+bpSH$4j?OpT7O-IN+#{Aefc`Ky98< zo4GRYTgDUeacsRda~3m_UI@O?`i0>&nQ0clw@LNo%C@ZsVBqyvO`S}=AByE$07Dea zZn5nlzGXb%)e(0hv7sWVWPR)^1|0Pe#)at_Uw!R9zwC|3sCpivAX)W5J0GVMY700GvBNV7I8>r1cgXzGd8+?+X&)uzlStA_`2Omc7w+ zv`B0Jd|$Q8Nvp6tXaNlOM_uRjE#ra3P7s&n0gf+=zMFZv=yyxbN`0dJYHOVAR&k(-QJrk}~Vo{sr!?+hr zwJ~+u^mS8Jqypwuhd1>-g&FralbXn80)UdBQjM%Br2 8f) + { + projectile.localAI[0] = 0f; + float num437 = 6f; + Vector2 value10 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + value10 += projectile.velocity * 4f; + float num438 = num435 - value10.X; + float num439 = num436 - value10.Y; + float num440 = (float)Math.Sqrt((double)(num438 * num438 + num439 * num439)); + num440 = num437 / num440; + if (Main.rand.NextBool(5)) + { + if (projectile.owner == Main.myPlayer) + { + float spread = 60f * 0.0174f; + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; + double deltaAngle = spread / 6f; + double offsetAngle; + int i; + for (i = 0; i < 3; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + int proj = 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); + if (projectile.melee) + Main.projectile[proj].Calamity().forceMelee = true; + else + Main.projectile[proj].Calamity().forceRogue = true; + int proj2 = 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); + if (projectile.melee) + Main.projectile[proj2].Calamity().forceMelee = true; + else + Main.projectile[proj2].Calamity().forceRogue = true; + } + } + } + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Typeless/TerraDiskProjectile.png b/Projectiles/Typeless/TerraDiskProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..32b39a6f1e1774179573d39b8fc54461cca1d507 GIT binary patch literal 1071 zcmV+~1kn45P)cXo@s+()d_?7|q=pG`6O@s!ZM2K1z)cjm zk!sN{Xi?EdNZJGi(XM@2K}HcoBo@{9sHhaJq%w6(3Z})mpLfogdmUc|cl>W=?m6e4 z^YOpm`G4Q}j)fOi*8vbH%miRnK^_3(-Gecf5V_$}3t+7KqiXo^U{3F?SV|-QC#-}P zo9WQ*-vIPHOp5_z?A!oAMN2&ZM=Gu?YT@gB#{hV7;-;);+3TqRNtjOo#yyz6boVC! z$7>pAov7nk=b{X0Ysk@UN>#=K3uRguK6ARvZYk6He?9;5PYw4i<5uq8!vKtRf7F;Z z;V`R^zi%3V*2Yf&w0D*O@ZsVZ0JT;R028Z*>f;ux>tX;qE*}IO zeHNYVyLu0Be0Jl>Ty26q*M_v`n#yVI`NrcxXD#6A_wP$$xNjK`m<{5~zn-gzRvpT+ z0A4{1pzX;!076Yw0BrAS0^sGXJ^-$^zXu>P`c|8FO{R*7wdA=PGT$%ZTgGR6T#y}B zDzKtoF;+Pli2+bpSH$4j?OpT7O-IN+#{Aefc`Ky98< zo4GRYTgDUeacsRda~3m_UI@O?`i0>&nQ0clw@LNo%C@ZsVBqyvO`S}=AByE$07Dea zZn5nlzGXb%)e(0hv7sWVWPR)^1|0Pe#)at_Uw!R9zwC|3sCpivAX)W5J0GVMY700GvBNV7I8>r1cgXzGd8+?+X&)uzlStA_`2Omc7w+ zv`B0Jd|$Q8Nvp6tXaNlOM_uRjE#ra3P7s&n0gf+=zMFZv=yyxbN`0dJYHOVAR&k(-QJrk}~Vo{sr!?+hr zwJ~+u^mS8Jqypwuhd1>-g&FralbXn80)UdBQjM%Br2b~t(gL8E$O?e9Odf!=s!fJi*h^~n{?v86Jg?a5cjMbx3xHWAWRsIp zGD)>-x=96J3=r0Vhwd`~3sZ9dJbk^I@b`6 Date: Sun, 8 Dec 2019 00:19:59 -0500 Subject: [PATCH 75/82] You're gonna need a bigger boat --- Items/Weapons/Rogue/JawsOfOblivion.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index 8631b376d5..31762b9fcc 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -13,7 +13,8 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Jaws of Oblivion"); Tooltip.SetDefault("Throws a tight spread of six venomous reaper fangs that stick in enemies\n" + - "Stealth strikes cause the teeth to emit a crushing shockwave on impact"); + "Stealth strikes cause the teeth to emit a crushing shockwave on impact\n" + + "You're gonna need a bigger boat"); } public override void SafeSetDefaults() From 17a9281bb37fe1d2afee3d43aed174dca0093873 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 8 Dec 2019 00:23:34 -0500 Subject: [PATCH 76/82] preemptively nerfed helium flash the explosion was flat damage which was why the weapon had such insanely high base damage --- Items/Weapons/Magic/HeliumFlash.cs | 2 +- Projectiles/Magic/VolatileStarcore.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 60de40b5fb..6aec678d06 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic { public class HeliumFlash : ModItem { - public static int BaseDamage = 1900; + public static int BaseDamage = 1280; public static float Speed = 15f; public override void SetStaticDefaults() diff --git a/Projectiles/Magic/VolatileStarcore.cs b/Projectiles/Magic/VolatileStarcore.cs index 32a066213e..2b806079d5 100644 --- a/Projectiles/Magic/VolatileStarcore.cs +++ b/Projectiles/Magic/VolatileStarcore.cs @@ -1,5 +1,4 @@ using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Weapons.Magic; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; From c9d323dc777964722abe6dacf304b5a2ff8f1fcf Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 8 Dec 2019 00:23:47 -0500 Subject: [PATCH 77/82] minor refactoring to phantom lance --- Projectiles/Rogue/PhantomLanceProj.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Projectiles/Rogue/PhantomLanceProj.cs b/Projectiles/Rogue/PhantomLanceProj.cs index b98b9cd88e..e265185848 100644 --- a/Projectiles/Rogue/PhantomLanceProj.cs +++ b/Projectiles/Rogue/PhantomLanceProj.cs @@ -1,4 +1,3 @@ -using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -51,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue } } projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default(Color), 0.85f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default, 0.85f); projCount--; if (projCount <= 0) { @@ -59,18 +58,19 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike) { - int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((float)projectile.damage * 0.75f), projectile.knockBack, projectile.owner, 0f, 0f); + int stealthSoulDamage = (int)(projectile.damage * 0.75f); + float stealthSoulKB = projectile.knockBack; + int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), stealthSoulDamage, stealthSoulKB, projectile.owner, 0f, 0f); Main.projectile[stealthSoul].Calamity().forceRogue = true; Main.projectile[stealthSoul].usesLocalNPCImmunity = true; Main.projectile[stealthSoul].localNPCHitCooldown = -2; } else { - double damageMult = 1.0; - damageMult = (double)(projectile.timeLeft) / 300.0; - double newDamage = projectile.damage * damageMult * 0.75; - - int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)newDamage, projectile.knockBack, projectile.owner, 0f, 0f); + float damageMult = projectile.timeLeft * 0.75f / 300f; + int soulDamage = (int)(projectile.damage * damageMult); + float soulKB = projectile.knockBack; + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), soulDamage, soulKB, projectile.owner, 0f, 0f); Main.projectile[soul].Calamity().forceRogue = true; Main.projectile[soul].usesLocalNPCImmunity = true; Main.projectile[soul].localNPCHitCooldown = -2; From c58bb0cc0c3bc86db8cb9d8608adeb8e267c7c0e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 8 Dec 2019 08:22:27 -0500 Subject: [PATCH 78/82] thing --- NPCs/Astral/Hive.png | Bin 5592 -> 2731 bytes Projectiles/Summon/Hive.png | Bin 5592 -> 2731 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/NPCs/Astral/Hive.png b/NPCs/Astral/Hive.png index 081ee1131bf9e3790a700e4afd27d7d26862a607..fcd1ef88275ac04af812f7474cefe5f300e52f43 100644 GIT binary patch literal 2731 zcmZ`*dpy%^8=rJ=cuE>N(5fdQDoH&=L&73O)X1^NUdbWLVVEB_qVf|uP>W0siyV`f z(@cd$q)y~K&$4s<2_%m*Vn9~dG`!c96U%L^Dvx6i&5IV9p=f zs28!+{!^7qg??>n5tN&;5>}PfB0$54eX+XmX>+dc+U>-A3YFS8MR=lYySQ>YciCTQGgD{`G5Fv~+ z{_yphibIviu+QSyg0j`#9N%z{Fy~oFA5v`jaDj6wH+E7Pu|bzMvplpzW}soA`8tVd z40a4%`;kur)*-eCL#ws6Nm@C+W2TM8soM)?2~ro|KrMqf`MdQ~i}qj3#fuT4 zou1xpQ_E)3U5FWV!sw^PNYa`XN%CtcwoDCo*B@JpB}*XfPN|PwTA**CXKZBzFKX!! zVj&-x)SJ5Y+1uba>%I<#b30g}wbOpz8Ef-h<2=r!F35?##4FTLvxG@&k{5EGSJ+_qA)nIfG%3Y?#I zs;`eglrv5H(tI|_R(~+wO+4oi9{1_JHcy`!rk5BU)5mB~3)4kbETL=Kcd5WH8FlW% z6qJ!K*M^%oIrZdQ9p#(WB$$o8I{{Uv^h;fRA~f|jA~kWii7$r9ij&a9>&TwzuP=I- zK6mS%?A2xj&g7Dwe3HtQTje-$*m0Ms?rl@-kG|#M{TeOw@0@dE*(OGxed>%s|6UE< zgrnyVo815}o>6^ibb_OoGJa0k%79o~=u)~StVGT;#}m(*C@zQsZ7UOMPPEhKtG&P? z%EvI|9)F<2#2Tfo+ZTt3o4=?Jn`)ZSB18;vK@*`(jnfTT zI*d;@#)1U{(G0YCeI3jIB>bXCd{D@9B;^v41vsWFms<_CG7Oi&BX7B3VQ=^g)a-C` zB`a1egv!Nf(ZO;qw;;DUIidHR(X0xswJP*0cY$pD_6^hLnygY|(G}g?-rY>B)th;q z(~xKEupDCd*)C7&)zSPPY@Tie3qqB9WUV{tT{%|<#9l}Z?B8$QEj__NCvfuqEXI!o zj0u%HxsO~LqrjwSVD)ev4Jdu#ek5hp#XeH0#T}JKXMDO15Pi62%ProzL(!dXm=G1D zC44;Mn!<(IKc2JiklJSM(^(w#J~*Q8@8UvY^lFj#u%fg*w3MO@_6z0Pro@Rp1i-RG z1Baz+|2Ysck?r8dM-3yrhee&28uP&-S2x=3@(d#I{!fzMh%lxzGn3+87^g8<*f(oN zlUZdDipU`K?&XCNfT5vAkM@S9$!P2S$W)t9qD=;tj@d0F5VnPwN6neyiK#C1q8ZyOpbLi8+g{2o*sl93YV4dc9LY{b8|L(#o2l+}?YNTJ zrfaNbg2K&enNlwD1NOiJOgwBK0R}sOLgQzRcPE#0)3m^PAG2Xvafkp;e z2t=%Uwm1~@ni%*?6&VAeyn{L_ZuvvhnRPaH2zRr(?PPaSh@DhJukCCQBT68CWXfFi zOj=!G^0FCUmutqd6X@N?(u;(mT-g!r1O925Bf9r%+e;$5w{X8)*Yc!e0yfC4Saq<; zY}9|^C^fIL+Fj_{r8t@~xWAbIbQ?)DBK-+KAvNh3zcj2&rMCA@gzDvhtz{-CH+s=H zeIv{6Z=U1#l*-`rxV4&flp7_}RRs z+9;6W41}gmEXm_%#AA1lq>bq88K8Qgf*dLwS5~Mq9n-v5I{q78|F>jKTc^dv4>I4n zV-eIC&H9;H_rFzGU~?@Iu-ZEucfat89mO(4O~85>kVMOToIr_`a%sFX z@^8WliD(+z(In!XwP09-R_XJ&c1I;61HeLSQfbJf;cd7}! zpns06R>r+&itqV7#k=5EmcbN;JDcSc(seZHFE2joH~{qOZokshfVPBj{53VO+CxId&5Cc)=9l9g~br7}wvXVt^5#}Jihu=OWezEU=A_Sx>oF-MeCmG<= zU#a6BRCt}y@g)F%27u`1xt$w_1qYs#)x%jHU-U8CoFVK`T^=&l{BbiF2<^~!HtY)= zcTXS!&;PO)iKkz7%Qq1KH#R&Qi{;GlFj=W=k$AF1WY*T(gvJ%Tqvr|4FQ{~kOAbfy zV~~Lsk(t2`0{HldNGyQ^te|7wS7r8d@71huH?fNVfK$S!d)W}Qq2;P~ufH}ZVegsp zJKZtpED&~RF)!oOKc;BKLQUukaFs3De*6Xo5h&!?lRhQ25=CM;FT6uxVg(lmp>_rG kQK`R&!tcJoKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000XENkln zbhf<}>#E~#A^>>m*r%-*fA+$!qGl?W4aLSs$19J!-!&@!uDDQatztg^U^6Z%tzr=X z>>C|R{3X3!TqrihYhinAqkr}ve1GD5#zx-J@Wt$W@DLWJQjBBG@{Q}F(kfQdTW`$# zwdoht79LBwC`+-8KJxJpS88_kR?{x(o+?)BqAbOd44$Oo?SC&ctW?9}SSzxzo^dQO z8|SZFwmdgBQmHO1l^dM_HnpR_yv8w}jpV8Q2S>A2^ZTeJDwdRuG3~8m-SZ z-R*3w_p`cO*+@!Bl`D;F9~-_O0Pv&NUgU~N*%{SZxrJZzSF%y?-to81&)*7O+c2&H z0199G6aZl2&^7?T%b)yd23JWNJ;lBDOwRn5zc{fB0C?Z2e_4tRed8+tfJcr`006!} zaNE4^2eXM65}slg7Uq#OSCUe^%IJM-$td%M?Pl&=G+FxegAW4$jxnX~`|2wIfWiGc z!e1rjHfB+2`%aTReLaaD8>_0zj3SSJajQ{$_oVgVq*Ubse)H$V-J-BOwsD>-IkJ<2 z6g_?NhNT$AOV7?)&nw|8IRL=nEoL?K^Zw12 zQj)i_GxC#iQteOidaqIT=*2=@znRw`ee)s!VDU+lrOWGzML|^;)~0GOFNQLR`zWMh)YqNKTxl#@I~uXAPSebrfQ z;^rGy0RTthIrQaVvyyv@ltbTGO>fPv78A!ip4AnPJ@-p9Bha`O{5Vz_w_>GSBR{>L z>NrVZ`UYs>yY%fJ()0GLE|&iBs-I%7ee@wKYkD91u2JNzWRKBLQj8R?%1Y*8>Egoi z7|I!^Bl_lNVS8iGnd!tm4elLjT;y|RZ<_tFAl8*!Im#{? zbEcQf_OnSxNtM?oYW^T*!O&9uCZ7QjmhdD8g&zESZXm}t80J&=`fhl&UYm1dlX=$h*U)pOaM&Y8NNU88VwsQT7 z8KL(avXtR#W8XSrRT)9teT$OnDL(RZMI_~1b=~#% z?lW_7?76G63s$yfkA~vPxu_}rc|+&S^Q&xJEBAz2^QWbuB(GIvCHqFM$23%BmuTDe zKr7g^G?Z(PL<-ioHmxhwo3=%I^@nFnr(CA5f9pQN_Ee*vL=i{O8 z%s_h`LDXY+g@%%{G5q~8s$5;lxo9XC1ywZ%ho)H79z17z)=FzFZR|teSlcS5(Xhv) za8Xf8LnZ8+SxQNrj+BNXZ}sNQoL3kv0FXN!DGfy--SMSR8cNzXlh%{X=yVjeV$vO7 z>3(Iisi^Q2qmf?9My`~yJ$$66tn*b$*&YgId(w{d%J#TMdhV^e&GyVpoe0ch%Jwv? zf^Al(BV~Iiw9}DxI`UPlaki(vPDjM{gr``&Y!A($r%#@>6r;!v+r$6g-Fn#`if8-H z>yxK00dRLZiUxWOH?~p=FDq;A=lilf^!(`Dt=N0!b&2iCt(3y*bkx<|XDZg)t1EUT z8js|3kI2>OhzGr&_wymzNur?I-($B|SE7xzI3KrY4xDFf4+Sa0z1TUOj;ij|I#?a< zrOxYg#0izkdM_qb_;|$?skhV7)&~v*T3t}KxGGz&T*IA?-kcB2W9xVI4LkV4H(#=< zfxF%5i1s+zU$J~XZ`Jra&)NUQt?G0{dmQawU6jk^#BrvwXQ7>rgskLDPi41;DW{!| z=mB3X(VdNQx!e-AhrY4%#p(7|Orvg(xkA|3WPm@I#NF$&vb65Atri_Wohu|56w z@5=!|&j)q^0B-%oC?ydqnL6vaW{7=z&R>WCV9RGrcY-5dH$Np}CHsoG`u22v?z2WI zPhurp#aw%={G5@=J!V+qeS4_q0ELTK2}iL)y!SxsL*EW-JfyxozQjs6imkqVr{*6> z#GR{e5B0O4yL(l{O0b=dI90%-Qo%|qanHUz72bk~mEbxZNqu|xJs^7SI>qeyRY%_* zMy4Q?b4D8O+vD2pNqdSJf?=(x(ku*`mA9T^<~xq*DQ5N7W34{LjM$$3%>#id*78%# zVzy_d-S6rQoM{!L+oOGZeBY>jd(tY# zJ*9nncxc}qU&XXJOfF)3j$SOp z^_zJ;Gkts7j_sM5I-zV&;@(E*vOQ9zt89-H>z=!8)p4EEw}*nWJ+4kio!7UAdq84) zTytgi`}Rn`5ZRvl-f2|}eC|}XM`C+s1<$y~#m-}Umf|x2C8kGGLfM{XhxYBsY$)5) zw7D{2-^@}<*&dg-l&%J{P)WC_=fiFk;W}obncm46rAmu|NL{wb0d4MY)^&liIw1edz9^=@a@~<%1&i_ mv~LeR(7rvMp=?ju`2PU;cJvfao9qw(0000N(5fdQDoH&=L&73O)X1^NUdbWLVVEB_qVf|uP>W0siyV`f z(@cd$q)y~K&$4s<2_%m*Vn9~dG`!c96U%L^Dvx6i&5IV9p=f zs28!+{!^7qg??>n5tN&;5>}PfB0$54eX+XmX>+dc+U>-A3YFS8MR=lYySQ>YciCTQGgD{`G5Fv~+ z{_yphibIviu+QSyg0j`#9N%z{Fy~oFA5v`jaDj6wH+E7Pu|bzMvplpzW}soA`8tVd z40a4%`;kur)*-eCL#ws6Nm@C+W2TM8soM)?2~ro|KrMqf`MdQ~i}qj3#fuT4 zou1xpQ_E)3U5FWV!sw^PNYa`XN%CtcwoDCo*B@JpB}*XfPN|PwTA**CXKZBzFKX!! zVj&-x)SJ5Y+1uba>%I<#b30g}wbOpz8Ef-h<2=r!F35?##4FTLvxG@&k{5EGSJ+_qA)nIfG%3Y?#I zs;`eglrv5H(tI|_R(~+wO+4oi9{1_JHcy`!rk5BU)5mB~3)4kbETL=Kcd5WH8FlW% z6qJ!K*M^%oIrZdQ9p#(WB$$o8I{{Uv^h;fRA~f|jA~kWii7$r9ij&a9>&TwzuP=I- zK6mS%?A2xj&g7Dwe3HtQTje-$*m0Ms?rl@-kG|#M{TeOw@0@dE*(OGxed>%s|6UE< zgrnyVo815}o>6^ibb_OoGJa0k%79o~=u)~StVGT;#}m(*C@zQsZ7UOMPPEhKtG&P? z%EvI|9)F<2#2Tfo+ZTt3o4=?Jn`)ZSB18;vK@*`(jnfTT zI*d;@#)1U{(G0YCeI3jIB>bXCd{D@9B;^v41vsWFms<_CG7Oi&BX7B3VQ=^g)a-C` zB`a1egv!Nf(ZO;qw;;DUIidHR(X0xswJP*0cY$pD_6^hLnygY|(G}g?-rY>B)th;q z(~xKEupDCd*)C7&)zSPPY@Tie3qqB9WUV{tT{%|<#9l}Z?B8$QEj__NCvfuqEXI!o zj0u%HxsO~LqrjwSVD)ev4Jdu#ek5hp#XeH0#T}JKXMDO15Pi62%ProzL(!dXm=G1D zC44;Mn!<(IKc2JiklJSM(^(w#J~*Q8@8UvY^lFj#u%fg*w3MO@_6z0Pro@Rp1i-RG z1Baz+|2Ysck?r8dM-3yrhee&28uP&-S2x=3@(d#I{!fzMh%lxzGn3+87^g8<*f(oN zlUZdDipU`K?&XCNfT5vAkM@S9$!P2S$W)t9qD=;tj@d0F5VnPwN6neyiK#C1q8ZyOpbLi8+g{2o*sl93YV4dc9LY{b8|L(#o2l+}?YNTJ zrfaNbg2K&enNlwD1NOiJOgwBK0R}sOLgQzRcPE#0)3m^PAG2Xvafkp;e z2t=%Uwm1~@ni%*?6&VAeyn{L_ZuvvhnRPaH2zRr(?PPaSh@DhJukCCQBT68CWXfFi zOj=!G^0FCUmutqd6X@N?(u;(mT-g!r1O925Bf9r%+e;$5w{X8)*Yc!e0yfC4Saq<; zY}9|^C^fIL+Fj_{r8t@~xWAbIbQ?)DBK-+KAvNh3zcj2&rMCA@gzDvhtz{-CH+s=H zeIv{6Z=U1#l*-`rxV4&flp7_}RRs z+9;6W41}gmEXm_%#AA1lq>bq88K8Qgf*dLwS5~Mq9n-v5I{q78|F>jKTc^dv4>I4n zV-eIC&H9;H_rFzGU~?@Iu-ZEucfat89mO(4O~85>kVMOToIr_`a%sFX z@^8WliD(+z(In!XwP09-R_XJ&c1I;61HeLSQfbJf;cd7}! zpns06R>r+&itqV7#k=5EmcbN;JDcSc(seZHFE2joH~{qOZokshfVPBj{53VO+CxId&5Cc)=9l9g~br7}wvXVt^5#}Jihu=OWezEU=A_Sx>oF-MeCmG<= zU#a6BRCt}y@g)F%27u`1xt$w_1qYs#)x%jHU-U8CoFVK`T^=&l{BbiF2<^~!HtY)= zcTXS!&;PO)iKkz7%Qq1KH#R&Qi{;GlFj=W=k$AF1WY*T(gvJ%Tqvr|4FQ{~kOAbfy zV~~Lsk(t2`0{HldNGyQ^te|7wS7r8d@71huH?fNVfK$S!d)W}Qq2;P~ufH}ZVegsp zJKZtpED&~RF)!oOKc;BKLQUukaFs3De*6Xo5h&!?lRhQ25=CM;FT6uxVg(lmp>_rG kQK`R&!tcJoKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000XENkln zbhf<}>#E~#A^>>m*r%-*fA+$!qGl?W4aLSs$19J!-!&@!uDDQatztg^U^6Z%tzr=X z>>C|R{3X3!TqrihYhinAqkr}ve1GD5#zx-J@Wt$W@DLWJQjBBG@{Q}F(kfQdTW`$# zwdoht79LBwC`+-8KJxJpS88_kR?{x(o+?)BqAbOd44$Oo?SC&ctW?9}SSzxzo^dQO z8|SZFwmdgBQmHO1l^dM_HnpR_yv8w}jpV8Q2S>A2^ZTeJDwdRuG3~8m-SZ z-R*3w_p`cO*+@!Bl`D;F9~-_O0Pv&NUgU~N*%{SZxrJZzSF%y?-to81&)*7O+c2&H z0199G6aZl2&^7?T%b)yd23JWNJ;lBDOwRn5zc{fB0C?Z2e_4tRed8+tfJcr`006!} zaNE4^2eXM65}slg7Uq#OSCUe^%IJM-$td%M?Pl&=G+FxegAW4$jxnX~`|2wIfWiGc z!e1rjHfB+2`%aTReLaaD8>_0zj3SSJajQ{$_oVgVq*Ubse)H$V-J-BOwsD>-IkJ<2 z6g_?NhNT$AOV7?)&nw|8IRL=nEoL?K^Zw12 zQj)i_GxC#iQteOidaqIT=*2=@znRw`ee)s!VDU+lrOWGzML|^;)~0GOFNQLR`zWMh)YqNKTxl#@I~uXAPSebrfQ z;^rGy0RTthIrQaVvyyv@ltbTGO>fPv78A!ip4AnPJ@-p9Bha`O{5Vz_w_>GSBR{>L z>NrVZ`UYs>yY%fJ()0GLE|&iBs-I%7ee@wKYkD91u2JNzWRKBLQj8R?%1Y*8>Egoi z7|I!^Bl_lNVS8iGnd!tm4elLjT;y|RZ<_tFAl8*!Im#{? zbEcQf_OnSxNtM?oYW^T*!O&9uCZ7QjmhdD8g&zESZXm}t80J&=`fhl&UYm1dlX=$h*U)pOaM&Y8NNU88VwsQT7 z8KL(avXtR#W8XSrRT)9teT$OnDL(RZMI_~1b=~#% z?lW_7?76G63s$yfkA~vPxu_}rc|+&S^Q&xJEBAz2^QWbuB(GIvCHqFM$23%BmuTDe zKr7g^G?Z(PL<-ioHmxhwo3=%I^@nFnr(CA5f9pQN_Ee*vL=i{O8 z%s_h`LDXY+g@%%{G5q~8s$5;lxo9XC1ywZ%ho)H79z17z)=FzFZR|teSlcS5(Xhv) za8Xf8LnZ8+SxQNrj+BNXZ}sNQoL3kv0FXN!DGfy--SMSR8cNzXlh%{X=yVjeV$vO7 z>3(Iisi^Q2qmf?9My`~yJ$$66tn*b$*&YgId(w{d%J#TMdhV^e&GyVpoe0ch%Jwv? zf^Al(BV~Iiw9}DxI`UPlaki(vPDjM{gr``&Y!A($r%#@>6r;!v+r$6g-Fn#`if8-H z>yxK00dRLZiUxWOH?~p=FDq;A=lilf^!(`Dt=N0!b&2iCt(3y*bkx<|XDZg)t1EUT z8js|3kI2>OhzGr&_wymzNur?I-($B|SE7xzI3KrY4xDFf4+Sa0z1TUOj;ij|I#?a< zrOxYg#0izkdM_qb_;|$?skhV7)&~v*T3t}KxGGz&T*IA?-kcB2W9xVI4LkV4H(#=< zfxF%5i1s+zU$J~XZ`Jra&)NUQt?G0{dmQawU6jk^#BrvwXQ7>rgskLDPi41;DW{!| z=mB3X(VdNQx!e-AhrY4%#p(7|Orvg(xkA|3WPm@I#NF$&vb65Atri_Wohu|56w z@5=!|&j)q^0B-%oC?ydqnL6vaW{7=z&R>WCV9RGrcY-5dH$Np}CHsoG`u22v?z2WI zPhurp#aw%={G5@=J!V+qeS4_q0ELTK2}iL)y!SxsL*EW-JfyxozQjs6imkqVr{*6> z#GR{e5B0O4yL(l{O0b=dI90%-Qo%|qanHUz72bk~mEbxZNqu|xJs^7SI>qeyRY%_* zMy4Q?b4D8O+vD2pNqdSJf?=(x(ku*`mA9T^<~xq*DQ5N7W34{LjM$$3%>#id*78%# zVzy_d-S6rQoM{!L+oOGZeBY>jd(tY# zJ*9nncxc}qU&XXJOfF)3j$SOp z^_zJ;Gkts7j_sM5I-zV&;@(E*vOQ9zt89-H>z=!8)p4EEw}*nWJ+4kio!7UAdq84) zTytgi`}Rn`5ZRvl-f2|}eC|}XM`C+s1<$y~#m-}Umf|x2C8kGGLfM{XhxYBsY$)5) zw7D{2-^@}<*&dg-l&%J{P)WC_=fiFk;W}obncm46rAmu|NL{wb0d4MY)^&liIw1edz9^=@a@~<%1&i_ mv~LeR(7rvMp=?ju`2PU;cJvfao9qw(0000 Date: Sun, 8 Dec 2019 08:26:03 -0500 Subject: [PATCH 79/82] slightly nerfed sticky bol stealth strike/ made bouncy bol obtainable --- Items/Weapons/Rogue/BouncySpikyBall.cs | 4 ++-- Items/Weapons/Rogue/StickySpikyBall.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/BouncySpikyBall.cs b/Items/Weapons/Rogue/BouncySpikyBall.cs index 93981d333d..ab8d132080 100644 --- a/Items/Weapons/Rogue/BouncySpikyBall.cs +++ b/Items/Weapons/Rogue/BouncySpikyBall.cs @@ -49,7 +49,7 @@ Stealth strikes provide a bigger boost after richocheting"); return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpikyBall, 3); @@ -57,6 +57,6 @@ Stealth strikes provide a bigger boost after richocheting"); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(this, 3); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index 738ebac6fd..1b61bd93fd 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -48,6 +48,7 @@ Stealth strikes throw seven at once and last a lot longer"); int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = true; Main.projectile[proj].timeLeft *= 4; + Main.projectile[proj].localNPCHitCooldown += 15; spread -= Main.rand.Next(1,4); } return false; From 9d1a058a95290f1ee475ba4ffd4975eddbb146b7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 8 Dec 2019 13:40:59 -0500 Subject: [PATCH 80/82] nerfed firestorm cannon --- Items/Weapons/Ranged/FirestormCannon.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 0d265139da..4c57fada4d 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 18; + item.damage = 9; item.ranged = true; item.width = 56; item.height = 28; @@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f; - int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f); + int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 1.6), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[flare].penetrate = 1; Main.projectile[flare].timeLeft = 600; Main.projectile[flare].Calamity().forceRanged = true; From 94f98ca2d7c76cb75915a4951634da337d60f454 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 8 Dec 2019 13:50:01 -0500 Subject: [PATCH 81/82] added defective spheres --- CalamityMod.cs | 9 +- Items/Weapons/Rogue/DefectiveSphere.cs | 100 +++++++++++++++++++ Items/Weapons/Rogue/DefectiveSphere.png | Bin 0 -> 723 bytes Items/Weapons/Rogue/GodsParanoia.cs | 4 +- Items/Weapons/Rogue/HellsSun.cs | 4 +- Items/Weapons/Rogue/SkyStabber.cs | 4 +- Projectiles/Rogue/SphereBladed.cs | 126 ++++++++++++++++++++++++ Projectiles/Rogue/SphereBladed.png | Bin 0 -> 781 bytes Projectiles/Rogue/SphereBlue.cs | 126 ++++++++++++++++++++++++ Projectiles/Rogue/SphereBlue.png | Bin 0 -> 767 bytes Projectiles/Rogue/SphereSpiked.cs | 56 +++++++++++ Projectiles/Rogue/SphereSpiked.png | Bin 0 -> 723 bytes Projectiles/Rogue/SphereYellow.cs | 62 ++++++++++++ Projectiles/Rogue/SphereYellow.png | Bin 0 -> 746 bytes 14 files changed, 483 insertions(+), 8 deletions(-) create mode 100644 Items/Weapons/Rogue/DefectiveSphere.cs create mode 100644 Items/Weapons/Rogue/DefectiveSphere.png create mode 100644 Projectiles/Rogue/SphereBladed.cs create mode 100644 Projectiles/Rogue/SphereBladed.png create mode 100644 Projectiles/Rogue/SphereBlue.cs create mode 100644 Projectiles/Rogue/SphereBlue.png create mode 100644 Projectiles/Rogue/SphereSpiked.cs create mode 100644 Projectiles/Rogue/SphereSpiked.png create mode 100644 Projectiles/Rogue/SphereYellow.cs create mode 100644 Projectiles/Rogue/SphereYellow.png diff --git a/CalamityMod.cs b/CalamityMod.cs index b80626c1a1..56edcb11a7 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1779,7 +1779,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; boomerangProjList = new List() @@ -1812,7 +1813,11 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() }; javelinList = new List() diff --git a/Items/Weapons/Rogue/DefectiveSphere.cs b/Items/Weapons/Rogue/DefectiveSphere.cs new file mode 100644 index 0000000000..92340f2238 --- /dev/null +++ b/Items/Weapons/Rogue/DefectiveSphere.cs @@ -0,0 +1,100 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class DefectiveSphere : RogueWeapon + { + public static int BaseDamage = 80; + public static float Speed = 15f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Defective Sphere"); + Tooltip.SetDefault(@"Fires a variety deadly spheres with different effects +Stacks up to 5 +Stealth strikes launch all 4 sphere types at once"); + } + + public override void SafeSetDefaults() + { + item.width = 42; + item.height = 44; + item.damage = BaseDamage; + item.knockBack = 5f; + item.useAnimation = 13; + item.useTime = 13; + item.autoReuse = true; + item.noMelee = true; + item.noUseGraphic = true; + item.maxStack = 5; + + item.useStyle = 1; + item.UseSound = SoundID.Item15; //phaseblade sound effect + + item.value = Item.buyPrice(0, 16, 0, 0); + item.rare = 8; + + item.Calamity().rogue = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + int UseMax = item.stack; + + if (player.Calamity().StealthStrikeAvailable()) + { + return true; + } + else if ((player.ownedProjectileCounts[item.shoot] + player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()]) >= UseMax) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int sphereType = type; + if (Main.rand.NextBool(4)) + sphereType = ModContent.ProjectileType(); + else if (Main.rand.NextBool(3)) + sphereType = ModContent.ProjectileType(); + else if (Main.rand.NextBool(2)) + sphereType = ModContent.ProjectileType(); + float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX2 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY2 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX3 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY3 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX4 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY4 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + + if (player.Calamity().StealthStrikeAvailable()) + { + int stealth = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth2 = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth3 = Projectile.NewProjectile(position.X, position.Y, SpeedX3, SpeedY3, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth4 = Projectile.NewProjectile(position.X, position.Y, SpeedX4, SpeedY4, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + Main.projectile[stealth2].Calamity().stealthStrike = true; + Main.projectile[stealth3].Calamity().stealthStrike = true; + Main.projectile[stealth4].Calamity().stealthStrike = true; + } + else + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), sphereType, damage, knockBack, player.whoAmI, 0f, 0f); + } + return false; + } + } +} diff --git a/Items/Weapons/Rogue/DefectiveSphere.png b/Items/Weapons/Rogue/DefectiveSphere.png new file mode 100644 index 0000000000000000000000000000000000000000..c4c2b56c25fb40f680ac4202ecffe890d070548e GIT binary patch literal 723 zcmV;^0xbQBP)&C$VSpmit`i-UDAAXuUe6o(KDC`yM;eGac*ANS;kZSp$YXFkj0 zzI(acd~)tR=RSy;(fn92njZ_|p0_vd2{()GLgOYC*F=iTy_pjL3=UNTfVXd6_rx*( z|7Udjj-3D;Kim(%QYjtlLcKBCas1fWTq?bH`fJ~-KK7m~IyiK? zqf;RHMlWBv8361`9{{4=F6N8jQ~fdwv}M*CqZ^JF?eYuxi_ZH)=T8Cf>DjFF{>k(d z5S_E4{B@z>{LM^zV|3jyDw8rZUo5vAZ~K4$`suX$c88hEnyyur8`iSPGb)CM&p2(x z=EJME0hpV8;q-4wh34)(xC7Li{xJ6(hzy_2UjpFe^rSP+8>9c+_4fXw%ww?z`u1!C zpjKISOsN)7#*#_#xwz=G7fSDXz$2q|F=}_WGK)oKWLO3Z_xFVZMxFwYJ9xC^0-71L z_+zwL3@Ufe%)A2XGl^nLIsDkkb79BGU1!|2>$d=yc>Jj4LYkQr-WaX>71_){08z}@ zU8&tF`uAsnDD&7Fz?vLiT>;=m@78d>wNoLvMlCWdrqU_Lh)|5$JCm^g#ClDNd0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLk FV1mPbS%?4t literal 0 HcmV?d00001 diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index 6bf8bbc59e..3b9acfeada 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -63,9 +63,9 @@ Right click to delete all existing spiky balls"); } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Items/Weapons/Rogue/HellsSun.cs b/Items/Weapons/Rogue/HellsSun.cs index 6ad54e1225..051015b9d6 100644 --- a/Items/Weapons/Rogue/HellsSun.cs +++ b/Items/Weapons/Rogue/HellsSun.cs @@ -64,9 +64,9 @@ namespace CalamityMod.Items.Weapons.Rogue } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Items/Weapons/Rogue/SkyStabber.cs b/Items/Weapons/Rogue/SkyStabber.cs index 972356a811..000305ce8a 100644 --- a/Items/Weapons/Rogue/SkyStabber.cs +++ b/Items/Weapons/Rogue/SkyStabber.cs @@ -60,9 +60,9 @@ namespace CalamityMod.Items.Weapons.Rogue } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Projectiles/Rogue/SphereBladed.cs b/Projectiles/Rogue/SphereBladed.cs new file mode 100644 index 0000000000..32c85f80c0 --- /dev/null +++ b/Projectiles/Rogue/SphereBladed.cs @@ -0,0 +1,126 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereBladed : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bladed Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.tileCollide = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.Calamity().rogue = true; + projectile.usesIDStaticNPCImmunity = true; + projectile.idStaticNPCHitCooldown = 10; + projectile.timeLeft = 300; + projectile.tileCollide = false; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 1f, 0f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 8; + Main.PlaySound(SoundID.Item7, projectile.position); + } + if (projectile.ai[0] == 0f) + { + projectile.ai[1] += 1f; + if (projectile.ai[1] >= 25f) + { + projectile.ai[0] = 1f; + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + } + else + { + float num42 = 16f; + float num43 = 3.2f; + Vector2 vector2 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num44 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector2.X; + float num45 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector2.Y; + float num46 = (float)Math.Sqrt((double)(num44 * num44 + num45 * num45)); + if (num46 > 3000f) + { + projectile.Kill(); + } + num46 = num42 / num46; + num44 *= num46; + num45 *= num46; + if (projectile.velocity.X < num44) + { + projectile.velocity.X = projectile.velocity.X + num43; + if (projectile.velocity.X < 0f && num44 > 0f) + { + projectile.velocity.X = projectile.velocity.X + num43; + } + } + else if (projectile.velocity.X > num44) + { + projectile.velocity.X = projectile.velocity.X - num43; + if (projectile.velocity.X > 0f && num44 < 0f) + { + projectile.velocity.X = projectile.velocity.X - num43; + } + } + if (projectile.velocity.Y < num45) + { + projectile.velocity.Y = projectile.velocity.Y + num43; + if (projectile.velocity.Y < 0f && num45 > 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num43; + } + } + else if (projectile.velocity.Y > num45) + { + projectile.velocity.Y = projectile.velocity.Y - num43; + if (projectile.velocity.Y > 0f && num45 < 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num43; + } + } + if (Main.myPlayer == projectile.owner) + { + Rectangle rectangle = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + Rectangle value2 = new Rectangle((int)Main.player[projectile.owner].position.X, (int)Main.player[projectile.owner].position.Y, Main.player[projectile.owner].width, Main.player[projectile.owner].height); + if (rectangle.Intersects(value2)) + { + projectile.Kill(); + } + } + } + projectile.rotation += 0.5f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.PlaySound(3, (int)projectile.Center.X, (int)projectile.Center.Y, 34); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereBladed.png b/Projectiles/Rogue/SphereBladed.png new file mode 100644 index 0000000000000000000000000000000000000000..b90214da3ac12b920b0b13228000f4731aca6650 GIT binary patch literal 781 zcmV+o1M>WdP)=Qj-juz6$;0K3PE0PH+=$Qgg_ z++_eZ4sBCY1khai2|%s>B2kgd73g{^F`w9f)M4zy>xIUu{a=?q0?_zW1K`H*UjU3( zD!CvOXn8=)i^HRd46E}qPP-Hm9!=eKp7)j}68})lh3pmZF}I8r*JsXNjG*le>wylp z$5B)mbo$?xN>Qg0*(+cht*ToWoq6(AryUAKR+0QIZnjDPUpUuDG9{dkDbH$|ksWAg-K_lutQ|G`}pbI)C^I zSS93YF;)gt?dPi-Y`xGw3Mjr66=Gbux+NYkc^`n%j$IC8!79=}3fQ>TbBp2R6{r9F zg-Zb3x_LcTYUMnUhVT?n+$yK*S)bbFrf=VIekbO3p5PVm?uPb+WTEJ=jJ5VH4m)o^F`V`df?Cu$k0#=E9VX&t=9v>`YAF@}#p68{2T&}fNzlFv%m#Pl) z4o}7Xp3IoJ0$uAW2D;rzVPkdNdbeId_DPWb5i?!DFlq^h7-2>WngzARi zcf+1z`@g*{{{txKGiO$}rL+J501|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000 LNkvXXu0mjf3A%4w literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/SphereBlue.cs b/Projectiles/Rogue/SphereBlue.cs new file mode 100644 index 0000000000..2b063098c7 --- /dev/null +++ b/Projectiles/Rogue/SphereBlue.cs @@ -0,0 +1,126 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using System; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereBlue : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blue Thruster Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; + projectile.tileCollide = false; + projectile.Calamity().rogue = true; + projectile.extraUpdates = 1; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, 0f, 1f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + projectile.ai[0] += 1f; + if (projectile.ai[0] >= 5f) + { + projectile.tileCollide = true; + } + projectile.rotation += projectile.velocity.X * 0.02f; + projectile.velocity.Y = projectile.velocity.Y + 0.085f; + projectile.velocity.X = projectile.velocity.X * 0.99f; + float pcx = projectile.Center.X; + float pcy = projectile.Center.Y; + float var1 = 800f; + bool flag = false; + for (int npcvar = 0; npcvar < 200; npcvar++) + { + if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1)) + { + float var2 = Main.npc[npcvar].position.X + (Main.npc[npcvar].width / 2); + float var3 = Main.npc[npcvar].position.Y + (Main.npc[npcvar].height / 2); + float var4 = Math.Abs(projectile.position.X + (projectile.width / 2) - var2) + Math.Abs(projectile.position.Y + (projectile.height / 2) - var3); + if (var4 < var1) + { + var1 = var4; + pcx = var2; + pcy = var3; + flag = true; + } + } + } + if (flag) + { + float homingstrenght = 16f; + Vector2 vector1 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f); + float var6 = pcx - vector1.X; + float var7 = pcy - vector1.Y; + float var8 = (float)Math.Sqrt(var6 * var6 + var7 * var7); + var8 = homingstrenght / var8; + var6 *= var8; + var7 *= var8; + projectile.velocity.X = (projectile.velocity.X * 20f + var6) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + var7) / 21f; + } + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 192; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + Main.PlaySound(4, (int)projectile.Center.X, (int)projectile.Center.Y, 37); + for (int num625 = 0; num625 < 3; num625++) + { + float scaleFactor10 = 0.33f; + if (num625 == 1) + { + scaleFactor10 = 0.66f; + } + if (num625 == 2) + { + scaleFactor10 = 1f; + } + int defectiveBruh = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(660, 662), 1f); + Main.gore[defectiveBruh].velocity *= scaleFactor10; + Main.gore[defectiveBruh].velocity += projectile.velocity; + } + for (int num194 = 0; num194 < 25; num194++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 226, + 229 + }); + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 0f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereBlue.png b/Projectiles/Rogue/SphereBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..9718044895c233091fa389e813d24c26d65276c5 GIT binary patch literal 767 zcmVuQnt)6!!l&(UdQkd4iF*Kdm>h)wVz+ zMXcW%cYLuN5wzYcSQ#43HQT<^r(!3#JA6BlZ27?9*e_FkSTP42UnoZeB`X$1ZsV5S zhS~Jg%fyLiKhGHb(x$BdG(OZ~?W<27=aXPz-bfe=eaBA*5Ru!}RRW+=86j?5dNt7q zpEvtoX5Itv{o7Xny7wJ5#$7~nOfZyUNF+qY_m9Nd>$#*DUA<}%nOx_y>qF5A35p%`Zi>Kp%PpFiHKrJ#M(Ek0;1h1yR^*X($XQQlV4g_+zdp-bUUeq z_qy_kA3Kkoqtmo>2-+D$yH~ljI%L|PJ$C_s8`rM_(7wL-PY!0Dpz{o}Z^Fu*l44M@ zZ#5$4lAVKH=V9gvrpBPi={~0%Yv1!+=bU2C-o4wpIste$QBPby{{$uFV*5TPq9Q5T zyH+u`XMcCBy-S%VnEJ1-+~XU>B;E5?^bP{>@z!|&I?h}JVEX0>!+yuky+&WLS9|l! zT)!=6m4zqedzMnT*&C$VSpmit`i-UDAAXuUe6o(KDC`yM;eGac*ANS;kZSp$YXFkj0 zzI(acd~)tR=RSy;(fn92njZ_|p0_vd2{()GLgOYC*F=iTy_pjL3=UNTfVXd6_rx*( z|7Udjj-3D;Kim(%QYjtlLcKBCas1fWTq?bH`fJ~-KK7m~IyiK? zqf;RHMlWBv8361`9{{4=F6N8jQ~fdwv}M*CqZ^JF?eYuxi_ZH)=T8Cf>DjFF{>k(d z5S_E4{B@z>{LM^zV|3jyDw8rZUo5vAZ~K4$`suX$c88hEnyyur8`iSPGb)CM&p2(x z=EJME0hpV8;q-4wh34)(xC7Li{xJ6(hzy_2UjpFe^rSP+8>9c+_4fXw%ww?z`u1!C zpjKISOsN)7#*#_#xwz=G7fSDXz$2q|F=}_WGK)oKWLO3Z_xFVZMxFwYJ9xC^0-71L z_+zwL3@Ufe%)A2XGl^nLIsDkkb79BGU1!|2>$d=yc>Jj4LYkQr-WaX>71_){08z}@ zU8&tF`uAsnDD&7Fz?vLiT>;=m@78d>wNoLvMlCWdrqU_Lh)|5$JCm^g#ClDNd0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLk FV1mPbS%?4t literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/SphereYellow.cs b/Projectiles/Rogue/SphereYellow.cs new file mode 100644 index 0000000000..a28278f01a --- /dev/null +++ b/Projectiles/Rogue/SphereYellow.cs @@ -0,0 +1,62 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereYellow : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Yellow Thruster Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 300; + aiType = 52; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 1f, 1f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.PlaySound(3, (int)projectile.Center.X, (int)projectile.Center.Y, 34); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereYellow.png b/Projectiles/Rogue/SphereYellow.png new file mode 100644 index 0000000000000000000000000000000000000000..b9f5952c35ce4f7c7876bd72f145c807145229e6 GIT binary patch literal 746 zcmV9Bd)aws z-kJA(Kl^>&=Y3zxzK6{=SwmPfPF%P7g`pa-;F!~SBlpINBp=_4kg=n?t+2TYG6BF zKU~G0V9n@tZ(P0A3qV`0SE=`P>0RiDs~hV|IeR3plvkD=a#N31)edQ1PaZ*$cuvUm zbY%e;A0GqYVCzxkzUckjic`UwkW=s#nLv1;gOrdZw zu)a=CJi2fH0p)jg<|*KNvbwev+QH-!)Jf=3eEf1h0H2;r0=^f8q!2Ud?bK|f4#u8f z-TbOYvq+EXnaO9$^QKHI00YHqKy5V7&wT-4Vd-^fA7W3it_MvLuZfq0So7h%Ky7r& ze794jkDwmaLQHb1Rel9P-&jF;ulvj;!1rQxEhSMLnV^hZFAEu~d_#F&8oUj_$nXOI znp+%?>Z_c3N!;>k);UDXIV(Pqz0=i>QY<$gYQ$_Dd%n0$i61I_|_=!261 zOgUEOMbk?Aw?^(*S3BTm6qAxqP$auI*`;~wIc?o2lBg94sgq~B0Y4|#Q+f!B#FK-g zYHl5^JXFem{;Km`=ZVum?P_Lz`ny}h*-fTrS7*}4`{!+d&N~y4-fhoj15Xx~-!wTF zhLZ(3RZAbi-BM~!w;FmL4QV=Ijf)a@%Ks1fSoJB3mkDhE000tnMObu2SV=}YPjYEx cZggREX>V=-F@#v`?*IS*07*qoM6N<$f~1#KL;wH) literal 0 HcmV?d00001 From e40f7f6f8f3c81184182bbdde3498910b18c2d79 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 8 Dec 2019 13:57:44 -0500 Subject: [PATCH 82/82] blazing star sprite fix --- Items/Weapons/Rogue/BlazingStar.png | Bin 593 -> 628 bytes Projectiles/Rogue/BlazingStarProj.png | Bin 593 -> 628 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Items/Weapons/Rogue/BlazingStar.png b/Items/Weapons/Rogue/BlazingStar.png index 75c05587da8028e8337199b0bf38b891aa1dc0f1..ac480e43b132e3cf200ae5bf76327e255a4273b1 100644 GIT binary patch literal 628 zcmV-)0*n2LP)glL*qqL?fsLMTOEhymyTEn46eE-t#{txgUA|-#zb~ za|0-Su4&0W|9*6J9H0c1y1uNG&EG;n+raKX69D5I4OxJ_n{&faV_lQs^z0%X$hSVW zO12OQ{}G5*H2_fE`2m2w#2o;WuA{GOH(7v*{%HVyt&J7@0~<;I5s>Je>~Wsy@AfqS zZ5`%%+|X5I{U{~(>@^}&gHB`@`RyC*l_Ztxfg() z(-VV;{C@an9f05WweC(22GQ}2|3L1o@ScEnEP8t1gU;EGp2m%FaVpNW+BzQc64m*@ za{@*4yhL|bYus?2%A|~Wk{3kt$vI=5&XoQqpmV)MyEytj_`{gLyt2e|QlhPcMSl|r z7Mq|Qr80{J=i6e$CeH~JjR86P;r5@#xUPaaBNjV*{}Qm(2B~g3^Vu?@CZKyo-w=3u z3%-4d8vTH1KT+;{sJMNV^O=tcXWWg6>VH)QtF7k*0{YCQ7nJ&~`vO}HklZhQgH5_B zdQRX)KM-|07Kw#ifA5T+U8VEh3vy&yfL!c!PE`UhG;(P;7kN&=nx%AX=(DrkjAWhM zFNEa#?TFs`w(L29M_xGY>iE8%AOHXW5_CmabVXQ6MmkS&X=QG7VRUJ4ZU8ZaSnTfr O0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0p>|WK~z{r-IhBj zg>e|h4+}bS?YJC~MJ7gu!*t4JQ3ktGNCpPPA`4+)kWk8QP!^XmVPIsEMagl^EyCjV zob#yj=;dVb=UIN|`#N9edw;#>egAPDNpX77OXMT6ceVfNJ749e&&Nmj>oJY2H{{~F zcj+12xH|<|VU901s`8WbW8By0E9Z~F@65Psq$$4w6-|z1;Ci*^0W1$bfu#%k;9&g- z*tgIPT1FT(%g~g2MyyISHJkTfd!PfP5yqe8k9-PeIp76TtJ1)m)oW0D#~mY<3BIw{ zp8~S7uA?Bx>>ezFC53e$uLmB(J;vT**ekP#8&Un~o)L}Ci|Vr0cYH)mFuYHL%y;v| z-8rIBBdj=d76KX06=q^{9OU;nXRNqyM0W}211oH9Yyp{>xoJ>)X=Qr~{69vl3N0gQ zjN%=m!gF8mFC#;hc&n4E5;cn5btI;j&-W<_x zu1L-XwO6zf&KW(;@6;E8?5(QdB(SYB++%t&W8C}KXtZ}MBaF@qHLK5S+&98#4_Osi fiS>C$jCee++DHQ4gn4^Q00000NkvXXu0mjfNlp=o diff --git a/Projectiles/Rogue/BlazingStarProj.png b/Projectiles/Rogue/BlazingStarProj.png index 75c05587da8028e8337199b0bf38b891aa1dc0f1..ac480e43b132e3cf200ae5bf76327e255a4273b1 100644 GIT binary patch literal 628 zcmV-)0*n2LP)glL*qqL?fsLMTOEhymyTEn46eE-t#{txgUA|-#zb~ za|0-Su4&0W|9*6J9H0c1y1uNG&EG;n+raKX69D5I4OxJ_n{&faV_lQs^z0%X$hSVW zO12OQ{}G5*H2_fE`2m2w#2o;WuA{GOH(7v*{%HVyt&J7@0~<;I5s>Je>~Wsy@AfqS zZ5`%%+|X5I{U{~(>@^}&gHB`@`RyC*l_Ztxfg() z(-VV;{C@an9f05WweC(22GQ}2|3L1o@ScEnEP8t1gU;EGp2m%FaVpNW+BzQc64m*@ za{@*4yhL|bYus?2%A|~Wk{3kt$vI=5&XoQqpmV)MyEytj_`{gLyt2e|QlhPcMSl|r z7Mq|Qr80{J=i6e$CeH~JjR86P;r5@#xUPaaBNjV*{}Qm(2B~g3^Vu?@CZKyo-w=3u z3%-4d8vTH1KT+;{sJMNV^O=tcXWWg6>VH)QtF7k*0{YCQ7nJ&~`vO}HklZhQgH5_B zdQRX)KM-|07Kw#ifA5T+U8VEh3vy&yfL!c!PE`UhG;(P;7kN&=nx%AX=(DrkjAWhM zFNEa#?TFs`w(L29M_xGY>iE8%AOHXW5_CmabVXQ6MmkS&X=QG7VRUJ4ZU8ZaSnTfr O0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0p>|WK~z{r-IhBj zg>e|h4+}bS?YJC~MJ7gu!*t4JQ3ktGNCpPPA`4+)kWk8QP!^XmVPIsEMagl^EyCjV zob#yj=;dVb=UIN|`#N9edw;#>egAPDNpX77OXMT6ceVfNJ749e&&Nmj>oJY2H{{~F zcj+12xH|<|VU901s`8WbW8By0E9Z~F@65Psq$$4w6-|z1;Ci*^0W1$bfu#%k;9&g- z*tgIPT1FT(%g~g2MyyISHJkTfd!PfP5yqe8k9-PeIp76TtJ1)m)oW0D#~mY<3BIw{ zp8~S7uA?Bx>>ezFC53e$uLmB(J;vT**ekP#8&Un~o)L}Ci|Vr0cYH)mFuYHL%y;v| z-8rIBBdj=d76KX06=q^{9OU;nXRNqyM0W}211oH9Yyp{>xoJ>)X=Qr~{69vl3N0gQ zjN%=m!gF8mFC#;hc&n4E5;cn5btI;j&-W<_x zu1L-XwO6zf&KW(;@6;E8?5(QdB(SYB++%t&W8C}KXtZ}MBaF@qHLK5S+&98#4_Osi fiS>C$jCee++DHQ4gn4^Q00000NkvXXu0mjfNlp=o