Merge branch 'master' into refactoring-things

This commit is contained in:
DominicKarma42 committed 2020-07-18 17:29:27 -05:00
commit cc2debe9b4
227 files changed
+8621 -1770

No files matched your search

+2 -11
View File
@@ -8,8 +8,8 @@ namespace CalamityMod.Buffs.StatBuffs
{
public override void SetDefaults()
{
DisplayName.SetDefault("Siren");
Description.SetDefault("You are a siren now");
DisplayName.SetDefault("Water Elemental");
Description.SetDefault("You are a water elemental now");
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
@@ -22,17 +22,8 @@ namespace CalamityMod.Buffs.StatBuffs
if (modPlayer.sirenBoobsPrevious)
{
modPlayer.sirenBoobsPower = true;
player.statDefense += 1 +
(NPC.downedBoss3 ? 4 : 0) +
(Main.hardMode ? 5 : 0) +
(NPC.downedMoonlord ? 5 : 0);
player.detectCreature = true;
player.lifeRegen += 0 +
(NPC.downedBoss3 ? 1 : 0) +
(NPC.downedMoonlord ? 1 : 0);
player.ignoreWater = NPC.downedBoss3;
player.accFlipper = true;
player.discount = Main.hardMode;
if (player.breath <= player.breathMax + 2 && !modPlayer.ZoneAbyss && NPC.downedBoss3)
{
player.breath = player.breathMax + 3;
-52
View File
@@ -1,52 +0,0 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class SirenBobsAlt : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Siren");
Description.SetDefault("You are a siren now");
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.sirenBoobsAltPrevious)
{
modPlayer.sirenBoobsAltPower = true;
player.statDefense += 1 +
(NPC.downedBoss3 ? 4 : 0) +
(Main.hardMode ? 5 : 0) +
(NPC.downedMoonlord ? 5 : 0);
player.dangerSense = true;
player.lifeRegen += 0 +
(NPC.downedBoss3 ? 1 : 0) +
(NPC.downedMoonlord ? 1 : 0);
player.ignoreWater = NPC.downedBoss3;
player.accFlipper = true;
player.discount = Main.hardMode;
if (player.breath <= player.breathMax + 2 && !modPlayer.ZoneAbyss && NPC.downedBoss3)
{
player.breath = player.breathMax + 3;
}
if (Main.myPlayer == player.whoAmI && player.wet && NPC.downedBoss3)
{
player.AddBuff(ModContent.BuffType<SirenWaterSpeed>(), 360);
}
}
else
{
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class MountedScannerBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Mounted Scanner");
Description.SetDefault("Powerful machinery surrounds 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<MountedScannerSummon>()] > 0)
{
modPlayer.mountedScanner = true;
}
if (!modPlayer.mountedScanner)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class PoleWarperBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Pole Warper");
Description.SetDefault("Sentient magnets are attracted to 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<PoleWarperSummon>()] > 0)
{
modPlayer.poleWarper = true;
}
if (!modPlayer.poleWarper)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class SnakeEyesBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Snake Eyes");
Description.SetDefault("Always watching...");
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<SnakeEyesSummon>()] > 0)
{
modPlayer.snakeEyes = true;
}
if (!modPlayer.snakeEyes)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class StarSwallowerBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Star Swallower");
Description.SetDefault("Mmmm myes");
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<StarSwallowerSummon>()] > 0)
{
modPlayer.starSwallowerPetFroge = true;
}
if (!modPlayer.starSwallowerPetFroge)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

+201 -98
View File
@@ -21,6 +21,7 @@ using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.Astral;
using CalamityMod.NPCs.Calamitas;
using CalamityMod.NPCs.Cryogen;
using CalamityMod.NPCs.Crags;
using CalamityMod.NPCs.DevourerofGods;
using CalamityMod.NPCs.GreatSandShark;
@@ -43,6 +44,7 @@ using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.TileEntities;
using CalamityMod.Tiles;
using CalamityMod.UI;
using CalamityMod.World;
@@ -118,8 +120,21 @@ namespace CalamityMod.CalPlayer
public bool brimlashBusterBoost = false;
#endregion
#region External variables -- Only set by Mod.Call
public int externalAbyssLight = 0;
public int CurrentlyViewedFactoryX = -1;
public int CurrentlyViewedFactoryY = -1;
public TEDraedonFuelFactory CurrentlyViewedFactory;
public int CurrentlyViewedChargerX = -1;
public int CurrentlyViewedChargerY = -1;
public TEDraedonItemCharger CurrentlyViewedCharger;
public int CurrentlyViewedHologramX = -1;
public int CurrentlyViewedHologramY = -1;
public string CurrentlyViewedHologramText;
#endregion
#region External variables -- Only set by Mod.Call
public int externalAbyssLight = 0;
public bool externalColdImmunity = false;
public bool externalHeatImmunity = false;
#endregion
@@ -908,9 +923,13 @@ namespace CalamityMod.CalPlayer
public List<int> GammaCanisters = new List<int>();
public bool rustyDrone = false;
public bool tundraFlameBlossom = false;
public bool starSwallowerPetFroge = false;
public bool snakeEyes = false;
public bool poleWarper = false;
public bool causticDragon = false;
public bool plaguebringerPatronSummon = false;
public bool howlTrio = false;
public bool mountedScanner = false;
#endregion
#region Biome
@@ -946,11 +965,6 @@ namespace CalamityMod.CalPlayer
public bool sirenBoobsHide;
public bool sirenBoobsForce;
public bool sirenBoobsPower;
public bool sirenBoobsAltPrevious;
public bool sirenBoobsAlt;
public bool sirenBoobsAltHide;
public bool sirenBoobsAltForce;
public bool sirenBoobsAltPower;
public bool snowmanPrevious;
public bool snowman;
public bool snowmanHide;
@@ -963,8 +977,6 @@ namespace CalamityMod.CalPlayer
public bool meldTransformationPower;
#endregion
#endregion
#region SavingAndLoading
public override void Initialize()
{
@@ -1264,7 +1276,7 @@ namespace CalamityMod.CalPlayer
player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 100;
if (leviathanAndSirenLore)
{
if (sirenBoobsPrevious || sirenBoobsAltPrevious)
if (sirenBoobsPrevious)
player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 5;
}
if (absoluteRage)
@@ -1925,17 +1937,19 @@ namespace CalamityMod.CalPlayer
gammaHead = false;
rustyDrone = false;
tundraFlameBlossom = false;
starSwallowerPetFroge = false;
snakeEyes = false;
poleWarper = false;
causticDragon = false;
plaguebringerPatronSummon = false;
howlTrio = false;
mountedScanner = false;
abyssalDivingSuitPrevious = abyssalDivingSuit;
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
sirenBoobsPrevious = sirenBoobs;
sirenBoobs = sirenBoobsHide = sirenBoobsForce = sirenBoobsPower = false;
sirenBoobsAltPrevious = sirenBoobsAlt;
sirenBoobsAlt = sirenBoobsAltHide = sirenBoobsAltForce = sirenBoobsAltPower = false;
profanedCrystalPrevious = profanedCrystal;
profanedCrystal = profanedCrystalBuffs = profanedCrystalForce = profanedCrystalHide = false;
@@ -2294,6 +2308,15 @@ namespace CalamityMod.CalPlayer
elysianGuard = false;
#endregion
CurrentlyViewedFactoryX = CurrentlyViewedFactoryY = -1;
CurrentlyViewedFactory = null;
CurrentlyViewedChargerX = CurrentlyViewedChargerY = -1;
CurrentlyViewedCharger = null;
CurrentlyViewedHologramX = CurrentlyViewedHologramY = -1;
CurrentlyViewedHologramText = string.Empty;
KameiBladeUseDelay = 0;
lastProjectileHit = null;
brimlashBusterBoost = false;
@@ -2348,6 +2371,19 @@ namespace CalamityMod.CalPlayer
bool usePlague = NPC.AnyNPCs(ModContent.NPCType<PlaguebringerGoliath>());
player.ManageSpecialBiomeVisuals("CalamityMod:PlaguebringerGoliath", usePlague);
bool useCryogen = NPC.AnyNPCs(ModContent.NPCType<Cryogen>());
if (SkyManager.Instance["CalamityMod:Cryogen"] != null && useCryogen != SkyManager.Instance["CalamityMod:Cryogen"].IsActive())
{
if (useCryogen)
{
SkyManager.Instance.Activate("CalamityMod:Cryogen", player.Center);
}
else
{
SkyManager.Instance.Deactivate("CalamityMod:Cryogen");
}
}
Point point = player.Center.ToTileCoordinates();
bool aboveGround = point.Y > Main.maxTilesY - 320;
bool overworld = player.ZoneOverworldHeight && (point.X < 380 || point.X > Main.maxTilesX - 380);
@@ -3300,11 +3336,6 @@ namespace CalamityMod.CalPlayer
sirenBoobsHide = false;
sirenBoobsForce = true;
}
else if (item.type == ModContent.ItemType<SirensHeartAlt>())
{
sirenBoobsAltHide = false;
sirenBoobsAltForce = true;
}
else if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
{
profanedCrystalHide = false;
@@ -3481,11 +3512,7 @@ namespace CalamityMod.CalPlayer
{
player.AddBuff(ModContent.BuffType<SirenBobs>(), 60, true);
}
else if (sirenBoobsAlt)
{
player.AddBuff(ModContent.BuffType<SirenBobsAlt>(), 60, true);
}
if ((sirenBoobs || sirenBoobsAlt) && NPC.downedBoss3)
if (sirenBoobs && NPC.downedBoss3)
{
if (player.whoAmI == Main.myPlayer && !sirenIceCooldown)
{
@@ -3589,6 +3616,36 @@ namespace CalamityMod.CalPlayer
rage = 0;
gaelSwitchTimer = GaelSwitchPhase.None;
}
// Disable the factory UI if the player is far from the associated factory.
if (CurrentlyViewedFactory != null)
{
Vector2 factoryPosition = new Vector2(CurrentlyViewedFactoryX, CurrentlyViewedFactoryY);
if (player.Distance(factoryPosition) > 1200f)
{
CurrentlyViewedFactory = null;
CurrentlyViewedFactoryX = CurrentlyViewedFactoryY = -1;
}
}
// Disable the charger UI if the player is far from the associated charger.
if (CurrentlyViewedCharger != null)
{
Vector2 chargerPosition = new Vector2(CurrentlyViewedChargerX, CurrentlyViewedChargerY);
if (player.Distance(chargerPosition) > 1200f)
{
CurrentlyViewedCharger = null;
CurrentlyViewedChargerX = CurrentlyViewedChargerY = -1;
}
}
// Disable the hologram UI if the player is far from the associated hologram.
Vector2 hologramPosition = new Vector2(CurrentlyViewedHologramX, CurrentlyViewedHologramY) * 16f;
if (player.Distance(hologramPosition) > 120f)
{
CurrentlyViewedHologramX = CurrentlyViewedHologramY = -1;
CurrentlyViewedHologramText = string.Empty;
}
}
#region Dragon Scale Logic
@@ -3805,6 +3862,7 @@ namespace CalamityMod.CalPlayer
#region Pre Kill
public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
{
PopupGUIManager.SuspendAll();
if (player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot)
{
if (!Main.dedServ)
@@ -5954,6 +6012,47 @@ namespace CalamityMod.CalPlayer
contactDamageReduction += 0.1;
}
if (trinketOfChiBuff)
contactDamageReduction += 0.15;
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
// To prevent abuse, this effect does not work if there are any bosses alive.
if (fearmongerSet && !areThereAnyDamnBosses && (Main.pumpkinMoon || Main.snowMoon))
contactDamageReduction += 0.15;
if (abyssalDivingSuitPlates)
contactDamageReduction += 0.15;
if (sirenIce)
contactDamageReduction += 0.2;
if (encased)
contactDamageReduction += 0.3;
if (player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && player.ActiveItem().type == ModContent.ItemType<LionHeart>())
contactDamageReduction += 0.5;
if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0)
{
contactDamageReduction += 0.5;
theBeeCooldown = 600;
}
if (CalamityWorld.revenge)
{
if (!CalamityWorld.downedBossAny)
contactDamageReduction += 0.2;
if (CalamityConfig.Instance.Rippers)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
contactDamageReduction += 0.5;
}
}
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>()) && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
contactDamageReduction += 0.1;
if (leviathanAndSirenLore)
{
if (!player.IsUnderwater())
@@ -6000,6 +6099,17 @@ namespace CalamityMod.CalPlayer
damage = (int)(damage * 0.6);
}
if (CalamityWorld.ironHeart)
{
int damageMin = 60 + (player.statLifeMax2 / 10);
int damageWithDR = (int)(damage * (1f - player.endurance));
if (damage < damageMin)
{
player.endurance = 0f;
damage = damageMin;
}
}
if (aBulwarkRare)
{
aBulwarkRareMeleeBoostTimer += 3 * damage;
@@ -6029,7 +6139,7 @@ namespace CalamityMod.CalPlayer
}
}
}
}
}
#endregion
#region Modify Hit By Proj
@@ -6076,6 +6186,10 @@ namespace CalamityMod.CalPlayer
damage = (int)(damage * 0.65);
}
// Reduce the bullshit damage Ichor Stickers do
if (proj.type == ProjectileID.GoldenShowerHostile)
damage = (int)(damage * 0.35);
if (CalamityWorld.revenge)
{
double damageMultiplier = 1D;
@@ -6183,6 +6297,47 @@ namespace CalamityMod.CalPlayer
projectileDamageReduction += 0.25;
}
if (trinketOfChiBuff)
projectileDamageReduction += 0.15;
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
// To prevent abuse, this effect does not work if there are any bosses alive.
if (fearmongerSet && !areThereAnyDamnBosses && (Main.pumpkinMoon || Main.snowMoon))
projectileDamageReduction += 0.15;
if (abyssalDivingSuitPlates)
projectileDamageReduction += 0.15;
if (sirenIce)
projectileDamageReduction += 0.2;
if (encased)
projectileDamageReduction += 0.3;
if (player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && player.ActiveItem().type == ModContent.ItemType<LionHeart>())
projectileDamageReduction += 0.5;
if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0)
{
projectileDamageReduction += 0.5;
theBeeCooldown = 600;
}
if (CalamityWorld.revenge)
{
if (!CalamityWorld.downedBossAny)
projectileDamageReduction += 0.2;
if (CalamityConfig.Instance.Rippers)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
projectileDamageReduction += 0.5;
}
}
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>()) && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
projectileDamageReduction += 0.1;
if (leviathanAndSirenLore)
{
if (!player.IsUnderwater())
@@ -6221,7 +6376,18 @@ namespace CalamityMod.CalPlayer
damage = (int)(damage * projectileDamageReduction);
}
if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0)
if (CalamityWorld.ironHeart)
{
int damageMin = 60 + (player.statLifeMax2 / 10);
int damageWithDR = (int)(damage * (1f - player.endurance));
if (damage < damageMin)
{
player.endurance = 0f;
damage = damageMin;
}
}
if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0)
{
if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers && !CalamityMod.trapProjectileList.Contains(proj.type))
{
@@ -7087,13 +7253,6 @@ namespace CalamityMod.CalPlayer
player.head = mod.GetEquipSlot("SirenHead", EquipType.Head);
player.face = -1;
}
else if ((sirenBoobsAltPower || sirenBoobsAltForce) && !sirenBoobsAltHide)
{
player.legs = mod.GetEquipSlot("SirenLegAlt", EquipType.Legs);
player.body = mod.GetEquipSlot("SirenBodyAlt", EquipType.Body);
player.head = mod.GetEquipSlot("SirenHeadAlt", EquipType.Head);
player.face = -1;
}
else if (meldTransformationPower || meldTransformationForce)
{
player.legs = mod.GetEquipSlot("MeldTransformationLegs", EquipType.Legs);
@@ -7213,7 +7372,7 @@ namespace CalamityMod.CalPlayer
Main.PlaySound(SoundID.NPCHit, (int)player.position.X, (int)player.position.Y, 4, 1f, 0f); //metal hit noise
hurtSoundTimer = 10;
}
else if (((sirenBoobsPower || sirenBoobsForce) && !sirenBoobsHide) || ((sirenBoobsAltPower || sirenBoobsAltForce) && !sirenBoobsAltHide))
else if ((sirenBoobsPower || sirenBoobsForce) && !sirenBoobsHide)
{
playSound = false;
Main.PlaySound(SoundID.FemaleHit, (int)player.position.X, (int)player.position.Y, 1, 1f, 0f); //female hit noise
@@ -7233,7 +7392,6 @@ namespace CalamityMod.CalPlayer
}
}
#region MultiplierBoosts
double damageMult = 1.0 +
(dArtifact ? 0.25 : 0.0) +
@@ -7274,76 +7432,20 @@ namespace CalamityMod.CalPlayer
if (CalamityWorld.ironHeart)
{
int damageMin = player.statLifeMax2 / 4;
int damageMin = 60 + (player.statLifeMax2 / 10);
playSound = false;
hurtSoundTimer = 20;
if (damage < damageMin)
{
damage = damageMin;
if (damage <= damageMin)
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/IronHeartHurt"), (int)player.position.X, (int)player.position.Y);
}
else
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/IronHeartBigHurt"), (int)player.position.X, (int)player.position.Y);
}
#region MultiplicativeReductions
if (trinketOfChiBuff)
{
damage = (int)(damage * 0.85);
}
if (purpleCandle)
{
damage = (int)(damage - (player.statDefense * 0.05));
}
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
// To prevent abuse, this effect does not work if there are any bosses alive.
if (fearmongerSet && !areThereAnyDamnBosses && (Main.pumpkinMoon || Main.snowMoon))
{
damage = (int)(damage * 0.85f);
}
if (abyssalDivingSuitPlates)
{
damage = (int)(damage * 0.85);
}
if (sirenIce)
{
damage = (int)(damage * 0.85);
}
if (encased)
{
damage = (int)(damage * 0.7);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && player.ActiveItem().type == ModContent.ItemType<LionHeart>())
{
damage = (int)(damage * 0.5);
}
if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0)
{
damage = (int)(damage * 0.5);
theBeeCooldown = 600;
}
if (CalamityWorld.revenge)
{
if (!CalamityWorld.downedBossAny)
damage = (int)(damage * 0.8);
if (purpleCandle)
damage = (int)(damage - (player.statDefense * 0.05));
if (CalamityConfig.Instance.Rippers)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
damage = (int)(damage * 0.5);
}
}
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>())
&& Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
{
damage = (int)(damage * 0.9);
}
#endregion
if ((godSlayerDamage && damage <= 80) || damage < 1)
{
if ((godSlayerDamage && damage <= 80) || damage < 1)
damage = 1;
}
#region HealingEffects
if (revivify)
@@ -7489,7 +7591,7 @@ namespace CalamityMod.CalPlayer
{
player.AddBuff(ModContent.BuffType<ReaverRage>(), 180);
}
if (fBarrier || ((sirenBoobs || sirenBoobsAlt) && NPC.downedBoss3))
if (fBarrier || (sirenBoobs && NPC.downedBoss3))
{
Main.PlaySound(SoundID.Item, (int)player.position.X, (int)player.position.Y, 27);
for (int m = 0; m < Main.maxNPCs; m++)
@@ -9738,8 +9840,9 @@ namespace CalamityMod.CalPlayer
tailFrame = 0;
}
tailFrameUp = 0;
}
}
}
Main.blockInput = PopupGUIManager.AnyGUIsActive;
}
public static readonly PlayerLayer Tail = new PlayerLayer("CalamityMod", "Tail", PlayerLayer.BackAcc, delegate (PlayerDrawInfo drawInfo)
{
@@ -12091,7 +12194,7 @@ namespace CalamityMod.CalPlayer
light += 1;
if (fathomSwarmerVisage)
light += 1;
if (sirenBoobs || sirenBoobsAlt)
if (sirenBoobs)
light += 1;
if (aAmpoule) // sponge inherits this and doesn't stack with ampoule
light += 1;
+7 -8
View File
@@ -429,7 +429,7 @@ namespace CalamityMod.CalPlayer
player.buffImmune[BuffID.Electrified] = true;
// Reduce breath meter while in icy water instead of chilling
bool canBreath = (modPlayer.sirenBoobs && NPC.downedBoss3) || (modPlayer.sirenBoobsAlt && NPC.downedBoss3) || player.gills || player.merman;
bool canBreath = (modPlayer.sirenBoobs && NPC.downedBoss3) || player.gills || player.merman;
if (player.arcticDivingGear || canBreath)
{
player.buffImmune[ModContent.BuffType<FrozenLungs>()] = true;
@@ -1249,7 +1249,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.cFreeze)
{
light[0] += 0.3f;
light[1] += (float)Main.DiscoG / 400f;
light[1] += Main.DiscoG / 400f;
light[2] += 0.5f;
}
if (modPlayer.sirenIce)
@@ -1258,11 +1258,11 @@ namespace CalamityMod.CalPlayer
light[1] += 1f;
light[2] += 1.25f;
}
if (modPlayer.sirenBoobs || modPlayer.sirenBoobsAlt)
if (modPlayer.sirenBoobs)
{
light[0] += 1.5f;
light[0] += 0.1f;
light[1] += 1f;
light[2] += 0.1f;
light[2] += 1.5f;
}
if (modPlayer.tarraSummon)
{
@@ -1912,7 +1912,7 @@ namespace CalamityMod.CalPlayer
(modPlayer.aquaticEmblem ? 0.25 : 0D) - // 0.75
(player.accMerman ? 0.3 : 0D) - // 0.7
(modPlayer.victideSet ? 0.2 : 0D) - // 0.85
(((modPlayer.sirenBoobs || modPlayer.sirenBoobsAlt) && NPC.downedBoss3) ? 0.3 : 0D) - // 0.7
((modPlayer.sirenBoobs && NPC.downedBoss3) ? 0.3 : 0D) - // 0.7
(modPlayer.abyssalDivingSuit ? 0.3 : 0D); // 0.7
// Limit the multiplier to 5%
@@ -1976,7 +1976,7 @@ namespace CalamityMod.CalPlayer
(modPlayer.aquaticEmblem ? 10D : 0D) + // 40
(player.accMerman ? 15D : 0D) + // 55
(modPlayer.victideSet ? 5D : 0D) + // 60
(((modPlayer.sirenBoobs || modPlayer.sirenBoobsAlt) && NPC.downedBoss3) ? 15D : 0D) + // 75
((modPlayer.sirenBoobs && NPC.downedBoss3) ? 15D : 0D) + // 75
(modPlayer.abyssalDivingSuit ? 15D : 0D); // 90
// Limit the multiplier to 50
@@ -2848,7 +2848,6 @@ namespace CalamityMod.CalPlayer
player.ClearBuff(BuffID.Regeneration);
if (player.FindBuffIndex(BuffID.Lifeforce) > -1)
player.ClearBuff(BuffID.Lifeforce);
player.discount = true;
player.lifeMagnet = true;
player.calmed = true;
}
+65 -9
View File
@@ -86,6 +86,9 @@ using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
using Terraria.UI;
using CalamityMod.Schematics;
using CalamityMod.Tiles;
using CalamityMod.TileEntities;
namespace CalamityMod
{
@@ -112,7 +115,7 @@ namespace CalamityMod
public static int astralKillCount = 0;
// Textures & Shaders
public static Texture2D heartOriginal2;
public static Texture2D heartOriginal2;
public static Texture2D heartOriginal;
public static Texture2D rainOriginal;
public static Texture2D manaOriginal;
@@ -245,7 +248,6 @@ namespace CalamityMod
}
ILChanges.Initialize();
thorium = ModLoader.GetMod("ThoriumMod");
BossHealthBarManager.Load(this);
@@ -269,10 +271,6 @@ namespace CalamityMod
AddEquipTexture(new SirenBody(), null, EquipType.Body, "SirenBody", "CalamityMod/Items/Accessories/SirenTrans_Body", "CalamityMod/Items/Accessories/SirenTrans_Arms");
AddEquipTexture(new SirenLegs(), null, EquipType.Legs, "SirenLeg", "CalamityMod/Items/Accessories/SirenTrans_Legs");
AddEquipTexture(new SirenHeadAlt(), null, EquipType.Head, "SirenHeadAlt", "CalamityMod/Items/Accessories/SirenTransAlt_Head");
AddEquipTexture(new SirenBodyAlt(), null, EquipType.Body, "SirenBodyAlt", "CalamityMod/Items/Accessories/SirenTransAlt_Body", "CalamityMod/Items/Accessories/SirenTransAlt_Arms");
AddEquipTexture(new SirenLegsAlt(), null, EquipType.Legs, "SirenLegAlt", "CalamityMod/Items/Accessories/SirenTransAlt_Legs");
AddEquipTexture(new AndromedaHead(), null, EquipType.Head, "NoHead", "CalamityMod/ExtraTextures/AndromedaWithout_Head");
AddEquipTexture(new PopoHead(), null, EquipType.Head, "PopoHead", "CalamityMod/Items/Accessories/Vanity/Popo_Head");
@@ -335,13 +333,17 @@ namespace CalamityMod
GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref<Effect>(TentacleShader), "BurstPass");
RipperUI.Reset();
RipperUI.Reset();
AstralArcanumUI.Load(this);
GameShaders.Hair.BindShader(ModContent.ItemType<AdrenalineHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax))));
GameShaders.Hair.BindShader(ModContent.ItemType<RageHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax))));
GameShaders.Hair.BindShader(ModContent.ItemType<WingTimeHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(139, 205, 255), ((float)player.wingTime / (float)player.wingTimeMax))));
GameShaders.Hair.BindShader(ModContent.ItemType<StealthHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(186, 85, 211), (player.Calamity().rogueStealth / player.Calamity().rogueStealthMax))));
SchematicLoader.LoadEverything();
PopupGUIManager.LoadGUIs();
}
#endregion
@@ -450,6 +452,8 @@ namespace CalamityMod
Instance = null;
PopupGUIManager.UnloadGUIs();
SchematicLoader.UnloadEverything();
BossHealthBarManager.Unload();
base.Unload();
@@ -473,7 +477,7 @@ namespace CalamityMod
rainOriginal = null;
manaOriginal = null;
carpetOriginal = null;
}
}
#endregion
#region Late Loading
@@ -3345,6 +3349,29 @@ namespace CalamityMod
return true;
}, InterfaceScaleType.None));
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Draedon Hologram", () =>
{
DraedonHologramChatUI.Draw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Draedon Factory Tiles", () =>
{
DraedonsFactoryUI.Draw(Main.spriteBatch);
DraedonsItemChargerUI.Draw(Main.spriteBatch);
return true;
}, InterfaceScaleType.Game)); // InterfaceScaleType.Game tells the game that this UI should take zoom into account.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Boss HP Bars", delegate ()
{
if (Main.LocalPlayer.Calamity().drawBossHPBar)
{
BossHealthBarManager.Update();
BossHealthBarManager.Draw(Main.spriteBatch);
}
return true;
}, InterfaceScaleType.None));
// Astral Arcanum overlay (if open)
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Astral Arcanum UI", delegate ()
{
@@ -3379,6 +3406,11 @@ namespace CalamityMod
}
return true;
}, InterfaceScaleType.None));
layers.Insert(invasionIndex + 1, new LegacyGameInterfaceLayer("Popup GUIs", () =>
{
PopupGUIManager.UpdateAndDraw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
}
}
@@ -4033,6 +4065,27 @@ namespace CalamityMod
// Not strictly necessary, but helps prevent unnecessary packetstorm in MP
if (Main.netMode != NetmodeID.MultiplayerClient)
NPC.NewNPC(x, y, ModContent.NPCType<SuperDummyNPC>());
break;
case CalamityModMessageType.DraedonGeneratorStackSync:
(TileEntity.ByID[reader.ReadInt32()] as TEDraedonFuelFactory).HeldItem.stack = reader.ReadInt32();
break;
case CalamityModMessageType.DraedonChargerSync:
int entityID = reader.ReadInt32();
(TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.type = reader.ReadInt32();
(TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.stack = reader.ReadInt32();
(TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.type = reader.ReadInt32();
(TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.stack = reader.ReadInt32();
int currentCharge = reader.ReadInt32();
if (currentCharge != -1)
{
(TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.Calamity().CurrentCharge = currentCharge;
}
(TileEntity.ByID[entityID] as TEDraedonItemCharger).ActiveTimer = reader.ReadInt32();
break;
case CalamityModMessageType.DraedonFieldGeneratorSync:
int entityID2 = reader.ReadInt32();
(TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).Time = reader.ReadInt32();
(TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).ActiveTimer = reader.ReadInt32();
break;
case CalamityModMessageType.SyncCalamityNPCAIArray:
byte npcIndex2 = reader.ReadByte();
@@ -4124,6 +4177,9 @@ namespace CalamityMod
AcidRainOldDukeSummonSync,
GaelsGreatswordSwingSync,
SpawnSuperDummy,
SyncCalamityNPCAIArray
SyncCalamityNPCAIArray,
DraedonGeneratorStackSync,
DraedonChargerSync,
DraedonFieldGeneratorSync
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

+3 -7
View File
@@ -8,17 +8,13 @@ namespace CalamityMod.Items.Accessories
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Siren's Heart (Blue)");
Tooltip.SetDefault("Transforms the holder into a siren\n" +
"Siren scales give increased defense (gives more defense in hardmode and post-ML)\n" +
"Siren sight reveals enemy locations (blue-only)\n" +
"Increases life regen (gives more life regen in hardmode and post-ML)\n" +
DisplayName.SetDefault("Aquatic Heart");
Tooltip.SetDefault("Transforms the holder into a water elemental\n" +
"Going underwater gives you a buff\n" +
"Greatly reduces breath loss and provides a small amount of light in the abyss\n" +
"Enemies become frozen when they touch you\n" +
"You have a layer of ice around you that absorbs 15% damage but breaks after one hit\n" +
"You have a layer of ice around you that absorbs 20% damage but breaks after one hit\n" +
"After 30 seconds the ice shield will regenerate\n" +
"Your alluring figure allows you to buy items at a reduced price from town npcs (only works in hardmode)\n" +
"Wow, you can swim now!\n" +
"Most of these effects are only active after Skeletron has been defeated\n" +
"Revengeance drop");
-68
View File
@@ -1,68 +0,0 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class SirensHeartAlt : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Siren's Heart (Green)");
Tooltip.SetDefault("Transforms the holder into a siren\n" +
"Siren scales give increased defense (gives more defense in hardmode and post-ML)\n" +
"Siren sight reveals danger locations (green-only)\n" +
"Increases life regen (gives more life regen in hardmode and post-ML)\n" +
"Going underwater gives you a buff\n" +
"Greatly reduces breath loss and provides a small amount of light in the abyss\n" +
"Enemies become frozen when they touch you\n" +
"You have a layer of ice around you that absorbs 15% damage but breaks after one hit\n" +
"After 30 seconds the ice shield will regenerate\n" +
"Your alluring figure allows you to buy items at a reduced price from town npcs (only works in hardmode)\n" +
"Wow, you can swim now!\n" +
"Most of these effects are only active after Skeletron has been defeated\n" +
"Revengeance drop");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.accessory = true;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sirenBoobsAlt = true;
if (hideVisual)
modPlayer.sirenBoobsAltHide = true;
}
}
public class SirenHeadAlt : EquipTexture
{
public override bool DrawHead()
{
return false;
}
}
public class SirenBodyAlt : EquipTexture
{
public override bool DrawBody()
{
return false;
}
}
public class SirenLegsAlt : EquipTexture
{
public override bool DrawLegs()
{
return false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

+48 -15
View File
@@ -21,6 +21,7 @@ using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.UI;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
@@ -59,8 +60,14 @@ namespace CalamityMod.Items
public int timesUsed = 0;
// Rarity is provided both as the classic int and the new enum.
public CalamityRarity customRarity = CalamityRarity.NoEffect;
// The damage modifications for the item are handled in player files.
public int CurrentCharge = ChargeMax;
public bool Chargeable = false;
public const int ChargeMax = 150;
public const float ChargeDamageMinMultiplier = 0.4f;
// Rarity is provided both as the classic int and the new enum.
public CalamityRarity customRarity = CalamityRarity.NoEffect;
public int postMoonLordRarity
{
get => (int)customRarity;
@@ -211,6 +218,10 @@ namespace CalamityMod.Items
#region Shoot
public override bool Shoot(Item item, Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (item.type >= ItemID.Count && item.Calamity().Chargeable && item.Calamity().CurrentCharge > 0 && Main.rand.NextBool(120 / (int)MathHelper.Max(1, item.useAnimation)))
{
CurrentCharge--;
}
CalamityPlayer modPlayer = player.Calamity();
if (rogue)
{
@@ -446,15 +457,10 @@ namespace CalamityMod.Items
{
return new TagCompound
{
{
"rogue", rogue
},
{
"timesUsed", timesUsed
},
{
"rarity", (int)customRarity
}
["rogue"] = rogue,
["timesUsed"] = timesUsed,
["rarity"] = (int)customRarity,
["Charge"] = CurrentCharge
};
}
@@ -463,6 +469,7 @@ namespace CalamityMod.Items
rogue = tag.GetBool("rogue");
timesUsed = tag.GetInt("timesUsed");
customRarity = (CalamityRarity)tag.GetInt("rarity");
CurrentCharge = tag.GetInt("Charge");
}
public override void LoadLegacy(Item item, BinaryReader reader)
@@ -470,6 +477,7 @@ namespace CalamityMod.Items
int loadVersion = reader.ReadInt32();
customRarity = (CalamityRarity)reader.ReadInt32();
timesUsed = reader.ReadInt32();
CurrentCharge = reader.ReadInt32();
if (loadVersion == 0)
{
@@ -490,6 +498,7 @@ namespace CalamityMod.Items
writer.Write(flags);
writer.Write((int)customRarity);
writer.Write(timesUsed);
writer.Write(CurrentCharge);
}
public override void NetReceive(Item item, BinaryReader reader)
@@ -499,6 +508,7 @@ namespace CalamityMod.Items
customRarity = (CalamityRarity)reader.ReadInt32();
timesUsed = reader.ReadInt32();
CurrentCharge = reader.ReadInt32();
}
#endregion
@@ -866,6 +876,11 @@ namespace CalamityMod.Items
public override bool CanUseItem(Item item, Player player)
{
CalamityPlayer modPlayer = player.Calamity();
// Restrict behavior when reading Dreadon's Log.
if (PopupGUIManager.AnyGUIsActive)
return false;
if (player.ownedProjectileCounts[ModContent.ProjectileType<RelicOfDeliveranceSpear>()] > 0 &&
(item.damage > 0 || item.ammo != AmmoID.None))
{
@@ -985,6 +1000,16 @@ namespace CalamityMod.Items
}
#endregion
#region Modify Weapon Damage
public override void ModifyWeaponDamage(Item item, Player player, ref float add, ref float mult, ref float flat)
{
if (item.Calamity().Chargeable)
{
mult *= MathHelper.Lerp(ChargeDamageMinMultiplier, 1f, item.Calamity().CurrentCharge / (float)ChargeMax);
}
}
#endregion
#region Modify Tooltips
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
{
@@ -1128,9 +1153,9 @@ namespace CalamityMod.Items
}
}
}
#endregion
#endregion
/*if (item.ammo == 97)
/*if (item.ammo == 97)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -1142,7 +1167,7 @@ namespace CalamityMod.Items
}
}*/
if (item.type == ItemID.RodofDiscord)
if (item.type == ItemID.RodofDiscord)
{
foreach (TooltipLine line2 in tooltips)
{
@@ -2725,7 +2750,15 @@ Provides heat and cold protection in Death Mode";
TooltipLine line = new TooltipLine(mod, "Tooltip0", "Forces surrounding biome state to Astral upon activation");
tooltips.Add(line);
}
}
}
if (item.type > ItemID.Count && item.Calamity().Chargeable)
{
float chargeRatio = item.Calamity().CurrentCharge / (float)ChargeMax;
chargeRatio *= 100f; // Turn the 0-1 ratio to a 0-100 percentage.
TooltipLine line = new TooltipLine(mod, "Tooltip0", $"Current Charge: {chargeRatio:N1}%");
tooltips.Add(line);
}
}
#endregion
+34
View File
@@ -0,0 +1,34 @@
using CalamityMod.UI;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
public class DraedonsLog : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draedon's Log");
Tooltip.SetDefault("Click to view its contents");
}
public override void SetDefaults()
{
item.width = 40;
item.height = 40;
item.rare = 11;
item.useAnimation = item.useTime = 20;
item.useStyle = ItemUseStyleID.HoldingUp;
}
public override bool UseItem(Player player)
{
if (Main.myPlayer == player.whoAmI)
{
PopupGUIManager.DraedonLogGUI.Active = !PopupGUIManager.DraedonLogGUI.Active;
}
return true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

+3 -3
View File
@@ -7,7 +7,7 @@ namespace CalamityMod.Items.Materials
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blorb");
DisplayName.SetDefault("Blood Orb");
}
public override void SetDefaults()
@@ -21,9 +21,9 @@ namespace CalamityMod.Items.Materials
public override void Update(ref float gravity, ref float maxFallSpeed)
{
float num = (float)Main.rand.Next(90, 111) * 0.01f;
float num = Main.rand.Next(90, 111) * 0.01f;
num *= Main.essScale;
Lighting.AddLight((int)((item.position.X + (float)(item.width / 2)) / 16f), (int)((item.position.Y + (float)(item.height / 2)) / 16f), 0.75f * num, 0f, 0f);
Lighting.AddLight((int)((item.position.X + (item.width / 2)) / 16f), (int)((item.position.Y + (item.height / 2)) / 16f), 0.75f * num, 0f, 0f);
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class DubiousPlating : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dubious Plating");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 24;
item.maxStack = 999;
item.value = Item.sellPrice(silver: 3);
item.rare = 1;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

+22
View File
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class MysteriousCircuitry : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mysterious Circuitry");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 24;
item.maxStack = 999;
item.value = Item.sellPrice(silver: 3);
item.rare = 1;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

@@ -0,0 +1,30 @@
using CalamityMod.Items.Placeables.Walls;
using CalamityMod.Items.Materials;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Tiles;
namespace CalamityMod.Items.Placeables
{
public class DraedonsChargingStation : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draedon's Charging Station");
}
public override void SetDefaults()
{
item.rare = 10;
item.width = 26;
item.height = 26;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = item.useTime = 15;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.createTile = ModContent.TileType<DraedonItemCharger>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

@@ -0,0 +1,28 @@
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Tiles;
namespace CalamityMod.Items.Placeables
{
public class DraedonsFuelFactoryItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draedon's Fuel Factory");
}
public override void SetDefaults()
{
item.rare = 10;
item.width = 26;
item.height = 26;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = item.useTime = 15;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.createTile = ModContent.TileType<DraedonFuelFactory>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

@@ -0,0 +1,36 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture
{
public class AgedSecurityChest : ModItem
{
public override void SetDefaults()
{
item.width = 32;
item.height = 26;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 14;
item.rare = 2;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = 500;
item.createTile = ModContent.TileType<AgedSecurityChestTile>();
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 4);
recipe.AddIngredient(ItemID.IronBar, 4);
recipe.anyIronBar = true;
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

@@ -0,0 +1,34 @@
using CalamityMod.Tiles;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture
{
public class SecurityChest : ModItem
{
public override void SetDefaults()
{
item.width = 32;
item.height = 26;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 14;
item.rare = 3;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = 500;
item.createTile = ModContent.TileType<SecurityChestTile>();
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 10);
recipe.anyIronBar = true;
recipe.AddIngredient(ModContent.ItemType<AgedSecurityChest>());
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cadance Potion");
Tooltip.SetDefault("Gives the cadance buff which reduces shop prices and enemy aggro\n" +
Tooltip.SetDefault("Gives the cadance buff which reduces enemy aggro\n" +
"Increases life regen and increases max life by 25%\n" +
"Increases heart pickup range\n" +
"While this potion's buff is active, Regeneration Potion and Lifeforce Potion buffs are disabled");
+24
View File
@@ -0,0 +1,24 @@
using CalamityMod.UI;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
public class PowerCell : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draedon Power Cell");
Tooltip.SetDefault("Used at a charger to charge special weapons");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 14;
item.rare = 10;
item.maxStack = 999;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

+28 -3
View File
@@ -2,6 +2,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.NPCs.DevourerofGods;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
@@ -15,7 +16,8 @@ namespace CalamityMod.Items.SummonItems
{
DisplayName.SetDefault("Cosmic Worm");
Tooltip.SetDefault("Summons the Devourer of Gods\n" +
"Not consumable");
"SENTINEL WARNING TOOLTIP LINE HERE\n" +
"Not consumable");
}
public override void SetDefaults()
@@ -29,7 +31,19 @@ namespace CalamityMod.Items.SummonItems
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override bool CanUseItem(Player player)
public override void ModifyTooltips(List<TooltipLine> list)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
{
bool sentinelsNotDefeated = !CalamityWorld.downedSentinel1 || !CalamityWorld.downedSentinel2 || !CalamityWorld.downedSentinel3;
line2.text = sentinelsNotDefeated ? "WARNING! Some sentinels have not been truly defeated yet and will spawn at full power during this fight!" : "";
}
}
}
public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>()) && !NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHeadS>()) && CalamityWorld.DoGSecondStageCountdown <= 0 && CalamityWorld.downedBossAny;
}
@@ -61,6 +75,17 @@ namespace CalamityMod.Items.SummonItems
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 30);
recipe.anyIronBar = true;
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>(), 20);
recipe.AddIngredient(ItemID.SoulofLight, 20);
recipe.AddIngredient(ItemID.SoulofNight, 20);
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 30);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
+2 -2
View File
@@ -80,8 +80,8 @@ namespace CalamityMod.Items.SummonItems
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<UnholyEssence>(), 40);
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ItemID.FragmentSolar, 5);
recipe.AddIngredient(ItemID.FragmentSolar, 5);
recipe.AddIngredient(ItemID.LunarBar, 3);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+5 -2
View File
@@ -62,11 +62,11 @@ namespace CalamityMod.Items.Tools
item.pick = PickPower;
item.shoot = ProjectileID.None;
item.shootSpeed = 0f;
item.tileBoost += 50;
item.tileBoost = 50;
item.UseSound = SoundID.Item1;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTime = 2;
item.useAnimation = 10;
item.useAnimation = 2;
item.useTurn = true;
item.autoReuse = true;
item.noMelee = false;
@@ -92,6 +92,9 @@ namespace CalamityMod.Items.Tools
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (player.altFunctionUse == 2)
return;
if (Main.rand.NextBool(3))
{
int num307 = Main.rand.Next(3);
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.TreasureBags
player.TryGettingDevArmor();
// Materials
DropHelper.DropItem(player, ModContent.ItemType<EffulgentFeather>(), 9, 14);
DropHelper.DropItem(player, ModContent.ItemType<EffulgentFeather>(), 15, 21);
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<GildedProboscis>(), 3);
-2
View File
@@ -42,8 +42,6 @@ namespace CalamityMod.Items.TreasureBags
{
player.TryGettingDevArmor();
// Materials
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<DragonRage>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<TheBurningSky>(), 3);
+14 -10
View File
@@ -1,3 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
@@ -41,6 +42,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.shoot = ModContent.ProjectileType<GatlingLaserProj>();
item.shootSpeed = 24f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
@@ -62,16 +65,17 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return new Vector2(-20, 0);
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "CrownJewel");
r.AddIngredient(null, "GalacticaSingularity", 5);
r.AddIngredient(null, "BarofLife", 10);
r.AddIngredient(null, "CosmiliteBar", 15);
r.AddTile(TileID.LunarCraftingStation);
r.SetResult(this);
r.AddRecipe();
}*/
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<LaserRifle>());
recipe.AddIngredient(ItemID.LaserMachinegun);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
@@ -0,0 +1,50 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class GaussPistol : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gauss Pistol");
}
public override void SetDefaults()
{
item.width = 40;
item.height = 22;
item.magic = true;
item.mana = 6;
item.damage = 25;
item.knockBack = 11f;
item.useTime = item.useAnimation = 20;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingOut;
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/GaussWeaponFire");
item.noMelee = true;
item.value = CalamityGlobalItem.Rarity3BuyPrice;
item.rare = 3;
item.shoot = ModContent.ProjectileType<GaussPistolShot>();
item.shootSpeed = 14f;
item.Calamity().Chargeable = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 7);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 5);
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 10);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

