Merge branch 'master' into Calamitas-NPC

This commit is contained in:
Dominic committed 2021-06-04 16:24:36 -05:00
commit 699c1b060f
261 files changed
+3887 -2000

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Pets
{
public class LittleLightBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Little Light");
Description.SetDefault("Endearing");
Main.buffNoTimeDisplay[Type] = true;
Main.lightPet[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().littleLightPet = true;
bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<LittleLightProj>()] <= 0;
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
Projectile.NewProjectile(player.Center, -Vector2.UnitY * 10f, ModContent.ProjectileType<LittleLightProj>(), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

+18 -4
View File
@@ -117,6 +117,7 @@ namespace CalamityMod.CalPlayer
public float rangedAmmoCost = 1f;
public bool heldGaelsLastFrame = false;
public bool GivenBrimstoneLocus = false;
public float GeneralScreenShakePower = 0f;
#endregion
#region Tile Entity Trackers
@@ -331,6 +332,7 @@ namespace CalamityMod.CalPlayer
public bool radiator = false;
public bool scalPet = false;
public bool bendyPet = false;
public bool littleLightPet = false;
#endregion
#region Rage
@@ -1390,9 +1392,7 @@ namespace CalamityMod.CalPlayer
if (BossRushEvent.BossRushActive)
{
if (CalamityConfig.Instance.BossRushAccessoryCurse)
{
player.extraAccessorySlots = 0;
}
}
ResetRogueStealth();
@@ -1435,6 +1435,8 @@ namespace CalamityMod.CalPlayer
radiator = false;
scalPet = false;
bendyPet = false;
littleLightPet = false;
onyxExcavator = false;
angryDog = false;
fab = false;
@@ -2008,6 +2010,15 @@ namespace CalamityMod.CalPlayer
#region Screen Position Movements
public override void ModifyScreenPosition()
{
if (CalamityConfig.Instance.DisableScreenShakes)
return;
if (GeneralScreenShakePower > 0f)
{
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower, GeneralScreenShakePower);
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f);
}
if (CalamityWorld.ScreenShakeSpots.Count > 0)
{
// Fail-safe to ensure that spots don't last forever.
@@ -2479,10 +2490,13 @@ namespace CalamityMod.CalPlayer
bool useHoly = NPC.AnyNPCs(ModContent.NPCType<Providence>());
player.ManageSpecialBiomeVisuals("CalamityMod:Providence", useHoly);
bool useSBrimstone = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>());
bool useSBrimstone = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()) || SCalSky.OverridingIntensity > 0f;
player.ManageSpecialBiomeVisuals("CalamityMod:SupremeCalamitas", useSBrimstone);
bool inAstral = ZoneAstral;
bool useWyrmWater = NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmHeadHuge>());
player.ManageSpecialBiomeVisuals("CalamityMod:AdultEidolonWyrm", useWyrmWater);
bool inAstral = ZoneAstral;
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", inAstral);
bool cryogenActive = NPC.AnyNPCs(ModContent.NPCType<Cryogen>());
+6
View File
@@ -30,6 +30,12 @@ namespace CalamityMod
[Tooltip("Enables rendering afterimages for Calamity NPCs, projectiles, etc.\nDisable to improve performance.")]
public bool Afterimages { get; set; }
[Label("Disable Screenshakes")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
[Tooltip("Disables all screen-shaking effects.")]
public bool DisableScreenShakes { get; set; }
[Label("Stealth Invisibility")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
+13 -7
View File
@@ -10,6 +10,7 @@ using CalamityMod.Items.Armor;
using CalamityMod.Items.Dyes.HairDye;
using CalamityMod.Localization;
using CalamityMod.NPCs;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AquaticScourge;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.AstrumDeus;
@@ -175,9 +176,7 @@ namespace CalamityMod
PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q");
if (!Main.dedServ)
{
LoadClient();
}
ILChanges.Load();
BossRushEvent.Load();
@@ -253,7 +252,10 @@ namespace CalamityMod
Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky();
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
Filters.Scene["CalamityMod:AdultEidolonWyrm"] = new Filter(new AEWScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0.25f).UseOpacity(0.35f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:AdultEidolonWyrm"] = new AEWSky();
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:Signus"] = new SignusSky();
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
@@ -265,6 +267,8 @@ namespace CalamityMod
RipperUI.Load();
AstralArcanumUI.Load(this);
SupremeCalamitas.LoadHeadIcons();
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))));
@@ -568,8 +572,9 @@ namespace CalamityMod
{ ModContent.NPCType<DevourerofGodsBodyS>(), 9000 },
{ ModContent.NPCType<DevourerofGodsTailS>(), 9000 },
{ ModContent.NPCType<Yharon>(), 15300 },
{ ModContent.NPCType<SupremeCalamitas>(), 18000 }
};
{ ModContent.NPCType<SupremeCalamitas>(), 18000 },
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 }
};
}
#endregion
@@ -691,8 +696,9 @@ namespace CalamityMod
{ ModContent.NPCType<Yharon>(), velocityScaleMin },
{ ModContent.NPCType<DetonatingFlare>(), velocityScaleMin },
{ ModContent.NPCType<DetonatingFlare2>(), velocityScaleMin },
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin }
};
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin },
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), bitingEnemeyVelocityScale }
};
}
#endregion
+3
View File
@@ -14,6 +14,7 @@ namespace CalamityMod.Effects
public static Effect LightDistortionShader;
public static Effect FadedUVMapStreakShader;
public static Effect FadingSolidTrailShader;
public static Effect SCalShieldShader;
public static void LoadShaders()
{
@@ -25,6 +26,7 @@ namespace CalamityMod.Effects
LightDistortionShader = CalamityMod.Instance.GetEffect("Effects/DistortionShader");
FadedUVMapStreakShader = CalamityMod.Instance.GetEffect("Effects/FadedUVMapStreak");
FadingSolidTrailShader = CalamityMod.Instance.GetEffect("Effects/FadingSolidTrail");
SCalShieldShader = CalamityMod.Instance.GetEffect("Effects/SupremeShieldShader");
Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref<Effect>(AstralFogShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh);
@@ -35,6 +37,7 @@ namespace CalamityMod.Effects
GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref<Effect>(LightDistortionShader), "DistortionPass");
GameShaders.Misc["CalamityMod:TrailStreak"] = new MiscShaderData(new Ref<Effect>(FadedUVMapStreakShader), "TrailPass");
GameShaders.Misc["CalamityMod:FadingSolidTrail"] = new MiscShaderData(new Ref<Effect>(FadingSolidTrailShader), "TrailPass");
GameShaders.Misc["CalamityMod:SupremeShield"] = new MiscShaderData(new Ref<Effect>(SCalShieldShader), "ShieldPass");
}
}
}
+46
View File
@@ -0,0 +1,46 @@
sampler uImage0 : register(s0);
sampler uImage1 : register(s1);
float3 uColor;
float3 uSecondaryColor;
float uOpacity : register(C0);
float uSaturation;
float uRotation;
float uTime;
float4 uSourceRect;
float2 uWorldPosition;
float uDirection;
float3 uLightSource;
float2 uImageSize0;
float2 uImageSize1;
float inverseLerp(float x, float min, float max)
{
return saturate((x - min) / (max - min));
}
float4 PixelFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
{
float4 baseColor = tex2D(uImage0, coords);
float4 noiseColor = tex2D(uImage1, float2(coords.x, frac(coords.y + uTime * 0.7)));
float start = 0.45 + sin(uTime * 3) * 0.04;
float ringRadus = 0.1;
float distanceRatio = distance(coords, float2(0.5, 0.5)) * 1.414;
float3 colorToUse = lerp(uColor, uSecondaryColor, pow(distanceRatio, 0.6));
float originalAlpha = pow(inverseLerp(distanceRatio, 0, start), 2.6);
float ringAlpha = sin(3.141 * inverseLerp(distanceRatio, start, start + ringRadus)) * 1.96;
if (distanceRatio < start)
originalAlpha *= lerp(1, 2.6, noiseColor.r);
else
originalAlpha = lerp(originalAlpha, ringAlpha, inverseLerp(distanceRatio, start, start + ringRadus * 0.5));
originalAlpha *= lerp(1, 0.56, distanceRatio) * lerp(1, 2.45, min(1, pow(sin(uTime * 3.1), 10) * 0.7 + uSaturation));
baseColor = float4(lerp(baseColor.rgb, colorToUse, 0.5), 1.0);
return baseColor * originalAlpha * uOpacity;
}
technique Technique1
{
pass ShieldPass
{
PixelShader = compile ps_2_0 PixelFunction();
}
}
Binary file not shown.
+1
View File
@@ -222,6 +222,7 @@ namespace CalamityMod.Events
player.ClearBuff(ModContent.BuffType<ExtremeGravity>());
}
}
Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SupremeCalamitasSpawn"), Main.player[ClosestPlayerToWorldCenter].Center);
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
}),
new Boss(ModContent.NPCType<Yharon>(), TimeChangeContext.Day),
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+29 -1
View File
@@ -120,6 +120,7 @@ namespace CalamityMod.ILEditing
DisableTeleportersDuringBossFights();
FixSplittingWormBannerDrops();
IncorporateMinionExplodingCountdown();
MakeMouseHoverItemsSupportAnimations();
}
/// <summary>
@@ -467,7 +468,34 @@ namespace CalamityMod.ILEditing
};
}
#endregion
private static void MakeMouseHoverItemsSupportAnimations()
{
IL.Terraria.Main.DrawInterface_40_InteractItemIcon += (il) =>
{
var cursor = new ILCursor(il);
// Locate the location where the frame rectangle is created.
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchNewobj<Rectangle?>()))
return;
int endIndex = cursor.Index;
// And then go back to where it began, right after the draw position vector.
if (!cursor.TryGotoPrev(MoveType.After, i => i.MatchNewobj<Vector2>()))
return;
// And delete the range that creates the rectangle with intent to replace it.
cursor.RemoveRange(Math.Abs(endIndex - cursor.Index));
cursor.Emit(OpCodes.Ldloc_0);
cursor.EmitDelegate<Func<int, Rectangle?>>(itemType =>
{
return Main.itemAnimations[itemType]?.GetFrame(Main.itemTexture[itemType]) ?? null;
});
};
}
#endregion
#region IL Editing Injected/Hooked Functions
private static void BossRushLifeBytes(On.Terraria.Main.orig_InitLifeBytes orig)
+6 -6
View File
@@ -156,7 +156,7 @@ namespace CalamityMod.Items.Accessories
{
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 350 : 700) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 175 : 350) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
spread -= Main.rand.Next(2, 4);
Main.PlaySound(SoundID.Item20, player.Center);
}
@@ -164,7 +164,7 @@ namespace CalamityMod.Items.Accessories
}
else
{
Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 250 : 500) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 125 : 250) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
Main.PlaySound(SoundID.Item20, player.Center);
}
@@ -181,7 +181,7 @@ namespace CalamityMod.Items.Accessories
bool isSmallBoomer = Main.rand.NextDouble() <= (enrage ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired.
bool isThiccBoomer = isSmallBoomer && Main.rand.NextDouble() <= 0.05; // 5%
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
int dam = (int)((shouldNerf ? 200 : 400) * player.MinionDamage());
int dam = (int)((shouldNerf ? 100 : 200) * player.MinionDamage());
switch (projType)
{
case 1: //big boomer
@@ -222,7 +222,7 @@ namespace CalamityMod.Items.Accessories
player.statMana -= manaCost;
correctedVelocity *= 25f;
Main.PlaySound(SoundID.Item20, player.Center);
int dam = (int)((shouldNerf ? 900 : 1800) * player.MinionDamage());
int dam = (int)((shouldNerf ? 450 : 900) * player.MinionDamage());
if (player.HasBuff(BuffID.ManaSickness))
{
int sickPenalty = (int)(dam * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
@@ -248,7 +248,7 @@ namespace CalamityMod.Items.Accessories
for (float i = 0; i < crystalCount; i++)
{
float angle = MathHelper.TwoPi / crystalCount * i;
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 175 : 350) * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 88 : 176) * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().forceMinion = true;
Main.PlaySound(SoundID.Item20, player.Center);
@@ -258,7 +258,7 @@ namespace CalamityMod.Items.Accessories
else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0)
{
float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10));
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 220 : 440) * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f);
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 110 : 220) * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().forceMinion = true;
Main.PlaySound(SoundID.Item20, player.Center);
+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Buffs.Pets;
using CalamityMod.Projectiles.Pets;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Pets
{
public class LittleLight : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Little Light");
Tooltip.SetDefault("It's been looking for you for a long time.\n" +
"Summons a small construct that follows you and provides a great amount of light");
}
public override void SetDefaults()
{
item.CloneDefaults(ItemID.WispinaBottle);
item.UseSound = SoundID.Item83;
item.shoot = ModContent.ProjectileType<LittleLightProj>();
item.buffType = ModContent.BuffType<LittleLightBuff>();
item.value = Item.sellPrice(gold: 15);
item.rare = ItemRarityID.Purple;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.Calamity().donorItem = true;
}
public override void UseStyle(Player player)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
player.AddBuff(item.buffType, 3600, true);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

