Profaned Soul is now one buff (as originally intended)
This commit is contained in:
1 parent
01b32e488d
commit
5d389f664b
8 files changed
+33
-85
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -97,6 +98,20 @@ namespace CalamityMod.Buffs
|
||||
tip += ". All damage taken increased by 20%";
|
||||
else if (type == BuffID.Warmth)
|
||||
tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs";
|
||||
else if (type == ModContent.BuffType<ProfanedBabs>())
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
bool offense = player.Calamity().gOffense;
|
||||
bool defense = player.Calamity().gDefense;
|
||||
if (offense && defense)
|
||||
{
|
||||
tip = "The Profaned Babs will defend and fight for you!";
|
||||
}
|
||||
else if (offense || defense)
|
||||
{
|
||||
tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight and heal for you!" : "defend and heal you!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class GuardianDefense : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Defensive Guardian");
|
||||
Description.SetDefault("The defender will protect you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] > 0)
|
||||
{
|
||||
modPlayer.gDefense = true;
|
||||
}
|
||||
if (!modPlayer.gDefense)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 684 B |
@@ -1,36 +0,0 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class GuardianOffense : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Offensive Guardian");
|
||||
Description.SetDefault("The attacker will fight for you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0)
|
||||
{
|
||||
modPlayer.gOffense = true;
|
||||
}
|
||||
if (!modPlayer.gOffense)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 684 B |
@@ -5,12 +5,12 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class GuardianHealer : ModBuff
|
||||
public class ProfanedBabs : ModBuff //Buff name is reference to how I refer to the guardians as my babs ~Amber
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Healer Guardian");
|
||||
Description.SetDefault("The guardian will heal you");
|
||||
DisplayName.SetDefault("The Profaned Soul");
|
||||
Description.SetDefault("The healer will heal your wounds");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
@@ -18,10 +18,6 @@ namespace CalamityMod.Buffs.Summon
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] > 0)
|
||||
{
|
||||
modPlayer.gHealer = true;
|
||||
}
|
||||
if (!modPlayer.gHealer)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
@@ -31,6 +27,17 @@ namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
|
||||
bool defense = modPlayer.gDefense;
|
||||
bool offense = modPlayer.gOffense;
|
||||
if (offense || defense)
|
||||
{
|
||||
DisplayName.SetDefault("Profaned " + (offense ? "Offensive " : "Defensive ") + "Duo");
|
||||
}
|
||||
else if (offense && defense)
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Guardian Trio");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 684 B |
@@ -2644,8 +2644,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<GuardianHealer>()) == -1)
|
||||
player.AddBuff(ModContent.BuffType<GuardianHealer>(), 3600, true);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<ProfanedBabs>()) == -1)
|
||||
player.AddBuff(ModContent.BuffType<ProfanedBabs>(), 3600, true);
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
|
||||
@@ -2656,8 +2656,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (player.maxMinions >= 10)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<GuardianDefense>()) == -1)
|
||||
player.AddBuff(ModContent.BuffType<GuardianDefense>(), 3600, true);
|
||||
player.Calamity().gDefense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
@@ -2665,8 +2664,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<GuardianOffense>()) == -1)
|
||||
player.AddBuff(ModContent.BuffType<GuardianOffense>(), 3600, true);
|
||||
player.Calamity().gOffense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
Reference in new issue
Block a user