@@ -0,0 +1,62 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class GaussRifle : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gauss Rifle");
Tooltip.SetDefault("Fires an enormous pulse of energy");
}
public override void SetDefaults()
{
item.width = 112;
item.height = 36;
item.ranged = true;
item.damage = 8000;
item.knockBack = 30f;
item.useTime = item.useAnimation = 28;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingOut;
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/GaussWeaponFire");
item.noMelee = true;
item.value = CalamityGlobalItem.RarityVioletBuyPrice;
item.rare = ItemRarityID.Red;
item.Calamity().customRarity = CalamityRarity.RareVariant; // In accordance with the other post-ML Arsenal weapons that Fabsol made.
item.shoot = ModContent.ProjectileType<GaussRifleBlast>();
item.shootSpeed = 27f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<GaussRifleBlast>(), damage, knockBack, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 20);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ItemID.LaserRifle);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

@@ -0,0 +1,51 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class HydraulicVoltCrasher : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Hydraulic Volt Crasher");
Tooltip.SetDefault("Zaps nearby enemies on hit");
}
public override void SetDefaults()
{
item.useStyle = ItemUseStyleID.HoldingOut;
item.useAnimation = 16;
item.useTime = 4;
item.shootSpeed = 46f;
item.knockBack = 12f;
item.width = 56;
item.height = 24;
item.damage = 99;
item.hammer = 230;
item.UseSound = SoundID.Item23;
item.shoot = ModContent.ProjectileType<HydraulicVoltCrasherProjectile>();
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.RareVariant;
item.value = CalamityGlobalItem.Rarity10BuyPrice;
item.noMelee = true;
item.noUseGraphic = true;
item.melee = true;
item.channel = true;
item.Calamity().Chargeable = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

+15 -11
View File
@@ -1,3 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
@@ -32,13 +33,15 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserRifleFire");
item.noMelee = true;
item.value = Item.buyPrice(1, 80, 0, 0);
item.value = CalamityGlobalItem.Rarity10BuyPrice;
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.RareVariant;
item.shoot = ModContent.ProjectileType<LaserRifleShot>();
item.shootSpeed = 1f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
@@ -72,16 +75,17 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return new Vector2(-20, 0);
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "CrownJewel");
r.AddIngredient(null, "GalacticaSingularity", 5);
r.AddIngredient(null, "BarofLife", 10);
r.AddIngredient(null, "CosmiliteBar", 15);
r.AddTile(TileID.LunarCraftingStation);
r.SetResult(this);
r.AddRecipe();
}*/
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 5);
recipe.AddIngredient(ItemID.LaserRifle);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
@@ -0,0 +1,88 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class MountedScanner : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mounted Scanner");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.summon = true;
item.damage = 27;
item.knockBack = 2f;
item.useTime = item.useAnimation = 35;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item15;
item.noMelee = true;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
item.shoot = ModContent.ProjectileType<MountedScannerSummon>();
item.shootSpeed = 1f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(player.Center, Vector2.Zero, type, damage, knockBack, player.whoAmI);
int totalOwnedScanners = player.ownedProjectileCounts[type];
int currentScannerIndex = 0;
foreach (Projectile projectile in Main.projectile)
{
if (!projectile.active)
continue;
if (projectile.type != type)
continue;
if (projectile.owner != player.whoAmI)
continue;
float completionRatio = currentScannerIndex / (float)totalOwnedScanners;
// ai[0] is the angular offset relative to the projectile's owner.
// For the first 15 summons, wrap around the player angularly, but not at a perfect angle, a bit like the Dazzling Stabbers when idle.
// But once the total summon count is greater than 15, just create a perfect circle depending on the total amount of summons.
if (totalOwnedScanners <= 14)
{
projectile.ai[0] = Utils.AngleLerp(0f, MathHelper.Pi, currentScannerIndex / 15f);
if (currentScannerIndex % 2f == 1f)
projectile.ai[0] = -Utils.AngleLerp(0f, MathHelper.Pi, (currentScannerIndex + 1) / 15f);
}
else
{
projectile.ai[0] = MathHelper.TwoPi / totalOwnedScanners * currentScannerIndex;
}
// Add a specific offset so that the scanners spawn above the player at first and not to the side.
projectile.ai[0] -= MathHelper.PiOver2;
projectile.netUpdate = true;
currentScannerIndex++;
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 5);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 3);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

