Organized projectiles.
Updated The Mind trinity item.
@ -1,4 +1,5 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Lib.Buffs;
|
using Decimation.Lib.Buffs;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Buffs.Buffs;
|
using Decimation.Content.Buffs.Buffs;
|
||||||
using Decimation.Content.Items.Accessories;
|
using Decimation.Content.Items.Accessories;
|
||||||
|
using Decimation.Content.Items.Accessories.Trinity;
|
||||||
using Decimation.Content.Items.Amulets;
|
using Decimation.Content.Items.Amulets;
|
||||||
using Decimation.Content.Items.Misc;
|
using Decimation.Content.Items.Misc;
|
||||||
using Decimation.Lib.Amulets;
|
using Decimation.Lib.Amulets;
|
||||||
@ -9,6 +10,7 @@ using Decimation.Lib.Collections;
|
|||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
using Terraria.GameInput;
|
||||||
using Terraria.Graphics.Shaders;
|
using Terraria.Graphics.Shaders;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|||||||
@ -1,15 +1,12 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Terraria;
|
using System.IO;
|
||||||
using Terraria.ModLoader;
|
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||||
using Terraria.World.Generation;
|
|
||||||
using Terraria.GameContent.Generation;
|
|
||||||
using Terraria.ModLoader.IO;
|
|
||||||
using Decimation.Content.Structures;
|
using Decimation.Content.Structures;
|
||||||
using Microsoft.Xna.Framework;
|
using Terraria;
|
||||||
using System;
|
using Terraria.GameContent.Generation;
|
||||||
using Decimation.Content.Projectiles.DuneWyrm;
|
using Terraria.ModLoader;
|
||||||
using Terraria.ID;
|
using Terraria.ModLoader.IO;
|
||||||
|
using Terraria.World.Generation;
|
||||||
|
|
||||||
namespace Decimation.Content
|
namespace Decimation.Content
|
||||||
{
|
{
|
||||||
@ -72,19 +69,19 @@ namespace Decimation.Content
|
|||||||
if (loadVersion == 1)
|
if (loadVersion == 1)
|
||||||
{
|
{
|
||||||
byte flags = reader.ReadByte();
|
byte flags = reader.ReadByte();
|
||||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
downedBloodshotEye = ((flags & 1) != 0);
|
||||||
DecimationWorld.downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss
|
downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss
|
||||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
downedArachnus = ((flags & 4) != 0);
|
||||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
downedWyvern = ((flags & 8) != 0);
|
||||||
}
|
}
|
||||||
else if (loadVersion == 2)
|
else if (loadVersion == 2)
|
||||||
{
|
{
|
||||||
byte flags = reader.ReadByte();
|
byte flags = reader.ReadByte();
|
||||||
byte flags2 = reader.ReadByte();
|
byte flags2 = reader.ReadByte();
|
||||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
downedBloodshotEye = ((flags & 1) != 0);
|
||||||
DecimationWorld.downedDuneWyrm = ((flags & 2) != 0);
|
downedDuneWyrm = ((flags & 2) != 0);
|
||||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
downedArachnus = ((flags & 4) != 0);
|
||||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
downedWyvern = ((flags & 8) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,28 +43,12 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
overrideColor = ChatManager.WaveColor(Color.Red)
|
overrideColor = ChatManager.WaveColor(Color.Red)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
class BodyProjectileEffects : GlobalProjectile
|
public static bool BodyEffect(Projectile projectile, Player player, bool fromPlayer, ref int damage)
|
||||||
{
|
|
||||||
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
|
||||||
{
|
|
||||||
Ricochet(projectile, target, true, ref damage);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
|
||||||
{
|
|
||||||
if (Ricochet(projectile, target, false, ref damage))
|
|
||||||
{
|
|
||||||
projectile.hostile = false;
|
|
||||||
projectile.friendly = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool Ricochet(Projectile projectile, Player player, bool fromPlayer, ref int damage)
|
|
||||||
{
|
{
|
||||||
if (Main.expertMode && Main.rand.NextBool(10) &&
|
if (Main.expertMode && Main.rand.NextBool(10) &&
|
||||||
player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Body>()))
|
(player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Body>()) ||
|
||||||
|
player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>())))
|
||||||
{
|
{
|
||||||
return projectile.Richochet(player, fromPlayer, ref damage);
|
return projectile.Richochet(player, fromPlayer, ref damage);
|
||||||
}
|
}
|
||||||
@ -72,4 +56,21 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BodyProjectileEffects : GlobalProjectile
|
||||||
|
{
|
||||||
|
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
Body.BodyEffect(projectile, target, true, ref damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
if (Body.BodyEffect(projectile, target, false, ref damage))
|
||||||
|
{
|
||||||
|
projectile.hostile = false;
|
||||||
|
projectile.friendly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Decimation.Content.Projectiles.Item.Accessory.Trinity;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using Terraria.UI.Chat;
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
@ -10,13 +10,17 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
{
|
{
|
||||||
public class Mind : TrinityAccessory
|
public class Mind : TrinityAccessory
|
||||||
{
|
{
|
||||||
|
private static readonly float TrinityBeamSpeed = 8f;
|
||||||
|
private static readonly int TrinityBeamDamage = 35;
|
||||||
|
|
||||||
protected override string ItemName => "The Mind";
|
protected override string ItemName => "The Mind";
|
||||||
|
|
||||||
protected override string ItemTooltip => "I know all...\n" +
|
protected override string ItemTooltip => "I know all...\n" +
|
||||||
"Increases block placement and mining speed by 10%\n" +
|
"Increases block placement and mining speed by 10%\n" +
|
||||||
"Increases ranged and thrown damage by 10%\n" +
|
"Increases ranged and thrown damage by 10%\n" +
|
||||||
"Increases ranged and thrown critical hit chances by 10%\n" +
|
"Increases ranged and thrown critical hit chances by 10%\n" +
|
||||||
"Allows you to see nearby danger sources\n" +
|
"Increases view range\n" +
|
||||||
"Shows the location of treasure and ore";
|
"Melee attacks have 4% chance to fire a Trinity Beam";
|
||||||
|
|
||||||
protected override void InitAccessory()
|
protected override void InitAccessory()
|
||||||
{
|
{
|
||||||
@ -35,9 +39,7 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
||||||
player.thrownDamage *= 1.10f;
|
player.thrownDamage *= 1.10f;
|
||||||
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
||||||
|
player.scope = true;
|
||||||
player.AddBuff(BuffID.Spelunker, 1);
|
|
||||||
player.AddBuff(BuffID.Dangersense, 1);
|
|
||||||
|
|
||||||
base.UpdateAccessory(player, hideVisual);
|
base.UpdateAccessory(player, hideVisual);
|
||||||
}
|
}
|
||||||
@ -49,5 +51,73 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
overrideColor = ChatManager.WaveColor(Color.Yellow)
|
overrideColor = ChatManager.WaveColor(Color.Yellow)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void MindEffect(Player player, Entity target)
|
||||||
|
{
|
||||||
|
if (Main.rand.NextBool(25) && (player.HasEquippedAccessory(ModContent.ItemType<Mind>()) || player.HasEquippedAccessory(ModContent.ItemType<Trinity>())))
|
||||||
|
{
|
||||||
|
bool targetIsPlayer = target.GetType() == typeof(Player);
|
||||||
|
|
||||||
|
// Target
|
||||||
|
Entity projTarget = null;
|
||||||
|
float lastDistance = float.MaxValue;
|
||||||
|
if (targetIsPlayer)
|
||||||
|
{
|
||||||
|
for (int p = 0; p < Main.player.Length; p++)
|
||||||
|
{
|
||||||
|
Player playerTarget = Main.player[p];
|
||||||
|
if (playerTarget != null)
|
||||||
|
{
|
||||||
|
float distance = playerTarget.Distance(target.position);
|
||||||
|
if (playerTarget.active && !playerTarget.dead &&
|
||||||
|
playerTarget.whoAmI != player.whoAmI && playerTarget.whoAmI != target.whoAmI &&
|
||||||
|
distance < 1000f && distance < lastDistance)
|
||||||
|
{
|
||||||
|
projTarget = playerTarget;
|
||||||
|
lastDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int n = 0; n < Main.npc.Length; n++)
|
||||||
|
{
|
||||||
|
NPC npcTarget = Main.npc[n];
|
||||||
|
if (npcTarget != null)
|
||||||
|
{
|
||||||
|
float distance = npcTarget.Distance(target.position);
|
||||||
|
if (npcTarget.active && !npcTarget.friendly && (targetIsPlayer || npcTarget.whoAmI != target.whoAmI) &&
|
||||||
|
distance < 1000f && distance < lastDistance)
|
||||||
|
{
|
||||||
|
projTarget = npcTarget;
|
||||||
|
lastDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (projTarget != null)
|
||||||
|
{
|
||||||
|
Vector2 velocity = projTarget.Center - target.Center;
|
||||||
|
velocity.Normalize();
|
||||||
|
velocity *= TrinityBeamSpeed;
|
||||||
|
|
||||||
|
Projectile.NewProjectile(target.Center, velocity, ModContent.ProjectileType<TrinityBeam>(), TrinityBeamDamage, 2f,
|
||||||
|
player.whoAmI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MindItemEffects : GlobalItem
|
||||||
|
{
|
||||||
|
public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
|
||||||
|
{
|
||||||
|
Mind.MindEffect(player, target);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
Mind.MindEffect(player, target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,24 +45,36 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
overrideColor = ChatManager.WaveColor(Color.Blue)
|
overrideColor = ChatManager.WaveColor(Color.Blue)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
class SoulItemEffects : GlobalItem
|
public static void SoulHitEffect(Player target, ref int damage)
|
||||||
{
|
{
|
||||||
public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
|
DecimationPlayer targetModPlayer = target.GetModPlayer();
|
||||||
|
if (Main.rand.NextBool(10) && (targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Soul>()) || targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Trinity>())))
|
||||||
|
{
|
||||||
|
damage = 0;
|
||||||
|
targetModPlayer.NextHitCrit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SoulEffect(Player player, Entity target, bool crit)
|
||||||
{
|
{
|
||||||
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
||||||
{
|
{
|
||||||
player.LeechMana(target);
|
player.LeechMana(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SoulItemEffects : GlobalItem
|
||||||
|
{
|
||||||
|
public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
|
||||||
|
{
|
||||||
|
Soul.SoulEffect(player, target, crit);
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
|
public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
|
||||||
{
|
{
|
||||||
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
Soul.SoulEffect(player, target, crit);
|
||||||
{
|
|
||||||
player.LeechMana(target);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,41 +83,29 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
Player owner = Main.player[projectile.owner];
|
Player owner = Main.player[projectile.owner];
|
||||||
if (crit && owner != null && owner.active && !owner.dead &&
|
if (owner != null && owner.active && !owner.dead)
|
||||||
owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
|
||||||
{
|
{
|
||||||
owner.LeechMana(target);
|
Soul.SoulEffect(owner, target, crit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit)
|
public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit)
|
||||||
{
|
{
|
||||||
Player owner = Main.player[projectile.owner];
|
Player owner = Main.player[projectile.owner];
|
||||||
if (crit && owner != null && owner.active && !owner.dead &&
|
if (owner != null && owner.active && !owner.dead)
|
||||||
owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
|
||||||
{
|
{
|
||||||
owner.LeechMana(target);
|
Soul.SoulEffect(owner, target, crit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
{
|
{
|
||||||
IgnoreHit(target, ref damage);
|
Soul.SoulHitEffect(target, ref damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
{
|
{
|
||||||
IgnoreHit(target, ref damage);
|
Soul.SoulHitEffect(target, ref damage);
|
||||||
}
|
|
||||||
|
|
||||||
private void IgnoreHit(Player target, ref int damage)
|
|
||||||
{
|
|
||||||
DecimationPlayer targetModPlayer = target.GetModPlayer();
|
|
||||||
if (Main.rand.NextBool(10) && targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
|
||||||
{
|
|
||||||
damage = 0;
|
|
||||||
targetModPlayer.NextHitCrit = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,8 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Lib.Util;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using Terraria.UI.Chat;
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
@ -18,8 +16,8 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
"Increases all damage by 10%\n" +
|
"Increases all damage by 10%\n" +
|
||||||
"Increases all critical hit chances by 10%\n" +
|
"Increases all critical hit chances by 10%\n" +
|
||||||
"Increases minions knockback by 10%\n" +
|
"Increases minions knockback by 10%\n" +
|
||||||
"Allows you to see nearby danger sources\n" +
|
"Increases view range\n" +
|
||||||
"Shows the location of treasure and ore\n" +
|
"Melee attacks have 4% chance to fire a Trinity Beam\n" +
|
||||||
"Criticals hits leech mana\n" +
|
"Criticals hits leech mana\n" +
|
||||||
"Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit\n" +
|
"Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit\n" +
|
||||||
"Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage";
|
"Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage";
|
||||||
@ -53,9 +51,9 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
||||||
player.thrownDamage *= 1.10f;
|
player.thrownDamage *= 1.10f;
|
||||||
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
||||||
|
player.scope = true;
|
||||||
|
|
||||||
player.AddBuff(BuffID.Spelunker, 1);
|
base.UpdateAccessory(player, hideVisual);
|
||||||
player.AddBuff(BuffID.Dangersense, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||||
@ -66,84 +64,4 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TrinityItemEffects : GlobalItem
|
|
||||||
{
|
|
||||||
public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
|
|
||||||
{
|
|
||||||
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>()))
|
|
||||||
{
|
|
||||||
player.LeechMana(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
|
|
||||||
{
|
|
||||||
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>()))
|
|
||||||
{
|
|
||||||
player.LeechMana(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class TrinityProjectileEffects : GlobalProjectile
|
|
||||||
{
|
|
||||||
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit)
|
|
||||||
{
|
|
||||||
Player owner = Main.player[projectile.owner];
|
|
||||||
if (crit && owner != null && owner.active && !owner.dead &&
|
|
||||||
owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>()))
|
|
||||||
{
|
|
||||||
owner.LeechMana(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit)
|
|
||||||
{
|
|
||||||
Player owner = Main.player[projectile.owner];
|
|
||||||
if (crit && owner != null && owner.active && !owner.dead &&
|
|
||||||
owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>()))
|
|
||||||
{
|
|
||||||
owner.LeechMana(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
|
||||||
{
|
|
||||||
Ricochet(projectile, target, true, ref damage);
|
|
||||||
IgnoreHit(target, ref damage);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
|
||||||
{
|
|
||||||
if (Ricochet(projectile, target, false, ref damage))
|
|
||||||
{
|
|
||||||
projectile.hostile = false;
|
|
||||||
projectile.friendly = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
IgnoreHit(target, ref damage);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool Ricochet(Projectile projectile, Player player, bool fromPlayer, ref int damage)
|
|
||||||
{
|
|
||||||
if (Main.expertMode && Main.rand.NextBool(10) &&
|
|
||||||
player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>()))
|
|
||||||
{
|
|
||||||
return projectile.Richochet(player, fromPlayer, ref damage);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void IgnoreHit(Player target, ref int damage)
|
|
||||||
{
|
|
||||||
DecimationPlayer targetModPlayer = target.GetModPlayer();
|
|
||||||
if (Main.rand.NextBool(10) && targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
|
||||||
{
|
|
||||||
damage = 0;
|
|
||||||
targetModPlayer.NextHitCrit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,8 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
|||||||
{
|
{
|
||||||
return !player.HasEquippedAccessory(ModContent.ItemType<Body>()) &&
|
return !player.HasEquippedAccessory(ModContent.ItemType<Body>()) &&
|
||||||
!player.HasEquippedAccessory(ModContent.ItemType<Soul>()) &&
|
!player.HasEquippedAccessory(ModContent.ItemType<Soul>()) &&
|
||||||
!player.HasEquippedAccessory(ModContent.ItemType<Mind>());
|
!player.HasEquippedAccessory(ModContent.ItemType<Mind>()) &&
|
||||||
|
!player.HasEquippedAccessory(ModContent.ItemType<Trinity>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool? PrefixChance(int pre, UnifiedRandom rand)
|
public override bool? PrefixChance(int pre, UnifiedRandom rand)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Items.Misc.CondensedSouls;
|
using Decimation.Content.Items.Misc.CondensedSouls;
|
||||||
using Decimation.Content.Items.Ores;
|
using Decimation.Content.Items.Ores;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Accessory;
|
||||||
using Decimation.Content.Tiles;
|
using Decimation.Content.Tiles;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.Arachnus;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.BloodshotEye;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.BloodshotEye;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Items.Misc.Souls;
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
using Decimation.Content.Projectiles.DuneWyrm;
|
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Decimation.Lib.Util.Builder;
|
using Decimation.Lib.Util.Builder;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
|
|||||||
protected override string ItemTooltip => "Fire bolts of pure time to eradicate your opposition";
|
protected override string ItemTooltip => "Fire bolts of pure time to eradicate your opposition";
|
||||||
protected override int Damages => 15;
|
protected override int Damages => 15;
|
||||||
protected override DamageType DamagesType => DamageType.Magic;
|
protected override DamageType DamagesType => DamageType.Magic;
|
||||||
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Sundial>();
|
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.Boss.DuneWyrm.Sundial>();
|
||||||
|
|
||||||
protected override void InitWeapon()
|
protected override void InitWeapon()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
|
|||||||
protected override string ItemTooltip => "Their time has come...";
|
protected override string ItemTooltip => "Their time has come...";
|
||||||
protected override int Damages => 45;
|
protected override int Damages => 45;
|
||||||
protected override DamageType DamagesType => DamageType.Ranged;
|
protected override DamageType DamagesType => DamageType.Ranged;
|
||||||
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Timekeeper>();
|
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.Boss.DuneWyrm.Timekeeper>();
|
||||||
protected override int AmmoId => AmmoID.Bullet;
|
protected override int AmmoId => AmmoID.Bullet;
|
||||||
|
|
||||||
protected override void InitWeapon()
|
protected override void InitWeapon()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Items.Misc.Souls;
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
using Decimation.Content.Projectiles.DuneWyrm;
|
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util.Builder;
|
using Decimation.Lib.Util.Builder;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Decimation.Lib.Util.Builder;
|
using Decimation.Lib.Util.Builder;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,10 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Decimation.Lib.Util.Builder;
|
using Decimation.Lib.Util.Builder;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.Audio;
|
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using SoundType = Terraria.ModLoader.SoundType;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Items.Weapons
|
namespace Decimation.Content.Items.Weapons
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using Decimation.Content.Items.Ores;
|
using Decimation.Content.Items.Ores;
|
||||||
using Decimation.Content.Items.Weapons.Arachnus;
|
using Decimation.Content.Items.Weapons.Arachnus;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Content.Tiles;
|
using Decimation.Content.Tiles;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Decimation.Content.Items.Ores;
|
using Decimation.Content.Items.Ores;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
using Decimation.Content.Tiles;
|
using Decimation.Content.Tiles;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using Decimation.Content.Buffs.Debuffs;
|
|||||||
using Decimation.Content.Items.Boss.Arachnus;
|
using Decimation.Content.Items.Boss.Arachnus;
|
||||||
using Decimation.Content.Items.Misc.Souls;
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
using Decimation.Content.Items.Weapons.Arachnus;
|
using Decimation.Content.Items.Weapons.Arachnus;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Boss.Arachnus;
|
||||||
using Decimation.Content.Tiles.ShrineoftheMoltenOne;
|
using Decimation.Content.Tiles.ShrineoftheMoltenOne;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using Decimation.Content.Items.Boss.Bloodshot;
|
|||||||
using Decimation.Content.Items.Misc;
|
using Decimation.Content.Items.Misc;
|
||||||
using Decimation.Content.Items.Weapons.Bloodshot;
|
using Decimation.Content.Items.Weapons.Bloodshot;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.BloodshotEye;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|||||||
@ -4,14 +4,15 @@ using Decimation.Content.Buffs.Debuffs;
|
|||||||
using Decimation.Content.Items.Boss.DuneWyrm;
|
using Decimation.Content.Items.Boss.DuneWyrm;
|
||||||
using Decimation.Content.Items.Misc.Souls;
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
using Decimation.Content.Items.Vanity.DuneWyrm;
|
using Decimation.Content.Items.Vanity.DuneWyrm;
|
||||||
using Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler;
|
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||||
using Decimation.Lib.NPCs;
|
using Decimation.Lib.NPCs;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
using AncientTombCrawlerHead = Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler.AncientTombCrawlerHead;
|
||||||
|
|
||||||
namespace Decimation.Content.NPCs.DuneWyrm
|
namespace Decimation.Content.NPCs.DuneWyrm
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.NPC;
|
||||||
using Decimation.Content.Tiles.ShrineoftheMoltenOne;
|
using Decimation.Content.Tiles.ShrineoftheMoltenOne;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ using Decimation.Content.Dusts;
|
|||||||
using Decimation.Content.Items.Misc;
|
using Decimation.Content.Items.Misc;
|
||||||
using Decimation.Content.NPCs.Bloodshot;
|
using Decimation.Content.NPCs.Bloodshot;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.NPC;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ using Decimation.Content.Items.Boss.DuneWyrm;
|
|||||||
using Decimation.Content.Items.Misc;
|
using Decimation.Content.Items.Misc;
|
||||||
using Decimation.Content.Items.Misc.Souls;
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.NPC;
|
||||||
using Decimation.Content.UI;
|
using Decimation.Content.UI;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class ArachnusFireball : DecimationProjectile
|
internal class ArachnusFireball : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -16,7 +16,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
this.projectile.light = 1f;
|
this.projectile.light = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
target.AddBuff(ModContent.BuffType<Singed>(), 120);
|
target.AddBuff(ModContent.BuffType<Singed>(), 120);
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class ArchingSolarBlade : DecimationProjectile
|
internal class ArchingSolarBlade : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
@ -5,7 +5,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class BlastofHeat : DecimationProjectile
|
internal class BlastofHeat : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
projectile.extraUpdates = 3;
|
projectile.extraUpdates = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
if (Main.rand.Next(2) == 0)
|
if (Main.rand.Next(2) == 0)
|
||||||
target.AddBuff(BuffID.OnFire, 600);
|
target.AddBuff(BuffID.OnFire, 600);
|
||||||
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
@ -4,7 +4,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class BlastofShadowFlame : DecimationProjectile
|
internal class BlastofShadowFlame : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
projectile.rotation += 0.3f * (float)projectile.direction;
|
projectile.rotation += 0.3f * (float)projectile.direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
target.AddBuff(BuffID.ShadowFlame, Main.expertMode ? 360 : 600);
|
target.AddBuff(BuffID.ShadowFlame, Main.expertMode ? 360 : 600);
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
@ -7,7 +7,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class MoltenStyngerBolt : DecimationProjectile
|
internal class MoltenStyngerBolt : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
if (projectile.timeLeft > 3)
|
if (projectile.timeLeft > 3)
|
||||||
projectile.timeLeft = 3;
|
projectile.timeLeft = 3;
|
||||||
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
@ -11,7 +11,7 @@ using Terraria.DataStructures;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
|
||||||
{
|
{
|
||||||
internal class BloodBeam : DecimationProjectile
|
internal class BloodBeam : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -47,7 +47,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
int damages = Main.rand.Next(5, 11);
|
int damages = Main.rand.Next(5, 11);
|
||||||
target.Hurt(PlayerDeathReason.LegacyDefault(), damages, 0);
|
target.Hurt(PlayerDeathReason.LegacyDefault(), damages, 0);
|
||||||
|
|
||||||
NPC bloodshotEye = Main.npc[(int)projectile.ai[0]];
|
Terraria.NPC bloodshotEye = Main.npc[(int)projectile.ai[0]];
|
||||||
bloodshotEye.life += damages;
|
bloodshotEye.life += damages;
|
||||||
bloodshotEye.HealEffect(damages);
|
bloodshotEye.HealEffect(damages);
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
|
||||||
{
|
{
|
||||||
internal class BloodBeamFriendly : DecimationProjectile
|
internal class BloodBeamFriendly : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -7,7 +7,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
|
||||||
{
|
{
|
||||||
internal class BloodClot : DecimationProjectile
|
internal class BloodClot : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 288 B |
@ -5,7 +5,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
|
||||||
{
|
{
|
||||||
internal class BloodClotSmall : DecimationProjectile
|
internal class BloodClotSmall : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
@ -5,7 +5,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
|
||||||
{
|
{
|
||||||
internal class Tooth : DecimationProjectile
|
internal class Tooth : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
DamageType = DecimationWeapon.DamageType.Ranged;
|
DamageType = DecimationWeapon.DamageType.Ranged;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
int regen = (int)(damage * 0.08f);
|
int regen = (int)(damage * 0.08f);
|
||||||
Player owner = Main.player[projectile.owner];
|
Player owner = Main.player[projectile.owner];
|
||||||
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
@ -1,6 +1,6 @@
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
internal class Ammonite : DecimationProjectile
|
internal class Ammonite : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
|
|||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles.DuneWyrm
|
namespace Decimation.Content.Projectiles.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
class AncientTombCrawlerHead : AncientTombCrawler
|
class AncientTombCrawlerHead : AncientTombCrawler
|
||||||
{
|
{
|
||||||
@ -3,7 +3,7 @@ using Decimation.Lib.Util;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles.DuneWyrm
|
namespace Decimation.Content.Projectiles.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
public class HourHandProjectile : DecimationProjectile
|
public class HourHandProjectile : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 828 B |
@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles.DuneWyrm
|
namespace Decimation.Content.Projectiles.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
public class Sundial : DecimationProjectile
|
public class Sundial : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ namespace Decimation.Content.Projectiles.DuneWyrm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
if (Index == 1) target.AddBuff(BuffID.Slow, 300);
|
if (Index == 1) target.AddBuff(BuffID.Slow, 300);
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -3,7 +3,7 @@ using Decimation.Lib.Items;
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles.DuneWyrm
|
namespace Decimation.Content.Projectiles.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
public class Timekeeper : DecimationProjectile
|
public class Timekeeper : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
@ -1,12 +1,10 @@
|
|||||||
using System;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Terraria;
|
|
||||||
using Terraria.ModLoader;
|
|
||||||
using Terraria.ID;
|
|
||||||
using Decimation.Content.Buffs.Buffs;
|
|
||||||
using Decimation.Content.Buffs.Debuffs;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Accessory
|
||||||
{
|
{
|
||||||
internal class Ember : DecimationProjectile
|
internal class Ember : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -28,10 +26,10 @@ namespace Decimation.Content.Projectiles
|
|||||||
|
|
||||||
public override void AI()
|
public override void AI()
|
||||||
{
|
{
|
||||||
Dust.NewDust(projectile.position, projectile.width, projectile.height, 6, 0, 0, 0, new Microsoft.Xna.Framework.Color(240, 94, 27));
|
Dust.NewDust(projectile.position, projectile.width, projectile.height, 6, 0, 0, 0, new Color(240, 94, 27));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
target.AddBuff(ModContent.BuffType<Slimed>(), 300);
|
target.AddBuff(ModContent.BuffType<Slimed>(), 300);
|
||||||
}
|
}
|
||||||
48
Content/Projectiles/Item/Accessory/Trinity/TrinityBeam.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Projectiles.Item.Accessory.Trinity
|
||||||
|
{
|
||||||
|
public class TrinityBeam : DecimationProjectile
|
||||||
|
{
|
||||||
|
public override string Texture => "Terraria/Projectile_" + ProjectileID.LightBeam;
|
||||||
|
|
||||||
|
protected override void Init()
|
||||||
|
{
|
||||||
|
Projectile refProjectile = new Projectile();
|
||||||
|
refProjectile.CloneDefaults(ProjectileID.LightBeam);
|
||||||
|
|
||||||
|
projectile.width = refProjectile.width;
|
||||||
|
projectile.height = refProjectile.height;
|
||||||
|
projectile.hostile = false;
|
||||||
|
projectile.friendly = true;
|
||||||
|
projectile.light = .7f;
|
||||||
|
projectile.penetrate = -1;
|
||||||
|
projectile.tileCollide = false;
|
||||||
|
projectile.ignoreWater = true;
|
||||||
|
projectile.aiStyle = -1;
|
||||||
|
projectile.timeLeft = 180;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AI()
|
||||||
|
{
|
||||||
|
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
|
{
|
||||||
|
target.AddBuff(BuffID.Weak, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
target.AddBuff(BuffID.Weak, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
target.AddBuff(BuffID.Weak, 300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
public class GreenSlime : DecimationProjectile
|
public class GreenSlime : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class LightningSphere : DecimationProjectile
|
internal class LightningSphere : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@ -1,7 +1,7 @@
|
|||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class Pebble : DecimationProjectile
|
internal class Pebble : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -9,7 +9,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class Scarab : DecimationProjectile
|
internal class Scarab : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
@ -7,7 +7,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class SiphonArrow : DecimationProjectile
|
internal class SiphonArrow : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -24,7 +24,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
aiType = ProjectileID.WoodenArrowFriendly;
|
aiType = ProjectileID.WoodenArrowFriendly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
Heal(damage);
|
Heal(damage);
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
@ -5,7 +5,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
|
|
||||||
internal class Stinger : DecimationProjectile
|
internal class Stinger : DecimationProjectile
|
||||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||||
|
|
||||||
}
|
}
|
||||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit)
|
||||||
{
|
{
|
||||||
if (Main.rand.Next(2) == 0)
|
if (Main.rand.Next(2) == 0)
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class TitanicPikeProjectile : DecimationProjectile
|
internal class TitanicPikeProjectile : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -7,7 +7,7 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.Item.Weapon
|
||||||
{
|
{
|
||||||
internal class TitanicStyngerBolt : DecimationProjectile
|
internal class TitanicStyngerBolt : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 303 B |
@ -4,7 +4,7 @@ using Microsoft.Xna.Framework;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.NPC
|
||||||
{
|
{
|
||||||
internal class Bone : DecimationProjectile
|
internal class Bone : DecimationProjectile
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
@ -7,11 +7,11 @@ using Terraria;
|
|||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.NPC
|
||||||
{
|
{
|
||||||
public class MagmaBall : DecimationProjectile
|
public class MagmaBall : DecimationProjectile
|
||||||
{
|
{
|
||||||
public override string Texture => "Decimation/Content/Projectiles/MagmaBall";
|
public override string Texture => "Decimation/Content/Projectiles/NPC/MagmaBall";
|
||||||
|
|
||||||
private bool HitPlayer
|
private bool HitPlayer
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||||
{
|
{
|
||||||
var frameSize = new Vector2(projectile.width, projectile.height);
|
var frameSize = new Vector2(projectile.width, projectile.height);
|
||||||
string texturePath = "Content/Projectiles/MagmaBall";
|
string texturePath = "Content/Projectiles/NPC/MagmaBall";
|
||||||
if (AlternativeTexture) texturePath += "_Alternative";
|
if (AlternativeTexture) texturePath += "_Alternative";
|
||||||
var texture = mod.GetTexture(texturePath);
|
var texture = mod.GetTexture(texturePath);
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
@ -4,7 +4,7 @@ using Microsoft.Xna.Framework;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Projectiles
|
namespace Decimation.Content.Projectiles.NPC
|
||||||
{
|
{
|
||||||
internal class SkeletonBone : DecimationProjectile
|
internal class SkeletonBone : DecimationProjectile
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
set => projectile.localAI[0] = value;
|
set => projectile.localAI[0] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NPC TargetNPC => Main.npc[Target];
|
private Terraria.NPC TargetNPC => Main.npc[Target];
|
||||||
|
|
||||||
protected override void Init()
|
protected override void Init()
|
||||||
{
|
{
|
||||||
@ -158,7 +158,7 @@ namespace Decimation.Content.Projectiles
|
|||||||
|
|
||||||
for (int i = 0; i < Main.npc.Length; i++)
|
for (int i = 0; i < Main.npc.Length; i++)
|
||||||
{
|
{
|
||||||
NPC npc = Main.npc[i];
|
Terraria.NPC npc = Main.npc[i];
|
||||||
if (npc != null && npc.active && !npc.townNPC && npc.damage > 0 && projectile.CanHit(npc))
|
if (npc != null && npc.active && !npc.townNPC && npc.damage > 0 && projectile.CanHit(npc))
|
||||||
{
|
{
|
||||||
float distance = projectile.Distance(npc.Center);
|
float distance = projectile.Distance(npc.Center);
|
||||||
|
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
@ -1,6 +1,7 @@
|
|||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Content.Items.Amulets;
|
using Decimation.Content.Items.Amulets;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Boss.Arachnus;
|
||||||
using Decimation.Lib.Amulets.Synergy;
|
using Decimation.Lib.Amulets.Synergy;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
|||||||