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
+88
View File
@@ -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);
}
}
}
}