Merge blah blah

This commit is contained in:
Shucks committed 2020-01-10 18:23:20 -06:00
commit eff8514393
200 files changed
+2803 -1303

No files matched your search

+1 -10
View File
@@ -6,13 +6,10 @@ namespace CalamityMod.Buffs.StatBuffs
{
public class AdrenalineMode : ModBuff
{
public static string RevTip = "150% damage boost. Can burnout down to 49.5%.";
public static string DeathTip = "500% damage boost. Can burnout down to 165%.";
public override void SetDefaults()
{
DisplayName.SetDefault("Adrenaline Mode");
Description.SetDefault(RevTip);
Description.SetDefault("150% damage boost. Can burnout down to 49.5%.");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -24,11 +21,5 @@ namespace CalamityMod.Buffs.StatBuffs
{
player.Calamity().adrenalineMode = true;
}
public override void ModifyBuffTip(ref string tip, ref int rare)
{
if (CalamityWorld.death)
tip = DeathTip;
}
}
}
+1 -10
View File
@@ -6,13 +6,10 @@ namespace CalamityMod.Buffs.StatBuffs
{
public class RageMode : ModBuff
{
public static string RevTip = "50% damage boost. Can be boosted by other items up to 110%.";
public static string DeathTip = "170% damage boost. Can be boosted by other items up to 350%.";
public override void SetDefaults()
{
DisplayName.SetDefault("Rage Mode");
Description.SetDefault(RevTip);
Description.SetDefault("50% damage boost. Can be boosted by other items up to 110%.");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -24,11 +21,5 @@ namespace CalamityMod.Buffs.StatBuffs
{
player.Calamity().rageMode = true;
}
public override void ModifyBuffTip(ref string tip, ref int rare)
{
if (CalamityWorld.death)
tip = DeathTip;
}
}
}
+79 -38
View File
@@ -4258,7 +4258,7 @@ namespace CalamityMod.CalPlayer
{
if (item.melee)
{
damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0
damageMult += (DHorHoD ? 2.3 : 2.0);
}
}
else if (rageMode)
@@ -4266,10 +4266,10 @@ namespace CalamityMod.CalPlayer
if (item.melee)
{
double rageDamageBoost = 0.0 +
(rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15
(rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15
(rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15
double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5
(rageBoostOne ? 0.15 : 0.0) +
(rageBoostTwo ? 0.15 : 0.0) +
(rageBoostThree ? 0.15 : 0.0);
double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost;
damageMult += rageDamage;
}
}
@@ -4277,7 +4277,7 @@ namespace CalamityMod.CalPlayer
{
if (item.melee)
{
double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5
double damageMultAdr = 1.5 * (double)adrenalineDmgMult;
damageMult += damageMultAdr;
}
}
@@ -4548,7 +4548,7 @@ namespace CalamityMod.CalPlayer
{
if (hasClassType)
{
damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0
damageMult += (DHorHoD ? 2.3 : 2.0);
}
}
else if (rageMode)
@@ -4556,10 +4556,10 @@ namespace CalamityMod.CalPlayer
if (hasClassType)
{
double rageDamageBoost = 0.0 +
(rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15
(rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15
(rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15
double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5
(rageBoostOne ? 0.15 : 0.0) +
(rageBoostTwo ? 0.15 : 0.0) +
(rageBoostThree ? 0.15 : 0.0);
double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost;
damageMult += rageDamage;
}
}
@@ -4567,7 +4567,7 @@ namespace CalamityMod.CalPlayer
{
if (hasClassType)
{
double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5
double damageMultAdr = 1.5 * (double)adrenalineDmgMult;
damageMult += damageMultAdr;
}
}
@@ -7439,8 +7439,7 @@ namespace CalamityMod.CalPlayer
if ((drawPlayer.itemAnimation > 0 && item.useStyle != 0) || (item.holdStyle > 0 && !drawPlayer.pulley))
{
// Staff
if (item.type == ModContent.ItemType<DeathhailStaff>() || item.type == ModContent.ItemType<Vesuvius>() || item.type == ModContent.ItemType<SoulPiercer>() ||
item.type == ModContent.ItemType<FatesReveal>())
if (item.type == ModContent.ItemType<DeathhailStaff>() || item.type == ModContent.ItemType<Vesuvius>() || item.type == ModContent.ItemType<SoulPiercer>() || item.type == ModContent.ItemType<FatesReveal>())
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow");
if (item.type == ModContent.ItemType<Vesuvius>())
@@ -7562,33 +7561,75 @@ namespace CalamityMod.CalPlayer
Main.playerDrawData.Add(data);
}
}
//NOTE -- This doesn't work and I don't know what I'm doing
/*Microsoft.Xna.Framework.Color color12 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) drawPlayer.position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) drawPlayer.position.Y + (double) drawPlayer.height * 0.5) / 16, Microsoft.Xna.Framework.Color.White), drawInfo.shadow);*/
if (item.type == ModContent.ItemType<FlurrystormCannon>())
//32 is the height of the texture, 14 is the width of the texture
{
Texture2D texture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/FlurrystormCannonTankFull");
DrawData data = new DrawData(texture,
new Vector2((float) (int) ((double) drawPlayer.position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + -4f * (float) drawPlayer.direction,
(float) (int) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) -8f * (double) drawPlayer.gravDir)),
new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 14, 32)),
Color.White,
drawPlayer.bodyRotation,
new Vector2((float) (14 / 2),
(float) (32 / 2)),
1f,
effect,
0);
Main.playerDrawData.Add(data);
}
}
});
public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo)
{
if (drawInfo.shadow != 0f)
return;
Player drawPlayer = drawInfo.drawPlayer;
Item item = drawPlayer.inventory[drawPlayer.selectedItem];
if (!drawPlayer.frozen &&
item.type > 0 &&
!drawPlayer.dead &&
!item.noUseGraphic &&
(!drawPlayer.wet || !item.noWet))
{
if (item.type == ModContent.ItemType<FlurrystormCannon>() || item.type == ModContent.ItemType<MepheticSprayer>() || item.type == ModContent.ItemType<BrimstoneFlameblaster>() || item.type == ModContent.ItemType<BrimstoneFlamesprayer>() || item.type == ModContent.ItemType<SparkSpreader>() || item.type == ModContent.ItemType<HalleysInferno>() || item.type == ModContent.ItemType<CleansingBlaze>() || item.type == ModContent.ItemType<ElementalEruption>() || item.type == ModContent.ItemType<TheEmpyrean>() || item.type == ModContent.ItemType<Meowthrower>() || item.type == ModContent.ItemType<OverloadedBlaster>() || item.type == ModContent.ItemType<TerraFlameburster>() || item.type == ModContent.ItemType<Photoviscerator>() || item.type == ModContent.ItemType<Shadethrower>())
{
Color color89 = drawInfo.middleArmorColor = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)(drawPlayer.position.X + drawPlayer.width * 0.5) / 16, (int)(drawPlayer.position.Y + drawPlayer.height * 0.5) / 16, Color.White), drawInfo.shadow);
SpriteEffects spriteEffects = player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
Texture2D thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_FlurrystormCannon");
if (item.type == ModContent.ItemType<MepheticSprayer>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BlightSpewer");
else if (item.type == ModContent.ItemType<BrimstoneFlameblaster>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster");
else if (item.type == ModContent.ItemType<BrimstoneFlamesprayer>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HavocsBreath");
else if (item.type == ModContent.ItemType<SparkSpreader>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_SparkSpreader");
else if (item.type == ModContent.ItemType<HalleysInferno>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HalleysInferno");
else if (item.type == ModContent.ItemType<CleansingBlaze>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_CleansingBlaze");
else if (item.type == ModContent.ItemType<ElementalEruption>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_ElementalEruption");
else if (item.type == ModContent.ItemType<TheEmpyrean>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TheEmpyrean");
else if (item.type == ModContent.ItemType<Meowthrower>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Meowthrower");
else if (item.type == ModContent.ItemType<OverloadedBlaster>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_OverloadedBlaster");
else if (item.type == ModContent.ItemType<TerraFlameburster>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TerraFlameburster");
else if (item.type == ModContent.ItemType<Photoviscerator>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Photoviscerator");
else if (item.type == ModContent.ItemType<Shadethrower>())
thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Shadethrower");
float num25 = -4f;
float num24 = -8f;
DrawData howDoIDrawThings = new DrawData(thingToDraw,
new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) + num25 * drawPlayer.direction,
(int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num24 * drawPlayer.gravDir)),
new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height),
color89,
drawPlayer.bodyRotation,
new Vector2(thingToDraw.Width / 2,
thingToDraw.Height / 2),
1f,
spriteEffects,
0);
howDoIDrawThings.shader = 0;
Main.playerDrawData.Add(howDoIDrawThings);
}
}
}
public override void ModifyDrawLayers(List<PlayerLayer> list)
{
MiscEffectsBack.visible = true;
+4 -4
View File
@@ -2822,10 +2822,10 @@ namespace CalamityMod.CalPlayer
(modPlayer.adrenalineBoostThree ? 5 : 0);
bool DHorHoD = modPlayer.draedonsHeart || modPlayer.heartOfDarkness;
int rageDamageBoost = 0 +
(modPlayer.rageBoostOne ? (CalamityWorld.death ? 50 : 15) : 0) +
(modPlayer.rageBoostTwo ? (CalamityWorld.death ? 50 : 15) : 0) +
(modPlayer.rageBoostThree ? (CalamityWorld.death ? 50 : 15) : 0);
modPlayer.rageDamageStat = (CalamityWorld.death ? (DHorHoD ? 200 : 170) : (DHorHoD ? 65 : 50)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5
(modPlayer.rageBoostOne ? 15 : 0) +
(modPlayer.rageBoostTwo ? 15 : 0) +
(modPlayer.rageBoostThree ? 15 : 0);
modPlayer.rageDamageStat = (DHorHoD ? 65 : 50) + rageDamageBoost;
}
#endregion
+15 -4
View File
@@ -280,7 +280,10 @@ namespace CalamityMod
Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky();
Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref<Effect>(CustomShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh);
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:Signus"] = new SignusSky();
Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref<Effect>(CustomShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
UIHandler.OnLoad(this);
@@ -870,6 +873,8 @@ namespace CalamityMod
ModContent.ItemType<TotalityBreakers>(),
ModContent.ItemType<ProfanedPartisan>(),
ModContent.ItemType<BlastBarrel>(),
ModContent.ItemType<LatcherMine>(),
ModContent.ItemType<BouncingBetty>(),
ModContent.ItemType<HeliumFlash>()
};
@@ -916,6 +921,8 @@ namespace CalamityMod
ModContent.ItemType<Icebreaker>(),
ModContent.ItemType<KelvinCatalyst>(),
ModContent.ItemType<FrostcrushValari>(),
ModContent.ItemType<Endogenesis>(),
ModContent.ItemType<FlurrystormCannon>(),
//Cryonic Bar set stuff, could potentially be removed
ModContent.ItemType<Trinity>(),
ModContent.ItemType<Shimmerspark>(),
@@ -1034,6 +1041,9 @@ namespace CalamityMod
ModContent.ItemType<PolarisParrotfish>(),
ModContent.ItemType<SparklingEmpress>(),
ModContent.ItemType<NastyCholla>(),
ModContent.ItemType<PoisonPack>(),
ModContent.ItemType<PlantationStaff>(),
ModContent.ItemType<SeasSearing>(),
ModContent.ItemType<YateveoBloom>()
};
@@ -1945,8 +1955,6 @@ namespace CalamityMod
ModContent.ProjectileType<RadiantStarKnife>(),
ModContent.ProjectileType<RadiantStar2>(),
ModContent.ProjectileType<ShatteredSunKnife>(),
ModContent.ProjectileType<ShatteredSun2>(),
ModContent.ProjectileType<ShatteredSun3>(),
ModContent.ProjectileType<StellarKnifeProj>(),
ModContent.ProjectileType<StormfrontRazorProjectile>(),
ModContent.ProjectileType<TarragonThrowingDartProjectile>(),
@@ -1976,6 +1984,8 @@ namespace CalamityMod
ModContent.ItemType<TotalityBreakers>(),
ModContent.ItemType<BlastBarrel>(),
ModContent.ItemType<Penumbra>(),
ModContent.ItemType<LatcherMine>(),
ModContent.ItemType<Supernova>(),
ModContent.ItemType<ShockGrenade>()
};
@@ -1992,6 +2002,8 @@ namespace CalamityMod
ModContent.ProjectileType<ConsecratedWaterProjectile>(),
ModContent.ProjectileType<DesecratedWaterProj>(),
ModContent.ProjectileType<PenumbraBomb>(),
ModContent.ProjectileType<LatcherMineProjectile>(),
ModContent.ProjectileType<SupernovaBomb>(),
ModContent.ProjectileType<ShockGrenadeProjectile>()
};
@@ -3466,6 +3478,5 @@ namespace CalamityMod
ArmageddonBoolSync,
DemonTrophyBoolSync,
NPCRegenerationSync
//DistanceFromBossSync
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 316 B

+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
{
line2.text = "Rogue projectiles create nanoblades as they travel\n" +
"Stealth strikes summon lunar flares and sparks on enemy hits\n" +
"Stealth strikes summon nanobeams and sparks on enemy hits\n" +
"Stealth strikes have +20 armor penetration, deal 5% more damage, and heal for 1 HP\n" +
"Rogue weapons have a chance to instantly kill normal enemies\n" +
"5% increased rogue damage, 5% increased rogue crit chance, and 15% increased rogue velocity\n" +
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Plagued Fuel Pack");
Tooltip.SetDefault("*5 increased rogue damage\n" +
Tooltip.SetDefault("5% increased rogue damage\n" +
"15% increased rogue projectile velocity\n" +
"Press [Hotkey] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds\n" +
"This effect has a 3 second cooldown before it can be used again");
+1 -1
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor
modPlayer.xerocSet = true;
modPlayer.rogueStealthMax += 1.25f;
player.setBonus = "9% increased rogue damage and velocity\n" +
"All projectile types have special effects on enemy hits\n" +
"Rogue projectiles have special effects on enemy hits\n" +
"Imbued with cosmic wrath and rage when you are damaged\n" +
"Rogue stealth builds while not attacking and not moving, up to a max of 125\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
-1
View File
@@ -1,7 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
+112
View File
@@ -0,0 +1,112 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class ExoGladius : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Exo Gladius");
Tooltip.SetDefault("Do not underestimate the power of Exoblade's younger brother\n" +
"Striking an enemy with the blade makes you immune for a short time and summons comets from the sky\n" +
"Fires a rainbow orb that summons sword beams on hit");
}
public override void SetDefaults()
{
item.useStyle = 3;
item.useTurn = false;
item.useAnimation = 12;
item.useTime = 12;
item.width = 56;
item.height = 56;
item.damage = 3001;
item.melee = true;
item.knockBack = 9.9f;
item.UseSound = SoundID.Item1;
item.useTurn = true;
item.autoReuse = true;
item.value = Item.buyPrice(2, 50, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<ExoGladProj>();
item.shootSpeed = 19f;
item.Calamity().postMoonLordRarity = 15;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, damage, knockBack, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<GalileoGladius>());
recipe.AddIngredient(ModContent.ItemType<CosmicShiv>());
recipe.AddIngredient(ModContent.ItemType<Lucrecia>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(5))
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 107);
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if (!player.immune)
{
player.immune = true;
if (player.immuneTime < 10)
player.immuneTime = 10;
if (player.hurtCooldowns[0] < 10)
player.hurtCooldowns[0] = 10;
if (player.hurtCooldowns[1] < 10)
player.hurtCooldowns[1] = 10;
}
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30);
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(ModContent.BuffType<Plague>(), 120);
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.Frostburn, 120);
target.AddBuff(BuffID.OnFire, 120);
target.AddBuff(BuffID.Ichor, 120);
float x = target.Center.X + (float)Main.rand.Next(-400, 400);
float y = target.Center.Y - (float)Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = target.Center.X + (float)(target.width / 2) - vector.X;
float num16 = target.Center.Y + (float)(target.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
int num17 = 25;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
num15 *= num18;
num16 *= num18;
if (player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<ExoGladComet>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), 15f, player.whoAmI, 0f, 0f);
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -32,5 +33,10 @@ namespace CalamityMod.Items.Weapons.Ranged
item.shootSpeed = 10f;
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
}
}
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -31,5 +32,10 @@ namespace CalamityMod.Items.Weapons.Ranged
item.shootSpeed = 8.5f;
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
}
}
+6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.Calamity().postMoonLordRarity = 14;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<Chicken>(), damage, knockBack, player.whoAmI, 0f, 0f);
+1 -1
View File
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 10);
return new Vector2(-5, 5);
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
@@ -37,6 +37,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.Calamity().postMoonLordRarity = 12;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int num6 = Main.rand.Next(3, 5);
+6
View File
@@ -2,6 +2,7 @@ using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Weapons.Ranged
{
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 931;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 70)
+2 -2
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 1001;
item.damage = 1301;
item.ranged = true;
item.width = 84;
item.height = 30;
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Ranged
recipe.AddIngredient(ModContent.ItemType<BlissfulBombardier>());
recipe.AddIngredient(ModContent.ItemType<AethersWhisper>());
recipe.AddIngredient(ItemID.ElectrosphereLauncher);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
+5
View File
@@ -35,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 50)
+6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -31,5 +32,10 @@ namespace CalamityMod.Items.Weapons.Ranged
item.shootSpeed = 7.5f;
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
}
}
+6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -33,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 771;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<OnyxSharkBomb>(), damage, knockBack, player.whoAmI, 0f, 0f);
+1 -1
View File
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset()
{
return new Vector2(-4, 0);
return new Vector2(-4, -5);
}
public override bool ConsumeAmmo(Player player)
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = 8;
item.UseSound = SoundID.Item40;
item.autoReuse = false;
item.autoReuse = true;
item.shootSpeed = 20f;
item.shoot = ModContent.ProjectileType<SicknessRound>();
item.useAmmo = 97;
+6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 771;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool AltFunctionUse(Player player)
{
return true;
@@ -1,6 +1,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Weapons.Ranged
{
@@ -33,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 931;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 70)
+6
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.shootSpeed = 12f;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 80)
+6
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 23;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(0, 100) < 70)
+5
View File
@@ -34,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged
item.useAmmo = 771;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
switch (Main.rand.Next(4))
+1
View File
@@ -47,6 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SpearofPaleolith>());
recipe.AddIngredient(ModContent.ItemType<ScourgeoftheSeas>());
recipe.AddIngredient(ModContent.ItemType<Turbulance>());
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 10);
recipe.AddIngredient(ItemID.FragmentStardust, 10);
recipe.AddTile(TileID.LunarCraftingStation);
+15 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,14 +12,15 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shattered Sun");
Tooltip.SetDefault("Throws daggers that split twice and explode upon contact");
Tooltip.SetDefault("Throws daggers that transform into homing meteors\n" +
"Stealth strikes fire volleys of meteors from the player on meteor hits");
}
public override void SafeSetDefaults()
{
item.width = 56;
item.height = 56;
item.damage = 60;
item.damage = 90;
item.crit += 10;
item.noMelee = true;
item.noUseGraphic = true;
@@ -45,5 +47,16 @@ namespace CalamityMod.Items.Weapons.Rogue
recipe.SetResult(this);
recipe.AddRecipe();
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue
item.height = 30;
item.maxStack = 999;
item.value = Item.buyPrice(0, 1, 0, 0);
item.rare = 0;
item.rare = 1;
item.shoot = ModContent.ProjectileType<SludgeSplotchProj1>();
item.shootSpeed = 10f;
item.Calamity().rogue = true;
+2 -2
View File
@@ -21,7 +21,7 @@ Stealth strikes release energy as they fly");
public override void SafeSetDefaults()
{
item.width = 34;
item.damage = 699;
item.damage = 1299;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 24;
@@ -62,7 +62,7 @@ Stealth strikes release energy as they fly");
//replaces Duststorm in a Bottle when added
//recipe.AddIngredient(ModContent.ItemType<SealedSingularity>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
+1 -1
View File
@@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Summon
if (AttackMode == 1) //icicles
dmgMult = 1f;
if (AttackMode == 2) //melee
dmgMult = 0.9f;
dmgMult = 0.95f;
if (AttackMode == 3) //flamethrower
dmgMult = 0.9f;
int body = Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, (int)(damage * dmgMult), knockBack, player.whoAmI, AttackMode, 0f);
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon
item.knockBack = 4f;
item.mana = 15;
item.damage = 120;
item.damage = 28;
item.useTime = 30;
item.useAnimation = 30;
item.shoot = ModContent.ProjectileType<ApexShark>();
+49
View File
@@ -0,0 +1,49 @@
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Summon
{
public class LanternoftheSoul : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lantern of the Soul");
Tooltip.SetDefault("Summons a lantern turret to fight for you");
}
public override void SetDefaults()
{
item.damage = 250;
item.summon = true;
item.sentry = true;
item.mana = 10;
item.width = 42;
item.height = 60;
item.useTime = 36;
item.useAnimation = 36;
item.useStyle = 1;
item.noMelee = true;
item.knockBack = 5f;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<LanternSoul>();
item.Calamity().postMoonLordRarity = 22;
item.UseSound = SoundID.Item44;
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
position = Main.MouseWorld;
speedX = 0;
speedY = 0;
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
player.UpdateMaxTurrets();
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
item.damage = 42;
item.damage = 35;
item.mana = 10;
item.width = 48;
item.height = 56;
+2 -3
View File
@@ -320,9 +320,8 @@ namespace CalamityMod
calamity, "Profaned Guardians",
(Func<bool>)(() => CalamityWorld.downedGuardians),
ModContent.ItemType<ProfanedShard>(),
ModContent.ItemType<KnowledgeProfanedGuardians>(),
new List<int>() { ModContent.ItemType<ProfanedGuardianMask>(), ModContent.ItemType<KnowledgeProfanedGuardians>() },
new List<int>() { ModContent.ItemType<ProfanedCore>(), ItemID.GreaterHealingPotion},
new List<int>() { ModContent.ItemType<ProfanedGuardianMask>() },
"Use a [i:" + ModContent.ItemType<ProfanedShard>() + "] in the Hallow or Underworld Biomes",
"[c/FFA500:The guardians must protect their goddess at all costs.]",
"CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist");
@@ -393,7 +392,7 @@ namespace CalamityMod
(Func<bool>)(() => CalamityWorld.downedSentinel3),
ModContent.ItemType<RuneofCos>(),
new List<int>() {ModContent.ItemType<SignusTrophy>(), ModContent.ItemType<SignusMask>(), ModContent.ItemType<KnowledgeSentinels>()},
new List<int>() {ModContent.ItemType<TwistingNether>(), ModContent.ItemType<Cosmilamp>(), ModContent.ItemType<CosmicKunai>(), ModContent.ItemType<SpectralVeil>(), ItemID.SuperHealingPotion},
new List<int>() {ModContent.ItemType<TwistingNether>(), ModContent.ItemType<Cosmilamp>(), ModContent.ItemType<CosmicKunai>(), ModContent.ItemType<LanternoftheSoul>(), ModContent.ItemType<SpectralVeil>(), ItemID.SuperHealingPotion},
"Use a [i:" + ModContent.ItemType<RuneofCos>() + "] in the Underworld",
"[c/BA55D3:The Devourer's assassin has finished its easy task.]");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 927 B

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 219 B