+45
View File
@@ -0,0 +1,45 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public class SCalAltarItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Calamitous Altar");
Tooltip.SetDefault("Death\n" +
"Allows you to summon Supreme Calamitas with Ashes of Calamity\n" +
"She creates a large square arena of blocks upon being summoned\n" +
"When she is summoned the arena will spawn around her with her at the center\n" +
"During the battle, heart pickups will heal half as much HP");
}
public override void SetDefaults()
{
item.createTile = ModContent.TileType<SCalAltar>();
item.useTurn = true;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.consumable = true;
item.width = 60;
item.height = 48;
item.maxStack = 999;
item.useStyle = ItemUseStyleID.SwingThrow;
item.Calamity().customRarity = CalamityRarity.Violet;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

+5 -59
View File
@@ -1,11 +1,5 @@
using CalamityMod.Events;
using CalamityMod.Items.Materials;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.Tiles;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.SummonItems
@@ -15,69 +9,21 @@ namespace CalamityMod.Items.SummonItems
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Eye of Extinction");
Tooltip.SetDefault("Death\n" +
"Summons Supreme Calamitas\n" +
"Creates a large square arena of blocks around your player\n" +
"Your player is the CENTER of the arena so be sure to use this item in a good location\n" +
"During the battle, heart pickups will heal half as much HP\n" +
"Not consumable");
Tooltip.SetDefault("Summons Supreme Calamitas at the altar but is not consumed");
}
public override void SetDefaults()
{
item.width = 40;
item.height = 40;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = ItemUseStyleID.HoldingUp;
item.consumable = false;
item.width = 54;
item.height = 42;
item.Calamity().customRarity = CalamityRarity.Violet;
}
public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()) && !BossRushEvent.BossRushActive;
}
public override bool UseItem(Player player)
{
int surface = (int)Main.worldSurface;
for (int i = 0; i < Main.maxTilesX; i++)
{
for (int j = 0; j < surface; j++)
{
if (Main.tile[i, j] != null)
{
if (Main.tile[i, j].type == ModContent.TileType<ArenaTile>())
{
WorldGen.KillTile(i, j, false, false, false);
if (Main.netMode == NetmodeID.Server)
{
NetMessage.SendTileSquare(-1, i, j, 1, TileChangeType.None);
}
else
{
WorldGen.SquareTileFrame(i, j, true);
}
}
}
}
}
Main.PlaySound(SoundID.Roar, player.position, 0);
if (Main.netMode != NetmodeID.MultiplayerClient)
NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType<SupremeCalamitas>());
else
NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType<SupremeCalamitas>());
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<BlightedEyeball>());
recipe.AddIngredient(ModContent.ItemType<CalamitousEssence>(), 5);
recipe.AddIngredient(ModContent.ItemType<CalamityDust>(), 15);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools
public override void SetDefaults()
{
item.damage = 2000;
item.damage = 400;
item.melee = true;
item.noMelee = true;
item.channel = true;
+4
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.NPCs.StormWeaver;
@@ -53,6 +54,9 @@ namespace CalamityMod.Items.TreasureBags
DropHelper.DropItem(player, ModContent.ItemType<GodSlayerHornedHelm>());
DropHelper.DropItem(player, ModContent.ItemType<GodSlayerVisage>());
}
// Light pet.
DropHelper.DropItemChance(player, ModContent.ItemType<LittleLight>(), 8);
}
}
}
+1 -1
View File
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
target.Calamity().GaussFluxTimer = 0;
if (player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<GaussFlux>(), damage, 0f, player.whoAmI, 0f, target.whoAmI);
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<GaussFlux>(), (int)(item.damage * player.MeleeDamage()), 0f, player.whoAmI, 0f, target.whoAmI);
}
}
}
+2 -2
View File
@@ -22,9 +22,9 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 420;
item.damage = 85;
item.magic = true;
item.mana = (int)42.0; // TODO -- is there a reason for this?
item.mana = 42;
item.width = 30;
item.height = 34;
item.useTime = 15;
+2 -2
View File
@@ -12,8 +12,8 @@ namespace CalamityMod.Items.Weapons.Magic
{
public class Eternity : ModItem
{
public const int BaseDamage = 4200;
public const int ExplosionDamage = 42000;
public const int BaseDamage = 840;
public const int ExplosionDamage = 8400;
public const int MaxHomers = 40;
public const int DustID = 16;
public static readonly Color BlueColor = new Color(34, 34, 160);
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 616;
item.damage = 125;
item.magic = true;
item.mana = 50;
item.width = 84;
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic
public class Judgement : ModItem
{
public const int HitsPerFlash = 300;
public const int FlashBaseDamage = 80000;
public const int FlashBaseDamage = 16000;
private const float SpawnAngleSpread = 0.4f * MathHelper.Pi;
private const float SpeedRandomness = 0.08f;
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
item.width = 40;
item.height = 42;
item.damage = 2077;
item.damage = 415;
item.knockBack = 4f;
item.magic = true;
item.mana = 6;
+3 -3
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
DisplayName.SetDefault("Vehemence");
Tooltip.SetDefault("Casts an intense energy blast\n" +
"Does far more damage the more HP an enemy has left\n" +
"Max damage is capped at 1,000,000\n" +
"Max damage is capped at 200,000\n" +
"If an enemy has full HP it will inflict several long-lasting debuffs\n" +
"Revengeance drop");
Item.staff[item.type] = true;
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 7;
item.damage = 3;
item.magic = true;
item.mana = 590;
item.width = 44;
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Magic
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.X, position.Y, speedX, speedY, ModContent.ProjectileType<Vehemence>(), damage, knockBack, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<Vehemence>(), damage, knockBack, player.whoAmI);
player.AddBuff(BuffID.ManaSickness, 600, true);
return false;
}
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.width = 82;
item.height = 84;
item.scale = 1.5f;
item.damage = 4000;
item.damage = 800;
item.melee = true;
item.useAnimation = 11;
item.useStyle = ItemUseStyleID.SwingThrow;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.width = 40;
item.height = 54;
item.melee = true;
item.damage = 200;
item.damage = 50;
item.knockBack = 6f;
item.useTime = 20;
item.useAnimation = 20;
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 94;
item.damage = 350;
item.damage = 80;
item.melee = true;
item.useAnimation = 24;
item.useStyle = ItemUseStyleID.SwingThrow;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.width = 92;
item.height = 104;
item.scale = 1.5f;
item.damage = 840;
item.damage = 170;
item.melee = true;
item.useAnimation = 16;
item.useStyle = ItemUseStyleID.SwingThrow;
+2 -4
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
item.width = 62;
item.height = 62;
item.damage = 2500;
item.damage = 500;
item.melee = true;
item.useTime = 5;
item.reuseDelay = 20;
@@ -107,9 +107,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 64);
}
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 64);
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 18;
item.damage = 2000;
item.damage = 400;
item.melee = true;
item.noMelee = true;
item.noUseGraphic = true;
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
item.width = 160;
item.height = 160;
item.damage = 10000;
item.damage = 2000;
item.noMelee = true;
item.noUseGraphic = true;
item.autoReuse = true;
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 120;
item.damage = 150;
item.ranged = true;
item.width = 60;
item.height = 90;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 150;
item.damage = 130;
item.ranged = true;
item.width = 64;
item.height = 32;
+2 -2
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 4000;
item.damage = 800;
item.ranged = true;
item.width = 22;
item.height = 50;
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
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.X, position.Y, speedX, speedY, ModContent.ProjectileType<ContagionBow>(), damage, knockBack, player.whoAmI, 0.0f, 0.0f);
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<ContagionBow>(), damage, knockBack, player.whoAmI);
return false;
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 1000;
item.damage = 200;
item.ranged = true;
item.width = 96;
item.height = 38;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged
item.ranged = true;
item.width = 84;
item.height = 34;
item.useTime = item.useAnimation = 7;
item.useTime = item.useAnimation = 10;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 4.5f;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 125;
item.damage = 100;
item.width = 20;
item.height = 12;
item.useTime = 12;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 1000;
item.damage = 200;
item.ranged = true;
item.width = 94;
item.height = 34;
+1 -1
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged
float SpeedX2 = speedX + (float)Main.rand.Next(-20, 21) * 0.05f;
float SpeedY2 = speedY + (float)Main.rand.Next(-20, 21) * 0.05f;
int soul = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType<LostSoulFriendly>(), damage, knockBack, player.whoAmI);
int soul = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType<LostSoulFriendly>(), damage, knockBack, player.whoAmI, 2f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
{
Main.projectile[soul].timeLeft = 600;
+3 -2
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged
item.UseSound = SoundID.Item40;
item.autoReuse = false;
item.shoot = ProjectileID.LostSoulFriendly;
item.shootSpeed = 24f;
item.shootSpeed = 12f;
item.useAmmo = AmmoID.Bullet;
}
@@ -44,8 +44,9 @@ namespace CalamityMod.Items.Weapons.Ranged
{
if (type == ProjectileID.Bullet)
{
int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<LostSoulFriendly>(), damage, knockBack, player.whoAmI);
int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.LostSoulFriendly, damage, knockBack, player.whoAmI, 2f, 0f);
Main.projectile[proj].Calamity().forceRanged = true;
Main.projectile[proj].extraUpdates += 2;
}
else
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 145;
item.damage = 135;
item.knockBack = 15f;
item.shootSpeed = 16f;
item.useStyle = ItemUseStyleID.HoldingOut;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 720;
item.damage = 150;
item.ranged = true;
item.width = 60;
item.height = 26;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 85;
item.damage = 105;
item.ranged = true;
item.width = 44;
item.height = 58;
+3
View File
@@ -86,6 +86,9 @@ namespace CalamityMod.Items.Weapons.Rogue
return false;
}
if (player.Calamity().StealthStrikeAvailable())
damage = (int)(damage * 1.3);
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = true;
+10 -5
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
DisplayName.SetDefault("Hypothermia");
Tooltip.SetDefault("Fires a constant barrage of black ice shards\n" +
"Stealth strikes additionally fire a short ranged ice chunk that shatters into ice shards");
"Stealth strikes additionally fire short ranged ice chunks that shatter into ice shards");
}
public override void SafeSetDefaults()
@@ -50,10 +50,15 @@ namespace CalamityMod.Items.Weapons.Rogue
if (player.Calamity().StealthStrikeAvailable() && player.itemAnimation == item.useAnimation - 1) //setting up the stealth strikes
{
damage *= 2;
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<HypothermiaChunk>(), damage, knockBack, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
damage = (int)(damage * 1.7);
for (int i = 0; i < 4; i++)
{
Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.13f) * Main.rand.NextFloat(1f, 1.1f);
int stealth = Projectile.NewProjectile(position, chunkVelocity, ModContent.ProjectileType<HypothermiaChunk>(), damage, knockBack, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
}
}
int projAmt = Main.rand.Next(1, 3);
for (int index = 0; index < projAmt; ++index)
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
public class NanoblackReaperRogue : RogueWeapon
{
public static int BaseDamage = 500;
public static int BaseDamage = 100;
public static float Knockback = 9f;
public static float Speed = 16f;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
item.width = 94;
item.height = 94;
item.damage = 40000;
item.damage = 8000;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 60;
+3
View File
@@ -40,6 +40,9 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
damage = (int)(damage * 0.8);
int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
{
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
item.damage = 963;
item.damage = 193;
item.knockBack = 1f;
item.mana = 99;
item.useTime = item.useAnimation = 10;
+1 -1
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Summon
item.summon = true;
item.mana = 80;
item.damage = 6500;
item.damage = 1300;
item.knockBack = 4f;
item.autoReuse = true;
item.useTime = item.useAnimation = 10;
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
item.mana = 200;
item.damage = 9999;
item.damage = 1999;
item.useStyle = ItemUseStyleID.HoldingUp;
item.width = item.height = 28;
item.useTime = item.useAnimation = 10;
+38 -28
View File
@@ -46,34 +46,44 @@ namespace CalamityMod.Localization
new [] { "GhostBossText3", "Long-dead prisoners seek their zealous revenge..." },
new [] { "GhostBossText4", "The souls released stir the acidic storms..." },
new [] { "SupremeBossText3", "Alright, let's get started. Not sure why you're bothering." }, // start
new [] { "SupremeBossText4", "You seem so confident, even though you are painfully ignorant of what has yet to transpire." }, //75%
new [] { "SupremeBossText5", "Everything was going well until you came along." }, //75%
new [] { "SupremeBossText6", "Brothers, could you assist me for a moment? This ordeal is growing tiresome." }, //45%
new [] { "SupremeBossText", "Don't worry, I still have plenty of tricks left." }, //40%
new [] { "SupremeBossText7", "Hmm...perhaps I should let the little ones out to play for a while." },//30%
new [] { "SupremeBossText8", "Impressive...but still not good enough!" }, //20%
new [] { "SupremeBossText9", "I'm just getting started!" }, //10%
new [] { "SupremeBossText20", "How are you still alive!?" }, //8%
new [] { "SupremeBossText21", "Just stop!" }, //6%
new [] { "SupremeBossText22", "Even if you defeat me you would still have the lord to contend with!" }, //4%
new [] { "SupremeBossText23", "He has never lost a battle!" }, //2%
new [] { "SupremeBossText24", "Not even I could defeat him! What hope do you have!?" }, //1%
new [] { "SupremeBossText25", "He has grown far stronger since we last fought...you stand no chance." }, //1% after 10 seconds
new [] { "SupremeBossText26", "Well...I suppose this is the end..." }, //1% after 15 seconds
new [] { "SupremeBossText27", "Perhaps one of these times I'll change my mind..." }, //1% after first win
new [] { "SupremeBossText28", "You aren't hurting as much as I'd like...are you cheating?" }, //not taking enough damage
new [] { "SupremeBossText2", "Go to hell." }, //cheater
new [] { "SupremeBossText10", "At long last I am free...for a time. I'll keep coming back, just like you. Until we meet again, farewell." }, //end after 20 seconds
new [] { "SupremeBossText11", "Do you enjoy going through hell?" }, //rebattle after killing once
new [] { "SupremeBossText12", "Don't get me wrong, I like pain too, but you're just ridiculous." }, //rebattle after killing four times
new [] { "SupremeBossText13", "You must enjoy dying more than most people, huh?" }, //rebattle five deaths
new [] { "SupremeBossText14", "Do you have a fetish for getting killed or something?" }, //rebattle twenty deaths
new [] { "SupremeBossText15", "Alright, I'm done counting. You probably died this much just to see what I'd say." }, //rebattle fifty deaths
new [] { "SupremeBossText16", "You didn't die at all huh? Welp, you probably cheated. Do it again, for real this time...but here's your reward I guess." }, //die 0 times
new [] { "SupremeBossText17", "One death? That's it? ...I guess you earned this then." }, //die 1 time and win
new [] { "SupremeBossText18", "Two deaths, nice job. Here's your reward." }, //die 2 times and win
new [] { "SupremeBossText19", "Third time's the charm. Here's a special reward." }, //die 3 times and win
new [] { "SCalSummonText", "Do you enjoy going through hell?" },
new [] { "SCalStartText", "You should have just died..." },
new [] { "SCalBH2Text", "It wasn't too long ago you barely managed to defeat my doppelganger. Quite the failure, wasn't it?" },
new [] { "SCalBH3Text", "You've harnessed great power, but you wield it for no one but yourself." },
new [] { "SCalBrothersText", "Would you like to meet my family? Horrible, isn't it?" },
new [] { "SCalPhase2Text", "You will suffer greatly." },
new [] { "SCalBH4Text", "It's absurd to even think of trying to get away. As long as you live, you will suffer." },
new [] { "SCalSeekerRingText", "An upstart who recklessly stole and killed their way to power. I wonder, who does that remind me of...?" },
new [] { "SCalBH5Text", "You have no stake in this battle. No one gave you any say in this matter!" },
new [] { "SCalSepulcher2Text", "Once the dust has settled and only one remains, if it is you, what value will this have had?!" },
new [] { "SCalDesparationText1", "Just stop!" },
new [] { "SCalDesparationText2", "I have no future if I lose here." },
new [] { "SCalDesparationText3", "Once you have bested me, you too will only have one path forward." },
new [] { "SCalDesparationText4", "And that path... also has no future." },
new [] { "SCalAcceptanceText1", "Even if he has thrown all else away, his power remains." },
new [] { "SCalAcceptanceText2", "I have no more energy left to resent him, or you..." },
new [] { "SCalAcceptanceText3", "It will all be in your hands now." },
// Some of these keys are incorrect in terms of their contents, but they remain as their bases + an addon at the end to make it
// easier to define them.
new [] { "SCalSummonTextRematch", "You called? If you're looking to get scorched, you've got the right person." },
new [] { "SCalStartTextRematch", "Ha! You saw it coming this time." },
new [] { "SCalBH2TextRematch", "Don't get cocky just because you've won once." },
new [] { "SCalBH3TextRematch", "You know, I was expecting a house call from the Tyrant at this point. Think he died?" },
new [] { "SCalBH3TextRematch2", "Haha, no way." },
new [] { "SCalBrothersTextRematch", "Would you like to meet my family? Horrible, isn't it?" },
new [] { "SCalBrothersTextRematch2", "I'm joking. They are but empty shells now. Did I frighten you?" },
new [] { "SCalPhase2TextRematch", "Here we go again." },
new [] { "SCalBH4TextRematch", "Remember these? I bet you've seen them a few times since the last battle... in your nightmares." },
new [] { "SCalSeekerRingTextRematch", "It seems your skill hasn't faltered in the least." },
new [] { "SCalBH5TextRematch", "One last go." },
new [] { "SCalSepulcher2TextRematch", "And... you never cease to amaze." },
new [] { "SCalDesparationText1Rematch", "You may even have a proper chance now." },
new [] { "SCalDesparationText2Rematch", "I wonder if you've met his mechanic yet." },
new [] { "SCalDesparationText3Rematch", "I trust you will not make the same mistakes he did." },
new [] { "SCalDesparationText4Rematch", "Now... even I cannot see what your future holds." },
new [] { "SCalFunnyCheatText", "Go to hell." },
new [] { "EdgyBossText", "Don't get cocky, kid!" },
new [] { "EdgyBossText2", "You think...you can butcher...ME!?" },
+8
View File
@@ -249,6 +249,14 @@ namespace CalamityMod
case "supremecalamitas":
case "supreme calamitas":
return CalamityWorld.downedSCal;
case "adulteidolonwyrm":
case "adult eidolon wyrm":
case "adultwyrm":
case "adult wyrm":
case "adulteidolon":
case "adult eidolon":
return CalamityWorld.downedAdultEidolonWyrm;
}
}
#endregion
+15
View File
@@ -29,6 +29,7 @@ using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Weapons.Typeless;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.AquaticScourge;
using CalamityMod.NPCs.AstrumAureus;
@@ -103,6 +104,7 @@ namespace CalamityMod
public static readonly Func<bool> DownedDoG = () => CalamityWorld.downedDoG;
public static readonly Func<bool> DownedYharon = () => CalamityWorld.downedYharon;
public static readonly Func<bool> DownedSCal = () => CalamityWorld.downedSCal;
public static readonly Func<bool> DownedAdultEidolonWyrm = () => CalamityWorld.downedAdultEidolonWyrm;
public static readonly Func<bool> DownedAcidRainInitial = () => CalamityWorld.downedEoCAcidRain;
public static readonly Func<bool> DownedAcidRainHardmode = () => CalamityWorld.downedAquaticScourgeAcidRain;
@@ -140,6 +142,7 @@ namespace CalamityMod
{ "Yharon", 18f },
// { "Draedon", 18.5f },
{ "SupremeCalamitas", 19f },
{ "AdultEidolonWyrm", 19.5f },
// { "Yharim", 20f },
// { "Noxus", 120f },
// { "Xeroc", 121f },
@@ -581,6 +584,18 @@ namespace CalamityMod
string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00));
AddBoss(bossChecklist, calamity, "Supreme Calamitas", order, type, DownedSCal, summon, loot, collection, instructions, despawn);
}
// Adult Eidolon Wyrm
{
BossDifficulty.TryGetValue("AdultEidolonWyrm", out float order);
int type = NPCType<EidolonWyrmHeadHuge>();
int summon = ItemID.RodofDiscord;
List<int> loot = new List<int>() { ItemType<Voidstone>(), ItemType<Lumenite>(), ItemID.Ectoplasm, ItemType<EidolicWail>(), ItemType<SoulEdge>() };
List<int> collection = new List<int>() { ItemType<HalibutCannon>() };
string instructions = $"While in the Abyss, use an item that inflicts Chaos State";
string despawn = CalamityUtils.ColorMessage("...", new Color(0x7F, 0xFF, 0xD4));
AddBoss(bossChecklist, calamity, "Adult Eidolon Wyrm", order, type, DownedAdultEidolonWyrm, summon, loot, collection, instructions, despawn);
}
}
private static void AddCalamityInvasions(Mod bossChecklist, Mod calamity)
+44
View File
@@ -0,0 +1,44 @@
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ModLoader;
namespace CalamityMod.NPCs.Abyss
{
public class AEWScreenShaderData : ScreenShaderData
{
private int AEWIndex;
public AEWScreenShaderData(string passName)
: base(passName)
{
}
private void UpdateAEWIndex()
{
int AEWType = ModContent.NPCType<EidolonWyrmHeadHuge>();
if (AEWIndex >= 0 && Main.npc[AEWIndex].active && Main.npc[AEWIndex].type == AEWType)
{
return;
}
AEWIndex = -1;
for (int i = 0; i < Main.npc.Length; i++)
{
if (Main.npc[i].active && Main.npc[i].type == AEWType)
{
AEWIndex = i;
break;
}
}
}
public override void Apply()
{
UpdateAEWIndex();
if (AEWIndex != -1)
{
UseTargetPosition(Main.npc[AEWIndex].Center);
}
base.Apply();
}
}
}
+95
View File
@@ -0,0 +1,95 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ModLoader;
namespace CalamityMod.NPCs.Abyss
{
public class AEWSky : CustomSky
{
private bool isActive = false;
private float intensity = 0f;
private int AEWIndex = -1;
public override void Update(GameTime gameTime)
{
if (isActive && intensity < 1f)
intensity += 0.01f;
else if (!isActive && intensity > 0f)
intensity -= 0.01f;
}
private float GetIntensity()
{
if (UpdateAEWIndex())
{
float x = 0f;
if (AEWIndex != -1)
x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[AEWIndex].Center);
return 1f - Utils.SmoothStep(3000f, 6000f, x);
}
return 0f;
}
public override Color OnTileColor(Color inColor)
{
float intensity = GetIntensity();
return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity));
}
private bool UpdateAEWIndex()
{
int AEWType = ModContent.NPCType<EidolonWyrmHeadHuge>();
if (AEWIndex >= 0 && Main.npc[AEWIndex].active && Main.npc[AEWIndex].type == AEWType)
{
return true;
}
AEWIndex = -1;
for (int i = 0; i < Main.npc.Length; i++)
{
if (Main.npc[i].active && Main.npc[i].type == AEWType)
{
AEWIndex = i;
break;
}
}
return AEWIndex != -1;
}
public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
{
if (maxDepth >= 0 && minDepth < 0)
{
float intensity = GetIntensity();
spriteBatch.Draw(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Color(0, 0, 15) * intensity);
}
}
public override float GetCloudAlpha()
{
return 0f;
}
public override void Activate(Vector2 position, params object[] args)
{
isActive = true;
}
public override void Deactivate(params object[] args)
{
isActive = false;
}
public override void Reset()
{
isActive = false;
}
public override bool IsActive()
{
return isActive || intensity > 0f;
}
}
}
-9
View File
@@ -145,10 +145,6 @@ namespace CalamityMod.NPCs.Abyss
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
@@ -158,10 +154,5 @@ namespace CalamityMod.NPCs.Abyss
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/Wyrm2"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(ModContent.BuffType<CrushDepth>(), 500, true);
}
}
}
-9
View File
@@ -145,10 +145,6 @@ namespace CalamityMod.NPCs.Abyss
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
@@ -158,10 +154,5 @@ namespace CalamityMod.NPCs.Abyss
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/Wyrm3"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(ModContent.BuffType<CrushDepth>(), 500, true);
}
}
}
+56 -70
View File
@@ -1,7 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,15 +16,17 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
npc.damage = 100; //70
npc.width = 60; //36
npc.damage = 100;
npc.width = 60;
npc.height = 88;
npc.defense = 0;
npc.lifeMax = 1000000;
npc.aiStyle = -1; //new
aiType = -1; //new
npc.LifeMaxNERB(1000000, 1150000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.Opacity = 0f;
npc.behindTiles = true;
npc.noGravity = true;
npc.noTileCollide = true;
@@ -37,18 +38,15 @@ namespace CalamityMod.NPCs.Abyss
npc.chaseable = false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false;
public override void AI()
{
npc.damage = 0;
if (npc.ai[2] > 0f)
{
npc.realLife = (int)npc.ai[2];
}
bool flag = false;
if (npc.ai[1] <= 0f)
{
@@ -64,104 +62,92 @@ namespace CalamityMod.NPCs.Abyss
npc.HitEffect(0, 10.0);
npc.checkDead();
}
if (!NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmHeadHuge>()))
{
npc.active = false;
}
if (Main.npc[(int)npc.ai[1]].alpha < 128)
{
npc.alpha -= 42;
if (npc.alpha < 0)
{
npc.alpha = 0;
}
}
Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2);
num191 = (float)((int)(num191 / 16f) * 16);
num192 = (float)((int)(num192 / 16f) * 16);
vector18.X = (float)((int)(vector18.X / 16f) * 16);
vector18.Y = (float)((int)(vector18.Y / 16f) * 16);
bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f;
if (!invisiblePhase)
{
if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f)
{
npc.Opacity += 0.15f;
if (npc.Opacity > 1f)
npc.Opacity = 1f;
}
}
else
{
npc.Opacity -= 0.05f;
if (npc.Opacity < 0f)
npc.Opacity = 0f;
}
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2);
num191 = (int)(num191 / 16f) * 16;
num192 = (int)(num192 / 16f) * 16;
vector18.X = (int)(vector18.X / 16f) * 16;
vector18.Y = (int)(vector18.Y / 16f) * 16;
num191 -= vector18.X;
num192 -= vector18.Y;
float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length)
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
{
try
{
vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
} catch
{
}
npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f;
num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
int num194 = npc.width;
num193 = (num193 - (float)num194) / num193;
num193 = (num193 - num194) / num193;
num191 *= num193;
num192 *= num193;
npc.velocity = Vector2.Zero;
npc.position.X = npc.position.X + num191;
npc.position.Y = npc.position.Y + num192;
if (num191 < 0f)
{
npc.spriteDirection = -1;
}
else if (num191 > 0f)
{
npc.spriteDirection = 1;
}
}
}
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
if (npc.spriteDirection == 1)
{
spriteEffects = SpriteEffects.FlipHorizontally;
}
SpriteEffects spriteEffects = npc.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
Vector2 center = new Vector2(npc.Center.X, npc.Center.Y);
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 / 2);
Vector2 vector = center - Main.screenPosition;
vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Height / Main.npcFrameCount[npc.type])) * 1f / 2f;
vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Height) * 0.5f;
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY);
Color color = new Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity;
Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge"), vector,
new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f);
}
public override bool CheckActive()
{
return false;
}
public override bool CheckActive() => false;
public override bool PreNPCLoot()
{
return false;
}
public override bool PreNPCLoot() => false;
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult3"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(ModContent.BuffType<CrushDepth>(), 500, true);
}
}
}
+74 -70
View File
@@ -1,7 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,15 +16,17 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
npc.damage = 100; //70
npc.width = 60; //36
npc.damage = 100;
npc.width = 60;
npc.height = 88;
npc.defense = 0;
npc.lifeMax = 1000000;
npc.aiStyle = -1; //new
aiType = -1; //new
npc.LifeMaxNERB(1000000, 1150000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.Opacity = 0f;
npc.behindTiles = true;
npc.noGravity = true;
npc.noTileCollide = true;
@@ -37,18 +38,15 @@ namespace CalamityMod.NPCs.Abyss
npc.chaseable = false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false;
public override void AI()
{
npc.damage = 0;
if (npc.ai[2] > 0f)
{
npc.realLife = (int)npc.ai[2];
}
bool flag = false;
if (npc.ai[1] <= 0f)
{
@@ -64,104 +62,110 @@ namespace CalamityMod.NPCs.Abyss
npc.HitEffect(0, 10.0);
npc.checkDead();
}
if (!NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmHeadHuge>()))
{
npc.active = false;
}
if (Main.npc[(int)npc.ai[1]].alpha < 128)
{
npc.alpha -= 42;
if (npc.alpha < 0)
{
npc.alpha = 0;
}
}
Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2);
num191 = (float)((int)(num191 / 16f) * 16);
num192 = (float)((int)(num192 / 16f) * 16);
vector18.X = (float)((int)(vector18.X / 16f) * 16);
vector18.Y = (float)((int)(vector18.Y / 16f) * 16);
bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f;
if (!invisiblePhase)
{
if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f)
{
npc.Opacity += 0.15f;
if (npc.Opacity > 1f)
npc.Opacity = 1f;
}
}
else
{
npc.Opacity -= 0.05f;
if (npc.Opacity < 0f)
npc.Opacity = 0f;
}
bool shootShadowFireballs = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 6f && Main.npc[(int)npc.ai[2]].Calamity().newAI[2] > 0f;
if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient)
{
if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 320f)
{
npc.ai[3] += 1f;
if (npc.ai[3] >= 90f)
{
float fireballVelocity = 4f;
Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center;
Vector2 velocity = Vector2.Normalize(destination) * fireballVelocity;
int type = ProjectileID.CultistBossIceMist;
int damage = npc.GetProjectileDamage(type);
Projectile.NewProjectile(npc.Center, velocity, type, damage, 0f, Main.myPlayer);
}
}
}
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2);
num191 = (int)(num191 / 16f) * 16;
num192 = (int)(num192 / 16f) * 16;
vector18.X = (int)(vector18.X / 16f) * 16;
vector18.Y = (int)(vector18.Y / 16f) * 16;
num191 -= vector18.X;
num192 -= vector18.Y;
float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length)
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
{
try
{
vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
} catch
{
}
npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f;
num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
int num194 = npc.width;
num193 = (num193 - (float)num194) / num193;
num193 = (num193 - num194) / num193;
num191 *= num193;
num192 *= num193;
npc.velocity = Vector2.Zero;
npc.position.X = npc.position.X + num191;
npc.position.Y = npc.position.Y + num192;
if (num191 < 0f)
{
npc.spriteDirection = -1;
}
else if (num191 > 0f)
{
npc.spriteDirection = 1;
}
}
}
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
if (npc.spriteDirection == 1)
{
spriteEffects = SpriteEffects.FlipHorizontally;
}
SpriteEffects spriteEffects = npc.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
Vector2 center = new Vector2(npc.Center.X, npc.Center.Y);
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 / 2);
Vector2 vector = center - Main.screenPosition;
vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Height / Main.npcFrameCount[npc.type])) * 1f / 2f;
vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Height) * 0.5f;
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY);
Color color = new Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity;
Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge"), vector,
new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f);
}
public override bool CheckActive()
{
return false;
}
public override bool CheckActive() => false;
public override bool PreNPCLoot()
{
return false;
}
public override bool PreNPCLoot() => false;
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult2"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(ModContent.BuffType<CrushDepth>(), 500, true);
}
}
}
+1 -1
View File
@@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.Abyss
public override void AI()
{
if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState)
if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState || NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmHeadHuge>()))
{
detectsPlayer = true;
npc.damage = Main.expertMode ? 340 : 170;
File diff suppressed because it is too large. Load diff
-10
View File
@@ -144,10 +144,6 @@ namespace CalamityMod.NPCs.Abyss
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
@@ -157,11 +153,5 @@ namespace CalamityMod.NPCs.Abyss
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/Wyrm4"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(BuffID.Bleeding, 60, true);
player.AddBuff(ModContent.BuffType<CrushDepth>(), 60, true);
}
}
}
+57 -71
View File
@@ -1,6 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,15 +16,17 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
npc.damage = 100; //70
npc.width = 86; //28
npc.height = 120; //28
npc.damage = 100;
npc.width = 86;
npc.height = 120;
npc.defense = 0;
npc.lifeMax = 1000000;
npc.aiStyle = -1; //new
aiType = -1; //new
npc.LifeMaxNERB(1000000, 1150000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.Opacity = 0f;
npc.behindTiles = true;
npc.noGravity = true;
npc.noTileCollide = true;
@@ -36,18 +38,15 @@ namespace CalamityMod.NPCs.Abyss
npc.chaseable = false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false;
public override void AI()
{
npc.damage = 0;
if (npc.ai[2] > 0f)
{
npc.realLife = (int)npc.ai[2];
}
bool flag = false;
if (npc.ai[1] <= 0f)
{
@@ -63,105 +62,92 @@ namespace CalamityMod.NPCs.Abyss
npc.HitEffect(0, 10.0);
npc.checkDead();
}
if (!NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmHeadHuge>()))
{
npc.active = false;
}
if (Main.npc[(int)npc.ai[1]].alpha < 128)
{
npc.alpha -= 42;
if (npc.alpha < 0)
{
npc.alpha = 0;
}
}
Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2);
num191 = (float)((int)(num191 / 16f) * 16);
num192 = (float)((int)(num192 / 16f) * 16);
vector18.X = (float)((int)(vector18.X / 16f) * 16);
vector18.Y = (float)((int)(vector18.Y / 16f) * 16);
bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f;
if (!invisiblePhase)
{
if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f)
{
npc.Opacity += 0.15f;
if (npc.Opacity > 1f)
npc.Opacity = 1f;
}
}
else
{
npc.Opacity -= 0.05f;
if (npc.Opacity < 0f)
npc.Opacity = 0f;
}
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2);
num191 = (int)(num191 / 16f) * 16;
num192 = (int)(num192 / 16f) * 16;
vector18.X = (int)(vector18.X / 16f) * 16;
vector18.Y = (int)(vector18.Y / 16f) * 16;
num191 -= vector18.X;
num192 -= vector18.Y;
float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length)
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
{
try
{
vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
} catch
{
}
npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f;
num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192));
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
int num194 = npc.width;
num193 = (num193 - (float)num194) / num193;
num193 = (num193 - num194) / num193;
num191 *= num193;
num192 *= num193;
npc.velocity = Vector2.Zero;
npc.position.X = npc.position.X + num191;
npc.position.Y = npc.position.Y + num192;
if (num191 < 0f)
{
npc.spriteDirection = -1;
}
else if (num191 > 0f)
{
npc.spriteDirection = 1;
}
}
}
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
if (npc.spriteDirection == 1)
{
spriteEffects = SpriteEffects.FlipHorizontally;
}
SpriteEffects spriteEffects = npc.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
Vector2 center = new Vector2(npc.Center.X, npc.Center.Y);
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 / 2);
Vector2 vector = center - Main.screenPosition;
vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Height / Main.npcFrameCount[npc.type])) * 1f / 2f;
vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Height) * 0.5f;
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY);
Color color = new Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity;
Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge"), vector,
new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f);
}
public override bool CheckActive()
{
return false;
}
public override bool CheckActive() => false;
public override bool PreNPCLoot()
{
return false;
}
public override bool PreNPCLoot() => false;
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 3; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 10; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default, 1f);
}
Gore.NewGore(npc.Center, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult4"), 1f);
}
}
public override void OnHitPlayer(Player player, int damage, bool crit)
{
player.AddBuff(BuffID.Bleeding, 60, true);
player.AddBuff(ModContent.BuffType<CrushDepth>(), 60, true);
}
}
}
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERB(80000, 92000, 10000000);
npc.LifeMaxNERB(80000, 92000, 1000000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.behindTiles = true;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERB(80000, 92000, 10000000);
npc.LifeMaxNERB(80000, 92000, 1000000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.behindTiles = true;
+8 -11
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.AquaticScourge
npc.DR_NERD(0.05f);
npc.aiStyle = -1;
aiType = -1;
npc.LifeMaxNERB(80000, 92000, 10000000);
npc.LifeMaxNERB(80000, 92000, 1000000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
@@ -82,6 +82,7 @@ namespace CalamityMod.NPCs.AquaticScourge
{
if (npc.justHit || npc.life <= npc.lifeMax * 0.99 || BossRushEvent.BossRushActive)
music = CalamityMod.Instance.GetMusicFromMusicMod("AquaticScourge") ?? MusicID.Boss2;
CalamityAI.AquaticScourgeAI(npc, mod, true);
}
@@ -130,23 +131,22 @@ namespace CalamityMod.NPCs.AquaticScourge
public override bool? CanBeHitByProjectile(Projectile projectile)
{
if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention)
{
return npc.Calamity().newAI[0] == 1f;
}
return null;
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.playerSafe)
{
return 0f;
}
if (spawnInfo.player.Calamity().ZoneSulphur && spawnInfo.water)
{
if (!NPC.AnyNPCs(ModContent.NPCType<AquaticScourgeHead>()))
return 0.01f;
}
return 0f;
}
@@ -239,15 +239,13 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void HitEffect(int hitDirection, double damage)
{
for (int k = 0; k < 5; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
}
if (npc.life <= 0)
{
for (int k = 0; k < 15; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
}
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AquaticScourgeGores/ASHead"), 1f);
}
}
@@ -255,9 +253,8 @@ namespace CalamityMod.NPCs.AquaticScourge
public override bool CheckActive()
{
if (npc.Calamity().newAI[0] == 1f && !Main.player[npc.target].dead && npc.Calamity().newAI[1] != 1f)
{
return false;
}
return true;
}
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERB(80000, 92000, 10000000);
npc.LifeMaxNERB(80000, 92000, 1000000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.behindTiles = true;
+1 -1
View File
@@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.AstrumAureus
npc.height = 280;
npc.defense = 40;
npc.DR_NERD(0.15f);
npc.LifeMaxNERB(84000, NPC.downedMoonlord ? 292500 : 107000, 7400000); // 30 seconds in boss rush
npc.LifeMaxNERB(84000, NPC.downedMoonlord ? 292500 : 107000, 740000); // 30 seconds in boss rush
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
-4
View File
@@ -31,10 +31,6 @@ namespace CalamityMod.NPCs.AstrumAureus
npc.alpha = 255;
npc.defense = 10;
npc.lifeMax = 3000;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 30000;
}
npc.knockBackResist = 0f;
npc.noGravity = true;
npc.noTileCollide = true;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 38;
npc.height = 44;
npc.defense = 50;
npc.LifeMaxNERB(187500, 225000, 6500000);
npc.LifeMaxNERB(187500, 225000, 650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+1 -1
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 56;
npc.height = 56;
npc.defense = 25;
npc.LifeMaxNERB(187500, 225000, 6500000);
npc.LifeMaxNERB(187500, 225000, 650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 52;
npc.height = 68;
npc.defense = 75;
npc.LifeMaxNERB(187500, 225000, 6500000);
npc.LifeMaxNERB(187500, 225000, 650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
}
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 100000;
npc.lifeMax = 10000;
}
}
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
npc.height = 150;
npc.defense = 15;
npc.value = Item.buyPrice(0, 12, 0, 0);
npc.LifeMaxNERB(30000, 41000, 6500000);
npc.LifeMaxNERB(30000, 41000, 650000);
npc.DR_NERD(0.15f);
if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive)
{
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.DR_NERD(0.1f, null, null, null, true);
CalamityGlobalNPC global = npc.Calamity();
global.multDRReductions.Add(BuffID.CursedInferno, 0.9f);
npc.LifeMaxNERB(170625, 189375, 3000000); // Old HP - 227500, 252500
npc.LifeMaxNERB(170625, 189375, 300000); // Old HP - 227500, 252500
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.width = 120;
npc.height = 80;
npc.defense = 20;
npc.LifeMaxNERB(9000, 11250, 50000); // Old HP - 12000, 15000
npc.LifeMaxNERB(9000, 11250, 5000); // Old HP - 12000, 15000
npc.knockBackResist = 0f;
npc.lavaImmune = true;
npc.noGravity = true;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.defense = 15;
npc.DR_NERD(0.15f);
npc.value = 0f;
npc.LifeMaxNERB(37500, 51750, 5200000);
npc.LifeMaxNERB(37500, 51750, 520000);
if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.height = 120;
npc.defense = 10;
npc.DR_NERD(0.15f);
npc.LifeMaxNERB(9000, 13200, 800000);
npc.LifeMaxNERB(9000, 13200, 80000);
if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.height = 120;
npc.defense = 10;
npc.DR_NERD(0.15f);
npc.LifeMaxNERB(7500, 11025, 800000);
npc.LifeMaxNERB(7500, 11025, 80000);
if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.defense = 25;
npc.value = Item.buyPrice(0, 15, 0, 0);
npc.DR_NERD(0.15f);
npc.LifeMaxNERB(28125, 38812, 3900000);
npc.LifeMaxNERB(28125, 38812, 390000);
if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.lifeMax = 200;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 30000;
npc.lifeMax = 3000;
}
npc.aiStyle = 5;
aiType = NPCID.Probe;
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.lifeMax = CalamityWorld.death ? 1500 : 2500;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 150000;
npc.lifeMax = 15000;
}
npc.HitSound = SoundID.NPCHit4;
npc.DeathSound = SoundID.NPCDeath14;
+24 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Events;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.Astral;
using CalamityMod.NPCs.Crags;
@@ -10515,7 +10516,18 @@ namespace CalamityMod.NPCs
if (malice)
enrage = true;
npc.defense = turboEnrage ? (npc.defDefense * 50) : npc.defDefense;
if (turboEnrage)
{
npc.defense = npc.defDefense * 50;
npc.Calamity().DR = 0.99f;
npc.Calamity().unbreakableDR = true;
}
else
{
npc.defense = npc.defDefense;
npc.Calamity().DR = 0.25f;
npc.Calamity().unbreakableDR = false;
}
// Float through tiles or not
bool flag44 = false;
@@ -12842,7 +12854,7 @@ namespace CalamityMod.NPCs
int rateOfChange = 1;
float splitProjVelocity = 5f;
// Percent life remaining for Cultist
// Percent life remaining for Cultist or Eidolon Wyrm
float lifeRatio = Main.npc[(int)npc.ai[0]].life / (float)Main.npc[(int)npc.ai[0]].lifeMax;
bool phase2 = lifeRatio < 0.7f;
@@ -12851,7 +12863,7 @@ namespace CalamityMod.NPCs
bool kill = npc.ai[1] < 0f || !Main.npc[(int)npc.ai[0]].active;
int target = Main.maxPlayers;
if (Main.npc[(int)npc.ai[0]].type == NPCID.CultistBoss)
if (Main.npc[(int)npc.ai[0]].type == NPCID.CultistBoss || Main.npc[(int)npc.ai[0]].type == ModContent.NPCType<EidolonWyrmHeadHuge>())
{
if (target == Main.maxPlayers)
target = Main.npc[(int)npc.ai[0]].target;
@@ -12861,6 +12873,9 @@ namespace CalamityMod.NPCs
if (phase4 || death)
rateOfChange = 3;
if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType<EidolonWyrmHeadHuge>())
npc.dontTakeDamage = true;
}
else
kill = true;
@@ -12881,6 +12896,12 @@ namespace CalamityMod.NPCs
double deg = npc.ai[3];
double rad = deg * (Math.PI / 180);
double dist = 550;
if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType<EidolonWyrmHeadHuge>())
{
float aiGateValue = Main.npc[(int)npc.ai[0]].Calamity().newAI[2] - 30f;
int ancientDoomScale = (int)(aiGateValue / 120f);
dist += ancientDoomScale * 45;
}
npc.position.X = Main.player[target].Center.X - (int)(Math.Cos(rad) * dist) - npc.width / 2;
npc.position.Y = Main.player[target].Center.Y - (int)(Math.Sin(rad) * dist) - npc.height / 2;
float spinVelocity = 8f * (1f - (npc.ai[1] / duration));
+65 -54
View File
@@ -212,77 +212,77 @@ namespace CalamityMod.NPCs
public static SortedDictionary<int, int> BossRushHPChanges = new SortedDictionary<int, int>
{
// Tier 1
{ NPCID.QueenBee, 3150000 }, // 30 seconds
{ NPCID.QueenBee, 315000 }, // 30 seconds
{ NPCID.BrainofCthulhu, 1000000 }, // 30 seconds with creepers
{ NPCID.Creeper, 100000 },
{ NPCID.BrainofCthulhu, 100000 }, // 30 seconds with creepers
{ NPCID.Creeper, 10000 },
{ NPCID.KingSlime, 3000000 }, // 30 seconds
{ NPCID.BlueSlime, 36000 },
{ NPCID.SlimeSpiked, 72000 },
{ NPCID.GreenSlime, 27000 },
{ NPCID.RedSlime, 54000 },
{ NPCID.PurpleSlime, 72000 },
{ NPCID.YellowSlime, 63000 },
{ NPCID.IceSlime, 45000 },
{ NPCID.UmbrellaSlime, 54000 },
{ NPCID.RainbowSlime, 300000 },
{ NPCID.Pinky, 150000 },
{ NPCID.KingSlime, 300000 }, // 30 seconds
{ NPCID.BlueSlime, 3600 },
{ NPCID.SlimeSpiked, 7200 },
{ NPCID.GreenSlime, 2700 },
{ NPCID.RedSlime, 5400 },
{ NPCID.PurpleSlime, 7200 },
{ NPCID.YellowSlime, 6300 },
{ NPCID.IceSlime, 4500 },
{ NPCID.UmbrellaSlime, 5400 },
{ NPCID.RainbowSlime, 30000 },
{ NPCID.Pinky, 15000 },
{ NPCID.EyeofCthulhu, 4500000 }, // 30 seconds
{ NPCID.ServantofCthulhu, 60000 },
{ NPCID.EyeofCthulhu, 450000 }, // 30 seconds
{ NPCID.ServantofCthulhu, 6000 },
{ NPCID.SkeletronPrime, 1100000 }, // 30 seconds
{ NPCID.PrimeVice, 540000 },
{ NPCID.PrimeCannon, 450000 },
{ NPCID.PrimeSaw, 450000 },
{ NPCID.PrimeLaser, 380000 },
{ NPCID.SkeletronPrime, 110000 }, // 30 seconds
{ NPCID.PrimeVice, 54000 },
{ NPCID.PrimeCannon, 45000 },
{ NPCID.PrimeSaw, 45000 },
{ NPCID.PrimeLaser, 38000 },
{ NPCID.Golem, 500000 }, // 30 seconds
{ NPCID.GolemHead, 300000 },
{ NPCID.GolemHeadFree, 300000 },
{ NPCID.GolemFistLeft, 250000 },
{ NPCID.GolemFistRight, 250000 },
{ NPCID.Golem, 50000 }, // 30 seconds
{ NPCID.GolemHead, 30000 },
{ NPCID.GolemHeadFree, 30000 },
{ NPCID.GolemFistLeft, 25000 },
{ NPCID.GolemFistRight, 25000 },
{ NPCID.EaterofWorldsHead, 100000 }, // 30 seconds + immunity timer at start
{ NPCID.EaterofWorldsBody, 100000 },
{ NPCID.EaterofWorldsTail, 100000 },
{ NPCID.EaterofWorldsHead, 10000 }, // 30 seconds + immunity timer at start
{ NPCID.EaterofWorldsBody, 10000 },
{ NPCID.EaterofWorldsTail, 10000 },
// Tier 2
{ NPCID.TheDestroyer, 2500000 }, // 30 seconds + immunity timer at start
{ NPCID.TheDestroyerBody, 2500000 },
{ NPCID.TheDestroyerTail, 2500000 },
{ NPCID.Probe, 100000 },
{ NPCID.TheDestroyer, 250000 }, // 30 seconds + immunity timer at start
{ NPCID.TheDestroyerBody, 250000 },
{ NPCID.TheDestroyerTail, 250000 },
{ NPCID.Probe, 10000 },
{ NPCID.Spazmatism, 1500000 }, // 30 seconds
{ NPCID.Retinazer, 1250000 },
{ NPCID.Spazmatism, 150000 }, // 30 seconds
{ NPCID.Retinazer, 125000 },
{ NPCID.WallofFlesh, 4500000 }, // 30 seconds
{ NPCID.WallofFleshEye, 4500000 },
{ NPCID.WallofFlesh, 450000 }, // 30 seconds
{ NPCID.WallofFleshEye, 450000 },
{ NPCID.SkeletronHead, 1600000 }, // 30 seconds
{ NPCID.SkeletronHand, 600000 },
{ NPCID.SkeletronHead, 160000 }, // 30 seconds
{ NPCID.SkeletronHand, 60000 },
// Tier 3
{ NPCID.CultistBoss, 2200000 }, // 30 seconds
{ NPCID.CultistDragonHead, 600000 },
{ NPCID.CultistDragonBody1, 600000 },
{ NPCID.CultistDragonBody2, 600000 },
{ NPCID.CultistDragonBody3, 600000 },
{ NPCID.CultistDragonBody4, 600000 },
{ NPCID.CultistDragonTail, 600000 },
{ NPCID.AncientCultistSquidhead, 500000 },
{ NPCID.CultistBoss, 220000 }, // 30 seconds
{ NPCID.CultistDragonHead, 60000 },
{ NPCID.CultistDragonBody1, 60000 },
{ NPCID.CultistDragonBody2, 60000 },
{ NPCID.CultistDragonBody3, 60000 },
{ NPCID.CultistDragonBody4, 60000 },
{ NPCID.CultistDragonTail, 60000 },
{ NPCID.AncientCultistSquidhead, 50000 },
{ NPCID.Plantera, 1600000 }, // 30 seconds
{ NPCID.PlanterasTentacle, 400000 },
{ NPCID.Plantera, 160000 }, // 30 seconds
{ NPCID.PlanterasTentacle, 40000 },
// Tier 4
{ NPCID.DukeFishron, 2900000 }, // 30 seconds
{ NPCID.DukeFishron, 290000 }, // 30 seconds
{ NPCID.MoonLordCore, 1600000 }, // 1 minute
{ NPCID.MoonLordHand, 450000 },
{ NPCID.MoonLordHead, 600000 },
{ NPCID.MoonLordLeechBlob, 8000 }
{ NPCID.MoonLordCore, 160000 }, // 1 minute
{ NPCID.MoonLordHand, 45000 },
{ NPCID.MoonLordHead, 60000 },
{ NPCID.MoonLordLeechBlob, 800 }
// 8 minutes in total for vanilla Boss Rush bosses
};
@@ -2011,6 +2011,13 @@ namespace CalamityMod.NPCs
if (NPC.LunarApocalypseIsUp)
PillarEventProgressionEdit(npc);
// Adult Wyrm Ancient Doom
if (npc.type == NPCID.AncientDoom)
{
if (Main.npc[(int)npc.ai[0]].type == NPCType<EidolonWyrmHeadHuge>())
return CalamityGlobalAI.BuffedAncientDoomAI(npc, mod);
}
if (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)
{
switch (npc.type)
@@ -5226,6 +5233,10 @@ namespace CalamityMod.NPCs
{
return CalamityWorld.downedSCal;
}
else if (type == NPCType<EidolonWyrmHeadHuge>())
{
return CalamityWorld.downedAdultEidolonWyrm;
}
return true;
}
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
global.DR = 0.5f;
bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1;
npc.LifeMaxNERB(notDoGFight ? 67200 : 16800, notDoGFight ? 77280 : 19320, 720000);
npc.LifeMaxNERB(notDoGFight ? 67200 : 16800, notDoGFight ? 77280 : 19320, 72000);
// If fought alone, Ceaseless Void plays its own theme
if (notDoGFight)
+1 -1
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
}
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 44000;
npc.lifeMax = 4400;
}
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.Crabulon
npc.lifeMax = 25;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 150000;
npc.lifeMax = 15000;
}
aiType = -1;
npc.knockBackResist = 0.75f;
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Crabulon
npc.width = 280;
npc.height = 160;
npc.defense = 8;
npc.LifeMaxNERB(3000, 4000, 11000000);
npc.LifeMaxNERB(3000, 4000, 1100000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.lifeMax = 220;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 30000;
npc.lifeMax = 3000;
}
npc.aiStyle = -1;
aiType = -1;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.lifeMax = 300;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 40000;
npc.lifeMax = 4000;
}
npc.aiStyle = -1;
aiType = -1;
+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.height = 88;
npc.defense = 12;
npc.DR_NERD(0.1f);
npc.LifeMaxNERB(18795, 27615, 3000000);
npc.LifeMaxNERB(18795, 27615, 300000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.lifeMax = 1400;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 100000;
npc.lifeMax = 10000;
}
npc.alpha = 255;
npc.HitSound = SoundID.NPCHit5;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.lifeMax = 220;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 30000;
npc.lifeMax = 3000;
}
npc.knockBackResist = 0f;
npc.canGhostHeal = false;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.height = 36;
npc.defense = 6;
npc.DR_NERD(0.05f);
npc.LifeMaxNERB(2600, 3000, 16500000);
npc.LifeMaxNERB(2600, 3000, 1650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.lifeMax = 800;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 350000;
npc.lifeMax = 35000;
}
npc.aiStyle = 6;
aiType = -1;
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.npcSlots = 12f;
npc.width = 32;
npc.height = 80;
npc.LifeMaxNERB(2600, 3000, 16500000);
npc.LifeMaxNERB(2600, 3000, 1650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.lifeMax = 800;
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 350000;
npc.lifeMax = 35000;
}
npc.aiStyle = 6;
aiType = -1;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.height = 48;
npc.defense = 9;
npc.DR_NERD(0.1f);
npc.LifeMaxNERB(2600, 3000, 16500000);
npc.LifeMaxNERB(2600, 3000, 1650000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
Loaded 100 of 261 files, more files were not shown because too many files have changed in this diff. Show more