Add Nullified debuff, add Transcendent weapons and tool
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -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<TranscendentItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
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<TranscendentPlayer>().HandleSwarmAccessory(Item);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AddRecipes()
|
||||||
|
{
|
||||||
|
CreateRecipe()
|
||||||
|
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 6)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 8)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 10)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 16)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 6)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.Register();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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<TranscendentItem>();
|
||||||
|
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<ControlledSingularity>(), 6)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 8)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 12)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 16)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 6)
|
||||||
|
.AddIngredient(ItemID.CelestialShell)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.Register();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -36,7 +36,7 @@ namespace ForgottenWawiTech.Content.Items.Materials
|
|||||||
{
|
{
|
||||||
CreateRecipe()
|
CreateRecipe()
|
||||||
.AddIngredient(ModContent.ItemType<RGBass>(), 1)
|
.AddIngredient(ModContent.ItemType<RGBass>(), 1)
|
||||||
.AddIngredient(ModContent.ItemType<VisorShard>(), 5)
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 5)
|
||||||
.AddTile(TileID.Anvils)
|
.AddTile(TileID.Anvils)
|
||||||
.Register();
|
.Register();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,25 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
using Terraria.Audio;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using ForgottenWawiTech.Content.Items.Materials;
|
using ForgottenWawiTech.Content.Items.Materials;
|
||||||
using ForgottenWawiTech.Content.Rarities;
|
using ForgottenWawiTech.Content.Rarities;
|
||||||
|
using Terraria.ModLoader.IO;
|
||||||
|
using Terraria.Localization;
|
||||||
|
|
||||||
namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet
|
namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet
|
||||||
{
|
{
|
||||||
public class SingularityMultitool : ModItem
|
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()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 500;
|
Item.damage = 500;
|
||||||
@@ -23,8 +35,52 @@ namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet
|
|||||||
Item.UseSound = SoundID.Item1;
|
Item.UseSound = SoundID.Item1;
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.useTurn = true;
|
Item.useTurn = true;
|
||||||
Item.axe = 500;
|
Item.axe = AxePower;
|
||||||
Item.pick = 500;
|
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<TooltipLine> 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()
|
public override void AddRecipes()
|
||||||
@@ -35,5 +91,36 @@ namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet
|
|||||||
.AddTile<Content.Tiles.CraftingStations.SingularitySealingUnit>()
|
.AddTile<Content.Tiles.CraftingStations.SingularitySealingUnit>()
|
||||||
.Register();
|
.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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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<TranscendentItem>();
|
||||||
|
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<TooltipLine> 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<ControlledSingularity>(), 6)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 10)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 14)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 18)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 6)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -1,6 +1,5 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.Audio;
|
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
@@ -12,110 +11,67 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
|||||||
{
|
{
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.damage = 15000;
|
Item.damage = 520;
|
||||||
Item.mana = 30;
|
Item.mana = 22;
|
||||||
Item.crit = 100;
|
Item.crit = 100;
|
||||||
Item.DamageType = DamageClass.Magic;
|
Item.DamageType = DamageClass.Magic;
|
||||||
Item.width = 40;
|
Item.width = 40;
|
||||||
Item.height = 40;
|
Item.height = 40;
|
||||||
Item.useTime = 20;
|
Item.useTime = 14;
|
||||||
Item.useAnimation = 20;
|
Item.useAnimation = 14;
|
||||||
Item.useStyle = ItemUseStyleID.Shoot;
|
Item.useStyle = ItemUseStyleID.Shoot;
|
||||||
Item.knockBack = 6;
|
Item.knockBack = 4.5f;
|
||||||
Item.value = Item.buyPrice(platinum: 20);
|
Item.value = Item.sellPrice(gold: 32);
|
||||||
Item.rare = ModContent.RarityType<SingularityItem>();
|
Item.rare = ModContent.RarityType<SingularityItem>();
|
||||||
Item.autoReuse = true;
|
Item.autoReuse = true;
|
||||||
Item.noMelee = true;
|
Item.noMelee = true;
|
||||||
Item.shoot = ProjectileID.PurificationPowder;
|
Item.shoot = ProjectileID.NebulaBlaze1;
|
||||||
Item.shootSpeed = 50f;
|
Item.shootSpeed = 20f;
|
||||||
Item.useAmmo = AmmoID.None;
|
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)
|
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.
|
Vector2 direction = velocity.LengthSquared() > 0.0001f ? Vector2.Normalize(velocity) : new Vector2(player.direction, 0f);
|
||||||
int[] projectiles = new int[] {
|
int[] primaryBolts =
|
||||||
// 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,
|
|
||||||
ProjectileID.NebulaBlaze1,
|
ProjectileID.NebulaBlaze1,
|
||||||
ProjectileID.NebulaBlaze2,
|
ProjectileID.NebulaBlaze2,
|
||||||
ProjectileID.LastPrismLaser,
|
ProjectileID.SkyFracture,
|
||||||
ProjectileID.ShadowFlame,
|
ProjectileID.ShadowBeamFriendly,
|
||||||
ProjectileID.ToxicFlask,
|
ProjectileID.CrystalShard,
|
||||||
ProjectileID.BookStaffShot,
|
ProjectileID.CrystalLeafShot
|
||||||
// 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,
|
|
||||||
};
|
};
|
||||||
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() {
|
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) {
|
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)) {
|
if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) {
|
||||||
position += muzzleOffset;
|
position += muzzleOffset;
|
||||||
|
|||||||
@@ -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<TranscendentNova>();
|
||||||
|
Item.value = Item.sellPrice(platinum: 310);
|
||||||
|
Item.rare = ModContent.RarityType<TranscendentItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
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<ControlledSingularity>(), 8)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 10)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 12)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 20)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 8)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.Register();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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<TranscendentItem>();
|
||||||
|
Item.shoot = ModContent.ProjectileType<TranscendentBladeShard>();
|
||||||
|
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<ControlledSingularity>(), 8)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 12)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 14)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 20)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 8)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.Register();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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<TranscendentItem>();
|
||||||
|
Item.shoot = ModContent.ProjectileType<TranscendentRailBolt>();
|
||||||
|
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<ControlledSingularity>(), 8)
|
||||||
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 10)
|
||||||
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 16)
|
||||||
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 24)
|
||||||
|
.AddIngredient(ModContent.ItemType<UnstableMatter>(), 8)
|
||||||
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
||||||
|
.Register();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -32,11 +32,19 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko
|
|||||||
|
|
||||||
public override void AI()
|
public override void AI()
|
||||||
{
|
{
|
||||||
// Phased behaviour for Niko:
|
/*
|
||||||
// Phase 0: initial/dummy AI until 50% HP
|
IDEA:
|
||||||
// Phase 1: invulnerable for ~1 minute (dialogue opportunity)
|
Phase 1: Somewhat tame, false sense of security. 75% HP
|
||||||
// Phase 2: dummy AI until 30% HP
|
Phase 1.5: Invulnerable, drifts around, monologue for ~1 minute
|
||||||
// Phase 3: spawn other bosses (Lyyka, Neptune, Lexy) if they are undefeated, then move to Phase 4
|
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);
|
NPC.TargetClosest(false);
|
||||||
Player target = Main.player[NPC.target];
|
Player target = Main.player[NPC.target];
|
||||||
|
|||||||
@@ -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<TranscendentBladeShard>(),
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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<Content.Buffs.Debuffs.TypeNull>(), 300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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<Content.Buffs.Debuffs.TypeNull>(), 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<TranscendentBladeShard>(),
|
||||||
|
(int)(Projectile.damage * 0.85f),
|
||||||
|
Projectile.knockBack,
|
||||||
|
Projectile.owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -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<TranscendentBladeShard>(),
|
||||||
|
(int)(Projectile.damage * 0.7f),
|
||||||
|
Projectile.knockBack * 0.6f,
|
||||||
|
Projectile.owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 504 B |
@@ -79,8 +79,9 @@ Items: {
|
|||||||
DisplayName: Singularity-Infused Tome Of Unyielding
|
DisplayName: Singularity-Infused Tome Of Unyielding
|
||||||
Tooltip:
|
Tooltip:
|
||||||
'''
|
'''
|
||||||
A tome radiating with the power of the void.
|
Unleashes five void-laced bolts that home toward your target.
|
||||||
You probably shouldn't hold it so close.
|
Summons a lingering singularity orb that zaps nearby foes.
|
||||||
|
Frequently spawns a Nebula burst to chase stragglers.
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +190,7 @@ Items: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SingularityMultitool: {
|
SingularityMultitool: {
|
||||||
Tooltip: ""
|
Tooltip: Right-click to switch between pickaxe and hammer modes
|
||||||
DisplayName: Singularity Multitool
|
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: {
|
ProtogenSentinelHelmet: {
|
||||||
DisplayName: Protogen Sentinel Helmet
|
DisplayName: Protogen Sentinel Helmet
|
||||||
Tooltip:
|
Tooltip:
|
||||||
@@ -929,9 +988,19 @@ Projectiles: {
|
|||||||
ShatteredPrismBeam.DisplayName: Shattered Prism Beam
|
ShatteredPrismBeam.DisplayName: Shattered Prism Beam
|
||||||
ShatteredPrismHoldout.DisplayName: Shattered Prism Holdout
|
ShatteredPrismHoldout.DisplayName: Shattered Prism Holdout
|
||||||
BeamAttackWandBeam.DisplayName: Beam Attack Wand Beam
|
BeamAttackWandBeam.DisplayName: Beam Attack Wand Beam
|
||||||
|
TranscendentBladeShard.DisplayName: Transcendent Blade Shard
|
||||||
|
TranscendentNova.DisplayName: Transcendent Nova
|
||||||
|
TranscendentRailBolt.DisplayName: Transcendent Rail Bolt
|
||||||
}
|
}
|
||||||
|
|
||||||
Prefixes: {
|
Prefixes: {
|
||||||
Healthy.DisplayName: Healthy
|
Healthy.DisplayName: Healthy
|
||||||
SingularityPowered.DisplayName: Singularity Powered
|
SingularityPowered.DisplayName: Singularity Powered
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Buffs: {
|
||||||
|
TypeNull: {
|
||||||
|
DisplayName: Nullified
|
||||||
|
Description: Your wings feel heavy and unresponsive, alongside a general sense of numbness.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||