From 707fc865709734d5bc1098bba6d7147bdd529e9a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 15 Jun 2021 17:34:32 -0400 Subject: [PATCH 1/8] Fixed SS ratios on Hypothermia, Utensil Poker, Eclipse's Fall --- Items/Weapons/Rogue/Hypothermia.cs | 2 +- Items/Weapons/Rogue/UtensilPoker.cs | 2 +- Projectiles/Rogue/EclipsesSmol.cs | 26 +++++++++++++------------- Projectiles/Rogue/EclipsesStealth.cs | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 206310586a..efb15d0d20 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int stealthDamage = (int)(damage * 1.75f); + int stealthDamage = (int)(damage * 1.2f); for (int i = 0; i < 4; ++i) { Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.07f) * Main.rand.NextFloat(1.1f, 1.18f); diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 223cf34a30..4500d58c06 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (mp.StealthStrikeAvailable()) { - int stealthDamage = (int)(2.4f * damage); + int stealthDamage = damage * 2; float stealthSpeedMult = 1.4f; Vector2 stealthVelocity = new Vector2(speedX, speedY) * stealthSpeedMult; int stealth = Projectile.NewProjectile(position, stealthVelocity, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs index ece363d5fb..cb05bd132e 100644 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ b/Projectiles/Rogue/EclipsesSmol.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; - CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 12f, 20f); + CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 12f, 20f); } public override void Kill(int timeLeft) @@ -36,21 +36,21 @@ namespace CalamityMod.Projectiles.Rogue Main.PlaySound(SoundID.Item14, projectile.Center); for (int i = 0; i < 2; i++) { - int dustInt = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.2f); - Main.dust[dustInt].velocity *= 3f; - if (Main.rand.NextBool(2)) - { - Main.dust[dustInt].scale = 0.5f; - Main.dust[dustInt].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } + int dustInt = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.2f); + Main.dust[dustInt].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[dustInt].scale = 0.5f; + Main.dust[dustInt].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } } for (int j = 0; j < 3; j++) { - int moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.7f); - Main.dust[moreDust].noGravity = true; - Main.dust[moreDust].velocity *= 5f; - moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1f); - Main.dust[moreDust].velocity *= 2f; + int moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.7f); + Main.dust[moreDust].noGravity = true; + Main.dust[moreDust].velocity *= 5f; + moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1f); + Main.dust[moreDust].velocity *= 2f; } } diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index a38cd4fc10..77bba69aa6 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.localAI[1] = Main.rand.Next(8, 14); // 8 to 13 frames between each spearfall int type = ModContent.ProjectileType(); - int smolDamage = (int)(projectile.damage * 0.14f); // SS overall used to have a 0.275x mult, meaning 0.11 to 0.165 damage here. + int smolDamage = (int)(projectile.damage * 0.28f); float smolKB = 3f; // Used to be a 50% chance each spearfall for 1 or 2. Now is consistent. int numSpears = spawnTwoSpears ? 2 : 1; From 905893790d096c1b9816ea6da8c9e0701bbf9e1b Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 12:41:41 -0500 Subject: [PATCH 2/8] 1 - Thanos, I want to die. 2 - Adjusted Wyrm HP and lightning velocity. --- CalPlayer/CalamityPlayerMiscEffects.cs | 14 +- Gores/Thanatos/ThanatosBody1.png | Bin 0 -> 429 bytes Gores/Thanatos/ThanatosBody1_2.png | Bin 0 -> 1229 bytes Gores/Thanatos/ThanatosBody1_3.png | Bin 0 -> 721 bytes Gores/Thanatos/ThanatosBody2.png | Bin 0 -> 1331 bytes Gores/Thanatos/ThanatosBody2_2.png | Bin 0 -> 554 bytes Gores/Thanatos/ThanatosBody2_3.png | Bin 0 -> 635 bytes Gores/Thanatos/ThanatosHead.png | Bin 0 -> 1234 bytes Gores/Thanatos/ThanatosHead2.png | Bin 0 -> 867 bytes Gores/Thanatos/ThanatosHead3.png | Bin 0 -> 563 bytes Gores/Thanatos/ThanatosTail.png | Bin 0 -> 656 bytes Gores/Thanatos/ThanatosTail2.png | Bin 0 -> 658 bytes Gores/Thanatos/ThanatosTail3.png | Bin 0 -> 365 bytes Gores/Thanatos/ThanatosTail4.png | Bin 0 -> 530 bytes NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 7 +- NPCs/Abyss/EidolonWyrmTailHuge.cs | 2 +- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 4 +- NPCs/CalamityGlobalNPC.cs | 5 +- NPCs/Crabulon/CrabShroom.cs | 4 +- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 507 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png | Bin 0 -> 5628 bytes NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 507 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png | Bin 0 -> 5235 bytes NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 765 ++++++++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png | Bin 0 -> 9588 bytes NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 508 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png | Bin 0 -> 5673 bytes Projectiles/Boss/AstralLaser.cs | 7 +- Projectiles/Boss/ExoDestroyerLaser.cs | 176 ++++ Projectiles/Boss/ExoDestroyerLaser.png | Bin 1136 -> 662 bytes Sounds/Custom/ThanatosVent.ogg | Bin 0 -> 45642 bytes Utilities/MiscUtils.cs | 25 +- Utilities/NPCStats.cs | 15 + World/CalamityWorld.cs | 6 +- 36 files changed, 2534 insertions(+), 22 deletions(-) create mode 100644 Gores/Thanatos/ThanatosBody1.png create mode 100644 Gores/Thanatos/ThanatosBody1_2.png create mode 100644 Gores/Thanatos/ThanatosBody1_3.png create mode 100644 Gores/Thanatos/ThanatosBody2.png create mode 100644 Gores/Thanatos/ThanatosBody2_2.png create mode 100644 Gores/Thanatos/ThanatosBody2_3.png create mode 100644 Gores/Thanatos/ThanatosHead.png create mode 100644 Gores/Thanatos/ThanatosHead2.png create mode 100644 Gores/Thanatos/ThanatosHead3.png create mode 100644 Gores/Thanatos/ThanatosTail.png create mode 100644 Gores/Thanatos/ThanatosTail2.png create mode 100644 Gores/Thanatos/ThanatosTail3.png create mode 100644 Gores/Thanatos/ThanatosTail4.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody1.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody2.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosHead.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosTail.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png create mode 100644 Projectiles/Boss/ExoDestroyerLaser.cs create mode 100644 Sounds/Custom/ThanatosVent.ogg diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 21e021e214..7e3f83757c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2900,7 +2900,19 @@ namespace CalamityMod.CalPlayer if (modPlayer.gState) { player.statDefense -= GlacialState.DefenseReduction; - player.velocity = Vector2.Zero; + player.velocity.X *= 0.5f; + player.velocity.Y += 0.05f; + if (player.velocity.Y > 15f) + player.velocity.Y = 15f; + } + + if (modPlayer.eFreeze) + { + player.statDefense -= GlacialState.DefenseReduction; + player.velocity.X *= 0.5f; + player.velocity.Y += 0.1f; + if (player.velocity.Y > 15f) + player.velocity.Y = 15f; } if (modPlayer.eFreeze || modPlayer.silvaStun || modPlayer.eutrophication) diff --git a/Gores/Thanatos/ThanatosBody1.png b/Gores/Thanatos/ThanatosBody1.png new file mode 100644 index 0000000000000000000000000000000000000000..846ec8a27e0b0c269b9d55f210a6e511ac96d1f6 GIT binary patch literal 429 zcmV;e0aE^nP)Px$XGugsR7i=ywFPz6#UF@@;^fd(aC2~TarHlN7u*F0 zmkv&%sEF0Yu2pEM)IqVLQ?g{Ji;s9m6DrE3-zB`b zV?^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w@1U literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosBody1_3.png b/Gores/Thanatos/ThanatosBody1_3.png new file mode 100644 index 0000000000000000000000000000000000000000..d22ecb673b1ebc19f84d84b506871f79aa5d9fa7 GIT binary patch literal 721 zcmV;?0xtcDP)Px%i%CR5RA_-RF{QHh(60_|5yyYz+S? zrP34tLD25n&hH!PXhw(`_W%Z<3ov_fF7#kyy$*P6Y+~F4NP#s|VyaY{GT^bXe>P*~ zN)3S4R?})oBc_6&4HU*k$NtGl0CqZ^F2IG0mjPIL`5fCZj_*(y8y2n(Lh6&ucG^_A zQZoRpt)}&T3u9TMv!pu+jhKrwB^1U6B`!;v+L2jcFH^cs#Zeebiz`cFr1`lKdj9!K zR{(hW`%sAD_Q+ZOTCHPqY$HVt1~KOZA$Rgm~rhzNVfF)D5)`5=CbYy zU3hD3qG#7f_CG@ATs@s8>8vOW%aq`+v7Y*VPZruvW%N@zz*mU-59c3c%Oa zW@sN!*P&N0o&nLTAyT()E!_p+(ZdG-9Gm&oy?@-uwkLFvA7efIb%h+ammww>7SH|e z1z)EbUup_tLfqbl{=Y@it0P&HOJkZ;|F;+y-WvM}M0*WTAdhj700000NkvXXu0mjf D4-`-Q literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosBody2.png b/Gores/Thanatos/ThanatosBody2.png new file mode 100644 index 0000000000000000000000000000000000000000..88b0bd01e5914c2664b69f62add4d542de7aef61 GIT binary patch literal 1331 zcmV-31Px(?MXyIRCt{2oH1-$MHt6_udNf~gxD=@s6eeKsh}(ju)qWZVq#!nKw?K?MQk0j zc12=GVqjrlLJVbs1qK)hsG+D8D6~*Jp|KncGK2ZMeqY{~yX0&q5%*gnzxRCaS@-jI z_kDLx!69+_%sBws_wEh=EI+>u0BAH83V?2Rd#2ABOExf(sTsJq)CA!E*5;t< zyv!3TE0;^J$3|tn|45F?*}z1Cz1nCj0MPAjSDF;UjdO zD>jBHCdm}xnItr-dhfTWz1ZvQeeLlIl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xGbcFu+Fr!Wyl^N_1aQI znzSWt0XGkx_4d2=UYJi53WZo-&xuFmjoVr}!_vfMH`X^LBE9SDyEZFYXf012aLNO7 z-vY_^?>X^^9O6m2vpyfEwG>fO#%A5+Y0`IQKe8T~=ju^)eH+DM34ms^;bd%<^f_A; zlS9YKy01^l*dpzzZenucT8AbN128xcIJc{otX%q0S%Nj6XWpE6oXi`T&5b4i#Zu_= z7P*th&bjq;<;(ya8aW;QJr$E^%YfAgB8)&@7DxZMPH9=|m)k@&j4tFzW8QA89WpKap1*p7QE^}B%md$uSoxukbjED4#UGeVNY zLgd$5t;`Y+*d}g$!%6R%X<2(i+Vi{iUFn~+K9RLf9nZ5%T*qxuue*BEF5YXqmi|3m zuPgC=xQU4XV0h06kY(b!BJI1XY2P>RHJ+y>uZdb^OF8jA$ZG*H@2K?p9}13o*h8|N wx%HFy|D{;V8XOn|V0U3R0Oip!Aj8D}1sHucY6L;pNdN!<07*qoM6N<$f<#nm#{d8T literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosHead2.png b/Gores/Thanatos/ThanatosHead2.png new file mode 100644 index 0000000000000000000000000000000000000000..7df1a911da546fb363ee37a804b43859d214fcc4 GIT binary patch literal 867 zcmV-p1DyPcP)Px&9Z5t%RA_W70wok7L;}IVSr?sjFis9G4kqp;T^5rs=F<7>YX z>j#59leqHzi%d<=0`Oz&TN8Rs6Jv!h8?Lz)+vQClJ=W&)qY?CGBf((LoOy$-y!Gh! z5den=2Tsg<@aT!tUYmMl@mgX(QcsMv5R>%`=`!5;O@qOn@t#E#CrbcScD6I^gsdz8 zBX89v31Xx+_QU&Spc9j|xpIGL>8jIief?AW+p=>%7N%+`R3S zudS{)W5|ydTJ`s9nX&*eQF!?HsdFvHiHYytzH!RM*wV~AV8>={vgXC}X8>HDnTr6v zm%lpY!C=pr24{$!iEXvHVxpLmmRD-i#Vm=HckbR#Y$wKQvjyG1Wv-PUOTT(%2x2lJ zi#S<&EF2(q0x*)xMF6>64uIW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Wv|s2y2TafS;*^lJ&SoAfmU{Xu8d)W$vf@cXg(cA_V@Mxn9imH^q8?XSKsww z#;Z5VfMq+chf-+$ICGvfd#%38uJFE7%CcA4cTL%P9`gqElw=rjyI-}i7Xt>*!lQn1 zdR?toXB5dW63*NYjFqyyt})_O=(3o|vg}XKS2+jt{|Ec8{-P+x`XgAY*8{-muhW6@ qh4YI5OiqL@4E6OvXBipEF!CG0mLmXsLHhy#0000q%!>g literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail2.png b/Gores/Thanatos/ThanatosTail2.png new file mode 100644 index 0000000000000000000000000000000000000000..ec5cf41bdbdf0fd4592594b52c26d02f888464c6 GIT binary patch literal 658 zcmV;D0&V??P)Px%Oi4sRR9J=Wn6Yb9Q51*2E54*nLX(OW6RY>9Gw><7W_no}(oqNu?*U??g zn0W_~$z%ZtQUL(@!Z-lsFUvi+9-Iyh`U3_f7iY+1a{z?(S`%RE%rp>BQuZK~b^wjv zJD&ZZMZl2w$;lZ2zO62Kd;0u^ivV1@d>w#N=`#SU%Zrf?H@=s>@j;D%50 z!{qd=XaBhH##<-l#_|rJwpH!(FYHf4;#R85k|imLe7E|pNU;&12>bAUey?x*?@Bar z$?MQ0OVSdz>XzjtOI}q(eZuo+a{vTE(CPyk4I7ybAU!eyz|Qt|vpsh0F#x%-JOH(= zs`q|ki64$LSkm_%Jo3hI9h}Yjmb^&oJ&onhN~9ys3Qg#c-DUU4s!AwQl}i#!{O=ym z7YdOJs+CG))>qw^RG)9&zU$3fk|M3%->$QfpmAK^5EoJQ_e6U9$b^F-@s4(7b&s_6 zR$SKaR~l|_0PztbsS3nNq&I(U07K#(S)$d-X8T#` z=_V%5Prs6Xds=+_@P6d_qsLA-fS*6sd-6Xd-c7nq4a0h52W8h~vi`GIh4t3?JU!aF s^ZQ!%Z-h>ro^b$cD@%R(wMs1UKP^7_pQ=T|vj6}907*qoM6N<$f``{R82|tP literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail3.png b/Gores/Thanatos/ThanatosTail3.png new file mode 100644 index 0000000000000000000000000000000000000000..22acef22dca1d46943c5ce37196e7adfc6108679 GIT binary patch literal 365 zcmV-z0h0cSP)Px$CrLy>R7i>4mN9O^KoCWrqg1A_K|)Fc3LSl#bh!d8C*Y3hQY8(!0+uTzB&b5@ zOf{hWc)$e7i}D-GyEE24&+Ok#aFnJU0JhtoN~RJor->eJN&bt@t+oOfK92w>i^VP9 zI;eHR$7>VL5NoXirD-RDdnD{X4S^$(J&n}nRjXwgyqCqIf;%A$YB3m%0hoV%07o*D zjeFAg_6a>ld3k-SP4M=k*S-4QKB1B63axe~k3ef=e@4616vazx9bz(_0r36#UYpp! zTLWcz9>-};2)*vKnq2Bqa~_S4@1-7@=OkX&YP`kmcE3Q38g_eq05FLpc=&E~ad_vQ|xq0sauULIegu55e00000 LNkvXXu0mjfW_X@I literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail4.png b/Gores/Thanatos/ThanatosTail4.png new file mode 100644 index 0000000000000000000000000000000000000000..09c638cebfdbc90d16701ca92f2ee577b3b9e6b7 GIT binary patch literal 530 zcmV+t0`2{YP)Px$%t=H+R9J=On7vN|F&KxR8c*>cd?gqbiEPfg=;Y??>R;gh$i^fK&TbG~Oi1`J zLXI%tfUkG$U4h7v6nr*%rRhESy=|`w3#XY30J9)iMBC4+RRxgAoN4`g-HvUjKXH`m zXen}>(6#`W1pxrH%X;GT2rBhiv1i7BxGBj{p;%M^o_7L(pUv)MV(uFA{pA}^rxPtZ zm1+%ucB`rVVLTd1zh$=iyP24?#uPtQCYh2fB~+vKoE=r8;H5pINP@IkwzOoi(=hZOjv{tX~O+ zfY7YDGvx9G1)Epv{u&e3nKLuEqFQCVm3!;{8xzbs4O`~Kpv~yIZ->J%79sJx7VfD_ zWStXMoQSo#9G)@T7rgNJ^sN1sQ;Kb!i;Sz_5RI)M(Vz|6t(), 600, true); + if (npc.Opacity == 1f) + player.AddBuff(ModContent.BuffType(), 600, true); } } } diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index 65a97a5fee..e8eb77af1e 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.Abyss npc.width = 86; npc.height = 120; npc.defense = 0; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1750000, 2012500); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index c4aadc9463..cc3d4cd060 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -1,5 +1,4 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Accessories; @@ -17,7 +16,6 @@ using Microsoft.Xna.Framework; using System.IO; using Terraria; using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.NPCs.BrimstoneElemental @@ -91,7 +89,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental player.AddBuff(ModContent.BuffType(), 180, true); } - public override void FindFrame(int frameHeight) //9 total frames + public override void FindFrame(int frameHeight) // 9 total frames { npc.frameCounter += 1.0; if (npc.ai[0] <= 2f) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 4c830a41cc..ad21798c32 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -21,6 +21,7 @@ using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; @@ -691,8 +692,8 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref SCal, NPCType()); ResetSavedIndex(ref SCalWorm, NPCType()); - /*ResetSavedIndex(ref draedonExoMechWorm, NPCType()); - ResetSavedIndex(ref draedonExoMechTwinRed, NPCType()); + ResetSavedIndex(ref draedonExoMechWorm, NPCType()); + /*ResetSavedIndex(ref draedonExoMechTwinRed, NPCType()); ResetSavedIndex(ref draedonExoMechTwinGreen, NPCType()); ResetSavedIndex(ref draedonExoMechPrime, NPCType());*/ diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index 59f1215a0b..ba46c99cd3 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -88,11 +88,11 @@ namespace CalamityMod.NPCs.Crabulon spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = Main.npcTexture[npc.type]; - Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Crabulon/CrabShroomGlow"); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs new file mode 100644 index 0000000000..fdde948722 --- /dev/null +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -0,0 +1,507 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.ExoMechs.Thanatos +{ + public class ThanatosBody1 : ModNPC + { + // Whether the body is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 148; + npc.height = 98; + npc.defense = 100; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + npc.aiStyle = -1; + aiType = -1; + npc.knockBackResist = 0f; + npc.Opacity = 0f; + npc.behindTiles = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath14; + npc.netAlways = true; + npc.dontCountMe = true; + npc.chaseable = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1_2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1_3"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 120 : 60; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png b/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..cfa0941d35d2ec5f99247b0402f5285e447bdc31 GIT binary patch literal 5628 zcmdUzXH=8xnubwPV-Sc)P-#k$5=2C4N|R87l+TdBmLduwQiAkeH32~p6+#s-N(mrv zsG*~5iUuKDAtEKP0VADA2?_lK&snq9tT{73X4cG^^XtoxH}Cy@?|Sd+xt}Kg~d z_G0}MEy%UHO&0_@@&sD}Iv4}R!uQMX!@ii1J_#R>PT_(hd<2dXysw&a5%M&S!~z;; z&PD^sm)!btqR#}b%E?+z&e2fw+Ke+xNe| zovo;b_XIoGBU$~t4o{U>`o6=2JQpZIK;w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b7h_N@@UV(_AgdRh2Ln~!Iwn` zz8U8fo=;{7uY7WB5@!Nqr96GE-|I#af`-Tllg@wDPC8WBvh759jMNs>Xi1~3SwdSe zO>3KfgViGyxT<9YmDB5x1-nR$seBoFF=MhreYOMY^BD>&voE@gwy8)h;BclXO_^5f zSO+XgYel*vNVI+uQrAXHys*R4f!?Dz@F>3Bo;umxbG1p=L8;T0Q#8z59*8T6oay&8 zy|L2Z9@6qt z*&CG*r4ZEe9tR!w%}2UnPjoeDGCXkeFEKz>&HOpkmbyjLrwpMGl>t%BzeOa~LPy=&UikHl)t??u zPnKKlfer1q!F0X`&SxY%5+tnk|_Bv78`nUvhn9t&9E@TA%rf7F8w(_HXg_~(VRI false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2_2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2_3"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 120 : 60; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png b/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..8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rd@q;8pdlT}(i^tD`)$gI^FL1E|{>bk{+ zsb+x%gJBiNMVPVp!amcllV$k=2Jf~g4OKuoXMy(VRS^xO$mR=b( z!H2Ug3MZa2`QZo;R*}@0mq;UVTlZ1)9n!;yiCv_uD^K|Jk5Jz@A*w5;+1t({;{X{zSC^vc=sk|6#arHmr2gB z7AipwQ<&ra6F&_^lpl87oji4HZT43|5Tc;-T;<86c2A-5&>L62J}pf~6|5@)3@4R9 ztztc*emYwjF)3G(L{@1Y*l>Q47kvzko73KVc7gfJ;t%>-=7BSwsIE`%il!~UKJPAG zIdPAfPmG73zgVeZ&n|xNXU+=w)w;%_fb*g9(er?8y^wm%hWlR@0x0y@Vcatj$l(BO zFqVDLtR~K7QXPTBm^`+CW3TXL6*2FOicmDAPxhn_%^Ss!kgi2>DU-hw#Cwa3#C#k& zTO-jR&g1*i=6`XU|0$)c`8~LE*vDrpuncwa?!|TIv5n7+Q_{qBzyEZaq?H_^s_R%;D9tPGwb1@j(J|>k3>~$T6Gd- z+w_(nW}nqA(vfWv4~WsMSgIZ|On>Edzx_mA8WUmKyqE|hL?~JcXG&O9x;Y8R0bFy! z06jbF8sZ1+#~P~H0j2s!YKAx|`Q npc.Calamity().newAI[0]; + set => npc.Calamity().newAI[0] = value; + } + + public enum SecondaryPhase + { + Nothing = 0, + Passive = 1, + PassiveAndImmune = 2 + } + + public float SecondaryAIState + { + get => npc.Calamity().newAI[1]; + set => npc.Calamity().newAI[1] = value; + } + + // Whether the head is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + // Default life ratio for the other mechs + private const float defaultLifeRatio = 5f; + + // Base distance from the target for most attacks + private const float baseDistance = 1200f; + + // Base distance from target location in order to continue turning + private const float baseTurnDistance = 160f; + + // Max distance from the target before they are unable to hear sound telegraphs + private const float soundDistance = 2800f; + + // Length variables + private const int minLength = 100; + private const int maxLength = 101; + + // Variable used to stop the segment spawning loop + private bool TailSpawned = false; + + // Used in the lerp to smoothly scale velocity up and down + private float chargeVelocityScalar = 0f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 104; + npc.height = 174; + npc.defense = 80; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + npc.aiStyle = -1; + aiType = -1; + npc.Opacity = 0f; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(10, 0, 0, 0); + npc.behindTiles = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath14; + npc.netAlways = true; + npc.boss = true; + npc.chaseable = false; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(chargeVelocityScalar); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + writer.Write(npc.localAI[2]); + writer.Write(npc.localAI[3]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + chargeVelocityScalar = reader.ReadSingle(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + npc.localAI[2] = reader.ReadSingle(); + npc.localAI[3] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override void AI() + { + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + + CalamityGlobalNPC.draedonExoMechWorm = npc.whoAmI; + + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Increase aggression if player is taking a long time to kill the boss + if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) + lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; + + // Check if the other exo mechs are alive + int otherExoMechsAlive = 0; + bool exoPrimeAlive = false; + bool exoSpazAlive = false; + bool exoRetAlive = false; + if (CalamityGlobalNPC.draedonExoMechPrime != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) + { + otherExoMechsAlive++; + exoPrimeAlive = true; + } + } + if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) + { + otherExoMechsAlive++; + exoSpazAlive = true; + } + } + if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) + { + otherExoMechsAlive++; + exoRetAlive = true; + } + } + + // These are 5 by default to avoid triggering passive phases after the other mechs are dead + float exoPrimeLifeRatio = defaultLifeRatio; + float exoSpazLifeRatio = defaultLifeRatio; + float exoRetLifeRatio = defaultLifeRatio; + if (exoPrimeAlive) + exoPrimeLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].lifeMax; + if (exoSpazAlive) + exoSpazLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].lifeMax; + if (exoRetAlive) + exoRetLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].lifeMax; + float totalOtherExoMechLifeRatio = exoPrimeLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; + + // Check if any of the other mechs are passive + bool exoPrimePassive = false; + bool exoSpazPassive = false; + bool exoRetPassive = false; + /*if (exoPrimeAlive) + exoPrimePassive = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].newAI[1] == (float)AresBody.SecondaryPhase.Passive; + if (exoSpazAlive) + exoSpazPassive = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].newAI[1] == (float)Apollo.SecondaryPhase.Passive; + if (exoRetAlive) + exoRetPassive = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].newAI[1] == (float)Artemis.SecondaryPhase.Passive;*/ + bool anyOtherExoMechPassive = exoPrimePassive || exoSpazPassive || exoRetPassive; + + // Phases + bool lessThan70PercentLife = lifeRatio < 0.7f; + bool phase2 = lessThan70PercentLife && otherExoMechsAlive <= 1; + bool berserk = lifeRatio < 0.4f || totalOtherExoMechLifeRatio > 3f; + + // Set vulnerable to false by default + vulnerable = false; + + // If Thanatos doesn't go berserk + bool otherMechIsBerserk = exoPrimeLifeRatio < 0.4f || exoSpazLifeRatio < 0.4f || exoRetLifeRatio < 0.4f; + + // Get a target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + npc.TargetClosest(); + + // Despawn safety, make sure to target another player if the current player target is too far away + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + npc.TargetClosest(); + + // Target variable + Player player = Main.player[npc.target]; + + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Spawn segments + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (!TailSpawned && npc.ai[0] == 0f) + { + int Previous = npc.whoAmI; + for (int num36 = 0; num36 < maxLength; num36++) + { + int lol; + if (num36 >= 0 && num36 < minLength) + { + if (num36 % 2 == 0) + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + else + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + } + else + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + + Main.npc[lol].realLife = npc.whoAmI; + Main.npc[lol].ai[2] = npc.whoAmI; + Main.npc[lol].ai[1] = Previous; + Main.npc[Previous].ai[0] = lol; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); + Previous = lol; + } + TailSpawned = true; + } + } + + // Despawn if target is dead + if (player.dead) + { + npc.TargetClosest(false); + + npc.velocity.Y += 2f; + if (npc.position.Y > Main.worldSurface * 16.0) + npc.velocity.Y += 2f; + + if (npc.position.Y > Main.rockLayer * 16.0) + { + for (int a = 0; a < Main.maxNPCs; a++) + { + if (Main.npc[a].type == npc.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; + } + } + } + + // General AI pattern + // Fly towards the target for 7 seconds, gradually speeding up for the first 5 seconds and slowing down for the last 2 seconds, fire lasers from segments that are venting + // Fly underneath the target and fire barrages of lasers + // Fire deathray from mouth with a telegraph similar to the railgun from enter the gungeon, turn speed is very low during this to avoid cheap hits + // Go passive and fly underneath the target while firing lasers + // Go passive, immune and invisible; fly far underneath the target and do nothing until next phase + + // Attack patterns + // If spawned first + // Phase 1 - 0, 1, 0, 2 + // Phase 2 - 4 + // Phase 3 - 3 + + // If berserk, this is the last phase of thanatos + // Phase 4 - 0, 1, 0, 2 + + // If not berserk + // Phase 4 - 4 + // Phase 5 - 0, 1, 0, 2 + + // If berserk, this is the last phase of thanatos + // Phase 6 - 0, 1, 0, 2 + + // If not berserk + // Phase 6 - 4 + // Phase 7 - 0, 1, 0, 2 + + // Phase gate values + float velocityAdjustTime = 20f; + float speedUpTime = 300f; + float slowDownTime = 120f; + float chargePhaseGateValue = speedUpTime + slowDownTime; + + float laserBarrageDuration = 420f; + + // Adjust opacity + bool invisiblePhase = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Rotation and direction + npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2; + int direction = npc.direction; + npc.direction = npc.spriteDirection = (npc.velocity.X > 0f) ? 1 : (-1); + if (direction != npc.direction) + npc.netUpdate = true; + + // Default vector to fly to + Vector2 destination = player.Center; + + // Charge variables + float turnDistance = baseTurnDistance; + float chargeLocationDistance = turnDistance * 0.2f; + + // Laser Barrage variables + Vector2 laserBarrageLocation = new Vector2(0f, baseDistance); + float laserBarrageLocationDistance = turnDistance * 5f; + + // Velocity and turn speed values + float baseVelocity = 9f; + float turnSpeed = MathHelper.ToRadians(1f); + float chargeVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); + float invisiblePhaseVelocityMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); + float invisiblePhaseTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); + + // Base scale on total time spent in phase + float chargeVelocityScalarIncrement = 1f / speedUpTime; + float chargeVelocityScalarDecrement = 1f / slowDownTime; + + // Scalar to use during laser barrage, passive and immune phases + float laserBarrageVelocityScalarIncrement = 0.01f; + float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; + + // Passive and Immune phases + switch ((int)SecondaryAIState) + { + case (int)SecondaryPhase.Nothing: + + // Spawn the other mechs if Thanatos is first + if (otherExoMechsAlive == 0) + { + if (phase2 && !berserk) + { + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + // Spawn code here + } + } + } + else + { + // If not spawned first, go to passive state if any other mech is passive or if Thanatos is under 70% life + // Do not run this if berserk + // Do not run this if any exo mech is dead + if ((anyOtherExoMechPassive || lessThan70PercentLife) && !berserk && totalOtherExoMechLifeRatio < 5f) + { + // Tells Thanatos to return to the battle in passive state + SecondaryAIState = (float)SecondaryPhase.Passive; + } + + // Go passive and immune if one of the other mechs is berserk + // This is only called if two exo mechs are alive + if (otherMechIsBerserk) + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + } + + break; + + // Fly underneath target and fire lasers + case (int)SecondaryPhase.Passive: + + // Fire lasers while passive + AIState = (float)Phase.UndergroundLaserBarrage; + + // Enter passive and invincible phase if one of the other exo mechs is berserk + if (otherMechIsBerserk) + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + + // If Thanatos is the first mech to go berserk + if (berserk) + { + // Reset + AIState = (float)Phase.Charge; + + // Never be passive if berserk + SecondaryAIState = (float)SecondaryPhase.Nothing; + } + + break; + + // Fly underneath target and become immune + case (int)SecondaryPhase.PassiveAndImmune: + + // Fire lasers while passive + AIState = (float)Phase.UndergroundLaserBarrage; + + // Enter the fight again if any of the other exo mechs is below 70% and the other mechs aren't berserk + if ((exoPrimeLifeRatio < 0.7f || exoSpazLifeRatio < 0.7f || exoRetLifeRatio < 0.7f) && !otherMechIsBerserk) + { + // Tells Thanatos to return to the battle in passive state + // Return to normal phases if one or more mechs have been downed + SecondaryAIState = totalOtherExoMechLifeRatio > 5f ? (float)SecondaryPhase.Nothing : (float)SecondaryPhase.Passive; + } + + if (berserk) + { + // Reset + AIState = (float)Phase.Charge; + + // Never be passive if berserk + SecondaryAIState = (float)SecondaryPhase.Nothing; + } + + break; + } + + // Attacking phases + switch ((int)AIState) + { + // Fly towards target and gain velocity over time + case (int)Phase.Charge: + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar >= 1f) + { + chargeVelocityScalar = 1f; + calamityGlobalNPC.newAI[3] = 1f; + } + } + else + { + chargeVelocityScalar -= chargeVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + } + + baseVelocity *= chargeVelocityMult; + turnSpeed *= chargeTurnSpeedMult; + turnDistance = chargeLocationDistance; + + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + { + AIState = npc.localAI[0] == 1f ? (float)Phase.Deathray : (float)Phase.UndergroundLaserBarrage; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + + break; + + // Fly below and summon barrages of lasers + case (int)Phase.UndergroundLaserBarrage: + + // Fly down + destination += laserBarrageLocation; + turnDistance = laserBarrageLocationDistance; + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += laserBarrageVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= laserBarragePhaseVelocityMult; + turnSpeed *= laserBarragePhaseTurnSpeedMult; + + if ((destination - npc.Center).Length() < laserBarrageLocationDistance || calamityGlobalNPC.newAI[2] > 0f) + { + calamityGlobalNPC.newAI[2] += 1f; + + if (SecondaryAIState != (float)SecondaryPhase.Passive && SecondaryAIState != (float)SecondaryPhase.PassiveAndImmune) + { + if (calamityGlobalNPC.newAI[2] >= laserBarrageDuration) + { + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= laserBarrageVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime) + { + npc.localAI[0] = 1f; + AIState = (float)Phase.Charge; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + } + } + } + + break; + + // Move close to target, reduce velocity and increase turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray + case (int)Phase.Deathray: + + // Head is vulnerable while charging and firing deathray + vulnerable = true; + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar >= 1f) + { + chargeVelocityScalar = 1f; + calamityGlobalNPC.newAI[3] = 1f; + } + } + else + { + chargeVelocityScalar -= chargeVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + } + + baseVelocity *= chargeVelocityMult; + turnSpeed *= chargeTurnSpeedMult; + turnDistance = chargeLocationDistance; + + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + { + AIState = (float)Phase.UndergroundLaserBarrage; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + + break; + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[1] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[1] < maxSteamTime) + { + npc.localAI[1] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[1] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[1] = 0f; + + // Increase velocity if velocity is ever zero + if (npc.velocity == Vector2.Zero) + npc.velocity = Vector2.Normalize(player.Center - npc.Center).SafeNormalize(Vector2.Zero) * baseVelocity; + + // Acceleration + if (!((destination - npc.Center).Length() < turnDistance)) + { + float targetAngle = npc.AngleTo(destination); + float f = npc.velocity.ToRotation().AngleTowards(targetAngle, turnSpeed); + npc.velocity = f.ToRotationVector2() * baseVelocity; + } + + // Velocity upper limit + if (npc.velocity.Length() > baseVelocity) + npc.velocity = npc.velocity.SafeNormalize(Vector2.Zero) * baseVelocity; + + // Reduce Y velocity if it's less than 1 + if (Math.Abs(npc.velocity.Y) < 1f) + npc.velocity.Y -= 0.1f; + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.5f; + return null; + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + if (AIState == (float)Phase.Charge || AIState == (float)Phase.UndergroundLaserBarrage) + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override void NPCLoot() + { + /*DropHelper.DropItem(npc, ModContent.ItemType(), 80, 100); + DropHelper.DropItem(npc, ModContent.ItemType()); + DropHelper.DropItem(npc, ModContent.ItemType()); + DropHelper.DropItem(npc, ModContent.ItemType()); + + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1, 50, 108); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 2, 15, 27); + DropHelper.DropItemCondition(npc, ItemID.Ectoplasm, NPC.downedPlantBoss, 1, 21, 32);*/ + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 3; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead3"), 1f); + } + } + + public override bool CheckActive() => false; + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 180 : 90; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png b/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow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dbqgXHkeBR|*0(SF_5 zJ8&T$%Y%3eBF9L~@V6pl3LAYPyhjBZK+Iih|5M33xdW#&`+vLduCZF!(~ zx7~eovK~!oNSao&4vB1d(+Q8vrwyR`UzzUh1yb5xc_4m#vPQ=gl1Y0f+Lf%;C=Nkx zLV?nLu$iqQbeh@Ja*9>`2h4h1*6^?6Vh?4rqx%1r4S54&)4Uf{{XAugUnWF--mu4+ ztmTa!y2xp|%llK1-QbJ0273knBB8mB^UVpV3W9$;B?+WkV*85xR(2uwGA0 zxA#)j#lHGI;#>H)3)#nULt^gx*CUAw2MFpnhL>jkHZxWHHsyHCS)c&+(CQz|LY-NM z-)6(HTTI4@kVKNM#in`L_?*i{A$+_q$eh5`4)G=w5Ltqsb{<0#nf9F2{wa+rxAPjS zP9~Y1++mc&tx4jTp3=+}`S?wp{m6toa=rdnT zxz>oD#}{b2m?7jN`r~Sw=KeZ)YJ1ztL`)ccS2rvB_k8X!ubpZ@oAQR(NY%6D_$`$^ z=eFpTz0#+y{~~mOU902<9)_t}ZsB`pigH_C;MfT+m+e!dV)M2#EKV4p=xrdz_}kb_ z(Ha-26szvD_Hz5^r2EY7U%2mcXTQj94K+BV|JTLOHb=12PJ2g7>7MdId~vLBpebeV z8M!240vGTWn!0T!1o?VWN2QC&NZm#!-cFsqP$V#Kr+yQe6?g~d2Z^e&aRQ`EU(W~lkUwP+P6#((DCZRi@xBeU@I<0Gg(LwhKOb|1 zV|sH(=#5}XO6l7CP?;wv;00WKyz?D!myu28Cs6LYch+qG$MoYf=QQ%H7Nn?|@;4Qg NzP7PexrSrt{{kS**Gm8Z literal 0 HcmV?d00001 diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs new file mode 100644 index 0000000000..540155fdc1 --- /dev/null +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -0,0 +1,508 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.ExoMechs.Thanatos +{ + public class ThanatosTail : ModNPC + { + // Whether the tail is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 84; + npc.height = 118; + npc.defense = 120; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + npc.aiStyle = -1; + aiType = -1; + npc.knockBackResist = 0f; + npc.Opacity = 0f; + npc.behindTiles = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath14; + npc.netAlways = true; + npc.dontCountMe = true; + npc.chaseable = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 45f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosTailGlow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail4"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 60 : 30; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png b/NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..54a5e2ecaf5f7a14ed60f6be4aa8498e7e1dbc0a GIT binary patch literal 5673 zcmdUzX*iVq+s7G8#N^JtE3#!vw(QGgo%^l-BX=P#QQa7YfouY!OYQb4%vS*;$vp5F} zS=w{;Gn~avsvpyAC3e_?F1x+p0O76)wo%=Fs=A+Qkd6}nlbwWoMp;ls5Ao}nc_YQPY zP}kCIh@Yz(nZup6?Dubm6~AL0J1xPeOxp56W@8g?0!;s@eWZH?3Wa=FpeS&v=@0g~ z*oBPoB1%t>+|7b{U6C0$lBfG;oPV0w_XYpuNG=P0C_fbW;Et_C0&Eu)IIsg|%Qx>y zff4qTZf_EOhtI_>AIB$6)Q*|E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X4U+1tT$N2p+@CzOu~L4p`M@|6KRczYy48L)6_2A z2Q{+4J?yX1F`-A<(PRW=1pZoMOgp+Y%>e6&r^CnAK9C1CPG_nK6dP*3pU1;cZeWzG z?=;8tx*MFlws5a%BkE3FBVtgf)qb*+KyHrKCrMw{bu zW)KX?8Fbvw`swvIrQDFMkPaKWAA!MkatN*MRtYzfoW@3tVDsSX-+Z|A-+XYq9`O9f zh0woq{j9-K%HBQ7I&h`A+r3NeqJv+4nf>`Q`M(K~oTKu4LouUeSjeQ>BX~x!Tz7NNiJs-lV*3`KBiekpyoJ_!~TlTZN2#w zWv9Ibx+1N~O4Ef-@5V=(u0#+HuIg&zWfL+DC5y-teweTmO)(5fB0dnZ-60iVmN7vK zJfAm@t|r1ysRH{3Gl`Y7y1r*yq5D?vCf)qVX(4$?eq1ZQ>lFV?dx(&A)%=u>KL5NoHXTIA)jo3UOVyBRS8RStMA)jx&>iPw1s=$Bf(_LO2w$u;IJ zPxyda=Q*?|FLo9adr$9ae7*EOa8OV$^|>Ob*tqh&5F*7X)Kmk$>A3-5>5LXclX6JQ zh3=zure?wcE;?LS- 2) - { projectile.frame = 0; - } + if (projectile.velocity.X < 0f) { projectile.spriteDirection = -1; @@ -52,14 +51,14 @@ namespace CalamityMod.Projectiles.Boss projectile.spriteDirection = 1; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } + Lighting.AddLight(projectile.Center, 0.3f, 0.3f, 0f); + projectile.ai[0] += 1f; if (projectile.ai[0] > 9f) { if (projectile.alpha > 0) - { projectile.alpha -= 5; - } } } diff --git a/Projectiles/Boss/ExoDestroyerLaser.cs b/Projectiles/Boss/ExoDestroyerLaser.cs new file mode 100644 index 0000000000..883a397ace --- /dev/null +++ b/Projectiles/Boss/ExoDestroyerLaser.cs @@ -0,0 +1,176 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class ExoDestroyerLaser : ModProjectile + { + public float TelegraphDelay + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + + public Vector2 OldVelocity; + public const float TelegraphTotalTime = 30f; + public const float TelegraphFadeTime = 15f; + public const float TelegraphWidth = 4200f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Death Beam"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.Calamity().canBreakPlayerDefense = true; + projectile.width = 22; + projectile.height = 22; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.timeLeft = 300; + cooldownSlot = 1; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.WriteVector2(OldVelocity); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + OldVelocity = reader.ReadVector2(); + } + + public override void AI() + { + // Determine the relative opacities for each player based on their distance. + // This has a lower bound of 0.35 to prevent the laser from going completely invisible and players getting hit by cheap shots. + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = 1f; + projectile.netUpdate = true; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + projectile.frame = 0; + + Lighting.AddLight(projectile.Center, 0.6f, 0f, 0f); + + // Fade in after telegraphs have faded. + if (TelegraphDelay > TelegraphTotalTime) + { + if (projectile.alpha > 0) + projectile.alpha -= 25; + if (projectile.alpha < 0) + projectile.alpha = 0; + + // If an old velocity is in reserve, set the true velocity to it and make it as "taken" by setting it to <0,0> + if (OldVelocity != Vector2.Zero) + { + projectile.velocity = OldVelocity * (CalamityWorld.malice ? 1.25f : 1f); + OldVelocity = Vector2.Zero; + projectile.netUpdate = true; + } + + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)projectile.velocity.Y, (double)-(double)projectile.velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + } + // Otherwise, be sure to save the velocity the projectile started with. It will be set again when the telegraph is over. + else if (OldVelocity == Vector2.Zero) + { + OldVelocity = projectile.velocity; + projectile.velocity = Vector2.Zero; + projectile.netUpdate = true; + + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)OldVelocity.Y, (double)-(double)OldVelocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)OldVelocity.Y, (double)OldVelocity.X); + } + } + + TelegraphDelay++; + } + + public override bool CanHitPlayer(Player target) => TelegraphDelay > TelegraphTotalTime; + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (TelegraphDelay > TelegraphTotalTime) + { + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(BuffID.OnFire, 180); + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 255, 255, projectile.alpha); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + target.Calamity().lastProjectileHit = projectile; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (TelegraphDelay >= TelegraphTotalTime) + return true; + + Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam"); + + float yScale = 4f; + if (TelegraphDelay < TelegraphFadeTime) + yScale = MathHelper.Lerp(0f, 4f, TelegraphDelay / 15f); + if (TelegraphDelay > TelegraphTotalTime - TelegraphFadeTime) + yScale = MathHelper.Lerp(4f, 0f, (TelegraphDelay - (TelegraphTotalTime - TelegraphFadeTime)) / 15f); + + Vector2 scaleInner = new Vector2(TelegraphWidth / laserTelegraph.Width, yScale); + Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f); + Vector2 scaleOuter = scaleInner * new Vector2(1f, 2.2f); + + Color colorOuter = Color.Lerp(Color.Red, Color.Crimson, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through crimson and red once and then flash. + Color colorInner = Color.Lerp(colorOuter, Color.White, 0.75f); + + colorOuter *= 0.7f; + colorInner *= 0.7f; + + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, OldVelocity.ToRotation(), origin, scaleInner, SpriteEffects.None, 0f); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, OldVelocity.ToRotation(), origin, scaleOuter, SpriteEffects.None, 0f); + return false; + } + } +} diff --git a/Projectiles/Boss/ExoDestroyerLaser.png b/Projectiles/Boss/ExoDestroyerLaser.png index ea6357a3f255913f5f010b510340ba9965e53414..49cdca1d74004737b68cb126c804199f68e2b41d 100644 GIT binary patch delta 625 zcmV-%0*?Lg2$ltqFn<69XF*Lt006O%3;baP00009a7bBm000id000id0mpBsWB>pH zD@jB_RCr$P+s#qKFc3iDn0u%P3V<0Zpbe-bv_S(f0|h`mP(WZjk`GIk)!$ln{Jx9L z0fvN!EXmFe0N`c_$828@cgJvg(&f|Zzdt*E|Nj1Q{Caj*H-F)z(C7Pj7_M(mzRrtq zL}S^-TBTa{hnH|BgaX{u7HSxNh0_tmIx&l_Ei{_OQdv$Y_51lS9#bWc&CaDp6g!jt z#Y#rO#j^;;*z;f(8`aKRqvOY0lmCEfwFNVe?IXF^s8zY=j$#1-002x_B^8?XJj9+u z+~s2BY&tD;4_8hbPMUvrBM zx9)ILdAJH|?j8FLw9m#t}aJ=GS^Ja#3{rr1)o zD=;~>MilF0^TkHV<+2~!7sUqFtRnYWHHrlQtj=m@1=>~Intw)dU)k%)bY=xkR#U86 zXyJ~3F=|#`eW~wyymQd{PJzZ+`AD;us$h3(W`Ex8*3S<_xkYN0QmQ1&rC29wv2%^B zn(TRMCycQ(>snQg*?iIQa}(>pcUC1pokWwA=jveHqS2?|M+g00000 LNkvXXu0mjf$h;|V delta 1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+O<;ZA=OXoyn7|N+>eu zB*o8n&rLEYs2!)OJZ7=)|IM(h=6-~)W45BTY9LEi_Sb9)MC$ytpZ9;R-+@&D^;34 zDn6#*Yzb~rJKua4e0MGu6N>(C`RsDhC|wIpLn=k-r9-ieWvN);ONeU z>%CU__D$^bX3ac}8FIMUqRG>|HT{|5Ixn|q=k*g^%6fd0S{!3?wX!6aY%SP7wLUy!ga{gJQe` z(@ofAXu#>KQqa4-lEG(1V7ASD!nwN2Omox!F1i5bkN5uNO_fKz0lU7|UI#N1UKN|U z!RLZ2_O_qIA2289)x-X*U#}^6ed2}CgKuWyc3TyH$~KmSjylE#Uf6#6OY~jnZim3) zU5cA`>KPHLVrg?Tn@?DPh*To6MN=Yo)n{O|=y$8j?54$O0}F+$F1V6H zQMLCJe`!YszDpP@9E!Vqgc`LQwN(;%2ve-tE6v<4b0{I`HI99J^m5-i&Rt13z{p=Y z{m93G{(`vm_b|odQ3PNY%9rP@Z50Y~gK;%Sa>NGD1NtyFNy^KWqY=DQFE4Ret{i*c zck9)F-AmD<;#uNHw*M@@COJCcRdr>C{&j(x8xOQsKVS1@%>RD$HviUOc2aI9#PWm# zMae}8VCvSt(05_#9D6-8Idc^223%Nv@#5<9Ax${X`n&H7M$do#+}b^L{caPDR#5$P zzxUizruGl`;P^sHD`R|447-8dKNQM)T3- z)%NZ?p!$uRH_9!O@iD})6A@Wu31{xUXR~z3ZC3v9aX0peHjm!K&r(ggc))Wf4!lia e9e5z}`s5N@F>vC9jZrl#DR~i<;}#Dlf&UMkW5Hzr literal 0 HcmV?d00001 diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 3bb3f425db..225fe71371 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -221,34 +221,53 @@ namespace CalamityMod /// /// The spot to spawn the explosion clouds /// Number of times it loops to spawn gores - public static void ExplosionGores(Vector2 goreSource, int goreAmt) + public static void ExplosionGores(Vector2 goreSource, int goreAmt, bool thanatos = false, Vector2 thanatosVelocity = default) { Vector2 source = new Vector2(goreSource.X - 24f, goreSource.Y - 24f); for (int goreIndex = 0; goreIndex < goreAmt; goreIndex++) { float velocityMult = 0.33f; - if (goreIndex < (int)(goreAmt / 3)) + if (goreIndex < (goreAmt / 3)) { velocityMult = 0.66f; } - if (goreIndex >= (int)((2 * goreAmt) / 3)) + if (goreIndex >= (2 * goreAmt / 3)) { velocityMult = 1f; } int smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); Gore gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y += 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y += 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y -= 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y -= 1f; diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 5595c9949f..fa7cdb4daa 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -11,6 +11,7 @@ using CalamityMod.NPCs.Crabulon; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; @@ -283,6 +284,11 @@ namespace CalamityMod { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 } }; @@ -538,6 +544,11 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 350, 560, 592, 608, 768 } }, + { ModContent.NPCType(), new int[] { 400, 640, 680, 704, 864 } }, + { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 260, 416, 446, 464, 570 } }, + { ModContent.NPCType(), new int[] { 400, 800, 850, 880, 1000 } } }; @@ -793,6 +804,10 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 648, 948 } }, diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ce503fd015..95122e2a88 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -216,6 +216,10 @@ namespace CalamityMod.World CalamityGlobalNPC.fireEye = -1; CalamityGlobalNPC.brimstoneElemental = -1; CalamityGlobalNPC.signus = -1; + CalamityGlobalNPC.draedonExoMechPrime = -1; + CalamityGlobalNPC.draedonExoMechTwinGreen = -1; + CalamityGlobalNPC.draedonExoMechTwinRed = -1; + CalamityGlobalNPC.draedonExoMechWorm = -1; BossRushEvent.BossRushStage = 0; DoGSecondStageCountdown = 0; ArmoredDiggerSpawnCooldown = 0; @@ -1625,7 +1629,7 @@ namespace CalamityMod.World if (modPlayer.ZoneAbyss) { - if (player.chaosState) + if (player.chaosState && !player.dead) { if (!NPC.AnyNPCs(ModContent.NPCType()) && Main.netMode != NetmodeID.MultiplayerClient) NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); From 17e2763ac0aa1459618898bac6032dddf1a0826f Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 12:55:26 -0500 Subject: [PATCH 3/8] 1 - MORE THANATOS EDGE CASE FIXES --- CalamityLists.cs | 6 +++++- CalamityMod.cs | 9 +++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 4 +++- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 4 +++- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 4 +++- Projectiles/Typeless/YanmeisKnifeSlash.cs | 7 ++++++- UI/BossHealthBarManager.cs | 8 ++++++-- Utilities/NPCDebuffs.cs | 6 ++++++ 8 files changed, 41 insertions(+), 7 deletions(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index ff5a841a25..b69cffaa63 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -35,6 +35,7 @@ using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; @@ -1717,7 +1718,10 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - }; + NPCType(), + NPCType(), + NPCType() + }; needsDebuffIconDisplayList = new List() { diff --git a/CalamityMod.cs b/CalamityMod.cs index 4b4fa6982b..d333d5ba40 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -22,6 +22,7 @@ using CalamityMod.NPCs.Crabulon; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.OldDuke; @@ -576,6 +577,10 @@ namespace CalamityMod { ModContent.NPCType(), 9000 }, { ModContent.NPCType(), 15300 }, { ModContent.NPCType(), 18000 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 18000 } }; } @@ -700,6 +705,10 @@ namespace CalamityMod { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), bitingEnemeyVelocityScale }, + { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), bitingEnemeyVelocityScale } }; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index fdde948722..b2fb74805f 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index b0dc7b8444..32274e0fde 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 540155fdc1..0de8ece2f3 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 395cc272fe..346fbfc9d2 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -4,6 +4,7 @@ using CalamityMod.Events; using CalamityMod.NPCs.AstrumDeus; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using Microsoft.Xna.Framework; using System; using Terraria; @@ -20,7 +21,11 @@ namespace CalamityMod.Projectiles.Typeless bool validBoss = npc.boss && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() - && npc.type != ModContent.NPCType(); + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType(); if (validBoss) return true; bool bossMinion = CalamityLists.bossMinionList.Contains(npc.type); diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 911cf039d8..08e7c65b0f 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -6,6 +6,7 @@ using CalamityMod.NPCs.Calamitas; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.Perforator; @@ -192,8 +193,11 @@ namespace CalamityMod.UI ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), - ModContent.NPCType() - }; + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; } private static void SetupMinibossHPBarList() diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 5b71b20055..310a8bcd45 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -12,6 +12,7 @@ using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; @@ -194,6 +195,11 @@ namespace CalamityMod { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, CalamityMod.abyssEnemyImmunities) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, From b0fe0b9bb4ebd4a048d4c46d96d1e0522fab3be8 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 14:00:44 -0500 Subject: [PATCH 4/8] 1 - Vent bs. --- Gores/Thanatos/ThanatosVentParticle1.png | Bin 0 -> 268 bytes Gores/Thanatos/ThanatosVentParticle2.png | Bin 0 -> 259 bytes Gores/Thanatos/ThanatosVentParticle3.png | Bin 0 -> 254 bytes NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 33 ++++++++++++++++------- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 33 ++++++++++++++++------- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 33 ++++++++++++++++------- NPCs/SlimeGod/SlimeGodCore.cs | 1 - Utilities/MiscUtils.cs | 14 +++++++--- World/WorldGenerationMethods.cs | 1 - 9 files changed, 79 insertions(+), 36 deletions(-) create mode 100644 Gores/Thanatos/ThanatosVentParticle1.png create mode 100644 Gores/Thanatos/ThanatosVentParticle2.png create mode 100644 Gores/Thanatos/ThanatosVentParticle3.png diff --git a/Gores/Thanatos/ThanatosVentParticle1.png b/Gores/Thanatos/ThanatosVentParticle1.png new file mode 100644 index 0000000000000000000000000000000000000000..ec84d9232c5259734bd986fe5a6b8218a2c2a272 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}$2?seLn2z= zPInY)P~dRg?;HO4irhIf%cYGTPY)d0pLvYyN#hE}rXa7k0e15pe|=vkp=`M?v**kN ziKD#^X?C2=?-^}8e<(UUnH3z(9P?z2{sW~%zXbJTOSG=L-P@Y&m#~Cw%S684EH;7~ zQW4+lf1YVzX4;+f_y1ak3WbLBb)mcGI4y}4XR+A(wqlOQB|VM;%lTK?wSGTiS+O^v z?8($KoNItEVD5)(_MG2d-}fc>Ehtygx-{>1=Px#y-7qtR9J=Wmq8AIAPfYl@oT)A$LXmFG%OSZDbYD;6O>(ADC7ho1Q|kHAWrd% z_rCa%L;JT`ocxec&I$>{5olZ%I}Suhg-wbiD5p3#Ogg|yrSjU^BjmWmNs|sRqm|1z zIcL;?Ud3IQa$vM_ltcSe!BdLLndJ_=If2V%^6XO%*qlII1+~4uwKGy-$^iy-KB%s> zPT1TBV4oNDay5lby`sD)EO%hWS&(!*``nBQsLpjoJj-$ier|*NB~JSeq{;vQ002ov JPDHLkV1g)zXnp_y literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosVentParticle3.png b/Gores/Thanatos/ThanatosVentParticle3.png new file mode 100644 index 0000000000000000000000000000000000000000..221e95e9487e35eb26f7cde9998aef8d2bc3df8b GIT binary patch literal 254 zcmVPx#xJg7oR9J=Wm(dQu5DZ1HWxwXDeVo0ph_JS%X_M`~co>~~N)bRPr9^e9%B2ke z5MyKwI=Iobbk05uoaa$L6vs^~k~x9E$nnhiG^V7pIe~T!^iG#@if%Vh@m&$iSF(P0ftK^W9t`V>3j*4Dtgz+;EGCfAQ28VQe-j8;Kl`^#z*M8t zkh=X=ZKV!Z07*qoM6N<$ Ef|xF7<^TWy literal 0 HcmV?d00001 diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index b2fb74805f..1438c463c2 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 32274e0fde..f7c3d846d8 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 0de8ece2f3..61dd111125 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index d6cdb4dd56..a08be74c81 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -648,7 +648,6 @@ namespace CalamityMod.NPCs.SlimeGod // This loot code is shared with every other Slime God component. public static void DropSlimeGodLoot(NPC npc) { - CalamityMod mod = ModContent.GetInstance(); DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 225fe71371..12b400734c 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -10,6 +10,7 @@ using System.Text; using Terraria; using Terraria.ID; using Terraria.Localization; +using Terraria.ModLoader; namespace CalamityMod { @@ -235,7 +236,9 @@ namespace CalamityMod { velocityMult = 1f; } - int smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + Mod mod = ModContent.GetInstance(); + int type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + int smoke = Gore.NewGore(source, default, type, 1f); Gore gore = Main.gore[smoke]; if (thanatos) { @@ -244,7 +247,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y += 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { @@ -253,7 +257,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y += 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { @@ -262,7 +267,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y -= 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 6b767a7003..48f76bfa7e 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1102,7 +1102,6 @@ namespace CalamityMod.World Tile tile = Main.tile[x, y]; int type = tile.type; int wallType = tile.wall; - Mod mod = ModContent.GetInstance(); if (WorldGen.InWorld(x, y, 1)) { From 99d152eefd5c9ef5f8c93d47de2bb1195a110b94 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 14:47:40 -0500 Subject: [PATCH 5/8] 1 - The base for Thanatos Deathray stuff. --- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 73 +++++++++++++++++++++----- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index bcdfbcb50e..2fc38539ec 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -66,6 +66,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Used in the lerp to smoothly scale velocity up and down private float chargeVelocityScalar = 0f; + // Total duration of the deathray telegraph + private const float deathrayTelegraphDuration = 120f; + + // Total duration of the deathray + private const float deathrayDuration = 180f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Thanatos"); @@ -352,8 +358,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); - float invisiblePhaseVelocityMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); - float invisiblePhaseTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); + float deathrayVelocityMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); + float deathrayTurnSpeedMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); // Base scale on total time spent in phase float chargeVelocityScalarIncrement = 1f / speedUpTime; @@ -363,6 +369,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float laserBarrageVelocityScalarIncrement = 0.01f; float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; + // Distance from target + float distanceFromTarget = Vector2.Distance(npc.Center, player.Center); + // Passive and Immune phases switch ((int)SecondaryAIState) { @@ -474,6 +483,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos turnSpeed *= chargeTurnSpeedMult; turnDistance = chargeLocationDistance; + // Gradually turn slower if within 20 tiles of the target + if (distanceFromTarget < 320f) + turnSpeed *= distanceFromTarget / 320f; + calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { @@ -533,12 +546,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos break; - // Move close to target, reduce velocity and increase turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray + // Move close to target, reduce velocity and turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray case (int)Phase.Deathray: // Head is vulnerable while charging and firing deathray vulnerable = true; + // If close enough to the target, prepare to fire deathray + bool readyToFireDeathray = distanceFromTarget < 800f; + if (readyToFireDeathray) + npc.localAI[2] = 1f; + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 0f) { @@ -546,7 +564,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (chargeVelocityScalar >= 1f) { chargeVelocityScalar = 1f; - calamityGlobalNPC.newAI[3] = 1f; + + // If ready to fire deathray, start reducing the velocity scalar + if (npc.localAI[2] == 1f) + calamityGlobalNPC.newAI[3] = 1f; } } else @@ -556,18 +577,44 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos chargeVelocityScalar = 0f; } - baseVelocity *= chargeVelocityMult; - turnSpeed *= chargeTurnSpeedMult; + baseVelocity *= deathrayVelocityMult; + turnSpeed *= deathrayTurnSpeedMult; turnDistance = chargeLocationDistance; - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + // Gradually turn and move slower if within 50 tiles of the target + if (npc.localAI[2] == 1f) { - AIState = (float)Phase.UndergroundLaserBarrage; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - chargeVelocityScalar = 0f; - npc.TargetClosest(); + baseVelocity *= distanceFromTarget / 800f; + turnSpeed *= distanceFromTarget / 800f; + + if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration) + { + // Fire deathray telegraph beams + if (Main.netMode != NetmodeID.MultiplayerClient) + { + + } + } + else + { + // Fire deathray + if (Main.netMode != NetmodeID.MultiplayerClient) + { + + } + } + + if (calamityGlobalNPC.newAI[2] >= deathrayTelegraphDuration + deathrayDuration) + { + npc.localAI[0] = 0f; + npc.localAI[2] = 0f; + AIState = (float)Phase.Charge; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + calamityGlobalNPC.newAI[2] += 1f; } break; From 766884401c190ceefe12ba4c8c03034e858493a6 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 15:29:11 -0500 Subject: [PATCH 6/8] 1 - Wyrm adjustments. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 10 +++++----- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 10 +++++----- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 8 ++++---- NPCs/CalamityGlobalAI.cs | 5 +++++ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 1cbcd857fa..1214a2b63e 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -100,13 +100,13 @@ namespace CalamityMod.NPCs.Abyss if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) { npc.ai[3] += 1f; - float shootProjectile = 200f; - float timer = npc.ai[0] + 10f; - float divisor = timer + shootProjectile; - if (npc.ai[3] % divisor == 0f) + float shootShadowFireballGateValue = 90f; + float divisor = 5f; + if (npc.ai[3] % divisor == 0f && npc.ai[3] >= shootShadowFireballGateValue) { + npc.ai[3] = 0f; float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); - float fireballVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; + float fireballVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 6f : 8f) + distanceVelocityBoost; Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; Vector2 velocity = Vector2.Normalize(destination) * fireballVelocity; int type = ProjectileID.CultistBossFireBallClone; diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index c63853ed29..51c99a9d51 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -100,13 +100,13 @@ namespace CalamityMod.NPCs.Abyss if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) { npc.ai[3] += 1f; - float shootProjectile = 200f; - float timer = npc.ai[0] + 15f; - float divisor = timer + shootProjectile; - if (npc.ai[3] % divisor == 0f) + float spawnAncientLightGateValue = 180f; + float divisor = 10f; + if (npc.ai[0] % divisor == 0f && npc.ai[3] >= spawnAncientLightGateValue) { + npc.ai[3] = 0f; float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); - float lightVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; + float lightVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 6f : 8f) + distanceVelocityBoost; Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; Vector2 velocity = Vector2.Normalize(destination) * lightVelocity; int type = NPCID.AncientLight; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 28ab7c790c..600a330eac 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -510,7 +510,7 @@ namespace CalamityMod.NPCs.Abyss } } - float predictionAmt = targetDownDeep ? 30f : 60f; + float predictionAmt = targetDownDeep ? 45f : 60f; float lightningVelocity = targetDownDeep ? 6f : 8f; for (int i = 0; i < numProjectiles; i++) { @@ -800,7 +800,7 @@ namespace CalamityMod.NPCs.Abyss if ((destination - npc.Center).Length() < iceMistLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { - if (calamityGlobalNPC.newAI[2] % 45f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) + if (calamityGlobalNPC.newAI[2] % 60f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) { int maxTargets = 2; int[] whoAmIArray = new int[maxTargets]; @@ -826,8 +826,8 @@ namespace CalamityMod.NPCs.Abyss } } - float predictionAmt = targetDownDeep ? 60f : 120f; - float iceMistVelocity = targetDownDeep ? 8f : 16f; + float predictionAmt = targetDownDeep ? 90f : 120f; + float iceMistVelocity = targetDownDeep ? 12f : 16f; for (int i = 0; i < numProjectiles; i++) { // Predictive mist diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 30a8100d78..991e6b50aa 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12903,6 +12903,11 @@ namespace CalamityMod.NPCs { int type = ProjectileID.AncientDoomProjectile; int damage = npc.GetProjectileDamage(type); + + // Triple damage if the Adult Eidolon Wyrm is alive + if (NPC.AnyNPCs(ModContent.NPCType())) + damage *= 3; + kill = true; if (Main.netMode != NetmodeID.MultiplayerClient) { From cf2ad30dbffe8f2e51f21e5a5c10a038784e413d Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 16 Jun 2021 17:43:47 -0500 Subject: [PATCH 7/8] Thanatos laserbeam telegraph projectile --- Projectiles/Boss/ExoDestroyerBeamTelegraph.cs | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Projectiles/Boss/ExoDestroyerBeamTelegraph.cs diff --git a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs new file mode 100644 index 0000000000..ef3e778b14 --- /dev/null +++ b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs @@ -0,0 +1,99 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + // Code used in the demonstration video. + // This comment should be removed when implemented. + /*for (int b = 0; b < 6; b++) + * { + int beam = Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); + + // Determine the initial offset angle of telegraph. It will be smoothened to give a "stretch" effect. + if (Main.projectile.IndexInRange(beam)) + { + float squishedRatio = (float)Math.Pow((float)Math.Sin(MathHelper.Pi * b / 6f), 2D); + float smoothenedRatio = MathHelper.SmoothStep(0f, 1f, squishedRatio); + Main.projectile[beam].ai[1] = MathHelper.Lerp(-0.74f, 0.74f, smoothenedRatio); + } + } + Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); + */ + public class ExoDestroyerBeamTelegraph : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[0]) ? Main.npc[(int)projectile.ai[0]] : null; + public float ConvergenceRatio => MathHelper.SmoothStep(0f, 1f, Utils.InverseLerp(25f, 120f, Time, true)); + public ref float StartingRotationalOffset => ref projectile.ai[1]; + public ref float ConvergenceAngle => ref projectile.localAI[0]; + public ref float Time => ref projectile.localAI[1]; + public const int Lifetime = 180; + public const float TelegraphWidth = 3600f; + public override void SetStaticDefaults() => DisplayName.SetDefault("Telegraph"); + + public override void SetDefaults() + { + projectile.width = projectile.height = 4; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.timeLeft = Lifetime; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(ConvergenceAngle); + writer.Write(Time); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + ConvergenceAngle = reader.ReadSingle(); + Time = reader.ReadSingle(); + } + + public override void AI() + { + // Die if the thing to attach to disappears. + if (ThingToAttachTo is null || !ThingToAttachTo.active) + { + projectile.Kill(); + return; + } + + projectile.Center = ThingToAttachTo.Center; + + // May want to change the ThingToAttachTo.velocity.ToRotation() part to instead just point towards a certain destination vector. + projectile.rotation = StartingRotationalOffset.AngleLerp(ConvergenceAngle, ConvergenceRatio) + ThingToAttachTo.velocity.ToRotation(); + Time++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam"); + + float verticalScale = Utils.InverseLerp(0f, 20f, Time, true) * Utils.InverseLerp(0f, 16f, projectile.timeLeft, true) * 4f; + + Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f); + Vector2 scaleInner = new Vector2(TelegraphWidth / laserTelegraph.Width, verticalScale); + Vector2 scaleOuter = scaleInner * new Vector2(1f, 2.2f); + + Color colorOuter = Color.Lerp(Color.Red, Color.Crimson, Time / Lifetime * 2f % 1f); // Iterate through crimson and red twice and then flash. + colorOuter = Color.Lerp(colorOuter, Color.White, Utils.InverseLerp(40f, 0f, projectile.timeLeft, true) * 0.8f); + Color colorInner = Color.Lerp(colorOuter, Color.White, 0.5f); + + colorInner *= 0.85f; + colorOuter *= 0.7f; + + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, projectile.rotation, origin, scaleOuter, SpriteEffects.None, 0f); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, projectile.rotation, origin, scaleInner, SpriteEffects.None, 0f); + return false; + } + } +} From 8ab9192c7cf338f4da199703c5464ee8e9eeb25b Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 18:40:06 -0500 Subject: [PATCH 8/8] 1 - Wyrm adjustments, again. --- NPCs/Abyss/EidolonWyrmHead.cs | 7 ++++++- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 2 ++ NPCs/CalamityGlobalAI.cs | 9 ++++++--- NPCs/CalamityGlobalNPC.cs | 3 +++ NPCs/NormalNPCs/Eidolist.cs | 7 ++++++- World/CalamityWorld.cs | 10 +++++++++- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 1fc9c90b2d..6e15d84c4f 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -73,7 +73,12 @@ namespace CalamityMod.NPCs.Abyss public override void AI() { - bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState || adultWyrmAlive) { detectsPlayer = true; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 600a330eac..ae640abc78 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -134,6 +134,8 @@ namespace CalamityMod.NPCs.Abyss { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + CalamityGlobalNPC.adultEidolonWyrmHead = npc.whoAmI; + // Difficulty modes bool malice = CalamityWorld.malice; bool death = CalamityWorld.death || malice; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 991e6b50aa..67ad19225b 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12769,8 +12769,11 @@ namespace CalamityMod.NPCs // Triple damage if the Adult Eidolon Wyrm is alive if (npc.ai[0] == 0f) { - if (NPC.AnyNPCs(ModContent.NPCType())) - npc.damage *= 3; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + npc.damage *= 3; + } } npc.ai[0] += 1f; @@ -12905,7 +12908,7 @@ namespace CalamityMod.NPCs int damage = npc.GetProjectileDamage(type); // Triple damage if the Adult Eidolon Wyrm is alive - if (NPC.AnyNPCs(ModContent.NPCType())) + if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) damage *= 3; kill = true; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ad21798c32..9ec5392201 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -204,6 +204,7 @@ namespace CalamityMod.NPCs public static int draedonExoMechTwinRed = -1; public static int draedonExoMechTwinGreen = -1; public static int draedonExoMechPrime = -1; + public static int adultEidolonWyrmHead = -1; // Boss Enrage variable for use with the boss health UI. // The logic behind this is as follows: @@ -697,6 +698,8 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref draedonExoMechTwinGreen, NPCType()); ResetSavedIndex(ref draedonExoMechPrime, NPCType());*/ + ResetSavedIndex(ref adultEidolonWyrmHead, NPCType()); + CalamityGlobalTownNPC.ResetTownNPCNameBools(npc, mod); // Reset the enraged state every frame. The expectation is that bosses will continuously set it back to true if necessary. diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 3e44cf71e9..922081c5e2 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -56,7 +56,12 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } npc.Opacity += 0.15f; if (npc.Opacity > 1f) diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 95122e2a88..3fe5c8dd69 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -220,6 +220,7 @@ namespace CalamityMod.World CalamityGlobalNPC.draedonExoMechTwinGreen = -1; CalamityGlobalNPC.draedonExoMechTwinRed = -1; CalamityGlobalNPC.draedonExoMechWorm = -1; + CalamityGlobalNPC.adultEidolonWyrmHead = -1; BossRushEvent.BossRushStage = 0; DoGSecondStageCountdown = 0; ArmoredDiggerSpawnCooldown = 0; @@ -1631,7 +1632,14 @@ namespace CalamityMod.World { if (player.chaosState && !player.dead) { - if (!NPC.AnyNPCs(ModContent.NPCType()) && Main.netMode != NetmodeID.MultiplayerClient) + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } + + if (!adultWyrmAlive && Main.netMode != NetmodeID.MultiplayerClient) NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); } }