13 files changed
+155
-16
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class FulfilledContract : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 673 B |
@@ -981,6 +981,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool fleshTotemVisual = false;
|
||||
public int fleshTotemManaStorage = 0;
|
||||
public bool bloodPact = false;
|
||||
public bool CanBeCritByThePact = false;
|
||||
public bool bloodflareCore = false;
|
||||
public int bloodflareCoreRemainingHealOverTime = 0;
|
||||
|
||||
@@ -2122,6 +2123,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (crimEffigy)
|
||||
Player.statLifeMax2 = (int)(Player.statLifeMax2 * (1f - CrimsonEffigy.MaxHealthLossPercent));
|
||||
|
||||
if (CanBeCritByThePact)
|
||||
Player.statLifeMax2 = (int)(Player.statLifeMax2 * ThePact.MaxLifeMult);
|
||||
|
||||
ResetRogueStealth();
|
||||
|
||||
calamityBonusLuck = 0f;
|
||||
@@ -2430,6 +2434,7 @@ namespace CalamityMod.CalPlayer
|
||||
fleshTotemVisual = false;
|
||||
fleshTotemMinion = false;
|
||||
bloodPact = false;
|
||||
CanBeCritByThePact = false;
|
||||
bloodflareCore = false;
|
||||
chaliceOfTheBloodGod = false;
|
||||
chaliceHeartStyle = false;
|
||||
|
||||
@@ -7,7 +7,6 @@ using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Events;
|
||||
@@ -24,7 +23,6 @@ using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Sulphurous;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Armor.Victide;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Tools;
|
||||
@@ -42,7 +40,6 @@ using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
@@ -146,7 +143,7 @@ namespace CalamityMod.CalPlayer
|
||||
NetMessage.SendData(MessageID.Dodge, -1, -1, null, Player.whoAmI, 1f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pre Kill
|
||||
@@ -393,7 +390,7 @@ namespace CalamityMod.CalPlayer
|
||||
var npc = Main.npc[damageSource.SourceNPCIndex];
|
||||
if (npc.ai[3] < 2) //Divinity Devourer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.DivinityDevourer"+Main.rand.Next(1,4)).ToNetworkText(Player.name));
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.DivinityDevourer" + Main.rand.Next(1, 4)).ToNetworkText(Player.name));
|
||||
}
|
||||
else if (npc.ai[3] >= 3)
|
||||
{
|
||||
@@ -427,9 +424,13 @@ namespace CalamityMod.CalPlayer
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (Player.Calamity().yharimsGift)
|
||||
target.AddBuff(ModContent.BuffType<AuricRebuke>(),120);
|
||||
target.AddBuff(ModContent.BuffType<AuricRebuke>(), 120);
|
||||
|
||||
int debuffSpreadProj = ModContent.ProjectileType<DebuffSpreadEffect>();
|
||||
|
||||
if (Player.HasBuff<FulfilledContract>())
|
||||
target.AddBuff(ModContent.BuffType<Laceration>(), ThePact.DebuffInflictionDuration);
|
||||
|
||||
int debuffSpreadProj = ModContent.ProjectileType<DebuffSpreadEffect>();
|
||||
if ((Player.Calamity().abaddon || Player.Calamity().apollyon) && (target.Calamity().abaddonEffected || target.Calamity().apollyonEffected) && hit.Crit && abaddonCooldown == 0 && Player.ownedProjectileCounts[debuffSpreadProj] == 0)
|
||||
{
|
||||
int maxTargetNum = target.Calamity().apollyonEffected ? 10 : 6;
|
||||
@@ -1120,7 +1121,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (sulphurSet)
|
||||
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (proj.hostile && hurtInfo.Damage > 0)
|
||||
@@ -1405,7 +1406,8 @@ namespace CalamityMod.CalPlayer
|
||||
bool sufficientDamageForDodging = actualDamageTaken >= dodgeDamageGateValue;
|
||||
|
||||
//This is in a method here so the logic below can call it in multiple places
|
||||
void GenericDodgeEffects() {
|
||||
void GenericDodgeEffects()
|
||||
{
|
||||
double maxCooldownDurationDamagePercent = 0.5;
|
||||
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
|
||||
|
||||
@@ -1465,7 +1467,7 @@ namespace CalamityMod.CalPlayer
|
||||
storedShadowDodge = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (!Player.HasCooldown(GlobalDodge.ID) && sufficientDamageForDodging && DodgeEffects.Count > 0)
|
||||
{
|
||||
GenericDodgeEffects();
|
||||
@@ -1488,6 +1490,14 @@ namespace CalamityMod.CalPlayer
|
||||
#region Modify Hurt
|
||||
public override void ModifyHurt(ref Player.HurtModifiers modifiers)
|
||||
{
|
||||
if (CanBeCritByThePact && Main.rand.NextFloat() < ThePact.ChanceToBeCrit)
|
||||
{
|
||||
modifiers.SourceDamage *= ThePact.CritDmgTaken;
|
||||
Player.AddBuff(ModContent.BuffType<FulfilledContract>(), ThePact.BoostDuration);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/BloodPactCrit"));
|
||||
}
|
||||
|
||||
|
||||
// Calcium Potion knockback reduction
|
||||
if (calcium)
|
||||
modifiers.Knockback *= (1f - CalciumPotion.KnockbackResistance);
|
||||
@@ -1498,7 +1508,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Custom Hurt Sounds
|
||||
if (hurtSoundTimer == 0)
|
||||
{
|
||||
if(Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null)
|
||||
if (Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null)
|
||||
{
|
||||
var hurtSound = Player.Transformation().currentTransformation.HurtSound(Player).Value;
|
||||
modifiers.DisableSound();
|
||||
@@ -2224,7 +2234,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down");
|
||||
if (fleshTotemManaStorage >= 100 && fleshTotemVisual)
|
||||
SoundEngine.PlaySound(Counter with { Volume = 0.75f}, Player.Center);
|
||||
SoundEngine.PlaySound(Counter with { Volume = 0.75f }, Player.Center);
|
||||
int lostSoulAmount = (fleshTotemManaStorage / 2) / 25;
|
||||
int lostSoulDamage = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(FleshTotem.lostSoulDamage);
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<FleshTotemMinion>()] != 0)
|
||||
@@ -2370,7 +2380,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage));
|
||||
|
||||
Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15 * (rampartOfDeities && n % 2 == 0 ? 0.75f: 1.25f)).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType<AstralStar>(), deificProjDamage, 4f, Player.whoAmI)];
|
||||
Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0, -15 * (rampartOfDeities && n % 2 == 0 ? 0.75f : 1.25f)).RotatedBy(MathHelper.TwoPi / projAmount * n), ModContent.ProjectileType<AstralStar>(), deificProjDamage, 4f, Player.whoAmI)];
|
||||
if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
onHitProj.DamageType = DamageClass.Generic;
|
||||
|
||||
@@ -707,6 +707,9 @@ namespace CalamityMod.CalPlayer
|
||||
regen *= LivingDew.NaturalRegenPower;
|
||||
else if (honeyDew)
|
||||
regen *= HoneyDew.NaturalRegenPower;
|
||||
|
||||
if (Player.HasBuff<FulfilledContract>())
|
||||
regen *= ThePact.NaturalRegenBoost;
|
||||
// The Camper counteracts the regen loss while moving horizontally
|
||||
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod
|
||||
|
||||
// Vanilla
|
||||
public static readonly Condition DownedBetsy = Create("Drops.DownedBetsy", () => DownedBossSystem.downedBetsy);
|
||||
|
||||
public static readonly Condition DownedDreadnautilus = Create("Drops.DownedDreadnautilus", () => DownedBossSystem.downedDreadnautilus);
|
||||
//
|
||||
// Calamity Biome conditions
|
||||
//
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class ThePact : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static float MaxLifeMult => 2;
|
||||
public static float ChanceToBeCrit => 0.25f;
|
||||
public static float CritDmgTaken => 2.25f;
|
||||
public static int BoostDuration => 900;
|
||||
public static int DebuffInflictionDuration => 60;
|
||||
public static float NaturalRegenBoost => 1.75f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeMult, ChanceToBeCrit.ToPercent(), CritDmgTaken);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [ModContent.BuffType<Laceration>()];
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 46;
|
||||
Item.height = 64;
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().CanBeCritByThePact = true;
|
||||
|
||||
if (player.HasBuff<FulfilledContract>() && player.miscCounter % 3 == 0 && player.potionDelay > 0)
|
||||
{
|
||||
player.potionDelay -= 1;
|
||||
if (player.potionDelay < 0)
|
||||
player.potionDelay = 0;
|
||||
if (player.HasBuff(BuffID.PotionSickness))
|
||||
{
|
||||
for (var i = 0; i < player.buffType.Length; i++)
|
||||
{
|
||||
if (player.buffType[i] == BuffID.PotionSickness)
|
||||
{
|
||||
player.buffTime[i] = player.potionDelay;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 775 B |
@@ -918,6 +918,17 @@ Encased: {
|
||||
Description: Increased defense by {0} and damage reduction by {1}%, but...
|
||||
}
|
||||
|
||||
FulfilledContract: {
|
||||
DisplayName: Fulfilled Contract
|
||||
Description: A reward earned through blood and tears
|
||||
ItemTooltipPlayer:
|
||||
'''
|
||||
25% reduced Healing Potion cooldown
|
||||
75% increased natural regeneration power
|
||||
All attacks inflict Laceration
|
||||
'''
|
||||
}
|
||||
|
||||
GraxBoost: {
|
||||
DisplayName: Grax Boost
|
||||
Description: Your defenses and muscles are strong
|
||||
|
||||
@@ -38,6 +38,7 @@ Drops: {
|
||||
DownedClamHM: After defeating the Giant Clam in Hardmode
|
||||
DownedGSS: After defeating the Great Sand Shark
|
||||
DownedBetsy: After defeating Betsy
|
||||
DownedDreadnautilus: After defeating Dreadnautilus
|
||||
DownedT1AR: After defeating the first tier of Acid Rain
|
||||
DownedT2AR: After defeating the second tier of Acid Rain
|
||||
FirstKill: Drops only on the first kill
|
||||
|
||||
@@ -2011,6 +2011,21 @@ TheFirstShadowflame: {
|
||||
'''
|
||||
}
|
||||
|
||||
ThePact: {
|
||||
DisplayName: The Pact
|
||||
Tooltip:
|
||||
'''
|
||||
Increases your max health by {0}x
|
||||
Causes {1}% of hits you take to critically strike you
|
||||
These crits deal {2}x damage and infict [cbuffplr:CalamityMod/FulfilledContract]
|
||||
'''
|
||||
SalesPitch:
|
||||
'''
|
||||
'Money's a fickle thing, buddy. One slip, and next you know, you're livin' it up... in a dumpster!'
|
||||
'Gambling with life itself, that's where it's truly at. Just write my name in your will, would ya?'
|
||||
'''
|
||||
}
|
||||
|
||||
ThePointer: {
|
||||
DisplayName: The Pointer
|
||||
Tooltip:
|
||||
|
||||
@@ -288,6 +288,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
.Add<GreedPot>()
|
||||
.Add<FishStocks>()
|
||||
.Add<TheGift>()
|
||||
.Add<ThePact>(CalamityConditions.DownedDreadnautilus, Condition.BloodMoon)
|
||||
.Add<TheMonument>(Condition.Hardmode)
|
||||
.Add<TheHousingContract>(Condition.Hardmode)
|
||||
.Add<OmniGun>(Condition.DownedGolem)
|
||||
@@ -670,7 +671,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
for (var i = 0; i < tooltips.Count; i++)
|
||||
{
|
||||
var line = tooltips[i];
|
||||
if (!ExemptFromSmall.Contains(line.Name))
|
||||
if (!ExemptFromSmall.Contains(line.Name) && line.Visible)
|
||||
{
|
||||
if (placetoMove < 0)
|
||||
placetoMove = i;
|
||||
@@ -681,6 +682,15 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
for (int i2 = 0; i2 < snippets.Length; i2++)
|
||||
{
|
||||
lineText += snippets[i2].Text;
|
||||
|
||||
if (snippets[i2] is BuffTagPlayerEffectHandler.Snippet snip)
|
||||
{
|
||||
lineText += Lang.GetBuffName(snip.BuffId);
|
||||
}
|
||||
else if (snippets[i2] is BuffTagEnemyEffectHandler.Snippet snip2)
|
||||
{
|
||||
lineText += Lang.GetBuffName(snip2.BuffId);
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(lineText))
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace CalamityMod.Systems.Collections
|
||||
.Description("Labels this item as having Shady Salesman flavor text, making it draw at the top of the tooltip and the actual tooltip being drawn small below it.")
|
||||
.RegisterBoolSet(ItemType<FishStocks>(), ItemType<TrustyOldRod>(), ItemType<RageBait>(), ItemType<GluttonyBlender>(), ItemType<TheMonument>(), ItemType<GreedPot>(), ItemType<BaconOil>(), ItemType<TheSandwich>(), ItemType<TheConcoction>(), ItemType<TheElixir>(), ItemType<TheGift>(), ItemType<OmniGun>(),
|
||||
ItemType<CombatVoucher>(), ItemType<AggressiveVoucher>(), ItemType<OddVoucher>(), ItemType<UnbreakableVoucher>(), ItemType<HurriedVoucher>(), ItemType<TheHousingContract>(), ItemType<CorruptionEffigy>(), ItemType<CrimsonEffigy>(), ItemType<TrinketofChi>(), ItemType<FrozenCube>(), ItemType<LuxorsGift>(),
|
||||
ItemType<FungalSymbiote>(), ItemType<GladiatorsLocket>(), ItemType<UnstableGraniteCore>(), ItemType<HeartofDarkness>(), ItemType<StressPills>(), ItemType<TheWand>());
|
||||
ItemType<FungalSymbiote>(), ItemType<GladiatorsLocket>(), ItemType<UnstableGraniteCore>(), ItemType<HeartofDarkness>(), ItemType<StressPills>(), ItemType<TheWand>(), ItemType<ThePact>());
|
||||
|
||||
/// <summary>
|
||||
/// If <see langword="true"/> for an item type, this item is an accessory which uses a keybind for an active ability.<br/>
|
||||
|
||||
Reference in new issue
Block a user