Commit of decompiled and "updated" code.
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 629 B |
@@ -0,0 +1,33 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class ShatteredMoonsBlessing : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shattered Moon's Blessing");
|
||||
Description.SetDefault(" - Recovering HP rapidly!\n - Can't use items");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||
{
|
||||
player.noItems = true;
|
||||
player.statLife += 2;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(2, true);
|
||||
}
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.HealingDust>());
|
||||
Main.dust[dust].scale = 2f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 967 B |
@@ -0,0 +1,27 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class ShatteredMoonsCurse : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shattered Moon's Curse");
|
||||
Description.SetDefault("Unable to receive the Shattered Moon's Blessing!");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.CurseDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 899 B |
@@ -0,0 +1,25 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class ShatteredMoonsGrace : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shattered Moon's Grace");
|
||||
Description.SetDefault(" - Falling slowly!");
|
||||
Main.debuff[Type] = false;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.slowFall = true;
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.CrystalDust2>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1001 B |
@@ -0,0 +1,28 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class ShatteredMoonsRejuvenation : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shattered Moon's Rejuvenation");
|
||||
Description.SetDefault(" - Recovering 100 HP over 10 seconds");
|
||||
Main.debuff[Type] = false;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.lifeRegen = 18;
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.HealingDust>());
|
||||
Main.dust[dust].scale = 2f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 894 B |
@@ -0,0 +1,34 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class SpectralMoonlight : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Moonlight");
|
||||
Description.SetDefault(" - Recovering HP rapidly!\n - Immune to all damage\n - Can't use items");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (!player.HasBuff(ModContent.BuffType<ShatteredMoonsCurse>()) && player.statLife < player.statLifeMax2)
|
||||
{
|
||||
player.noItems = true;
|
||||
player.statLife += 2;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(2, true);
|
||||
}
|
||||
player.immune = true;
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.RainbowHealingDust>());
|
||||
Main.dust[dust].scale = 2f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,27 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class SpectralMoonsCurse : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Moon's Curse");
|
||||
Description.SetDefault("Unable to receive Spectral Moonlight!");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.RainbowCurseDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,26 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class SpectralMoonsGrace : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Moon's Grace");
|
||||
Description.SetDefault(" - Falling slowly!\n - Immune to knockback");
|
||||
Main.debuff[Type] = false;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.slowFall = true;
|
||||
player.noKnockback = true;
|
||||
int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.CrystalDust>());
|
||||
Main.dust[num1].scale = 1f;
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,29 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Buffs.LunarBow;
|
||||
|
||||
public class SpectralMoonsRejuvenation : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Spectral Moon's Rejuvenation");
|
||||
Description.SetDefault(" - Recovering 150 HP over 10 seconds\n - Increased ranged crit rate");
|
||||
Main.debuff[Type] = false;
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.lifeRegen = 27;
|
||||
player.GetCritChance(DamageClass.Ranged) += 60;
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType<Dusts.RainbowHealingDust>());
|
||||
Main.dust[num1].scale = 2f;
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |