From d4cc1b036c51f16f154f48daff2561c69e99e6b7 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 22 Jul 2020 17:51:03 -0500 Subject: [PATCH 1/4] Initial upload of the weapon. --- CalamityMod.cs | 7 +- Effects/DistortionShader.xnb | Bin 0 -> 2808 bytes Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 72 ++++++ Items/Weapons/DraedonsArsenal/Phaseslayer.png | Bin 0 -> 922 bytes .../DraedonsArsenal/PhaseslayerBeam.cs | 67 ++++++ .../DraedonsArsenal/PhaseslayerBeam.png | Bin 0 -> 3205 bytes .../DraedonsArsenal/PhaseslayerBlade.png | Bin 0 -> 20243 bytes .../DraedonsArsenal/PhaseslayerBladeSmall.png | Bin 0 -> 3441 bytes .../DraedonsArsenal/PhaseslayerProjectile.cs | 227 ++++++++++++++++++ .../DraedonsArsenal/PhaseslayerProjectile.png | Bin 0 -> 922 bytes 10 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 Effects/DistortionShader.xnb create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.cs create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBlade.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 9ecaf7bd76..b0a769b5aa 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -89,6 +89,7 @@ using Terraria.UI; using CalamityMod.Schematics; using CalamityMod.Tiles; using CalamityMod.TileEntities; +using CalamityMod.Projectiles.DraedonsArsenal; namespace CalamityMod { @@ -125,6 +126,7 @@ namespace CalamityMod public static Effect CustomShader; public static Effect LightShader; public static Effect TentacleShader; + public static Effect LightDistortionShader; // DR data structure public static SortedDictionary DRValues; @@ -296,6 +298,7 @@ namespace CalamityMod CustomShader = GetEffect("Effects/CustomShader"); LightShader = GetEffect("Effects/LightBurstShader"); TentacleShader = GetEffect("Effects/TentacleShader"); + LightDistortionShader = GetEffect("Effects/DistortionShader"); Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -331,8 +334,9 @@ namespace CalamityMod Filters.Scene["CalamityMod:LightBurst"].Load(); GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref(TentacleShader), "BurstPass"); + GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref(LightDistortionShader), "DistortionPass"); - RipperUI.Reset(); + RipperUI.Reset(); AstralArcanumUI.Load(this); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); @@ -778,6 +782,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), //Some hostile boss projectiles ModContent.ProjectileType(), diff --git a/Effects/DistortionShader.xnb b/Effects/DistortionShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..fc85ee96391821edb06901b387203737ba654e9e GIT binary patch literal 2808 zcmbVNOKcle6uslviPNOG5-bV|!XS_e3YHTRaG;6ZIQ>KzaAO-RffP-haXqTz3F8^1 zsk#`6F3M*Cf(@UAB|fSgsmg-SCPGA_9f$ym|MY zckb`ao0sy7v#SxheSk=LPkBMFm`2m6T8VN)O`I^*Wo^|k&n2=(!_pd7;&`>HRjdU~ zUDC|a_ zaZYPYrzXZL)zlenY)P9;PEI~WEJ_~LeLr+-^N?$L4`s01`6J}%Sf((>h-U`RC^UP1 zSv{*INpLd3s;BfgW7G#o!LTHbz$AzUVAxrsZkQDKT#*QW=fkzz1+8Kt+#H-7&&5E{w^Aq@POJshPl1VYx_A7>2U&(qf;Ri{oCDeD~Jq_T`?hf_?#K zOvK)}Yo9TF4x=X74)jkXdlUM$WbZyK4!JGq@B1}h1GXjMK1^MR(8GL)L)~tto1|><*z5?*w|Nm5yRr?5 zU&3P!!+WP8ckg)NHH;8`T*DFu-xcDH3DYoe{(0hkE9>hVMaKQ*U|MM|jxQ!DxKHCp z79NkE$`x|)LXEH5c-B~6(d$sA65~%NrY6S|U6JDe&KjQ36)QDx{n6^yo$(- zaUE_y3dPINlNj71<0*_&7))jK z>*pU|iw|Zl-gounFBdMQKl;#>wD5c8t@4A1y?hG~;35H)G#rZpP-fs@48Xwffr( z;}PJue<}#>%z+<1oo2irIFS>aFT`@=4**vV-uOx#`udyo_7l&&dHM1b^P|Am+wD!z zzV-dm4|$)UgF9iv*WaZm{9Sy|>7$(%dcdCoPH6+am`TD2oKmZg+O2zCALfzM^Ko_X zORdKcN1>3rK7hDUDYil-2RU2t-SB+FE{~||;Qagf7%O4D-6CrHIT&j@5pW{N;nm<_ zy*Ms+PYrEH)Zq2Xb(J<|-77W*eaE4w*E?=k)K)^iZi~q44R@}KMci6=jlv-c`xx`u e+)pS(Q3vM%wc*kwj?4Y*xNF#F*gFoNi$4L3`EAJn literal 0 HcmV?d00001 diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs new file mode 100644 index 0000000000..a8facdbf6a --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -0,0 +1,72 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + public class Phaseslayer : ModItem + { + public const int MinDamage = 4500; + public const int MaxDamage = 12500; + public const float SmallPhaseDamageMultiplier = 0.66f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + + "Swinging quickly causes the blade to release energy forward"); + } + public override void SetDefaults() + { + item.damage = MinDamage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; + + item.noUseGraphic = true; + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + + item.UseSound = SoundID.Item1; + item.autoReuse = true; + + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; + + item.shoot = ModContent.ProjectileType(); + + item.channel = true; + } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.RedPhasesaber); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.png b/Items/Weapons/DraedonsArsenal/Phaseslayer.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ 40f && projectile.timeLeft > Lifetime - 60) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(potentialTarget.Center) * 24f) / 8f; + } + projectile.frameCounter++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture(Texture); + MiscShaderData distortationShader = GameShaders.Misc["CalamityMod:LightDistortion"]; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Rectangle frame = bladeTexture.Frame(1, 5, 0, projectile.frameCounter / 4 % 5); + var drawData2 = new DrawData(bladeTexture, projectile.Center - Main.screenPosition, frame, Color.White, projectile.rotation, bladeTexture.Size() * 0.5f, projectile.scale * 1.2f, SpriteEffects.None, 0); + distortationShader.Apply(drawData2); + drawData2.Draw(spriteBatch); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.png b/Projectiles/DraedonsArsenal/PhaseslayerBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..8c9c20d1fef70add4e0e64bb923a1804bff60e53 GIT binary patch literal 3205 zcmeH}`&ScZ8popqVT_=e5yDLU&SelClkAjBf7G0z@f@LHS zBcRYMAb85@Dj-=LOauT*fwoL z2NHm!+@0A3g1v6xSmfXx^ErWFyEvM&dAlraVlef<^N?km2D;}cBjTPboYcV{w0p64 zo$>?vDGFD7HE4d;b>@vh-IN4}K^`uHT(_gEmM8hrv`dr@bI7hbf32lXfBsgRo`pqN zlPGmaMsQn>F&LBBl-4{Vrds)RrpwD9H<~*V$IR-moDsYtd@%`M-4s5~OJ)+iX zOvd9`P3obnT+I7H!nn3qcApWOC z_@lz68o{^n;y5oX&B52YhiE!6jf_9@Z~c3We@0uh|GpF^cGfgO+(A)YMe2AN@UXlKnI+~s_fb-ypM8_H z{V^TXWu(JsN)c8jX;he#8`MK(_w(PP&Z-rv6)EVzXaC%B7`1%5rlCsaI1oE73A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&Qayd3 QZ{aU7I)cY(4HwA&4XR(YO#lD@ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBlade.png b/Projectiles/DraedonsArsenal/PhaseslayerBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..a7058e9bce6ee8f2c379b5cae9de75e36517a3d4 GIT binary patch literal 20243 zcmeI4c|26@|Nku^WGNycxx2#{Q7W=TXeCURL1nA^B$>*VC3{F|(K3^S3_@jWQ;BRv zS`N{QNf8>9eJ%U%eFmj_`FuX#<&WRv@%#07H0CUGoom0I*Xw#+=QP1&n*iTZJ~lQs zfgRg7o3XL6tFp22Jf6=9XSzA}KZif;9%kG0*)pr7zQDmeCp}|5HnyB7{&7bxHa1Q+ z!cL1VaDHl&%s9nkYHA9;|NnpgKL`Gw%7LqD5m4{h**wim%%KVVzx`?6zWt$@BgW>m&WF!L@mi}@%Td9zJHIG&2;t5yc+l((X%U&g5xtUh%TbfT zw7rUwl4k8fnghE0ql2Hx=f)sLRCT5bu0Cv{dP-XzsSYrwDZPw!PbB$oPgFlxE!X)R z=hq##58wdS2vcpMN(4s8ape*%9!OX zCHHBiS=)pTi{f2gUf+iZyf-&PdIWHHdA0<0z`57g_94c*&1tk9E`~{+6SCno)U_qv zkrdktrXxn^fywWh`$?<>_pd|}1aO~2&yTl4N_MD~qsq@A16DG~m+93JqI5mKz;B}X z4&k&oGG(e)evCb6vU5uQ;|1#q zJE8n6t&>c#V(v+$uIFVk_Z$d0C)6&GW3N$;UL!2qmAY$C?$xP_72^#!V$F^9D-}d~ z1YTbdP}6ysj`l#tK(c5wJ--=WtUp6o@<0WUwSu9irnWY@%up` z{ab>#yUJw|_FCnrnZgkH@P#SYokGneM?&?*_Rbu-o`SW+o&}p8p>_M%_&iX% z(7OF>Oq@`%*q#McZKmVfeP`IoD#m!p%_Fbx()GwHFFNhl(vn=)q4`IG>aah8^fWpwT<}9r~0n8DYk5SFr7$rj1@$?x7gV5AQ`k$HEHsyjA%7{ z2bJ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obM%(wCYG;W zWj>Ws0ohX8tF=Wu?T_Bkc>v3H-nsO}cHBNi-Gz$vC3Aee7&aHLU0Iqw4^a7DeJz0S zhKK1Ni!E&yc+h{^51hjde_DN~4F+KIbB-llzUD!6p+GB+|fwvYofw{5BA|}5Sl^ZFU8k>r#H=5t} T%{mu*TiK2+CYv+$9Zvio#=7Kk literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png b/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..f52f934a8a507c13a0820e81617ea77af839cdfb GIT binary patch literal 3441 zcmchadpy(oAII@?YAP{w$|bV2I?<7XcHBm+BPEg~$!Ha6uFa6O%{fOd&CfznE)Uj?nrA;#>Rpz&ipUC!?pGBn+qfjo zyYPVA&#s7rMKfCFcGmT7u!|`U(Q%PEn^tD;38wmgkbj9X((~p#QpcPSu2YuAhM-)P z`X}_eH^F7RS;$s-7J0s0(Hg=)F5wq(l+dejkvq&VkJZaaq{O_v(7mZ+tpTxaIlA_; zdQH$$UZZG%3C8rNybiUgYxXz;^J++-b<2CyralB>RG9AB>X?*aU?E%xN*M6z6sZYR z=^8%GQ#1^7r9pOeL2+R=9lg5EKmxz?oCd-N!SEfX7$AIpA-Sv)WmQ~VRHmI30)*3= zq1Z5+x(9&Bb-zGeo}zO$uuQx#HWzPG_ZXDE;GY9X7XiNxgjBVcYs0}@L%O>UBdX%Z z0O23D=CcA~?Z7oQr_6TC8-Kv2r9vflBQqheNcZdZ=^_ zavy!gEyC~o+)J@FMEm*tfB-n9HV)lIJ1S_TizyIrD>i7;VxuVuC8E);DRxwTs&(>c z0+?up=q3wo^d_&S|d8sw<#E}3~#Sb8$upU~&-sanru`sU?Sj`xq(ZjzLRSb*z`K>>h(zO~yZp}XO`l97 zWTu>jZ8L+WrkzQW>0 zA|~a(w7;jxJqbKG$Es<8ZqSIZ1@pVA4No~{p(V)|=5+~HT-iGH<$(SoxJ%}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R3-q=hn{^9iCq0oPG4j>7j5yiy4I^rmx_`rnne(f%eiZfLXqp|E%OP989dgF2T~h&D9%z-o zrYI9M2I z@s*(y(DZ=i)4;aQkBI!>gmL@2f$(}KQFBi{6XD=0cj&IT^a(1Q zKZN>|L&4tZ|2d5u%(mGh?vvAw=Xlq)Z;2qmWx7!sm7#e$Mr(6{a`%-)8_?`$=#_Ci zvdNenYXH4|iNm$)hZ##&hU7_BaB6z{#;*W=_9aP4$o!Z!zTjtfuqn8z))*RON~Pi5VPX1nGT3}()NROxR5yOB>O(@l zbIH2Ex5Wn(Tp;lKXWpgt6uep5fETg{fz1^g_vig@7uI!t+l76V4vttB-_a0HB#WmR z4Vs>wo~-5fX=Y&!nw-T?><1sk@j1p# Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; + public float AngularSwingMomentum + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + + // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. + // That speed is 12 degrees per frame, or pi/15 radians per frame. + public const float MaxAngularDamage = MathHelper.Pi / 15f; + public const float DamageUpdateResponsiveness = 0.08f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.friendly = true; + projectile.localNPCHitCooldown = 3; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + + ManipulatePlayer(player); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + PlaySounds(player, deltaAngle); + HandleCooldowns(); + } + + public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + + float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); + float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + + float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); + projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); + } + + public void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. + if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) + { + float mouseDistance = projectile.Distance(Main.MouseWorld); + + // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). + float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + + float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } + else if (FadeoutTime == 0f) + { + if (!player.channel) + FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. + else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. + } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; + } + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } + + public void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + public void PlaySounds(Player player, float deltaAngle) + { + if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) + { + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); + } + bool wasBig = !IsSmall; + if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) + { + // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else player.HeldItem.Calamity().CurrentCharge--; + } + + // Make some visuals if the sword becomes small as a result of charging. + if (IsSmall && wasBig) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (!Main.dedServ) + { + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + } + } + projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + public void HandleCooldowns() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ Date: Wed, 22 Jul 2020 17:51:03 -0500 Subject: [PATCH 2/4] Initial upload of the weapon. --- CalamityMod.cs | 7 +- Effects/DistortionShader.xnb | Bin 0 -> 2808 bytes Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 72 ++++++ Items/Weapons/DraedonsArsenal/Phaseslayer.png | Bin 0 -> 922 bytes .../DraedonsArsenal/PhaseslayerBeam.cs | 67 ++++++ .../DraedonsArsenal/PhaseslayerBeam.png | Bin 0 -> 3205 bytes .../DraedonsArsenal/PhaseslayerBlade.png | Bin 0 -> 20243 bytes .../DraedonsArsenal/PhaseslayerBladeSmall.png | Bin 0 -> 3441 bytes .../DraedonsArsenal/PhaseslayerProjectile.cs | 227 ++++++++++++++++++ .../DraedonsArsenal/PhaseslayerProjectile.png | Bin 0 -> 922 bytes 10 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 Effects/DistortionShader.xnb create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.cs create mode 100644 Items/Weapons/DraedonsArsenal/Phaseslayer.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBeam.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBlade.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs create mode 100644 Projectiles/DraedonsArsenal/PhaseslayerProjectile.png diff --git a/CalamityMod.cs b/CalamityMod.cs index 9ecaf7bd76..b0a769b5aa 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -89,6 +89,7 @@ using Terraria.UI; using CalamityMod.Schematics; using CalamityMod.Tiles; using CalamityMod.TileEntities; +using CalamityMod.Projectiles.DraedonsArsenal; namespace CalamityMod { @@ -125,6 +126,7 @@ namespace CalamityMod public static Effect CustomShader; public static Effect LightShader; public static Effect TentacleShader; + public static Effect LightDistortionShader; // DR data structure public static SortedDictionary DRValues; @@ -296,6 +298,7 @@ namespace CalamityMod CustomShader = GetEffect("Effects/CustomShader"); LightShader = GetEffect("Effects/LightBurstShader"); TentacleShader = GetEffect("Effects/TentacleShader"); + LightDistortionShader = GetEffect("Effects/DistortionShader"); Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -331,8 +334,9 @@ namespace CalamityMod Filters.Scene["CalamityMod:LightBurst"].Load(); GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref(TentacleShader), "BurstPass"); + GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref(LightDistortionShader), "DistortionPass"); - RipperUI.Reset(); + RipperUI.Reset(); AstralArcanumUI.Load(this); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); @@ -778,6 +782,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), //Some hostile boss projectiles ModContent.ProjectileType(), diff --git a/Effects/DistortionShader.xnb b/Effects/DistortionShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..fc85ee96391821edb06901b387203737ba654e9e GIT binary patch literal 2808 zcmbVNOKcle6uslviPNOG5-bV|!XS_e3YHTRaG;6ZIQ>KzaAO-RffP-haXqTz3F8^1 zsk#`6F3M*Cf(@UAB|fSgsmg-SCPGA_9f$ym|MY zckb`ao0sy7v#SxheSk=LPkBMFm`2m6T8VN)O`I^*Wo^|k&n2=(!_pd7;&`>HRjdU~ zUDC|a_ zaZYPYrzXZL)zlenY)P9;PEI~WEJ_~LeLr+-^N?$L4`s01`6J}%Sf((>h-U`RC^UP1 zSv{*INpLd3s;BfgW7G#o!LTHbz$AzUVAxrsZkQDKT#*QW=fkzz1+8Kt+#H-7&&5E{w^Aq@POJshPl1VYx_A7>2U&(qf;Ri{oCDeD~Jq_T`?hf_?#K zOvK)}Yo9TF4x=X74)jkXdlUM$WbZyK4!JGq@B1}h1GXjMK1^MR(8GL)L)~tto1|><*z5?*w|Nm5yRr?5 zU&3P!!+WP8ckg)NHH;8`T*DFu-xcDH3DYoe{(0hkE9>hVMaKQ*U|MM|jxQ!DxKHCp z79NkE$`x|)LXEH5c-B~6(d$sA65~%NrY6S|U6JDe&KjQ36)QDx{n6^yo$(- zaUE_y3dPINlNj71<0*_&7))jK z>*pU|iw|Zl-gounFBdMQKl;#>wD5c8t@4A1y?hG~;35H)G#rZpP-fs@48Xwffr( z;}PJue<}#>%z+<1oo2irIFS>aFT`@=4**vV-uOx#`udyo_7l&&dHM1b^P|Am+wD!z zzV-dm4|$)UgF9iv*WaZm{9Sy|>7$(%dcdCoPH6+am`TD2oKmZg+O2zCALfzM^Ko_X zORdKcN1>3rK7hDUDYil-2RU2t-SB+FE{~||;Qagf7%O4D-6CrHIT&j@5pW{N;nm<_ zy*Ms+PYrEH)Zq2Xb(J<|-77W*eaE4w*E?=k)K)^iZi~q44R@}KMci6=jlv-c`xx`u e+)pS(Q3vM%wc*kwj?4Y*xNF#F*gFoNi$4L3`EAJn literal 0 HcmV?d00001 diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs new file mode 100644 index 0000000000..a8facdbf6a --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -0,0 +1,72 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + public class Phaseslayer : ModItem + { + public const int MinDamage = 4500; + public const int MaxDamage = 12500; + public const float SmallPhaseDamageMultiplier = 0.66f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + + "Swinging quickly causes the blade to release energy forward"); + } + public override void SetDefaults() + { + item.damage = MinDamage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; + + item.noUseGraphic = true; + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.RareVariant; + + item.UseSound = SoundID.Item1; + item.autoReuse = true; + + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; + + item.shoot = ModContent.ProjectileType(); + + item.channel = true; + } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.RedPhasesaber); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.png b/Items/Weapons/DraedonsArsenal/Phaseslayer.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ 40f && projectile.timeLeft > Lifetime - 60) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(potentialTarget.Center) * 24f) / 8f; + } + projectile.frameCounter++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture(Texture); + MiscShaderData distortationShader = GameShaders.Misc["CalamityMod:LightDistortion"]; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Rectangle frame = bladeTexture.Frame(1, 5, 0, projectile.frameCounter / 4 % 5); + var drawData2 = new DrawData(bladeTexture, projectile.Center - Main.screenPosition, frame, Color.White, projectile.rotation, bladeTexture.Size() * 0.5f, projectile.scale * 1.2f, SpriteEffects.None, 0); + distortationShader.Apply(drawData2); + drawData2.Draw(spriteBatch); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.png b/Projectiles/DraedonsArsenal/PhaseslayerBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..8c9c20d1fef70add4e0e64bb923a1804bff60e53 GIT binary patch literal 3205 zcmeH}`&ScZ8popqVT_=e5yDLU&SelClkAjBf7G0z@f@LHS zBcRYMAb85@Dj-=LOauT*fwoL z2NHm!+@0A3g1v6xSmfXx^ErWFyEvM&dAlraVlef<^N?km2D;}cBjTPboYcV{w0p64 zo$>?vDGFD7HE4d;b>@vh-IN4}K^`uHT(_gEmM8hrv`dr@bI7hbf32l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`w2*h`}QDQ?LXzL<-c7Ub9t=!5rPpz$kRb9synqwzsVaZJf7QD-BK+u+*yOQ{eyv>?WSVcUGJbto>LCMGYRmRHqnau zh-aMpte&9X-1R|g?uMdS&qs)qq~`69>3PkWt@Rnm4!2AyHo$=0GCN>)hU{yB@SIBD z*=39vAd&jo>8>)@6g8(4b>r;tIae&CsxAtpznV#0F`iW+a<}17dvx-g&uQ zXV!5#;6CbA^l?d=F`5%(K^0(Ucr&Qayd3 QZ{aU7I)cY(4HwA&4XR(YO#lD@ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBlade.png b/Projectiles/DraedonsArsenal/PhaseslayerBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..a7058e9bce6ee8f2c379b5cae9de75e36517a3d4 GIT binary patch literal 20243 zcmeI4c|26@|Nku^WGNycxx2#{Q7W=TXeCURL1nA^B$>*VC3{F|(K3^S3_@jWQ;BRv zS`N{QNf8>9eJ%U%eFmj_`FuX#<&WRv@%#07H0CUGoom0I*Xw#+=QP1&n*iTZJ~lQs zfgRg7o3XL6tFp22Jf6=9XSzA}KZif;9%kG0*)pr7zQDmeCp}|5HnyB7{&7bxHa1Q+ z!cL1VaDHl&%s9nkYHA9;|NnpgKL`Gw%7LqD5m4{h**wim%%KVVzx`?6zWt$@BgW>m&WF!L@mi}@%Td9zJHIG&2;t5yc+l((X%U&g5xtUh%TbfT zw7rUwl4k8fnghE0ql2Hx=f)sLRCT5bu0Cv{dP-XzsSYrwDZPw!PbB$oPgFlxE!X)R z=hq##58wdS2vcpMN(4s8ape*%9!OX zCHHBiS=)pTi{f2gUf+iZyf-&PdIWHHdA0<0z`57g_94c*&1tk9E`~{+6SCno)U_qv zkrdktrXxn^fywWh`$?<>_pd|}1aO~2&yTl4N_MD~qsq@A16DG~m+93JqI5mKz;B}X z4&k&oGG(e)evCb6vU5uQ;|1#q zJE8n6t&>c#V(v+$uIFVk_Z$d0C)6&GW3N$;UL!2qmAY$C?$xP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*eql1-`M~Ea2~gp7}FL_u#>RfK+`PMvB)m?dp73llO2Vgn40z z#u6?AVtRJwi_Z)cj%l<7iV?q=tE}ZIPhpJa?)_dv)^dCkNfCIIO1Z3Ro0$5#;)em@ zj|5*Y!zjj$Z2IXN^U>U+In0jh1AX+c8uaMZjtUrN7C#OymwT)TLKK(~P`#MjLwhSi z&i~+N^%O4FPAd*TpY5_7mW*6$jz3v?pX&y=7z&1n6z*L9uz{Fc3eMlobM%(wCYG;W zWj>Ws0ohX8tF=Wu?T_Bkc>v3H-nsO}cHBNi-Gz$vC3Aee7&aHLU0Iqw4^a7DeJz0S zhKK1Ni!E&yc+h{^51hjde_DN~4F+KIbB-llzUD!6p+GB+|fwvYofw{5BA|}5Sl^ZFU8k>r#H=5t} T%{mu*TiK2+CYv+$9Zvio#=7Kk literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png b/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..f52f934a8a507c13a0820e81617ea77af839cdfb GIT binary patch literal 3441 zcmchadpy(oAII@?YAP{w$|bV2I?<7XcHBm+BPEg~$!Ha6uFa6O%{fOd&CfznE)Uj?nrA;#>Rpz&ipUC!?pGBn+qfjo zyYPVA&#s7rMKfCFcGmT7u!|`U(Q%PEn^tD;38wmgkbj9X((~p#QpcPSu2YuAhM-)P z`X}_eH^F7RS;$s-7J0s0(Hg=)F5wq(l+dejkvq&VkJZaaq{O_v(7mZ+tpTxaIlA_; zdQH$$UZZG%3C8rNybiUgYxXz;^J++-b<2CyralB>RG9AB>X?*aU?E%xN*M6z6sZYR z=^8%GQ#1^7r9pOeL2+R=9lg5EKmxz?oCd-N!SEfX7$AIpA-Sv)WmQ~VRHmI30)*3= zq1Z5+x(9&Bb-zGeo}zO$uuQx#HWzPG_ZXDE;GY9X7XiNxgjBVcYs0}@L%O>UBdX%Z z0O23D=CcA~?Z7oQr_6TC8-Kv2r9vflB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!_BL?IAt1TN7q)Gvtdo%HdTvKM>IF^r zVPLL0Cc0*by*Lk&r`=Oxx5}D3sMhH3@9q!HC7!Um4_I!e^h3|v?Xo&L!HK~%$m5NH z=xe2Xrcdn=p13RN`h7v{Ei9}rMAKlT7&VTb{H`72vwk16aUb*f6T?Gd%%h-9{3L&h zX11a|>eUT1*7?K*)!}AB{Snzhe{7ZKt~PBu!#Y);8y;NUC@+{=-cQ~^&Xyf-(n=GK zShuUR3-q=hn{^9iCq0oPG4j>7j5yiy4I^rmx_`rnne(f%eiZfLXqp|E%OP989dgF2T~h&D9%z-o zrYI9M2I z@s*(y(DZ=i)4;aQkBI!>gmL@2f$(}KQFBi{6XD=0cj&IT^a(1Q zKZN>|L&4tZ|2d5u%(mGh?vvAw=Xlq)Z;2qmWx7!sm7#e$Mr(6{a`%-)8_?`$=#_Ci zvdNenYXH4|iNm$)hZ##&hU7_BaB6z{#;*W=_9aP4$o!Z!zTjtfuqn8z))*RON~Pi5VPX1nGT3}()NROxR5yOB>O(@l zbIH2Ex5Wn(Tp;lKXWpgt6uep5fETg{fz1^g_vig@7uI!t+l76V4vttB-_a0HB#WmR z4Vs>wo~-5fX=Y&!nw-T?><1sk@j1p# Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; + public float AngularSwingMomentum + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + + // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. + // That speed is 12 degrees per frame, or pi/15 radians per frame. + public const float MaxAngularDamage = MathHelper.Pi / 15f; + public const float DamageUpdateResponsiveness = 0.08f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.friendly = true; + projectile.localNPCHitCooldown = 3; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + + ManipulatePlayer(player); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + PlaySounds(player, deltaAngle); + HandleCooldowns(); + } + + public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + + float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); + float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + + float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); + projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); + } + + public void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. + if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) + { + float mouseDistance = projectile.Distance(Main.MouseWorld); + + // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). + float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + + float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } + else if (FadeoutTime == 0f) + { + if (!player.channel) + FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. + else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. + } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; + } + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } + + public void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + public void PlaySounds(Player player, float deltaAngle) + { + if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) + { + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); + } + bool wasBig = !IsSmall; + if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) + { + // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else player.HeldItem.Calamity().CurrentCharge--; + } + + // Make some visuals if the sword becomes small as a result of charging. + if (IsSmall && wasBig) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (!Main.dedServ) + { + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + } + } + projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + public void HandleCooldowns() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } +} diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..53f9fb432a68ddd899e54711c79d47385c9e9a23 GIT binary patch literal 922 zcmV;L17-Y)P)Px&R7pfZRA_+84BsDWdCe430x#vFeyJyb5=ZuC+ z1p)y8#!_(rzHH>Hc6MW_xMsEkP^na0&3njI@Bb*R)s8}XAejVUJ(sHj+`e?i*8cvB zd9l|_d!Tjl2bVZd1(-TF3BYQ;1i<@+4*;Azegc4@co=}0H?x+x4;=9>uLl&;zs?>8 zpnJ}E9x`{tD|LvA#HWR{JbNwQ68AigOLQ4e_W|%RTLx;;q!Y*84j|+ckq7{r#bOoU z$Z!UL<&`CA*UWaHb60UM^(1wg%Pncq!69Bp)=3SCJLz9{!neemo}4P-v>CUvX51Ey z45T!G#q|wfcT^b}NMW{H`lZddo;BmTsM!wqmUvSiPbT{TC>9GAQa7((v)D~PegZVl zfSme?B9W*DkjwpOxUTjguKIK+6apX-PgVhL-M9+C;?gPrBbgxpW}dwUYMG9DSCPzU z>dJZB{tq5L1zBv4 z0WfY7RojKMI-aiUmUk%_?6G|heM?*m1Om1voy6hE)2A%I&%S*JKrC$B1|`Q-Rm(ZQ z+qO$)v{foLoJY<9RlX(u_vE~M;UWO(cocwz&)^;(jt|t>{R#MlI2;*iT#8D zde?X|pUgjL#{F!*0KoHCFM)O-E~G``dw1^M18U?%La^ImVAWn!^LgtIiBHQ(s`gjc z=Ud|1XvX+wD{E`E(IpX!8M)%tRuy*F0!4K-LF(<)s57NhwA5OoI-jcH!9flDOnk2y zjY>)-9O~^g?ikzKwpqT~E^07t!<(yri90nk%i7gCNu4b3LYboN6fGV-C+o_gnJMBl@ZN*9MAj|tSe)|#MtHifMeMXL{myH}#^>MYm zL)@+Oa@qDSQ Date: Wed, 22 Jul 2020 23:14:03 -0400 Subject: [PATCH 3/4] Significant behavior tweaks to Phaseslayer. --- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 113 +++-- .../DraedonsArsenal/PhaseslayerProjectile.cs | 455 ++++++++++-------- 2 files changed, 323 insertions(+), 245 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index a8facdbf6a..e7d66b1527 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -8,65 +8,74 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { - public class Phaseslayer : ModItem - { - public const int MinDamage = 4500; - public const int MaxDamage = 12500; - public const float SmallPhaseDamageMultiplier = 0.66f; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Phaseslayer"); - Tooltip.SetDefault("Creates a blade that aims towards the cursor. The faster you swing the blade, the more damage it does.\n" + - "Swinging quickly causes the blade to release energy forward"); - } - public override void SetDefaults() - { - item.damage = MinDamage; - item.melee = true; - item.width = 26; - item.height = 26; - item.useTime = 24; - item.useAnimation = 24; - item.useStyle = ItemUseStyleID.HoldingOut; - item.useTurn = false; - item.knockBack = 7f; + public class Phaseslayer : ModItem + { + public const int Damage = 12500; + // When below this percentage of charge, the sword is small instead of big. + public const float SizeChargeThreshold = 0.33f; + public const float SmallDamageMultiplier = 0.66f; - item.noUseGraphic = true; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + Tooltip.SetDefault("Wield a colossal laser blade which is controlled by the cursor\n" + + "Faster swings deal more damage and release sword beams\n" + + "When at low charge, the blade is smaller and weaker"); + } + public override void SetDefaults() + { + item.damage = Damage; + item.melee = true; + item.width = 26; + item.height = 26; + item.useTime = 24; + item.useAnimation = 24; + item.useStyle = ItemUseStyleID.HoldingOut; + item.useTurn = false; + item.knockBack = 7f; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.RareVariant; + item.noUseGraphic = true; - item.UseSound = SoundID.Item1; - item.autoReuse = true; + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.rare = ItemRarityID.Red; + item.Calamity().customRarity = CalamityRarity.RareVariant; - item.Calamity().Chargeable = true; - item.Calamity().ChargeMax = 250; + item.UseSound = SoundID.Item1; + item.autoReuse = true; - item.shoot = ModContent.ProjectileType(); + item.Calamity().Chargeable = true; + item.Calamity().ChargeMax = 250; - item.channel = true; - } + item.shoot = ModContent.ProjectileType(); + item.channel = true; + } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); - blade.rotation = blade.AngleTo(Main.MouseWorld); - return false; - } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile blade = Projectile.NewProjectileDirect(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + blade.rotation = blade.AngleTo(Main.MouseWorld); + return false; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.RedPhasesaber); - recipe.AddTile(ModContent.TileType()); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override void AddRecipes() + { + void AddIndividualRecipe(int saberID) + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(saberID); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + int[] phasesabers = { ItemID.WhitePhasesaber, ItemID.RedPhasesaber, ItemID.GreenPhasesaber, ItemID.BluePhasesaber, ItemID.PurplePhasesaber, ItemID.YellowPhasesaber }; + foreach (int id in phasesabers) + AddIndividualRecipe(id); + } + } } diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index b34e8674fb..95cc15d8d9 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -1,4 +1,5 @@ using CalamityMod.Dusts; +using CalamityMod.Items; using CalamityMod.Items.Weapons.DraedonsArsenal; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,219 +10,287 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.DraedonsArsenal { - public class PhaseslayerProjectile : ModProjectile - { - public bool IsSmall => Main.player[projectile.owner].ActiveItem().Calamity().CurrentCharge / (float)Main.player[projectile.owner].ActiveItem().Calamity().ChargeMax < 0.5f; - public float AngularSwingMomentum - { - get => projectile.ai[0]; - set => projectile.ai[0] = value; - } - public float FadeoutTime - { - get => projectile.localAI[0]; - set => projectile.localAI[0] = value; - } - public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; - public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; + public class PhaseslayerProjectile : ModProjectile + { + // The "average" or "expected" swing speed which the sword's damage balance is based off of. + // This is rotation EVERY FRAME. The "average" swing speed is 360 degrees in one second, aka pi/30 radians per frame. + public const float StandardSwingSpeed = MathHelper.Pi / 30f; - // This is rotation EVERY FRAME. Max damage occurs when you can swing it 360 degrees in half a second. - // That speed is 12 degrees per frame, or pi/15 radians per frame. - public const float MaxAngularDamage = MathHelper.Pi / 15f; - public const float DamageUpdateResponsiveness = 0.08f; - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Phaseslayer"); - ProjectileID.Sets.TrailingMode[projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; - } + // How quickly the sword's damage updates to reflect its current speed. Higher values make it change damage more quickly. + public const float DamageUpdateResponsiveness = 0.08f; - public override void SetDefaults() - { - projectile.width = 46; // Collision logic is done manually. - projectile.height = 46; - projectile.penetrate = -1; - projectile.tileCollide = false; - projectile.melee = true; - projectile.ignoreWater = true; - projectile.usesLocalNPCImmunity = true; - projectile.friendly = true; - projectile.localNPCHitCooldown = 3; - } + // When the accumuluated "charge exhaustion" meter reaches this value, the Phaseslayer item loses one point of charge. + public const float ChargeLossBreakpoint = 300f; - public override void AI() - { - Player player = Main.player[projectile.owner]; - float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; // Within the bounds of 0 and 2pi instead of -pi and pi for convenience with absolute values. - float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; - float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + private const float MaximumMouseRange = 360f; + private const float ProjCenterOffset = 36f; - ManipulatePlayer(player); - AdjustDamageBasedOnRotation(player, deltaAngle); - ManipulateFrames(); - PlaySounds(player, deltaAngle); - HandleCooldowns(); - } + public bool IsSmall + { + get + { + CalamityGlobalItem swordItem = Main.player[projectile.owner].ActiveItem().Calamity(); + float chargeRatio = swordItem.CurrentCharge / (float)swordItem.ChargeMax; + return chargeRatio < Phaseslayer.SizeChargeThreshold; + } + } + + // ai[0] wrapper. Stores a rolling lerped average of angular momentum which is used as the swing speed damage multiplier. + public float AngularDamageFactor + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } - public void AdjustDamageBasedOnRotation(Player player, float deltaAngle) - { - AngularSwingMomentum = MathHelper.Lerp(AngularSwingMomentum, deltaAngle, DamageUpdateResponsiveness); + // ai[1] wrapper. Stores an accumulating "charge exhaustion" meter. When it reaches the limit, a charge point is lost. + public float ChargeLossProgress + { + get => projectile.ai[1]; + set => projectile.ai[1] = value; + } - float damageInterpolationValue = 0.16f + (float)Math.Log(AngularSwingMomentum / MaxAngularDamage + 1.5f, 3f); - float baseDamageFromSpeed = MathHelper.Lerp(Phaseslayer.MinDamage, Phaseslayer.MaxDamage, damageInterpolationValue); + // localAI[0] wrapper + public float FadeoutTime + { + get => projectile.localAI[0]; + set => projectile.localAI[0] = value; + } - float statDamageMultiplier = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallPhaseDamageMultiplier : 1f); - projectile.damage = (int)(baseDamageFromSpeed * statDamageMultiplier); - } + public int BladeFrameX => IsSmall ? 1 : projectile.frame / 7; + public int BladeFrameY => IsSmall ? projectile.frame % 3 : projectile.frame % 7; - public void ManipulatePlayer(Player player) - { - if (Main.myPlayer == player.whoAmI) - { - // Smoothly rotate towards the mouse. This effect is weaker if the mouse is close to the player, to prevent jittery movement. - if (player.channel && !player.noItems && !player.CCed && player.ActiveItem().type == ModContent.ItemType()) - { - float mouseDistance = projectile.Distance(Main.MouseWorld); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Phaseslayer"); + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 8; + } - // Ranges from 0 (your mouse is on the player) to 1 (your mouse is at the max range considered, or any further distance). - float distRatio = Utils.InverseLerp(0f, 360f, mouseDistance, true); + public override void SetDefaults() + { + projectile.width = 46; // Collision logic is done manually. + projectile.height = 46; + projectile.friendly = true; + projectile.melee = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; - float aimResponsiveness = Utils.InverseLerp(0.035f, 1f, distRatio); - projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); - } - else if (FadeoutTime == 0f) - { - if (!player.channel) - FadeoutTime = 10f; // Fade out if the player is no longer charging the weapon. - else projectile.Kill(); // But if something happened to the player, such as death, just kill the projectile immediately. - } - projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * 36f; - } - projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); - player.ChangeDir(projectile.direction); - player.heldProj = projectile.whoAmI; - player.itemTime = 2; - player.itemAnimation = 2; - player.itemRotation = projectile.rotation * projectile.direction; - } + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 3; + } - public void ManipulateFrames() - { - projectile.frame = 0; + public override void AI() + { + Player player = Main.player[projectile.owner]; + // Angles are wrapped to be 0 to 2pi instead of -pi to pi for convenience with absolute values. + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; + float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; + float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); - if (IsSmall) - { - // Fadeout frames. - if (FadeoutTime > 5) - projectile.frame = 1; - else if (FadeoutTime > 0) - projectile.frame = 2; - } - else - { - projectile.frameCounter++; - int adjustFrameCounter = projectile.frameCounter % 120; + ManipulatePlayer(player); + bool wasBig = !IsSmall; + UpdateCharge(player); + bool justShrunk = IsSmall && wasBig; + if (justShrunk) + OnShrinkEffects(); + AdjustDamageBasedOnRotation(player, deltaAngle); + ManipulateFrames(); + HandleSwordBeams(player, deltaAngle); + HandleFadeout(); + } - // Idle lightning frames. - if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) - projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); - if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) - projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + private void ManipulatePlayer(Player player) + { + if (Main.myPlayer == player.whoAmI) + { + // In addition to typical channel cancellation criteria, the sword fizzles out if it runs out of charge. + Item playerItem = player.ActiveItem(); + bool hasCharge = playerItem.Calamity().CurrentCharge > 0; + if (player.channel && !player.noItems && !player.CCed && playerItem.type == ModContent.ItemType() && hasCharge) + { + // The distance ratio ranges from 0 (your mouse is directly on the player) to 1 (your mouse is at the max range considered, or any further distance). + float mouseDistance = projectile.Distance(Main.MouseWorld); + float distRatio = Utils.InverseLerp(0f, MaximumMouseRange, mouseDistance, true); - // Fadeout frames. - if (FadeoutTime > 5) - projectile.frame = 19; - else if (FadeoutTime > 0) - projectile.frame = 20; - } - } + // This formula ensures that the sword has a sudden and extremely harsh responsiveness penalty when the mouse is close to the player. + // Otherwise it controls perfectly fine. + float aimResponsiveness = 0.035f + 0.3f * (float)Math.Pow(distRatio, 1D/3); - public void PlaySounds(Player player, float deltaAngle) - { - if (projectile.soundDelay <= 0 && deltaAngle >= 0.055f) - { - if (Main.myPlayer == player.whoAmI) - { - Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; - Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.45), 0f, player.whoAmI); - } - bool wasBig = !IsSmall; - if (Main.rand.NextBool(10) && player.ActiveItem().Calamity().CurrentCharge > 0) - { - // This needs to be done manually instead of via ActiveItem. If it isn't, the charge reductions don't work if the item is held via the mouse. - if (Main.myPlayer == projectile.owner) - { - if (Main.mouseItem.active) - Main.mouseItem.Calamity().CurrentCharge--; - else player.HeldItem.Calamity().CurrentCharge--; - } + // Update the sword's angle with the responsiveness determined by mouse position. + projectile.rotation = projectile.rotation.AngleLerp(player.AngleTo(Main.MouseWorld), aimResponsiveness); + } - // Make some visuals if the sword becomes small as a result of charging. - if (IsSmall && wasBig) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); - if (!Main.dedServ) - { - for (int i = 0; i < 60; i++) - { - Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); - dust.velocity = Main.rand.NextVector2Circular(20f, 20f); - dust.scale = 2.5f; - dust.fadeIn = 1.2f; - dust.noGravity = true; - } - } - } - } - projectile.soundDelay = 15 - (int)MathHelper.Clamp(deltaAngle / MathHelper.ToRadians(36f) * 9f, 0f, 9f); - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); - } - } + // If the player is not wielding the sword, determine whether it should fade out or instantly vanish. + else if (FadeoutTime == 0f) + { + // If the player voluntarily stopped holding left mouse, start the fadeout timer. + if (!player.channel) + FadeoutTime = 10f; + // If the player was killed, frozen, cursed, etc. just delete it immediately. + else + projectile.Kill(); + } - public void HandleCooldowns() - { - if (FadeoutTime > 0) - { - FadeoutTime--; - if (FadeoutTime <= 0f) - projectile.Kill(); - } - } + projectile.Center = player.MountedCenter + projectile.rotation.ToRotationVector2() * ProjCenterOffset; + } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); - Texture2D hiltTexture = ModContent.GetTexture(Texture); - if (IsSmall) - bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); - Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; - Vector2 origin = bladeTexture.Size() * 0.5f; - origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); - Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + // These lines ensure the player and their arm are rotated the correct direction to hold the sword. + projectile.direction = (Math.Cos(projectile.rotation) > 0).ToDirectionInt(); + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = projectile.rotation * projectile.direction; + } - // TODO: Update this afterimage drawcode to be more cool. - for (int i = 1; i < projectile.oldRot.Length; i++) - { - float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); - float angle = projectile.rotation + angleDelta; - angle += MathHelper.PiOver2; - Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); - Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); - spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); - } + private void UpdateCharge(Player player) + { + // Having the sword active at all costs some energy. + ChargeLossProgress += 1f; + + // If charge is due to be lost, reset the accumuluated charge exhaustion and update the player's held item. + if (ChargeLossProgress > ChargeLossBreakpoint) + { + ChargeLossProgress -= ChargeLossBreakpoint; - spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); - spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + if (Main.myPlayer == projectile.owner) + { + if (Main.mouseItem.active) + Main.mouseItem.Calamity().CurrentCharge--; + else + player.HeldItem.Calamity().CurrentCharge--; + } + } + } - return false; - } + private void OnShrinkEffects() + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/MechGaussRifle"), projectile.Center); + if (Main.dedServ) + return; - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float _ = 0f; - Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; - Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); - } - } + for (int i = 0; i < 60; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Main.rand.NextVector2Circular(20f, 20f); + dust.scale = 2.5f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + + private void AdjustDamageBasedOnRotation(Player player, float deltaAngle) + { + // Update the rolling "blade angular momentum" average by gently lerping in the newest data point. + AngularDamageFactor = MathHelper.Lerp(AngularDamageFactor, deltaAngle, DamageUpdateResponsiveness); + + // 0x expected speed gives you 53.5% damage. + // 1x expected speed gives you 100.0% damage. + // 1.5x expected speed gives you 116.6% damage. + // 2x expected speed gives you 130.6% damage. + // 3x expected speed gives you 153.5% damage. + // 4x expected speed gives you 171.7% damage. + // 5x expected speed gives you 187.0% damage. + float speedDamageScalar = 0.166f + (float)Math.Log(AngularDamageFactor / StandardSwingSpeed + 1.5f, 3f); + float statDamageScalar = player.MeleeDamage() * (IsSmall ? Phaseslayer.SmallDamageMultiplier : 1f); + projectile.damage = (int)(Phaseslayer.Damage * speedDamageScalar * statDamageScalar); + } + + private void ManipulateFrames() + { + projectile.frame = 0; + + if (IsSmall) + { + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 1; + else if (FadeoutTime > 0) + projectile.frame = 2; + } + else + { + projectile.frameCounter++; + int adjustFrameCounter = projectile.frameCounter % 120; + + // Idle lightning frames. + if (adjustFrameCounter >= 50 && adjustFrameCounter <= 78) + projectile.frame = (int)MathHelper.Lerp(1, 9, Utils.InverseLerp(50, 75, adjustFrameCounter, true)); + if (adjustFrameCounter >= 90 && adjustFrameCounter <= 120) + projectile.frame = (int)MathHelper.Lerp(10, 18, Utils.InverseLerp(90, 117, adjustFrameCounter, true)); + + // Fadeout frames. + if (FadeoutTime > 5) + projectile.frame = 19; + else if (FadeoutTime > 0) + projectile.frame = 20; + } + } + + private void HandleSwordBeams(Player player, float deltaAngle) + { + // Producing a sword beam takes a bit higher of a speed than the "typical" speed the sword is balanced around. + if (projectile.soundDelay <= 0 && deltaAngle >= 1.3f * StandardSwingSpeed) + { + // Sword beams cost a noticeable amount of energy, but deal the blade's current damage. Swing harder to get more damage! + ChargeLossProgress += 30f; + if (Main.myPlayer == player.whoAmI) + { + Vector2 velocity = projectile.rotation.ToRotationVector2() * 20f; + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), projectile.damage, 0f, player.whoAmI); + } + + // The sound delay doubles as the sword beam's cooldown. + projectile.soundDelay = 15; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); + } + } + + private void HandleFadeout() + { + if (FadeoutTime > 0) + { + FadeoutTime--; + if (FadeoutTime <= 0f) + projectile.Kill(); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade"); + Texture2D hiltTexture = ModContent.GetTexture(Texture); + if (IsSmall) + bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 origin = bladeTexture.Size() * 0.5f; + origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); + Rectangle frame = IsSmall ? bladeTexture.Frame(1, 3, 0, BladeFrameY) : bladeTexture.Frame(3, 7, BladeFrameX, BladeFrameY); + + // TODO: Update this afterimage drawcode to be more cool. + for (int i = 1; i < projectile.oldRot.Length; i++) + { + float angleDelta = MathHelper.Clamp(projectile.rotation - projectile.oldRot[i], -0.26f, 0.26f); + float angle = projectile.rotation + angleDelta; + angle += MathHelper.PiOver2; + Color color = Color.White * (float)Math.Pow(1f - i / (float)projectile.oldRot.Length, 3f); + Rectangle afterimageFrame = IsSmall ? bladeTexture.Frame(1, 3, 0, 2) : bladeTexture.Frame(3, 7, 2, 6); + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, afterimageFrame, color, angle, origin, projectile.scale, SpriteEffects.None, 0f); + } + + spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + Vector2 start = projectile.Center + projectile.rotation.ToRotationVector2() * 28f; + Vector2 end = start + projectile.rotation.ToRotationVector2() * (IsSmall ? 202f : 254f) * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 60f * projectile.scale, ref _); + } + } } From b3a39e706d0b54a6b49c1b2ecffb434018f3ffe3 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 22 Jul 2020 23:38:07 -0400 Subject: [PATCH 4/4] boosted damage, lowered iframes, fixed insta beam --- Items/Weapons/DraedonsArsenal/Phaseslayer.cs | 2 +- Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index e7d66b1527..9023469ff9 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class Phaseslayer : ModItem { - public const int Damage = 12500; + public const int Damage = 19000; // When below this percentage of charge, the sword is small instead of big. public const float SizeChargeThreshold = 0.33f; public const float SmallDamageMultiplier = 0.66f; diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index 95cc15d8d9..70bf27abed 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // When the accumuluated "charge exhaustion" meter reaches this value, the Phaseslayer item loses one point of charge. public const float ChargeLossBreakpoint = 300f; + public const int SwordBeamCooldown = 15; private const float MaximumMouseRange = 360f; private const float ProjCenterOffset = 36f; @@ -77,7 +78,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 3; + projectile.localNPCHitCooldown = 7; } public override void AI() @@ -88,6 +89,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + // Frame 1 effect: Prevent the sword from instantly firing a sword beam. + if (projectile.localAI[1] == 0f) + { + projectile.localAI[1] = 1f; + projectile.soundDelay = SwordBeamCooldown; + } + ManipulatePlayer(player); bool wasBig = !IsSmall; UpdateCharge(player); @@ -242,7 +250,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } // The sound delay doubles as the sword beam's cooldown. - projectile.soundDelay = 15; + projectile.soundDelay = SwordBeamCooldown; Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ELRFire"), projectile.Center); } }