Commit of decompiled and "updated" code.
@@ -0,0 +1,39 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class BloodDrop : ModProjectile
|
||||
{
|
||||
private const float maxTicks = 45f;
|
||||
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 16;
|
||||
Projectile.height = 20;
|
||||
AIType = 1;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = 1;
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
|
||||
{
|
||||
targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8);
|
||||
}
|
||||
return projHitbox.Intersects(targetHitbox);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Main.rand.NextBool(3)&& Projectile.alpha <= 100)
|
||||
{
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>(), 0f, 0f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 244 B |
@@ -0,0 +1,108 @@
|
||||
using FabusMod.Buffs.ShimadaSword.Stacks;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DemonProjRMB : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 14;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 300;
|
||||
Projectile.height = 132;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 42;
|
||||
Projectile.alpha = 80;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 0;
|
||||
Projectile.velocity = Projectile.velocity * 0f;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (!(Utils.NextFloat(Main.rand) < 0.02f))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!player.HasBuff(ModContent.BuffType<SouleaterOne>()) && !player.HasBuff(ModContent.BuffType<SouleaterTwo>()) && !player.HasBuff(ModContent.BuffType<SouleaterThree>()) && !player.HasBuff(ModContent.BuffType<SouleaterFour>()) && !player.HasBuff(ModContent.BuffType<SouleaterFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SouleaterOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterOne>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterTwo>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterThree>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterFour>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterFive>());
|
||||
player.statLife += 75;
|
||||
player.statMana += 75;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(75, true);
|
||||
player.ManaEffect(75);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,88 @@
|
||||
using FabusMod.Buffs.ShimadaSword.Stacks;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DemonProjTwo : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 46;
|
||||
Projectile.height = 28;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
//Projectile.melee = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (!player.HasBuff(ModContent.BuffType<SouleaterOne>()) && !player.HasBuff(ModContent.BuffType<SouleaterTwo>()) && !player.HasBuff(ModContent.BuffType<SouleaterThree>()) && !player.HasBuff(ModContent.BuffType<SouleaterFour>()) && !player.HasBuff(ModContent.BuffType<SouleaterFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SouleaterOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterOne>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterTwo>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterThree>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterFour>());
|
||||
player.AddBuff(ModContent.BuffType<SouleaterFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<SouleaterFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<SouleaterFive>());
|
||||
player.statLife += 75;
|
||||
player.statMana += 75;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(75, true);
|
||||
player.ManaEffect(75);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 375 B |
@@ -0,0 +1,64 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DemonWave : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 50;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 13;
|
||||
Projectile.height = 13;
|
||||
Projectile.aiStyle = -1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 100;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.statMana++;
|
||||
player.ManaEffect(1);
|
||||
}
|
||||
}
|
||||
target.immune[Projectile.owner] = 0;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 127 B |
@@ -0,0 +1,118 @@
|
||||
using FabusMod.Buffs.ShimadaSword.Stacks;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DreamCatcherProjRMB : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 14;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 300;
|
||||
Projectile.height = 132;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 42;
|
||||
Projectile.alpha = 80;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 0;
|
||||
Projectile projectile = Projectile;
|
||||
Projectile.velocity = Projectile.velocity * 0f;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num2].scale = 1.9f;
|
||||
Main.dust[num2].velocity.Y -= 1.5f;
|
||||
Main.dust[num2].velocity.X = 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num3].scale = 1.9f;
|
||||
Main.dust[num3].velocity.Y -= 1.5f;
|
||||
Main.dust[num3].velocity.X = 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Utils.NextFloat(Main.rand) < 0.03f)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<DreamOne>()) && !player.HasBuff(ModContent.BuffType<DreamTwo>()) && !player.HasBuff(ModContent.BuffType<DreamThree>()) && !player.HasBuff(ModContent.BuffType<DreamFour>()) && !player.HasBuff(ModContent.BuffType<DreamFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<DreamOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<DreamOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DreamOne>());
|
||||
player.AddBuff(ModContent.BuffType<DreamTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<DreamTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DreamTwo>());
|
||||
player.AddBuff(ModContent.BuffType<DreamThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<DreamThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DreamThree>());
|
||||
player.AddBuff(ModContent.BuffType<DreamFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<DreamFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DreamFour>());
|
||||
player.AddBuff(ModContent.BuffType<DreamFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<DreamFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<DreamFive>());
|
||||
player.statLife += 85;
|
||||
player.statMana += 85;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(85, true);
|
||||
player.ManaEffect(85);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
target.AddBuff(72, 300, false);
|
||||
}
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DreamCatcherProjTwo : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
//Sets.Homing[Projectile.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 46;
|
||||
Projectile.height = 28;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
AdjustMagnitude(ref Projectile.velocity);
|
||||
Projectile.localAI[0] = 1f;
|
||||
}
|
||||
Vector2 move = Vector2.Zero;
|
||||
float distance = 400f;
|
||||
bool target = false;
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5)
|
||||
{
|
||||
Vector2 newMove = Main.npc[i].Center - Projectile.Center;
|
||||
float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y);
|
||||
if (distanceTo < distance)
|
||||
{
|
||||
move = newMove;
|
||||
distance = distanceTo;
|
||||
target = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target)
|
||||
{
|
||||
AdjustMagnitude(ref move);
|
||||
Projectile.velocity = (10f * Projectile.velocity + move) / 11f;
|
||||
AdjustMagnitude(ref Projectile.velocity);
|
||||
}
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust3].scale = 2f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust4].scale = 2f;
|
||||
Dust obj4 = Main.dust[dust4];
|
||||
obj4.velocity *= 0.1f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust5].scale = 2f;
|
||||
Dust obj5 = Main.dust[dust5];
|
||||
obj5.velocity *= 0.1f;
|
||||
Main.dust[dust5].noGravity = true;
|
||||
int dust6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust6].scale = 2f;
|
||||
Dust obj6 = Main.dust[dust6];
|
||||
obj6.velocity *= 0.1f;
|
||||
Main.dust[dust6].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Player player = Main.player[Projectile.owner];
|
||||
player.statLife += 20;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(20, true);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
}
|
||||
if (!player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamOne>()) && !player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamTwo>()) && !player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamThree>()) && !player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFour>()) && !player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamOne>());
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamTwo>());
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamThree>());
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFour>());
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<Buffs.ShimadaSword.Stacks.DreamFive>());
|
||||
player.AddBuff(ModContent.BuffType<Buffs.ShimadaSword.SpectralRage>(), 480, true);
|
||||
player.statLife += 85;
|
||||
player.statMana += 85;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(85, true);
|
||||
player.ManaEffect(85);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AdjustMagnitude(ref Vector2 vector)
|
||||
{
|
||||
float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y);
|
||||
if (magnitude > 6f)
|
||||
{
|
||||
vector *= 6f / magnitude;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 409 B |
@@ -0,0 +1,68 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class DreamCatcherWave : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 50;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 13;
|
||||
Projectile.height = 13;
|
||||
Projectile.aiStyle = -1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 6;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 100;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
int num6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj6 = Main.dust[num6];
|
||||
obj6.velocity *= 0f;
|
||||
Main.dust[num6].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.statMana++;
|
||||
player.ManaEffect(1);
|
||||
}
|
||||
}
|
||||
target.immune[Projectile.owner] = 0;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 127 B |
@@ -0,0 +1,107 @@
|
||||
using FabusMod.Buffs.ShimadaSword.Stacks;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class GoldenFuryProjRMB : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 14;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 300;
|
||||
Projectile.height = 132;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 42;
|
||||
Projectile.alpha = 80;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 0;
|
||||
Projectile.velocity = Projectile.velocity * 0f;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Utils.NextFloat(Main.rand) < 0.03f)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<EnrichmentOne>()) && !player.HasBuff(ModContent.BuffType<EnrichmentTwo>()) && !player.HasBuff(ModContent.BuffType<EnrichmentThree>()) && !player.HasBuff(ModContent.BuffType<EnrichmentFour>()) && !player.HasBuff(ModContent.BuffType<EnrichmentFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentOne>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentTwo>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentThree>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentFour>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentFive>());
|
||||
player.statLife += 75;
|
||||
player.statMana += 75;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(75, true);
|
||||
player.ManaEffect(75);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
target.AddBuff(72, 300, false);
|
||||
}
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,88 @@
|
||||
using FabusMod.Buffs.ShimadaSword.Stacks;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class GoldenFuryProjTwo : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 46;
|
||||
Projectile.height = 28;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
//Projectile.melee = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner != Main.myPlayer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (!player.HasBuff(ModContent.BuffType<EnrichmentOne>()) && !player.HasBuff(ModContent.BuffType<EnrichmentTwo>()) && !player.HasBuff(ModContent.BuffType<EnrichmentThree>()) && !player.HasBuff(ModContent.BuffType<EnrichmentFour>()) && !player.HasBuff(ModContent.BuffType<EnrichmentFive>()))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentOne>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentOne>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentOne>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentTwo>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentTwo>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentTwo>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentThree>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentThree>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentThree>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentFour>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentFour>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentFour>());
|
||||
player.AddBuff(ModContent.BuffType<EnrichmentFive>(), 960, true);
|
||||
}
|
||||
else if (player.HasBuff(ModContent.BuffType<EnrichmentFive>()))
|
||||
{
|
||||
player.ClearBuff(ModContent.BuffType<EnrichmentFive>());
|
||||
player.statLife += 75;
|
||||
player.statMana += 75;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(75, true);
|
||||
player.ManaEffect(75);
|
||||
SoundEngine.PlaySound(SoundID.Item3);
|
||||
SoundEngine.PlaySound(SoundID.Item4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 374 B |
@@ -0,0 +1,64 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class GoldenFuryWave : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 50;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 13;
|
||||
Projectile.height = 13;
|
||||
Projectile.aiStyle = -1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 6;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 100;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.statMana++;
|
||||
player.ManaEffect(1);
|
||||
}
|
||||
}
|
||||
target.immune[Projectile.owner] = 0;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 127 B |
@@ -0,0 +1,47 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class RainbowClump : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 16;
|
||||
Projectile.height = 20;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = false;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 335 B |
@@ -0,0 +1,36 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class ShimadaWave : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 13;
|
||||
Projectile.height = 13;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.5f)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 127 B |
@@ -0,0 +1,36 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Shimada;
|
||||
|
||||
public class ShimadaWaveNihon : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 13;
|
||||
Projectile.height = 13;
|
||||
Projectile.aiStyle = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.hostile = false;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.light = 0.5f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.extraUpdates = 2;
|
||||
AIType = 14;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.5f)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 127 B |