Skip to content

Commit

Permalink
Debugging Soul Stone bonuses
Browse files Browse the repository at this point in the history
  • Loading branch information
Laugic committed Sep 18, 2019
1 parent 1abf980 commit e7e5599
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 63 deletions.
2 changes: 1 addition & 1 deletion Buffs/MoonLordSoulCooldownBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public override void SetDefaults()
{
DisplayName.SetDefault("Moon Lord Soul Cooldown");
Description.SetDefault("Your Moon Lord effect is on Cooldown.");
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
canBeCleared = false;
}
Expand Down
8 changes: 4 additions & 4 deletions Focuses/CapacityFocus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class CapacityFocus : Focus
new FocusEffect(p => NPC.downedSlimeKing, DownedKingSlimeEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedKingSlime", "If you take contact damage while falling, stomp on the enemy that deals the damage") { overrideColor = new Color(0x2B, 0x9D, 0xE9) }),
new FocusEffect(p => NPC.downedBoss1, DownedEyeOfCthulhuEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedEyeOfCthulhu", "Release Eyes when damaged") { overrideColor = new Color(0xB0, 0x3A, 0x2E) }),
new FocusEffect(p => LaugicalityWorld.downedDuneSharkron, DownedDuneSharkronEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedDuneSharkron", "Launch enemies affected by gravity into the air on contact") { overrideColor = new Color(0xF4, 0xE6, 0x92) }),
new FocusEffect(p => NPC.downedBoss2, DownedWorldEvilBossEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedWorldEvilBoss", "Blood Rage when damaged") { overrideColor = new Color(0x88, 0x4E, 0xA0)}),
new FocusEffect(p => NPC.downedBoss2, DownedWorldEvilBossEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedWorldEvilBoss", "Gain 'Blood Rage' when struck, increasing damage for a time") { overrideColor = new Color(0x88, 0x4E, 0xA0)}),
new FocusEffect(p => LaugicalityWorld.downedHypothema, DownedHypothemaEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedHypothema", "Frost Touch- Inflict Frostburn on enemies in a short radius around you") { overrideColor = new Color(0x98, 0xE1, 0xEA) }),
new FocusEffect(p => NPC.downedQueenBee, DownedQueenBeeEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedQueenBee", "Taking damage creates a ring of Thorns around you that damage and knock back enemies") { overrideColor = new Color(0xF3, 0x9C, 0x12)}),
new FocusEffect(p => LaugicalityWorld.downedRagnar, DownedRagnarEffect, new TooltipLine(Laugicality.Instance, "CapacityFocusDownedRagnar", "Reduced damage from lava. Increased Damage and Defense while On Fire") { overrideColor = new Color(0xED, 0x4B, 0x23) }),
Expand Down Expand Up @@ -90,8 +90,8 @@ private static void DownedRagnarEffect(LaugicalityPlayer laugicalityPlayer, bool
laugicalityPlayer.player.lavaRose = true;
if(laugicalityPlayer.player.onFire)
{
laugicalityPlayer.DamageBoost(.15f);
laugicalityPlayer.player.statDefense += 10;
laugicalityPlayer.DamageBoost(.25f);
laugicalityPlayer.player.statDefense += 15;
}
}

Expand All @@ -106,7 +106,7 @@ private static void DownedAnDioEffect(LaugicalityPlayer laugicalityPlayer, bool
if(Laugicality.zaWarudo > 0)
{
laugicalityPlayer.player.immune = true;
laugicalityPlayer.player.immuneTime = 2;
laugicalityPlayer.player.immuneTime = 60;
}
}

Expand Down
38 changes: 17 additions & 21 deletions Focuses/FerocityFocus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed class FerocityFocus : Focus
new FocusEffect(p => NPC.downedSlimeKing, DownedKingSlimeEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedKingSlime", "Attacks inflict 'Slimed'") { overrideColor = new Color(0x2B, 0x9D, 0xE9) }),
new FocusEffect(p => NPC.downedBoss1, DownedEyeOfCthulhuEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedEyeOfCthulhu", "+5% Damage at Night") { overrideColor = new Color(0xB0, 0x3A, 0x2E) }),
new FocusEffect(p => LaugicalityWorld.downedDuneSharkron, DownedDuneSharkronEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedDuneSharkron", "Increased damage the lower your life is") { overrideColor = new Color(0xF4, 0xE6, 0x92) }),
new FocusEffect(p => NPC.downedBoss2, DownedWorldEvilBossEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedWorldEvilBoss", "Gain 'Blood Rage' when struck, increasing damage for a time.") { overrideColor = new Color(0x88, 0x4E, 0xA0)}),
new FocusEffect(p => NPC.downedBoss2, DownedWorldEvilBossEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedWorldEvilBoss", "Gain 'Blood Rage' when struck, increasing damage for a time") { overrideColor = new Color(0x88, 0x4E, 0xA0)}),
new FocusEffect(p => LaugicalityWorld.downedHypothema, DownedHypothemaEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedHypothema", "Attacks inflict 'Frostburn'") { overrideColor = new Color(0x98, 0xE1, 0xEA) }),
new FocusEffect(p => NPC.downedQueenBee, DownedQueenBeeEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedQueenBee", "Attacks inflict 'Poison', Thorns effect") { overrideColor = new Color(0xF3, 0x9C, 0x12)}),
new FocusEffect(p => LaugicalityWorld.downedRagnar, DownedRagnarEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedRagnar", "Increased damage for a time after submerging in Lava") { overrideColor = new Color(0xED, 0x4B, 0x23) }),
Expand All @@ -29,8 +29,8 @@ public sealed class FerocityFocus : Focus
new FocusEffect(p => NPC.downedPlantBoss, DownedPlanteraEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedPlantera", "Attacks inflict 'Jungle Plague'") { overrideColor = new Color(0x81, 0xD8, 0x79) }),
new FocusEffect(p => NPC.downedGolemBoss, DownedGolemEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedGolem", "The longer you stand still without moving while a boss is alive, the higher your damage.") { overrideColor = new Color(0xCC, 0x88, 0x37) }),
new FocusEffect(p => NPC.downedFishron, DownedDukeFishronEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedDukeFishron", "+10% Damage when in liquid") { overrideColor = new Color(0x37, 0xC4, 0xCC) }),
new FocusEffect(p => LaugicalityWorld.downedEtheria || LaugicalityWorld.downedTrueEtheria, DownedEtheriaEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedEtheria", "'+20% Damage in the Etherial") { overrideColor = new Color(0x85, 0xCB, 0xF7) }),
new FocusEffect(p => NPC.downedMoonlord, DownedMoonLordEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedMoonLord", "Your Ability now makes you deal 100% more damage and makes you take 200% more damage per stack") { overrideColor = new Color(0x37, 0xCC, 0x8B) }),
new FocusEffect(p => LaugicalityWorld.downedEtheria || LaugicalityWorld.downedTrueEtheria, DownedEtheriaEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedEtheria", "+20% Damage in the Etherial") { overrideColor = new Color(0x85, 0xCB, 0xF7) }),
new FocusEffect(p => NPC.downedMoonlord, DownedMoonLordEffect, new TooltipLine(Laugicality.Instance, "FerocityFocusDownedMoonLord", "Pressing the Ability key now makes you deal 100% more damage and makes you take 200% more damage per stack") { overrideColor = new Color(0x37, 0xCC, 0x8B) }),
}, new FocusEffect[]
{
new FocusEffect(p => LaugicalityWorld.GetCurseCount() >= 1, CurseEffect1, new TooltipLine(Laugicality.Instance, "FerocityFocusCurse1", "-5% Damage") { overrideColor = Color.Red }),
Expand All @@ -50,12 +50,12 @@ private static void DownedKingSlimeEffect(LaugicalityPlayer laugicalityPlayer, b
private static void DownedEyeOfCthulhuEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (!Main.dayTime)
DamageBoost(laugicalityPlayer, .05f);
laugicalityPlayer.DamageBoost(.05f);
}

private static void DownedDuneSharkronEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
DamageBoost(laugicalityPlayer, .1f * ((laugicalityPlayer.player.statLifeMax2 - laugicalityPlayer.player.statLife) / laugicalityPlayer.player.statLifeMax2));
laugicalityPlayer.DamageBoost(.2f * (1 - ((float)laugicalityPlayer.player.statLife / (float)laugicalityPlayer.player.statLifeMax2)));
}

private static void DownedWorldEvilBossEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -77,7 +77,7 @@ private static void DownedQueenBeeEffect(LaugicalityPlayer laugicalityPlayer, bo
private static void DownedRagnarEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (laugicalityPlayer.player.lavaWet)
laugicalityPlayer.player.AddBuff(Laugicality.Instance.BuffType<LavaRegen>(), 15 * 60);
laugicalityPlayer.player.AddBuff(Laugicality.Instance.BuffType<LavaDamageBuff>(), 15 * 60);
}

private static void DownedSkeletronEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -88,7 +88,7 @@ private static void DownedSkeletronEffect(LaugicalityPlayer laugicalityPlayer, b
private static void DownedAnDioEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if(Laugicality.zaWarudo > 0)
DamageBoost(laugicalityPlayer, .15f);
laugicalityPlayer.DamageBoost(.15f);
}

private static void DownedWallOfFleshEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -109,7 +109,7 @@ private static void DownedDestroyerEffect(LaugicalityPlayer laugicalityPlayer, b

private static void DownedSkeletronPrimeEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
DamageBoost(laugicalityPlayer, (laugicalityPlayer.GetGlobalDamage() - 1) / 2);
laugicalityPlayer.DamageBoost((laugicalityPlayer.GetGlobalDamage() - 1) / 2);
}

private static void DownedAnnihilatorEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -125,12 +125,12 @@ private static void DownedAnnihilatorEffect(LaugicalityPlayer laugicalityPlayer,
{
if (NPC.downedMoonlord)
{
DamageBoost(laugicalityPlayer, 1f * laugicalityPlayer.AbilityCount);
laugicalityPlayer.DamageBoost(1f * laugicalityPlayer.AbilityCount);
laugicalityPlayer.player.endurance -= 2f * laugicalityPlayer.AbilityCount;
}
else
{
DamageBoost(laugicalityPlayer, .25f * laugicalityPlayer.AbilityCount);
laugicalityPlayer.DamageBoost(.25f * laugicalityPlayer.AbilityCount);
laugicalityPlayer.player.endurance -= .8f * laugicalityPlayer.AbilityCount;
}
}
Expand All @@ -139,7 +139,7 @@ private static void DownedAnnihilatorEffect(LaugicalityPlayer laugicalityPlayer,
private static void DownedSlybertronEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (laugicalityPlayer.player.potionDelay > 0)
DamageBoost(laugicalityPlayer, .1f);
laugicalityPlayer.DamageBoost(.1f);
}

private static void DownedSteamTrainEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand Down Expand Up @@ -179,26 +179,27 @@ private static void DownedGolemEffect(LaugicalityPlayer laugicalityPlayer, bool
private static void DownedDukeFishronEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (laugicalityPlayer.player.wet || laugicalityPlayer.player.honeyWet || laugicalityPlayer.player.lavaWet)
DamageBoost(laugicalityPlayer, .1f);
laugicalityPlayer.DamageBoost(.1f);
}

private static void DownedEtheriaEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (LaugicalityWorld.downedEtheria || laugicalityPlayer.Etherable > 0)
DamageBoost(laugicalityPlayer, .2f);
laugicalityPlayer.DamageBoost(.2f);
}

private static void DownedMoonLordEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
//Yeet
if (!LaugicalityWorld.downedAnnihilator)
DownedAnnihilatorEffect(laugicalityPlayer, hideAccessory);
}



//Curses
private static void CurseEffect1(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
DamageBoost(laugicalityPlayer, -.05f);
laugicalityPlayer.DamageBoost(-.05f);
}

private static void CurseEffect2(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -212,19 +213,14 @@ private static void CurseEffect2(LaugicalityPlayer laugicalityPlayer, bool hideA
private static void CurseEffect3(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if(laugicalityPlayer.player.statLife > laugicalityPlayer.player.statLifeMax2 / 2)
DamageBoost(laugicalityPlayer, -.2f);
laugicalityPlayer.DamageBoost(-.2f);
}

private static void CurseEffect4(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
laugicalityPlayer.NoDebuffDamage = true;
}

private static void DamageBoost(LaugicalityPlayer laugicalityPlayer, float Boost)
{
laugicalityPlayer.player.allDamage += Boost;
}

private static void CritBoost(LaugicalityPlayer laugicalityPlayer, int Boost)
{
laugicalityPlayer.player.meleeCrit += Boost;
Expand Down
21 changes: 19 additions & 2 deletions Focuses/MobilityFocus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Laugicality.Focuses
Expand Down Expand Up @@ -30,7 +31,7 @@ public sealed class MobilityFocus : Focus
new FocusEffect(p => NPC.downedGolemBoss, DownedGolemEffect, new TooltipLine(Laugicality.Instance, "MobilityFocusDownedGolem", "When standing still, charge up energy. Moving releases it in a burst of speed.") { overrideColor = new Color(0xCC, 0x88, 0x37) }),
new FocusEffect(p => NPC.downedFishron, DownedDukeFishronEffect, new TooltipLine(Laugicality.Instance, "MobilityFocusDownedDukeFishron", "Free movement in liquids. Greatly increased Mobility while in liquids.") { overrideColor = new Color(0x37, 0xC4, 0xCC) }),
new FocusEffect(p => LaugicalityWorld.downedEtheria || LaugicalityWorld.downedTrueEtheria, DownedEtheriaEffect, new TooltipLine(Laugicality.Instance, "MobilityFocusDownedEtheria", "+20% Max Run Speed and Movement Speed while in the Etherial") { overrideColor = new Color(0x85, 0xCB, 0xF7) }),
new FocusEffect(p => NPC.downedMoonlord, DownedMoonLordEffect, new TooltipLine(Laugicality.Instance, "MobilityFocusDownedMoonLord", "'+50% Movement speed, +10% Max Run Speed. Chance to dodge attacks based on how fast you are moving") { overrideColor = new Color(0x37, 0xCC, 0x8B) }),
new FocusEffect(p => NPC.downedMoonlord, DownedMoonLordEffect, new TooltipLine(Laugicality.Instance, "MobilityFocusDownedMoonLord", "+50% Movement speed, +10% Max Run Speed. Chance to dodge attacks based on how fast you are moving") { overrideColor = new Color(0x37, 0xCC, 0x8B) }),
}, new FocusEffect[]
{
new FocusEffect(p => LaugicalityWorld.GetCurseCount() >= 1, CurseEffect1, new TooltipLine(Laugicality.Instance, "MobilityFocusCurse1", "-5% Movement Speed & Max Run Speed") { overrideColor = Color.Green }),
Expand All @@ -49,8 +50,12 @@ private static void DownedKingSlimeEffect(LaugicalityPlayer laugicalityPlayer, b

private static void DownedEyeOfCthulhuEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (laugicalityPlayer.player.statLife < laugicalityPlayer.player.statLifeMax2 / 2)
if (laugicalityPlayer.player.statLife < laugicalityPlayer.player.statLifeMax2 / 2 + 1)
{
laugicalityPlayer.player.moveSpeed += .25f;
laugicalityPlayer.player.maxRunSpeed += .25f;
laugicalityPlayer.player.accRunSpeed += .25f;
}
}

private static void DownedDuneSharkronEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -62,17 +67,24 @@ private static void DownedWorldEvilBossEffect(LaugicalityPlayer laugicalityPlaye
{
laugicalityPlayer.player.moveSpeed += .1f;
laugicalityPlayer.player.maxRunSpeed *= 1.1f;
laugicalityPlayer.player.accRunSpeed *= 1.1f;
}

private static void DownedHypothemaEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
laugicalityPlayer.player.resistCold = true;
laugicalityPlayer.player.buffImmune[BuffID.Frostburn] = true;
laugicalityPlayer.player.buffImmune[BuffID.Frozen] = true;
laugicalityPlayer.player.buffImmune[BuffID.Chilled] = true;
}

private static void DownedQueenBeeEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
if (laugicalityPlayer.player.velocity.Y == 0)
{
laugicalityPlayer.player.maxRunSpeed *= 1.2f;
laugicalityPlayer.player.accRunSpeed *= 1.2f;
}
}

private static void DownedRagnarEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand All @@ -81,6 +93,7 @@ private static void DownedRagnarEffect(LaugicalityPlayer laugicalityPlayer, bool
{
laugicalityPlayer.player.moveSpeed += .15f;
laugicalityPlayer.player.maxRunSpeed *= 1.15f;
laugicalityPlayer.player.accRunSpeed *= 1.15f;
}
}

Expand All @@ -96,6 +109,7 @@ private static void DownedAnDioEffect(LaugicalityPlayer laugicalityPlayer, bool
{
laugicalityPlayer.player.moveSpeed += 1;
laugicalityPlayer.player.maxRunSpeed *= 1.5f;
laugicalityPlayer.player.accRunSpeed *= 1.5f;
}
}

Expand Down Expand Up @@ -198,13 +212,15 @@ private static void DownedEtheriaEffect(LaugicalityPlayer laugicalityPlayer, boo
{
laugicalityPlayer.player.moveSpeed += .2f;
laugicalityPlayer.player.maxRunSpeed *= 1.2f;
laugicalityPlayer.player.accRunSpeed *= 1.2f;
}
}

private static void DownedMoonLordEffect(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
{
laugicalityPlayer.player.moveSpeed += .5f;
laugicalityPlayer.player.maxRunSpeed *= 1.1f;
laugicalityPlayer.player.accRunSpeed *= 1.1f;
laugicalityPlayer.MoonLordEffect = true;
}

Expand All @@ -213,6 +229,7 @@ private static void CurseEffect1(LaugicalityPlayer laugicalityPlayer, bool hideA
{
laugicalityPlayer.player.moveSpeed *= .95f;
laugicalityPlayer.player.maxRunSpeed *= .95f;
laugicalityPlayer.player.accRunSpeed *= .95f;
}

private static void CurseEffect2(LaugicalityPlayer laugicalityPlayer, bool hideAccessory)
Expand Down
Loading

0 comments on commit e7e5599

Please sign in to comment.