@@ -40,6 +40,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.shoot = ModContent.ProjectileType<PlasmaCasterShot>();
item.shootSpeed = 1f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool AltFunctionUse(Player player)
@@ -0,0 +1,58 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class PlasmaGrenade : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plasma Grenade");
Tooltip.SetDefault("Throws a rolling barrel that explodes on wall collision\n" +
"Stealth strikes make it rain on collision");
}
public override void SafeSetDefaults()
{
item.width = 22;
item.height = 28;
item.damage = 50;
item.noMelee = true;
item.noUseGraphic = true;
item.consumable = true;
item.maxStack = 999;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useAnimation = item.useTime = 22;
item.knockBack = 3f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.value = CalamityGlobalItem.Rarity5BuyPrice;
item.rare = 5;
item.shoot = ModContent.ProjectileType<PlasmaGrenadeProjectile>();
item.shootSpeed = 10f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile grenade = Projectile.NewProjectileDirect(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
grenade.Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 1);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 1);
recipe.AddIngredient(ItemID.HallowedBar, 2);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this, 200);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

@@ -0,0 +1,84 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class PoleWarper : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Pole Warper");
Tooltip.SetDefault("Summons two floating magnets which repel each other");
}
public override void SetDefaults()
{
item.shootSpeed = 10f;
item.damage = 38;
item.mana = 12;
item.width = 38;
item.height = 24;
item.useTime = item.useAnimation = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.noMelee = true;
item.knockBack = 8f;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
item.UseSound = SoundID.Item15;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<PoleWarperSummon>();
item.shootSpeed = 10f;
item.summon = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile north = Projectile.NewProjectileDirect(Main.MouseWorld + Vector2.UnitY * 30f, Vector2.Zero, type, damage, knockBack, player.whoAmI);
Projectile south = Projectile.NewProjectileDirect(Main.MouseWorld - Vector2.UnitY * 30f, Vector2.Zero, type, damage, knockBack, player.whoAmI);
north.ai[1] = 1f;
south.ai[1] = 0f;
float magnetCount = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI)
{
magnetCount++;
}
}
// Adjust the offset of all existing magnets such that they form a psuedo-circle.
// This offset is used when determining where a magnet should move to relative to its true destination (such as the player or an enemy).
int magnetIndex = 0;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].type == type && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI)
{
((PoleWarperSummon)Main.projectile[i].modProjectile).Time = 0f;
((PoleWarperSummon)Main.projectile[i].modProjectile).AngularOffset = MathHelper.TwoPi * magnetIndex / magnetCount;
magnetIndex++;
}
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 6);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 6);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 3);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

