From 9445cf8f78a2d5d001c1c52b35f466f49c18e918 Mon Sep 17 00:00:00 2001 From: Joost8910 Date: Wed, 13 May 2020 20:39:32 -0500 Subject: [PATCH] Lord's Flame --- Items/Rewards/ImpLordFlame.cs | 63 +++++++++++ Items/Rewards/ImpLordFlame.png | Bin 0 -> 1243 bytes Items/Rewards/TailWhip.cs | 2 +- Items/Weapons/WaterWhip.cs | 3 +- JoostMod.cs | 1 + JoostPlayer.cs | 2 +- NPCs/Hunts/FireBall.cs | 2 +- NPCs/Hunts/FireBall2.cs | 176 ++++++++++++++++++++++++++++++ NPCs/Hunts/FireBall2.png | Bin 0 -> 3324 bytes Projectiles/BurningSphere.cs | 49 +++++++++ Projectiles/BurningSphere.png | Bin 0 -> 218 bytes Projectiles/FireBlast.cs | 108 ++++++++++++++++++ Projectiles/FireBlast.png | Bin 0 -> 3324 bytes Projectiles/FireBolt.cs | 55 ++++++++++ Projectiles/FireBolt.png | Bin 0 -> 738 bytes Projectiles/FireballExplosion.cs | 48 ++++++++ Projectiles/FireballExplosion.png | Bin 0 -> 4874 bytes Projectiles/IceBeamCannon.cs | 6 +- Projectiles/ImpFireBolt.cs | 3 +- Projectiles/ImpLordFlame.cs | 138 +++++++++++++++++++++++ Projectiles/ImpLordFlame.png | Bin 0 -> 1857 bytes Projectiles/VileCactusWorm.cs | 22 ++-- Projectiles/WaterBall.cs | 2 +- Projectiles/WaterWhip.cs | 44 +++++--- Projectiles/WaterWhip2.cs | 32 ++++-- build.txt | 2 +- description.txt | 8 +- 27 files changed, 719 insertions(+), 47 deletions(-) create mode 100644 Items/Rewards/ImpLordFlame.cs create mode 100644 Items/Rewards/ImpLordFlame.png create mode 100644 NPCs/Hunts/FireBall2.cs create mode 100644 NPCs/Hunts/FireBall2.png create mode 100644 Projectiles/BurningSphere.cs create mode 100644 Projectiles/BurningSphere.png create mode 100644 Projectiles/FireBlast.cs create mode 100644 Projectiles/FireBlast.png create mode 100644 Projectiles/FireBolt.cs create mode 100644 Projectiles/FireBolt.png create mode 100644 Projectiles/FireballExplosion.cs create mode 100644 Projectiles/FireballExplosion.png create mode 100644 Projectiles/ImpLordFlame.cs create mode 100644 Projectiles/ImpLordFlame.png diff --git a/Items/Rewards/ImpLordFlame.cs b/Items/Rewards/ImpLordFlame.cs new file mode 100644 index 00000000..23b7166d --- /dev/null +++ b/Items/Rewards/ImpLordFlame.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace JoostMod.Items.Rewards +{ + public class ImpLordFlame : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lord's Flame"); + Tooltip.SetDefault("Hold attack to charge a bigger fireball"); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 8)); + ItemID.Sets.ItemNoGravity[item.type] = true; + } + public override void SetDefaults() + { + item.damage = 60; + item.mana = 10; + item.magic = true; + item.noMelee = true; + item.scale = 1f; + item.noUseGraphic = true; + item.width = 26; + item.height = 26; + item.useTime = 20; + item.useAnimation = 20; + item.useStyle = 1; + item.knockBack = 3.5f; + item.value = 80000; + item.rare = 3; + item.UseSound = SoundID.Item20; + item.autoReuse = true; + item.channel = true; + item.shoot = mod.ProjectileType("ImpLordFlame"); + item.shootSpeed = 12f; + item.useTurn = true; + } + public override bool CanUseItem(Player player) + { + if (player.ownedProjectileCounts[item.shoot] > 0) + { + return false; + } + return base.CanUseItem(player); + } + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(230, 204, 128); + } + } + } + + } +} + diff --git a/Items/Rewards/ImpLordFlame.png b/Items/Rewards/ImpLordFlame.png new file mode 100644 index 0000000000000000000000000000000000000000..8edd649d28fd392f1d89da2101c38e917f389d11 GIT binary patch literal 1243 zcmV<11SI>3P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T=^T7^9)XXC<>%P2vaUSlQXTQ!r0A8&Fh%4U}{673V&uBakt!DEKT>~a> zfBZbZF@GK@Fu(X{r7lK*W2I1Y5U~OIMhqJ&c;t#Sqx}({5Z;>Ob*}YUrwqK>r_Ab% zq9%(j>D}Y0AEW4cr20Md6)IL~M*q=;EH?A_SZvnf6Ycx*vhLQ|hJ8|h$-uFQ#s<{K z2ymK)RYy$&Y*=R$H2~-(yxt+t=vos-nWY)Y3z^B9jp|rE>WvuB#Ow3=Gg5da zAkFCNP8IxnwT|)DAEuwIvyRjbGngOa%L}aMM&CWBAEPMB1mtHO;NHQ@LY`;pJHI+3 zCOW^od6j0gKf*C$qTfk?`mFP^E&9C?sILssbxFbVD&NR6kv%x|3JlEBjNA*U9vt9x z?|peOYK;x|->OUH*wq_(CJHu$SzXqlkF$}??{jq5p!QL9MgSeDGK(65x~x;(3_tx< zRbXy!q}Mt*kCYiu&$rd*@{Go_jDhNuW2sKRYw)uTr z(-=0(GeWhFnkbZEKYg8<*kLAf8`Tr=`8aZG*I z@m_YTG8-@hb)D*Xp75SGFzV@Ye=Dq+cs4E6XPv^ESD-9L3nL!!RzE#Q%`=$g8@VfL zW2Xwzjob^VPPLVKBhQ3;Z;yUr#3&QXwyiZQ&1f+Mo==FAiicMb`mc4K0aI_psP%^p zxa(okjP{2cBZm7vz}eW}9<~*jDzkbcHGjN4D}S!O3j)#S3(63`FW(4P=Jkj1)+3my zzxYTq3SS6a5e{H?!VbGL9OpT8F#;-949AYMvM%d@oIhmfnSlN)gF?lopXUrV!ug@_ zUI+Ox0$Z~?0>=i_83FZI0P34%WdiDr6w36e_r4Ls@CQWHJeQnS;@$uN002ovPDHLk FV1nNASE~R3 literal 0 HcmV?d00001 diff --git a/Items/Rewards/TailWhip.cs b/Items/Rewards/TailWhip.cs index 9cdeaf42..2199388f 100644 --- a/Items/Rewards/TailWhip.cs +++ b/Items/Rewards/TailWhip.cs @@ -15,7 +15,7 @@ public override void SetStaticDefaults() } public override void SetDefaults() { - item.damage = 31; + item.damage = 38; item.melee = true; item.noMelee = true; item.scale = 1f; diff --git a/Items/Weapons/WaterWhip.cs b/Items/Weapons/WaterWhip.cs index 8ece3326..de708612 100644 --- a/Items/Weapons/WaterWhip.cs +++ b/Items/Weapons/WaterWhip.cs @@ -59,7 +59,8 @@ public override bool Shoot(Player player, ref Vector2 position, ref float speedX { type = mod.ProjectileType("WaterWhip2"); } - return true; + Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0, -1); + return false; } public override void AddRecipes() { diff --git a/JoostMod.cs b/JoostMod.cs index f04251a7..340fa2be 100644 --- a/JoostMod.cs +++ b/JoostMod.cs @@ -295,6 +295,7 @@ private void ImpReward(Player player) { Mod mod = JoostMod.instance; player.QuickSpawnItem(mod.ItemType("TailWhip")); + player.QuickSpawnItem(mod.ItemType("ImpLordFlame")); player.QuickSpawnItem(ItemID.GoldCoin, 7); player.QuickSpawnItem(ItemID.FireblossomSeeds, 15); } diff --git a/JoostPlayer.cs b/JoostPlayer.cs index 27cd5e75..8bf4b06e 100644 --- a/JoostPlayer.cs +++ b/JoostPlayer.cs @@ -1682,7 +1682,7 @@ public override void PostUpdateEquips() } } } - bool noHooks = player.ownedProjectileCounts[mod.ProjectileType("SwingyHook")] + player.ownedProjectileCounts[mod.ProjectileType("MobHook")] + player.ownedProjectileCounts[mod.ProjectileType("EnchantedSwingyHook")] + player.ownedProjectileCounts[mod.ProjectileType("CactusHook")] <= 0; + bool noHooks = player.ownedProjectileCounts[mod.ProjectileType("SwingyHook")] + player.ownedProjectileCounts[mod.ProjectileType("MobHook")] + player.ownedProjectileCounts[mod.ProjectileType("EnchantedSwingyHook")] + player.ownedProjectileCounts[mod.ProjectileType("EnchantedMobHook")] + player.ownedProjectileCounts[mod.ProjectileType("CactusHook")] <= 0; if (spinTimer > 0) { spinTimer--; diff --git a/NPCs/Hunts/FireBall.cs b/NPCs/Hunts/FireBall.cs index ec5c1d19..86d51d24 100644 --- a/NPCs/Hunts/FireBall.cs +++ b/NPCs/Hunts/FireBall.cs @@ -55,7 +55,7 @@ public override void HitEffect(int hitDirection, double damage) Player P = Main.player[npc.target]; for (int i = 0; i < 10; i++) { - Dust.NewDust(npc.position, npc.width, npc.height, DustID.Fire, npc.velocity.X / 10, npc.velocity.Y / 10, 100, default(Color), 0.8f + (Main.rand.Next(3) * 0.1f)); + Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.Fire, -npc.velocity.X / 5, -npc.velocity.Y / 5, 100, default(Color), 2f + (Main.rand.Next(20) * 0.1f)).noGravity = true; } if (npc.life > 0) { diff --git a/NPCs/Hunts/FireBall2.cs b/NPCs/Hunts/FireBall2.cs new file mode 100644 index 00000000..5f66a2d4 --- /dev/null +++ b/NPCs/Hunts/FireBall2.cs @@ -0,0 +1,176 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace JoostMod.NPCs.Hunts +{ + public class FireBall2 : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fire Blast"); + Main.npcFrameCount[npc.type] = 3; + } + public override void SetDefaults() + { + npc.friendly = true; + npc.dontTakeDamageFromHostiles = true; + npc.width = 68; + npc.height = 68; + npc.defense = 9999; + npc.lifeMax = Main.expertMode ? 12 : 6; + npc.damage = 50; + npc.HitSound = SoundID.NPCHit3; + npc.DeathSound = SoundID.Item74; + npc.value = Item.buyPrice(0, 0, 0, 0); + npc.knockBackResist = 0; + npc.aiStyle = -1; + npc.noGravity = true; + npc.noTileCollide = false; + npc.buffImmune[BuffID.OnFire] = true; + npc.buffImmune[BuffID.Venom] = true; + npc.buffImmune[BuffID.Poisoned] = true; + npc.buffImmune[BuffID.Frostburn] = true; + npc.buffImmune[BuffID.CursedInferno] = true; + npc.buffImmune[BuffID.Daybreak] = true; + npc.buffImmune[mod.BuffType("BoneHurt")] = true; + npc.buffImmune[mod.BuffType("CorruptSoul")] = true; + } + public override void ModifyHitByItem(Player player, Item item, ref int damage, ref float knockback, ref bool crit) + { + crit = false; + damage = 1; + npc.target = player.whoAmI; + } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + crit = false; + damage = 1; + npc.target = projectile.owner; + } + public override bool PreNPCLoot() + { + return false; + } + public override void HitEffect(int hitDirection, double damage) + { + for (int i = 0; i < 10; i++) + { + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Fire, npc.velocity.X / 10, npc.velocity.Y / 10, 100, default(Color), 0.8f + (Main.rand.Next(3) * 0.1f)); + } + if (npc.life > 0) + { + npc.velocity *= -1.15f; + } + npc.ai[3]= 1; + } + public override void AI() + { + if (npc.ai[3] < 1) + { + npc.velocity.X = npc.ai[0]; + npc.velocity.Y = npc.ai[1]; + npc.damage = (int)npc.ai[2]; + npc.ai[3]= 1; + if (Main.netMode != 0) + { + ModPacket packet = mod.GetPacket(); + packet.Write((byte)JoostModMessageType.NPCpos); + packet.Write(npc.whoAmI); + packet.WriteVector2(npc.position); + packet.WriteVector2(npc.velocity); + ModPacket netMessage = packet; + netMessage.Send(); + } + npc.netUpdate = true; + } + Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.Fire, -npc.velocity.X / 5, -npc.velocity.Y / 5, 100, default(Color), 2f + (Main.rand.Next(20) * 0.1f)).noGravity = true; + npc.ai[3]++; + bool colliding = (npc.ai[3] > 2 && (npc.oldVelocity.X != 0 && npc.velocity.X == 0) || (npc.oldVelocity.Y != 0 && npc.velocity.Y == 0)); + for (int i = 0; i < Main.maxNPCs && !colliding; i++) + { + NPC target = Main.npc[i]; + if (!target.friendly && !target.dontTakeDamage && npc.Hitbox.Intersects(target.Hitbox)) + { + colliding = true; + break; + } + } + if (npc.ai[3] > 300 || colliding) + { + npc.life = 0; + npc.HitEffect(0, 0); + npc.checkDead(); + } + npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + 1.57f; + npc.lifeRegen = 0; + } + public override void FindFrame(int frameHeight) + { + frameHeight = 100; + npc.frameCounter++; + if (npc.frameCounter >= 4) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0; + } + if (npc.frame.Y > frameHeight * 2) + { + npc.frame.Y = 0; + } + } + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + return target.whoAmI != (int)npc.target && target.hostile && Main.player[npc.target].hostile; + } + public override bool? CanHitNPC(NPC target) + { + if (!target.friendly) + { + return true; + } + return base.CanHitNPC(target); + } + public override bool? CanBeHitByItem(Player player, Item item) + { + if ((player.whoAmI == (int)npc.target) || !(ItemLoader.CanHitPvp(item, player, Main.player[npc.target]) && PlayerHooks.CanHitPvp(player, item, Main.player[npc.target]))) + { + return false; + } + return base.CanBeHitByItem(player, item); + } + public override bool? CanBeHitByProjectile(Projectile projectile) + { + Player player = Main.player[projectile.owner]; + if ((projectile.owner == (int)npc.target) || (player.heldProj != projectile.whoAmI) || !(ProjectileLoader.CanHitPvp(projectile, Main.player[npc.target]) && PlayerHooks.CanHitPvpWithProj(projectile, Main.player[npc.target]))) + { + return false; + } + return base.CanBeHitByProjectile(projectile); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (target.type != NPCID.BurningSphere) + { + npc.life = 0; + npc.HitEffect(0, 0); + npc.checkDead(); + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + npc.life = 0; + npc.HitEffect(0, 0); + npc.checkDead(); + } + public override bool CheckDead() + { + Projectile.NewProjectile(npc.Center, Vector2.Zero, mod.ProjectileType("FireballExplosion"), npc.damage, 20, (int)npc.target); + return true; + } + } +} + + diff --git a/NPCs/Hunts/FireBall2.png b/NPCs/Hunts/FireBall2.png new file mode 100644 index 0000000000000000000000000000000000000000..fff107a9227d9f04adac770c5f710c6fbda5cc9e GIT binary patch literal 3324 zcmbtXd0bN29w$-RL=YFS3~p5VS_jhdwvC0cI1#*p-Bg`y&^70y(qpENbI z(HcqH#4<-1NgFM-v9Z!JNYlwm2}dbV-o>VQGxPb(`@H23&bjw@&iUSR&*y#@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^NY{VWXi(06#ismn2=kDWl> ziAulIH5~(#I2x+U*lVRPCboTgzq>J#cy(y}S%rd{oQ2>2nSMWKbLXroI{R4|JW|c=N-i>2b(8V9wG>>}cFRb!l?AMGf9}FZ7bMdmtG2 PrveJ_+2YOjr04t-h>9T> literal 0 HcmV?d00001 diff --git a/Projectiles/BurningSphere.cs b/Projectiles/BurningSphere.cs new file mode 100644 index 00000000..931b1351 --- /dev/null +++ b/Projectiles/BurningSphere.cs @@ -0,0 +1,49 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace JoostMod.Projectiles +{ + public class BurningSphere : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lord's Flame"); + } + public override void SetDefaults() + { + projectile.width = 16; + projectile.height = 16; + projectile.aiStyle = 1; + projectile.friendly = true; + projectile.magic = true; + projectile.penetrate = 1; + projectile.timeLeft = 450; + projectile.tileCollide = true; + projectile.alpha = 150; + aiType = ProjectileID.Bullet; + } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) + { + width = 6; + height = 6; + return base.TileCollideStyle(ref width, ref height, ref fallThrough); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.OnFire, 300, true); + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 300, true); + } + public override void AI() + { + projectile.rotation = projectile.direction * 3 * projectile.timeLeft; + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, DustID.Fire, 0, 0, 100, default(Color), 2f + (Main.rand.Next(5) * 0.1f)).noGravity = true; + } + } +} + diff --git a/Projectiles/BurningSphere.png b/Projectiles/BurningSphere.png new file mode 100644 index 0000000000000000000000000000000000000000..624ea69f6a23af2fa450687283cff94ef750eba9 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!F*2_#}Etu zCN~-Kw08Bb(^= 4) + { + projectile.frameCounter = 0; + projectile.frame = (projectile.frame + 1) % 3; + } + if (Main.netMode == 1) + { + for (int i = 0; i < Main.maxProjectiles; i++) + { + Projectile proj = Main.projectile[i]; + Player enemyPlayer = Main.player[proj.owner]; + if (enemyPlayer != player && enemyPlayer.hostile && player.hostile && (enemyPlayer.team == 0 || player.team == 0 || enemyPlayer.team != player.team)) + { + if (enemyPlayer.heldProj == i && proj.Hitbox.Intersects(projectile.Hitbox)) + { + projectile.velocity *= -1.15f; + projectile.owner = enemyPlayer.whoAmI; + projectile.timeLeft = 450; + NetMessage.SendData(27, -1, -1, null, projectile.whoAmI, 0f, 0f, 0f, 0, 0, 0); + Main.PlaySound(SoundID.NPCHit3, projectile.Center); + } + } + } + for (int i = 0; i < Main.maxPlayers; i++) + { + Player enemyPlayer = Main.player[i]; + if (enemyPlayer != player && enemyPlayer.hostile && player.hostile && (enemyPlayer.team == 0 || player.team == 0 || enemyPlayer.team != player.team)) + { + Rectangle itemRect = new Rectangle((int)enemyPlayer.itemLocation.X, (int)enemyPlayer.itemLocation.Y, 32, 32); + Item item = enemyPlayer.HeldItem; + if (!Main.dedServ) + { + itemRect = new Rectangle((int)enemyPlayer.itemLocation.X, (int)enemyPlayer.itemLocation.Y, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height); + } + if (!item.noMelee && itemRect.Intersects(projectile.Hitbox)) + { + projectile.velocity *= -1.15f; + projectile.owner = enemyPlayer.whoAmI; + projectile.timeLeft = 450; + NetMessage.SendData(27, -1, -1, null, projectile.whoAmI, 0f, 0f, 0f, 0, 0, 0); + Main.PlaySound(SoundID.NPCHit3, projectile.Center); + } + } + } + } + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, DustID.Fire, -projectile.velocity.X / 5, -projectile.velocity.Y / 5, 100, default(Color), 2f + (Main.rand.Next(20) * 0.1f)).noGravity = true; + } + public override void Kill(int timeLeft) + { + //Projectile.NewProjectile(projectile.Center, Vector2.Zero, mod.ProjectileType("FireballExplosion"), projectile.damage * 3, projectile.knockBack, projectile.owner); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.InfernoFriendlyBlast, projectile.damage / 6, projectile.knockBack / 4, projectile.owner); + } + } +} + diff --git a/Projectiles/FireBlast.png b/Projectiles/FireBlast.png new file mode 100644 index 0000000000000000000000000000000000000000..fff107a9227d9f04adac770c5f710c6fbda5cc9e GIT binary patch literal 3324 zcmbtXd0bN29w$-RL=YFS3~p5VS_jhdwvC0cI1#*p-Bg`y&^70y(qpENbI z(HcqH#4<-1NgFM-v9Z!JNYlwm2}dbV-o>VQGxPb(`@H23&bjw@&iUSR&*y#@3WK-! zA>qs6AP@){;O`v@^g$rdGFzxFaFuAZO$>C}@gAE!K%izGLKUq8+`}0Dkq1E_{dUc7 z*(=ZH4xnh7;uDdw^*~%oS~N2j#E4EzN+Bo3rV!VX9mr0OGGgK>5J>M(fVW3j`tCQC zo4y|L#ds$^Sm~QKkTdk)VM_Vu1tx<*_Blx2>Er&Z;O^n6`Dbo#UWZ zjX1b^e!laff;z31FU%9lD^|y_D{uu(XvF2BX?Z3}SC;W?T1af~Q-0xs1M5Y#kvekX zi{~Niu|13Rsg()c?p}1GjXT@i6cz-zU*nXwm+o?{+WyDV1tH;mncKcytCu_VqjB8( zCex_J?k-ixl2h&Yj_U?(A{2l*;B51KR(V-$ z6eVI++~aUmX<_8tLr!c=X$BH3gCb2CqQ^|URc~LWVa$cil!(o}*BT&~3d`63LSJ_P z{GQO}1(tdmSJ+L2NH>y_z%>wy-!~GOumBM`Q$KPqwgl0#Z;XY9A` z>hIJlivf{e<7z~9>3Ja!4v-HkXBR=7% z0HfpFnuZ~J>3l$fLs-#8&W(&ZcpP)ul9mUbodS@eG)NaXA+8Q$Zau>aL7EQ|9kStb zG*})QETRSrT?(lk8Ngt#h)$WrEq|7bhrgq`qJ22lsN+~?Sfm@Gwl zxSl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yNt*FbH?s}Z|3q9+1 zUB*ozNxx}h|7kS7CpBVWkV6oGnyw$9V?KEd~Gix3-&1h;PEApKgbN~jz(K3I60t7cBng8U9j$_Y(R;a zYcV~Aw^a@w1x#V#OW*MUVP1BD^EMogW;anz-#ye!jC(SM59}`yl!zWO&%$1&u0#M) z;cbmJvJheYA5UVG8xKVml&^2i#{kA}&b>75YDm5+-H34fan*dVsGLMT&$wO@FN)nx zi#K0-;s!%8*N9-)hiP1$w^of+|h#fM5f5%E2TENQ;tRFkD`qZdPt zG>JJ;nN8a&sko}uZ79X*VaKS>#SM=A!8zQg{%}q0u!Bfh4Y6oLQPp(S=c82}*`NI+ zUy3Dwy}$ObLlv-v2h;IwD)%MB*Teu|kH|reZ1*D;zL^NY{VWXi(06#ismn2=kDWl> ziAulIH5~(#I2x+U*lVRPCboTgzq>J#cy(y}S%rd{oQ2>2nSMWKbLXroI{R4|JW|c=N-i>2b(8V9wG>>}cFRb!l?AMGf9}FZ7bMdmtG2 PrveJ_+2YOjr04t-h>9T> literal 0 HcmV?d00001 diff --git a/Projectiles/FireBolt.cs b/Projectiles/FireBolt.cs new file mode 100644 index 00000000..70c430a0 --- /dev/null +++ b/Projectiles/FireBolt.cs @@ -0,0 +1,55 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace JoostMod.Projectiles +{ + public class FireBolt : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lord's Flame"); + Main.projFrames[projectile.type] = 3; + } + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.aiStyle = 1; + projectile.friendly = true; + projectile.magic = true; + projectile.penetrate = 5; + projectile.timeLeft = 450; + projectile.tileCollide = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 20; + aiType = ProjectileID.Bullet; + } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) + { + width = 10; + height = 10; + return base.TileCollideStyle(ref width, ref height, ref fallThrough); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.OnFire, 420, true); + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 420, true); + } + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter >= 4) + { + projectile.frameCounter = 0; + projectile.frame = (projectile.frame + 1) % 3; + } + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, DustID.Fire, -projectile.velocity.X / 5, -projectile.velocity.Y / 5, 100, default(Color), 1f + (Main.rand.Next(20) * 0.1f)).noGravity = true; + } + } +} + diff --git a/Projectiles/FireBolt.png b/Projectiles/FireBolt.png new file mode 100644 index 0000000000000000000000000000000000000000..3e479211937acdebc7f852ed1758debb0f64ec54 GIT binary patch literal 738 zcmV<80v-K{P)N2bZe?^J zG%heMGBNQWX_Wu~0$)i)K~!i%?U!3l!!Qs#Ap_Wsl z;d%6_NzIp$=v?<#T#zn=SU5*z?W755e0zR8#l#BhDzCFy7@gGO!!hB!uCkJJVGS?7 z3)hn-g2lq{_9Lz@ypsYO{ny~f~$$I$G=t&pasJhTStT&IICbUrlk*7L( zy0A8?2VppR2jO(0XW3Xn6Hy>xO>8yvD+3DY+fPXTt_HsH3=V*C79fWP8HvhtOVNJA{)xzjc9!KcmW}w6EY!e<1KaV|H UQs4io*#H0l07*qoM6N<$g7N%HLI3~& literal 0 HcmV?d00001 diff --git a/Projectiles/FireballExplosion.cs b/Projectiles/FireballExplosion.cs new file mode 100644 index 00000000..5b5935ed --- /dev/null +++ b/Projectiles/FireballExplosion.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace JoostMod.Projectiles +{ + public class FireballExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fire Blast"); + Main.projFrames[projectile.type] = 6; + } + public override void SetDefaults() + { + projectile.width = 184; + projectile.height = 184; + projectile.aiStyle = 0; + projectile.friendly = true; + projectile.magic = true; + projectile.penetrate = -1; + projectile.timeLeft = 6; + projectile.tileCollide = false; + projectile.light = 1f; + projectile.alpha = 150; + aiType = ProjectileID.Bullet; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.OnFire, 900); + } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 900); + } + public override void AI() + { + projectile.frame = 6 - projectile.timeLeft; + if (projectile.timeLeft == 4) + { + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.InfernoFriendlyBlast, projectile.damage / 6, 5, projectile.owner); + } + } + } +} diff --git a/Projectiles/FireballExplosion.png b/Projectiles/FireballExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..d65157b39062230560d27c3fcf9710c0ff0a1bed GIT binary patch literal 4874 zcmeHLdsI_bzK(-HQiLQFWDp4mT6{sqMnNSB&wz@6f=ERkRi~gLCW^>`gokhh1TizC zHNHqHT}Xuyba*5s3D$#!w$ubfq!36ruuv?7oB)y_f!qU5d;hq%>(1PJ|C>2$W$oYo zW#_EDzwi4!b}sD;3%2}V)dv_1#&Y+rzzB2{VKB>&V@*)&!kvll(P3F?M6f@mMz;D5 zI$56N7wU(>JmOjyj+kOFCYXJD4=_;wJl$kI{de;NCPt$Xo&NjzHv<1U2#{G7SJ61Z zoQnvHMD_o#{9qz==Ic=Aajad3QZX1S>EdTu@Z6ssphn^DK)(Y(yt=>lFL(A>GdlST zMjmtQ)3zx* z>Pk2n?<+D&K*WmIBJ7-?Zlmy7kOMIc_%gjf7g%^m3yQ0YS;ie8vh2UJcu<8~_Q85W z7~l%wnA1vDZ)=HnG@a%igLRX1*0c8C5T%ZEh13JR>%fvZtnrU~M4}U=s;Q9;o&F** zw)W;qQooR%i?1{_hw{B~J`@_&;{O4T|22;MQkGUz?LDHn=N#Lg{(~@7%SR$|WwW}E zJq+yg(RA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((projectile.ai[0] % 6) == 0 && projectile.ai[0] < 60) + { + projectile.frame = (projectile.frame + 1) % 12; + } + if (projectile.ai[0] >= 40) + { + player.velocity *= 0.98f; + } + if (projectile.ai[0] >= 60) + { + player.velocity *= 0.98f; + if ((projectile.ai[0] % 3) == 0) + { + projectile.frame = (projectile.frame >= 17 ? 10 : projectile.frame + 1); + projectile.ai[0] = 60; + } + } + float light = (projectile.ai[0] > 60 ? 60 : projectile.ai[0]) / 60f; + Lighting.AddLight(projectile.Center, light, light * 0.5f, light * 0.1f); + + + projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - projectile.Size / 2f + new Vector2(projectile.direction * -10, -player.gravDir * ((projectile.ai[0] > 60 ? 12 : projectile.ai[0] / 5) + 18)); + projectile.spriteDirection = projectile.direction; + projectile.timeLeft = 2; + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 15; + player.itemAnimation = 15; + player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction)); + } + + public override void Kill(int timeLeft) + { + Player player = Main.player[projectile.owner]; + Vector2 pos = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 dir = Vector2.Normalize(projectile.velocity); + if (float.IsNaN(dir.X) || float.IsNaN(dir.Y)) + { + dir = -Vector2.UnitY; + } + if (Main.myPlayer == projectile.owner) + { + if (projectile.ai[0] < 40) + { + Projectile.NewProjectile(pos.X, pos.Y, dir.X * 5, dir.Y * 5, mod.ProjectileType("BurningSphere"), projectile.damage, projectile.knockBack, projectile.owner); + Main.PlaySound(SoundID.Item1, projectile.Center); + } + else if (projectile.ai[0] < 60) + { + Projectile.NewProjectile(pos.X, pos.Y, dir.X * 12, dir.Y * 12, mod.ProjectileType("FireBolt"), (int)(projectile.damage * 2.5f), projectile.knockBack * 3, projectile.owner); + Main.PlaySound(SoundID.Item45, projectile.Center); + } + else if (projectile.ai[0] == 100) + { + /* + if (Main.netMode != 1) + { + int n = NPC.NewNPC((int)pos.X, (int)pos.Y + 14, mod.NPCType("FireBall2"), 1, dir.X * 8, dir.Y * 8, projectile.damage * 3, 0, projectile.owner); + Main.npc[n].netUpdate = true; + projectile.netUpdate = true; + } + */ + Projectile.NewProjectile(pos.X, pos.Y, dir.X * 8, dir.Y * 8, mod.ProjectileType("FireBlast"), projectile.damage * 3, projectile.knockBack * 5, projectile.owner); + Main.PlaySound(SoundID.Item73, projectile.Center); + } + } + } + } +} \ No newline at end of file diff --git a/Projectiles/ImpLordFlame.png b/Projectiles/ImpLordFlame.png new file mode 100644 index 0000000000000000000000000000000000000000..cc5eb46afdb64a0b239a1f502f43efe4056a669c GIT binary patch literal 1857 zcmV-H2fp};P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T1#fB5lJFQZ`?hG7_n$0VHV*88YGpZ|6ULqsLTNR-mmjg&sp|f@?2jd?C5ZXFjEN? zzzme_CZrLr2w%g9cM!ZU0%b-wp9uRTGrm^GIwQU^&e&EH{@h7~x~>EKeh_ybbDSL? z)Bax2Fbua7o*6Lrc`K=+&s?WWn7+9V@Oq@+WUI{jtw(AdV)`0+8G+%hWV1RWWuord zbH;;Nnb8BD2)hMlZwBwvb!?+7RJVaTBOu3dq;dg8DjevUpNEvQBYYXSRenwH)1k@RUs2PvF{@EL53NLem zG^3$Ep^hdsa(5yBhN&^hA^w^I^;OJlI`mp-8HCv zRGkq(B2{KlLr~XsD$VfSUo{JC?Tz%gPL3mG2Gsp+^>cYf%cHD;_wSFQw0Ry}&HpX!nV1?z?n&-NjMh{0J!{Tw zJe~kwJ!~eh5$fz-wW^{j?y`IrT3ZnPF^SjRLCWT6-OrDW4 z!Fb@Bc}bQND#$m&9Hw^L{5+o17&gl@!fYKiQ7FScxz0@NFq5r~$^`s8rrwBQ6J@5z z>$>G}MRl3Fdd_&fi|Dt9Rkh&6Y9`lai+){qD|KB5(0%xSjsn$X4ClK(Mr!_wnt*yE zu+~bT445>d`{U*ssT{}DcOCC#ug%N`%s^dIT^?7w`wfh`yWDSuH51Qf5A|KA@WvG= ztI?SeU-7j(y+w^PnB^O}E9%aq3et_-6RD)SmwF@5gtNCtpBgdB#JcU;nw4gBb_qP5 zP$yLnZ${`p*Lem^y%D3 15) + projectile.localAI[1]++; + if (projectile.localAI[1] > 15) { Main.PlaySound(15, (int)projectile.position.X, (int)projectile.position.Y, 1); - soundDelay = 0; + projectile.localAI[1] = 0; } } else @@ -115,18 +113,18 @@ public override void AI() } else { - ai = 2; + projectile.localAI[0] = 2; if (solid) { if (projectile.velocity.Y > -10) { projectile.velocity.Y -= 0.2f; } - soundDelay++; - if (soundDelay > 15) + projectile.localAI[1]++; + if (projectile.localAI[1] > 15) { Main.PlaySound(15, (int)projectile.position.X, (int)projectile.position.Y, 1); - soundDelay = 0; + projectile.localAI[1] = 0; } } else if (projectile.velocity.Y < 10) diff --git a/Projectiles/WaterBall.cs b/Projectiles/WaterBall.cs index 8adf6286..e95e2bff 100644 --- a/Projectiles/WaterBall.cs +++ b/Projectiles/WaterBall.cs @@ -104,7 +104,7 @@ public override void AI() } if (Main.raining && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, new Vector2(projectile.Center.X + ((Main.screenPosition.Y - projectile.Center.Y) / 14f * Main.windSpeed * 12f), Main.screenPosition.Y - 20), 1, 1) && Main.screenPosition.Y <= Main.worldSurface * 16.0) { - projectile.localAI[0] += projectile.width * 4; + projectile.localAI[0] += projectile.width * 2; } if (projectile.localAI[0] >= 250) { diff --git a/Projectiles/WaterWhip.cs b/Projectiles/WaterWhip.cs index 32bd1bb5..60e98ce4 100644 --- a/Projectiles/WaterWhip.cs +++ b/Projectiles/WaterWhip.cs @@ -61,16 +61,16 @@ public override bool OnTileCollide(Vector2 oldVelocity) public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { float mult = Vector2.Distance(projectile.position, projectile.oldPos[1]) * 0.05f; - if (mult > 2.5f) - mult = 2.5f; + if (mult > 3f) + mult = 3f; damage = (int)(damage * mult); knockback = 0; } public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) { float mult = Vector2.Distance(projectile.position, projectile.oldPos[1]) * 0.05f; - if (mult > 2.5) - mult = 2.5f; + if (mult > 3) + mult = 3f; damage = (int)(damage * mult); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -80,8 +80,8 @@ public override void OnHitNPC(NPC target, int damage, float knockback, bool crit Vector2 vel = projectile.position - projectile.oldPos[1]; vel.Normalize(); float mult = Vector2.Distance(projectile.position, projectile.oldPos[1]) * 0.05f; - if (mult > 2.5f) - mult = 2.5f; + if (mult > 3f) + mult = 3f; target.velocity = vel * projectile.knockBack * target.knockBackResist * mult; } Main.PlaySound(19, projectile.Center, 0); @@ -107,15 +107,18 @@ public override void OnHitPvp(Player target, int damage, bool crit) Dust.NewDust(target.position, target.width, target.height, 33, -target.velocity.X, -target.velocity.Y, 0, default, 2); } } + int nextProj = -1; public override void SendExtraAI(BinaryWriter writer) { writer.Write(projectile.localAI[0]); writer.Write(projectile.localAI[1]); + writer.Write(nextProj); } public override void ReceiveExtraAI(BinaryReader reader) { projectile.localAI[0] = reader.ReadSingle(); projectile.localAI[1] = reader.ReadSingle(); + nextProj = reader.ReadInt32(); } public override bool PreAI() { @@ -131,21 +134,36 @@ public override bool PreAI() { mana = player.inventory[player.selectedItem].mana / 2; } + if (projectile.localAI[0] == 0) + { + projectile.localAI[0]++; + } if (channeling && player.CheckMana(mana)) { - if (projectile.ai[1] == 0 && projectile.localAI[0] % 40 == 0) + if (projectile.ai[1] == -1 && projectile.localAI[0] % 40 == 0) { player.CheckMana(mana, true); } projectile.localAI[0]++; - if (player.ownedProjectileCounts[projectile.type] < max - 1 && projectile.localAI[0] == 4) + if (nextProj >= 0 && Main.projectile[nextProj].type != projectile.type && Main.projectile[nextProj].owner != projectile.owner) + { + projectile.localAI[0] = 5; + } + if (player.ownedProjectileCounts[projectile.type] < max - 1 && projectile.localAI[0] == 5) { - Projectile.NewProjectile(projectile.Center, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, projectile.ai[0] + 1, projectile.whoAmI); + nextProj = Projectile.NewProjectile(projectile.Center, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, projectile.ai[0] + 1, projectile.identity); player.ownedProjectileCounts[projectile.type]++; } - if (projectile.ai[1] != 0) + if (projectile.ai[1] != -1) { - vector = Main.projectile[(int)projectile.ai[1]].Center; + if (Main.projectile[(int)projectile.ai[1]].type == projectile.type && Main.projectile[(int)projectile.ai[1]].owner == projectile.owner) + { + vector = Main.projectile[(int)projectile.ai[1]].Center; + } + else + { + projectile.Kill(); + } } if (Main.myPlayer == projectile.owner) { @@ -167,7 +185,7 @@ public override bool PreAI() { projectile.netUpdate = true; } - if (projectile.ai[1] == 0) + if (projectile.ai[1] == -1) { projectile.velocity = dir; } @@ -180,7 +198,7 @@ public override bool PreAI() { move *= scaleFactor / move.Length(); } - float home = 10f; + float home = 5 + projectile.ai[0] / 2; projectile.velocity = ((home - 1f) * projectile.velocity + move) / home; if (projectile.velocity.Length() < scaleFactor) { diff --git a/Projectiles/WaterWhip2.cs b/Projectiles/WaterWhip2.cs index 0bda8ab3..b126a9c9 100644 --- a/Projectiles/WaterWhip2.cs +++ b/Projectiles/WaterWhip2.cs @@ -35,6 +35,7 @@ public override bool OnTileCollide(Vector2 oldVelocity) projectile.rotation = projectile.velocity.ToRotation(); return false; } + int nextProj = -1; public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { if (projectile.localAI[1] == 0 && target.knockBackResist > 0 && target.type != NPCID.TargetDummy) @@ -46,11 +47,13 @@ public override void SendExtraAI(BinaryWriter writer) { writer.Write(projectile.localAI[0]); writer.Write(projectile.localAI[1]); + writer.Write(nextProj); } public override void ReceiveExtraAI(BinaryReader reader) { projectile.localAI[0] = reader.ReadSingle(); projectile.localAI[1] = reader.ReadSingle(); + nextProj = reader.ReadInt32(); } public override bool PreAI() { @@ -66,21 +69,36 @@ public override bool PreAI() { mana = player.inventory[player.selectedItem].mana / 2; } + if (projectile.localAI[0] == 0) + { + projectile.localAI[0]++; + } if (channeling && player.CheckMana(mana)) { - if (projectile.ai[1] == 0 && projectile.localAI[0] % 40 == 0) + if (projectile.ai[1] == -1 && projectile.localAI[0] % 40 == 0) { player.CheckMana(mana, true); } projectile.localAI[0]++; - if (player.ownedProjectileCounts[projectile.type] < max - 1 && projectile.localAI[0] == 4) + if (nextProj >= 0 && Main.projectile[nextProj].type != projectile.type && Main.projectile[nextProj].owner != projectile.owner) + { + projectile.localAI[0] = 5; + } + if (player.ownedProjectileCounts[projectile.type] < max - 1 && projectile.localAI[0] == 5) { - Projectile.NewProjectile(projectile.Center, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, projectile.ai[0] + 1, projectile.whoAmI); + nextProj = Projectile.NewProjectile(projectile.Center, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, projectile.ai[0] + 1, projectile.identity); player.ownedProjectileCounts[projectile.type]++; } - if (projectile.ai[1] != 0) + if (projectile.ai[1] != -1) { - vector = Main.projectile[(int)projectile.ai[1]].Center; + if (Main.projectile[(int)projectile.ai[1]].type == projectile.type && Main.projectile[(int)projectile.ai[1]].owner == projectile.owner) + { + vector = Main.projectile[(int)projectile.ai[1]].Center; + } + else + { + projectile.Kill(); + } } if (Main.myPlayer == projectile.owner) { @@ -102,7 +120,7 @@ public override bool PreAI() { projectile.netUpdate = true; } - if (projectile.ai[1] == 0) + if (projectile.ai[1] == -1) { projectile.velocity = dir; } @@ -115,7 +133,7 @@ public override bool PreAI() { move *= scaleFactor / move.Length(); } - float home = 20f; + float home = 40f - projectile.ai[0]; projectile.velocity = ((home - 1f) * projectile.velocity + move) / home; if (projectile.velocity.Length() < scaleFactor) { diff --git a/build.txt b/build.txt index 1c015ae4..bfe75a2f 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Joost8910 -version = 0.8.1.2 +version = 0.8.1.3 displayName = JoostMod homepage = http://forums.terraria.org/index.php?threads/the-joostmod.42879/ includePDB = true diff --git a/description.txt b/description.txt index cda72615..b7cda0d7 100644 --- a/description.txt +++ b/description.txt @@ -1,5 +1,5 @@ The Joostmod has to offer -444 new items +445 new items 14 new armor sets 28 new placeable things (excluding banners) 11 new prefixes @@ -9,9 +9,13 @@ The Joostmod has to offer 2 new town npcs Version 0.8.1.3 +- Added Lord's Flame, a second reward from the Imp Lord's Quest - Fixed Gust Amulet granting immunity to fire blocks +- Fixed Roc Wings behavior with Enchanted Grabby Swingy Hook +- Increased amount of icicles made by Frozen Orb - Increased damage growth of Scroll of Water -- Frozen Orb now fires more icicles +- Increased damage of Tail Whip from 31 to 38 +- Tweaked Water Tendril movement - Personal Bubble visual and pushback can be disabled by hiding visuals - Personal Bubble no longer pushes friendly NPCs - Scroll of Water now slowly grows while exposed in the rain