+2 -2
View File
@@ -17,11 +17,11 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void SetDefaults()
{
npc.noGravity = true;
npc.damage = 15;
npc.damage = Main.hardMode ? 35 : 15;
npc.width = 28;
npc.height = 28;
npc.defense = 5;
npc.LifeMaxNERD(30, bossRush: 30000);
npc.LifeMaxNERB((Main.hardMode ? 200 : 30), bossRush: 30000);
npc.aiStyle = -1;
aiType = -1;
for (int k = 0; k < npc.buffImmune.Length; k++)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
npc.LifeMaxNERB(73000, 85000, 10000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
npc.LifeMaxNERB(73000, 85000, 10000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+4 -2
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.AquaticScourge
npc.Calamity().RevPlusDR(0.1f);
npc.aiStyle = -1;
aiType = -1;
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
npc.LifeMaxNERB(73000, 85000, 10000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
@@ -65,11 +65,13 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(npc.chaseable);
}
writer.Write(npc.localAI[1]);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
npc.chaseable = reader.ReadBoolean();
npc.localAI[1] = reader.ReadSingle();
}
public override void AI()
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.AquaticScourge
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
npc.LifeMaxNERB(73000, 85000, 10000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+7 -7
View File
@@ -16,17 +16,17 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void SetDefaults()
{
npc.damage = 15; //70
npc.width = 16; //28
npc.height = 16; //28
npc.damage = Main.hardMode ? 30 : 15;
npc.width = 16;
npc.height = 16;
npc.defense = 10;
npc.lifeMax = 60;
if (CalamityWorld.bossRushActive)
npc.lifeMax = Main.hardMode ? 500 : 60;
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = 60000;
}
npc.aiStyle = -1; //new
aiType = -1; //new
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
for (int k = 0; k < npc.buffImmune.Length; k++)
+8 -8
View File
@@ -13,8 +13,8 @@ namespace CalamityMod.NPCs.AquaticScourge
{
public const int minLength = 3;
public const int maxLength = 4;
public float speed = 3f; //10
public float turnSpeed = 0.05f; //0.15
public float speed = 3f;
public float turnSpeed = 0.05f;
bool TailSpawned = false;
public override void SetStaticDefaults()
@@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void SetDefaults()
{
npc.damage = 20;
npc.width = 22; //36
npc.height = 28; //20
npc.damage = Main.hardMode ? 40 : 20;
npc.width = 22;
npc.height = 28;
npc.defense = 5;
npc.lifeMax = 60;
npc.lifeMax = Main.hardMode ? 500 : 60;
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = 60000;
@@ -109,8 +109,8 @@ namespace CalamityMod.NPCs.AquaticScourge
{
npc.active = false;
}
float num188 = speed;
float num189 = turnSpeed;
float num188 = speed * (Main.hardMode ? 3f : 1f);
float num189 = turnSpeed * (Main.hardMode ? 3f : 1f);
Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2);
float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2);
+7 -7
View File
@@ -16,17 +16,17 @@ namespace CalamityMod.NPCs.AquaticScourge
public override void SetDefaults()
{
npc.damage = 5; //70
npc.width = 16; //28
npc.height = 22; //28
npc.damage = Main.hardMode ? 15 : 5;
npc.width = 16;
npc.height = 22;
npc.defense = 20;
npc.lifeMax = 60;
if (CalamityWorld.bossRushActive)
npc.lifeMax = Main.hardMode ? 500 : 60;
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = 60000;
}
npc.aiStyle = -1; //new
aiType = -1; //new
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
for (int k = 0; k < npc.buffImmune.Length; k++)
+4 -4
View File
@@ -20,11 +20,11 @@ namespace CalamityMod.NPCs.AquaticScourge
{
npc.aiStyle = -1;
aiType = -1;
npc.damage = 25;
npc.width = 40; //324
npc.height = 40; //216
npc.damage = Main.hardMode ? 50 : 25;
npc.width = 40;
npc.height = 40;
npc.defense = 10;
npc.lifeMax = 50;
npc.lifeMax = Main.hardMode ? 300 : 50;
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = 50000;
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.AstrumAureus
npc.height = 280;
npc.defense = 50;
npc.Calamity().RevPlusDR(0.15f);
npc.LifeMaxNERD(96000, NPC.downedMoonlord ? 440000 : 122000, NPC.downedMoonlord ? 660000 : 187000, 8400000, 9000000); // 30 seconds in boss rush
npc.LifeMaxNERB(96000, NPC.downedMoonlord ? 440000 : 122000, 8400000); // 30 seconds in boss rush
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstrumAureus
global.DR = 0.999999f;
global.unbreakableDR = true;
npc.lifeMax = Main.expertMode ? 1007 : 1012;
if (CalamityWorld.death || CalamityWorld.bossRushActive)
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = 1002;
}
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.height = 44;
npc.defense = 40;
npc.Calamity().RevPlusDR(0.1f);
npc.LifeMaxNERD(12000, 18000, 29100, 360000, 420000);
npc.LifeMaxNERB(12000, 18000, 360000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -9
View File
@@ -33,15 +33,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 38;
npc.height = 44;
npc.defense = 50;
npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500;
if (CalamityWorld.death)
{
npc.lifeMax = 80700;
}
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000;
}
npc.LifeMaxNERB(37500, 53800, 1300000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+2 -10
View File
@@ -31,16 +31,8 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.height = 56;
npc.defense = 20;
npc.Calamity().RevPlusDR(0.1f);
npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000;
if (CalamityWorld.death)
{
npc.lifeMax = 29100;
}
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 420000 : 360000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(12000, 18000, 360000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = 6;
aiType = -1;
+2 -10
View File
@@ -42,16 +42,8 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 56;
npc.height = 56;
npc.defense = 25;
npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500;
if (CalamityWorld.death)
{
npc.lifeMax = 80700;
}
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(37500, 53800, 1300000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 536 B

+2 -10
View File
@@ -29,16 +29,8 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.height = 68;
npc.defense = 60;
npc.Calamity().RevPlusDR(0.35f);
npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000;
if (CalamityWorld.death)
{
npc.lifeMax = 29100;
}
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 420000 : 360000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(12000, 18000, 360000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = 6;
aiType = -1;
+2 -10
View File
@@ -29,16 +29,8 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.width = 52;
npc.height = 68;
npc.defense = 75;
npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500;
if (CalamityWorld.death)
{
npc.lifeMax = 80700;
}
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(37500, 53800, 1300000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
-4
View File
@@ -33,10 +33,6 @@ namespace CalamityMod.NPCs.BrimstoneElemental
npc.defense = 0;
npc.Calamity().DR = normalDR;
npc.lifeMax = 4000;
if (CalamityWorld.death)
{
npc.lifeMax = 6000;
}
npc.knockBackResist = 0f;
for (int k = 0; k < npc.buffImmune.Length; k++)
{
@@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
npc.height = 150;
npc.defense = 15;
npc.value = Item.buyPrice(0, 12, 0, 0);
npc.LifeMaxNERD(26000, 35708, 54050, 6500000, 7000000);
npc.LifeMaxNERB(26000, 35708, 6500000);
if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.width = 80;
npc.height = 80;
npc.defense = 40;
npc.LifeMaxNERD(227500, 252500, 302500, 3000000, 3200000);
npc.LifeMaxNERB(227500, 252500, 3000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.height = 80;
npc.scale = 0.66f;
npc.defense = 20;
npc.LifeMaxNERD(25000, 30000, 35000, 60000, 65000);
npc.LifeMaxNERB(25000, 30000, 60000);
npc.knockBackResist = 0f;
for (int k = 0; k < npc.buffImmune.Length; k++)
{
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.defense = 15;
npc.Calamity().RevPlusDR(0.15f);
npc.value = 0f;
npc.LifeMaxNERD(37500, 51750, 82750, 5200000, 5500000);
npc.LifeMaxNERB(37500, 51750, 5200000);
if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.height = 120;
npc.defense = 10;
npc.Calamity().RevPlusDR(0.15f);
npc.LifeMaxNERD(9000, 13200, 15000, 800000, 900000);
npc.LifeMaxNERB(9000, 13200, 800000);
if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.height = 120;
npc.defense = 10;
npc.Calamity().RevPlusDR(0.15f);
npc.LifeMaxNERD(7500, 11025, 13200, 800000, 900000);
npc.LifeMaxNERB(7500, 11025, 800000);
if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive)
{
npc.damage *= 3;
+1 -1
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.defense = 25;
npc.value = Item.buyPrice(0, 15, 0, 0);
npc.Calamity().RevPlusDR(0.15f);
npc.LifeMaxNERD(28125, 38812, 62062, 3900000, 4125000);
npc.LifeMaxNERB(28125, 38812, 3900000);
if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive)
{
npc.damage *= 3;
+1 -2
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Calamitas
npc.lifeMax = 2500;
if (CalamityWorld.bossRushActive)
{
npc.lifeMax = CalamityWorld.death ? 200000 : 150000;
npc.lifeMax = 150000;
}
for (int k = 0; k < npc.buffImmune.Length; k++)
{
@@ -90,7 +90,6 @@ namespace CalamityMod.NPCs.Calamitas
npc.netUpdate = true;
return false;
}
Player player = Main.player[npc.target];
NPC parent = Main.npc[NPC.FindFirstNPC(ModContent.NPCType<CalamitasRun3>())];
double deg = (double)npc.ai[1];
double rad = deg * (Math.PI / 180);
+92 -55
View File
@@ -50,6 +50,68 @@ namespace CalamityMod.NPCs
npc.velocity.Length();
// Circular movement
bool doSpiral = false;
if (head && calamityGlobalNPC.newAI[0] == 1f && calamityGlobalNPC.newAI[2] == 1f && (CalamityWorld.revenge || CalamityWorld.bossRushActive))
{
float ai3 = 600f;
calamityGlobalNPC.newAI[3] += 1f;
doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= ai3;
if (doSpiral)
{
// Barf out enemies
if (calamityGlobalNPC.newAI[3] % 60f == 0f)
{
Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13);
int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16;
int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16;
if (npcPosX < 0)
npcPosX = 0;
if (npcPosX > Main.maxTilesX)
npcPosX = Main.maxTilesX;
if (npcPosY < 0)
npcPosY = 0;
if (npcPosY > Main.maxTilesY)
npcPosY = Main.maxTilesY;
Vector2 spawnPosition = new Vector2((float)(npcPosX * 16), (float)(npcPosY * 16));
if (!Main.tile[npcPosX, npcPosY].active() && Main.netMode != NetmodeID.MultiplayerClient)
{
if (NPC.CountNPCS(ModContent.NPCType<AquaticSeekerHead>()) < 1)
NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType<AquaticSeekerHead>());
if (NPC.CountNPCS(ModContent.NPCType<AquaticUrchin>()) < 4)
NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType<AquaticUrchin>());
if (NPC.CountNPCS(ModContent.NPCType<AquaticParasite>()) < 8)
NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType<AquaticParasite>());
}
}
// Velocity boost
if (calamityGlobalNPC.newAI[3] == ai3)
{
npc.velocity.Normalize();
npc.velocity *= 24f;
}
// Spin velocity
float velocity = (float)(Math.PI * 2D) / 120f;
npc.velocity = npc.velocity.RotatedBy((double)(-(double)velocity * npc.localAI[1]));
npc.rotation = (float)System.Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f;
// Reset and charge at target
if (calamityGlobalNPC.newAI[3] >= ai3 + 180f)
{
calamityGlobalNPC.newAI[3] = 0f;
npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * 12f;
}
}
else
npc.localAI[1] = (npc.Center.X - Main.player[npc.target].Center.X < 0 ? 1f : -1f);
}
if (Main.netMode != NetmodeID.MultiplayerClient)
{
if (head)
@@ -82,49 +144,14 @@ namespace CalamityMod.NPCs
calamityGlobalNPC.newAI[2] = 1f;
}
// Big barf attack, spawns enemies and projectile swarms
if (calamityGlobalNPC.newAI[0] == 1f)
// Big barf attack
if (calamityGlobalNPC.newAI[0] == 1f && !doSpiral)
{
npc.localAI[0] += 1f;
if (npc.localAI[0] >= ((calamityGlobalNPC.enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 120f : 180f))
{
int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16;
int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16;
if (npcPosX < 0)
npcPosX = 0;
if (npcPosX > Main.maxTilesX)
npcPosX = Main.maxTilesX;
if (npcPosY < 0)
npcPosY = 0;
if (npcPosY > Main.maxTilesY)
npcPosY = Main.maxTilesY;
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 300f &&
!Main.tile[npcPosX, npcPosY].active())
{
npc.localAI[0] = 0f;
npc.TargetClosest(true);
npc.netUpdate = true;
int random = Main.rand.Next(3);
Main.PlaySound(3, (int)npc.Center.X, (int)npc.Center.Y, 8);
Vector2 spawnAt = npc.Center + new Vector2(0f, (float)npc.height / 2f);
if (random == 0 && NPC.CountNPCS(ModContent.NPCType<AquaticSeekerHead>()) < 1)
NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType<AquaticSeekerHead>());
else if (random == 1 && NPC.CountNPCS(ModContent.NPCType<AquaticUrchin>()) < 3)
NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType<AquaticUrchin>());
else if (NPC.CountNPCS(ModContent.NPCType<AquaticParasite>()) < 8)
NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType<AquaticParasite>());
}
}
npc.localAI[1] += 1f;
if (Main.player[npc.target].gravDir == -1f)
npc.localAI[1] += 2f;
npc.localAI[0] += 2f;
if (npc.localAI[1] >= (CalamityWorld.bossRushActive ? 270f : 390f))
if (npc.localAI[0] >= (CalamityWorld.bossRushActive ? 300f : (CalamityWorld.revenge ? 360f : 420f)))
{
int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16;
int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16;
@@ -140,7 +167,7 @@ namespace CalamityMod.NPCs
if (!Main.tile[npcPosX, npcPosY].active() && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 300f)
{
npc.localAI[1] = 0f;
npc.localAI[0] = 0f;
npc.TargetClosest(true);
npc.netUpdate = true;
Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13);
@@ -320,7 +347,7 @@ namespace CalamityMod.NPCs
int num43 = (int)(Main.player[npc.target].Center.X / 16f);
int num44 = (int)(Main.player[npc.target].Center.Y / 16f);
if (head)
if (head && !doSpiral)
{
for (int num45 = num43 - 2; num45 <= num43 + 2; num45++)
{
@@ -467,7 +494,7 @@ namespace CalamityMod.NPCs
}
}
}
else
else if (!doSpiral)
{
float num196 = System.Math.Abs(num191);
float num197 = System.Math.Abs(num192);
@@ -1007,7 +1034,6 @@ namespace CalamityMod.NPCs
int FireEye = NPC.NewNPC((int)(npc.Center.X + (Math.Sin(I * 72) * 150)), (int)(npc.Center.Y + (Math.Cos(I * 72) * 150)), ModContent.NPCType<SoulSeeker>(), npc.whoAmI, 0, 0, 0, -1);
NPC Eye = Main.npc[FireEye];
Eye.ai[0] = I * 72;
Eye.ai[3] = I * 72;
}
}
@@ -3283,21 +3309,32 @@ namespace CalamityMod.NPCs
npc.netUpdate = true;
}
if (lifePercentage < 50 && revenge)
if (revenge)
{
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int damage = expertMode ? 50 : 60;
int i;
float passedVar = 1f;
for (i = 0; i < 4; i++)
if (lifePercentage < 50 || CalamityWorld.death || CalamityWorld.bossRushActive || !player.ZoneDungeon)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType<DarkEnergyBall>(), damage, 0f, Main.myPlayer, passedVar, 0f);
passedVar += 1f;
for (int i = 0; i < 12; i++)
{
float ai1 = player.ZoneDungeon ? 0f : 1f;
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType<DarkEnergyBall2>(), damage, 0f, Main.myPlayer, (float)(i * 30), ai1);
}
}
else
{
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
float passedVar = 1f;
for (i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType<DarkEnergyBall>(), damage, 0f, Main.myPlayer, passedVar, 0f);
passedVar += 1f;
}
}
}
}
+87 -132
View File
@@ -866,8 +866,7 @@ namespace CalamityMod.NPCs
}
}
Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f);
npc.velocity.X *= 0.98f;
npc.velocity.Y *= 0.98f;
npc.velocity *= 0.98f;
if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1)
npc.velocity.X = 0f;
@@ -2431,8 +2430,7 @@ namespace CalamityMod.NPCs
// Increase speed
if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < velocity)
{
npc.velocity.Y *= 1.05f;
npc.velocity.X *= 1.05f;
npc.velocity *= 1.05f;
}
// Charge at target
@@ -3343,15 +3341,13 @@ namespace CalamityMod.NPCs
npc.rotation = npc.velocity.X / 15f;
float num169 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.05f : 0.04f;
float num170 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 5.5f : 5f;
float num170 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 3f : 3.5f;
float num171 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.1f : 0.08f;
float num172 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 11f : 10f;
float num172 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 7.5f : 8.5f;
if (CalamityWorld.bossRushActive)
{
num169 *= 1.5f;
num170 *= 1.2f;
num171 *= 1.5f;
num172 *= 1.2f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 250f)
@@ -3517,8 +3513,8 @@ namespace CalamityMod.NPCs
if (Main.npc[(int)npc.ai[1]].ai[1] != 0f)
{
float maxX = CalamityWorld.bossRushActive ? 5f : 4f;
float maxY = CalamityWorld.bossRushActive ? 3.75f : 3f;
float maxX = CalamityWorld.bossRushActive ? 6f : 7f;
float maxY = CalamityWorld.bossRushActive ? 4.5f : 5f;
if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y - 100f)
{
if (npc.velocity.Y > 0f)
@@ -3564,22 +3560,22 @@ namespace CalamityMod.NPCs
npc.netUpdate = true;
}
float maxX = CalamityWorld.bossRushActive ? 5f : 4f;
float maxY = CalamityWorld.bossRushActive ? 2f : 1.5f;
float maxX = CalamityWorld.bossRushActive ? 6f : 7f;
float maxY = CalamityWorld.bossRushActive ? 2f : 2.5f;
if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y + 230f)
{
if (npc.velocity.Y > 0f)
npc.velocity.Y *= 0.96f;
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f;
npc.velocity.Y *= 0.92f;
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.12f : 0.08f;
if (npc.velocity.Y > maxY)
npc.velocity.Y = maxY;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f)
{
if (npc.velocity.Y < 0f)
npc.velocity.Y *= 0.96f;
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f;
npc.velocity.Y *= 0.92f;
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.12f : 0.08f;
if (npc.velocity.Y < -maxY)
npc.velocity.Y = -maxY;
}
@@ -3587,8 +3583,8 @@ namespace CalamityMod.NPCs
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0])
{
if (npc.velocity.X > 0f)
npc.velocity.X *= 0.96f;
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.11f : 0.07f;
npc.velocity.X *= 0.92f;
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.22f : 0.14f;
if (npc.velocity.X > maxX)
npc.velocity.X = maxX;
}
@@ -3596,43 +3592,8 @@ namespace CalamityMod.NPCs
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0])
{
if (npc.velocity.X < 0f)
npc.velocity.X *= 0.96f;
npc.velocity.X += CalamityWorld.bossRushActive ? 0.11f : 0.07f;
if (npc.velocity.X < -maxX)
npc.velocity.X = -maxX;
}
if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y + 230f)
{
if (npc.velocity.Y > 0f)
npc.velocity.Y *= 0.96f;
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f;
if (npc.velocity.Y > maxY)
npc.velocity.Y = maxY;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f)
{
if (npc.velocity.Y < 0f)
npc.velocity.Y *= 0.96f;
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f;
if (npc.velocity.Y < -maxY)
npc.velocity.Y = -maxY;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0])
{
if (npc.velocity.X > 0f)
npc.velocity.X *= 0.96f;
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.11f : 0.07f;
if (npc.velocity.X > maxX)
npc.velocity.X = maxX;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0])
{
if (npc.velocity.X < 0f)
npc.velocity.X *= 0.96f;
npc.velocity.X += CalamityWorld.bossRushActive ? 0.11f : 0.07f;
npc.velocity.X *= 0.92f;
npc.velocity.X += CalamityWorld.bossRushActive ? 0.22f : 0.14f;
if (npc.velocity.X < -maxX)
npc.velocity.X = -maxX;
}
@@ -3653,11 +3614,10 @@ namespace CalamityMod.NPCs
float num187 = (float)Math.Sqrt((double)(num185 * num185 + num186 * num186));
npc.rotation = (float)Math.Atan2((double)num186, (double)num185) + 1.57f;
npc.velocity.X *= 0.95f;
npc.velocity.Y -= 0.1f;
npc.velocity.Y -= 0.2f;
npc.velocity.Y -= 0.06f;
if (npc.velocity.Y < -15f)
npc.velocity.Y = -15f;
if (npc.velocity.Y < -13f)
npc.velocity.Y = -13f;
if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 200f)
{
@@ -3690,13 +3650,12 @@ namespace CalamityMod.NPCs
float num190 = (float)Math.Sqrt((double)(num188 * num188 + num189 * num189));
npc.rotation = (float)Math.Atan2((double)num189, (double)num188) + 1.57f;
npc.velocity.Y *= 0.95f;
npc.velocity.X += 0.1f * -npc.ai[0];
npc.velocity.X += 0.2f * -npc.ai[0];
npc.velocity.X += 0.07f * -npc.ai[0];
if (npc.velocity.X < -14f)
npc.velocity.X = -14f;
else if (npc.velocity.X > 14f)
npc.velocity.X = 14f;
if (npc.velocity.X < -12f)
npc.velocity.X = -12f;
else if (npc.velocity.X > 12f)
npc.velocity.X = 12f;
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 500f || npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 500f)
{
@@ -4912,8 +4871,7 @@ namespace CalamityMod.NPCs
npc.ai[2] += 1f;
if (npc.ai[2] >= 25f)
{
npc.velocity.X *= 0.96f;
npc.velocity.Y *= 0.96f;
npc.velocity *= 0.96f;
if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1)
{
npc.velocity.X = 0f;
@@ -5002,8 +4960,7 @@ namespace CalamityMod.NPCs
Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f);
npc.velocity.X *= 0.98f;
npc.velocity.Y *= 0.98f;
npc.velocity *= 0.98f;
if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1)
npc.velocity.X = 0f;
@@ -5612,8 +5569,7 @@ namespace CalamityMod.NPCs
if (npc.ai[2] >= timeBeforeSlowDown)
{
// Slow down
npc.velocity.X *= 0.9f;
npc.velocity.Y *= 0.9f;
npc.velocity *= 0.9f;
if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1)
npc.velocity.X = 0f;
@@ -5707,8 +5663,7 @@ namespace CalamityMod.NPCs
Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f);
npc.velocity.X *= 0.98f;
npc.velocity.Y *= 0.98f;
npc.velocity *= 0.98f;
if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1)
npc.velocity.X = 0f;
@@ -6349,26 +6304,26 @@ namespace CalamityMod.NPCs
npc.rotation = npc.velocity.X / 15f;
float velocity2 = CalamityWorld.bossRushActive ? 4f : 2f;
float velocity2 = 3f;
float acceleration = CalamityWorld.bossRushActive ? 0.2f : 0.1f;
if (!cannonAlive)
{
velocity2 += 1f;
velocity2 -= 0.35f;
acceleration += 0.025f;
}
if (!laserAlive)
{
velocity2 += 1f;
velocity2 -= 0.35f;
acceleration += 0.025f;
}
if (!viceAlive)
{
velocity2 += 1f;
velocity2 -= 0.35f;
acceleration += 0.025f;
}
if (!sawAlive)
{
velocity2 += 1f;
velocity2 -= 0.35f;
acceleration += 0.025f;
}
@@ -6400,8 +6355,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
if (npc.velocity.X > 7f)
npc.velocity.X = 7f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 150f)
{
@@ -6410,8 +6365,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -7f)
npc.velocity.X = -7f;
}
}
@@ -6580,9 +6535,9 @@ namespace CalamityMod.NPCs
Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0, 1f, 0f);
// Set spin direction
if (Main.player[npc.target].velocity.X > 0)
if (Main.player[npc.target].velocity.X > 0f)
calamityGlobalNPC.newAI[0] = 1f;
else if (Main.player[npc.target].velocity.X < 0)
else if (Main.player[npc.target].velocity.X < 0f)
calamityGlobalNPC.newAI[0] = -1f;
else
calamityGlobalNPC.newAI[0] = (float)Main.player[npc.target].direction;
@@ -6810,8 +6765,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y > 3f)
npc.velocity.Y = 3f;
if (npc.velocity.Y > 2.5f)
npc.velocity.Y = 2.5f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 100f)
{
@@ -6820,8 +6775,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y < -3f)
npc.velocity.Y = -3f;
if (npc.velocity.Y < -2.5f)
npc.velocity.Y = -2.5f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 180f * npc.ai[0])
@@ -6831,8 +6786,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.21f : 0.14f;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
if (npc.velocity.X > 7f)
npc.velocity.X = 7f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 180f * npc.ai[0])
{
@@ -6841,8 +6796,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.21f : 0.14f;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -7f)
npc.velocity.X = -7f;
}
npc.TargetClosest(true);
@@ -7086,8 +7041,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.12f : 0.08f;
if (npc.velocity.Y > 3f)
npc.velocity.Y = 3f;
if (npc.velocity.Y > 2.5f)
npc.velocity.Y = 2.5f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 150f)
{
@@ -7096,8 +7051,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.12f : 0.08f;
if (npc.velocity.Y < -3f)
npc.velocity.Y = -3f;
if (npc.velocity.Y < -2.5f)
npc.velocity.Y = -2.5f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 200f)
@@ -7107,8 +7062,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.3f : 0.2f;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
if (npc.velocity.X > 7f)
npc.velocity.X = 7f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 160f)
{
@@ -7117,8 +7072,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.3f : 0.2f;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -7f)
npc.velocity.X = -7f;
}
Vector2 vector60 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
@@ -7298,8 +7253,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y > 8f)
npc.velocity.Y = 8f;
if (npc.velocity.Y > 7f)
npc.velocity.Y = 7f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y)
{
@@ -7308,8 +7263,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y < -8f)
npc.velocity.Y = -8f;
if (npc.velocity.Y < -7f)
npc.velocity.Y = -7f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
@@ -7319,8 +7274,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.75f : 0.5f;
if (npc.velocity.X > 12f)
npc.velocity.X = 12f;
if (npc.velocity.X > 10f)
npc.velocity.X = 10f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
{
@@ -7329,8 +7284,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.75f : 0.5f;
if (npc.velocity.X < -12f)
npc.velocity.X = -12f;
if (npc.velocity.X < -10f)
npc.velocity.X = -10f;
}
}
@@ -7367,8 +7322,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y > 3f)
npc.velocity.Y = 3f;
if (npc.velocity.Y > 2.5f)
npc.velocity.Y = 2.5f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f)
{
@@ -7377,8 +7332,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y < -3f)
npc.velocity.Y = -3f;
if (npc.velocity.Y < -2.5f)
npc.velocity.Y = -2.5f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 250f)
@@ -7388,8 +7343,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.45f : 0.3f;
if (npc.velocity.X > 9f)
npc.velocity.X = 9f;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
{
@@ -7398,8 +7353,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.3f : 0.2f;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -7f)
npc.velocity.X = -7f;
}
Vector2 vector57 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
@@ -7605,8 +7560,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y > 8f)
npc.velocity.Y = 8f;
if (npc.velocity.Y > 7f)
npc.velocity.Y = 7f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y)
{
@@ -7615,8 +7570,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f;
if (npc.velocity.Y < -8f)
npc.velocity.Y = -8f;
if (npc.velocity.Y < -7f)
npc.velocity.Y = -7f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
@@ -7626,8 +7581,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.75f : 0.5f;
if (npc.velocity.X > 12f)
npc.velocity.X = 12f;
if (npc.velocity.X > 10f)
npc.velocity.X = 10f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
{
@@ -7636,8 +7591,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.75f : 0.5f;
if (npc.velocity.X < -12f)
npc.velocity.X = -12f;
if (npc.velocity.X < -10f)
npc.velocity.X = -10f;
}
}
else
@@ -7670,8 +7625,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f;
if (npc.velocity.Y > 3f)
npc.velocity.Y = 3f;
if (npc.velocity.Y > 2.5f)
npc.velocity.Y = 2.5f;
}
else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 260f)
{
@@ -7680,8 +7635,8 @@ namespace CalamityMod.NPCs
npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f;
if (npc.velocity.Y < -3f)
npc.velocity.Y = -3f;
if (npc.velocity.Y < -2.5f)
npc.velocity.Y = -2.5f;
}
if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2))
@@ -7691,8 +7646,8 @@ namespace CalamityMod.NPCs
npc.velocity.X -= CalamityWorld.bossRushActive ? 0.45f : 0.3f;
if (npc.velocity.X > 12f)
npc.velocity.X = 12f;
if (npc.velocity.X > 10f)
npc.velocity.X = 10f;
}
if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 250f)
{
@@ -7701,8 +7656,8 @@ namespace CalamityMod.NPCs
npc.velocity.X += CalamityWorld.bossRushActive ? 0.45f : 0.3f;
if (npc.velocity.X < -12f)
npc.velocity.X = -12f;
if (npc.velocity.X < -10f)
npc.velocity.X = -10f;
}
Vector2 vector52 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
+86 -98
View File
@@ -593,7 +593,7 @@ namespace CalamityMod.NPCs
if (npc.type != ModContent.NPCType<HiveMindP2>() && npc.type != ModContent.NPCType<Leviathan.Leviathan>() && npc.type != ModContent.NPCType<StormWeaverHeadNaked>() &&
npc.type != ModContent.NPCType<StormWeaverBodyNaked>() && npc.type != ModContent.NPCType<StormWeaverTailNaked>() &&
npc.type != ModContent.NPCType<DevourerofGodsHeadS>() && npc.type != ModContent.NPCType<DevourerofGodsBodyS>() &&
npc.type != ModContent.NPCType<DevourerofGodsTailS>())
npc.type != ModContent.NPCType<DevourerofGodsTailS>() && npc.type != ModContent.NPCType<CalamitasRun3>())
{
if (Main.netMode != NetmodeID.Server)
{
@@ -609,41 +609,8 @@ namespace CalamityMod.NPCs
{
BossRushStatChanges(npc, mod);
}
else
{
if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss)
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.buffImmune[ModContent.BuffType<TimeSlow>()] = true;
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
npc.buffImmune[BuffID.Webbed] = true;
npc.buffImmune[BuffID.Slow] = true;
}
if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC)
{
for (int k = 0; k < npc.buffImmune.Length; k++)
{
npc.buffImmune[k] = true;
}
if (npc.townNPC)
{
npc.buffImmune[BuffID.Wet] = false;
npc.buffImmune[BuffID.Slimed] = false;
npc.buffImmune[BuffID.Lovestruck] = false;
npc.buffImmune[BuffID.Stinky] = false;
}
}
}
if (npc.buffImmune[BuffID.Venom] == false)
{
npc.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = false;
}
npc.buffImmune[ModContent.BuffType<Enraged>()] = false;
DebuffImmunities(npc);
BossValueChanges(npc);
@@ -691,6 +658,44 @@ namespace CalamityMod.NPCs
}
#endregion
#region Debuff Immunities
private void DebuffImmunities(NPC npc)
{
if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss)
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.buffImmune[ModContent.BuffType<TimeSlow>()] = true;
npc.buffImmune[ModContent.BuffType<TeslaBuff>()] = true;
npc.buffImmune[BuffID.Webbed] = true;
npc.buffImmune[BuffID.Slow] = true;
}
if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC)
{
for (int k = 0; k < npc.buffImmune.Length; k++)
{
npc.buffImmune[k] = true;
}
if (npc.townNPC)
{
npc.buffImmune[BuffID.Wet] = false;
npc.buffImmune[BuffID.Slimed] = false;
npc.buffImmune[BuffID.Lovestruck] = false;
npc.buffImmune[BuffID.Stinky] = false;
}
}
if (npc.buffImmune[BuffID.Venom] == false)
{
npc.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = false;
}
npc.buffImmune[ModContent.BuffType<Enraged>()] = false;
}
#endregion
#region Boss Value Changes
private void BossValueChanges(NPC npc)
{
@@ -713,18 +718,18 @@ namespace CalamityMod.NPCs
case NPCID.TheDestroyer:
case NPCID.TheDestroyerBody:
case NPCID.TheDestroyerTail:
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.7) : (int)(npc.lifeMax * 1.8);
npc.lifeMax = (int)(npc.lifeMax * 1.8);
npc.scale = 1.5f;
npc.npcSlots = 10f;
break;
case NPCID.Probe:
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.9) : (int)(npc.lifeMax * 1.6);
npc.scale *= CalamityWorld.death ? 1.25f : 1.2f;
npc.lifeMax = (int)(npc.lifeMax * 1.6);
npc.scale *= 1.2f;
break;
case NPCID.SkeletronPrime:
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.1) : (int)(npc.lifeMax * 1.45);
npc.lifeMax = (int)(npc.lifeMax * 1.45);
npc.npcSlots = 12f;
break;
@@ -732,12 +737,12 @@ namespace CalamityMod.NPCs
case NPCID.PrimeCannon:
case NPCID.PrimeSaw:
case NPCID.PrimeLaser:
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.15) : (int)(npc.lifeMax * 1.05);
npc.lifeMax = (int)(npc.lifeMax * 1.05);
break;
case NPCID.Retinazer:
case NPCID.Spazmatism:
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.0) : (int)(npc.lifeMax * 1.8);
npc.lifeMax = (int)(npc.lifeMax * 1.8);
npc.npcSlots = 10f;
break;
}
@@ -755,20 +760,20 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.MoonLordCore)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.7) : (int)(npc.lifeMax * 2.2);
npc.lifeMax = (int)(npc.lifeMax * 2.2);
npc.npcSlots = 36f;
}
else if (npc.type == NPCID.MoonLordHand || npc.type == NPCID.MoonLordHead || npc.type == NPCID.MoonLordLeechBlob)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.2);
npc.lifeMax = (int)(npc.lifeMax * 1.2);
}
else if (npc.type >= NPCID.CultistDragonHead && npc.type <= NPCID.CultistDragonTail)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 10.0) : (int)(npc.lifeMax * 5.0);
npc.lifeMax = (int)(npc.lifeMax * 5.0);
}
else if (npc.type == NPCID.DukeFishron)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.525) : (int)(npc.lifeMax * 1.85);
npc.lifeMax = (int)(npc.lifeMax * 1.85);
npc.npcSlots = 20f;
}
else if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2)
@@ -777,21 +782,21 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.Golem)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 7.0) : (int)(npc.lifeMax * 4.0);
npc.lifeMax = (int)(npc.lifeMax * 4.0);
npc.npcSlots = 64f;
}
else if (npc.type == NPCID.GolemHead)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.0) : (int)(npc.lifeMax * 1.5);
npc.lifeMax = (int)(npc.lifeMax * 1.5);
}
else if (npc.type == NPCID.GolemHeadFree)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.5) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.dontTakeDamage = false;
}
else if (npc.type == NPCID.Plantera)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.4) : (int)(npc.lifeMax * 2.3);
npc.lifeMax = (int)(npc.lifeMax * 2.3);
npc.npcSlots = 32f;
}
else if (npc.type == NPCID.PlanterasHook)
@@ -800,7 +805,7 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.WallofFlesh || npc.type == NPCID.WallofFleshEye)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.6) : (int)(npc.lifeMax * 1.9);
npc.lifeMax = (int)(npc.lifeMax * 1.9);
if (npc.type == NPCID.WallofFlesh)
{
@@ -809,34 +814,34 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.TheHungryII || npc.type == NPCID.LeechHead || npc.type == NPCID.LeechBody || npc.type == NPCID.LeechTail)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.15) : (int)(npc.lifeMax * 1.05);
npc.lifeMax = (int)(npc.lifeMax * 1.05);
}
else if (npc.type == NPCID.SkeletronHead)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.npcSlots = 12f;
}
else if (npc.type == NPCID.SkeletronHand)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 0.9) : (int)(npc.lifeMax * 0.75);
npc.lifeMax = (int)(npc.lifeMax * 0.75);
}
else if (npc.type == NPCID.QueenBee)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.65) : (int)(npc.lifeMax * 1.15);
npc.lifeMax = (int)(npc.lifeMax * 1.15);
npc.npcSlots = 14f;
}
else if (npc.type == NPCID.BrainofCthulhu)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.1) : (int)(npc.lifeMax * 1.6);
npc.lifeMax = (int)(npc.lifeMax * 1.6);
npc.npcSlots = 12f;
}
else if (npc.type == NPCID.Creeper)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.2) : (int)(npc.lifeMax * 1.1);
npc.lifeMax = (int)(npc.lifeMax * 1.1);
}
else if (EaterofWorldsIDs.Contains(npc.type))
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.3);
npc.lifeMax = (int)(npc.lifeMax * 1.3);
if (npc.type == NPCID.EaterofWorldsHead)
{
@@ -845,16 +850,9 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.EyeofCthulhu)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.npcSlots = 10f;
}
else if (npc.type == NPCID.KingSlime)
{
if (CalamityWorld.death)
{
npc.lifeMax = (int)(npc.lifeMax * 1.85);
}
}
else if (npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental)
{
npc.knockBackResist = 0f;
@@ -864,38 +862,27 @@ namespace CalamityMod.NPCs
{
if (DestroyerIDs.Contains(npc.type))
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.6) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.scale = 1.5f;
npc.npcSlots = 10f;
}
else if (npc.type == NPCID.Probe)
{
if (CalamityWorld.death)
{
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.scale *= 1.2f;
}
}
else if (npc.type == NPCID.SkeletronPrime)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.35) : (int)(npc.lifeMax * 1.15);
npc.lifeMax = (int)(npc.lifeMax * 1.15);
npc.npcSlots = 12f;
}
else if (npc.type == NPCID.PrimeVice || npc.type == NPCID.PrimeCannon || npc.type == NPCID.PrimeSaw || npc.type == NPCID.PrimeLaser)
{
if (!CalamityWorld.death)
{
npc.lifeMax = (int)(npc.lifeMax * 0.9);
}
npc.lifeMax = (int)(npc.lifeMax * 0.9);
}
else if (npc.type == NPCID.Retinazer)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
npc.npcSlots = 10f;
}
else if (npc.type == NPCID.Spazmatism)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.45) : (int)(npc.lifeMax * 1.3);
npc.lifeMax = (int)(npc.lifeMax * 1.3);
npc.npcSlots = 10f;
}
}
@@ -929,7 +916,7 @@ namespace CalamityMod.NPCs
if (npc.type == NPCID.CultistBoss)
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * (CalamityWorld.revenge ? 1.7 : 1.2));
npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.revenge ? 1.7 : 1.2));
npc.npcSlots = 20f;
}
@@ -1073,42 +1060,42 @@ namespace CalamityMod.NPCs
npc.type == thorium.NPCType("BoreanHopper") || npc.type == thorium.NPCType("BoreanMyte1") || npc.type == thorium.NPCType("EnemyBeholder") ||
npc.type == thorium.NPCType("ThousandSoulPhalactry") || npc.type == thorium.NPCType("AbyssalSpawn"))
{
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5);
npc.lifeMax = (int)(npc.lifeMax * 1.5);
}
else if (npc.type == thorium.NPCType("TheGrandThunderBirdv2"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5);
npc.lifeMax = (int)(npc.lifeMax * 1.5);
}
else if (npc.type == thorium.NPCType("QueenJelly"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.9) : (int)(npc.lifeMax * 1.35);
npc.lifeMax = (int)(npc.lifeMax * 1.35);
}
else if (npc.type == thorium.NPCType("Viscount"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.65) : (int)(npc.lifeMax * 1.25);
npc.lifeMax = (int)(npc.lifeMax * 1.25);
}
else if (npc.type == thorium.NPCType("GraniteEnergyStorm"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.25) : (int)(npc.lifeMax * 1.1);
npc.lifeMax = (int)(npc.lifeMax * 1.1);
}
else if (npc.type == thorium.NPCType("TheBuriedWarrior") || npc.type == thorium.NPCType("TheBuriedWarrior1") || npc.type == thorium.NPCType("TheBuriedWarrior2"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.5) : (int)(npc.lifeMax * 1.2);
npc.lifeMax = (int)(npc.lifeMax * 1.2);
}
else if (npc.type == thorium.NPCType("ThePrimeScouter") || npc.type == thorium.NPCType("CryoCore") || npc.type == thorium.NPCType("BioCore") ||
npc.type == thorium.NPCType("PyroCore"))
@@ -1116,35 +1103,35 @@ namespace CalamityMod.NPCs
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.75) : (int)(npc.lifeMax * 1.3);
npc.lifeMax = (int)(npc.lifeMax * 1.3);
}
else if (npc.type == thorium.NPCType("BoreanStrider") || npc.type == thorium.NPCType("BoreanStriderPopped"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.0) : (int)(npc.lifeMax * 1.4);
npc.lifeMax = (int)(npc.lifeMax * 1.4);
}
else if (npc.type == thorium.NPCType("FallenDeathBeholder") || npc.type == thorium.NPCType("FallenDeathBeholder2"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * 1.6);
npc.lifeMax = (int)(npc.lifeMax * 1.6);
}
else if (npc.type == thorium.NPCType("Lich") || npc.type == thorium.NPCType("LichHeadless"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * 1.6);
npc.lifeMax = (int)(npc.lifeMax * 1.6);
}
else if (npc.type == thorium.NPCType("Abyssion") || npc.type == thorium.NPCType("AbyssionCracked") || npc.type == thorium.NPCType("AbyssionReleased"))
{
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5);
npc.lifeMax = (int)(npc.lifeMax * 1.5);
}
else if (npc.type == thorium.NPCType("SlagFury") || npc.type == thorium.NPCType("Omnicide") || npc.type == thorium.NPCType("RealityBreaker") ||
npc.type == thorium.NPCType("Aquaius") || npc.type == thorium.NPCType("Aquaius2"))
@@ -1152,7 +1139,7 @@ namespace CalamityMod.NPCs
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.75) : (int)(npc.lifeMax * 1.3);
npc.lifeMax = (int)(npc.lifeMax * 1.3);
}
}
}
@@ -2834,11 +2821,13 @@ namespace CalamityMod.NPCs
maxSpawns = (int)(maxSpawns * 1.5f);
}
if (CalamityWorld.death)
if (CalamityWorld.death && Main.bloodMoon)
{
spawnRate = (int)(spawnRate * 0.75);
spawnRate = (int)(spawnRate * 0.25);
maxSpawns = (int)(maxSpawns * 10f);
}
else if (CalamityWorld.revenge)
if (CalamityWorld.revenge)
{
spawnRate = (int)(spawnRate * 0.85);
}
@@ -4042,7 +4031,6 @@ namespace CalamityMod.NPCs
#region Any Boss NPCs
public static bool AnyBossNPCS()
{
for (int i = 0; i < 200; i++)
{
if (Main.npc[i].active && Main.npc[i].type != NPCID.MartianSaucerCore &&
+87 -22
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.Crabulon
npc.width = 280;
npc.height = 160;
npc.defense = 8;
npc.LifeMaxNERD(3000, 4000, 6930, 11000000, 10000000);
npc.LifeMaxNERB(3000, 4000, 11000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
@@ -201,7 +201,7 @@ namespace CalamityMod.NPCs.Crabulon
npc.velocity.X *= 0.98f;
npc.velocity.Y *= 0.98f;
npc.ai[1] += 1f;
if (npc.ai[1] >= 60f)
if (npc.ai[1] >= (revenge ? 30f : 60f))
{
npc.noGravity = true;
npc.noTileCollide = true;
@@ -314,25 +314,68 @@ namespace CalamityMod.NPCs.Crabulon
npc.ai[1] += 1f;
if (npc.ai[1] > 0f)
{
if (revenge)
{
switch ((int)npc.ai[3])
{
case 0:
break;
case 1:
npc.ai[1] += 1f;
break;
case 2:
npc.ai[1] += 3f;
break;
case 3:
npc.ai[1] += 6f;
break;
default:
break;
}
}
if (npc.life < npc.lifeMax / 2 || CalamityWorld.bossRushActive)
{
npc.ai[1] += 4f;
npc.ai[1] += (!revenge ? 4f : 1f);
}
if (npc.life < npc.lifeMax / 10 || CalamityWorld.bossRushActive)
if (npc.life < npc.lifeMax / 4 || CalamityWorld.bossRushActive)
{
npc.ai[1] += 8f;
npc.ai[1] += (!revenge ? 4f : 1f);
}
}
if (npc.ai[1] >= 300f)
{
npc.ai[1] = -20f;
npc.frameCounter = 0.0;
}
else if (npc.ai[1] == -1f)
{
npc.TargetClosest(true);
npc.velocity.X = (float)((CalamityWorld.bossRushActive ? 12 : 4) * npc.direction);
npc.velocity.Y = CalamityWorld.bossRushActive ? -16f : -12.1f;
int velocityX = CalamityWorld.bossRushActive ? 12 : 4;
float velocityY = CalamityWorld.bossRushActive ? -16f : -12f;
if (revenge)
{
switch ((int)npc.ai[3])
{
case 0: // Normal
break;
case 1: // High
velocityY -= 4f;
break;
case 2: // Low
velocityY += 4f;
break;
case 3: // Long and low
velocityX += 4;
velocityY += 4f;
break;
default:
break;
}
}
npc.velocity.X = (float)(velocityX * npc.direction);
npc.velocity.Y = velocityY;
npc.ai[0] = 4f;
npc.ai[1] = 0f;
}
@@ -343,30 +386,50 @@ namespace CalamityMod.NPCs.Crabulon
if (npc.velocity.Y == 0f)
{
Main.PlaySound(SoundID.Item14, npc.position);
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile((int)npc.Center.X, (int)npc.Center.Y + 20, 0f, 0f, ModContent.ProjectileType<Mushmash>(), 20, 0f, Main.myPlayer, 0f, 0f);
}
npc.ai[2] += 1f;
if (npc.ai[2] >= 3f)
int num354 = expertMode ? 11 : 14;
if (npc.ai[2] % 2f == 0f && (double)npc.life < (double)npc.lifeMax * 0.5 && revenge)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
float velocityX = npc.ai[2] == 0f ? -4f : 4f;
for (int x = 0; x < 20; x++)
{
Projectile.NewProjectile(npc.Center.X + (float)shotSpacing, npc.Center.Y - 1000f, velocityX, 0f, ModContent.ProjectileType<MushBombFall>(), num354, 0f, Main.myPlayer, 0f, 0f);
shotSpacing -= 100;
}
shotSpacing = 1000;
}
}
npc.ai[2] += 1f;
if (npc.ai[2] >= ((double)npc.life < (double)npc.lifeMax * 0.5 ? 4f : 3f))
{
if (Main.netMode != NetmodeID.MultiplayerClient && revenge)
if (Main.netMode != NetmodeID.MultiplayerClient && revenge && (double)npc.life >= (double)npc.lifeMax * 0.5)
{
for (int x = 0; x < 20; x++)
{
int num354 = expertMode ? 11 : 14;
Projectile.NewProjectile(npc.Center.X + (float)shotSpacing, npc.Center.Y - 1000f, 0f, 0f, ModContent.ProjectileType<MushBombFall>(), num354, 0f, Main.myPlayer, 0f, 0f);
shotSpacing -= 100;
}
shotSpacing = 1000;
}
npc.ai[0] = 1f;
npc.ai[2] = 0f;
if (revenge)
npc.ai[3] = 0f;
}
else
{
npc.ai[0] = 3f;
}
if (revenge)
npc.ai[3] += 1f;
}
for (int num622 = (int)npc.position.X - 20; num622 < (int)npc.position.X + npc.width + 40; num622 += 20)
{
for (int num623 = 0; num623 < 4; num623++)
@@ -386,20 +449,21 @@ namespace CalamityMod.NPCs.Crabulon
}
else
{
float velocityX = 0.11f +
(expertMode ? 0.02f : 0f) +
(revenge ? 0.02f : 0f);
if (npc.direction < 0)
{
npc.velocity.X = npc.velocity.X - 0.2f;
}
npc.velocity.X = npc.velocity.X - velocityX;
else if (npc.direction > 0)
{
npc.velocity.X = npc.velocity.X + 0.2f;
}
npc.velocity.X = npc.velocity.X + velocityX;
float num626 = CalamityWorld.bossRushActive ? 5f : 2.5f;
if (revenge)
{
num626 += 1f;
}
if (npc.Calamity().enraged > 0|| (Config.BossRushXerocCurse && CalamityWorld.bossRushActive))
if (npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive))
{
num626 += 3f;
}
@@ -426,6 +490,7 @@ namespace CalamityMod.NPCs.Crabulon
}
}
}
if (npc.localAI[0] == 0f && npc.life > 0)
{
npc.localAI[0] = (float)npc.lifeMax;
+241 -122
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.height = 80;
npc.defense = 12;
npc.Calamity().RevPlusDR(0.1f);
npc.LifeMaxNERD(17900, 26300, 39900, 3000000, 3200000);
npc.LifeMaxNERB(17900, 26300, 3000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
@@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.Cryogen
double multAdd = revenge ? 0.1 : 0D;
npc.TargetClosest(true);
if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != NetmodeID.MultiplayerClient && (npc.ai[0] < 4f || CalamityWorld.bossRushActive)) //spawn shield for phase 0 1 2 3, not 4 5
if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != NetmodeID.MultiplayerClient && (npc.ai[0] < 4f || CalamityWorld.bossRushActive)) //spawn shield for phase 0 1 2 3, not 4 5 6
{
int num6 = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType<CryogenIce>(), npc.whoAmI, 0f, 0f, 0f, 0f, 255);
npc.ai[2] = (float)(num6 + 1);
@@ -144,14 +144,10 @@ namespace CalamityMod.NPCs.Cryogen
}
}
if (npc.ai[0] == 0f || npc.ai[0] == 2f || npc.ai[0] == 4f)
if (npc.ai[0] != 5f)
{
npc.rotation = npc.velocity.X * 0.1f;
}
else if (npc.ai[0] == 1f || npc.ai[0] == 3f)
{
npc.rotation = 0f;
}
if (!Main.raining && !CalamityWorld.bossRushActive)
{
@@ -177,7 +173,7 @@ namespace CalamityMod.NPCs.Cryogen
npc.timeLeft = 2400;
}
if (Main.netMode != NetmodeID.MultiplayerClient && expertMode)
if (Main.netMode != NetmodeID.MultiplayerClient && expertMode && (npc.ai[0] < 5f || !revenge || (double)npc.life >= (double)npc.lifeMax * 0.15))
{
time++;
if (CalamityWorld.death || CalamityWorld.bossRushActive)
@@ -186,13 +182,15 @@ namespace CalamityMod.NPCs.Cryogen
if (time >= 600)
{
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float spread = 45f * 0.0174f;
int totalProjectiles = 4;
float spread = MathHelper.ToRadians(90);
double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2;
double deltaAngle = spread / 4f;
double deltaAngle = spread / (float)totalProjectiles;
double offsetAngle;
int i;
int num184 = 25;
float velocity = CalamityWorld.bossRushActive ? 12f : 8f;
float velocity = CalamityWorld.bossRushActive ? 12f : 4f;
for (i = 0; i < 2; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
@@ -237,14 +235,14 @@ namespace CalamityMod.NPCs.Cryogen
float num1243 = player.Center.X - vector142.X;
float num1244 = player.Center.Y - vector142.Y;
float num1245 = (float)Math.Sqrt((double)(num1243 * num1243 + num1244 * num1244));
float num1246 = isChill ? 4f : 6f;
float num1246 = isChill ? 4f : 8f;
if (CalamityWorld.death)
{
num1246 = isChill ? 5f : 7f;
num1246 = isChill ? 5f : 10f;
}
if (CalamityWorld.bossRushActive)
{
num1246 = 11f;
num1246 = 14f;
}
num1245 = num1246 / num1245;
num1243 *= num1245;
@@ -290,12 +288,15 @@ namespace CalamityMod.NPCs.Cryogen
}
}
float velocity = isChill ? 6f : 7.5f;
float acceleration = isChill ? 0.1f : 0.12f;
float velocity = isChill ? 7.5f : 4f;
float acceleration = isChill ? 0.1f : 0.15f;
if (CalamityWorld.death)
velocity = isChill ? 6.5f : 8f;
if (CalamityWorld.bossRushActive)
velocity = 20f;
velocity = isChill ? 7f : 3.5f;
if (CalamityWorld.bossRushActive)
{
velocity = 3f;
acceleration *= 1.5f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 375f)
{
@@ -325,8 +326,8 @@ namespace CalamityMod.NPCs.Cryogen
npc.velocity.X = npc.velocity.X - acceleration;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
if (npc.velocity.X > velocity)
npc.velocity.X = velocity;
}
if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 300f)
{
@@ -335,14 +336,14 @@ namespace CalamityMod.NPCs.Cryogen
npc.velocity.X = npc.velocity.X + acceleration;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -velocity)
npc.velocity.X = -velocity;
}
if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient)
{
iceShard += 1;
if (iceShard >= 24)
if (iceShard >= 20)
{
iceShard = 0;
int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20));
@@ -422,7 +423,7 @@ namespace CalamityMod.NPCs.Cryogen
num180 += (float)Main.rand.Next(-180, 181);
num182 += (float)Main.rand.Next(-180, 181);
num180 *= num183;
Projectile.NewProjectile(value9.X, value9.Y, num180, -15f, num185, num184, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(value9.X, value9.Y, num180, -8f, num185, num184, 0f, Main.myPlayer, 0f, 0f);
}
}
}
@@ -433,14 +434,14 @@ namespace CalamityMod.NPCs.Cryogen
float num1243 = player.Center.X - vector142.X;
float num1244 = player.Center.Y - vector142.Y;
float num1245 = (float)Math.Sqrt((double)(num1243 * num1243 + num1244 * num1244));
float num1246 = isChill ? 6f : 8f;
float num1246 = isChill ? 6f : 12f;
if (CalamityWorld.death)
{
num1246 = isChill ? 7f : 9f;
num1246 = isChill ? 7f : 14f;
}
if (CalamityWorld.bossRushActive)
{
num1246 = 15f;
num1246 = 20f;
}
num1245 = num1246 / num1245;
num1243 *= num1245;
@@ -498,12 +499,15 @@ namespace CalamityMod.NPCs.Cryogen
}
}
float velocity = isChill ? 6.5f : 8f;
float acceleration = isChill ? 0.1f : 0.12f;
float velocity = isChill ? 7.5f : 4f;
float acceleration = isChill ? 0.1f : 0.15f;
if (CalamityWorld.death)
velocity = isChill ? 7f : 8.5f;
velocity = isChill ? 7f : 3.5f;
if (CalamityWorld.bossRushActive)
velocity = 20f;
{
velocity = 3f;
acceleration *= 1.5f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 375f)
{
@@ -533,8 +537,8 @@ namespace CalamityMod.NPCs.Cryogen
npc.velocity.X = npc.velocity.X - acceleration;
if (npc.velocity.X > 8f)
npc.velocity.X = 8f;
if (npc.velocity.X > velocity)
npc.velocity.X = velocity;
}
if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 300f)
{
@@ -543,14 +547,14 @@ namespace CalamityMod.NPCs.Cryogen
npc.velocity.X = npc.velocity.X + acceleration;
if (npc.velocity.X < -8f)
npc.velocity.X = -8f;
if (npc.velocity.X < -velocity)
npc.velocity.X = -velocity;
}
if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient)
{
iceShard += 1;
if (iceShard >= 18)
if (iceShard >= 15)
{
iceShard = 0;
int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20));
@@ -736,8 +740,8 @@ namespace CalamityMod.NPCs.Cryogen
npc.localAI[2] = 0f;
teleportLocationX = 0;
iceShard = 0;
npc.netUpdate = true;
string key = "Mods.CalamityMod.CryogenBossText";
Color messageColor = Color.Cyan;
if (Main.netMode == NetmodeID.SinglePlayer)
@@ -750,13 +754,48 @@ namespace CalamityMod.NPCs.Cryogen
}
}
}
else
{
else if (npc.ai[0] == 5f)
{
npc.damage = (int)((float)npc.defDamage * 1.5f);
float num1372 = isChill ? 16f : 22f;
if (CalamityWorld.bossRushActive)
if (revenge && (double)npc.life < (double)npc.lifeMax * 0.15)
{
if (npc.ai[1] == 60f)
npc.velocity = Vector2.Normalize(player.Center - npc.Center) * (CalamityWorld.bossRushActive ? 30f : (isChill ? 18f : 24f));
npc.ai[1] -= 1f;
if (npc.ai[1] <= 0f)
{
npc.ai[3] += 1f;
if (npc.ai[3] > 2f)
{
npc.damage = 0;
npc.defense = npc.defDefense + 8;
npc.ai[0] = 6f;
npc.ai[1] = 0f;
npc.ai[3] = 0f;
time = 0;
}
else
npc.ai[1] = 60f;
npc.rotation = npc.velocity.X * 0.1f;
}
else if (npc.ai[1] <= 15f)
{
npc.velocity *= 0.95f;
npc.rotation = npc.velocity.X * 0.15f;
}
else
npc.rotation += (float)npc.direction * 0.5f;
return;
}
float num1372 = isChill ? 16f : 24f;
if (CalamityWorld.bossRushActive)
{
num1372 = 30f;
num1372 = 32f;
}
Vector2 vector167 = new Vector2(npc.Center.X + (float)(npc.direction * 20), npc.Center.Y + 6f);
float num1373 = player.position.X + (float)player.width * 0.5f - vector167.X;
@@ -767,7 +806,7 @@ namespace CalamityMod.NPCs.Cryogen
num1374 *= num1376;
iceShard--;
if ((double)npc.life < (double)npc.lifeMax * (0.05 + multAdd) || CalamityWorld.death || CalamityWorld.bossRushActive)
if ((double)npc.life < (double)npc.lifeMax * (0.1 + multAdd) || CalamityWorld.death || CalamityWorld.bossRushActive)
{
if (num1375 < 170f || iceShard > 0)
{
@@ -775,19 +814,11 @@ namespace CalamityMod.NPCs.Cryogen
{
iceShard = 17;
}
if (npc.velocity.X < 0f)
{
npc.direction = -1;
}
else
{
npc.direction = 1;
}
npc.rotation += (float)npc.direction * 0.5f;
return;
}
}
else if ((double)npc.life < (double)npc.lifeMax * (0.1 + multAdd))
else if ((double)npc.life < (double)npc.lifeMax * (0.125 + multAdd))
{
if (num1375 < 190f || iceShard > 0)
{
@@ -795,14 +826,6 @@ namespace CalamityMod.NPCs.Cryogen
{
iceShard = 19;
}
if (npc.velocity.X < 0f)
{
npc.direction = -1;
}
else
{
npc.direction = 1;
}
npc.rotation += (float)npc.direction * 0.35f;
return;
}
@@ -815,14 +838,6 @@ namespace CalamityMod.NPCs.Cryogen
{
iceShard = 20;
}
if (npc.velocity.X < 0f)
{
npc.direction = -1;
}
else
{
npc.direction = 1;
}
npc.rotation += (float)npc.direction * 0.3f;
return;
}
@@ -842,62 +857,166 @@ namespace CalamityMod.NPCs.Cryogen
}
npc.rotation = npc.velocity.X * 0.15f;
}
else
{
time++;
if (time >= 60)
{
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2;
double deltaAngle = spread / 4f;
double offsetAngle;
int i;
int num184 = 25;
float velocity2 = CalamityWorld.bossRushActive ? 16f : 6f;
for (i = 0; i < 2; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(value9.X, value9.Y, (float)(Math.Sin(offsetAngle) * velocity2), (float)(Math.Cos(offsetAngle) * velocity2), ModContent.ProjectileType<IceBomb>(), num184, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(value9.X, value9.Y, (float)(-Math.Sin(offsetAngle) * velocity2), (float)(-Math.Cos(offsetAngle) * velocity2), ModContent.ProjectileType<IceBomb>(), num184, 0f, Main.myPlayer, 0f, 0f);
}
time = 0;
}
if (npc.ai[3] == 0f && npc.life > 0)
{
npc.ai[3] = (float)npc.lifeMax;
}
if (npc.life > 0)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int num660 = (int)((double)npc.lifeMax * 0.075);
if ((float)(npc.life + num660) < npc.ai[3])
{
npc.ai[3] = (float)npc.life;
for (int num662 = 0; num662 < 2; num662++)
{
int x = (int)(npc.position.X + (float)Main.rand.Next(npc.width - 32));
int y = (int)(npc.position.Y + (float)Main.rand.Next(npc.height - 32));
int random = 1;
switch ((int)npc.ai[0])
if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient)
{
iceShard += 1;
if (iceShard >= 12)
{
iceShard = 0;
int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20));
int num1170 = (int)(npc.position.Y + (float)npc.height + 4f);
int damage = expertMode ? 23 : 26;
float projVelocity = revenge ? 6f : 5f;
if (CalamityWorld.bossRushActive)
projVelocity = 9f;
Projectile.NewProjectile((float)num1169, (float)num1170, 0f, projVelocity, ModContent.ProjectileType<IceRain>(), damage, 0f, Main.myPlayer, 0f, 0f);
}
}
npc.ai[1] += 1f;
if (npc.ai[1] >= 180f)
{
npc.ai[0] = 5f;
npc.ai[1] = 60f;
time = 0;
iceShard = 0;
npc.netUpdate = true;
}
float velocity = isChill ? 6f : 3f;
float acceleration = isChill ? 0.2f : 0.3f;
if (CalamityWorld.death)
velocity = isChill ? 5f : 2.5f;
if (CalamityWorld.bossRushActive)
{
velocity = 2f;
acceleration *= 1.5f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 375f)
{
if (npc.velocity.Y > 0f)
npc.velocity.Y = npc.velocity.Y * 0.98f;
npc.velocity.Y = npc.velocity.Y - acceleration;
if (npc.velocity.Y > velocity)
npc.velocity.Y = velocity;
}
else if (npc.position.Y < Main.player[npc.target].position.Y - 400f)
{
if (npc.velocity.Y < 0f)
npc.velocity.Y = npc.velocity.Y * 0.98f;
npc.velocity.Y = npc.velocity.Y + acceleration;
if (npc.velocity.Y < -velocity)
npc.velocity.Y = -velocity;
}
if (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) + 350f)
{
if (npc.velocity.X > 0f)
npc.velocity.X = npc.velocity.X * 0.98f;
npc.velocity.X = npc.velocity.X - acceleration;
if (npc.velocity.X > velocity)
npc.velocity.X = velocity;
}
if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 350f)
{
if (npc.velocity.X < 0f)
npc.velocity.X = npc.velocity.X * 0.98f;
npc.velocity.X = npc.velocity.X + acceleration;
if (npc.velocity.X < -velocity)
npc.velocity.X = -velocity;
}
}
if (!revenge || (double)npc.life >= (double)npc.lifeMax * 0.15)
{
if (npc.ai[3] == 0f && npc.life > 0)
{
npc.ai[3] = (float)npc.lifeMax;
}
if (npc.life > 0)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int num660 = (int)((double)npc.lifeMax * 0.075);
if ((float)(npc.life + num660) < npc.ai[3])
{
npc.ai[3] = (float)npc.life;
for (int num662 = 0; num662 < 2; num662++)
{
case 0:
case 1:
break;
case 2:
case 3:
random = 2;
break;
case 4:
case 5:
random = 3;
break;
default:
break;
int x = (int)(npc.position.X + (float)Main.rand.Next(npc.width - 32));
int y = (int)(npc.position.Y + (float)Main.rand.Next(npc.height - 32));
int random = 1;
switch ((int)npc.ai[0])
{
case 0:
case 1:
break;
case 2:
case 3:
random = 2;
break;
case 4:
case 5:
random = 3;
break;
default:
break;
}
int randomSpawn = Main.rand.Next(random);
if (randomSpawn == 0)
{
randomSpawn = ModContent.NPCType<Cryocore>();
}
else if (randomSpawn == 1)
{
randomSpawn = ModContent.NPCType<IceMass>();
}
else
{
randomSpawn = ModContent.NPCType<Cryocore2>();
}
int num664 = NPC.NewNPC(x, y, randomSpawn, 0, 0f, 0f, 0f, 0f, 255);
if (Main.netMode == NetmodeID.Server && num664 < 200)
{
NetMessage.SendData(23, -1, -1, null, num664, 0f, 0f, 0f, 0, 0, 0);
}
}
int randomSpawn = Main.rand.Next(random);
if (randomSpawn == 0)
{
randomSpawn = ModContent.NPCType<Cryocore>();
}
else if (randomSpawn == 1)
{
randomSpawn = ModContent.NPCType<IceMass>();
}
else
{
randomSpawn = ModContent.NPCType<Cryocore2>();
}
int num664 = NPC.NewNPC(x, y, randomSpawn, 0, 0f, 0f, 0f, 0f, 255);
if (Main.netMode == NetmodeID.Server && num664 < 200)
{
NetMessage.SendData(23, -1, -1, null, num664, 0f, 0f, 0f, 0, 0, 0);
}
}
}
}
}
}
}
}
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) //for alt textures
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.height = 36;
npc.defense = 6;
npc.Calamity().RevPlusDR(0.05f);
npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000);
npc.LifeMaxNERB(2300, 2650, 16500000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.npcSlots = 12f;
npc.width = 32;
npc.height = 80;
npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000);
npc.LifeMaxNERB(2300, 2650, 16500000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.DesertScourge
npc.height = 48;
npc.defense = 9;
npc.Calamity().RevPlusDR(0.1f);
npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000);
npc.LifeMaxNERB(2300, 2650, 16500000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = 6;
+1 -5
View File
@@ -29,11 +29,7 @@ namespace CalamityMod.NPCs.DevourerofGods
CalamityGlobalNPC global = npc.Calamity();
global.DR = CalamityWorld.death ? 0.95f : 0.925f;
global.unbreakableDR = true;
npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000;
if (CalamityWorld.death)
{
npc.lifeMax = 1300000;
}
npc.LifeMaxNERB(675000, 750000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = -1;
+2 -2
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.DevourerofGods
CalamityGlobalNPC global = npc.Calamity();
global.DR = CalamityWorld.death ? 0.97f : 0.955f;
global.unbreakableDR = true;
npc.LifeMaxNERD(1150000, 1350000, 2100000, 9200000, 10000000);
npc.LifeMaxNERB(1150000, 1350000, 9200000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
@@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
else
{
npc.dontTakeDamage = false;
npc.dontTakeDamage = Main.npc[(int)npc.ai[2]].dontTakeDamage;
}
if (npc.ai[3] > 0f)
{
+3 -7
View File
@@ -35,12 +35,8 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.width = 104;
npc.height = 104;
npc.defense = 50;
npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000;
if (CalamityWorld.death)
{
npc.lifeMax = 1300000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(675000, 750000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.takenDamageMultiplier = 1.25f;
npc.aiStyle = -1;
@@ -782,7 +778,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
// TODO: don't talk if the player has iframes
if (player.immuneTime > 0)
if (player.immuneTime > 0 || player.immune)
return;
int num = Main.rand.Next(5);
+187 -59
View File
@@ -40,6 +40,7 @@ namespace CalamityMod.NPCs.DevourerofGods
private int idleCounter = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 540 : 360;
public int laserWallPhase = 0;
private int laserWallCounter = 0;
private int postTeleportTimer = 0;
public override void SetStaticDefaults()
{
@@ -53,7 +54,7 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.width = 186;
npc.height = 186;
npc.defense = 50;
npc.LifeMaxNERD(1150000, 1350000, 2100000, 9200000, 10000000);
npc.LifeMaxNERB(1150000, 1350000, 9200000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.takenDamageMultiplier = 1.25f;
@@ -82,6 +83,7 @@ namespace CalamityMod.NPCs.DevourerofGods
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(npc.dontTakeDamage);
writer.Write(halfLife);
writer.Write(laserShoot);
writer.Write(phaseSwitch);
@@ -92,10 +94,12 @@ namespace CalamityMod.NPCs.DevourerofGods
writer.Write(idleCounter);
writer.Write(laserWallPhase);
writer.Write(laserWallCounter);
writer.Write(postTeleportTimer);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
npc.dontTakeDamage = reader.ReadBoolean();
halfLife = reader.ReadBoolean();
laserShoot = reader.ReadInt32();
phaseSwitch = reader.ReadInt32();
@@ -106,6 +110,7 @@ namespace CalamityMod.NPCs.DevourerofGods
idleCounter = reader.ReadInt32();
laserWallPhase = reader.ReadInt32();
laserWallCounter = reader.ReadInt32();
postTeleportTimer = reader.ReadInt32();
}
public override void BossHeadRotation(ref float rotation)
@@ -127,14 +132,36 @@ namespace CalamityMod.NPCs.DevourerofGods
Vector2 vector = npc.Center;
bool flies = npc.ai[2] == 0f;
bool expertMode = Main.expertMode || CalamityWorld.bossRushActive;
bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive;
bool death = CalamityWorld.death || CalamityWorld.bossRushActive;
bool speedBoost = lifeRatio < 0.6 || (CalamityWorld.bossRushActive && lifeRatio < 0.9);
bool speedBoost2 = lifeRatio < 0.2;
bool breathFireMore = lifeRatio < 0.15;
// Laser walls
if (speedBoost && !speedBoost2)
// Light
Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f);
// Worm shit again
if (npc.ai[3] > 0f)
npc.realLife = (int)npc.ai[3];
// Target
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead)
npc.TargetClosest(true);
// Velocity
npc.velocity.Length();
float distanceFromTarget = Vector2.Distance(Main.player[npc.target].Center, vector);
bool tooFarAway = distanceFromTarget > 5600f;
// Immunity after teleport
npc.dontTakeDamage = postTeleportTimer > 0;
// Laser walls
if (speedBoost && !speedBoost2 && postTeleportTimer <= 0)
{
if (laserWallPhase == 0) //start laser wall phase
if (laserWallPhase == 0) // Start laser wall phase
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
@@ -146,7 +173,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
}
}
else if (laserWallPhase == 1) //turn invisible and fire laser walls
else if (laserWallPhase == 1) // Turn invisible and fire laser walls
{
npc.alpha += 5;
if (npc.alpha == 255)
@@ -159,32 +186,48 @@ namespace CalamityMod.NPCs.DevourerofGods
if (idleCounter <= 0)
{
laserWallPhase = 2;
idleCounter = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 540 : 360;
idleCounter = death ? 540 : 360;
}
}
}
else if (laserWallPhase == 2) //turn visible
else if (laserWallPhase == 2) // Turn visible
{
npc.alpha -= 1;
if (npc.alpha <= 0)
{
npc.alpha = 0;
laserWallPhase = 0;
}
if (distanceFromTarget > 500f && revenge)
Teleport();
else
{
npc.alpha -= 1;
if (npc.alpha <= 0)
{
npc.alpha = 0;
laserWallPhase = 0;
}
}
}
}
else
{
npc.alpha -= 6;
if (npc.alpha < 0)
npc.alpha = 0;
if (postTeleportTimer > 0)
{
postTeleportTimer -= 4;
if (postTeleportTimer < 0)
postTeleportTimer = 0;
npc.alpha = postTeleportTimer;
}
else
{
npc.alpha -= 6;
if (npc.alpha < 0)
npc.alpha = 0;
}
if (laserWallPhase > 0)
laserWallPhase = 0;
}
// Anger message
if (speedBoost2)
// Anger message
if (speedBoost2)
{
if (!halfLife)
{
@@ -199,20 +242,6 @@ namespace CalamityMod.NPCs.DevourerofGods
}
}
// Light
Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f);
// Worm shit again
if (npc.ai[3] > 0f)
npc.realLife = (int)npc.ai[3];
// Target
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead)
npc.TargetClosest(true);
// Velocity
npc.velocity.Length();
// Spawn segments and fire projectiles
if (Main.netMode != NetmodeID.MultiplayerClient)
{
@@ -241,7 +270,7 @@ namespace CalamityMod.NPCs.DevourerofGods
int projectileDamage = expertMode ? 69 : 80;
// Fireballs
if (npc.alpha <= 0 && Vector2.Distance(Main.player[npc.target].Center, vector) > 500f && expertMode)
if (npc.alpha <= 0 && distanceFromTarget > 500f && expertMode)
{
calamityGlobalNPC.newAI[0] += 1f;
if (calamityGlobalNPC.newAI[0] >= 150f && calamityGlobalNPC.newAI[0] % (breathFireMore ? 60f : 120f) == 0f)
@@ -267,7 +296,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
}
}
else if (Vector2.Distance(Main.player[npc.target].Center, vector) < 250f)
else if (distanceFromTarget < 250f)
calamityGlobalNPC.newAI[0] = 0f;
// Laser walls
@@ -292,7 +321,7 @@ namespace CalamityMod.NPCs.DevourerofGods
shotSpacing[0] -= spacingVar;
}
if (Main.rand.NextBool(2) && (CalamityWorld.revenge || CalamityWorld.bossRushActive))
if (Main.rand.NextBool(2) && revenge)
{
for (int x = 0; x < 10; x++)
{
@@ -313,7 +342,7 @@ namespace CalamityMod.NPCs.DevourerofGods
shotSpacing[1] = 1050;
// Upper wall
if (lifeRatio < 0.4f && (CalamityWorld.revenge || CalamityWorld.bossRushActive))
if (lifeRatio < 0.4f && revenge)
{
if (shotSpacing[2] < 2100)
shotSpacing[2] = 2100;
@@ -361,7 +390,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
}
}
fallSpeed += ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 5f : 3.5f) * (1f - lifeRatio);
fallSpeed += (death ? 5f : 3.5f) * (1f - lifeRatio);
// Movement
int num180 = (int)(npc.position.X / 16f) - 1;
@@ -397,20 +426,25 @@ namespace CalamityMod.NPCs.DevourerofGods
phaseSwitch += 1;
int phaseLimit = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 600 : 900) / (1 + (int)(5f * (1f - lifeRatio)));
int phaseLimit = (death ? 600 : 900) / (1 + (int)(5f * (1f - lifeRatio)));
npc.localAI[1] = 0f;
float speed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 18f : 15f) + (3f * (1f - lifeRatio));
float turnSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.33f : 0.3f) + (0.06f * (1f - lifeRatio));
float homingSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 28f : 24f) + (12f * (1f - lifeRatio));
float homingTurnSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.36f : 0.33f) + (0.15f * (1f - lifeRatio));
float speed = (death ? 18f : 15f) + (3f * (1f - lifeRatio));
float turnSpeed = (death ? 0.33f : 0.3f) + (0.06f * (1f - lifeRatio));
float homingSpeed = (death ? 28f : 24f) + (12f * (1f - lifeRatio));
float homingTurnSpeed = (death ? 0.36f : 0.33f) + (0.15f * (1f - lifeRatio));
// Go to ground phase sooner
if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5600f)
phaseSwitch += 10;
// Go to ground phase sooner
if (tooFarAway)
{
if (revenge && laserWallPhase == 0)
Teleport();
else
phaseSwitch += 10;
}
float num188 = speed;
float num188 = speed;
float num189 = turnSpeed;
Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2);
@@ -420,7 +454,7 @@ namespace CalamityMod.NPCs.DevourerofGods
int num44 = (int)(Main.player[npc.target].Center.Y / 16f);
// Charge at target for 1.5 seconds
bool flyAtTarget = (!speedBoost || speedBoost2) && phaseSwitch > phaseLimit - 90 && (CalamityWorld.revenge || CalamityWorld.bossRushActive);
bool flyAtTarget = (!speedBoost || speedBoost2) && phaseSwitch > phaseLimit - 90 && revenge;
for (int num45 = num43 - 2; num45 <= num43 + 2; num45++)
{
@@ -618,14 +652,19 @@ namespace CalamityMod.NPCs.DevourerofGods
phaseSwitch += 1;
float turnSpeed = 0.18f + (((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.14f : 0.12f) * (1f - lifeRatio));
bool increaseSpeed = Vector2.Distance(Main.player[npc.target].Center, vector) > 3200f;
float turnSpeed = 0.18f + ((death ? 0.14f : 0.12f) * (1f - lifeRatio));
bool increaseSpeed = distanceFromTarget > 3200f;
// Enrage
if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5600f)
turnSpeed *= 6f;
else if (increaseSpeed)
turnSpeed *= 3f;
// Enrage
if (tooFarAway)
{
if (revenge && laserWallPhase == 0)
Teleport();
else
turnSpeed *= 6f;
}
else if (increaseSpeed)
turnSpeed *= 3f;
if (!flies)
{
@@ -725,8 +764,8 @@ namespace CalamityMod.NPCs.DevourerofGods
}
else
{
double maximumSpeed1 = (increaseSpeed ? 1.2 : 0.4) + (double)(((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.14f : 0.12f) * (1f - lifeRatio));
double maximumSpeed2 = (increaseSpeed ? 3.0 : 1.0) + (double)(((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.3f : 0.25f) * (1f - lifeRatio));
double maximumSpeed1 = (increaseSpeed ? 1.2 : 0.4) + (double)((death ? 0.14f : 0.12f) * (1f - lifeRatio));
double maximumSpeed2 = (increaseSpeed ? 3.0 : 1.0) + (double)((death ? 0.3f : 0.25f) * (1f - lifeRatio));
num193 = (float)Math.Sqrt((double)(num191 * num191 + num192 * num192));
float num25 = Math.Abs(num191);
@@ -828,7 +867,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (((npc.velocity.X > 0f && npc.oldVelocity.X < 0f) || (npc.velocity.X < 0f && npc.oldVelocity.X > 0f) || (npc.velocity.Y > 0f && npc.oldVelocity.Y < 0f) || (npc.velocity.Y < 0f && npc.oldVelocity.Y > 0f)) && !npc.justHit)
npc.netUpdate = true;
if (phaseSwitch > ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 600 : 900))
if (phaseSwitch > (death ? 600 : 900))
{
npc.ai[2] = 0f;
phaseSwitch = 0;
@@ -837,6 +876,95 @@ namespace CalamityMod.NPCs.DevourerofGods
}
}
private void Teleport()
{
postTeleportTimer = 255;
npc.alpha = postTeleportTimer;
int playerWidth = Main.player[npc.target].width / 2;
int playerHeight = Main.player[npc.target].height / 2;
float playerVelocityX = Main.player[npc.target].velocity.X;
float playerVelocityY = Main.player[npc.target].velocity.Y;
int x = (int)Main.player[npc.target].position.X + playerWidth - 25;
int y = (int)Main.player[npc.target].position.Y + playerHeight - 25;
float velocityThreshold = 0.05f;
int vectorAdjustment = 500;
if (playerVelocityX >= velocityThreshold)
{
x += vectorAdjustment;
yAdjustment();
}
else if (playerVelocityX <= -velocityThreshold)
{
x -= vectorAdjustment;
yAdjustment();
}
void yAdjustment()
{
if (playerVelocityY >= velocityThreshold)
y += vectorAdjustment;
else if (playerVelocityY <= -velocityThreshold)
y -= vectorAdjustment;
}
int x2 = x + 50;
int y2 = y + 50;
float locationX = (float)Main.rand.Next(x, x2);
float locationY = (float)Main.rand.Next(y, y2);
Vector2 teleportLocation = new Vector2(locationX, locationY);
npc.position = teleportLocation;
npc.netUpdate = true;
for (int i = 0; i < 200; i++)
{
if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType<DevourerofGodsBodyS>() || Main.npc[i].type == ModContent.NPCType<DevourerofGodsTailS>()))
{
Main.npc[i].position = teleportLocation;
Main.npc[i].netUpdate = true;
}
}
Vector2 npcCenter = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2));
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LargeMechGaussRifle"), (int)npcCenter.X, (int)npcCenter.Y);
int dustAmt = 50;
int random = 5;
for (int j = 0; j < 10; j++)
{
random += j * 2;
int dustAmtSpawned = 0;
int scale = random * 13;
float dustPositionX = npcCenter.X - (float)(scale / 2);
float dustPositionY = npcCenter.Y - (float)(scale / 2);
while (dustAmtSpawned < dustAmt)
{
float dustVelocityX = (float)Main.rand.Next(-random, random);
float dustVelocityY = (float)Main.rand.Next(-random, random);
float dustVelocityScalar = (float)random * 2f;
float dustVelocity = (float)Math.Sqrt((double)(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY));
dustVelocity = dustVelocityScalar / dustVelocity;
dustVelocityX *= dustVelocity;
dustVelocityY *= dustVelocity;
int dust = Dust.NewDust(new Vector2(dustPositionX, dustPositionY), scale, scale, 173, 0f, 0f, 100, default, 5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].position.X = teleportLocation.X;
Main.dust[dust].position.Y = teleportLocation.Y;
Main.dust[dust].position.X += (float)Main.rand.Next(-10, 11);
Main.dust[dust].position.Y += (float)Main.rand.Next(-10, 11);
Main.dust[dust].velocity.X = dustVelocityX;
Main.dust[dust].velocity.Y = dustVelocityY;
dustAmtSpawned++;
}
}
}
public override void BossLoot(ref string name, ref int potionType)
{
potionType = ModContent.ItemType<CosmiliteBrick>();
@@ -928,7 +1056,7 @@ namespace CalamityMod.NPCs.DevourerofGods
if (dist4 < minDist)
minDist = dist4;
return minDist <= 80f && npc.alpha == 0;
return minDist <= 80f && npc.alpha <= 0;
}
// Projectiles can only hit within certain distance
@@ -1048,7 +1176,7 @@ namespace CalamityMod.NPCs.DevourerofGods
}
// TODO: don't talk if the player has iframes
if (player.immune)
if (player.immune || player.immuneTime > 0)
return;
int num = Main.rand.Next(5);
+3 -7
View File
@@ -24,12 +24,8 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.width = 66;
npc.height = 66;
npc.defense = 50;
npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000;
if (CalamityWorld.death)
{
npc.lifeMax = 1300000;
}
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.LifeMaxNERB(675000, 750000);
double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)((double)npc.lifeMax * HPBoost);
npc.aiStyle = -1;
aiType = -1;
@@ -224,7 +220,7 @@ namespace CalamityMod.NPCs.DevourerofGods
player.AddBuff(BuffID.Darkness, 180, true);
// TODO: don't talk if the player has iframes
if (player.immuneTime > 0)
if (player.immuneTime > 0 || player.immune)
return;
int num = Main.rand.Next(2);
Loaded 100 of 200 files, more files were not shown because too many files have changed in this diff. Show more