@@ -0,0 +1,69 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class PulsePistol : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Pulse Pistol");
Tooltip.SetDefault("Fires a pulse that arcs to a new target on enemy hits\n" +
"Inflicts more damage to inorganic targets");
}
public override void SetDefaults()
{
item.width = 62;
item.height = 22;
item.ranged = true;
item.damage = 22;
item.knockBack = 0f;
item.useTime = item.useAnimation = 20;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingOut;
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PulseRifleFire");
item.noMelee = true;
item.value = CalamityGlobalItem.Rarity3BuyPrice;
item.rare = 3;
item.shoot = ModContent.ProjectileType<PulseRifleShot>();
item.shootSpeed = 1.2f; // Keep in mind that the shot has extra updates.
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<PulsePistolShot>(), damage, knockBack, player.whoAmI, 0f, 0f);
// Consume 6 ammo per shot
CalamityGlobalItem.ConsumeAdditionalAmmo(player, item, 6);
return false;
}
public override Vector2? HoldoutOffset() => new Vector2(10f, 0f);
// Disable vanilla ammo consumption
public override bool ConsumeAmmo(Player player) => false;
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 5);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 7);
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 10);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

+15 -10
View File
@@ -1,4 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -41,6 +43,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.shoot = ModContent.ProjectileType<PulseRifleShot>();
item.shootSpeed = 1f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
@@ -74,16 +78,17 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return new Vector2(-10, 0);
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "CrownJewel");
r.AddIngredient(null, "GalacticaSingularity", 5);
r.AddIngredient(null, "BarofLife", 10);
r.AddIngredient(null, "CosmiliteBar", 15);
r.AddTile(TileID.LunarCraftingStation);
r.SetResult(this);
r.AddRecipe();
}*/
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<PulsePistol>());
recipe.AddIngredient(ItemID.LaserRifle);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
@@ -0,0 +1,75 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class PulseTurretRemote : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Pulse Turret Remote");
}
public override void SetDefaults()
{
item.width = 28;
item.height = 26;
item.sentry = true;
item.damage = 21;
item.knockBack = 0f;
item.useTime = item.useAnimation = 35;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingUp;
item.UseSound = SoundID.Item15;
item.noMelee = true;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
item.rare = 4;
item.shoot = ModContent.ProjectileType<PulseTurret>();
item.shootSpeed = 1f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Point mouseTileCoords = Main.MouseWorld.ToTileCoordinates();
if (!CalamityUtils.ParanoidTileRetrieval(mouseTileCoords.X, mouseTileCoords.Y).active())
{
int existingTurrets = player.ownedProjectileCounts[type];
if (existingTurrets > 0)
{
for (int i = 0; i < Main.projectile.Length || existingTurrets > 0; i++)
{
if (Main.projectile[i].type == type &&
Main.projectile[i].owner == player.whoAmI &&
Main.projectile[i].active)
{
Main.projectile[i].Kill();
existingTurrets--;
}
}
}
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>(), 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 3);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

@@ -0,0 +1,54 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class SnakeEyes : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Snake Eyes");
}
public override void SetDefaults()
{
item.shootSpeed = 10f;
item.damage = 15;
item.mana = 12;
item.width = 38;
item.height = 24;
item.useTime = item.useAnimation = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.noMelee = true;
item.knockBack = 3f;
item.value = CalamityGlobalItem.Rarity3BuyPrice;
item.rare = ItemRarityID.Orange;
item.UseSound = SoundID.Item15;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<SnakeEyesSummon>();
item.shootSpeed = 10f;
item.summon = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 7);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 7);
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 7);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

