From d1a99ca8b1c21779681f1002133fca417df895c5 Mon Sep 17 00:00:00 2001 From: Niko Date: Thu, 20 Nov 2025 13:25:27 +0000 Subject: [PATCH] Add Nullified debuff, add Transcendent weapons and tool --- Content/Buffs/Debuffs/TypeNull.cs | 25 +++ Content/Buffs/Debuffs/TypeNull.png | Bin 0 -> 3042 bytes .../Items/Accessories/AscendantSwarmModule.cs | 49 ++++++ .../Accessories/AscendantSwarmModule.png | Bin 0 -> 504 bytes .../Items/Accessories/TranscendentMatrix.cs | 54 +++++++ .../Items/Accessories/TranscendentMatrix.png | Bin 0 -> 504 bytes Content/Items/Materials/RGBAlloy.cs | 2 +- .../SingularitySet/SingularityMultitool.cs | 91 ++++++++++- .../Transcendent/TranscendentOmnitool.cs | 150 ++++++++++++++++++ .../Transcendent/TranscendentOmnitool.png | Bin 0 -> 504 bytes .../Items/Weapons/Magic/TomeOfUnyielding.cs | 133 ++++++---------- .../Magic/TranscendentSingularityStaff.cs | 63 ++++++++ .../Magic/TranscendentSingularityStaff.png | Bin 0 -> 504 bytes .../Items/Weapons/Melee/TranscendentBlade.cs | 73 +++++++++ .../Items/Weapons/Melee/TranscendentBlade.png | Bin 0 -> 504 bytes .../Weapons/Ranged/TranscendentRailcannon.cs | 63 ++++++++ .../Weapons/Ranged/TranscendentRailcannon.png | Bin 0 -> 504 bytes Content/NPCs/OriginalNiko/Niko.cs | 18 ++- Content/Players/TranscendentPlayer.cs | 67 ++++++++ .../Transcendent/TranscendentBladeShard.cs | 88 ++++++++++ .../Transcendent/TranscendentBladeShard.png | Bin 0 -> 504 bytes .../Transcendent/TranscendentNova.cs | 93 +++++++++++ .../Transcendent/TranscendentNova.png | Bin 0 -> 504 bytes .../Transcendent/TranscendentRailBolt.cs | 92 +++++++++++ .../Transcendent/TranscendentRailBolt.png | Bin 0 -> 504 bytes .../en-US_Mods.ForgottenWawiTech.hjson | 75 ++++++++- 26 files changed, 1037 insertions(+), 99 deletions(-) create mode 100644 Content/Buffs/Debuffs/TypeNull.cs create mode 100644 Content/Buffs/Debuffs/TypeNull.png create mode 100644 Content/Items/Accessories/AscendantSwarmModule.cs create mode 100644 Content/Items/Accessories/AscendantSwarmModule.png create mode 100644 Content/Items/Accessories/TranscendentMatrix.cs create mode 100644 Content/Items/Accessories/TranscendentMatrix.png create mode 100644 Content/Items/Tools/Transcendent/TranscendentOmnitool.cs create mode 100644 Content/Items/Tools/Transcendent/TranscendentOmnitool.png create mode 100644 Content/Items/Weapons/Magic/TranscendentSingularityStaff.cs create mode 100644 Content/Items/Weapons/Magic/TranscendentSingularityStaff.png create mode 100644 Content/Items/Weapons/Melee/TranscendentBlade.cs create mode 100644 Content/Items/Weapons/Melee/TranscendentBlade.png create mode 100644 Content/Items/Weapons/Ranged/TranscendentRailcannon.cs create mode 100644 Content/Items/Weapons/Ranged/TranscendentRailcannon.png create mode 100644 Content/Players/TranscendentPlayer.cs create mode 100644 Content/Projectiles/Transcendent/TranscendentBladeShard.cs create mode 100644 Content/Projectiles/Transcendent/TranscendentBladeShard.png create mode 100644 Content/Projectiles/Transcendent/TranscendentNova.cs create mode 100644 Content/Projectiles/Transcendent/TranscendentNova.png create mode 100644 Content/Projectiles/Transcendent/TranscendentRailBolt.cs create mode 100644 Content/Projectiles/Transcendent/TranscendentRailBolt.png diff --git a/Content/Buffs/Debuffs/TypeNull.cs b/Content/Buffs/Debuffs/TypeNull.cs new file mode 100644 index 0000000..3fa9e36 --- /dev/null +++ b/Content/Buffs/Debuffs/TypeNull.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Buffs.Debuffs +{ + public class TypeNull : ModBuff + { + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + // Debuff endurance, wing time, life regen and mana regen, but double speed + player.endurance -= 0.20f; + player.wingTimeMax = (int)(player.wingTimeMax * 0.2f); + player.lifeRegen -= 10; + player.manaRegenBonus -= 20; + player.moveSpeed += 0.20f; + } + } +} \ No newline at end of file diff --git a/Content/Buffs/Debuffs/TypeNull.png b/Content/Buffs/Debuffs/TypeNull.png new file mode 100644 index 0000000000000000000000000000000000000000..725a7409e2461e3caba904bfd118bfd33c5ffa95 GIT binary patch literal 3042 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 literal 0 HcmV?d00001 diff --git a/Content/Items/Accessories/AscendantSwarmModule.cs b/Content/Items/Accessories/AscendantSwarmModule.cs new file mode 100644 index 0000000..fd6a437 --- /dev/null +++ b/Content/Items/Accessories/AscendantSwarmModule.cs @@ -0,0 +1,49 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Players; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; + +namespace ForgottenWawiTech.Content.Items.Accessories +{ + public class AscendantSwarmModule : ModItem + { + public override void SetDefaults() + { + Item.width = 30; + Item.height = 34; + Item.accessory = true; + Item.value = Item.sellPrice(platinum: 240); + Item.rare = ModContent.RarityType(); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.maxMinions += 6; + player.maxTurrets += 3; + player.GetDamage(DamageClass.Summon) += 0.35f; + player.GetAttackSpeed(DamageClass.Summon) += 0.20f; + player.whipRangeMultiplier += 0.30f; + player.GetKnockback(DamageClass.Summon) += 2f; + player.buffImmune[BuffID.OnFire] = true; + player.buffImmune[BuffID.CursedInferno] = true; + player.buffImmune[BuffID.Venom] = true; + + player.GetModPlayer().HandleSwarmAccessory(Item); + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 6) + .AddIngredient(ModContent.ItemType(), 8) + .AddIngredient(ModContent.ItemType(), 10) + .AddIngredient(ModContent.ItemType(), 16) + .AddIngredient(ModContent.ItemType(), 6) + .AddTile(ModContent.TileType()) + .Register(); + } + } +} diff --git a/Content/Items/Accessories/AscendantSwarmModule.png b/Content/Items/Accessories/AscendantSwarmModule.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Accessories/TranscendentMatrix.cs b/Content/Items/Accessories/TranscendentMatrix.cs new file mode 100644 index 0000000..796409b --- /dev/null +++ b/Content/Items/Accessories/TranscendentMatrix.cs @@ -0,0 +1,54 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; + +namespace ForgottenWawiTech.Content.Items.Accessories +{ + public class TranscendentMatrix : ModItem + { + public override void SetDefaults() + { + Item.width = 28; + Item.height = 32; + Item.value = Item.sellPrice(platinum: 250); + Item.rare = ModContent.RarityType(); + Item.accessory = true; + Item.defense = 12; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Generic) += 0.25f; + player.GetCritChance(DamageClass.Generic) += 15; + player.endurance += 0.12f; + player.statLifeMax2 += 160; + player.statManaMax2 += 160; + player.lifeRegen += 6; + player.manaCost -= 0.12f; + player.manaRegenBonus += 120; + player.moveSpeed += 0.25f; + player.GetAttackSpeed(DamageClass.Melee) += 0.15f; + player.GetAttackSpeed(DamageClass.Summon) += 0.15f; + player.lavaImmune = true; + player.fireWalk = true; + player.noKnockback = true; + player.wingTimeMax = System.Math.Max(player.wingTimeMax, 1200); + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 6) + .AddIngredient(ModContent.ItemType(), 8) + .AddIngredient(ModContent.ItemType(), 12) + .AddIngredient(ModContent.ItemType(), 16) + .AddIngredient(ModContent.ItemType(), 6) + .AddIngredient(ItemID.CelestialShell) + .AddTile(ModContent.TileType()) + .Register(); + } + } +} diff --git a/Content/Items/Accessories/TranscendentMatrix.png b/Content/Items/Accessories/TranscendentMatrix.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Materials/RGBAlloy.cs b/Content/Items/Materials/RGBAlloy.cs index db16e0f..2d1211d 100644 --- a/Content/Items/Materials/RGBAlloy.cs +++ b/Content/Items/Materials/RGBAlloy.cs @@ -36,7 +36,7 @@ namespace ForgottenWawiTech.Content.Items.Materials { CreateRecipe() .AddIngredient(ModContent.ItemType(), 1) - .AddIngredient(ModContent.ItemType(), 5) + .AddIngredient(ModContent.ItemType(), 5) .AddTile(TileID.Anvils) .Register(); } diff --git a/Content/Items/Tools/SingularitySet/SingularityMultitool.cs b/Content/Items/Tools/SingularitySet/SingularityMultitool.cs index 317b1c8..1bf2832 100644 --- a/Content/Items/Tools/SingularitySet/SingularityMultitool.cs +++ b/Content/Items/Tools/SingularitySet/SingularityMultitool.cs @@ -1,13 +1,25 @@ +using System.Collections.Generic; +using System.IO; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; using ForgottenWawiTech.Content.Items.Materials; using ForgottenWawiTech.Content.Rarities; +using Terraria.ModLoader.IO; +using Terraria.Localization; namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet { public class SingularityMultitool : ModItem { + private bool hammerMode; + private const int PickaxePower = 500; + private const int HammerPower = 500; + private const int AxePower = 500; + + protected override bool CloneNewInstances => true; + public override void SetDefaults() { Item.damage = 500; @@ -23,8 +35,52 @@ namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.useTurn = true; - Item.axe = 500; - Item.pick = 500; + Item.axe = AxePower; + Item.pick = PickaxePower; + Item.hammer = 0; + ApplyMode(); + } + + public override bool AltFunctionUse(Player player) => true; + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + ToggleMode(player); + return false; + } + + ApplyMode(); + return base.CanUseItem(player); + } + + public override void ModifyTooltips(List tooltips) + { + string modeText = hammerMode ? "Hammer" : "Pickaxe"; + tooltips.Add(new TooltipLine(Mod, "SingularityMultitoolMode", $"Current Mode: {modeText}")); + } + + public override void SaveData(TagCompound tag) + { + tag["HammerMode"] = hammerMode; + } + + public override void LoadData(TagCompound tag) + { + hammerMode = tag.GetBool("HammerMode"); + ApplyMode(); + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(hammerMode); + } + + public override void NetReceive(BinaryReader reader) + { + hammerMode = reader.ReadBoolean(); + ApplyMode(); } public override void AddRecipes() @@ -35,5 +91,36 @@ namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet .AddTile() .Register(); } + + private void ToggleMode(Player player) + { + hammerMode = !hammerMode; + ApplyMode(); + + if (Main.myPlayer == player.whoAmI) + { + string itemName = Lang.GetItemNameValue(Item.type); + string modeText = hammerMode ? "Hammer" : "Pickaxe"; + Main.NewText($"{itemName} switched to {modeText} mode.", 190, 120, 255); + } + + SoundEngine.PlaySound(SoundID.MenuTick, player.Center); + } + + private void ApplyMode() + { + if (hammerMode) + { + Item.pick = 0; + Item.hammer = HammerPower; + } + else + { + Item.pick = PickaxePower; + Item.hammer = 0; + } + + Item.axe = AxePower; + } } } diff --git a/Content/Items/Tools/Transcendent/TranscendentOmnitool.cs b/Content/Items/Tools/Transcendent/TranscendentOmnitool.cs new file mode 100644 index 0000000..3770961 --- /dev/null +++ b/Content/Items/Tools/Transcendent/TranscendentOmnitool.cs @@ -0,0 +1,150 @@ +using System.Collections.Generic; +using System.IO; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; +using Terraria.ModLoader.IO; +using Terraria.Localization; + +namespace ForgottenWawiTech.Content.Items.Tools.Transcendent +{ + public class TranscendentOmnitool : ModItem + { + private bool hammerMode; + private const int PickaxePower = 420; + private const int HammerPower = 350; + private const int AxePower = 80; + + protected override bool CloneNewInstances => true; + + public override void SetDefaults() + { + Item.width = 42; + Item.height = 42; + Item.damage = 220; + Item.DamageType = DamageClass.Melee; + Item.knockBack = 6f; + Item.useTime = 5; + Item.useAnimation = 10; + Item.pick = PickaxePower; + Item.axe = AxePower; + Item.hammer = 0; + Item.tileBoost += 6; + Item.useTurn = true; + Item.autoReuse = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item15; + Item.value = Item.sellPrice(platinum: 260); + Item.rare = ModContent.RarityType(); + ApplyMode(); + } + + public override bool AltFunctionUse(Player player) => true; + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + ToggleMode(player); + return false; + } + + ApplyMode(); + return base.CanUseItem(player); + } + + public override void HoldItem(Player player) + { + ApplyMode(); + player.blockRange += 3; + player.pickSpeed -= 0.25f; + if (player.pickSpeed < 0.35f) + { + player.pickSpeed = 0.35f; + } + + player.AddBuff(BuffID.Dangersense, 2); + player.AddBuff(BuffID.Shine, 2); + } + + public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SourceDamage *= 1.25f; + } + + public override void ModifyTooltips(List tooltips) + { + string modeText = hammerMode ? "Hammer" : "Pickaxe"; + tooltips.Add(new TooltipLine(Mod, "TranscendentOmnitoolMode", $"Current Mode: {modeText}")); + } + + public override void SaveData(TagCompound tag) + { + tag["HammerMode"] = hammerMode; + } + + public override void LoadData(TagCompound tag) + { + hammerMode = tag.GetBool("HammerMode"); + ApplyMode(); + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(hammerMode); + } + + public override void NetReceive(BinaryReader reader) + { + hammerMode = reader.ReadBoolean(); + ApplyMode(); + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 6) + .AddIngredient(ModContent.ItemType(), 10) + .AddIngredient(ModContent.ItemType(), 14) + .AddIngredient(ModContent.ItemType(), 18) + .AddIngredient(ModContent.ItemType(), 6) + .AddTile(ModContent.TileType()) + .Register(); + } + + private void ToggleMode(Player player) + { + hammerMode = !hammerMode; + ApplyMode(); + + if (Main.myPlayer == player.whoAmI) + { + string itemName = Lang.GetItemNameValue(Item.type); + string modeText = hammerMode ? "Hammer" : "Pickaxe"; + Main.NewText($"{itemName} switched to {modeText} mode.", 120, 255, 225); + } + + SoundEngine.PlaySound(SoundID.MenuTick, player.Center); + } + + private void ApplyMode() + { + if (hammerMode) + { + Item.pick = 0; + Item.hammer = HammerPower; + } + else + { + Item.pick = PickaxePower; + Item.hammer = 0; + } + + Item.axe = AxePower; + } + } +} diff --git a/Content/Items/Tools/Transcendent/TranscendentOmnitool.png b/Content/Items/Tools/Transcendent/TranscendentOmnitool.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Weapons/Magic/TomeOfUnyielding.cs b/Content/Items/Weapons/Magic/TomeOfUnyielding.cs index c3ec633..4331927 100644 --- a/Content/Items/Weapons/Magic/TomeOfUnyielding.cs +++ b/Content/Items/Weapons/Magic/TomeOfUnyielding.cs @@ -1,6 +1,5 @@ using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -12,110 +11,67 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic { public override void SetDefaults() { - Item.damage = 15000; - Item.mana = 30; + Item.damage = 520; + Item.mana = 22; Item.crit = 100; Item.DamageType = DamageClass.Magic; Item.width = 40; Item.height = 40; - Item.useTime = 20; - Item.useAnimation = 20; + Item.useTime = 14; + Item.useAnimation = 14; Item.useStyle = ItemUseStyleID.Shoot; - Item.knockBack = 6; - Item.value = Item.buyPrice(platinum: 20); + Item.knockBack = 4.5f; + Item.value = Item.sellPrice(gold: 32); Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.noMelee = true; - Item.shoot = ProjectileID.PurificationPowder; - Item.shootSpeed = 50f; + Item.shoot = ProjectileID.NebulaBlaze1; + Item.shootSpeed = 20f; Item.useAmmo = AmmoID.None; } public override bool Shoot(Player player, Terraria.DataStructures.EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack) { - // Shoot every projectile from vanilla Terraria magic weapons at once. - int[] projectiles = new int[] { - // Pre-Hardmode Magic Weapons - ProjectileID.WandOfSparkingSpark, - ProjectileID.AmethystBolt, - ProjectileID.TopazBolt, - ProjectileID.SapphireBolt, - ProjectileID.EmeraldBolt, - ProjectileID.RubyBolt, - ProjectileID.DiamondBolt, - ProjectileID.AmberBolt, - ProjectileID.VilethornBase, - ProjectileID.VilethornTip, - ProjectileID.Bee, - ProjectileID.WaterStream, - ProjectileID.BookOfSkullsSkull, - ProjectileID.DemonScythe, - ProjectileID.ThunderSpear, - ProjectileID.FlowerPetal, - ProjectileID.Flamelash, - ProjectileID.MagicMissile, - // Hardmode Magic Weapons - ProjectileID.SkyFracture, - ProjectileID.CrystalShard, - ProjectileID.CrystalStorm, - ProjectileID.CursedFlameFriendly, - ProjectileID.GoldenShowerFriendly, - //ProjectileID.CrystalSerpent, - ProjectileID.Meteor1, - ProjectileID.Meteor2, - ProjectileID.Meteor3, - ProjectileID.RainbowRodBullet, - //ProjectileID.MagicalHarp, - ProjectileID.IceBlock, - ProjectileID.RainCloudRaining, - ProjectileID.PoisonFang, - ProjectileID.VenomFang, - ProjectileID.NettleBurstLeft, - ProjectileID.NettleBurstRight, - //ProjectileID.LeafBlowerLeaf, - ProjectileID.ShadowBeamFriendly, - ProjectileID.SpectreWrath, - ProjectileID.InfernoFriendlyBolt, - ProjectileID.MagnetSphereBall, - ProjectileID.MagnetSphereBolt, - ProjectileID.RainbowFront, - ProjectileID.RainbowBack, - ProjectileID.NorthPoleSnowflake, - ProjectileID.Blizzard, - ProjectileID.HeatRay, - ProjectileID.LaserMachinegunLaser, - ProjectileID.ChargedBlasterOrb, - ProjectileID.Bubble, - ProjectileID.NightBeam, - ProjectileID.LightBeam, - ProjectileID.LunarFlare, - ProjectileID.NebulaArcanum, + Vector2 direction = velocity.LengthSquared() > 0.0001f ? Vector2.Normalize(velocity) : new Vector2(player.direction, 0f); + int[] primaryBolts = + { ProjectileID.NebulaBlaze1, ProjectileID.NebulaBlaze2, - ProjectileID.LastPrismLaser, - ProjectileID.ShadowFlame, - ProjectileID.ToxicFlask, - ProjectileID.BookStaffShot, - // Special/Event Magic Weapons - ProjectileID.FlaironBubble, - ProjectileID.UnholyTridentFriendly, - ProjectileID.RainFriendly, - ProjectileID.IceSickle, - ProjectileID.FrostBoltStaff, - ProjectileID.CrystalLeafShot, - ProjectileID.Spark, - ProjectileID.BeeArrow, - ProjectileID.Wasp, - ProjectileID.DD2PhoenixBowShot, - ProjectileID.MonkStaffT1, - ProjectileID.MonkStaffT2, - ProjectileID.MonkStaffT3, + ProjectileID.SkyFracture, + ProjectileID.ShadowBeamFriendly, + ProjectileID.CrystalShard, + ProjectileID.CrystalLeafShot }; - foreach (int projectileType in projectiles) + + for (int i = 0; i < 5; i++) { - Terraria.Projectile.NewProjectile(source, position, velocity, projectileType, damage, knockBack, player.whoAmI); + int projType = primaryBolts[Main.rand.Next(primaryBolts.Length)]; + Vector2 perturbedVelocity = direction.RotatedByRandom(MathHelper.ToRadians(8f)) * Item.shootSpeed * Main.rand.NextFloat(0.98f, 1.18f); + int proj = Projectile.NewProjectile(source, position, perturbedVelocity, projType, (int)(damage * 0.95f), knockBack, player.whoAmI); + if (proj >= 0) + { + Main.projectile[proj].DamageType = DamageClass.Magic; + } } - return false; // return false to prevent tModLoader from shooting the default projectile + + int lingeringType = ProjectileID.MagnetSphereBall; + Vector2 orbitalVel = direction.RotatedBy(MathHelper.ToRadians(Main.rand.NextBool() ? 22f : -22f)) * (Item.shootSpeed * 0.68f); + int sphere = Projectile.NewProjectile(source, position, orbitalVel, lingeringType, (int)(damage * 0.85f), 0f, player.whoAmI); + if (sphere >= 0) + { + Main.projectile[sphere].DamageType = DamageClass.Magic; + } + + if (Main.rand.NextBool(2)) + { + int burst = Projectile.NewProjectile(source, position, direction * (Item.shootSpeed * 0.85f), ProjectileID.NebulaArcanum, (int)(damage * 0.7f), knockBack * 0.6f, player.whoAmI); + if (burst >= 0) + { + Main.projectile[burst].DamageType = DamageClass.Magic; + } + } + + return false; } public override Vector2? HoldoutOffset() { @@ -123,7 +79,8 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic } public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) { - Vector2 muzzleOffset = Vector2.Normalize(velocity) * 25f; + Vector2 direction = velocity.LengthSquared() > 0.0001f ? Vector2.Normalize(velocity) : new Vector2(player.direction, 0f); + Vector2 muzzleOffset = direction * 25f; if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) { position += muzzleOffset; diff --git a/Content/Items/Weapons/Magic/TranscendentSingularityStaff.cs b/Content/Items/Weapons/Magic/TranscendentSingularityStaff.cs new file mode 100644 index 0000000..9e86edc --- /dev/null +++ b/Content/Items/Weapons/Magic/TranscendentSingularityStaff.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Projectiles.Transcendent; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; + +namespace ForgottenWawiTech.Content.Items.Weapons.Magic +{ + public class TranscendentSingularityStaff : ModItem + { + public override void SetStaticDefaults() + { + Item.staff[Type] = true; + } + + public override void SetDefaults() + { + Item.width = 64; + Item.height = 64; + Item.damage = 5000; + Item.DamageType = DamageClass.Magic; + Item.knockBack = 5f; + Item.crit = 50; + Item.mana = 50; + Item.useTime = 18; + Item.useAnimation = 18; + Item.useStyle = ItemUseStyleID.Shoot; + Item.UseSound = SoundID.Item73; + Item.autoReuse = true; + Item.noMelee = true; + Item.shootSpeed = 20f; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(platinum: 310); + Item.rare = ModContent.RarityType(); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 spawnPosition = player.Center + new Vector2(0f, -16f); + Vector2 spawnVelocity = velocity * 0.6f + player.velocity * 0.4f; + spawnVelocity = spawnVelocity.RotatedByRandom(MathHelper.ToRadians(8f)); + + Projectile.NewProjectile(source, spawnPosition, spawnVelocity, type, damage, knockback, player.whoAmI); + return false; + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 8) + .AddIngredient(ModContent.ItemType(), 10) + .AddIngredient(ModContent.ItemType(), 12) + .AddIngredient(ModContent.ItemType(), 20) + .AddIngredient(ModContent.ItemType(), 8) + .AddTile(ModContent.TileType()) + .Register(); + } + } +} diff --git a/Content/Items/Weapons/Magic/TranscendentSingularityStaff.png b/Content/Items/Weapons/Magic/TranscendentSingularityStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Weapons/Melee/TranscendentBlade.cs b/Content/Items/Weapons/Melee/TranscendentBlade.cs new file mode 100644 index 0000000..013fd95 --- /dev/null +++ b/Content/Items/Weapons/Melee/TranscendentBlade.cs @@ -0,0 +1,73 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Projectiles.Transcendent; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; + +namespace ForgottenWawiTech.Content.Items.Weapons.Melee +{ + public class TranscendentBlade : ModItem + { + public override void SetDefaults() + { + Item.width = 68; + Item.height = 68; + Item.damage = 5000; + Item.DamageType = DamageClass.Melee; + Item.knockBack = 8f; + Item.crit = 24; + Item.useTime = 14; + Item.useAnimation = 14; + Item.useStyle = ItemUseStyleID.Swing; + Item.autoReuse = true; + Item.UseSound = SoundID.Item1; + Item.value = Item.sellPrice(platinum: 300); + Item.rare = ModContent.RarityType(); + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 19f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + Vector2 spawnPosition = new Vector2(hitbox.X, hitbox.Y); + Dust dust = Dust.NewDustDirect(spawnPosition, hitbox.Width, hitbox.Height, DustID.RainbowTorch, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 150, default, 1.3f); + dust.noGravity = true; + } + } + + public override bool Shoot(Player player, Terraria.DataStructures.EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 baseVelocity = Vector2.Normalize(velocity) * Item.shootSpeed; + for (int i = 0; i < 3; i++) + { + Vector2 perturbedVelocity = baseVelocity.RotatedByRandom(MathHelper.ToRadians(22f)) * Main.rand.NextFloat(0.8f, 1.1f); + Projectile.NewProjectile(source, player.Center, perturbedVelocity, type, (int)(damage * 0.8f), knockback * 0.6f, player.whoAmI); + } + + return false; + } + + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.Daybreak, 420); + target.AddBuff(BuffID.BetsysCurse, 300); + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 8) + .AddIngredient(ModContent.ItemType(), 12) + .AddIngredient(ModContent.ItemType(), 14) + .AddIngredient(ModContent.ItemType(), 20) + .AddIngredient(ModContent.ItemType(), 8) + .AddTile(ModContent.TileType()) + .Register(); + } + } +} diff --git a/Content/Items/Weapons/Melee/TranscendentBlade.png b/Content/Items/Weapons/Melee/TranscendentBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Weapons/Ranged/TranscendentRailcannon.cs b/Content/Items/Weapons/Ranged/TranscendentRailcannon.cs new file mode 100644 index 0000000..21185af --- /dev/null +++ b/Content/Items/Weapons/Ranged/TranscendentRailcannon.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Items.Materials; +using ForgottenWawiTech.Content.Projectiles.Transcendent; +using ForgottenWawiTech.Content.Rarities; +using ForgottenWawiTech.Content.Tiles.CraftingStations; + +namespace ForgottenWawiTech.Content.Items.Weapons.Ranged +{ + public class TranscendentRailcannon : ModItem + { + public override void SetDefaults() + { + Item.width = 74; + Item.height = 32; + Item.damage = 5000; + Item.DamageType = DamageClass.Ranged; + Item.knockBack = 6f; + Item.crit = 28; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Shoot; + Item.UseSound = SoundID.Item38; + Item.autoReuse = true; + Item.noMelee = true; + Item.value = Item.sellPrice(platinum: 320); + Item.rare = ModContent.RarityType(); + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 26f; + Item.useAmmo = AmmoID.None; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 direction = velocity.LengthSquared() > 0.0001f ? Vector2.Normalize(velocity) : new Vector2(player.direction, 0f); + Vector2 muzzleOffset = direction * 32f; + Vector2 spawnPosition = position + muzzleOffset; + + Projectile.NewProjectile(source, spawnPosition, direction * Item.shootSpeed, type, damage, knockback, player.whoAmI); + return false; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-10f, 0f); + } + + public override void AddRecipes() + { + CreateRecipe() + .AddIngredient(ModContent.ItemType(), 8) + .AddIngredient(ModContent.ItemType(), 10) + .AddIngredient(ModContent.ItemType(), 16) + .AddIngredient(ModContent.ItemType(), 24) + .AddIngredient(ModContent.ItemType(), 8) + .AddTile(ModContent.TileType()) + .Register(); + } + } +} diff --git a/Content/Items/Weapons/Ranged/TranscendentRailcannon.png b/Content/Items/Weapons/Ranged/TranscendentRailcannon.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/NPCs/OriginalNiko/Niko.cs b/Content/NPCs/OriginalNiko/Niko.cs index f2f03ea..437565f 100644 --- a/Content/NPCs/OriginalNiko/Niko.cs +++ b/Content/NPCs/OriginalNiko/Niko.cs @@ -32,11 +32,19 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko public override void AI() { - // Phased behaviour for Niko: - // Phase 0: initial/dummy AI until 50% HP - // Phase 1: invulnerable for ~1 minute (dialogue opportunity) - // Phase 2: dummy AI until 30% HP - // Phase 3: spawn other bosses (Lyyka, Neptune, Lexy) if they are undefeated, then move to Phase 4 + /* + IDEA: + Phase 1: Somewhat tame, false sense of security. 75% HP + Phase 1.5: Invulnerable, drifts around, monologue for ~1 minute + Phase 2: Heal 50% HP + Phase 3: Spawn other bosses if undefeated + Phase 3.5: After other bosses are defeated (or if they aren't spawned), short pause for dialogue + Phase 4: Final behaviour + + Each individual phase I have yet to fully plan out, but the main idea is simple. What if we uncapped a Player's limitations and slapped them as a boss with near end-game gear? + Nintendo don't sue me - I am only copying Inner Agent 3 here. Alongside rough ideas of the Uzi and Cyn fight from Murder Drones. + Music (if legality allows) is planned to be a rock-ier remix of "In The End" by Linkin Park, fitting Niko's emo ass. + */ NPC.TargetClosest(false); Player target = Main.player[NPC.target]; diff --git a/Content/Players/TranscendentPlayer.cs b/Content/Players/TranscendentPlayer.cs new file mode 100644 index 0000000..0ff24be --- /dev/null +++ b/Content/Players/TranscendentPlayer.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using ForgottenWawiTech.Content.Projectiles.Transcendent; + +namespace ForgottenWawiTech.Content.Players +{ + public class TranscendentPlayer : ModPlayer + { + public bool SwarmModuleEquipped; + private int swarmTimer; + + public void HandleSwarmAccessory(Item sourceItem) + { + SwarmModuleEquipped = true; + + if (Player.whoAmI != Main.myPlayer) + return; + + swarmTimer++; + if (swarmTimer >= 90) + { + swarmTimer = 0; + + int baseDamage = 220; + int damage = (int)Player.GetDamage(DamageClass.Summon).ApplyTo(baseDamage); + float knockBack = 3f; + Vector2 velocity = Main.rand.NextVector2Circular(6f, 6f); + if (velocity.LengthSquared() < 0.01f) + { + velocity = new Vector2(0f, -6f); + } + + Projectile.NewProjectile( + Player.GetSource_Accessory(sourceItem), + Player.Center, + velocity, + ModContent.ProjectileType(), + damage, + knockBack, + Player.whoAmI); + } + } + + public override void ResetEffects() + { + SwarmModuleEquipped = false; + } + + public override void PostUpdate() + { + if (SwarmModuleEquipped) + { + if (Main.rand.NextBool(6)) + { + Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.RainbowTorch, Player.velocity.X * 0.2f, Player.velocity.Y * 0.2f, 150, default, 1.1f); + dust.noGravity = true; + } + } + else if (Player.whoAmI == Main.myPlayer && swarmTimer > 0) + { + swarmTimer = 0; + } + } + } +} diff --git a/Content/Projectiles/Transcendent/TranscendentBladeShard.cs b/Content/Projectiles/Transcendent/TranscendentBladeShard.cs new file mode 100644 index 0000000..4d927aa --- /dev/null +++ b/Content/Projectiles/Transcendent/TranscendentBladeShard.cs @@ -0,0 +1,88 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Projectiles.Transcendent +{ + public class TranscendentBladeShard : ModProjectile + { + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = 18; + Projectile.height = 18; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 4; + Projectile.timeLeft = 180; + Projectile.alpha = 40; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; + Projectile.DamageType = DamageClass.Melee; + Projectile.ignoreWater = true; + } + + public override void AI() + { + Projectile.rotation += 0.4f * Projectile.direction; + Lighting.AddLight(Projectile.Center, 0.35f, 0.25f, 0.55f); + + if (Projectile.localAI[0] == 0f) + { + Projectile.localAI[0] = 1f; + Projectile.velocity *= 1.1f; + } + + NPC target = FindTarget(720f); + if (target != null) + { + float homingStrength = 0.18f; + float desiredSpeed = 20f; + Vector2 desiredVelocity = Projectile.DirectionTo(target.Center) * desiredSpeed; + Projectile.velocity = Vector2.Lerp(Projectile.velocity, desiredVelocity, homingStrength); + } + + if (Main.rand.NextBool(3)) + { + int dustIndex = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 150, default, 1.2f); + Dust dust = Main.dust[dustIndex]; + dust.noGravity = true; + dust.velocity = Projectile.velocity * 0.3f; + } + } + + private NPC FindTarget(float maxDetectDistance) + { + NPC selected = null; + float sqr = maxDetectDistance * maxDetectDistance; + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy()) + { + float dist = Vector2.DistanceSquared(npc.Center, Projectile.Center); + if (dist < sqr) + { + sqr = dist; + selected = npc; + } + } + } + + return selected; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.Daybreak, 300); + target.AddBuff(ModContent.BuffType(), 300); + } + } +} diff --git a/Content/Projectiles/Transcendent/TranscendentBladeShard.png b/Content/Projectiles/Transcendent/TranscendentBladeShard.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Projectiles/Transcendent/TranscendentNova.cs b/Content/Projectiles/Transcendent/TranscendentNova.cs new file mode 100644 index 0000000..94f5e01 --- /dev/null +++ b/Content/Projectiles/Transcendent/TranscendentNova.cs @@ -0,0 +1,93 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Projectiles.Transcendent +{ + public class TranscendentNova : ModProjectile + { + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = 28; + Projectile.height = 28; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 120; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Magic; + Projectile.ignoreWater = true; + } + + public override void AI() + { + Projectile.rotation += 0.08f; + Projectile.velocity *= 0.97f; + Lighting.AddLight(Projectile.Center, 0.55f, 0.35f, 0.75f); + + if (Projectile.localAI[0]++ > 20f && Main.rand.NextBool(3)) + { + Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.GemAmethyst, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 150, default, 1.3f); + dust.noGravity = true; + dust.velocity += Projectile.velocity * 0.1f; + } + + if (Projectile.localAI[1]++ >= 8f) + { + Projectile.localAI[1] = 0f; + int healAmount = 1; + Player owner = Main.player[Projectile.owner]; + if (owner.active && !owner.dead && owner.Distance(Projectile.Center) < 400f) + { + owner.statLife = Math.Min(owner.statLife + healAmount, owner.statLifeMax2); + owner.HealEffect(healAmount); + } + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.Daybreak, 300); + target.AddBuff(ModContent.BuffType(), 300); + } + + [Obsolete] + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); + + for (int i = 0; i < 24; i++) + { + Vector2 dustVelocity = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(6f, 12f); + Dust dust = Dust.NewDustDirect(Projectile.Center, 0, 0, DustID.GemAmethyst, dustVelocity.X, dustVelocity.Y, 120, default, 1.6f); + dust.noGravity = true; + } + + if (Projectile.owner == Main.myPlayer) + { + int shardCount = 6; + for (int i = 0; i < shardCount; i++) + { + Vector2 velocity = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(7f, 12f); + Projectile.NewProjectile( + Projectile.GetSource_FromThis(), + Projectile.Center, + velocity, + ModContent.ProjectileType(), + (int)(Projectile.damage * 0.85f), + Projectile.knockBack, + Projectile.owner); + } + } + } + } +} diff --git a/Content/Projectiles/Transcendent/TranscendentNova.png b/Content/Projectiles/Transcendent/TranscendentNova.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Projectiles/Transcendent/TranscendentRailBolt.cs b/Content/Projectiles/Transcendent/TranscendentRailBolt.cs new file mode 100644 index 0000000..c4c9c15 --- /dev/null +++ b/Content/Projectiles/Transcendent/TranscendentRailBolt.cs @@ -0,0 +1,92 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Projectiles.Transcendent +{ + public class TranscendentRailBolt : ModProjectile + { + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 3; + } + + public override void SetDefaults() + { + Projectile.width = 14; + Projectile.height = 14; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 8; + Projectile.timeLeft = 240; + Projectile.tileCollide = false; + Projectile.extraUpdates = 3; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.light = 0.6f; + } + + public override void AI() + { + if (Projectile.localAI[0] == 0f) + { + Projectile.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item72, Projectile.position); + } + + Lighting.AddLight(Projectile.Center, 0.5f, 0.55f, 0.8f); + Projectile.rotation = Projectile.velocity.ToRotation(); + + if (Main.rand.NextBool(3)) + { + Vector2 dustVelocity = Projectile.velocity * 0.2f; + Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.Electric, dustVelocity.X, dustVelocity.Y, 150, default, 1.2f); + dust.noGravity = true; + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + SplitIntoShards(); + } + + public override void OnKill(int timeLeft) + { + SplitIntoShards(); + for (int i = 0; i < 8; i++) + { + Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, Projectile.velocity.X * 0.4f, Projectile.velocity.Y * 0.4f, 100, default, 1.3f); + dust.noGravity = true; + } + } + + private void SplitIntoShards() + { + if (Projectile.owner != Main.myPlayer) + return; + + int shardCount = 3; + for (int i = 0; i < shardCount; i++) + { + Vector2 velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(25f)) * 0.7f; + if (velocity.LengthSquared() < 1f) + { + velocity = new Vector2(0f, -6f); + } + + Projectile.NewProjectile( + Projectile.GetSource_FromThis(), + Projectile.Center, + velocity, + ModContent.ProjectileType(), + (int)(Projectile.damage * 0.7f), + Projectile.knockBack * 0.6f, + Projectile.owner); + } + } + } +} diff --git a/Content/Projectiles/Transcendent/TranscendentRailBolt.png b/Content/Projectiles/Transcendent/TranscendentRailBolt.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Localization/en-US_Mods.ForgottenWawiTech.hjson b/Localization/en-US_Mods.ForgottenWawiTech.hjson index dcc7bbf..37e4b78 100644 --- a/Localization/en-US_Mods.ForgottenWawiTech.hjson +++ b/Localization/en-US_Mods.ForgottenWawiTech.hjson @@ -79,8 +79,9 @@ Items: { DisplayName: Singularity-Infused Tome Of Unyielding Tooltip: ''' - A tome radiating with the power of the void. - You probably shouldn't hold it so close. + Unleashes five void-laced bolts that home toward your target. + Summons a lingering singularity orb that zaps nearby foes. + Frequently spawns a Nebula burst to chase stragglers. ''' } @@ -189,7 +190,7 @@ Items: { } SingularityMultitool: { - Tooltip: "" + Tooltip: Right-click to switch between pickaxe and hammer modes DisplayName: Singularity Multitool } @@ -729,6 +730,64 @@ Items: { ''' } + TranscendentBlade: { + DisplayName: Transcendent Blade + Tooltip: + ''' + Strikes unleash homing ascendant shards + Inflicts Daybreak and Type:Null on hit + ''' + } + + TranscendentRailcannon: { + DisplayName: Transcendent Railcannon + Tooltip: + ''' + Fires a pierce beam that erupts into seeking shards + Ignores ammo requirements and tears through reality + Inflicts Daybreak and Type:Null on hit + ''' + } + + TranscendentSingularityStaff: { + DisplayName: Transcendent Singularity Staff + Tooltip: + ''' + Launches a singularity nova that slows enemies and heals allies + Detonations spawn ascendant shards to finish the job + Inflicts Daybreak and Type:Null on hit + ''' + } + + TranscendentOmnitool: { + DisplayName: Transcendent Omnitool + Tooltip: + ''' + Massive reach, accelerated mining, grants Shine and Dangersense + Right-click to switch between pickaxe and hammer modes + ''' + } + + TranscendentMatrix: { + DisplayName: Transcendent Matrix + Tooltip: + ''' + +25% damage, +15% critical strike chance + +160 maximum life and mana, +12% damage reduction + +6 life regen, +120 mana regen, flight and lava immunity + ''' + } + + AscendantSwarmModule: { + DisplayName: Ascendant Swarm Module + Tooltip: + ''' + +35% summon damage, +20% summon attack speed + +6 max minions, +3 max turrets, massive whip range + Periodically launches autonomous swarm shards + ''' + } + ProtogenSentinelHelmet: { DisplayName: Protogen Sentinel Helmet Tooltip: @@ -929,9 +988,19 @@ Projectiles: { ShatteredPrismBeam.DisplayName: Shattered Prism Beam ShatteredPrismHoldout.DisplayName: Shattered Prism Holdout BeamAttackWandBeam.DisplayName: Beam Attack Wand Beam + TranscendentBladeShard.DisplayName: Transcendent Blade Shard + TranscendentNova.DisplayName: Transcendent Nova + TranscendentRailBolt.DisplayName: Transcendent Rail Bolt } Prefixes: { Healthy.DisplayName: Healthy SingularityPowered.DisplayName: Singularity Powered } + +Buffs: { + TypeNull: { + DisplayName: Nullified + Description: Your wings feel heavy and unresponsive, alongside a general sense of numbness. + } +}