Added QoN
This commit is contained in:
1 parent
8334975ac1
commit
eb0ae38bbf
8 files changed
+169
No files matched your search
@@ -607,6 +607,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool BloomStoneRegen = false;
|
||||
public bool ChaosStone = false;
|
||||
public bool CryoStone = false;
|
||||
public bool voidField = false;
|
||||
#endregion
|
||||
|
||||
#region Armor Set
|
||||
@@ -1709,6 +1710,7 @@ namespace CalamityMod.CalPlayer
|
||||
BloomStoneRegen = false;
|
||||
ChaosStone = false;
|
||||
CryoStone = false;
|
||||
voidField = false;
|
||||
|
||||
daedalusReflect = false;
|
||||
daedalusSplit = false;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Back)]
|
||||
public class QuiverofNihility : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Quiver of Nihility");
|
||||
Tooltip.SetDefault("Summons a ring of four void fields to orbit you\n"+"Arrows that pass through these fields gain a boost in speed");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 42;
|
||||
Item.height = 36;
|
||||
Item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
Item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
Item.Calamity().donorItem = true;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override bool CanEquipAccessory(Player player, int slot, bool modded)
|
||||
{
|
||||
if (player.Calamity().voidField)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.voidField = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<VoidFieldGenerator>()] < 4)
|
||||
{
|
||||
for (int v = 0; v < 4; v++)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ModContent.ProjectileType<VoidFieldGenerator>(), 0, 0f, Main.myPlayer, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("QuiversGroup").
|
||||
AddIngredient<DarkPlasma>(3).
|
||||
AddIngredient<GalacticaSingularity>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -81,6 +81,9 @@ namespace CalamityMod.Projectiles
|
||||
/// </summary>
|
||||
public bool DealsDefenseDamage = false;
|
||||
|
||||
// Nihility Quiver
|
||||
public bool nihilicArrow = false;
|
||||
|
||||
// Rogue Stuff
|
||||
public bool stealthStrike = false;
|
||||
public int stealthStrikeHitCount = 0;
|
||||
@@ -2153,6 +2156,12 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.voidField && nihilicArrow)
|
||||
{
|
||||
if (projectile.velocity.Length() < 26f)
|
||||
projectile.velocity *= 1.35f;
|
||||
}
|
||||
|
||||
if (player.meleeEnchant > 0 && !projectile.noEnchantments)
|
||||
{
|
||||
switch (player.meleeEnchant)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class VoidFieldGenerator : ModProjectile
|
||||
{
|
||||
public bool start = true;
|
||||
int auratimer = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Void Field Generator");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 50;
|
||||
Projectile.height = 50;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (!modPlayer.voidField)
|
||||
{
|
||||
Projectile.active = false;
|
||||
return;
|
||||
}
|
||||
if (player.dead)
|
||||
modPlayer.voidField = false;
|
||||
if (modPlayer.voidField)
|
||||
Projectile.timeLeft = 2;
|
||||
if (start)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.position);
|
||||
start = false;
|
||||
}
|
||||
|
||||
Vector2 vector = player.Center - Projectile.Center;
|
||||
|
||||
Projectile.Center = player.Center + new Vector2(300, 0).RotatedBy(Projectile.ai[1] + Projectile.ai[0] * MathHelper.PiOver2);
|
||||
|
||||
Projectile.ai[1] += 0.01f;
|
||||
if (Projectile.ai[1] >= 360D)
|
||||
Projectile.ai[1] = 0;
|
||||
|
||||
Projectile.velocity.X = (vector.X > 0f) ? -0.000001f : 0f;
|
||||
|
||||
for (int k = 0; k < Main.projectile.Length; k++)
|
||||
{
|
||||
var proj = Main.projectile[k];
|
||||
if (proj.owner == Projectile.owner && proj.arrow && !proj.Calamity().nihilicArrow && proj.friendly && Vector2.Distance(proj.Center, Projectile.Center) < 80)
|
||||
{
|
||||
Main.projectile[k].damage = (int)(proj.damage * 1.5f);
|
||||
Main.projectile[k].Calamity().nihilicArrow = true;
|
||||
SoundEngine.PlaySound(SoundID.Item103, Projectile.Center);
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
Vector2 dustpos = Vector2.UnitX * (float)-(float)proj.width / 2f;
|
||||
dustpos += -Vector2.UnitY.RotatedBy((double)((float)i * 3.14159274f / 6f), default) * new Vector2(8f, 16f);
|
||||
dustpos = dustpos.RotatedBy((double)(proj.rotation - 1.57079637f), default);
|
||||
int dust = Dust.NewDust(proj.Center, 0, 0, 27, 0f, 0f, 100, Color.HotPink, 1f);
|
||||
Main.dust[dust].scale = 1.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].position = proj.Center + dustpos;
|
||||
Main.dust[dust].velocity = proj.velocity * 0.1f;
|
||||
Main.dust[dust].velocity = Vector2.Normalize(proj.Center - proj.velocity * 3f - Main.dust[dust].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auratimer++;
|
||||
BloomRing aura = new BloomRing(Projectile.Center, Vector2.Zero, Color.Purple, 1f, 5);
|
||||
FusableParticleManager.GetParticleSetByType<StreamGougeParticleSet>()?.SpawnParticle(new Vector2(Projectile.Center.X + Main.rand.Next(-10,11), Projectile.Center.Y + Main.rand.Next(-10,11)), 500);
|
||||
GeneralParticleHandler.SpawnParticle(aura);
|
||||
aura.Position = Projectile.Center;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 374 B |
Reference in new issue
Block a user