Commit of decompiled and "updated" code.

This commit is contained in:
Big Duckie
2022-07-03 14:13:26 -06:00
parent 3d34e53842
commit e1441e74a5
731 changed files with 18423 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class DemonArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
Projectile.penetrate = 1;
AIType = 1;
Projectile.aiStyle = 1;
}
public override void AI()
{
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
{
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
Dust obj = Main.dust[dust];
obj.velocity /= 2f;
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 5; i++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
}
SoundEngine.PlaySound(SoundID.Item2, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

+42
View File
@@ -0,0 +1,42 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class GoldenSpiritArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
Projectile.penetrate = 1;
AIType = 1;
Projectile.aiStyle = 1;
}
public override void AI()
{
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
{
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
Dust obj = Main.dust[dust];
obj.velocity /= 2f;
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 5; i++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
}
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

+55
View File
@@ -0,0 +1,55 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class LegendaryArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 18;
Projectile.height = 34;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
AIType = 1;
Projectile.aiStyle = 1;
}
public override void AI()
{
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
{
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>(), 0f, 0f, 0, default, 1f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>(), 0f, 0f, 0, default, 1f);
Dust obj = Main.dust[dust];
obj.velocity /= 2f;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (Main.rand.NextBool(1))
{
target.AddBuff(69, 900, false);
target.AddBuff(70, 900, false);
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 5; i++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
}
for (int j = 0; j < 5; j++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
}
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

+29
View File
@@ -0,0 +1,29 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class PiercingArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 14;
Projectile.height = 40;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
Projectile.penetrate = -1;
AIType = 1;
Projectile.aiStyle = 1;
}
public override void Kill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

+80
View File
@@ -0,0 +1,80 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class RainbowArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
AIType = 1;
Projectile.aiStyle = 1;
}
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;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (Main.rand.NextBool(1))
{
target.AddBuff(69, 900, false);
target.AddBuff(70, 900, false);
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 5; i++)
{
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;
}
}
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

+42
View File
@@ -0,0 +1,42 @@
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace FabusMod.Projectiles.Arrows;
public class StormArrow : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 1000;
Projectile.light = 1f;
Projectile.penetrate = 1;
AIType = 1;
Projectile.aiStyle = 1;
}
public override void AI()
{
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
{
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
Dust obj = Main.dust[dust];
obj.velocity /= 2f;
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 5; i++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
}
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B