Merge branch 'master' into biome-blade-changes
This commit is contained in:
commit
554ef5062b
91 files changed
+1689
-1775
No files matched your search
@@ -444,13 +444,14 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle frame = texture.Frame(1, 4, 0, modPlayer.tailFrame);
|
||||
if (modPlayer.fathomSwarmerTail)
|
||||
{
|
||||
int dyeShader = drawPlayer.dye?[2].dye ?? 0;
|
||||
int frameSizeY = texture.Height / 4;
|
||||
int centerX = (int)(drawInfo.position.X + drawPlayer.width / 2f);
|
||||
int centerY = (int)(drawInfo.position.Y + drawPlayer.height / 2f);
|
||||
int drawX = (int)(drawInfo.position.X + drawPlayer.width / 2f - Main.screenPosition.X - (3 * drawPlayer.direction));
|
||||
int drawY = (int)(drawInfo.position.Y + drawPlayer.height / 2f - Main.screenPosition.Y);
|
||||
Color color = Lighting.GetColor(centerX, centerY);
|
||||
DrawData tailDrawData = new DrawData(texture, new Vector2(drawX, drawY), frame, color, 0f, new Vector2(texture.Width / 2f, frameSizeY / 2f), 1f, drawInfo.spriteEffects, 0);
|
||||
DrawData tailDrawData = new DrawData(texture, new Vector2(drawX, drawY), frame, drawInfo.pantsColor, 0f, new Vector2(texture.Width / 2f, frameSizeY / 2f), 1f, drawInfo.spriteEffects, 0);
|
||||
tailDrawData.shader = dyeShader;
|
||||
Main.playerDrawData.Add(tailDrawData);
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -772,7 +772,7 @@ namespace CalamityMod
|
||||
NPCType<OverloadedSoldier>(),
|
||||
NPCType<PerennialSlime>(),
|
||||
NPCType<PhantomDebris>(),
|
||||
NPCType<Pitbull>(),
|
||||
NPCType<Rotdog>(),
|
||||
NPCType<SandTortoise>(),
|
||||
NPCType<Scryllar>(),
|
||||
NPCType<ScryllarRage>(),
|
||||
|
||||
+65
-57
@@ -585,88 +585,96 @@ namespace CalamityMod
|
||||
#region Boss Kill Times
|
||||
private void SetupBossKillTimes()
|
||||
{
|
||||
// 3600 = 1 minute
|
||||
|
||||
// Kill times are measured exactly in frames.
|
||||
// 60 frames = 1 second
|
||||
// 3600 frames = 1 minute
|
||||
bossKillTimes = new SortedDictionary<int, int> {
|
||||
{ NPCID.KingSlime, 3600 },
|
||||
{ NPCID.EyeofCthulhu, 5400 },
|
||||
{ NPCID.EaterofWorldsHead, 7200 },
|
||||
//
|
||||
// VANILLA BOSSES
|
||||
//
|
||||
{ NPCID.KingSlime, 3600 }, // 1:00 (60 seconds)
|
||||
{ NPCID.EyeofCthulhu, 5400 }, // 1:30 (90 seconds)
|
||||
{ NPCID.EaterofWorldsHead, 7200 }, // 2:00 (120 seconds)
|
||||
{ NPCID.EaterofWorldsBody, 7200 },
|
||||
{ NPCID.EaterofWorldsTail, 7200 },
|
||||
{ NPCID.BrainofCthulhu, 5400 },
|
||||
{ NPCID.Creeper, 1800 },
|
||||
{ NPCID.QueenBee, 7200 },
|
||||
{ NPCID.SkeletronHead, 7200 },
|
||||
{ NPCID.WallofFlesh, 7200 },
|
||||
{ NPCID.BrainofCthulhu, 5400 }, // 1:30 (90 seconds)
|
||||
{ NPCID.Creeper, 1800 }, // 0:30 (30 seconds)
|
||||
{ NPCID.QueenBee, 7200 }, // 2:00 (120 seconds)
|
||||
{ NPCID.SkeletronHead, 9000 }, // 2:30 (150 seconds)
|
||||
{ NPCID.WallofFlesh, 7200 }, // 2:00 (120 seconds)
|
||||
{ NPCID.WallofFleshEye, 7200 },
|
||||
{ NPCID.Spazmatism, 10800 },
|
||||
{ NPCID.Spazmatism, 10800 }, // 3:00 (180 seconds)
|
||||
{ NPCID.Retinazer, 10800 },
|
||||
{ NPCID.TheDestroyer, 10800 },
|
||||
{ NPCID.TheDestroyer, 10800 }, // 3:00 (180 seconds)
|
||||
{ NPCID.TheDestroyerBody, 10800 },
|
||||
{ NPCID.TheDestroyerTail, 10800 },
|
||||
{ NPCID.SkeletronPrime, 10800 },
|
||||
{ NPCID.Plantera, 10800 },
|
||||
{ NPCID.Golem, 9000 },
|
||||
{ NPCID.GolemHead, 3600 },
|
||||
{ NPCID.DukeFishron, 9000 },
|
||||
{ NPCID.CultistBoss, 9000 },
|
||||
{ NPCID.MoonLordCore, 14400 },
|
||||
{ NPCID.MoonLordHand, 7200 },
|
||||
{ NPCID.MoonLordHead, 7200 },
|
||||
{ ModContent.NPCType<DesertScourgeHead>(), 3600 },
|
||||
{ NPCID.SkeletronPrime, 10800 }, // 3:00 (180 seconds)
|
||||
{ NPCID.Plantera, 10800 }, // 3:00 (180 seconds)
|
||||
{ NPCID.Golem, 9000 }, // 2:30 (150 seconds)
|
||||
{ NPCID.GolemHead, 3600 }, // 1:00 (60 seconds)
|
||||
{ NPCID.DukeFishron, 9000 }, // 2:30 (150 seconds)
|
||||
{ NPCID.CultistBoss, 9000 }, // 2:30 (150 seconds)
|
||||
{ NPCID.MoonLordCore, 14400 }, // 4:00 (240 seconds)
|
||||
{ NPCID.MoonLordHand, 7200 }, // 2:00 (120 seconds)
|
||||
{ NPCID.MoonLordHead, 7200 }, // 2:00 (120 seconds)
|
||||
|
||||
//
|
||||
// CALAMITY BOSSES
|
||||
//
|
||||
{ ModContent.NPCType<DesertScourgeHead>(), 3600 }, // 1:00 (60 seconds)
|
||||
{ ModContent.NPCType<DesertScourgeBody>(), 3600 },
|
||||
{ ModContent.NPCType<DesertScourgeTail>(), 3600 },
|
||||
{ ModContent.NPCType<CrabulonIdle>(), 5400 },
|
||||
{ ModContent.NPCType<HiveMind>(), 7200 },
|
||||
{ ModContent.NPCType<PerforatorHive>(), 7200 },
|
||||
{ ModContent.NPCType<SlimeGodCore>(), 10800 },
|
||||
{ ModContent.NPCType<SlimeGod>(), 5400 },
|
||||
{ ModContent.NPCType<SlimeGodRun>(), 5400 },
|
||||
{ ModContent.NPCType<SlimeGodSplit>(), 5400 },
|
||||
{ ModContent.NPCType<SlimeGodRunSplit>(), 5400 },
|
||||
{ ModContent.NPCType<Cryogen>(), 10800 },
|
||||
{ ModContent.NPCType<AquaticScourgeHead>(), 7200 },
|
||||
{ ModContent.NPCType<CrabulonIdle>(), 5400 }, // 1:30 (90 seconds)
|
||||
{ ModContent.NPCType<HiveMind>(), 7200 }, // 2:00 (120 seconds)
|
||||
{ ModContent.NPCType<PerforatorHive>(), 7200 }, // 2:00 (120 seconds)
|
||||
{ ModContent.NPCType<SlimeGodCore>(), 10800 }, // 3:00 (180 seconds) -- total length of Slime God fight
|
||||
{ ModContent.NPCType<SlimeGod>(), 3600 }, // 1:00 (60 seconds)
|
||||
{ ModContent.NPCType<SlimeGodRun>(), 3600 }, // 1:00 (60 seconds)
|
||||
{ ModContent.NPCType<SlimeGodSplit>(), 3600 }, // 1:00 (60 seconds) -- split slimes should spawn at 1:00 and die at around 2:00
|
||||
{ ModContent.NPCType<SlimeGodRunSplit>(), 3600 }, // 1:00 (60 seconds)
|
||||
{ ModContent.NPCType<Cryogen>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<AquaticScourgeHead>(), 7200 }, // 2:00 (120 seconds)
|
||||
{ ModContent.NPCType<AquaticScourgeBody>(), 7200 },
|
||||
{ ModContent.NPCType<AquaticScourgeBodyAlt>(), 7200 },
|
||||
{ ModContent.NPCType<AquaticScourgeTail>(), 7200 },
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 10800 },
|
||||
{ ModContent.NPCType<CalamitasRun3>(), 14400 },
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<CalamitasRun3>(), 14400 }, // 4:00 (240 seconds)
|
||||
{ ModContent.NPCType<Siren>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<Leviathan>(), 10800 },
|
||||
{ ModContent.NPCType<Siren>(), 10800 },
|
||||
{ ModContent.NPCType<AstrumAureus>(), 10800 },
|
||||
{ ModContent.NPCType<AstrumDeusHeadSpectral>(), 7200 },
|
||||
{ ModContent.NPCType<AstrumAureus>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<AstrumDeusHeadSpectral>(), 7200 }, // 2:00 (120 seconds) -- first phase is 1:00
|
||||
{ ModContent.NPCType<AstrumDeusBodySpectral>(), 7200 },
|
||||
{ ModContent.NPCType<AstrumDeusTailSpectral>(), 7200 },
|
||||
{ ModContent.NPCType<PlaguebringerGoliath>(), 10800 },
|
||||
{ ModContent.NPCType<RavagerBody>(), 10800 },
|
||||
{ ModContent.NPCType<ProfanedGuardianBoss>(), 5400 },
|
||||
{ ModContent.NPCType<Bumblefuck>(), 7200 },
|
||||
{ ModContent.NPCType<Providence>(), 14400 },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<StormWeaverHead>(), 8100 },
|
||||
{ ModContent.NPCType<PlaguebringerGoliath>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<RavagerBody>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<ProfanedGuardianBoss>(), 5400 }, // 1:30 (90 seconds)
|
||||
{ ModContent.NPCType<Bumblefuck>(), 7200 }, // 2:00 (120 seconds)
|
||||
{ ModContent.NPCType<Providence>(), 14400 }, // 4:00 (240 seconds)
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 }, // 0:20 (20 seconds)
|
||||
{ ModContent.NPCType<StormWeaverHead>(), 8100 }, // 2:15 (135 seconds)
|
||||
{ ModContent.NPCType<StormWeaverBody>(), 8100 },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), 8100 },
|
||||
{ ModContent.NPCType<Signus>(), 7200 },
|
||||
{ ModContent.NPCType<Polterghast>(), 10800 },
|
||||
{ ModContent.NPCType<OldDuke>(), 10800 },
|
||||
{ ModContent.NPCType<DevourerofGodsHead>(), 14400 },
|
||||
{ ModContent.NPCType<DevourerofGodsBody>(), 14400 },
|
||||
{ ModContent.NPCType<DevourerofGodsTail>(), 14400 },
|
||||
{ ModContent.NPCType<Yharon>(), 15300 },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 },
|
||||
{ ModContent.NPCType<Apollo>(), 21600 },
|
||||
{ ModContent.NPCType<Signus>(), 7200 }, // 2:00 (120 seconds)
|
||||
{ ModContent.NPCType<Polterghast>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<OldDuke>(), 10800 }, // 3:00 (180 seconds)
|
||||
{ ModContent.NPCType<DevourerofGodsHead>(), 14400 }, // 4:00 (240 seconds)
|
||||
{ ModContent.NPCType<DevourerofGodsBody>(), 14400 }, // NOTE: Sentinels Phase takes 1:00, so with that included it's 5:00
|
||||
{ ModContent.NPCType<DevourerofGodsTail>(), 14400 }, // DoG Phase 1 is 1:30, DoG Phase 2 is 2:30
|
||||
{ ModContent.NPCType<Yharon>(), 14700 }, // 4:05 (245 seconds) -- he spends 5 seconds invincible where you can't do anything
|
||||
{ ModContent.NPCType<Apollo>(), 21600 }, // 6:00 (360 seconds)
|
||||
{ ModContent.NPCType<Artemis>(), 21600 },
|
||||
{ ModContent.NPCType<AresBody>(), 21600 },
|
||||
{ ModContent.NPCType<AresBody>(), 21600 }, // 6:00 (360 seconds)
|
||||
{ ModContent.NPCType<AresGaussNuke>(), 21600 },
|
||||
{ ModContent.NPCType<AresLaserCannon>(), 21600 },
|
||||
{ ModContent.NPCType<AresPlasmaFlamethrower>(), 21600 },
|
||||
{ ModContent.NPCType<AresTeslaCannon>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosHead>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosHead>(), 21600 }, // 6:00 (360 seconds)
|
||||
{ ModContent.NPCType<ThanatosBody1>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosTail>(), 21600 },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 }
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 }, // 5:00 (300 seconds)
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 } // 5:00 (300 seconds)
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Item.Prefix += RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC += MakeVoodooDemonDollWork;
|
||||
IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes;
|
||||
//IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes;
|
||||
IL.Terraria.Main.UpdateTime += BloodMoonsRequire200MaxLife;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
@@ -159,7 +159,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Item.Prefix -= RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns -= PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC -= MakeVoodooDemonDollWork;
|
||||
IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes;
|
||||
//IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes;
|
||||
IL.Terraria.Main.UpdateTime -= BloodMoonsRequire200MaxLife;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dashMod = 4;
|
||||
player.dash = 0;
|
||||
modPlayer.elysianAegis = true;
|
||||
modPlayer.abaddon = true;
|
||||
player.noKnockback = true;
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dashMod = 2;
|
||||
player.dash = 0;
|
||||
player.noKnockback = true;
|
||||
player.fireWalk = true;
|
||||
modPlayer.abaddon = true;
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dodgeScarf = true;
|
||||
modPlayer.dashMod = 1;
|
||||
player.dash = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.deepDiver = true;
|
||||
modPlayer.dashMod = 5;
|
||||
player.dash = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dashMod = 3;
|
||||
player.dash = 0;
|
||||
modPlayer.elysianAegis = true;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.dodgeScarf = true;
|
||||
modPlayer.evasionScarf = true;
|
||||
modPlayer.dashMod = 1;
|
||||
player.dash = 0;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.statLifeMax2 += 20;
|
||||
}
|
||||
player.Calamity().dashMod = 6;
|
||||
player.dash = 0;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
modPlayer.dashMod = 7;
|
||||
player.dash = 0;
|
||||
player.spikedBoots = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.extraFall += 35;
|
||||
player.blackBelt = true;
|
||||
player.dash = 1;
|
||||
player.Calamity().dashMod = 0;
|
||||
player.spikedBoots = 2;
|
||||
}
|
||||
|
||||
@@ -42,8 +43,8 @@ namespace CalamityMod.Items.Accessories
|
||||
recipe.AddIngredient(ItemID.MasterNinjaGear);
|
||||
recipe.AddIngredient(ItemID.FrogLeg);
|
||||
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 50);
|
||||
recipe.AddIngredient(ModContent.ItemType<CoreofEleum>());
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 5);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Unstable Prism");
|
||||
DisplayName.SetDefault("Unstable Granite Core");
|
||||
Tooltip.SetDefault("Three sparks are released on critical hits");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(7, 5));
|
||||
}
|
||||
|
||||
@@ -53,7 +53,10 @@ namespace CalamityMod.Items.Armor
|
||||
player.aggro += 1000;
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed)
|
||||
{
|
||||
modPlayer.dashMod = 9;
|
||||
player.dash = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -48,7 +48,10 @@ namespace CalamityMod.Items.Armor
|
||||
"You fire a god killer shrapnel round while firing ranged weapons every 2.5 seconds";
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed)
|
||||
{
|
||||
modPlayer.dashMod = 9;
|
||||
player.dash = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -55,7 +55,10 @@ namespace CalamityMod.Items.Armor
|
||||
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
|
||||
|
||||
if (modPlayer.godSlayerDashHotKeyPressed)
|
||||
{
|
||||
modPlayer.dashMod = 9;
|
||||
player.dash = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
player.Calamity().plaguebringerPatronSet = true;
|
||||
player.Calamity().dashMod = 8;
|
||||
player.dash = 0;
|
||||
player.maxMinions += 3;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
@@ -16,8 +14,7 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
DisplayName.SetDefault("Silva Armor");
|
||||
Tooltip.SetDefault("+80 max life\n" +
|
||||
"12% increased damage and 8% increased critical strike chance\n" +
|
||||
"Grants immunity to the irradiated debuff");
|
||||
"12% increased damage and 8% increased critical strike chance");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -35,13 +32,11 @@ namespace CalamityMod.Items.Armor
|
||||
player.statLifeMax2 += 80;
|
||||
player.allDamage += 0.12f;
|
||||
player.Calamity().AllCritBoost(8);
|
||||
player.buffImmune[ModContent.BuffType<Irradiated>()] = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<LeadCore>());
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 10);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 12);
|
||||
|
||||
@@ -998,6 +998,8 @@ namespace CalamityMod.Items
|
||||
return "HuntressTier3";
|
||||
if (head.type == ItemID.ApprenticeAltHead && body.type == ItemID.ApprenticeAltShirt && legs.type == ItemID.ApprenticeAltPants)
|
||||
return "ApprenticeTier3";
|
||||
if (head.type == ItemID.SolarFlareHelmet && body.type == ItemID.SolarFlareBreastplate && legs.type == ItemID.SolarFlareLeggings)
|
||||
return "SolarFlare";
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -1130,6 +1132,10 @@ namespace CalamityMod.Items
|
||||
player.magicCrit += 15;
|
||||
player.setBonus += "\n10% increased minion damage and 15% increased magic critical strike chance";
|
||||
}
|
||||
else if (set == "SolarFlare")
|
||||
{
|
||||
modPlayer.dashMod = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1532,6 +1538,9 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.HandWarmer)
|
||||
modPlayer.handWarmer = true;
|
||||
|
||||
if (item.type == ItemID.EoCShield || item.type == ItemID.Tabi || item.type == ItemID.MasterNinjaGear)
|
||||
modPlayer.dashMod = 0;
|
||||
|
||||
// Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR
|
||||
if (item.prefix == PrefixID.Hard)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
"All boss minions no longer drop hearts.\n" +
|
||||
"Enrages all bosses and gives them new AI.\n" +
|
||||
"Bosses and their projectiles deal 35% more damage.\n" +
|
||||
"Most bosses will enter later phases sooner if the fight has gone on for a long time.\n" +
|
||||
"Increases the velocity of most boss projectiles by 25%, this is increased to 35% during Boss Rush.\n" +
|
||||
"Boss reactive DR is always active outside of Boss Rush and is increased by 50%.");
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
// Boss lines
|
||||
"All boss minions no longer drop hearts.\n" +
|
||||
"Changes all boss AIs and some enemy AIs.\n" +
|
||||
"Increases the health and damage of all bosses.\n" +
|
||||
"Most bosses will enter later phases sooner if the fight has gone on for a long time.");
|
||||
"Increases the health and damage of all bosses.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItem(player, ItemID.DemoniteBar, 9, 14);
|
||||
DropHelper.DropItem(player, ItemID.RottenChunk, 10, 20);
|
||||
DropHelper.DropItemCondition(player, ItemID.CursedFlame, Main.hardMode, 15, 30);
|
||||
DropHelper.DropItem(player, ItemID.CorruptSeeds, 2, 4);
|
||||
DropHelper.DropItem(player, ItemID.CorruptSeeds, 10, 15);
|
||||
|
||||
// Weapons
|
||||
float w = DropHelper.BagWeaponDropRateFloat;
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItem(player, ItemID.CrimtaneBar, 9, 14);
|
||||
DropHelper.DropItem(player, ItemID.Vertebrae, 10, 20);
|
||||
DropHelper.DropItemCondition(player, ItemID.Ichor, Main.hardMode, 15, 30);
|
||||
DropHelper.DropItem(player, ItemID.CrimsonSeeds, 2, 4);
|
||||
DropHelper.DropItem(player, ItemID.CrimsonSeeds, 10, 15);
|
||||
|
||||
// Weapons
|
||||
float w = DropHelper.BagWeaponDropRateFloat;
|
||||
|
||||
@@ -42,84 +42,46 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.life <= 0)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item74, (int)target.position.X, (int)target.position.Y);
|
||||
target.position.X += (float)(target.width / 2);
|
||||
target.position.Y += (float)(target.height / 2);
|
||||
target.position.X -= (float)(target.width / 2);
|
||||
target.position.Y -= (float)(target.height / 2);
|
||||
for (int num621 = 0; num621 < 15; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 25; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
int num251 = Main.rand.Next(4, 6);
|
||||
for (int num252 = 0; num252 < num251; num252++)
|
||||
{
|
||||
Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
while (value15.X == 0f && value15.Y == 0f)
|
||||
{
|
||||
value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<Blood>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), knockback, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
OnHitEffects(player, target.life <= 0, target.Center, target.width, target.height, knockback);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (target.statLife <= 0)
|
||||
OnHitEffects(player, target.statLife <= 0, target.Center, target.width, target.height, item.knockBack);
|
||||
}
|
||||
|
||||
private void OnHitEffects(Player player, bool health, Vector2 targetPos, int targetWidth, int targetHeight, float kBack)
|
||||
{
|
||||
if (health)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item74, (int)target.position.X, (int)target.position.Y);
|
||||
target.position.X += (float)(target.width / 2);
|
||||
target.position.Y += (float)(target.height / 2);
|
||||
target.position.X -= (float)(target.width / 2);
|
||||
target.position.Y -= (float)(target.height / 2);
|
||||
for (int num621 = 0; num621 < 15; num621++)
|
||||
Main.PlaySound(SoundID.Item74, targetPos);
|
||||
targetPos.X += (float)(targetWidth / 2);
|
||||
targetPos.Y += (float)(targetHeight / 2);
|
||||
targetPos.X -= (float)(targetWidth / 2);
|
||||
targetPos.Y -= (float)(targetHeight / 2);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[idx].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[idx].scale = 0.5f;
|
||||
Main.dust[idx].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 25; num623++)
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[idx].noGravity = true;
|
||||
Main.dust[idx].velocity *= 5f;
|
||||
idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
}
|
||||
int num251 = Main.rand.Next(4, 6);
|
||||
for (int num252 = 0; num252 < num251; num252++)
|
||||
int bloodAmt = Main.rand.Next(4, 6);
|
||||
for (int i = 0; i < bloodAmt; i++)
|
||||
{
|
||||
Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
while (value15.X == 0f && value15.Y == 0f)
|
||||
{
|
||||
value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<Blood>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), item.knockBack, player.whoAmI, 0f, 0f);
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(targetPos, velocity, ModContent.ProjectileType<Blood>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), kBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Universal Genesis");
|
||||
Tooltip.SetDefault("Seeing the cosmos makes you realize how insignificant we are\n" +
|
||||
"Fires a spread of bullets from the gun and a spread of stars above the cursor\n" +
|
||||
Tooltip.SetDefault("Let the starry sky fall upon your enemies\n" +
|
||||
"Fires a spread of bullets from the gun and a flurry of stars to rain down on the cursor\n" +
|
||||
"Converts musket balls into starcaller shots that summon additional stars on enemy hits\n" +
|
||||
"50% chance to not consume ammo");
|
||||
}
|
||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
yDist *= travelDist;
|
||||
float xVel = xDist + Main.rand.NextFloat(-0.6f, 0.6f);
|
||||
float yVel = yDist + Main.rand.NextFloat(-0.6f, 0.6f);
|
||||
int star = Projectile.NewProjectile(spawnPos.X, spawnPos.Y, xVel, yVel, ModContent.ProjectileType<UniversalGenesisStar>(), starDmg, knockBack, player.whoAmI, i);
|
||||
int star = Projectile.NewProjectile(spawnPos.X, spawnPos.Y, xVel, yVel, ModContent.ProjectileType<UniversalGenesisStar>(), starDmg, knockBack, player.whoAmI, i, 1f);
|
||||
Main.projectile[star].extraUpdates = 2;
|
||||
Main.projectile[star].localNPCHitCooldown = 30;
|
||||
}
|
||||
|
||||
@@ -151,13 +151,6 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.8f;
|
||||
bool phase3 = lifeRatio < 0.6f;
|
||||
|
||||
@@ -107,13 +107,6 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death;
|
||||
bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f);
|
||||
@@ -199,13 +192,6 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death;
|
||||
bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f);
|
||||
|
||||
+4
-74
@@ -62,13 +62,6 @@ namespace CalamityMod.NPCs
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
bool phase3 = lifeRatio < 0.5f;
|
||||
@@ -703,13 +696,6 @@ namespace CalamityMod.NPCs
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
bool phase2 = lifeRatio < 0.5f && revenge;
|
||||
bool phase3 = lifeRatio < 0.33f;
|
||||
|
||||
@@ -1254,13 +1240,6 @@ namespace CalamityMod.NPCs
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase3 = lifeRatio < 0.7f;
|
||||
bool phase4 = lifeRatio < 0.35f;
|
||||
@@ -2046,13 +2025,6 @@ namespace CalamityMod.NPCs
|
||||
bool expertMode = Main.expertMode || malice;
|
||||
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
@@ -2335,13 +2307,6 @@ namespace CalamityMod.NPCs
|
||||
bool expertMode = Main.expertMode || malice;
|
||||
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
@@ -2623,13 +2588,6 @@ namespace CalamityMod.NPCs
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
float shootTimer = 1f;
|
||||
if (expertMode)
|
||||
shootTimer += death ? (float)Math.Round(3f * (1f - lifeRatio)) : (float)Math.Round(2f * (1f - lifeRatio));
|
||||
@@ -3316,13 +3274,6 @@ namespace CalamityMod.NPCs
|
||||
// Life
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases based on life percentage
|
||||
bool halfHealth = npc.life / (float)npc.lifeMax < 0.5f;
|
||||
bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f;
|
||||
@@ -3892,7 +3843,7 @@ namespace CalamityMod.NPCs
|
||||
npc.TargetClosest();
|
||||
if (Vector2.Distance(player.Center, npc.Center) > 80f)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item12, npc.Center);
|
||||
Main.PlaySound(phase2 ? SoundID.Item91 : SoundID.Item12, npc.Center);
|
||||
float num941 = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f;
|
||||
Vector2 vector104 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + (npc.height / 2));
|
||||
float num942 = player.position.X + player.width * 0.5f - vector104.X;
|
||||
@@ -3910,13 +3861,13 @@ namespace CalamityMod.NPCs
|
||||
if (phase2)
|
||||
{
|
||||
// Waving beams need to start offset so they cross each other neatly.
|
||||
float waveSideOffset = Main.rand.NextFloat(18f, 28f);
|
||||
float waveSideOffset = Main.rand.NextFloat(9f, 14f);
|
||||
Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset;
|
||||
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 laserStartPos = vector104 + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f);
|
||||
Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.25f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.9f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
|
||||
// Tell this Phased God Ray exactly which way it should be waving.
|
||||
godRay.localAI[1] = i * 0.5f;
|
||||
@@ -3926,7 +3877,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Projectile.NewProjectile(vector104, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
if (doubleLasersAndSplittingMines && npc.ai[0] % 4f == 0f)
|
||||
Projectile.NewProjectile(vector104, laserVelocity * 0.75f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
Projectile.NewProjectile(vector104, laserVelocity * 0.9f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4013,13 +3964,6 @@ namespace CalamityMod.NPCs
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio <= 0.7;
|
||||
bool phase3 = lifeRatio <= 0.4;
|
||||
@@ -4675,13 +4619,6 @@ namespace CalamityMod.NPCs
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f);
|
||||
bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f) && expertMode;
|
||||
@@ -5496,13 +5433,6 @@ namespace CalamityMod.NPCs
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
bool phase2 = lifeRatio <= (death ? 0.8f : revenge ? 0.7f : 0.5f);
|
||||
bool phase3 = lifeRatio <= (death ? 0.5f : (revenge ? 0.35f : 0.2f)) && expertMode;
|
||||
bool phase2AI = npc.ai[0] > 4f;
|
||||
|
||||
@@ -8102,7 +8102,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType<Pitbull>())
|
||||
else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType<Rotdog>())
|
||||
{
|
||||
if (npc.velocity.Y == 0f && num4 < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X > 0f) || (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X < 0f)))
|
||||
{
|
||||
@@ -8159,7 +8159,7 @@ namespace CalamityMod.NPCs
|
||||
float num7 = 0.1f;
|
||||
if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0)))
|
||||
{
|
||||
if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType<Pitbull>())
|
||||
if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType<Rotdog>())
|
||||
{
|
||||
if (npc.velocity.X > 0f && npc.direction < 0)
|
||||
{
|
||||
|
||||
@@ -168,8 +168,6 @@ namespace CalamityMod.NPCs
|
||||
internal const int maxAIMod = 4;
|
||||
public float[] newAI = new float[maxAIMod];
|
||||
public int AITimer = 0;
|
||||
public int AIIncreasedAggressionTimer = 0;
|
||||
public float killTimeRatio_IncreasedAggression = 0f;
|
||||
|
||||
// Town NPC Patreon
|
||||
public bool setNewName = true;
|
||||
@@ -2753,14 +2751,6 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (AITimer < KillTime)
|
||||
AITimer++;
|
||||
|
||||
// Separate timer for aggression to avoid entering later phases too quickly
|
||||
int aggressionTimerCap = (int)(KillTime * 1.5);
|
||||
if (AIIncreasedAggressionTimer < aggressionTimerCap)
|
||||
AIIncreasedAggressionTimer++;
|
||||
|
||||
// Increases aggression over time if the fight is taking too long
|
||||
killTimeRatio_IncreasedAggression = 1f - (AIIncreasedAggressionTimer / (float)aggressionTimerCap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3387,7 +3377,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
if (npc.type == NPCType<Pitbull>())
|
||||
if (npc.type == NPCType<Rotdog>())
|
||||
{
|
||||
return CalamityGlobalAI.BuffedUnicornAI(npc, mod);
|
||||
}
|
||||
|
||||
@@ -90,13 +90,6 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.66f && expertMode;
|
||||
bool phase3 = lifeRatio < 0.33f && expertMode;
|
||||
|
||||
@@ -140,13 +140,6 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (revenge ? 0.85f : 0.8f);
|
||||
bool phase3 = lifeRatio < (revenge ? 0.7f : 0.6f);
|
||||
|
||||
@@ -129,13 +129,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
if (revenge || lifeRatio < (expertMode ? 0.75f : 0.5f))
|
||||
npc.Calamity().newAI[0] += 1f;
|
||||
|
||||
|
||||
@@ -272,13 +272,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phase 1 phases
|
||||
bool phase2 = lifeRatio < 0.9f;
|
||||
bool phase3 = lifeRatio < 0.68f;
|
||||
@@ -371,9 +364,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
Phase2Started = true;
|
||||
|
||||
// Timed DR and aggression
|
||||
// Timed DR
|
||||
calamityGlobalNPC.AITimer = CalamityGlobalNPC.DoGPhase1KillTime;
|
||||
calamityGlobalNPC.AIIncreasedAggressionTimer = CalamityGlobalNPC.DoGPhase1KillTime;
|
||||
|
||||
// Reset important shit
|
||||
npc.ai[3] = 0f;
|
||||
|
||||
@@ -115,9 +115,11 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
// Primitive trail drawer for the ribbon things
|
||||
public PrimitiveTrail RibbonTrail = null;
|
||||
|
||||
public const string NameToDisplay = "XS-03 Apollo";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("XS-03 Apollo");
|
||||
DisplayName.SetDefault(NameToDisplay);
|
||||
NPCID.Sets.TrailingMode[npc.type] = 3;
|
||||
NPCID.Sets.TrailCacheLength[npc.type] = 15;
|
||||
}
|
||||
|
||||
@@ -127,9 +127,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
// Primitive trail drawer for the ribbon things
|
||||
public PrimitiveTrail RibbonTrail = null;
|
||||
|
||||
public const string NameToDisplay = "XS-01 Artemis";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("XS-01 Artemis");
|
||||
DisplayName.SetDefault(NameToDisplay);
|
||||
NPCID.Sets.TrailingMode[npc.type] = 3;
|
||||
NPCID.Sets.TrailCacheLength[npc.type] = 15;
|
||||
}
|
||||
|
||||
@@ -361,13 +361,6 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneCorrupt || (npc.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
@@ -1111,7 +1104,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
DropHelper.DropItemSpray(npc, ItemID.RottenChunk, 9, 15, 3);
|
||||
if (Main.hardMode)
|
||||
DropHelper.DropItemSpray(npc, ItemID.CursedFlame, 10, 20, 2);
|
||||
DropHelper.DropItem(npc, ItemID.CorruptSeeds, 2, 4);
|
||||
DropHelper.DropItem(npc, ItemID.CorruptSeeds, 10, 15);
|
||||
|
||||
// Weapons
|
||||
float w = DropHelper.NormalWeaponDropRateFloat;
|
||||
|
||||
@@ -82,13 +82,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.leviathan].life / (float)Main.npc[CalamityGlobalNPC.leviathan].lifeMax;
|
||||
|
||||
if (CalamityWorld.revenge || CalamityWorld.malice || BossRushEvent.BossRushActive || Main.npc[CalamityGlobalNPC.leviathan].Calamity().enraged > 0)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > Main.npc[CalamityGlobalNPC.leviathan].Calamity().killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = Main.npc[CalamityGlobalNPC.leviathan].Calamity().killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool leviathanInPhase4 = lifeRatio < 0.2f;
|
||||
|
||||
|
||||
@@ -112,13 +112,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.7f && expertMode;
|
||||
bool phase3 = lifeRatio < 0.4f;
|
||||
|
||||
@@ -150,13 +150,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
float bubbleVelocity = death ? 9f : revenge ? 7f : expertMode ? 6f : 5f;
|
||||
bubbleVelocity += 4f * enrageScale;
|
||||
if (!leviAlive)
|
||||
|
||||
@@ -6,11 +6,11 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
public class Pitbull : ModNPC
|
||||
public class Rotdog : ModNPC
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pitbull");
|
||||
DisplayName.SetDefault("Rotdog");
|
||||
Main.npcFrameCount[npc.type] = 10;
|
||||
}
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -101,13 +101,6 @@ namespace CalamityMod.NPCs.Perforator
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
if (revenge || lifeRatio < (expertMode ? 0.75f : 0.5f))
|
||||
npc.Calamity().newAI[0] += 1f;
|
||||
|
||||
|
||||
@@ -75,13 +75,6 @@ namespace CalamityMod.NPCs.Perforator
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
float speed = 8f;
|
||||
float turnSpeed = 0.06f;
|
||||
|
||||
|
||||
@@ -97,13 +97,6 @@ namespace CalamityMod.NPCs.Perforator
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
float speed = 0.15f;
|
||||
float turnSpeed = 0.1f;
|
||||
|
||||
|
||||
@@ -123,13 +123,6 @@ namespace CalamityMod.NPCs.Perforator
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases based on life percentage
|
||||
bool phase2 = lifeRatio < 0.7f;
|
||||
|
||||
@@ -488,7 +481,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
DropHelper.DropItemSpray(npc, ItemID.Vertebrae, 3, 9);
|
||||
if (Main.hardMode)
|
||||
DropHelper.DropItemSpray(npc, ItemID.Ichor, 10, 20, 2);
|
||||
DropHelper.DropItem(npc, ItemID.CrimsonSeeds, 2, 4);
|
||||
DropHelper.DropItem(npc, ItemID.CrimsonSeeds, 10, 15);
|
||||
|
||||
// Weapons
|
||||
float w = DropHelper.NormalWeaponDropRateFloat;
|
||||
|
||||
@@ -122,13 +122,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
bool phase3 = lifeRatio < 0.5f;
|
||||
|
||||
@@ -151,13 +151,6 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool expertMode = Main.expertMode || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (death ? 0.9f : revenge ? 0.8f : expertMode ? 0.65f : 0.5f);
|
||||
bool phase3 = lifeRatio < (death ? 0.6f : revenge ? 0.5f : expertMode ? 0.35f : 0.2f);
|
||||
@@ -1108,13 +1101,6 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > npc.Calamity().killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = npc.Calamity().killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
bool phase2 = lifeRatio < (death ? 0.9f : revenge ? 0.8f : expertMode ? 0.65f : 0.5f);
|
||||
bool phase3 = lifeRatio < (death ? 0.6f : revenge ? 0.5f : expertMode ? 0.35f : 0.2f);
|
||||
|
||||
|
||||
@@ -87,13 +87,6 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
// Percent life remaining, Polter
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.ghostBoss].life / (float)Main.npc[CalamityGlobalNPC.ghostBoss].lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Scale multiplier based on nearby active tiles
|
||||
float tileEnrageMult = Main.npc[CalamityGlobalNPC.ghostBoss].ai[3];
|
||||
|
||||
|
||||
@@ -100,13 +100,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[1] == 0f)
|
||||
{
|
||||
|
||||
@@ -198,13 +198,6 @@ namespace CalamityMod.NPCs.Providence
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Play enrage animation if night starts
|
||||
if (nightTime && calamityGlobalNPC.newAI[3] == spawnAnimationTime)
|
||||
{
|
||||
|
||||
@@ -108,13 +108,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Large fire light
|
||||
Lighting.AddLight((int)(npc.Center.X - 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f);
|
||||
Lighting.AddLight((int)(npc.Center.X + 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f);
|
||||
|
||||
@@ -106,13 +106,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
double lifeRatio = npc.life / (double)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
lifeToAlpha = (int)(100.0 * (1.0 - lifeRatio));
|
||||
int maxCharges = death ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
int maxTeleports = (death && lifeRatio < 0.9) ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
|
||||
@@ -73,13 +73,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
|
||||
@@ -102,13 +102,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
|
||||
// Get a target
|
||||
|
||||
@@ -76,13 +76,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
|
||||
@@ -78,13 +78,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
|
||||
@@ -78,13 +78,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
|
||||
@@ -165,13 +165,6 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
}
|
||||
|
||||
// Shed armor
|
||||
bool shedArmor = npc.life / (float)npc.lifeMax < 0.9f;
|
||||
|
||||
|
||||
@@ -103,10 +103,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Phases based on HP
|
||||
bool phase2 = lifeRatio < 0.85f;
|
||||
bool phase3 = lifeRatio < 0.7f;
|
||||
|
||||
@@ -25,11 +25,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Phases
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
@@ -1074,11 +1070,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// 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;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
bool phase2 = lifeRatio < 0.7f;
|
||||
bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType<EidolonWyrmHeadHuge>() ? 0.6f : 0.55f);
|
||||
bool phase4 = lifeRatio < 0.4f;
|
||||
|
||||
@@ -28,11 +28,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Phases based on life percentage
|
||||
bool phase2 = lifeRatio < 0.85f;
|
||||
bool phase3 = lifeRatio < 0.7f;
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Variables
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
@@ -58,10 +58,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent segments remaining, add two to total for head and tail
|
||||
float lifeRatio = segmentCount / (totalSegments + 2);
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// 10 seconds of resistance to prevent spawn killing
|
||||
if (calamityGlobalNPC.newAI[1] < 600f && BossRushEvent.BossRushActive)
|
||||
calamityGlobalNPC.newAI[1] += 1f;
|
||||
|
||||
@@ -22,11 +22,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
|
||||
@@ -23,11 +23,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Phases
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
@@ -659,10 +655,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Phases based on life percentage
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
bool phase3 = lifeRatio < 0.5f;
|
||||
|
||||
@@ -34,10 +34,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Phases based on HP
|
||||
bool phase1phase2 = lifeRatio < 0.75f;
|
||||
bool phase2 = lifeRatio <= 0.5f;
|
||||
|
||||
@@ -44,11 +44,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
bool phase3 = lifeRatio < 0.5f;
|
||||
|
||||
@@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Phases
|
||||
bool respawnHands = npc.life / (float)npc.lifeMax < 0.33f;
|
||||
bool phase2 = respawnHands || death;
|
||||
|
||||
@@ -35,10 +35,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Spawn arms
|
||||
if (npc.ai[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
|
||||
@@ -352,10 +352,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Easier to send info to Spazmatism
|
||||
CalamityGlobalNPC.laserEye = npc.whoAmI;
|
||||
|
||||
@@ -1054,10 +1050,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Easier to send info to Retinazer
|
||||
CalamityGlobalNPC.fireEye = npc.whoAmI;
|
||||
|
||||
|
||||
@@ -41,11 +41,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
|
||||
// Clamp life ratio to prevent bad velocity math.
|
||||
lifeRatio = MathHelper.Clamp(lifeRatio, 0f, 1f);
|
||||
|
||||
@@ -496,10 +492,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[Main.wof].life / (float)Main.npc[Main.wof].lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
bool charging = Main.npc[Main.wof].ai[3] == 1f;
|
||||
|
||||
// Set up enraged laser firing timer
|
||||
|
||||
+1185
-1198
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1,46 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class BloodParticle : Particle
|
||||
{
|
||||
public Color InitialColor;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
public override bool UseAdditiveBlend => true;
|
||||
|
||||
public override string Texture => "CalamityMod/Particles/Blood";
|
||||
|
||||
public BloodParticle(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color)
|
||||
{
|
||||
Position = relativePosition;
|
||||
Velocity = velocity;
|
||||
Scale = scale;
|
||||
Lifetime = lifetime;
|
||||
Color = InitialColor = color;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
Scale *= 0.98f;
|
||||
Velocity.X *= 0.97f;
|
||||
Velocity.Y = MathHelper.Clamp(Velocity.Y + 0.9f, -22f, 22f);
|
||||
Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D));
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
float verticalStretch = Utils.InverseLerp(0f, 24f, Math.Abs(Velocity.Y), true) * 0.84f;
|
||||
float brightness = (float)Math.Pow(Lighting.Brightness((int)(Position.X / 16f), (int)(Position.Y / 16f)), 0.15);
|
||||
Vector2 scale = new Vector2(1f, verticalStretch + 1f) * Scale * 0.1f;
|
||||
Texture2D texture = ModContent.GetTexture(Texture);
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color * brightness, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class BloodParticle2 : Particle
|
||||
{
|
||||
public Color InitialColor;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
public override bool UseAdditiveBlend => true;
|
||||
|
||||
public override string Texture => "CalamityMod/Particles/Blood2";
|
||||
|
||||
public BloodParticle2(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color)
|
||||
{
|
||||
Position = relativePosition;
|
||||
Velocity = velocity;
|
||||
Scale = scale;
|
||||
Lifetime = lifetime;
|
||||
Color = InitialColor = color;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
Velocity *= 0.98f;
|
||||
Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 4D));
|
||||
Rotation = Velocity.ToRotation();
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
float brightness = (float)Math.Pow(Lighting.Brightness((int)(Position.X / 16f), (int)(Position.Y / 16f)), 0.15);
|
||||
Texture2D texture = ModContent.GetTexture(Texture);
|
||||
Rectangle frame = texture.Frame(1, 3, 0, (int)(LifetimeCompletion * 3f));
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, frame, Color * brightness, Rotation, origin, Scale, 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class ImpactParticle : Particle
|
||||
{
|
||||
public float AngularVelocity;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
public override bool UseAdditiveBlend => true;
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/StarProj";
|
||||
|
||||
public ImpactParticle(Vector2 relativePosition, float angularVelocity, int lifetime, float scale, Color color)
|
||||
{
|
||||
Position = relativePosition;
|
||||
Scale = scale;
|
||||
AngularVelocity = angularVelocity;
|
||||
Rotation = Main.rand.NextFloat(MathHelper.TwoPi);
|
||||
Lifetime = lifetime;
|
||||
Color = color;
|
||||
}
|
||||
|
||||
public override void Update() => Rotation += AngularVelocity;
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
float scaleFactor = CalamityUtils.Convert01To010(LifetimeCompletion) * 1.3f;
|
||||
Vector2 scale = new Vector2(0.3f, 1f) * scaleFactor;
|
||||
Texture2D texture = ModContent.GetTexture(Texture);
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, 0f, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, -Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class SparkParticle : Particle
|
||||
{
|
||||
public Color InitialColor;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
public override bool UseAdditiveBlend => true;
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/StarProj";
|
||||
|
||||
public SparkParticle(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color)
|
||||
{
|
||||
Position = relativePosition;
|
||||
Velocity = velocity;
|
||||
Scale = scale;
|
||||
Lifetime = lifetime;
|
||||
Color = InitialColor = color;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
Scale *= 0.95f;
|
||||
Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D));
|
||||
Velocity *= 0.95f;
|
||||
if (Velocity.Length() < 12f)
|
||||
{
|
||||
Velocity.X *= 0.94f;
|
||||
Velocity.Y += 0.25f;
|
||||
}
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Vector2 scale = new Vector2(0.35f, 1.6f) * Scale;
|
||||
Texture2D texture = ModContent.GetTexture(Texture);
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.hostile = true;
|
||||
projectile.alpha = 255;
|
||||
projectile.penetrate = -1;
|
||||
projectile.MaxUpdates = 3;
|
||||
projectile.timeLeft = 2400;
|
||||
projectile.MaxUpdates = 1;
|
||||
projectile.timeLeft = 1200;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true;
|
||||
@@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
if (WaveFrameState < 0f)
|
||||
return new Color(255, 200, 0, projectile.alpha);
|
||||
return new Color(255, 100, 0, projectile.alpha);
|
||||
|
||||
return new Color(0, 255, 200, projectile.alpha);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Vector2 dustVel = projectile.velocity / 4f;
|
||||
for (int i = 0; i < dustAmt; ++i)
|
||||
{
|
||||
Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 2.5f);
|
||||
Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 1.5f);
|
||||
d.velocity += dustVel;
|
||||
d.velocity *= Main.rand.NextFloat(0.4f, 1f);
|
||||
d.noGravity = true;
|
||||
|
||||
@@ -37,11 +37,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
projectile.extraUpdates = 2;
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
float maxVelocity = malice ? 15f : 12f;
|
||||
float maxVelocity = malice ? 3.75f : 3f;
|
||||
if (projectile.velocity.Length() < maxVelocity)
|
||||
{
|
||||
projectile.velocity *= malice ? 1.075f : 1.05f;
|
||||
projectile.velocity *= malice ? 1.02f : 1.015f;
|
||||
if (projectile.velocity.Length() > maxVelocity)
|
||||
{
|
||||
projectile.velocity.Normalize();
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class DeusMine : ModProjectile
|
||||
{
|
||||
private const int MaxTimeLeft = 600;
|
||||
private const int FadeTime = 85;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Mine");
|
||||
@@ -25,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.alpha = 100;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.timeLeft = 900;
|
||||
projectile.timeLeft = MaxTimeLeft;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
@@ -50,29 +53,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
|
||||
// Deal no damage if fading out and not set to explode
|
||||
// Grow in size if set to explode
|
||||
if (projectile.timeLeft < 85)
|
||||
if (projectile.timeLeft < FadeTime)
|
||||
{
|
||||
if (projectile.ai[0] == 0f)
|
||||
{
|
||||
projectile.damage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.scale += 1f / 85f;
|
||||
projectile.width = projectile.height = (int)(30f * projectile.scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(projectile.Center, 12f, targetHitbox);
|
||||
|
||||
public override bool CanHitPlayer(Player target) => projectile.timeLeft <= 815 && (projectile.timeLeft >= 85 || projectile.ai[0] == 1f);
|
||||
public override bool CanHitPlayer(Player target) => projectile.timeLeft <= MaxTimeLeft - FadeTime && (projectile.timeLeft >= FadeTime || projectile.ai[0] == 1f);
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
// Fade in
|
||||
if (projectile.timeLeft > 815)
|
||||
if (projectile.timeLeft > MaxTimeLeft - FadeTime)
|
||||
{
|
||||
projectile.localAI[1] += 1f;
|
||||
byte b2 = (byte)(((int)projectile.localAI[1]) * 3);
|
||||
@@ -82,7 +77,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
// Fade out if not set to explode
|
||||
// Glow more red over time if set to explode
|
||||
if (projectile.timeLeft < 85)
|
||||
if (projectile.timeLeft < FadeTime)
|
||||
{
|
||||
byte b2 = (byte)(projectile.timeLeft * 3);
|
||||
if (projectile.ai[0] == 0f)
|
||||
@@ -148,7 +143,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (projectile.timeLeft > 815 || (projectile.timeLeft < 85 && projectile.ai[0] == 0f))
|
||||
if (projectile.timeLeft > MaxTimeLeft - FadeTime || (projectile.timeLeft < FadeTime && projectile.ai[0] == 0f))
|
||||
return;
|
||||
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 180);
|
||||
|
||||
@@ -76,7 +76,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void DetermineScale() => projectile.scale = projectile.timeLeft / Lifetime * MaxScale;
|
||||
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
DrawBeamWithColor(spriteBatch, Color.Lime * 1.1f, projectile.scale);
|
||||
@@ -96,7 +95,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
int totalShards = (int)MathHelper.Lerp(1, 4, MathHelper.Clamp(lengthFromStart / MaxLaserLength * 1.4f, 0f, 1f));
|
||||
int shardType = ModContent.ProjectileType<TerraShard>();
|
||||
int shardDamage = (int)(damage * 0.6);
|
||||
int shardDamage = (int)(projectile.damage * 0.6);
|
||||
for (int i = 0; i < totalShards; i++)
|
||||
{
|
||||
int tries = 0;
|
||||
@@ -108,7 +107,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
while (Collision.SolidCollision((target.Center + spawnOffset).ToTileCoordinates().ToVector2(), 4, 4) && tries < 10);
|
||||
|
||||
Projectile.NewProjectile(target.Center + spawnOffset, Main.rand.NextVector2CircularEdge(6f, 6f), shardType, shardDamage, knockback);
|
||||
Projectile.NewProjectile(target.Center + spawnOffset, Main.rand.NextVector2CircularEdge(6f, 6f), shardType, shardDamage, projectile.knockBack, projectile.owner);
|
||||
}
|
||||
|
||||
ShardCooldown = 3f;
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class TerraShard : ModProjectile
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shard");
|
||||
@@ -15,7 +17,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.width = projectile.height = 20;
|
||||
projectile.friendly = true;
|
||||
projectile.timeLeft = 60;
|
||||
projectile.penetrate = 1;
|
||||
projectile.magic = true;
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
@@ -29,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
terraMagic.velocity *= 0.1f;
|
||||
}
|
||||
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 500f, 15f, 20f);
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 500f, 15f, 20f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 135 B |
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -44,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Owner.channel)
|
||||
{
|
||||
HomeTowardsMouse();
|
||||
projectile.rotation += 0.35f / projectile.MaxUpdates;
|
||||
projectile.rotation += 0.45f / projectile.MaxUpdates;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,6 +98,78 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Owner.itemAnimation = 2;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
// Play a splatter and impact sound.
|
||||
Main.PlaySound(SoundID.DD2_CrystalCartImpact, projectile.Center);
|
||||
|
||||
float damageInterpolant = Utils.InverseLerp(950f, 2000f, damage, true);
|
||||
float impactAngularVelocity = MathHelper.Lerp(0.08f, 0.2f, damageInterpolant);
|
||||
float impactParticleScale = MathHelper.Lerp(0.6f, 1f, damageInterpolant);
|
||||
impactAngularVelocity *= Main.rand.NextBool().ToDirectionInt() * Main.rand.NextFloat(0.75f, 1.25f);
|
||||
|
||||
Color impactColor = Color.Lerp(Color.Silver, Color.Gold, Main.rand.NextFloat(0.5f));
|
||||
Vector2 impactPoint = Vector2.Lerp(projectile.Center, target.Center, 0.65f);
|
||||
Vector2 bloodSpawnPosition = target.Center + Main.rand.NextVector2Circular(target.width, target.height) * 0.04f;
|
||||
Vector2 splatterDirection = (projectile.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
|
||||
// Emit blood if the target is organic.
|
||||
if (target.Organic())
|
||||
{
|
||||
Main.PlaySound(SoundID.NPCHit18, projectile.Center);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int bloodLifetime = Main.rand.Next(22, 36);
|
||||
float bloodScale = Main.rand.NextFloat(0.6f, 0.8f);
|
||||
Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat());
|
||||
bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f));
|
||||
|
||||
if (Main.rand.NextBool(20))
|
||||
bloodScale *= 2f;
|
||||
|
||||
Vector2 bloodVelocity = splatterDirection.RotatedByRandom(0.81f) * Main.rand.NextFloat(11f, 23f);
|
||||
bloodVelocity.Y -= 12f;
|
||||
BloodParticle blood = new BloodParticle(bloodSpawnPosition, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
}
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
float bloodScale = Main.rand.NextFloat(0.2f, 0.33f);
|
||||
Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat(0.5f, 1f));
|
||||
Vector2 bloodVelocity = splatterDirection.RotatedByRandom(0.9f) * Main.rand.NextFloat(9f, 14.5f);
|
||||
BloodParticle2 blood = new BloodParticle2(bloodSpawnPosition, bloodVelocity, 20, bloodScale, bloodColor);
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
}
|
||||
}
|
||||
|
||||
// Emit sparks if the target is not organic.
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int sparkLifetime = Main.rand.Next(22, 36);
|
||||
float sparkScale = Main.rand.NextFloat(0.8f, 1f) + damageInterpolant * 0.85f;
|
||||
Color sparkColor = Color.Lerp(Color.Silver, Color.Gold, Main.rand.NextFloat(0.7f));
|
||||
sparkColor = Color.Lerp(sparkColor, Color.Orange, Main.rand.NextFloat());
|
||||
|
||||
if (Main.rand.NextBool(10))
|
||||
sparkScale *= 2f;
|
||||
|
||||
Vector2 sparkVelocity = splatterDirection.RotatedByRandom(0.6f) * Main.rand.NextFloat(12f, 25f);
|
||||
sparkVelocity.Y -= 6f;
|
||||
SparkParticle spark = new SparkParticle(impactPoint, sparkVelocity, sparkLifetime, sparkScale, sparkColor);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
// And create an impact point particle.
|
||||
ImpactParticle impactParticle = new ImpactParticle(impactPoint, impactAngularVelocity, 20, impactParticleScale, impactColor);
|
||||
GeneralParticleHandler.SpawnParticle(impactParticle);
|
||||
}
|
||||
}
|
||||
|
||||
internal float PrimitiveWidthFunction(float completionRatio)
|
||||
{
|
||||
float tipWidthFactor = MathHelper.SmoothStep(0f, 1f, Utils.InverseLerp(0.01f, 0.04f, completionRatio));
|
||||
|
||||
@@ -40,16 +40,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.PlaySound(SoundID.Item9, projectile.position);
|
||||
}
|
||||
}
|
||||
projectile.alpha -= 15;
|
||||
int alphaMin = 150;
|
||||
if (projectile.Center.Y >= projectile.ai[1])
|
||||
{
|
||||
alphaMin = 0;
|
||||
}
|
||||
if (projectile.alpha < alphaMin)
|
||||
{
|
||||
projectile.alpha = alphaMin;
|
||||
}
|
||||
projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * projectile.direction;
|
||||
if (Main.rand.NextBool(48))
|
||||
{
|
||||
@@ -57,17 +47,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Main.gore[idx].velocity *= 0.66f;
|
||||
Main.gore[idx].velocity += projectile.velocity * 0.3f;
|
||||
}
|
||||
if (projectile.ai[1] == 1f)
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
projectile.light = 0.9f;
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default, 1.2f);
|
||||
}
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f);
|
||||
}
|
||||
Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default, 1.2f);
|
||||
}
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +72,50 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
return new Color(200, 200, 200, projectile.alpha);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
if (projectile.ai[1] == 1f)
|
||||
{
|
||||
Texture2D tex = Main.projectileTexture[projectile.type];
|
||||
Vector2 offsets = new Vector2(0f, projectile.gfxOffY) - Main.screenPosition;
|
||||
Color alpha = projectile.GetAlpha(lightColor);
|
||||
Rectangle spriteRec = new Microsoft.Xna.Framework.Rectangle(0, 0, tex.Width, tex.Height);
|
||||
Vector2 spriteOrigin = spriteRec.Size() / 2f;
|
||||
SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
Texture2D aura = ModContent.GetTexture("CalamityMod/Projectiles/Ranged/FallenStarAura");
|
||||
Vector2 drawStart = projectile.Center + projectile.velocity;
|
||||
Vector2 drawStart2 = projectile.Center - projectile.velocity * 0.5f;
|
||||
Vector2 spinPoint = new Vector2(0f, -10f);
|
||||
float time = Main.player[projectile.owner].miscCounter % 216000f / 60f;
|
||||
Rectangle auraRec = aura.Frame();
|
||||
Color blue = Color.Blue * 0.2f;
|
||||
Color white = Color.White * 0.5f;
|
||||
white.A = 0;
|
||||
blue.A = 0;
|
||||
Vector2 auraOrigin = new Vector2(auraRec.Width / 2f, 10f);
|
||||
|
||||
//Draw the aura
|
||||
spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.5f, SpriteEffects.None, 0);
|
||||
spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time + MathHelper.TwoPi / 3f), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.1f, SpriteEffects.None, 0);
|
||||
spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time + MathHelper.Pi * 4f / 3f), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.3f, SpriteEffects.None, 0);
|
||||
for (float d = 0f; d < 1f; d += 0.5f)
|
||||
{
|
||||
float scaleMult = time % 0.5f / 0.5f;
|
||||
scaleMult = (scaleMult + d) % 1f;
|
||||
float colorMult = scaleMult * 2f;
|
||||
if (colorMult > 1f)
|
||||
{
|
||||
colorMult = 2f - colorMult;
|
||||
}
|
||||
spriteBatch.Draw(aura, drawStart2 + offsets, auraRec, white * colorMult, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 0.3f + scaleMult * 0.5f, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//Draw the actual projectile
|
||||
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,9 @@ using CalamityMod.NPCs.Calamitas;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Apollo;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
||||
using CalamityMod.NPCs.GreatSandShark;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
@@ -370,9 +372,19 @@ namespace CalamityMod.UI
|
||||
return;
|
||||
|
||||
// Do not attempt to create a new bar for an NPC that's already in the list of bars.
|
||||
bool canAddBar = Main.npc[index].active && Main.npc[index].life > 0 && Bars.All(b => b.NPCIndex != index) && !Main.npc[index].Calamity().ShouldCloseHPBar;
|
||||
NPC npc = Main.npc[index];
|
||||
bool canAddBar = npc.active && npc.life > 0 && Bars.All(b => b.NPCIndex != index) && !npc.Calamity().ShouldCloseHPBar;
|
||||
|
||||
// SPECIAL CASE: Artemis and Apollo should be registered as one boss, as they share HP.
|
||||
// Apollo is the only NPC to recieve a bar, with a special overriding name.
|
||||
string overridingName = null;
|
||||
if (npc.type == NPCType<Artemis>())
|
||||
canAddBar = false;
|
||||
if (npc.type == NPCType<Apollo>())
|
||||
overridingName = $"{Artemis.NameToDisplay} and {Apollo.NameToDisplay}";
|
||||
|
||||
if (canAddBar)
|
||||
Bars.Add(new BossHPUI(index));
|
||||
Bars.Add(new BossHPUI(index, overridingName));
|
||||
}
|
||||
|
||||
public static void Draw(SpriteBatch sb)
|
||||
@@ -401,6 +413,7 @@ namespace CalamityMod.UI
|
||||
public long PreviousLife;
|
||||
public long HealthAtStartOfCombo;
|
||||
public long InitialMaxLife;
|
||||
public string OverridingName = null;
|
||||
public NPC AssociatedNPC => Main.npc.IndexInRange(NPCIndex) ? Main.npc[NPCIndex] : null;
|
||||
public int NPCType => AssociatedNPC?.type ?? -1;
|
||||
public long CombinedNPCLife
|
||||
@@ -518,7 +531,7 @@ namespace CalamityMod.UI
|
||||
public static Color MainColor = new Color(229, 189, 62);
|
||||
public static Color MainBorderColour = new Color(197, 127, 46);
|
||||
|
||||
public BossHPUI(int index)
|
||||
public BossHPUI(int index, string overridingName = null)
|
||||
{
|
||||
NPCIndex = index;
|
||||
|
||||
@@ -532,6 +545,7 @@ namespace CalamityMod.UI
|
||||
IntendedNPCType = AssociatedNPC.type;
|
||||
PreviousLife = CombinedNPCLife;
|
||||
}
|
||||
OverridingName = overridingName;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
@@ -607,7 +621,8 @@ namespace CalamityMod.UI
|
||||
CalamityUtils.DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), MainColor, MainBorderColour * 0.25f);
|
||||
|
||||
// Draw a red back-glow of the text if the NPC is enraged.
|
||||
string name = AssociatedNPC.FullName;
|
||||
string name = OverridingName ?? AssociatedNPC.FullName;
|
||||
|
||||
Vector2 nameSize = Main.fontMouseText.MeasureString(name);
|
||||
if (EnrageTimer > 0)
|
||||
{
|
||||
|
||||
@@ -882,7 +882,7 @@ namespace CalamityMod
|
||||
npc = ModContent.NPCType<WulfrumDrone>();
|
||||
break;
|
||||
case 53:
|
||||
npc = ModContent.NPCType<Pitbull>();
|
||||
npc = ModContent.NPCType<Rotdog>();
|
||||
break;
|
||||
case 54:
|
||||
npc = ModContent.NPCType<BlightedEye>();
|
||||
|
||||
Reference in new issue
Block a user