@@ -0,0 +1,58 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class StarSwallowerContainmentUnit : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Star Swallower Containment Unit");
}
public override void SetDefaults()
{
item.shootSpeed = 10f;
item.damage = 20;
item.mana = 10;
item.width = 18;
item.height = 28;
item.useTime = item.useAnimation = 30;
item.useStyle = ItemUseStyleID.HoldingUp;
item.noMelee = true;
item.knockBack = 2.25f;
item.value = CalamityGlobalItem.Rarity3BuyPrice;
item.rare = 3;
item.UseSound = SoundID.Item15;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<StarSwallowerSummon>();
item.shootSpeed = 10f;
item.summon = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Point mouseTileCoords = Main.MouseWorld.ToTileCoordinates();
if (!CalamityUtils.ParanoidTileRetrieval(mouseTileCoords.X, mouseTileCoords.Y).active())
{
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 6);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 6);
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 8);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

+14 -10
View File
@@ -1,4 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -40,6 +42,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.shoot = ModContent.ProjectileType<TeslaCannonShot>();
item.shootSpeed = 1f;
item.useAmmo = AmmoID.Bullet;
item.Calamity().Chargeable = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
@@ -73,16 +77,16 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return new Vector2(-20, 0);
}
/*public override void AddRecipes()
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "CrownJewel");
r.AddIngredient(null, "GalacticaSingularity", 5);
r.AddIngredient(null, "BarofLife", 10);
r.AddIngredient(null, "CosmiliteBar", 15);
r.AddTile(TileID.LunarCraftingStation);
r.SetResult(this);
r.AddRecipe();
}*/
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ItemID.ChargedBlasterCannon);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<IonBlaster>());
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+6 -6
View File
@@ -49,9 +49,9 @@ namespace CalamityMod.Items.Weapons.Magic
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<InfernalRift>());
recipe.AddIngredient(ModContent.ItemType<EvergladeSpray>());
recipe.AddIngredient(ItemID.AquaScepter);
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>(), 5);
recipe.AddRecipeGroup("CursedFlameIchor", 20);
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>(), 5);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
@@ -62,9 +62,9 @@ namespace CalamityMod.Items.Weapons.Magic
{
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
float num72 = item.shootSpeed;
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
float f = Main.rand.NextFloat() * 6.28318548f;
float num78 = Main.mouseX + Main.screenPosition.X - vector2.X;
float num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y;
float f = Main.rand.NextFloat() * MathHelper.TwoPi;
float value12 = 20f;
float value13 = 60f;
Vector2 vector13 = vector2 + f.ToRotationVector2() * MathHelper.Lerp(value12, value13, Main.rand.NextFloat());
@@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
break;
}
f = Main.rand.NextFloat() * 6.28318548f;
f = Main.rand.NextFloat() * MathHelper.TwoPi;
}
Vector2 mouseWorld = Main.MouseWorld;
Vector2 vector14 = mouseWorld - vector13;
+2 -2
View File
@@ -104,8 +104,8 @@ namespace CalamityMod.Items.Weapons.Melee
recipe.AddIngredient(ModContent.ItemType<TrueArkoftheAncients>());
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>(), 5);
recipe.AddIngredient(ModContent.ItemType<CoreofCalamity>(), 5);
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 10);
recipe.AddIngredient(ItemID.LunarBar, 15);
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.LunarBar, 11);
recipe.AddIngredient(ItemID.LunarBar, 7);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Melee
ModRecipe r = new ModRecipe(mod);
r.SetResult(this);
r.AddIngredient(ModContent.ItemType<TruePaladinsHammerMelee>());
r.AddIngredient(ItemID.LunarBar, 10);
r.AddIngredient(ItemID.LunarBar, 5);
r.AddIngredient(ItemID.FragmentSolar, 10);
r.AddIngredient(ItemID.FragmentNebula, 10);
r.AddTile(TileID.LunarCraftingStation);
+1 -1
View File
@@ -151,7 +151,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CometQuasher>());
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Cog, 50);
recipe.AddIngredient(ItemID.LunarBar, 15);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -136,7 +136,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ConferenceCall>());
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Rogue
ModRecipe r = new ModRecipe(mod);
r.SetResult(this);
r.AddIngredient(ModContent.ItemType<TruePaladinsHammer>());
r.AddIngredient(ItemID.LunarBar, 10);
r.AddIngredient(ItemID.LunarBar, 5);
r.AddIngredient(ItemID.FragmentSolar, 10);
r.AddIngredient(ItemID.FragmentNebula, 10);
r.AddTile(TileID.LunarCraftingStation);
+1 -1
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Summon
recipe.AddIngredient(ModContent.ItemType<FuelCellBundle>());
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 15);
recipe.AddIngredient(ModContent.ItemType<InfectedArmorPlating>(), 8);
recipe.AddIngredient(ItemID.LunarBar, 10);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
@@ -89,7 +89,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<LightningHawk>());
recipe.AddIngredient(ItemID.LunarBar, 30);
recipe.AddIngredient(ItemID.LunarBar, 15);
recipe.AddIngredient(ItemID.IllegalGunParts);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
+3
View File
@@ -52,6 +52,9 @@ namespace CalamityMod.NPCs.Abyss
public override void AI()
{
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
npc.damage = 0;
CalamityAI.PassiveSwimmingAI(npc, mod, 0, Main.player[npc.target].Calamity().GetAbyssAggro(400f, 200f), 0.15f, 0.15f, 4f, 4f, 0.1f);
}
+4 -1
View File
@@ -48,7 +48,10 @@ namespace CalamityMod.NPCs.Astral
public override void AI()
{
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead)
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
npc.damage = 0;
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead)
{
npc.TargetClosest(true);
}
+2 -2
View File
@@ -422,7 +422,7 @@ namespace CalamityMod.NPCs.Bumblebirb
if (!Main.expertMode)
{
// Materials
DropHelper.DropItemSpray(npc, ModContent.ItemType<EffulgentFeather>(), 6, 11);
DropHelper.DropItemSpray(npc, ModContent.ItemType<EffulgentFeather>(), 11, 17);
// Weapons
DropHelper.DropItemChance(npc, ModContent.ItemType<GildedProboscis>(), 4);
@@ -463,7 +463,7 @@ namespace CalamityMod.NPCs.Bumblebirb
for (int i = 0; i < 6; i++) // 1 head, 1 wing, 4 legs = 6. one wing due to them being chonky boyes now
{
string gore = "Gores/Bumble";
float randomSpread = (float)(Main.rand.Next(-200, 200) / 100);
float randomSpread = Main.rand.Next(-200, 201) / 100f;
gore += i == 0 ? "Head" : i > 1 ? "Leg" : "Wing";
Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot(gore), 1f);
}
+37 -22
View File
@@ -1,5 +1,7 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -58,12 +60,23 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.DeathSound = SoundID.NPCDeath46;
}
public override void AI()
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.playerSafe || !NPC.downedMoonlord || spawnInfo.player.Calamity().ZoneSunkenSea || NPC.AnyNPCs(npc.type))
{
return 0f;
}
return SpawnCondition.SurfaceJungle.Chance * 0.09f;
}
public override void AI()
{
Player player = Main.player[npc.target];
Vector2 vector = npc.Center;
npc.damage = npc.defDamage;
bool increasedAggression = CalamityPlayer.areThereAnyDamnBosses;
float rotationMult = 4f;
float rotationAmt = 0.04f;
@@ -82,12 +95,12 @@ namespace CalamityMod.NPCs.Bumblebirb
if (npc.ai[0] == 0f || npc.ai[0] == 1f)
{
for (int num1376 = 0; num1376 < 200; num1376++)
for (int num1376 = 0; num1376 < Main.maxNPCs; num1376++)
{
if (num1376 != npc.whoAmI && Main.npc[num1376].active && Main.npc[num1376].type == npc.type)
{
Vector2 value42 = Main.npc[num1376].Center - npc.Center;
if (value42.Length() < (float)(npc.width + npc.height))
if (value42.Length() < (npc.width + npc.height))
{
value42.Normalize();
value42 *= -0.1f;
@@ -103,7 +116,7 @@ namespace CalamityMod.NPCs.Bumblebirb
{
npc.TargetClosest(true);
Vector2 vector240 = Main.player[npc.target].Center - npc.Center;
if (Main.player[npc.target].dead || vector240.Length() > 5600f)
if (Main.player[npc.target].dead || vector240.Length() > (increasedAggression ? 5600f : 2800f))
{
npc.ai[0] = -1f;
}
@@ -164,7 +177,7 @@ namespace CalamityMod.NPCs.Bumblebirb
}
else if (value44.Length() > 400f)
{
float scaleFactor20 = 9f + value44.Length() / 100f + npc.ai[1] / 15f;
float scaleFactor20 = (increasedAggression ? 9f : 7f) + value44.Length() / 100f + npc.ai[1] / 15f;
float num1377 = 30f;
value44.Normalize();
value44 *= scaleFactor20;
@@ -179,7 +192,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.velocity *= 1.05f;
}
npc.ai[1] += 1f;
if (npc.ai[1] >= 90f)
if (npc.ai[1] >= (increasedAggression ? 90f : 105f))
{
npc.ai[1] = 0f;
npc.ai[0] = 2f;
@@ -215,7 +228,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.ai[3] = 0f;
}
npc.ai[2] += 0.0166666675f;
float scaleFactor21 = 12f + npc.ai[2] + value45.Length() / 150f;
float scaleFactor21 = (increasedAggression ? 12f : 9f) + npc.ai[2] + value45.Length() / 150f;
float num1378 = 25f;
value45.Normalize();
value45 *= scaleFactor21;
@@ -242,7 +255,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.noTileCollide = true;
Vector2 vector242 = Main.player[npc.target].Center - npc.Center;
vector242.Y -= 8f;
float scaleFactor22 = 18f;
float scaleFactor22 = increasedAggression ? 18f : 14f;
float num1379 = 8f;
vector242.Normalize();
vector242 *= scaleFactor22;
@@ -274,7 +287,7 @@ namespace CalamityMod.NPCs.Bumblebirb
}
else if (npc.ai[0] == 2.1f)
{
npc.damage = (int)(npc.defDamage * 1.5);
npc.damage = (int)(npc.defDamage * 1.3);
if (npc.velocity.X < 0f)
{
npc.direction = -1;
@@ -288,7 +301,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.noTileCollide = true;
npc.ai[1] += 1f;
int num1380 = 30;
if (npc.ai[1] > (float)num1380)
if (npc.ai[1] > num1380)
{
if (!Collision.SolidCollision(npc.position, npc.width, npc.height))
{
@@ -297,7 +310,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.ai[2] = 0f;
return;
}
if (npc.ai[1] > (float)(num1380 * 2))
if (npc.ai[1] > (num1380 * 2))
{
npc.ai[0] = 1f;
npc.ai[1] = 0f;
@@ -308,14 +321,16 @@ namespace CalamityMod.NPCs.Bumblebirb
}
}
public override bool PreNPCLoot()
{
return false;
}
public override bool PreNPCLoot() => !CalamityPlayer.areThereAnyDamnBosses;
public override void FindFrame(int frameHeight)
public override void NPCLoot()
{
DropHelper.DropItemSpray(npc, ModContent.ItemType<EffulgentFeather>(), 2, 4);
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += (npc.ai[0] == 2.1f ? 1.5 : 1D);
npc.frameCounter += npc.ai[0] == 2.1f ? 1.5 : 1D;
if (npc.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base
{
npc.frameCounter = 0D;
@@ -334,7 +349,7 @@ namespace CalamityMod.NPCs.Bumblebirb
spriteEffects = SpriteEffects.FlipHorizontally;
Texture2D texture2D15 = Main.npcTexture[npc.type];
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2));
Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2);
Color color36 = Color.Gold;
float amount9 = 0.5f;
int num153 = npc.ai[0] == 2.1f ? 7 : 0;
@@ -346,16 +361,16 @@ namespace CalamityMod.NPCs.Bumblebirb
Color color38 = lightColor;
color38 = Color.Lerp(color38, color36, amount9);
color38 = npc.GetAlpha(color38);
color38 *= (float)(num153 - num155) / 15f;
Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition;
vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
color38 *= (num153 - num155) / 15f;
Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition;
vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f;
vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f);
}
}
Vector2 vector43 = npc.Center - Main.screenPosition;
vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f;
vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f);
+9 -1
View File
@@ -39,7 +39,15 @@ namespace CalamityMod.NPCs.Calamitas
npc.buffImmune[BuffID.OnFire] = true;
}
public override void FindFrame(int frameHeight)
public override bool PreAI()
{
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
npc.damage = 0;
return true;
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += 0.15f;
npc.frameCounter %= Main.npcFrameCount[npc.type];
+3 -1
View File
@@ -72,8 +72,10 @@ namespace CalamityMod.NPCs.Calamitas
public override bool PreAI()
{
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
npc.damage = 0;
bool expertMode = Main.expertMode;
bool expertMode = Main.expertMode;
if (CalamityGlobalNPC.calamitas < 0 || !Main.npc[CalamityGlobalNPC.calamitas].active)
{
npc.active = false;
+9 -9
View File
@@ -3540,7 +3540,7 @@ namespace CalamityMod.NPCs
{
float num472 = npc.Center.X;
float num473 = npc.Center.Y;
float num474 = (float)(275D * (1D - lifeRatio)) * tileEnrageMult;
float num474 = (death ? 275f : (float)(275D * (1D - lifeRatio))) * tileEnrageMult;
if (!player.ZoneDungeon)
num474 *= 1.25f;
@@ -4194,7 +4194,7 @@ namespace CalamityMod.NPCs
}
npc.ai[1] += 0.0333333351f;
float velocity = 18f + (enrageScale - 1) * 6f;
float velocity = 16f + (enrageScale - 1) * 4f;
float scaleFactor18 = velocity + npc.ai[1];
float num1310 = 4f;
value54.Normalize();
@@ -4211,7 +4211,7 @@ namespace CalamityMod.NPCs
Vector2 vector206 = player.Center - npc.Center;
vector206.Y -= 12f;
float scaleFactor19 = 32f + (enrageScale - 1) * 4f;
float scaleFactor19 = 28f + (enrageScale - 1) * 4f;
float num1311 = 8f;
vector206.Normalize();
vector206 *= scaleFactor19;
@@ -4243,14 +4243,14 @@ namespace CalamityMod.NPCs
// Charge
else if (npc.ai[0] == 3.2f)
{
npc.damage = (int)(npc.defDamage * 1.5);
npc.damage = (int)(npc.defDamage * 1.3);
npc.collideX = false;
npc.collideY = false;
npc.noTileCollide = true;
npc.ai[2] += 0.0333333351f;
float velocity = 32f + (enrageScale - 1) * 4f;
float velocity = 28f + (enrageScale - 1) * 4f;
npc.velocity.X = (velocity + npc.ai[2]) * npc.ai[1];
if ((npc.ai[1] > 0f && npc.Center.X > player.Center.X + (chargeDistance - 140f)) || (npc.ai[1] < 0f && npc.Center.X < player.Center.X - (chargeDistance - 140f)))
@@ -4847,7 +4847,7 @@ namespace CalamityMod.NPCs
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Vector2 vector6 = Vector2.Normalize(player.Center - vector) * (npc.width + 20) / 2f + vector;
NPC.NewNPC((int)vector6.X, (int)vector6.Y + 45, ModContent.NPCType<OldDukeToothBall>(), 0, 0f, 0f, 0f, 0f, 255);
NPC.NewNPC((int)vector6.X, (int)vector6.Y + 45, ModContent.NPCType<OldDukeToothBall>());
}
}
@@ -5115,7 +5115,7 @@ namespace CalamityMod.NPCs
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Vector2 vector10 = Vector2.Normalize(npc.velocity) * (npc.width + 20) / 2f + vector;
int num31 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, ModContent.NPCType<OldDukeToothBall>(), 0, 0f, 0f, 0f, 0f, 255);
int num31 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, ModContent.NPCType<OldDukeToothBall>());
Main.npc[num31].target = npc.target;
Main.npc[num31].velocity = Vector2.Normalize(npc.velocity).RotatedBy(MathHelper.PiOver2 * npc.direction) * scaleFactor3;
Main.npc[num31].netUpdate = true;
@@ -5521,8 +5521,8 @@ namespace CalamityMod.NPCs
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Vector2 vector10 = Vector2.Normalize(npc.velocity) * (float)(npc.width + 20) / 2f + vector;
int num31 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, ModContent.NPCType<OldDukeToothBall>(), 0, 0f, 0f, 0f, 0f, 255);
Vector2 vector10 = Vector2.Normalize(npc.velocity) * (npc.width + 20) / 2f + vector;
int num31 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, ModContent.NPCType<OldDukeToothBall>());
Main.npc[num31].target = npc.target;
Main.npc[num31].velocity = Vector2.Normalize(npc.velocity).RotatedBy(MathHelper.PiOver2 * npc.direction) * scaleFactor3;
Main.npc[num31].netUpdate = true;
+384 -387
View File
File diff suppressed because it is too large. Load diff
+48 -5
View File
@@ -359,6 +359,49 @@ namespace CalamityMod.NPCs
ProjectileID.GiantBee
//ProjectileID.ScarabBomb
};
public static List<int> ZeroContactDamageNPCList = new List<int>
{
NPCID.DarkCaster,
NPCID.FireImp,
NPCID.Tim,
NPCID.CultistArcherBlue,
NPCID.DesertDjinn,
NPCID.DiabolistRed,
NPCID.DiabolistWhite,
NPCID.Gastropod,
NPCID.IceElemental,
NPCID.IchorSticker,
NPCID.Necromancer,
NPCID.NecromancerArmored,
NPCID.RaggedCaster,
NPCID.RaggedCasterOpenCoat,
NPCID.RuneWizard,
NPCID.SkeletonArcher,
NPCID.SkeletonCommando,
NPCID.SkeletonSniper,
NPCID.TacticalSkeleton,
NPCID.Clown,
NPCID.GoblinArcher,
NPCID.GoblinSorcerer,
NPCID.GoblinSummoner,
NPCID.PirateCrossbower,
NPCID.PirateDeadeye,
NPCID.PirateCaptain,
NPCID.DrManFly,
NPCID.MartianWalker,
NPCID.MartianTurret,
NPCID.ElfCopter,
NPCID.ElfArcher,
NPCID.NebulaBrain,
NPCID.StardustJellyfishBig,
NPCID.PirateShipCannon,
NPCID.MartianSaucer,
NPCID.MartianSaucerCannon,
NPCID.MartianSaucerCore,
NPCID.MartianSaucerTurret,
NPCID.Probe
};
#endregion
#region Instance Per Entity
@@ -1648,10 +1691,12 @@ namespace CalamityMod.NPCs
npc.dontTakeDamage = CalamityPlayer.areThereAnyDamnBosses;
}
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
if (ZeroContactDamageNPCList.Contains(npc.type))
npc.damage = 0;
if (DestroyerIDs.Contains(npc.type) || EaterofWorldsIDs.Contains(npc.type))
{
npc.buffImmune[BuffType<Enraged>()] = false;
}
if (npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall || npc.type == NPCID.Hornet || npc.type == NPCID.HornetFatty || npc.type == NPCID.HornetHoney ||
npc.type == NPCID.HornetLeafy || npc.type == NPCID.HornetSpikey || npc.type == NPCID.HornetStingy || npc.type == NPCID.BigHornetStingy || npc.type == NPCID.LittleHornetStingy ||
@@ -1666,9 +1711,7 @@ namespace CalamityMod.NPCs
}
if (CalamityWorld.bossRushActive && !npc.friendly && !npc.townNPC)
{
BossRushForceDespawnOtherNPCs(npc, mod);
}
if (CalamityWorld.revenge || CalamityWorld.bossRushActive)
{
@@ -2965,7 +3008,7 @@ namespace CalamityMod.NPCs
case 33:
if (npc.type != NPCType<Siren>() && npc.type != NPCType<Leviathan.Leviathan>() &&
npc.type != NPCType<AquaticAberration>() && npc.type != NPCType<Parasea>() &&
npc.type != NPCType<SirenClone>() && npc.type != NPCType<SirenIce>())
npc.type != NPCType<SirenIce>())
{
npc.active = false;
npc.netUpdate = true;
+3 -3
View File
@@ -1794,8 +1794,8 @@ namespace CalamityMod.NPCs
case NPCID.Reaper:
case NPCID.Psycho:
DropHelper.DropItemCondition(npc, ModContent.ItemType<SolarVeil>(), (CalamityWorld.downedCalamitas || NPC.downedPlantBoss), Main.expertMode ? 0.75f : 0.5f, 1, 4);
DropHelper.DropItemCondition(npc, ModContent.ItemType<DarksunFragment>(), CalamityWorld.downedBuffedMothron, Main.expertMode ? 0.06f : 0.04f, 1, 1);
DropHelper.DropItemCondition(npc, ModContent.ItemType<SolarVeil>(), CalamityWorld.downedCalamitas || NPC.downedPlantBoss, Main.expertMode ? 0.75f : 0.5f, 1, 4);
DropHelper.DropItemCondition(npc, ModContent.ItemType<DarksunFragment>(), CalamityWorld.buffedEclipse, Main.expertMode ? 0.06f : 0.04f, 1, 1);
break;
//other solar eclipse creatures
@@ -1811,7 +1811,7 @@ namespace CalamityMod.NPCs
case NPCID.DeadlySphere:
case NPCID.DrManFly:
case NPCID.Nailhead:
DropHelper.DropItemCondition(npc, ModContent.ItemType<DarksunFragment>(), CalamityWorld.downedBuffedMothron, Main.expertMode ? 0.06f : 0.04f, 1, 1);
DropHelper.DropItemCondition(npc, ModContent.ItemType<DarksunFragment>(), CalamityWorld.buffedEclipse, Main.expertMode ? 0.06f : 0.04f, 1, 1);
break;
case NPCID.MartianOfficer:
+6 -3
View File
@@ -171,9 +171,12 @@ namespace CalamityMod.NPCs.CeaselessVoid
}
}
// Mark Ceaseless Void as dead
CalamityWorld.downedSentinel1 = true;
CalamityMod.UpdateServerBoolean();
// Mark Ceaseless Void as dead
if (CalamityWorld.DoGSecondStageCountdown <= 0)
{
CalamityWorld.downedSentinel1 = true;
CalamityMod.UpdateServerBoolean();
}
}
public override void BossLoot(ref string name, ref int potionType)
+5 -5
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
npc.height = 80;
npc.defense = 50;
npc.lifeMax = 6000;
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
npc.lifeMax = 24000;
}
@@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
{
npc.lifeMax = 44000;
}
double HPBoost = (double)CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0.25f;
npc.noGravity = true;
npc.noTileCollide = true;
@@ -268,10 +268,10 @@ namespace CalamityMod.NPCs.CeaselessVoid
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
{
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
damage = (int)((double)damage * 0.9);
damage = (int)(damage * 0.9);
}
}
+5 -5
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
npc.height = 80;
npc.defense = 50;
npc.lifeMax = 6000;
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
npc.lifeMax = 24000;
}
@@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
{
npc.lifeMax = 44000;
}
double HPBoost = (double)CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0.1f;
npc.noGravity = true;
npc.noTileCollide = true;
@@ -225,10 +225,10 @@ namespace CalamityMod.NPCs.CeaselessVoid
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
{
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
damage = (int)((double)damage * 0.9);
damage = (int)(damage * 0.9);
}
}
+5 -5
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
npc.height = 80;
npc.defense = 50;
npc.lifeMax = 6000;
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
npc.lifeMax = 24000;
}
@@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
{
npc.lifeMax = 44000;
}
double HPBoost = (double)CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0.3f;
@@ -253,10 +253,10 @@ namespace CalamityMod.NPCs.CeaselessVoid
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
{
if (CalamityWorld.DoGSecondStageCountdown <= 0)
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
{
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
damage = (int)((double)damage * 0.9);
damage = (int)(damage * 0.9);
}
}
Loaded 100 of 227 files, more files were not shown because too many files have changed in this diff. Show more