1 - Nerfed Yanmei's Knife.
2 - Changed Slime God lore effect. 3 - Buffed Community base stats. 4 - Added projectile damage function calls in all boss files. 5 - Polterghast charge attack syncs. 6 - Provi AI refactor. 7 - Changed Ravager fight. 8 - Changed Signus fight. 9 - Death Mode Skeletron respawns all 4 hands when at 33% HP.
This commit is contained in:
1 parent
2407098f85
commit
b2dbe4990a
83 files changed
+1857
-1985
No files matched your search
@@ -5,12 +5,12 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class KamiBuff : ModBuff
|
||||
{
|
||||
public const float RunSpeedBoost = 0.2f;
|
||||
public const float RunAccelerationBoost = 0.4f;
|
||||
public const float RunSpeedBoost = 0.15f;
|
||||
public const float RunAccelerationBoost = 0.15f;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Kami Injection");
|
||||
Description.SetDefault("Increased defense, movement speed, and damage");
|
||||
Description.SetDefault("Increased movement speed and damage");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
|
||||
+38
-44
@@ -373,7 +373,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool queenBeeLore = false;
|
||||
public bool skeletronLore = false;
|
||||
// This lore boolean is a bit different from the others. It just stops Slime God lore effects from stacking.
|
||||
public bool slimeGodLoreProcessed = false;
|
||||
public bool slimeGodLore = false;
|
||||
public bool wallOfFleshLore = false;
|
||||
public bool twinsLore = false;
|
||||
public bool destroyerLore = false;
|
||||
@@ -1319,22 +1319,22 @@ namespace CalamityMod.CalPlayer
|
||||
player.statLifeMax2 += player.statLifeMax / 5 / 20 * 25;
|
||||
if (community)
|
||||
{
|
||||
float floatTypeBoost = 0.01f +
|
||||
float floatTypeBoost = 0.05f +
|
||||
(NPC.downedSlimeKing ? 0.01f : 0f) +
|
||||
(NPC.downedBoss1 ? 0.01f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) + //0.05
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) +
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) +
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) + // 0.1
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedMechBossAny ? 0.01f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) + //0.1
|
||||
(NPC.downedFishron ? 0.01f : 0f) +
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) +
|
||||
(NPC.downedFishron ? 0.01f : 0f) + // 0.15
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedMoonlord ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15
|
||||
(CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17
|
||||
(CalamityWorld.downedYharon ? 0.03f : 0f); //0.2
|
||||
(CalamityWorld.downedProvidence ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedDoG ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedYharon ? 0.01f : 0f); // 0.2
|
||||
int integerTypeBoost = (int)(floatTypeBoost * 50f);
|
||||
player.statLifeMax2 += player.statLifeMax / 5 / 20 * integerTypeBoost;
|
||||
}
|
||||
@@ -1494,7 +1494,7 @@ namespace CalamityMod.CalPlayer
|
||||
perforatorLore = false;
|
||||
queenBeeLore = false;
|
||||
skeletronLore = false;
|
||||
slimeGodLoreProcessed = false;
|
||||
slimeGodLore = false;
|
||||
wallOfFleshLore = false;
|
||||
twinsLore = false;
|
||||
destroyerLore = false;
|
||||
@@ -3582,23 +3582,23 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (community)
|
||||
{
|
||||
float floatTypeBoost = 0.01f +
|
||||
(NPC.downedSlimeKing ? 0.01f : 0f) +
|
||||
(NPC.downedBoss1 ? 0.01f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) + //0.05
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) +
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedMechBossAny ? 0.01f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) + //0.1
|
||||
(NPC.downedFishron ? 0.01f : 0f) +
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedMoonlord ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15
|
||||
(CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17
|
||||
(CalamityWorld.downedYharon ? 0.03f : 0f); //0.2
|
||||
meleeSpeedMult += floatTypeBoost * 0.25f;
|
||||
float floatTypeBoost = 0.05f +
|
||||
(NPC.downedSlimeKing ? 0.01f : 0f) +
|
||||
(NPC.downedBoss1 ? 0.01f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) +
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) + // 0.1
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedMechBossAny ? 0.01f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) +
|
||||
(NPC.downedFishron ? 0.01f : 0f) + // 0.15
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedMoonlord ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedProvidence ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedDoG ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedYharon ? 0.01f : 0f); // 0.2
|
||||
meleeSpeedMult += floatTypeBoost * 0.25f;
|
||||
}
|
||||
if (eArtifact)
|
||||
{
|
||||
@@ -3867,6 +3867,7 @@ namespace CalamityMod.CalPlayer
|
||||
(auricSet ? 0.1f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
|
||||
(slimeGodLore ? 0.1f : 0f) +
|
||||
(cTracers ? 0.1f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(eTracers ? 0.05f : 0f) +
|
||||
@@ -3887,7 +3888,8 @@ namespace CalamityMod.CalPlayer
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(eTracers ? 0.05f : 0f) +
|
||||
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
|
||||
(etherealExtorter && player.ZoneBeach ? 0.05f : 0f) +
|
||||
(slimeGodLore ? 0.1f : 0f) +
|
||||
(etherealExtorter && player.ZoneBeach ? 0.05f : 0f) +
|
||||
(stressPills ? 0.05f : 0f) +
|
||||
(laudanum && horror ? 0.1f : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
@@ -3952,6 +3954,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
player.runAcceleration *= runAccMult;
|
||||
player.maxRunSpeed *= runSpeedMult;
|
||||
|
||||
if (slimeGodLore)
|
||||
{
|
||||
if (!player.iceSkate)
|
||||
player.runSlowdown *= 0.1f;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DashEffects
|
||||
@@ -6350,25 +6358,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
double damageMultiplier = 1D;
|
||||
if (CalamityLists.revengeanceProjectileBuffList25Percent.Contains(proj.type))
|
||||
{
|
||||
damageMultiplier += 0.25;
|
||||
}
|
||||
else if (CalamityLists.revengeanceProjectileBuffList20Percent.Contains(proj.type))
|
||||
{
|
||||
damageMultiplier += 0.2;
|
||||
}
|
||||
else if (CalamityLists.revengeanceProjectileBuffList15Percent.Contains(proj.type))
|
||||
{
|
||||
damageMultiplier += 0.15;
|
||||
}
|
||||
else if (CalamityLists.revengeanceProjectileBuffList10Percent.Contains(proj.type))
|
||||
{
|
||||
damageMultiplier += 0.1;
|
||||
}
|
||||
else if (CalamityLists.revengeanceProjectileBuffList5Percent.Contains(proj.type))
|
||||
{
|
||||
damageMultiplier += 0.05;
|
||||
}
|
||||
|
||||
if (CalamityWorld.death)
|
||||
damageMultiplier += (damageMultiplier - 1D) * 0.6;
|
||||
|
||||
@@ -643,22 +643,22 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.community)
|
||||
{
|
||||
float floatTypeBoost = 0.01f +
|
||||
float floatTypeBoost = 0.05f +
|
||||
(NPC.downedSlimeKing ? 0.01f : 0f) +
|
||||
(NPC.downedBoss1 ? 0.01f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) + //0.05
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) +
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) + // 0.1
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedMechBossAny ? 0.01f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) + //0.1
|
||||
(NPC.downedFishron ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) +
|
||||
(NPC.downedFishron ? 0.01f : 0f) + // 0.15
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedMoonlord ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15
|
||||
(CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17
|
||||
(CalamityWorld.downedYharon ? 0.03f : 0f); //0.2
|
||||
(CalamityWorld.downedProvidence ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedDoG ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedYharon ? 0.01f : 0f); // 0.2
|
||||
int integerTypeBoost = (int)(floatTypeBoost * 50f);
|
||||
int regenBoost = 1 + (integerTypeBoost / 5);
|
||||
bool lesserEffect = false;
|
||||
|
||||
@@ -1173,7 +1173,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.raiderTalisman)
|
||||
{
|
||||
float damageMult = modPlayer.nanotech ? 0.1f : 0.15f;
|
||||
modPlayer.throwingDamage += (float)modPlayer.raiderStack / 150f * damageMult;
|
||||
modPlayer.throwingDamage += modPlayer.raiderStack / 150f * damageMult;
|
||||
}
|
||||
|
||||
// Silva minion bonus
|
||||
@@ -1195,10 +1195,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (modPlayer.kamiBoost)
|
||||
{
|
||||
player.allDamage += 0.3f;
|
||||
player.statDefense += 20;
|
||||
}
|
||||
player.allDamage += 0.15f;
|
||||
|
||||
if (modPlayer.roverDriveTimer < 616)
|
||||
{
|
||||
@@ -1530,6 +1527,13 @@ namespace CalamityMod.CalPlayer
|
||||
player.allDamage += 0.1f;
|
||||
modPlayer.AllCritBoost(5);
|
||||
}
|
||||
if (modPlayer.slimeGodLore)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.AddBuff(BuffID.Slimed, 2);
|
||||
|
||||
player.statDefense -= 10;
|
||||
}
|
||||
if (modPlayer.destroyerLore)
|
||||
{
|
||||
player.pickSpeed -= 0.05f;
|
||||
@@ -3037,22 +3041,22 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.community)
|
||||
{
|
||||
float floatTypeBoost = 0.01f +
|
||||
float floatTypeBoost = 0.05f +
|
||||
(NPC.downedSlimeKing ? 0.01f : 0f) +
|
||||
(NPC.downedBoss1 ? 0.01f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) + //0.05
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.01f : 0f) +
|
||||
(NPC.downedBoss3 ? 0.01f : 0f) + // 0.1
|
||||
(Main.hardMode ? 0.01f : 0f) +
|
||||
(NPC.downedMechBossAny ? 0.01f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) + //0.1
|
||||
(NPC.downedFishron ? 0.01f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.01f : 0f) +
|
||||
(NPC.downedFishron ? 0.01f : 0f) + // 0.15
|
||||
(NPC.downedAncientCultist ? 0.01f : 0f) +
|
||||
(NPC.downedMoonlord ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15
|
||||
(CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17
|
||||
(CalamityWorld.downedYharon ? 0.03f : 0f); //0.2
|
||||
(CalamityWorld.downedProvidence ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedDoG ? 0.01f : 0f) +
|
||||
(CalamityWorld.downedYharon ? 0.01f : 0f); // 0.2
|
||||
int integerTypeBoost = (int)(floatTypeBoost * 50f);
|
||||
int critBoost = integerTypeBoost / 2;
|
||||
float damageBoost = floatTypeBoost * 0.5f;
|
||||
@@ -3062,8 +3066,9 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.AllCritBoost(critBoost);
|
||||
player.minionKB += floatTypeBoost;
|
||||
player.moveSpeed += floatTypeBoost;
|
||||
double wingTimeBoost = 1 + floatTypeBoost;
|
||||
if (player.wingTimeMax > 0)
|
||||
player.wingTimeMax = (int)(player.wingTimeMax * 1.15);
|
||||
player.wingTimeMax = (int)(player.wingTimeMax * wingTimeBoost);
|
||||
}
|
||||
|
||||
if (modPlayer.ravagerLore)
|
||||
|
||||
+2
-98
@@ -111,8 +111,6 @@ namespace CalamityMod
|
||||
public static List<int> revengeanceProjectileBuffList25Percent;
|
||||
public static List<int> revengeanceProjectileBuffList20Percent;
|
||||
public static List<int> revengeanceProjectileBuffList15Percent;
|
||||
public static List<int> revengeanceProjectileBuffList10Percent;
|
||||
public static List<int> revengeanceProjectileBuffList5Percent;
|
||||
public static List<int> revengeanceLifeStealExceptionList;
|
||||
public static List<int> movementImpairImmuneList;
|
||||
public static List<int> needsDebuffIconDisplayList;
|
||||
@@ -1341,12 +1339,7 @@ namespace CalamityMod
|
||||
ProjectileID.EbonsandBallFalling,
|
||||
ProjectileID.PearlSandBallFalling,
|
||||
ProjectileID.CrimsandBallFalling,
|
||||
ProjectileID.GeyserTrap,
|
||||
ModContent.ProjectileType<SandBlast>(),
|
||||
ModContent.ProjectileType<MushBomb>(),
|
||||
ModContent.ProjectileType<MushBombFall>(),
|
||||
ModContent.ProjectileType<BloodGeyser>(),
|
||||
ModContent.ProjectileType<IchorShot>()
|
||||
ProjectileID.GeyserTrap
|
||||
};
|
||||
|
||||
revengeanceProjectileBuffList20Percent = new List<int>()
|
||||
@@ -1355,17 +1348,7 @@ namespace CalamityMod
|
||||
ProjectileID.DemonSickle,
|
||||
ProjectileID.SandnadoHostile,
|
||||
ProjectileID.DD2BetsyFireball,
|
||||
ProjectileID.DD2BetsyFlameBreath,
|
||||
ModContent.ProjectileType<Mushmash>(),
|
||||
ModContent.ProjectileType<ShaderainHostile>(),
|
||||
ModContent.ProjectileType<AbyssMine>(),
|
||||
ModContent.ProjectileType<AbyssMine2>(),
|
||||
ModContent.ProjectileType<AbyssBallVolley>(),
|
||||
ModContent.ProjectileType<AbyssBallVolley2>(),
|
||||
ModContent.ProjectileType<IceBlast>(),
|
||||
ModContent.ProjectileType<IceBomb>(),
|
||||
ModContent.ProjectileType<IceRain>(),
|
||||
ModContent.ProjectileType<SandTooth>()
|
||||
ProjectileID.DD2BetsyFlameBreath
|
||||
};
|
||||
|
||||
revengeanceProjectileBuffList15Percent = new List<int>()
|
||||
@@ -1374,7 +1357,6 @@ namespace CalamityMod
|
||||
ProjectileID.SpearTrap,
|
||||
ProjectileID.FlamethrowerTrap,
|
||||
ProjectileID.FlamesTrap,
|
||||
ProjectileID.Fireball,
|
||||
ProjectileID.PaladinsHammerHostile,
|
||||
ProjectileID.FlamingWood,
|
||||
ProjectileID.FlamingScythe,
|
||||
@@ -1390,87 +1372,11 @@ namespace CalamityMod
|
||||
ProjectileID.VortexVortexLightning,
|
||||
ProjectileID.VortexLightning,
|
||||
ProjectileID.VortexAcid,
|
||||
ProjectileID.Sharknado,
|
||||
ProjectileID.Cthulunado,
|
||||
ModContent.ProjectileType<SandPoisonCloud>(),
|
||||
ModContent.ProjectileType<BrimstoneHellfireball>(),
|
||||
ModContent.ProjectileType<HellfireExplosion>(),
|
||||
ModContent.ProjectileType<BrimstoneRay>(),
|
||||
ModContent.ProjectileType<BrimstoneLaser>(),
|
||||
ModContent.ProjectileType<BrimstoneLaserSplit>(),
|
||||
ModContent.ProjectileType<BrimstoneBall>(),
|
||||
ModContent.ProjectileType<BrimstoneFire>(),
|
||||
ModContent.ProjectileType<LeviathanBomb>(),
|
||||
ModContent.ProjectileType<WaterSpear>(),
|
||||
ModContent.ProjectileType<FrostMist>(),
|
||||
ModContent.ProjectileType<SirenSong>(),
|
||||
ModContent.ProjectileType<AstralFlame>(),
|
||||
ModContent.ProjectileType<AstralLaser>(),
|
||||
ModContent.ProjectileType<PlagueExplosion>(),
|
||||
ModContent.ProjectileType<PlagueStingerGoliath>(),
|
||||
ModContent.ProjectileType<PlagueStingerGoliathV2>(),
|
||||
ModContent.ProjectileType<HiveBombGoliath>(),
|
||||
ModContent.ProjectileType<ScavengerNuke>(),
|
||||
ModContent.ProjectileType<AstralShot2>(),
|
||||
ModContent.ProjectileType<DeusMine>(),
|
||||
ModContent.ProjectileType<HolyBomb>(),
|
||||
ModContent.ProjectileType<HolyFire>(),
|
||||
ModContent.ProjectileType<HolyFire2>(),
|
||||
ModContent.ProjectileType<HolyFlare>(),
|
||||
ModContent.ProjectileType<MoltenBlast>(),
|
||||
ModContent.ProjectileType<MoltenBlob>(),
|
||||
ModContent.ProjectileType<DarkEnergyBall>(),
|
||||
ModContent.ProjectileType<DoGBeam>(),
|
||||
ModContent.ProjectileType<GreatSandBlast>(),
|
||||
ModContent.ProjectileType<PearlBurst>(),
|
||||
ModContent.ProjectileType<PearlRain>()
|
||||
};
|
||||
|
||||
revengeanceProjectileBuffList10Percent = new List<int>()
|
||||
{
|
||||
ProjectileID.Boulder,
|
||||
ModContent.ProjectileType<ProfanedSpear>(),
|
||||
ModContent.ProjectileType<FlareDust>(),
|
||||
ModContent.ProjectileType<RedLightningFeather>(),
|
||||
ModContent.ProjectileType<RedLightning>(),
|
||||
ModContent.ProjectileType<HolyBlast>(),
|
||||
ModContent.ProjectileType<HolySpear>(),
|
||||
ModContent.ProjectileType<ProvidenceCrystalShard>(),
|
||||
ModContent.ProjectileType<ProvidenceHolyRay>(),
|
||||
ModContent.ProjectileType<SignusScythe>(),
|
||||
ModContent.ProjectileType<EssenceDust>(),
|
||||
ModContent.ProjectileType<PhantomBlast>(),
|
||||
ModContent.ProjectileType<PhantomBlast2>(),
|
||||
ModContent.ProjectileType<PhantomGhostShot>(),
|
||||
ModContent.ProjectileType<PhantomHookShot>(),
|
||||
ModContent.ProjectileType<PhantomMine>(),
|
||||
ModContent.ProjectileType<PhantomShot>(),
|
||||
ModContent.ProjectileType<PhantomShot2>(),
|
||||
ModContent.ProjectileType<OldDukeGore>(),
|
||||
ModContent.ProjectileType<OldDukeVortex>(),
|
||||
ModContent.ProjectileType<DoGDeath>(),
|
||||
ModContent.ProjectileType<DoGFire>(),
|
||||
ModContent.ProjectileType<DoGNebulaShot>(),
|
||||
ModContent.ProjectileType<FlareBomb>(),
|
||||
ModContent.ProjectileType<FlareDust2>(),
|
||||
ModContent.ProjectileType<Flarenado>()
|
||||
};
|
||||
|
||||
revengeanceProjectileBuffList5Percent = new List<int>()
|
||||
{
|
||||
ModContent.ProjectileType<Infernado>(),
|
||||
ModContent.ProjectileType<Infernado2>(),
|
||||
ModContent.ProjectileType<YharonFireball>(),
|
||||
ModContent.ProjectileType<YharonFireball2>(),
|
||||
ModContent.ProjectileType<BrimstoneBarrage>(),
|
||||
ModContent.ProjectileType<BrimstoneHellblast>(),
|
||||
ModContent.ProjectileType<BrimstoneFireblast>(),
|
||||
ModContent.ProjectileType<BrimstoneGigaBlast>(),
|
||||
ModContent.ProjectileType<BrimstoneHellblast2>(),
|
||||
ModContent.ProjectileType<BrimstoneMonster>(),
|
||||
ModContent.ProjectileType<BrimstoneWave>()
|
||||
};
|
||||
|
||||
revengeanceLifeStealExceptionList = new List<int>()
|
||||
{
|
||||
NPCID.Probe,
|
||||
@@ -2430,8 +2336,6 @@ namespace CalamityMod
|
||||
revengeanceProjectileBuffList25Percent = null;
|
||||
revengeanceProjectileBuffList20Percent = null;
|
||||
revengeanceProjectileBuffList15Percent = null;
|
||||
revengeanceProjectileBuffList10Percent = null;
|
||||
revengeanceProjectileBuffList5Percent = null;
|
||||
revengeanceLifeStealExceptionList = null;
|
||||
movementImpairImmuneList = null;
|
||||
needsDebuffIconDisplayList = null;
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.LoreItems
|
||||
DisplayName.SetDefault("The Slime God");
|
||||
Tooltip.SetDefault("It is a travesty, one of the most threatening biological terrors ever created.\n" +
|
||||
"If this creature were allowed to combine every slime on the planet it would become nearly unstoppable.\n" +
|
||||
"Favorite this item to become slimed and able to slide around on tiles quickly, at the cost of reduced defense.\n" +
|
||||
"This effect makes dashing more difficult and does not work with mounts.");
|
||||
"Favorite this item to become slimed and able to slide around on tiles, at the cost of reduced defense.\n" +
|
||||
"This effect does not work with mounts.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -34,20 +34,10 @@ namespace CalamityMod.Items.LoreItems
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.mount.Active || !item.favorited || modPlayer.slimeGodLoreProcessed)
|
||||
if (player.mount.Active || !item.favorited)
|
||||
return;
|
||||
|
||||
modPlayer.slimeGodLoreProcessed = true;
|
||||
|
||||
if (player.dashDelay < 0 || (player.velocity.Length() >= 11f && CalamityPlayer.areThereAnyDamnBosses)) //If you go over 52.8 mph
|
||||
player.velocity.X *= 0.9f;
|
||||
|
||||
player.slippy2 = true;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.AddBuff(BuffID.Slimed, 2);
|
||||
|
||||
player.statDefense -= 10;
|
||||
modPlayer.slimeGodLore = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -146,8 +146,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
num8 = speed / num8;
|
||||
num6 *= num8;
|
||||
num7 *= num8;
|
||||
int projectileDamage = Main.expertMode ? 28 : 35;
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, num6, num7, ModContent.ProjectileType<BrimstoneHellfireball>(), projectileDamage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, num6, num7, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (vector251.Length() > 400f || !flag104)
|
||||
|
||||
@@ -114,8 +114,9 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 235, 0f, 0f, 100, default, 2f);
|
||||
}
|
||||
int damage = expertMode ? 25 : 30;
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, direction.X, direction.Y, ModContent.ProjectileType<BrimstoneBarrage>(), damage, 1f, npc.target);
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, direction.X, direction.Y, type, damage, 1f, npc.target);
|
||||
}
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
+98
-75
@@ -97,7 +97,8 @@ namespace CalamityMod.NPCs
|
||||
num743 *= num745;
|
||||
num744 *= num745;
|
||||
|
||||
int damage = expertMode ? 23 : 28;
|
||||
int type = ModContent.ProjectileType<SandBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int numProj = 3;
|
||||
int spread = 36;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
@@ -109,7 +110,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * i;
|
||||
int proj = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), ModContent.ProjectileType<SandBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
}
|
||||
@@ -189,7 +190,6 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damageBoom = expertMode ? 23 : 28;
|
||||
float velocity = revenge ? 7.5f : 6.5f;
|
||||
if (death)
|
||||
velocity += 2f;
|
||||
@@ -198,15 +198,17 @@ namespace CalamityMod.NPCs
|
||||
|
||||
int totalProjectiles = expertMode ? 30 : 20;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ModContent.ProjectileType<SandBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
int projectileType = ModContent.ProjectileType<SandBlast>();
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(npc.Center, vector255, projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
damageBoom = expertMode ? 28 : 33;
|
||||
int num320 = expertMode ? 14 : 7;
|
||||
type = ModContent.ProjectileType<SandPoisonCloud>();
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
for (int num321 = 0; num321 < num320; num321++)
|
||||
{
|
||||
Vector2 vector15 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
@@ -219,7 +221,7 @@ namespace CalamityMod.NPCs
|
||||
if (BossRushEvent.BossRushActive)
|
||||
vector15 *= 1.25f;
|
||||
|
||||
Projectile.NewProjectile(npc.Center, vector15, ModContent.ProjectileType<SandPoisonCloud>(), damageBoom, 0f, Main.myPlayer, 0f, Main.rand.Next(-45, 1));
|
||||
Projectile.NewProjectile(npc.Center, vector15, type, damage, 0f, Main.myPlayer, 0f, Main.rand.Next(-45, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,15 +249,15 @@ namespace CalamityMod.NPCs
|
||||
float num942 = player.position.X + player.width * 0.5f - vector104.X;
|
||||
float num943 = player.position.Y + player.height * 0.5f - vector104.Y;
|
||||
float num944 = (float)Math.Sqrt(num942 * num942 + num943 * num943);
|
||||
int projectileType = ModContent.ProjectileType<SandTooth>();
|
||||
int damage = expertMode ? 25 : 30;
|
||||
int type = ModContent.ProjectileType<SandTooth>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float num941 = BossRushEvent.BossRushActive ? 7.5f : 5f;
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -273,15 +275,15 @@ namespace CalamityMod.NPCs
|
||||
float num942 = player.position.X + player.width * 0.5f - vector104.X;
|
||||
float num943 = player.position.Y + player.height * 0.5f - vector104.Y;
|
||||
float num944 = (float)Math.Sqrt(num942 * num942 + num943 * num943);
|
||||
int projectileType = ModContent.ProjectileType<SandBlast>();
|
||||
int damage = expertMode ? 23 : 28;
|
||||
int type = ModContent.ProjectileType<SandBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float num941 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -797,7 +799,8 @@ namespace CalamityMod.NPCs
|
||||
vectorCenter.X += num743 * 3f;
|
||||
vectorCenter.Y += num744 * 3f;
|
||||
|
||||
int damage = expertMode ? 25 : 30;
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int numProj = 4;
|
||||
int spread = 45;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
@@ -811,7 +814,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * i;
|
||||
Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), ModContent.ProjectileType<BrimstoneBarrage>(), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -835,9 +838,9 @@ namespace CalamityMod.NPCs
|
||||
relativeSpeedY *= totalRelativeSpeed;
|
||||
vectorCenter.X += relativeSpeedX * 3f;
|
||||
vectorCenter.Y += relativeSpeedY * 3f;
|
||||
int projectileDamage = expertMode ? 28 : 35;
|
||||
int projectileType = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
int projectileShot = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, relativeSpeedX, relativeSpeedY, projectileType, projectileDamage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
type = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
int projectileShot = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, relativeSpeedX, relativeSpeedY, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[projectileShot].timeLeft = 240;
|
||||
}
|
||||
}
|
||||
@@ -918,8 +921,6 @@ namespace CalamityMod.NPCs
|
||||
if (BossRushEvent.BossRushActive)
|
||||
projectileSpeed = 12f;
|
||||
|
||||
int damage = expertMode ? 25 : 30;
|
||||
|
||||
vectorCenter = player.Center - vectorCenter;
|
||||
|
||||
float radialOffset = 0.2f;
|
||||
@@ -933,21 +934,25 @@ namespace CalamityMod.NPCs
|
||||
|
||||
int totalProjectiles = 6;
|
||||
float offsetAngle = (float)Math.PI * radialOffset;
|
||||
int type = ModContent.ProjectileType<BrimstoneHellblast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int j = 0; j < totalProjectiles; j++)
|
||||
{
|
||||
float radians = j - (totalProjectiles - 1f) / 2f;
|
||||
Vector2 offset = velocity.RotatedBy(offsetAngle * radians, default);
|
||||
int proj = Projectile.NewProjectile(npc.Center + offset, vectorCenter, ModContent.ProjectileType<BrimstoneHellblast>(), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
int proj = Projectile.NewProjectile(npc.Center + offset, vectorCenter, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
Main.projectile[proj].timeLeft = 300;
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
|
||||
totalProjectiles = 12;
|
||||
float radians2 = MathHelper.TwoPi / totalProjectiles;
|
||||
type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -projectileSpeed).RotatedBy(radians2 * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<BrimstoneBarrage>(), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1030,9 @@ namespace CalamityMod.NPCs
|
||||
Main.PlaySound(SoundID.Item68, source);
|
||||
Vector2 laserVelocity2 = new Vector2(npc.localAI[0], npc.localAI[1]);
|
||||
laserVelocity2.Normalize();
|
||||
Projectile.NewProjectile(source, laserVelocity2, ModContent.ProjectileType<BrimstoneRay>(), 40 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, npc.whoAmI);
|
||||
int type = ModContent.ProjectileType<BrimstoneRay>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(source, laserVelocity2, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1374,8 +1381,8 @@ namespace CalamityMod.NPCs
|
||||
if (calamityGlobalNPC.enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
num828 += 5f;
|
||||
|
||||
int num829 = expertMode ? 34 : 42;
|
||||
int num830 = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
int type = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
num827 = (float)Math.Sqrt(num825 * num825 + num826 * num826);
|
||||
num827 = num828 / num827;
|
||||
num825 *= num827;
|
||||
@@ -1384,11 +1391,11 @@ namespace CalamityMod.NPCs
|
||||
vector82.Y += num826 * 6f;
|
||||
if (!Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
int proj = Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, num830, num829 + (provy ? 30 : 0), 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
int proj = Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
else
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, num830, num829 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1400,15 +1407,15 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num828 = BossRushEvent.BossRushActive ? 16f : (expertMode ? 13f : 10.5f);
|
||||
int num829 = expertMode ? 28 : 35;
|
||||
int num830 = ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int type = ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
num827 = (float)Math.Sqrt(num825 * num825 + num826 * num826);
|
||||
num827 = num828 / num827;
|
||||
num825 *= num827;
|
||||
num826 *= num827;
|
||||
vector82.X += num825 * 12f;
|
||||
vector82.Y += num826 * 12f;
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, num830, num829 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1507,8 +1514,8 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num837 = BossRushEvent.BossRushActive ? 15f : 11f;
|
||||
int num838 = brotherAlive ? (expertMode ? 34 : 42) : (expertMode ? 28 : 35);
|
||||
int num839 = brotherAlive ? ModContent.ProjectileType<BrimstoneHellfireball>() : ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int type = brotherAlive ? ModContent.ProjectileType<BrimstoneHellfireball>() : ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
num836 = (float)Math.Sqrt(num834 * num834 + num835 * num835);
|
||||
num836 = num837 / num836;
|
||||
num834 *= num836;
|
||||
@@ -1517,11 +1524,13 @@ namespace CalamityMod.NPCs
|
||||
vector83.Y += num835 * 12f;
|
||||
if (!Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
int proj = Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, ModContent.ProjectileType<BrimstoneHellfireball>(), (expertMode ? 34 : 42) + (provy ? 30 : 0), 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
type = ModContent.ProjectileType<BrimstoneHellfireball>();
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
int proj = Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
else
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1533,15 +1542,15 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num837 = BossRushEvent.BossRushActive ? 14f : 10.5f;
|
||||
int num838 = expertMode ? 20 : 24;
|
||||
int num839 = ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int type = ModContent.ProjectileType<BrimstoneLaser>();
|
||||
int damage = (int)Math.Round(npc.GetProjectileDamage(type) * 0.75);
|
||||
num836 = (float)Math.Sqrt(num834 * num834 + num835 * num835);
|
||||
num836 = num837 / num836;
|
||||
num834 *= num836;
|
||||
num835 *= num836;
|
||||
vector83.X += num834 * 12f;
|
||||
vector83.Y += num835 * 12f;
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1855,8 +1864,8 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num867 = BossRushEvent.BossRushActive ? 9f : 6f;
|
||||
int num868 = expertMode ? 30 : 38;
|
||||
int num869 = ModContent.ProjectileType<BrimstoneFire>();
|
||||
int type = ModContent.ProjectileType<BrimstoneFire>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector86 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
num864 = player.position.X + (player.width / 2) - vector86.X;
|
||||
num865 = player.position.Y + (player.height / 2) - vector86.Y;
|
||||
@@ -1868,7 +1877,7 @@ namespace CalamityMod.NPCs
|
||||
num864 += npc.velocity.X * 0.5f;
|
||||
vector86.X -= num864 * 1f;
|
||||
vector86.Y -= num865 * 1f;
|
||||
Projectile.NewProjectile(vector86.X, vector86.Y, num864, num865, num869, num868 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector86.X, vector86.Y, num864, num865, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2128,8 +2137,8 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num867 = BossRushEvent.BossRushActive ? 18f : 12f;
|
||||
int num868 = expertMode ? 29 : 36;
|
||||
int num869 = ModContent.ProjectileType<BrimstoneBall>();
|
||||
int type = ModContent.ProjectileType<BrimstoneBall>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector86 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
num864 = player.position.X + (player.width / 2) - vector86.X;
|
||||
num865 = player.position.Y + (player.height / 2) - vector86.Y;
|
||||
@@ -2141,7 +2150,7 @@ namespace CalamityMod.NPCs
|
||||
num864 += npc.velocity.X * 0.5f;
|
||||
vector86.X -= num864 * 1f;
|
||||
vector86.Y -= num865 * 1f;
|
||||
Projectile.NewProjectile(vector86.X, vector86.Y, num864, num865, num869, num868 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector86.X, vector86.Y, num864, num865, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2255,11 +2264,11 @@ namespace CalamityMod.NPCs
|
||||
bool phase3 = lifeRatio < 0.5f || death;
|
||||
|
||||
// Despawn
|
||||
if (!player.active || player.dead || dayTime)
|
||||
if (!player.active || player.dead || dayTime || Vector2.Distance(player.Center, npc.Center) > 5600f)
|
||||
{
|
||||
npc.TargetClosest(false);
|
||||
player = Main.player[npc.target];
|
||||
if (!player.active || player.dead || dayTime)
|
||||
if (!player.active || player.dead || dayTime || Vector2.Distance(player.Center, npc.Center) > 5600f)
|
||||
{
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -2301,9 +2310,6 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 33);
|
||||
int laserDamage = expertMode ? 32 : 37;
|
||||
if (NPC.downedMoonlord && revenge && !BossRushEvent.BossRushActive)
|
||||
laserDamage *= 3;
|
||||
|
||||
// Fire astral flames while teleporting
|
||||
if ((npc.ai[0] >= 5f && npc.ai[0] != 7) || calamityGlobalNPC.enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
@@ -2311,10 +2317,15 @@ namespace CalamityMod.NPCs
|
||||
float velocity = BossRushEvent.BossRushActive ? 10f : 7f;
|
||||
int totalProjectiles = 8;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ModContent.ProjectileType<AstralFlame>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (NPC.downedMoonlord && revenge && !BossRushEvent.BossRushActive)
|
||||
damage *= 3;
|
||||
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<AstralFlame>(), laserDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2331,8 +2342,11 @@ namespace CalamityMod.NPCs
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num185 = ModContent.ProjectileType<AstralLaser>();
|
||||
value9.X += num180;
|
||||
int type = ModContent.ProjectileType<AstralLaser>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (NPC.downedMoonlord && revenge && !BossRushEvent.BossRushActive)
|
||||
damage *= 3;
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 5; num186++)
|
||||
{
|
||||
@@ -2344,7 +2358,7 @@ namespace CalamityMod.NPCs
|
||||
num182 += Main.rand.Next(-60, 61);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, laserDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3375,11 +3389,11 @@ namespace CalamityMod.NPCs
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 38 : 45;
|
||||
int num946 = ModContent.ProjectileType<AstralShot2>();
|
||||
int type = ModContent.ProjectileType<AstralShot2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -3388,9 +3402,9 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f)
|
||||
{
|
||||
int num945 = expertMode ? 45 : 60;
|
||||
int num946 = ModContent.ProjectileType<DeusMine>();
|
||||
int proj = Projectile.NewProjectile(npc.Center, Vector2.Zero, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<DeusMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int proj = Projectile.NewProjectile(npc.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3602,7 +3616,6 @@ namespace CalamityMod.NPCs
|
||||
if (calamityGlobalNPC.newAI[1] >= 600f * projectileFireRateMultiplier)
|
||||
{
|
||||
calamityGlobalNPC.newAI[1] = 0f;
|
||||
int damage = (expertMode ? 50 : 60) + damageIncrease;
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
float num941 = 3f * tileEnrageMult;
|
||||
@@ -3613,10 +3626,11 @@ namespace CalamityMod.NPCs
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num946 = ModContent.ProjectileType<DoGBeamPortal>();
|
||||
int type = ModContent.ProjectileType<DoGBeamPortal>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, damage, 0f, Main.myPlayer, tileEnrageMult, 0f);
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage + damageIncrease, 0f, Main.myPlayer, tileEnrageMult, 0f);
|
||||
Main.projectile[num947].timeLeft = baseProjectileTimeLeft / 2;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
@@ -3625,10 +3639,12 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (lifePercentage < 50 || death || !player.ZoneDungeon)
|
||||
{
|
||||
int type = ModContent.ProjectileType<DarkEnergyBall2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float ai1 = player.ZoneDungeon ? 0f : 1f;
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
float ai1 = player.ZoneDungeon ? 0f : 1f;
|
||||
int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType<DarkEnergyBall2>(), damage, 0f, Main.myPlayer, i * 30, ai1);
|
||||
int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, type, damage + damageIncrease, 0f, Main.myPlayer, i * 30, ai1);
|
||||
Main.projectile[proj].timeLeft = baseProjectileTimeLeft;
|
||||
}
|
||||
}
|
||||
@@ -3641,10 +3657,12 @@ namespace CalamityMod.NPCs
|
||||
int i;
|
||||
float passedVar = 1f;
|
||||
|
||||
int type = ModContent.ProjectileType<DarkEnergyBall>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int proj = 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);
|
||||
int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), type, damage + damageIncrease, 0f, Main.myPlayer, passedVar, 0f);
|
||||
Main.projectile[proj].timeLeft = baseProjectileTimeLeft;
|
||||
passedVar += 1f;
|
||||
}
|
||||
@@ -3998,8 +4016,9 @@ namespace CalamityMod.NPCs
|
||||
if (phase3)
|
||||
num1307 = 1;
|
||||
|
||||
int damage = expertMode ? 50 : 60;
|
||||
float featherVelocity = 3f + (enrageScale - 1) * 1.5f;
|
||||
int type = ModContent.ProjectileType<RedLightningFeather>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
if (num1307 == 0 && canHit && npc.localAI[3] == 0f)
|
||||
{
|
||||
@@ -4036,7 +4055,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance;
|
||||
Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity;
|
||||
Projectile.NewProjectile(spawnVector, velocity, ModContent.ProjectileType<RedLightningFeather>(), damage, 0f, Main.myPlayer, 0f, phase3 ? 1f : 0f);
|
||||
Projectile.NewProjectile(spawnVector, velocity, type, damage, 0f, Main.myPlayer, 0f, phase3 ? 1f : 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4060,7 +4079,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance;
|
||||
Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity;
|
||||
Projectile.NewProjectile(spawnVector, velocity, ModContent.ProjectileType<RedLightningFeather>(), damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(spawnVector, velocity, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5100,11 +5119,12 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/OldDukeRoar"), (int)npc.position.X, (int)npc.position.Y);
|
||||
|
||||
int damage = expertMode ? 100 : 140;
|
||||
int type = ModContent.ProjectileType<OldDukeVortex>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Vector2 vortexSpawn = vector + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / MathHelper.TwoPi;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile.NewProjectile(vortexSpawn, Vector2.Zero, ModContent.ProjectileType<OldDukeVortex>(), damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y);
|
||||
Projectile.NewProjectile(vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5154,12 +5174,13 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 vector7 = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + vector;
|
||||
int damage = expertMode ? 55 : 70;
|
||||
int type = ModContent.ProjectileType<OldDukeGore>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
float velocityX = npc.direction * 6 * (Main.rand.NextFloat() + 0.5f);
|
||||
float velocityY = 8f * (Main.rand.NextFloat() + 0.5f);
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, velocityX, -velocityY, ModContent.ProjectileType<OldDukeGore>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5466,12 +5487,13 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 vector7 = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + vector;
|
||||
int damage = expertMode ? 55 : 70;
|
||||
int type = ModContent.ProjectileType<OldDukeGore>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
float velocityX = npc.direction * 6 * (Main.rand.NextFloat() + 0.5f);
|
||||
float velocityY = 8f * (Main.rand.NextFloat() + 0.5f);
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, velocityX, -velocityY, ModContent.ProjectileType<OldDukeGore>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5507,11 +5529,12 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/OldDukeRoar"), (int)npc.position.X, (int)npc.position.Y);
|
||||
|
||||
int damage = expertMode ? 100 : 140;
|
||||
int type = ModContent.ProjectileType<OldDukeVortex>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Vector2 vortexSpawn = vector + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / MathHelper.TwoPi;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile.NewProjectile(vortexSpawn, Vector2.Zero, ModContent.ProjectileType<OldDukeVortex>(), damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y);
|
||||
Projectile.NewProjectile(vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+208
-286
File diff suppressed because it is too large.
Load diff
@@ -997,8 +997,10 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronHead)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 1.25);
|
||||
npc.npcSlots = 12f;
|
||||
if (!CalamityWorld.death)
|
||||
npc.lifeMax = (int)(npc.lifeMax * 1.25);
|
||||
|
||||
npc.npcSlots = 12f;
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronHand)
|
||||
{
|
||||
@@ -1009,6 +1011,11 @@ namespace CalamityMod.NPCs
|
||||
npc.lifeMax = (int)(npc.lifeMax * 1.15);
|
||||
npc.npcSlots = 14f;
|
||||
}
|
||||
else if ((npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall) && CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 1.4);
|
||||
npc.scale = 1.25f;
|
||||
}
|
||||
else if (npc.type == NPCID.BrainofCthulhu)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 1.6);
|
||||
|
||||
@@ -170,8 +170,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
npc.ai[3] = 0f;
|
||||
}
|
||||
float num353 = 10f;
|
||||
int num354 = expertMode ? 12 : 16;
|
||||
int num355 = ModContent.ProjectileType<MushBomb>();
|
||||
int type = ModContent.ProjectileType<MushBomb>();
|
||||
Main.PlaySound(SoundID.Item42, (int)npc.position.X, (int)npc.position.Y);
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
@@ -194,7 +193,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
num350 *= num351;
|
||||
vector34.X += num349;
|
||||
vector34.Y += num350;
|
||||
Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350 - 5f, num355, num354, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350 - 5f, type, npc.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -435,7 +434,9 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
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);
|
||||
|
||||
int num354 = expertMode ? 12 : 16;
|
||||
int type = ModContent.ProjectileType<MushBombFall>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
if (npc.ai[2] % 2f == 0f && phase2 && revenge)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -443,7 +444,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
float velocityX = npc.ai[2] == 0f ? -4f : 4f;
|
||||
for (int x = 0; x < 20; x++)
|
||||
{
|
||||
Projectile.NewProjectile(npc.Center.X + shotSpacing, npc.Center.Y - 1000f, velocityX, 0f, ModContent.ProjectileType<MushBombFall>(), num354, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center.X + shotSpacing, npc.Center.Y - 1000f, velocityX, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing -= 100;
|
||||
}
|
||||
shotSpacing = 1000;
|
||||
@@ -458,7 +459,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
{
|
||||
for (int x = 0; x < 20; x++)
|
||||
{
|
||||
Projectile.NewProjectile(npc.Center.X + shotSpacing, npc.Center.Y - 1000f, 0f, 0f, ModContent.ProjectileType<MushBombFall>(), num354, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center.X + shotSpacing, npc.Center.Y - 1000f, 0f, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing -= 100;
|
||||
}
|
||||
shotSpacing = 1000;
|
||||
|
||||
+26
-20
@@ -218,13 +218,14 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = 25;
|
||||
int type = ModContent.ProjectileType<IceBomb>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 12f : 4f;
|
||||
Vector2 spinningPoint = Main.rand.NextBool(2) ? new Vector2(0f, -velocity) : Vector2.Normalize(new Vector2(-velocity, -velocity)) * velocity;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBomb>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
time = 0;
|
||||
}
|
||||
@@ -243,12 +244,13 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 16;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = expertMode ? 20 : 23;
|
||||
int type = ModContent.ProjectileType<IceBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,12 +295,13 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = expertMode ? 20 : 23;
|
||||
int type = ModContent.ProjectileType<IceBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity2 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity2).RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -380,12 +383,13 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = expertMode ? 20 : 23;
|
||||
int type = ModContent.ProjectileType<IceBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 14f : 9f;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -402,9 +406,9 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 23 : 26;
|
||||
int num185 = ModContent.ProjectileType<IceRain>();
|
||||
value9.X += num180;
|
||||
int type = ModContent.ProjectileType<IceRain>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 6; num186++)
|
||||
{
|
||||
@@ -415,7 +419,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
num180 += Main.rand.Next(-360, 361);
|
||||
num182 += Main.rand.Next(-360, 361);
|
||||
num180 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -8f, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -8f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -472,9 +476,9 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 23 : 26;
|
||||
int num185 = ModContent.ProjectileType<IceRain>();
|
||||
value9.X += num180;
|
||||
int type = ModContent.ProjectileType<IceRain>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 12; num186++)
|
||||
{
|
||||
@@ -485,7 +489,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
num180 += Main.rand.Next(-360, 361);
|
||||
num182 += Main.rand.Next(-360, 361);
|
||||
num180 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -2.5f, num185, num184, 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -2.5f, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -564,12 +568,13 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = expertMode ? 20 : 23;
|
||||
int type = ModContent.ProjectileType<IceBlast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 14f : 9f;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -839,13 +844,14 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = 25;
|
||||
int type = ModContent.ProjectileType<IceBomb>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity2 = BossRushEvent.BossRushActive ? 16f : 6f;
|
||||
Vector2 spinningPoint = Main.rand.NextBool(2) ? new Vector2(0f, -velocity2) : Vector2.Normalize(new Vector2(-velocity2, -velocity2)) * velocity2;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBomb>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
time = 0;
|
||||
}
|
||||
|
||||
@@ -108,13 +108,14 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int totalProjectiles = 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage2 = Main.expertMode ? 20 : 23;
|
||||
int type = ModContent.ProjectileType<IceBlast>();
|
||||
int damage2 = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
Vector2 spinningPoint = Main.rand.NextBool(2) ? new Vector2(0f, -velocity) : Vector2.Normalize(new Vector2(-velocity, -velocity)) * velocity;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
|
||||
int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<IceBlast>(), damage2, 0f, Main.myPlayer, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(npc.Center, vector255, type, damage2, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[proj].timeLeft = 300;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
float num943 = player.position.Y + (float)player.height * 0.5f - vector104.Y;
|
||||
float num944 = (float)Math.Sqrt((double)(num942 * num942 + num943 * num943));
|
||||
int projectileType = ModContent.ProjectileType<SandBlast>();
|
||||
int damage = 12;
|
||||
float num941 = BossRushEvent.BossRushActive ? 12f : 6f;
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
@@ -125,7 +124,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
vector104.Y += num943 * 5f;
|
||||
if (Main.rand.NextBool(2) || BossRushEvent.BossRushActive)
|
||||
{
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, npc.GetProjectileDamage(projectileType), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
@@ -140,9 +140,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
npc.localAI[0] += expertMode ? 1.5f : 1f;
|
||||
int projectileType = ModContent.ProjectileType<DoGNebulaShot>();
|
||||
int damage = expertMode ? 58 : 70;
|
||||
float num941 = 5f;
|
||||
int type = ModContent.ProjectileType<DoGNebulaShot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float num941 = 5f;
|
||||
if (npc.localAI[0] >= Main.rand.Next(1050, 12000))
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
@@ -156,9 +156,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
num943 *= num944;
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
int proj = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, projectileType, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[proj].ai[0] = Main.player[npc.target].Center.X;
|
||||
Main.projectile[proj].ai[1] = Main.player[npc.target].Center.Y;
|
||||
int proj = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, Main.player[npc.target].Center.X, Main.player[npc.target].Center.Y);
|
||||
Main.projectile[proj].netUpdate = true;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
@@ -290,8 +290,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
tail = true;
|
||||
}
|
||||
|
||||
int projectileDamage = expertMode ? 69 : 80;
|
||||
|
||||
// Fireballs
|
||||
if (npc.alpha <= 0 && distanceFromTarget > 500f)
|
||||
{
|
||||
@@ -304,8 +302,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float num430 = 16f;
|
||||
int num432 = ModContent.ProjectileType<DoGFire>();
|
||||
|
||||
float num429 = (float)Math.Sqrt(num427 * num427 + num428 * num428);
|
||||
num429 = num430 / num429;
|
||||
num427 *= num429;
|
||||
@@ -315,7 +311,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
vector44.X -= num427 * 1f;
|
||||
vector44.Y -= num428 * 1f;
|
||||
|
||||
Projectile.NewProjectile(vector44.X, vector44.Y, num427, num428, num432, projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<DoGFire>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector44.X, vector44.Y, num427, num428, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,14 +333,16 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
// Side walls
|
||||
float targetPosY = player.position.Y;
|
||||
int type = ModContent.ProjectileType<DoGDeath>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
switch (laserWallType)
|
||||
{
|
||||
case 0:
|
||||
|
||||
for (int x = 0; x < totalShots; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[0] -= spacingVar;
|
||||
}
|
||||
laserWallType = 1;
|
||||
@@ -353,8 +353,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
targetPosY += 50f;
|
||||
for (int x = 0; x < totalShots; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[0] -= spacingVar;
|
||||
}
|
||||
laserWallType = revenge ? 2 : 0;
|
||||
@@ -364,14 +364,14 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
for (int x = 0; x < totalShots; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[0] -= spacingVar;
|
||||
}
|
||||
for (int x = 0; x < 10; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[3], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[3], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[3], -speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[3], speed, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[3] -= Main.rand.NextBool(2) ? 180 : 200;
|
||||
}
|
||||
shotSpacing[3] = 1050;
|
||||
@@ -383,7 +383,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Lower wall
|
||||
for (int x = 0; x < totalShots; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + shotSpacing[1], player.position.Y + spawnOffset, 0f, -speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + shotSpacing[1], player.position.Y + spawnOffset, 0f, -speed, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[1] -= spacingVar;
|
||||
}
|
||||
shotSpacing[1] = 1050;
|
||||
@@ -391,7 +391,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Upper wall
|
||||
for (int x = 0; x < totalShots; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + shotSpacing[2], player.position.Y - spawnOffset, 0f, speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + shotSpacing[2], player.position.Y - spawnOffset, 0f, speed, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
shotSpacing[2] -= spacingVar;
|
||||
}
|
||||
shotSpacing[2] = 1050;
|
||||
|
||||
@@ -117,7 +117,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
{
|
||||
if (Main.expertMode && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType<ShadeNimbusHostile>(), 14, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<ShadeNimbusHostile>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
Vector2 vector133 = new Vector2(npc.Center.X, npc.Center.Y);
|
||||
float num1166 = Main.player[npc.target].Center.X - vector133.X;
|
||||
float num1167 = Main.player[npc.target].Center.Y - vector133.Y - 400f;
|
||||
float num1168 = (float)Math.Sqrt((double)(num1166 * num1166 + num1167 * num1167));
|
||||
float num1168 = (float)Math.Sqrt(num1166 * num1166 + num1167 * num1167);
|
||||
if (num1168 < 20f)
|
||||
{
|
||||
num1166 = npc.velocity.X;
|
||||
@@ -105,16 +105,17 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
npc.velocity.Y = npc.velocity.Y - num1165 * 2f;
|
||||
}
|
||||
}
|
||||
if (npc.position.X + (float)npc.width > Main.player[npc.target].position.X && npc.position.X < Main.player[npc.target].position.X + (float)Main.player[npc.target].width && npc.position.Y + (float)npc.height < Main.player[npc.target].position.Y && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (npc.position.X + npc.width > Main.player[npc.target].position.X && npc.position.X < Main.player[npc.target].position.X + Main.player[npc.target].width && npc.position.Y + npc.height < Main.player[npc.target].position.Y && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
npc.ai[0] += 1f;
|
||||
if (npc.ai[0] >= 30f)
|
||||
{
|
||||
npc.ai[0] = 0f;
|
||||
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 num184 = Main.expertMode ? 14 : 18;
|
||||
Projectile.NewProjectile((float)num1169, (float)num1170, 0f, 4f, ModContent.ProjectileType<ShaderainHostile>(), num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num1169 = (int)(npc.position.X + 10f + Main.rand.Next(npc.width - 20));
|
||||
int num1170 = (int)(npc.position.Y + npc.height + 4f);
|
||||
int type = ModContent.ProjectileType<ShaderainHostile>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(num1169, num1170, 0f, 4f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +141,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 12 : 15;
|
||||
int num946 = ModContent.ProjectileType<VileClot>();
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<VileClot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +141,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 12 : 15;
|
||||
int num946 = ModContent.ProjectileType<VileClot>();
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<VileClot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,8 +631,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
npc.ai[0]++;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = Main.expertMode ? 14 : 18;
|
||||
Projectile.NewProjectile(npc.position.X + Main.rand.Next(npc.width), npc.position.Y + Main.rand.Next(npc.height), 0, 0, ModContent.ProjectileType<ShadeNimbusHostile>(), damage, 0, Main.myPlayer, 11, 0);
|
||||
int type = ModContent.ProjectileType<ShadeNimbusHostile>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.position.X + Main.rand.Next(npc.width), npc.position.Y + Main.rand.Next(npc.height), 0, 0, type, damage, 0, Main.myPlayer, 11, 0);
|
||||
}
|
||||
if (npc.ai[0] == 10)
|
||||
{
|
||||
|
||||
@@ -325,23 +325,17 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float speed = (sirenAlive && !phase4 && !death) ? 13.5f : 16f;
|
||||
int dmg = 40;
|
||||
int projType = ModContent.ProjectileType<LeviathanBomb>();
|
||||
int type = ModContent.ProjectileType<LeviathanBomb>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
if (expertMode)
|
||||
speed = (sirenAlive && !phase4 && !death) ? 14f : 17f;
|
||||
dmg = 33;
|
||||
}
|
||||
|
||||
if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
speed = 22f;
|
||||
|
||||
if (!sirenAlive || phase4)
|
||||
{
|
||||
speed += 3f * (1f - lifeRatio);
|
||||
dmg += expertMode ? 3 : 4;
|
||||
}
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
speed *= 1.5f;
|
||||
@@ -352,7 +346,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
num416 *= num417;
|
||||
vector40.X += num415 * 4f;
|
||||
vector40.Y += num416 * 4f;
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, projType, dmg, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
if (soundDelay <= 0)
|
||||
{
|
||||
soundDelay = 120;
|
||||
|
||||
@@ -523,18 +523,13 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
bool shootProjectiles = npc.ai[1] % divisor == 0f;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && shootProjectiles)
|
||||
{
|
||||
int projectileDamage = expertMode ? 26 : 32;
|
||||
float projectileVelocity = expertMode ? 3f : 2f;
|
||||
|
||||
if (!leviAlive || phase4)
|
||||
{
|
||||
projectileDamage += expertMode ? 3 : 4;
|
||||
projectileVelocity += 2f * (1f - lifeRatio);
|
||||
}
|
||||
|
||||
int totalProjectiles = 8;
|
||||
int projectileDistance = 600;
|
||||
int projectileType = ModContent.ProjectileType<WaterSpear>();
|
||||
int type = ModContent.ProjectileType<WaterSpear>();
|
||||
switch ((int)npc.localAI[3])
|
||||
{
|
||||
case 0:
|
||||
@@ -542,12 +537,12 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
break;
|
||||
case 1:
|
||||
totalProjectiles = 3;
|
||||
projectileType = ModContent.ProjectileType<FrostMist>();
|
||||
type = ModContent.ProjectileType<FrostMist>();
|
||||
Main.PlaySound(SoundID.Item30, player.position);
|
||||
break;
|
||||
case 2:
|
||||
totalProjectiles = 6;
|
||||
projectileType = ModContent.ProjectileType<SirenSong>();
|
||||
type = ModContent.ProjectileType<SirenSong>();
|
||||
float soundPitch = (Main.rand.NextFloat() - 0.5f) * 0.5f;
|
||||
Main.harpNote = soundPitch;
|
||||
Main.PlaySound(SoundID.Item26, player.position);
|
||||
@@ -561,11 +556,12 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
totalProjectiles += totalProjectiles / 2;
|
||||
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -projectileVelocity).RotatedBy(radians * i)) * projectileDistance;
|
||||
Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * projectileVelocity;
|
||||
Projectile.NewProjectile(spawnVector, velocity, projectileType, projectileDamage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(spawnVector, velocity, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,9 +114,6 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
float projLength = projVector.Length();
|
||||
|
||||
float speed = BossRushEvent.BossRushActive ? 18f : 9f;
|
||||
int damage = 11;
|
||||
if (CalamityWorld.death)
|
||||
damage += 1;
|
||||
int type = ModContent.ProjectileType<JewelProjectile>();
|
||||
|
||||
projLength = speed / projLength;
|
||||
@@ -138,9 +135,9 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
Main.dust[ruby].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Main.PlaySound(SoundID.Item8, npc.position);
|
||||
|
||||
int proj = Projectile.NewProjectile(npcPos, projVector, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.PlaySound(SoundID.Item8, npc.position);
|
||||
Projectile.NewProjectile(npcPos, projVector, type, npc.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == 20f)
|
||||
{
|
||||
float num151 = 10f;
|
||||
int num152 = Main.expertMode ? 53 : 65;
|
||||
int num153 = ModContent.ProjectileType<PhantomGhostShot>();
|
||||
num149 = num151 / num149;
|
||||
int type = ModContent.ProjectileType<PhantomGhostShot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
num149 = num151 / num149;
|
||||
num147 *= num149;
|
||||
num148 *= num149;
|
||||
int num154 = Projectile.NewProjectile(vector17.X, vector17.Y, num147, num148, num153, num152, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num154 = Projectile.NewProjectile(vector17.X, vector17.Y, num147, num148, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,13 +76,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 12 : 15;
|
||||
int num946 = ModContent.ProjectileType<BloodClot>();
|
||||
vector104.X += num942 * 5f;
|
||||
int type = ModContent.ProjectileType<BloodClot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num947].timeLeft = 160;
|
||||
}
|
||||
npc.netUpdate = true;
|
||||
|
||||
@@ -76,13 +76,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 12 : 15;
|
||||
int num946 = ModContent.ProjectileType<BloodClot>();
|
||||
vector104.X += num942 * 5f;
|
||||
int type = ModContent.ProjectileType<BloodClot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num947].timeLeft = 160;
|
||||
}
|
||||
npc.netUpdate = true;
|
||||
|
||||
@@ -76,13 +76,13 @@ namespace CalamityMod.NPCs.Perforator
|
||||
num944 = num941 / num944;
|
||||
num942 *= num944;
|
||||
num943 *= num944;
|
||||
int num945 = expertMode ? 12 : 15;
|
||||
int num946 = ModContent.ProjectileType<BloodClot>();
|
||||
vector104.X += num942 * 5f;
|
||||
int type = ModContent.ProjectileType<BloodClot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
vector104.X += num942 * 5f;
|
||||
vector104.Y += num943 * 5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, num945, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num947].timeLeft = 160;
|
||||
}
|
||||
npc.netUpdate = true;
|
||||
|
||||
@@ -168,8 +168,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 14 : 18;
|
||||
int num185 = Main.rand.NextBool(2) ? ModContent.ProjectileType<IchorShot>() : ModContent.ProjectileType<BloodGeyser>();
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<IchorShot>() : ModContent.ProjectileType<BloodGeyser>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
num183 = num179 / num183;
|
||||
num180 += (float)Main.rand.Next(-180, 181);
|
||||
num180 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -5f, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, -5f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -706,29 +706,19 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
|
||||
int num1074 = 40;
|
||||
int num1075 = Main.rand.NextBool(2) ? ModContent.ProjectileType<PlagueStingerGoliath>() : ModContent.ProjectileType<PlagueStingerGoliathV2>();
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<PlagueStingerGoliath>() : ModContent.ProjectileType<PlagueStingerGoliathV2>();
|
||||
if (expertMode)
|
||||
{
|
||||
num1074 = 32;
|
||||
int damageBoost = death ? 5 : (int)(6f * (1f - lifeRatio));
|
||||
num1074 += damageBoost;
|
||||
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
num1074 += 8;
|
||||
num1075 = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
}
|
||||
type = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.rand.NextBool(9))
|
||||
{
|
||||
num1074 = 50;
|
||||
num1075 = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
}
|
||||
type = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
}
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, player.position.Y);
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, 0f, player.position.Y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,9 +780,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
if (BossRushEvent.BossRushActive)
|
||||
speed = 12;
|
||||
|
||||
int damage = expertMode ? 48 : 60;
|
||||
int type = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
Vector2 baseVelocity = player.Center - vectorCenter;
|
||||
Vector2 baseVelocity = player.Center - vectorCenter;
|
||||
baseVelocity.Normalize();
|
||||
baseVelocity *= speed;
|
||||
|
||||
@@ -801,7 +792,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
Vector2 spawn = vectorCenter;
|
||||
spawn.X += i * 27 - (MissileProjectiles * 12); // -96 to 93
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-MissileAngleSpread / 2 + (MissileAngleSpread * i / MissileProjectiles)));
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<HiveBombGoliath>(), damage, 0f, Main.myPlayer, 0f, player.position.Y);
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, type, damage, 0f, Main.myPlayer, 0f, player.position.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,14 +490,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
num1073 = num1070 / num1073;
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
int num1074 = 26;
|
||||
int num1075 = ModContent.ProjectileType<PlagueStingerGoliathV2>();
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
num1074 = 33;
|
||||
num1075 = ModContent.ProjectileType<HiveBombGoliath>();
|
||||
}
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = Main.rand.NextBool(15) ? ModContent.ProjectileType<HiveBombGoliath>() : ModContent.ProjectileType<PlagueStingerGoliathV2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (!Collision.CanHit(new Vector2(vector121.X, vector121.Y - 30f), 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height))
|
||||
|
||||
@@ -92,9 +92,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = expertMode ? 62 : 75;
|
||||
int type = ModContent.ProjectileType<PhantomMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float maxVelocity = 8f * tileEnrageMult;
|
||||
Projectile.NewProjectile(npc.Center, direction, ModContent.ProjectileType<PhantomMine>(), damage, 1f, npc.target, maxVelocity, 0f);
|
||||
Projectile.NewProjectile(npc.Center, direction, type, damage, 1f, npc.target, maxVelocity, 0f);
|
||||
}
|
||||
npc.ai[2] = 0f;
|
||||
}
|
||||
|
||||
@@ -310,12 +310,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
float chargeDistanceGateValue = 32f;
|
||||
|
||||
if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue)
|
||||
{
|
||||
npc.velocity *= 0.8f;
|
||||
return;
|
||||
else
|
||||
{
|
||||
if (Vector2.Distance(vector, chargeVector) > 1200f)
|
||||
npc.velocity = chargeLocationVelocity;
|
||||
else
|
||||
npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration);
|
||||
}
|
||||
|
||||
npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration);
|
||||
}
|
||||
|
||||
npc.netUpdate = true;
|
||||
@@ -392,7 +394,12 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
public override bool CheckActive()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
if (CalamityWorld.revenge)
|
||||
player.AddBuff(ModContent.BuffType<Horror>(), 180, true);
|
||||
|
||||
@@ -511,6 +511,18 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[1] = 0f;
|
||||
Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[2] = 0f;
|
||||
Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[3] = 1f;
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.SyncCalamityNPCAIArray);
|
||||
netMessage.Write((byte)CalamityGlobalNPC.ghostBossClone);
|
||||
netMessage.Write(Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[0]);
|
||||
netMessage.Write(Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[1]);
|
||||
netMessage.Write(Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[2]);
|
||||
netMessage.Write(Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[3]);
|
||||
netMessage.Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -557,18 +569,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
if (flag47)
|
||||
{
|
||||
int damage = expertMode ? 48 : 60;
|
||||
int type = ModContent.ProjectileType<PhantomShot>();
|
||||
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
damage = expertMode ? 60 : 70;
|
||||
npc.localAI[1] = -30f;
|
||||
type = ModContent.ProjectileType<PhantomBlast>();
|
||||
}
|
||||
|
||||
damage += damageIncrease;
|
||||
|
||||
int damage = npc.GetProjectileDamage(type) + damageIncrease;
|
||||
if (speedBoost || npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
damage *= 2;
|
||||
|
||||
@@ -597,11 +605,8 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
else
|
||||
{
|
||||
int damage = expertMode ? 60 : 70;
|
||||
int type = ModContent.ProjectileType<PhantomBlast>();
|
||||
|
||||
damage += damageIncrease;
|
||||
|
||||
int damage = npc.GetProjectileDamage(type) + damageIncrease;
|
||||
if (speedBoost || npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
damage *= 2;
|
||||
|
||||
@@ -703,18 +708,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
if (flag47)
|
||||
{
|
||||
int damage = expertMode ? 53 : 65;
|
||||
int type = ModContent.ProjectileType<PhantomShot2>();
|
||||
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
damage = expertMode ? 65 : 75;
|
||||
npc.localAI[1] = -30f;
|
||||
type = ModContent.ProjectileType<PhantomBlast2>();
|
||||
}
|
||||
|
||||
damage += damageIncrease;
|
||||
|
||||
int damage = npc.GetProjectileDamage(type) + damageIncrease;
|
||||
if (speedBoost || npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
damage *= 2;
|
||||
|
||||
@@ -744,11 +745,8 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
else
|
||||
{
|
||||
int damage = expertMode ? 65 : 75;
|
||||
int type = ModContent.ProjectileType<PhantomBlast2>();
|
||||
|
||||
damage += damageIncrease;
|
||||
|
||||
int damage = npc.GetProjectileDamage(type) + damageIncrease;
|
||||
if (speedBoost || npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
damage *= 2;
|
||||
|
||||
@@ -866,9 +864,6 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
vector93.X += num743 * 3f;
|
||||
vector93.Y += num744 * 3f;
|
||||
|
||||
int damage = expertMode ? 53 : 65;
|
||||
damage += damageIncrease;
|
||||
|
||||
int numProj = baseProjectileAmt + 2;
|
||||
float rotation = MathHelper.ToRadians(baseProjectileSpread + 45);
|
||||
float baseSpeed = (float)Math.Sqrt(num743 * num743 + num744 * num744);
|
||||
@@ -876,12 +871,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
double deltaAngle = rotation / numProj;
|
||||
double offsetAngle;
|
||||
|
||||
int type = ModContent.ProjectileType<PhantomShot>();
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<PhantomShot2>() : ModContent.ProjectileType<PhantomShot>();
|
||||
int damage = npc.GetProjectileDamage(type) + damageIncrease;
|
||||
if (speedBoost || npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
damage *= 2;
|
||||
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * i;
|
||||
if (i % 2 == 0)
|
||||
type = ModContent.ProjectileType<PhantomShot2>();
|
||||
Projectile.NewProjectile(vector93.X, vector93.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,12 +148,12 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == 20f)
|
||||
{
|
||||
float num151 = (BossRushEvent.BossRushActive ? 14f : 10f) * tileEnrageMult;
|
||||
int num152 = expertMode ? 48 : 60;
|
||||
int num153 = ModContent.ProjectileType<PhantomHookShot>();
|
||||
num149 = num151 / num149;
|
||||
int type = ModContent.ProjectileType<PhantomHookShot>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
num149 = num151 / num149;
|
||||
num147 *= num149;
|
||||
num148 *= num149;
|
||||
int proj = Projectile.NewProjectile(vector17.X, vector17.Y, num147, num148, num153, num152, 0f, Main.myPlayer, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(vector17.X, vector17.Y, num147, num148, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -218,10 +218,10 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
int totalProjectiles = 10;
|
||||
float velocity = 5f;
|
||||
int damage = expertMode ? 50 : 60;
|
||||
int projectileType = ModContent.ProjectileType<ProfanedSpear>();
|
||||
int type = ModContent.ProjectileType<ProfanedSpear>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
switch (spearType)
|
||||
switch (spearType)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(npc.Center, vector255, projectileType, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
spearType++;
|
||||
@@ -313,9 +313,10 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
if ((lifeRatio < 0.5f || death) && dustTimer <= 0)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
int damage = expertMode ? 55 : 70;
|
||||
Vector2 vector173 = Vector2.Normalize(player.Center - vectorCenter) * (npc.width + 20) / 2f + vectorCenter;
|
||||
int projectile = Projectile.NewProjectile((int)vector173.X, (int)vector173.Y, npc.direction * 2, 4f, ModContent.ProjectileType<FlareDust>(), damage, 0f, Main.myPlayer, 2f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareDust>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Vector2 vector173 = Vector2.Normalize(player.Center - vectorCenter) * (npc.width + 20) / 2f + vectorCenter;
|
||||
int projectile = Projectile.NewProjectile((int)vector173.X, (int)vector173.Y, npc.direction * 2, 4f, type, damage, 0f, Main.myPlayer, 2f, 0f);
|
||||
Main.projectile[projectile].timeLeft = 120;
|
||||
Main.projectile[projectile].velocity.X = 0f;
|
||||
Main.projectile[projectile].velocity.Y = 0f;
|
||||
|
||||
@@ -210,11 +210,12 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
float velocity = 5f;
|
||||
int totalProjectiles = 6;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int damage = expertMode ? 50 : 60;
|
||||
int type = ModContent.ProjectileType<ProfanedSpear>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<ProfanedSpear>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,9 +172,10 @@ namespace CalamityMod.NPCs.Providence
|
||||
if (fireDust && dustTimer <= 0)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
int damage = expertMode ? 40 : 59;
|
||||
int type = ModContent.ProjectileType<FlareDust>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Vector2 vector173 = Vector2.Normalize(player.Center - vectorCenter) * (float)(npc.width + 20) / 2f + vectorCenter;
|
||||
int projectile = Projectile.NewProjectile((int)vector173.X, (int)vector173.Y, (float)(npc.direction * 2), 4f, ModContent.ProjectileType<FlareDust>(), damage, 0f, Main.myPlayer, 2f, 0f);
|
||||
int projectile = Projectile.NewProjectile((int)vector173.X, (int)vector173.Y, (float)(npc.direction * 2), 4f, type, damage, 0f, Main.myPlayer, 2f, 0f);
|
||||
Main.projectile[projectile].timeLeft = 120;
|
||||
Main.projectile[projectile].velocity.X = 0f;
|
||||
Main.projectile[projectile].velocity.Y = 0f;
|
||||
|
||||
+717
-702
File diff suppressed because it is too large.
Load diff
+26
-10
@@ -80,8 +80,11 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.ai[0] == 0f)
|
||||
{
|
||||
npc.ai[1] += 1f;
|
||||
if (npc.ai[1] >= 180f)
|
||||
npc.ai[0] = 1f;
|
||||
if (npc.ai[1] >= 60f)
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
npc.ai[1] = 180f;
|
||||
}
|
||||
}
|
||||
else if (npc.ai[0] == 1f)
|
||||
{
|
||||
@@ -89,18 +92,31 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
npc.ai[1] -= 1f;
|
||||
npc.localAI[0] += 1f;
|
||||
float SpeedY = -10f;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
SpeedY *= 1.5f;
|
||||
}
|
||||
if (npc.localAI[0] % 45f == 0f)
|
||||
if (npc.localAI[0] % 60f == 0f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = 45;
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, SpeedY, ModContent.ProjectileType<RavagerFlame>(), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
float speedY = -12f;
|
||||
float speedX = 0f;
|
||||
switch ((int)npc.ai[2])
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
speedX = 2f;
|
||||
break;
|
||||
case 2:
|
||||
speedX = -2f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
int type = ModContent.ProjectileType<RavagerFlame>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center, velocity, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
npc.ai[2] += 1f;
|
||||
npc.localAI[0] = 0f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
+23
-18
@@ -234,11 +234,12 @@ namespace CalamityMod.NPCs.Ravager
|
||||
float velocity = BossRushEvent.BossRushActive ? 10f : 7f;
|
||||
int totalProjectiles = 8;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int laserDamage = 45;
|
||||
int type = ProjectileID.EyeBeam;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ProjectileID.EyeBeam, laserDamage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,9 +279,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
npc.localAI[2] = 0f;
|
||||
Vector2 shootFromVector = new Vector2(npc.Center.X + 80f, npc.Center.Y + 45f);
|
||||
int damage = 40;
|
||||
int type = ProjectileID.Fireball;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? 18f : 12f;
|
||||
Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, velocity, 0f, ProjectileID.Fireball, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, velocity, 0f, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,9 +319,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
npc.localAI[3] = 0f;
|
||||
Vector2 shootFromVector = new Vector2(npc.Center.X - 80f, npc.Center.Y + 45f);
|
||||
int damage = 40;
|
||||
int type = ProjectileID.Fireball;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float velocity = BossRushEvent.BossRushActive ? -18f : -12f;
|
||||
Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, velocity, 0f, ProjectileID.Fireball, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, velocity, 0f, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,8 +358,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
npc.ai[2] = 0f;
|
||||
Vector2 shootFromVector = new Vector2(npc.Center.X + 60f, npc.Center.Y + 60f);
|
||||
int damage = 35;
|
||||
int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, ProjectileID.GreekFire1 + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.GreekFire1;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, type + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[fire].timeLeft = 180;
|
||||
}
|
||||
}
|
||||
@@ -394,8 +398,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
npc.ai[3] = 0f;
|
||||
Vector2 shootFromVector = new Vector2(npc.Center.X - 60f, npc.Center.Y + 60f);
|
||||
int damage = 35;
|
||||
int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, ProjectileID.GreekFire1 + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.GreekFire1;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, type + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[fire].timeLeft = 180;
|
||||
}
|
||||
}
|
||||
@@ -516,13 +521,13 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
if (!NPC.AnyNPCs(ModContent.NPCType<RockPillar>()))
|
||||
{
|
||||
NPC.NewNPC((int)npc.Center.X - spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType<RockPillar>());
|
||||
NPC.NewNPC((int)npc.Center.X + spawnDistance, (int)npc.Center.Y - 10, ModContent.NPCType<RockPillar>());
|
||||
NPC.NewNPC((int)player.Center.X - spawnDistance, (int)player.Center.Y - 100, ModContent.NPCType<RockPillar>());
|
||||
NPC.NewNPC((int)player.Center.X + spawnDistance, (int)player.Center.Y - 100, ModContent.NPCType<RockPillar>());
|
||||
}
|
||||
else if (!NPC.AnyNPCs(ModContent.NPCType<FlamePillar>()))
|
||||
{
|
||||
NPC.NewNPC((int)npc.Center.X - spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType<FlamePillar>());
|
||||
NPC.NewNPC((int)npc.Center.X + spawnDistance * 2, (int)npc.Center.Y - 10, ModContent.NPCType<FlamePillar>());
|
||||
NPC.NewNPC((int)player.Center.X - spawnDistance * 2, (int)player.Center.Y - 100, ModContent.NPCType<FlamePillar>());
|
||||
NPC.NewNPC((int)player.Center.X + spawnDistance * 2, (int)player.Center.Y - 100, ModContent.NPCType<FlamePillar>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,7 +585,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.velocity.Y = -velocityY;
|
||||
}
|
||||
|
||||
float maxOffset = 360f;
|
||||
float maxOffset = death ? 240f : 240f * (1f - lifeRatio);
|
||||
float offset = npc.ai[0] == 2f ? maxOffset * npc.Calamity().newAI[2] : 0f;
|
||||
|
||||
// Set offset to 0 if the target stops moving
|
||||
@@ -589,13 +594,13 @@ namespace CalamityMod.NPCs.Ravager
|
||||
else
|
||||
npc.Calamity().newAI[2] = player.direction;
|
||||
|
||||
if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (inRange || npc.ai[0] != 2f)) || npc.ai[1] > 0f || npc.Calamity().newAI[3] >= 300f)
|
||||
if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (inRange || npc.ai[0] != 2f)) || npc.ai[1] > 0f || npc.Calamity().newAI[3] >= 180f)
|
||||
{
|
||||
if (npc.ai[0] == 2f)
|
||||
{
|
||||
float stopBeforeFallTime = 25f;
|
||||
float stopBeforeFallTime = 30f;
|
||||
if (expertMode)
|
||||
stopBeforeFallTime -= death ? 5f : 5f * (1f - lifeRatio);
|
||||
stopBeforeFallTime -= death ? 15f : 15f * (1f - lifeRatio);
|
||||
|
||||
if (npc.ai[1] < stopBeforeFallTime)
|
||||
{
|
||||
|
||||
@@ -129,11 +129,11 @@ namespace CalamityMod.NPCs.Ravager
|
||||
totalPlayerDistance = nukeSpeed / totalPlayerDistance;
|
||||
playerDistanceX *= totalPlayerDistance;
|
||||
playerDistanceY *= totalPlayerDistance;
|
||||
int nukeDamage = expertMode ? 45 : 60;
|
||||
int projectileType = ModContent.ProjectileType<ScavengerNuke>();
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
int type = ModContent.ProjectileType<ScavengerNuke>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int nuke = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, playerDistanceX, playerDistanceY, projectileType, nukeDamage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
int nuke = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, playerDistanceX, playerDistanceY, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[nuke].velocity.Y = -15f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,15 +96,18 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
bool fireProjectiles = npc.ai[1] >= 480f;
|
||||
if (fireProjectiles && Vector2.Distance(npc.Center, player.Center) > 160f)
|
||||
if (fireProjectiles && Vector2.Distance(npc.Center, player.Center) > 80f)
|
||||
{
|
||||
if (npc.ai[1] >= 600f)
|
||||
{
|
||||
npc.ai[0] += 1f;
|
||||
npc.ai[1] = 0f;
|
||||
Main.PlaySound(SoundID.Item62, npc.position);
|
||||
|
||||
int type = ModContent.ProjectileType<ScavengerNuke>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType<ScavengerNuke>(), (Main.expertMode ? 45 : 60) + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Zero, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,24 +115,21 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height))
|
||||
{
|
||||
Main.PlaySound(SoundID.Item33, npc.position);
|
||||
int num8 = 40;
|
||||
int num9 = ModContent.ProjectileType<ScavengerLaser>();
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Normalize(player.Center - npc.Center) * 6f, num9, num8 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Main.PlaySound(SoundID.Item33, npc.position);
|
||||
int type = ModContent.ProjectileType<ScavengerLaser>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Normalize(player.Center - npc.Center) * 6f, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, -1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float num823 = 10f;
|
||||
float num823 = 12f;
|
||||
float num824 = 0.15f;
|
||||
if (death)
|
||||
{
|
||||
num823 += 1f;
|
||||
num824 += 0.02f;
|
||||
num824 += 0.03f;
|
||||
}
|
||||
if (provy)
|
||||
{
|
||||
@@ -143,8 +143,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
|
||||
Vector2 vector82 = npc.Center;
|
||||
float num825 = player.Center.X + (fireProjectiles ? 360f * player.direction : 0f) - vector82.X;
|
||||
float num826 = player.Center.Y + (fireProjectiles ? 0f : 360f) - vector82.Y;
|
||||
float distance = npc.ai[0] % 2f == 0f ? 360f : -360f;
|
||||
float num825 = player.Center.X + (fireProjectiles ? distance : 0f) - vector82.X;
|
||||
float num826 = player.Center.Y + (fireProjectiles ? -180f : 360f) - vector82.Y;
|
||||
float num827 = (float)Math.Sqrt(num825 * num825 + num826 * num826);
|
||||
num827 = num823 / num827;
|
||||
num825 *= num827;
|
||||
|
||||
+153
-137
@@ -23,9 +23,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
[AutoloadBossHead]
|
||||
public class Signus : ModNPC
|
||||
{
|
||||
private int phaseSwitch = 0;
|
||||
private int chargeSwitch = 0;
|
||||
private int dustTimer = 3;
|
||||
private int spawnX = 750;
|
||||
private int spawnY = 120;
|
||||
private int lifeToAlpha = 0;
|
||||
@@ -94,9 +91,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(phaseSwitch);
|
||||
writer.Write(chargeSwitch);
|
||||
writer.Write(dustTimer);
|
||||
writer.Write(spawnX);
|
||||
writer.Write(spawnY);
|
||||
writer.Write(lifeToAlpha);
|
||||
@@ -104,9 +98,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
phaseSwitch = reader.ReadInt32();
|
||||
chargeSwitch = reader.ReadInt32();
|
||||
dustTimer = reader.ReadInt32();
|
||||
spawnX = reader.ReadInt32();
|
||||
spawnY = reader.ReadInt32();
|
||||
lifeToAlpha = reader.ReadInt32();
|
||||
@@ -124,10 +115,15 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
double lifeRatio = npc.life / (double)npc.lifeMax;
|
||||
lifeToAlpha = (int)(100.0 * (1.0 - lifeRatio));
|
||||
|
||||
bool phase2 = (lifeRatio < 0.75f && expertMode) || death;
|
||||
int maxCharges = death ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
int maxTeleports = death ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
float inertia = death ? 10f : revenge ? 11f : expertMode ? 12f : 14f;
|
||||
float chargeVelocity = death ? 14f : revenge ? 13f : expertMode ? 12f : 10f;
|
||||
bool phase2 = (lifeRatio < 0.75f && expertMode) || death;
|
||||
bool phase3 = lifeRatio < 0.5f || death;
|
||||
|
||||
npc.damage = npc.defDamage;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest(true);
|
||||
@@ -169,8 +165,8 @@ namespace CalamityMod.NPCs.Signus
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
phaseSwitch = 0;
|
||||
chargeSwitch = 0;
|
||||
npc.Calamity().newAI[0] = 0f;
|
||||
npc.Calamity().newAI[1] = 0f;
|
||||
spawnY = 120;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
@@ -180,9 +176,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
else if (npc.timeLeft < 1800)
|
||||
npc.timeLeft = 1800;
|
||||
|
||||
float num1000 = expertMode ? 11f : 13f;
|
||||
float num1006 = 0.111111117f * num1000;
|
||||
|
||||
if (lifeToAlpha < 50 && npc.ai[0] != 1f)
|
||||
{
|
||||
for (int num1011 = 0; num1011 < 2; num1011++)
|
||||
@@ -227,10 +220,21 @@ namespace CalamityMod.NPCs.Signus
|
||||
npc.velocity.Y = (npc.velocity.Y * 50f + num796) / 51f;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.knockBackResist = 0f;
|
||||
}
|
||||
if (npc.ai[0] == 0f)
|
||||
|
||||
if (npc.ai[0] == -1f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int phase;
|
||||
do phase = Main.rand.Next(5);
|
||||
while (phase == npc.ai[1] || phase == 1 || phase == 2);
|
||||
|
||||
npc.ai[0] = phase;
|
||||
npc.ai[1] = 0f;
|
||||
}
|
||||
}
|
||||
else if (npc.ai[0] == 0f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -242,7 +246,9 @@ namespace CalamityMod.NPCs.Signus
|
||||
if (npc.localAI[1] >= 120f)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
|
||||
npc.TargetClosest(true);
|
||||
|
||||
int num1249 = 0;
|
||||
int num1250;
|
||||
int num1251;
|
||||
@@ -271,10 +277,13 @@ namespace CalamityMod.NPCs.Signus
|
||||
if (num1249 > 100)
|
||||
return;
|
||||
}
|
||||
|
||||
npc.ai[0] = 1f;
|
||||
npc.ai[1] = num1250;
|
||||
npc.ai[2] = num1251;
|
||||
|
||||
npc.netUpdate = true;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -296,14 +305,19 @@ namespace CalamityMod.NPCs.Signus
|
||||
if (npc.alpha >= 255)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item8, vectorCenter);
|
||||
|
||||
npc.alpha = 255;
|
||||
|
||||
npc.position = position;
|
||||
|
||||
for (int n = 0; n < 15; n++)
|
||||
{
|
||||
int num39 = Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 90, default, 3f);
|
||||
Main.dust[num39].noGravity = true;
|
||||
}
|
||||
|
||||
npc.ai[0] = 2f;
|
||||
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -315,16 +329,15 @@ namespace CalamityMod.NPCs.Signus
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && revenge)
|
||||
{
|
||||
Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 122);
|
||||
|
||||
int num660 = NPC.NewNPC((int)(player.position.X + 750f), (int)player.position.Y, ModContent.NPCType<SignusBomb>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num660, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
int num661 = NPC.NewNPC((int)(player.position.X - 750f), (int)player.position.Y, ModContent.NPCType<SignusBomb>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num661, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(player.position.X + 750f, player.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
|
||||
@@ -344,6 +357,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
Main.dust[num623].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num623 = 0; num623 < 20; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(player.position.X + 750f, player.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
|
||||
@@ -358,11 +372,12 @@ namespace CalamityMod.NPCs.Signus
|
||||
Main.dust[num625].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
npc.ai[3] += 1f;
|
||||
npc.alpha = lifeToAlpha;
|
||||
if (npc.ai[3] >= 3f)
|
||||
if (npc.ai[3] >= maxTeleports)
|
||||
{
|
||||
npc.ai[0] = 3f;
|
||||
npc.ai[0] = -1f;
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
@@ -375,87 +390,92 @@ namespace CalamityMod.NPCs.Signus
|
||||
}
|
||||
else if (npc.ai[0] == 3f)
|
||||
{
|
||||
npc.damage = 0;
|
||||
npc.rotation = npc.velocity.X * 0.04f;
|
||||
float playerLocation = vectorCenter.X - player.Center.X;
|
||||
npc.direction = playerLocation < 0f ? 1 : -1;
|
||||
npc.spriteDirection = npc.direction;
|
||||
Vector2 vector121 = new Vector2(npc.position.X + (npc.width / 2), npc.position.Y + (npc.height / 2));
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
float divisor = expertMode ? (death ? 55f : revenge ? 60f : 65f) - (float)Math.Ceiling(30D * (1D - lifeRatio)) : 70f;
|
||||
|
||||
if (npc.ai[1] % divisor == divisor - 1f)
|
||||
float divisor = expertMode ? (death ? 12f : revenge ? 15f : 20f) - (float)Math.Ceiling(5D * (1D - lifeRatio)) : 20f;
|
||||
float scytheBarrageTime = divisor * 3f;
|
||||
float scytheBarrageCooldown = divisor * 3f;
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
if (npc.ai[2] > 0f)
|
||||
npc.ai[2] -= 1f;
|
||||
else
|
||||
npc.ai[2] = scytheBarrageTime + scytheBarrageCooldown;
|
||||
|
||||
if (npc.ai[2] <= scytheBarrageTime)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float num1070 = 15f;
|
||||
if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
{
|
||||
num1070 += 3f;
|
||||
}
|
||||
float num1071 = player.position.X + player.width * 0.5f - vector121.X;
|
||||
float num1072 = player.position.Y + player.height * 0.5f - vector121.Y;
|
||||
float num1073 = (float)Math.Sqrt(num1071 * num1071 + num1072 * num1072);
|
||||
num1073 = num1070 / num1073;
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
int num1074 = expertMode ? 48 : 60;
|
||||
int num1075 = ModContent.ProjectileType<SignusScythe>();
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, npc.target + 1);
|
||||
}
|
||||
if (npc.ai[1] % divisor == divisor - 1f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float num1070 = 15f;
|
||||
if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
|
||||
num1070 += 3f;
|
||||
|
||||
float num1071 = player.Center.X - vectorCenter.X;
|
||||
float num1072 = player.Center.Y - vectorCenter.Y;
|
||||
float num1073 = (float)Math.Sqrt(num1071 * num1071 + num1072 * num1072);
|
||||
num1073 = num1070 / num1073;
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
int type = ModContent.ProjectileType<SignusScythe>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, 0f, npc.target + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (npc.position.Y > player.position.Y - 200f) //200
|
||||
|
||||
if (npc.position.Y > player.position.Y - 200f)
|
||||
{
|
||||
if (npc.velocity.Y > 0f)
|
||||
{
|
||||
npc.velocity.Y *= 0.975f;
|
||||
}
|
||||
|
||||
npc.velocity.Y -= BossRushEvent.BossRushActive ? 0.15f : 0.1f;
|
||||
|
||||
if (npc.velocity.Y > 3f)
|
||||
{
|
||||
npc.velocity.Y = 3f;
|
||||
}
|
||||
}
|
||||
else if (npc.position.Y < player.position.Y - 400f) //500
|
||||
else if (npc.position.Y < player.position.Y - 400f)
|
||||
{
|
||||
if (npc.velocity.Y < 0f)
|
||||
{
|
||||
npc.velocity.Y *= 0.975f;
|
||||
}
|
||||
|
||||
npc.velocity.Y += BossRushEvent.BossRushActive ? 0.15f : 0.1f;
|
||||
|
||||
if (npc.velocity.Y < -3f)
|
||||
{
|
||||
npc.velocity.Y = -3f;
|
||||
}
|
||||
}
|
||||
if (npc.position.X + (npc.width / 2) > player.position.X + (player.width / 2) + 500f) //100
|
||||
|
||||
if (vectorCenter.X > player.Center.X + 500f)
|
||||
{
|
||||
if (npc.velocity.X > 0f)
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
}
|
||||
|
||||
npc.velocity.X -= BossRushEvent.BossRushActive ? 0.15f : 0.1f;
|
||||
|
||||
if (npc.velocity.X > 8f)
|
||||
{
|
||||
npc.velocity.X = 8f;
|
||||
}
|
||||
}
|
||||
if (npc.position.X + (npc.width / 2) < player.position.X + (player.width / 2) - 500f) //100
|
||||
|
||||
if (vectorCenter.X < player.Center.X - 500f)
|
||||
{
|
||||
if (npc.velocity.X < 0f)
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
}
|
||||
|
||||
npc.velocity.X += BossRushEvent.BossRushActive ? 0.15f : 0.1f;
|
||||
|
||||
if (npc.velocity.X < -8f)
|
||||
{
|
||||
npc.velocity.X = -8f;
|
||||
}
|
||||
}
|
||||
if (npc.ai[1] >= divisor * 5f)
|
||||
|
||||
if (npc.ai[1] >= divisor * 20f)
|
||||
{
|
||||
npc.ai[0] = 4f;
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[0] = -1f;
|
||||
npc.ai[1] = 3f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
npc.netUpdate = true;
|
||||
@@ -471,148 +491,144 @@ namespace CalamityMod.NPCs.Signus
|
||||
{
|
||||
int num660 = NPC.NewNPC((int)(player.position.X + spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType<CosmicLantern>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num660, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
int num661 = NPC.NewNPC((int)(player.position.X - spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType<CosmicLantern>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num661, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
|
||||
spawnY -= 60;
|
||||
}
|
||||
spawnY = 120;
|
||||
}
|
||||
}
|
||||
npc.TargetClosest(false);
|
||||
npc.rotation = npc.velocity.ToRotation();
|
||||
if (Math.Sign(npc.velocity.X) != 0)
|
||||
{
|
||||
npc.spriteDirection = -Math.Sign(npc.velocity.X);
|
||||
}
|
||||
if (npc.rotation < -1.57079637f)
|
||||
{
|
||||
npc.rotation += 3.14159274f;
|
||||
}
|
||||
if (npc.rotation > 1.57079637f)
|
||||
{
|
||||
npc.rotation -= 3.14159274f;
|
||||
}
|
||||
npc.spriteDirection = Math.Sign(npc.velocity.X);
|
||||
if (chargeSwitch == 0) //line up the charge
|
||||
{
|
||||
float scaleFactor6 = 14f;
|
||||
if (expertMode)
|
||||
scaleFactor6 += death ? 6f : 6f * (float)(1D - lifeRatio);
|
||||
|
||||
Vector2 center5 = player.Center;
|
||||
Vector2 vector126 = center5 - vectorCenter;
|
||||
npc.TargetClosest(false);
|
||||
|
||||
npc.rotation = npc.velocity.ToRotation();
|
||||
|
||||
if (Math.Sign(npc.velocity.X) != 0)
|
||||
npc.spriteDirection = -Math.Sign(npc.velocity.X);
|
||||
|
||||
if (npc.rotation < -MathHelper.PiOver2)
|
||||
npc.rotation += MathHelper.Pi;
|
||||
if (npc.rotation > MathHelper.PiOver2)
|
||||
npc.rotation -= MathHelper.Pi;
|
||||
|
||||
npc.spriteDirection = Math.Sign(npc.velocity.X);
|
||||
|
||||
if (npc.Calamity().newAI[0] == 0f) // Line up the charge
|
||||
{
|
||||
float velocity = revenge ? 16f : expertMode ? 15f : 14f;
|
||||
if (expertMode)
|
||||
velocity += death ? 4f : 4f * (float)(1D - lifeRatio);
|
||||
|
||||
Vector2 vector126 = player.Center - vectorCenter;
|
||||
Vector2 vector127 = vector126 - Vector2.UnitY * 300f;
|
||||
|
||||
float num1013 = vector126.Length();
|
||||
vector126 = Vector2.Normalize(vector126) * scaleFactor6;
|
||||
vector127 = Vector2.Normalize(vector127) * scaleFactor6;
|
||||
bool flag64 = Collision.CanHit(vectorCenter, 1, 1, player.Center, 1, 1);
|
||||
if (npc.ai[3] >= 120f)
|
||||
{
|
||||
flag64 = true;
|
||||
}
|
||||
|
||||
vector126 = Vector2.Normalize(vector126) * velocity;
|
||||
vector127 = Vector2.Normalize(vector127) * velocity;
|
||||
|
||||
bool flag64 = Collision.CanHit(vectorCenter, 1, 1, player.Center, 1, 1) || npc.ai[3] >= 120f;
|
||||
float num1014 = 8f;
|
||||
flag64 = flag64 && vector126.ToRotation() > 3.14159274f / num1014 && vector126.ToRotation() < 3.14159274f - 3.14159274f / num1014;
|
||||
flag64 = flag64 && vector126.ToRotation() > MathHelper.Pi / num1014 && vector126.ToRotation() < MathHelper.Pi - MathHelper.Pi / num1014;
|
||||
if (num1013 > 1400f || !flag64)
|
||||
{
|
||||
npc.velocity.X = (npc.velocity.X * (num1000 - 1f) + vector127.X) / num1000;
|
||||
npc.velocity.Y = (npc.velocity.Y * (num1000 - 1f) + vector127.Y) / num1000;
|
||||
npc.velocity = (npc.velocity * (inertia - 1f) + vector127) / inertia;
|
||||
|
||||
if (!flag64)
|
||||
{
|
||||
npc.ai[3] += 1f;
|
||||
if (npc.ai[3] == 120f)
|
||||
{
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.ai[3] = 0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chargeSwitch = 1;
|
||||
npc.Calamity().newAI[0] = 1f;
|
||||
npc.ai[2] = vector126.X;
|
||||
npc.ai[3] = vector126.Y;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else if (chargeSwitch == 1) //pause before charge
|
||||
else if (npc.Calamity().newAI[0] == 1f) // Pause before charge
|
||||
{
|
||||
npc.velocity *= 0.8f;
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
if (npc.ai[1] >= 5f)
|
||||
{
|
||||
chargeSwitch = 2;
|
||||
npc.ai[1] = 0f;
|
||||
npc.Calamity().newAI[0] = 2f;
|
||||
|
||||
npc.netUpdate = true;
|
||||
|
||||
Vector2 velocity = new Vector2(npc.ai[2], npc.ai[3]);
|
||||
velocity.Normalize();
|
||||
velocity *= 10f;
|
||||
velocity *= chargeVelocity;
|
||||
npc.velocity = velocity;
|
||||
}
|
||||
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
}
|
||||
}
|
||||
else if (chargeSwitch == 2) //charging
|
||||
else if (npc.Calamity().newAI[0] == 2f) // Charging
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
dustTimer--;
|
||||
if (phase2 && dustTimer <= 0)
|
||||
npc.ai[2] += 1f;
|
||||
if (phase2 && npc.ai[2] % 3f == 0f)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item73, npc.position);
|
||||
int damage = expertMode ? 60 : 70;
|
||||
int projectile = Projectile.NewProjectile((int)vectorCenter.X, (int)vectorCenter.Y, 0f, 0f, ModContent.ProjectileType<EssenceDust>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
dustTimer = 3;
|
||||
int type = ModContent.ProjectileType<EssenceDust>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int projectile = Projectile.NewProjectile(vectorCenter, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
bool flag65 = vectorCenter.Y + 50f > player.Center.Y;
|
||||
if ((npc.ai[1] >= 90f && flag65) || npc.velocity.Length() < 8f)
|
||||
{
|
||||
chargeSwitch = 3;
|
||||
npc.Calamity().newAI[0] = 3f;
|
||||
npc.ai[1] = 30f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
npc.velocity /= 2f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 center7 = player.Center;
|
||||
Vector2 vec2 = center7 - vectorCenter;
|
||||
Vector2 vec2 = player.Center - vectorCenter;
|
||||
vec2.Normalize();
|
||||
if (vec2.HasNaNs())
|
||||
{
|
||||
vec2 = new Vector2(npc.direction, 0f);
|
||||
}
|
||||
npc.velocity = (npc.velocity * (num1000 - 1f) + vec2 * (npc.velocity.Length() + num1006)) / num1000;
|
||||
|
||||
npc.velocity = (npc.velocity * (inertia - 1f) + vec2 * (npc.velocity.Length() + 0.111111117f * inertia)) / inertia;
|
||||
}
|
||||
}
|
||||
else if (chargeSwitch == 3) //slow down after charging and reset
|
||||
else if (npc.Calamity().newAI[0] == 3f) // Slow down after charging and reset
|
||||
{
|
||||
npc.ai[1] -= 1f;
|
||||
if (npc.ai[1] <= 0f)
|
||||
{
|
||||
phaseSwitch += 1;
|
||||
if (phaseSwitch >= 3)
|
||||
npc.Calamity().newAI[1] += 1f;
|
||||
if (npc.Calamity().newAI[1] >= maxCharges)
|
||||
{
|
||||
npc.ai[0] = 0f;
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[0] = -1f;
|
||||
npc.ai[1] = 4f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
chargeSwitch = 0;
|
||||
phaseSwitch = 0;
|
||||
npc.Calamity().newAI[0] = 0f;
|
||||
npc.Calamity().newAI[1] = 0f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chargeSwitch = 0;
|
||||
npc.Calamity().newAI[0] = 0f;
|
||||
npc.ai[1] = 0f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ namespace CalamityMod.NPCs.Signus
|
||||
npc.Calamity().newAI[0] += 1f;
|
||||
npc.velocity *= 0.98f;
|
||||
npc.dontTakeDamage = false;
|
||||
npc.scale = MathHelper.Lerp(1f, 3f, npc.Calamity().newAI[0] / 85f);
|
||||
npc.scale = MathHelper.Lerp(1f, 3f, npc.Calamity().newAI[0] / 45f);
|
||||
|
||||
if (npc.Calamity().newAI[0] >= 85f)
|
||||
if (npc.Calamity().newAI[0] >= 45f)
|
||||
{
|
||||
CheckDead();
|
||||
npc.life = 0;
|
||||
@@ -147,6 +147,9 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
if (npc.Calamity().newAI[0] >= 45f)
|
||||
return false;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (npc.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
@@ -156,8 +156,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 24;
|
||||
int num185 = ModContent.ProjectileType<AbyssMine>();
|
||||
int type = ModContent.ProjectileType<AbyssMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 3; num186++)
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-60, 61);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -185,8 +185,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 17 : 21;
|
||||
int num185 = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
int type = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 4; num186++)
|
||||
@@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-60, 61);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,17 +388,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 24;
|
||||
int num185 = Main.rand.Next(2);
|
||||
if (num185 == 0)
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssMine>();
|
||||
}
|
||||
else
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssMine2>();
|
||||
num184 = 22;
|
||||
}
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AbyssMine>() : ModContent.ProjectileType<AbyssMine2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + player.width * 0.5f - value9.X;
|
||||
@@ -407,7 +398,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -423,17 +414,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 17 : 21;
|
||||
int num185 = Main.rand.Next(2);
|
||||
if (num185 == 0)
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
}
|
||||
else
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
num184 = expertMode ? 16 : 19;
|
||||
}
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AbyssBallVolley>() : ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + player.width * 0.5f - value9.X;
|
||||
@@ -442,7 +424,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -470,17 +452,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 24;
|
||||
int num185 = Main.rand.Next(2);
|
||||
if (num185 == 0)
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssMine>();
|
||||
}
|
||||
else
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssMine2>();
|
||||
num184 = 22;
|
||||
}
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AbyssMine>() : ModContent.ProjectileType<AbyssMine2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + player.width * 0.5f - value9.X;
|
||||
@@ -489,7 +462,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -505,17 +478,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 17 : 21;
|
||||
int num185 = Main.rand.Next(2);
|
||||
if (num185 == 0)
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
}
|
||||
else
|
||||
{
|
||||
num185 = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
num184 = expertMode ? 16 : 19;
|
||||
}
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AbyssBallVolley>() : ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 2; num186++)
|
||||
@@ -528,7 +492,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += Main.rand.Next(-30, 31);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,8 +167,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 22;
|
||||
int num185 = ModContent.ProjectileType<AbyssMine2>();
|
||||
int type = ModContent.ProjectileType<AbyssMine2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 2; num186++)
|
||||
@@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-60, 61);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -198,8 +198,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 16 : 19;
|
||||
int num185 = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int type = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 2; num186++)
|
||||
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-30, 31);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 22;
|
||||
int num185 = ModContent.ProjectileType<AbyssMine2>();
|
||||
int type = ModContent.ProjectileType<AbyssMine2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
@@ -166,7 +166,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-30, 31);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -182,8 +182,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 16 : 19;
|
||||
int num185 = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int type = ModContent.ProjectileType<AbyssBallVolley2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
@@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-20, 21);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,8 +146,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = 24;
|
||||
int num185 = ModContent.ProjectileType<AbyssMine>();
|
||||
int type = ModContent.ProjectileType<AbyssMine>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
@@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-30, 31);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -172,8 +172,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num183 = num179 / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
int num184 = expertMode ? 17 : 21;
|
||||
int num185 = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
int type = ModContent.ProjectileType<AbyssBallVolley>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
value9.X += num180;
|
||||
value9.Y += num182;
|
||||
for (int num186 = 0; num186 < 2; num186++)
|
||||
@@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num182 += (float)Main.rand.Next(-20, 21);
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180, num182, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
public override void AI()
|
||||
{
|
||||
if (spikeTimer > 0f)
|
||||
{
|
||||
spikeTimer -= 1f;
|
||||
}
|
||||
if (!npc.wet)
|
||||
|
||||
int type = ModContent.ProjectileType<CrimsonSpike>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (!npc.wet)
|
||||
{
|
||||
Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
float num14 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector3.X;
|
||||
@@ -70,7 +71,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
vector4.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
|
||||
vector4.Normalize();
|
||||
vector4 *= 4f + (float)Main.rand.Next(-50, 51) * 0.01f;
|
||||
Projectile.NewProjectile(vector3.X, vector3.Y, vector4.X, vector4.Y, ModContent.ProjectileType<CrimsonSpike>(), 12, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector3.X, vector3.Y, vector4.X, vector4.Y, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
spikeTimer = 30f;
|
||||
}
|
||||
}
|
||||
@@ -90,7 +91,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
num14 *= num16;
|
||||
num15 *= num16;
|
||||
spikeTimer = 50f;
|
||||
Projectile.NewProjectile(vector3.X, vector3.Y, num14, num15, ModContent.ProjectileType<CrimsonSpike>(), 12, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector3.X, vector3.Y, num14, num15, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,10 +133,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.localAI[0] = 0f;
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height))
|
||||
{
|
||||
int num8 = Main.expertMode ? 50 : 60;
|
||||
int num9 = ProjectileID.PinkLaser;
|
||||
int beam = Projectile.NewProjectile(vector.X, vector.Y, num4, num5, num9, num8, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[beam].timeLeft = 200;
|
||||
int type = ProjectileID.PinkLaser;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector.X, vector.Y, num4, num5, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
int num10 = (int)npc.position.X + npc.width / 2;
|
||||
|
||||
@@ -133,10 +133,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.localAI[0] = 0f;
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height))
|
||||
{
|
||||
int num8 = Main.expertMode ? 50 : 60;
|
||||
int num9 = ProjectileID.PinkLaser;
|
||||
int beam = Projectile.NewProjectile(vector.X, vector.Y, num4, num5, num9, num8, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[beam].timeLeft = 200;
|
||||
int type = ProjectileID.PinkLaser;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector.X, vector.Y, num4, num5, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
int num10 = (int)npc.position.X + npc.width / 2;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
CalamityUtils.StartRain();
|
||||
}
|
||||
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);
|
||||
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f);
|
||||
if (npc.ai[3] > 0f)
|
||||
{
|
||||
npc.realLife = (int)npc.ai[3];
|
||||
@@ -137,16 +137,15 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType<StormWeaverTail>(), npc.whoAmI);
|
||||
}
|
||||
Main.npc[lol].realLife = npc.whoAmI;
|
||||
Main.npc[lol].ai[2] = (float)npc.whoAmI;
|
||||
Main.npc[lol].ai[1] = (float)Previous;
|
||||
Main.npc[Previous].ai[0] = (float)lol;
|
||||
Main.npc[lol].ai[2] = npc.whoAmI;
|
||||
Main.npc[lol].ai[1] = Previous;
|
||||
Main.npc[Previous].ai[0] = lol;
|
||||
npc.netUpdate = true;
|
||||
Previous = lol;
|
||||
}
|
||||
tail = true;
|
||||
}
|
||||
|
||||
int damage = expertMode ? 62 : 75;
|
||||
if (expertMode)
|
||||
{
|
||||
npc.localAI[0] += 1f;
|
||||
@@ -157,7 +156,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.netUpdate = true;
|
||||
float xPos = Main.rand.NextBool(2) ? Main.player[npc.target].position.X + 500f : Main.player[npc.target].position.X - 500f;
|
||||
Vector2 spawnPos = new Vector2(xPos, Main.player[npc.target].position.Y + Main.rand.Next(-500, 501));
|
||||
Projectile.NewProjectile(spawnPos, Vector2.Zero, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.CultistBossLightningOrb;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(spawnPos, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +176,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
speed2 += 1;
|
||||
}
|
||||
float spawnX2 = (float)Main.rand.Next(2001) - 1000f + Main.player[npc.target].Center.X;
|
||||
float spawnX2 = Main.rand.Next(2001) - 1000f + Main.player[npc.target].Center.X;
|
||||
float spawnY2 = -1000f + Main.player[npc.target].Center.Y;
|
||||
Vector2 baseSpawn = new Vector2(spawnX2, spawnY2);
|
||||
Vector2 baseVelocity = Main.player[npc.target].Center - baseSpawn;
|
||||
@@ -186,11 +187,13 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
Vector2 source = baseSpawn;
|
||||
source.X += i * 30 - (BoltProjectiles * 15);
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-BoltAngleSpread / 2 + (BoltAngleSpread * i / (float)BoltProjectiles)));
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-BoltAngleSpread / 2 + (BoltAngleSpread * i / BoltProjectiles)));
|
||||
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
|
||||
Vector2 vector94 = Main.player[npc.target].Center - source;
|
||||
float ai = (float)Main.rand.Next(100);
|
||||
Projectile.NewProjectile(source, velocity, ProjectileID.CultistBossLightningOrbArc, damage, 0f, Main.myPlayer, vector94.ToRotation(), ai);
|
||||
float ai = Main.rand.Next(100);
|
||||
int type = ProjectileID.CultistBossLightningOrbArc;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(source, velocity, type, damage, 0f, Main.myPlayer, vector94.ToRotation(), ai);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
double lifeRatio = npc.life / (double)npc.lifeMax;
|
||||
int lifePercentage = (int)(100.0 * lifeRatio);
|
||||
int projectileDamage = expertMode ? 62 : 75;
|
||||
|
||||
int BoltProjectiles = 2;
|
||||
if (lifePercentage < 33 || death)
|
||||
@@ -191,7 +190,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.netUpdate = true;
|
||||
float xPos = Main.rand.NextBool(2) ? Main.player[npc.target].position.X + 500f : Main.player[npc.target].position.X - 500f;
|
||||
Vector2 spawnPos = new Vector2(xPos, Main.player[npc.target].position.Y + Main.rand.Next(-500, 501));
|
||||
Projectile.NewProjectile(spawnPos, Vector2.Zero, ProjectileID.CultistBossLightningOrb, projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.CultistBossLightningOrb;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(spawnPos, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -367,7 +368,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
|
||||
Vector2 vector94 = Main.player[npc.target].Center - source;
|
||||
float ai = Main.rand.Next(100);
|
||||
Projectile.NewProjectile(source, velocity, ProjectileID.CultistBossLightningOrbArc, projectileDamage, 0f, Main.myPlayer, vector94.ToRotation(), ai);
|
||||
int type = ProjectileID.CultistBossLightningOrbArc;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(source, velocity, type, damage, 0f, Main.myPlayer, vector94.ToRotation(), ai);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,14 +119,15 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (npc.localAI[0] >= 900f)
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
int damage = Main.expertMode ? 150 : 200;
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int totalProjectiles = 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f));
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<BrimstoneBarrage>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = expertMode ? 150 : 200; //600 500
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, direction.X, direction.Y, ModContent.ProjectileType<BrimstoneBarrage>(), damage, 1f, npc.target);
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, direction.X, direction.Y, type, damage, 1f, npc.target);
|
||||
}
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
@@ -202,6 +202,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
#region StartUp
|
||||
CalamityGlobalNPC.SCal = npc.whoAmI;
|
||||
|
||||
lootTimer++;
|
||||
|
||||
bool wormAlive = false;
|
||||
@@ -209,11 +210,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
wormAlive = Main.npc[CalamityGlobalNPC.SCalWorm].active;
|
||||
}
|
||||
|
||||
bool cataclysmAlive = false;
|
||||
if (CalamityGlobalNPC.SCalCataclysm != -1)
|
||||
{
|
||||
cataclysmAlive = Main.npc[CalamityGlobalNPC.SCalCataclysm].active;
|
||||
}
|
||||
|
||||
bool catastropheAlive = false;
|
||||
if (CalamityGlobalNPC.SCalCatastrophe != -1)
|
||||
{
|
||||
@@ -225,12 +228,24 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Main.StopSlimeRain(true);
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
|
||||
CalamityMod.StopRain();
|
||||
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool enraged = npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive);
|
||||
|
||||
// Projectile damage values
|
||||
int bulletHellblastDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast2>());
|
||||
int firstBulletHellblastDamage = (int)Math.Round(bulletHellblastDamage * 1.25);
|
||||
int barrageDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneBarrage>());
|
||||
int gigablastDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneGigaBlast>());
|
||||
int fireblastDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneFireblast>());
|
||||
int monsterDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneMonster>());
|
||||
int waveDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneWave>());
|
||||
int hellblastDamage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast>());
|
||||
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
|
||||
// Get a target
|
||||
@@ -267,6 +282,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.LocalPlayer.Calamity().sCalDeathCount < 51)
|
||||
{
|
||||
if (Main.LocalPlayer.Calamity().sCalDeathCount == 50)
|
||||
@@ -451,21 +467,20 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (bulletHellCounter > (enraged ? 4 : 6))
|
||||
{
|
||||
bulletHellCounter = 0;
|
||||
int damage = expertMode ? 200 : 250; //800 500
|
||||
if (bulletHellCounter2 < 300) //blasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 600) //blasts from left and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else //blasts from above, left, and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -524,27 +539,20 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = expertMode ? 150 : 200; //600 400
|
||||
if (bulletHellCounter2 < 1200)
|
||||
{
|
||||
if (bulletHellCounter2 % 180 == 0) //blasts from top
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 1500 && bulletHellCounter2 > 1200)
|
||||
{
|
||||
if (bulletHellCounter2 % 180 == 0) //blasts from right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 > 1500)
|
||||
{
|
||||
if (bulletHellCounter2 % 180 == 0) //blasts from top
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
bulletHellCounter += 1;
|
||||
if (bulletHellCounter > (enraged ? 7 : 9))
|
||||
@@ -552,16 +560,16 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
bulletHellCounter = 0;
|
||||
if (bulletHellCounter2 < 1200) //blasts from below
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 1500) //blasts from left
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else //blasts from left and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -601,31 +609,28 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = expertMode ? 150 : 200;
|
||||
if (bulletHellCounter2 % 180 == 0) //blasts from top
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (bulletHellCounter2 % 240 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
bulletHellCounter += 1;
|
||||
if (bulletHellCounter > (enraged ? 9 : 11))
|
||||
{
|
||||
bulletHellCounter = 0;
|
||||
if (bulletHellCounter2 < 2100) //blasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 2400) //blasts from right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else //blasts from left and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -670,37 +675,35 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient) //more clustered attack
|
||||
{
|
||||
int damage = expertMode ? 150 : 200;
|
||||
if (bulletHellCounter2 % 180 == 0) //blasts from top
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (bulletHellCounter2 % 240 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
int divisor = revenge ? 225 : expertMode ? 450 : 675;
|
||||
if (bulletHellCounter2 % divisor == 0 && expertMode) //giant homing fireballs
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 1f * uDieLul, ModContent.ProjectileType<BrimstoneMonster>(), damage, 0f, Main.myPlayer, 0f, passedVar);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 1f * uDieLul, ModContent.ProjectileType<BrimstoneMonster>(), monsterDamage, 0f, Main.myPlayer, 0f, passedVar);
|
||||
passedVar += 1f;
|
||||
}
|
||||
|
||||
bulletHellCounter += 1;
|
||||
if (bulletHellCounter > (enraged ? 10 : 12))
|
||||
{
|
||||
bulletHellCounter = 0;
|
||||
if (bulletHellCounter2 < 3000) //blasts from below
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y + 1000f, 0f, -4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 3300) //blasts from left
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else //blasts from left and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -745,39 +748,37 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int damage = expertMode ? 150 : 200;
|
||||
if (bulletHellCounter2 % 240 == 0) //blasts from top
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, ModContent.ProjectileType<BrimstoneGigaBlast>(), gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (bulletHellCounter2 % 360 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern
|
||||
{
|
||||
int random = Main.rand.Next(-1000, 1001);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, 5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), waveDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, 5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), waveDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
bulletHellCounter += 1;
|
||||
if (bulletHellCounter > (enraged ? 12 : 14))
|
||||
{
|
||||
bulletHellCounter = 0;
|
||||
if (bulletHellCounter2 < 3900) //blasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (bulletHellCounter2 < 4200) //blasts from left and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else //blasts from above, left, and right
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1320,9 +1321,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (npc.localAI[1] > 90f)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num828 = 10f * uDieLul;
|
||||
int num829 = expertMode ? 150 : 200; //600 400
|
||||
|
||||
float num828 = 10f * uDieLul;
|
||||
Vector2 value9 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num180 = player.position.X + player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -1346,7 +1346,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num826 *= num827;
|
||||
vector82.X += num825 * 8f;
|
||||
vector82.Y += num826 * 8f;
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (randomShot == 1 && canFireSplitingFireball)
|
||||
{
|
||||
@@ -1358,7 +1358,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num826 *= num827;
|
||||
vector82.X += num825 * 8f;
|
||||
vector82.Y += num826 * 8f;
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1373,7 +1373,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num183 = (8f + speedBoost) / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180 + speedBoost, num182 + speedBoost, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180 + speedBoost, num182 + speedBoost, randomShot, barrageDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1515,7 +1515,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float num418 = 10f * uDieLul;
|
||||
int num419 = expertMode ? 150 : 200; //600 500
|
||||
int num420 = ModContent.ProjectileType<BrimstoneHellblast>();
|
||||
num417 = (float)Math.Sqrt(num415 * num415 + num416 * num416);
|
||||
num417 = num418 / num417;
|
||||
@@ -1523,7 +1522,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num416 *= num417;
|
||||
vector40.X += num415 * 4f;
|
||||
vector40.Y += num416 * 4f;
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, num420, num419, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, num420, hellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1593,7 +1592,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num837 = 5f * uDieLul;
|
||||
int num838 = expertMode ? 150 : 200; //600 500
|
||||
int num839 = ModContent.ProjectileType<BrimstoneFireblast>();
|
||||
num836 = (float)Math.Sqrt(num834 * num834 + num835 * num835);
|
||||
num836 = num837 / num836;
|
||||
@@ -1601,7 +1599,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num835 *= num836;
|
||||
vector83.X += num834 * 8f;
|
||||
vector83.Y += num835 * 8f;
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1865,9 +1863,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (npc.localAI[1] > 60f)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num828 = 10f * uDieLul;
|
||||
int num829 = expertMode ? 150 : 200; //600 500
|
||||
|
||||
float num828 = 10f * uDieLul;
|
||||
Vector2 value9 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num180 = player.position.X + player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -1891,7 +1888,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num826 *= num827;
|
||||
vector82.X += num825 * 8f;
|
||||
vector82.Y += num826 * 8f;
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else if (randomShot == 1 && canFireSplitingFireball)
|
||||
{
|
||||
@@ -1903,7 +1900,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num826 *= num827;
|
||||
vector82.X += num825 * 8f;
|
||||
vector82.Y += num826 * 8f;
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, randomShot, gigablastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1918,7 +1915,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num183 = (8f + speedBoost) / num183;
|
||||
num180 *= num183;
|
||||
num182 *= num183;
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180 + speedBoost, num182 + speedBoost, randomShot, num829, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(value9.X, value9.Y, num180 + speedBoost, num182 + speedBoost, randomShot, barrageDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2056,7 +2053,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float num418 = 10f * uDieLul;
|
||||
int num419 = expertMode ? 150 : 200; //600 500
|
||||
int num420 = ModContent.ProjectileType<BrimstoneHellblast>();
|
||||
num417 = (float)Math.Sqrt(num415 * num415 + num416 * num416);
|
||||
num417 = num418 / num417;
|
||||
@@ -2064,7 +2060,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num416 *= num417;
|
||||
vector40.X += num415 * 4f;
|
||||
vector40.Y += num416 * 4f;
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, num420, num419, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(vector40.X, vector40.Y, num415, num416, num420, hellblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2134,7 +2130,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
float num837 = 5f * uDieLul;
|
||||
int num838 = expertMode ? 150 : 200; //600 500
|
||||
int num839 = ModContent.ProjectileType<BrimstoneFireblast>();
|
||||
num836 = (float)Math.Sqrt(num834 * num834 + num835 * num835);
|
||||
num836 = num837 / num836;
|
||||
@@ -2142,7 +2137,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
num835 *= num836;
|
||||
vector83.X += num834 * 8f;
|
||||
vector83.Y += num835 * 8f;
|
||||
int shot = Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838, 0f, Main.myPlayer, 0f, 0f);
|
||||
int shot = Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, fireblastDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,11 +157,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.ai[1] = 0f;
|
||||
Vector2 vector85 = new Vector2(npc.Center.X, npc.Center.Y);
|
||||
float num689 = -8f;
|
||||
int num690 = expertMode ? 150 : 200; //600 500
|
||||
int num691 = ModContent.ProjectileType<BrimstoneWave>();
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int num695 = Projectile.NewProjectile(vector85.X, vector85.Y, num689, 0f, num691, num690, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<BrimstoneWave>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector85.X, vector85.Y, num689, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
npc.ai[2] += 1f;
|
||||
@@ -173,20 +173,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
npc.ai[2] = 0f;
|
||||
float num689 = 7f;
|
||||
int num690 = expertMode ? 150 : 200; //600 500
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
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;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * num689), (float)(Math.Cos(offsetAngle) * num689), ModContent.ProjectileType<BrimstoneBarrage>(), num690, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(-Math.Sin(offsetAngle) * num689), (float)(-Math.Cos(offsetAngle) * num689), ModContent.ProjectileType<BrimstoneBarrage>(), num690, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * num689), (float)(Math.Cos(offsetAngle) * num689), type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(-Math.Sin(offsetAngle) * num689), (float)(-Math.Cos(offsetAngle) * num689), type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
}
|
||||
}
|
||||
for (int dust = 0; dust <= 5; dust++)
|
||||
|
||||
@@ -157,11 +157,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.ai[1] = 0f;
|
||||
Vector2 vector85 = new Vector2(npc.Center.X, npc.Center.Y);
|
||||
float num689 = 4f;
|
||||
int num690 = expertMode ? 150 : 200; //600 500
|
||||
int num691 = ModContent.ProjectileType<BrimstoneHellblast2>();
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
int type = ModContent.ProjectileType<BrimstoneHellblast2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int num695 = Projectile.NewProjectile(vector85.X, vector85.Y, num689, 0f, num691, num690, 0f, Main.myPlayer, 0f, 0f);
|
||||
int num695 = Projectile.NewProjectile(vector85.X, vector85.Y, num689, 0f, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
npc.ai[2] += 1f;
|
||||
@@ -173,20 +173,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
npc.ai[2] = 0f;
|
||||
float num689 = 7f;
|
||||
int num690 = expertMode ? 150 : 200; //600 500
|
||||
Main.PlaySound(SoundID.Item20, npc.position);
|
||||
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;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * num689), (float)(Math.Cos(offsetAngle) * num689), ModContent.ProjectileType<BrimstoneBarrage>(), num690, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(-Math.Sin(offsetAngle) * num689), (float)(-Math.Cos(offsetAngle) * num689), ModContent.ProjectileType<BrimstoneBarrage>(), num690, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * num689), (float)(Math.Cos(offsetAngle) * num689), type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(-Math.Sin(offsetAngle) * num689), (float)(-Math.Cos(offsetAngle) * num689), type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
}
|
||||
}
|
||||
for (int dust = 0; dust <= 5; dust++)
|
||||
|
||||
@@ -164,9 +164,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
npc.localAI[0] = 0f;
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height))
|
||||
{
|
||||
int num8 = Main.expertMode ? 75 : 90;
|
||||
int num9 = ProjectileID.CultistBossFireBall;
|
||||
Projectile.NewProjectile(vector.X, vector.Y, num4, num5, num9, num8, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.CultistBossFireBall;
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector.X, vector.Y, num4, num5, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
int num10 = (int)npc.position.X + npc.width / 2;
|
||||
|
||||
+24
-14
@@ -351,7 +351,6 @@ namespace CalamityMod.NPCs.Yharon
|
||||
float teleportPhaseTimer = 30f;
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
int spawnPhaseTimer = 75;
|
||||
int projectileDamage = expertMode ? 75 : 90;
|
||||
|
||||
// Target
|
||||
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
@@ -700,7 +699,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SpawnDetonatingFlares(fromMouth, player, maxFlareCount, new int[] { ModContent.NPCType<DetonatingFlare>() });
|
||||
Projectile.NewProjectile(fromMouth, Vector2.Zero, ModContent.ProjectileType<FlareBomb>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareBomb>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -999,7 +1000,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
{
|
||||
SpawnDetonatingFlares(flareDustBulletHellSpawn, player, maxFlareCount, new int[] { ModContent.NPCType<DetonatingFlare2>() });
|
||||
int totalProjectiles = 38 - (int)(npc.ai[2] / 15f); // 36 for first ring, 18 for last ring
|
||||
DoFlareDustBulletHell(0, flareDustSpawnDivisor, projectileDamage, totalProjectiles, 0f, 0f, false);
|
||||
DoFlareDustBulletHell(0, flareDustSpawnDivisor, npc.GetProjectileDamage(ModContent.ProjectileType<FlareDust>()), totalProjectiles, 0f, 0f, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1089,7 +1090,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
Vector2 projectileVelocity = player.Center - fromMouth;
|
||||
projectileVelocity.Normalize();
|
||||
projectileVelocity *= 0.1f;
|
||||
Projectile.NewProjectile(fromMouth, projectileVelocity, ModContent.ProjectileType<FlareDust2>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareDust2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1332,7 +1335,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
// Rotate spiral by 7.2 * (300 / 12) = +90 degrees and then back -90 degrees
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
DoFlareDustBulletHell(1, flareDustPhaseTimer, projectileDamage, 8, 12f, 3.6f, false);
|
||||
DoFlareDustBulletHell(1, flareDustPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType<FlareDust>()), 8, 12f, 3.6f, false);
|
||||
}
|
||||
|
||||
npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction);
|
||||
@@ -1424,7 +1427,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
Vector2 projectileVelocity = player.Center - fromMouth;
|
||||
projectileVelocity.Normalize();
|
||||
projectileVelocity *= 0.1f;
|
||||
Projectile.NewProjectile(fromMouth, projectileVelocity, ModContent.ProjectileType<FlareDust2>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareDust2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1459,7 +1464,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SpawnDetonatingFlares(fromMouth, player, maxFlareCount, new int[] { ModContent.NPCType<DetonatingFlare>(), ModContent.NPCType<DetonatingFlare2>() });
|
||||
Projectile.NewProjectile(fromMouth, Vector2.Zero, ModContent.ProjectileType<FlareBomb>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareBomb>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1620,7 +1627,6 @@ namespace CalamityMod.NPCs.Yharon
|
||||
if (bulletHell)
|
||||
npc.damage = 0;
|
||||
|
||||
int projectileDamage = expertMode ? 110 : 125;
|
||||
float phaseSwitchTimer = expertMode ? 30f : 32f;
|
||||
float acceleration = expertMode ? 0.92f : 0.9f;
|
||||
float velocity = expertMode ? 14.5f : 14f;
|
||||
@@ -2051,7 +2057,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
Vector2 projectileVelocity = targetData.Center - position;
|
||||
projectileVelocity.Normalize();
|
||||
projectileVelocity *= 0.1f;
|
||||
Projectile.NewProjectile(position, projectileVelocity, ModContent.ProjectileType<FlareDust2>(), projectileDamage, 0f, Main.myPlayer, 1f, 0f);
|
||||
int type = ModContent.ProjectileType<FlareDust2>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(position, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
}
|
||||
|
||||
if (Math.Abs(targetData.Center.X - npc.Center.X) > 700f && Math.Abs(npc.velocity.X) < chargeSpeed)
|
||||
@@ -2108,8 +2116,10 @@ namespace CalamityMod.NPCs.Yharon
|
||||
Vector2 position = npc.Center + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation);
|
||||
int num34 = (int)(npc.ai[1] - splittingFireballBreathTimer + 1f);
|
||||
|
||||
if (num34 <= splittingFireballBreathTimer2 && num34 % splittingFireballBreathDivisor == 0 && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectile(position, npc.velocity, ModContent.ProjectileType<YharonFireball>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ModContent.ProjectileType<YharonFireball>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (num34 <= splittingFireballBreathTimer2 && num34 % splittingFireballBreathDivisor == 0 && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectile(position, npc.velocity, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
if (npc.ai[1] > splittingFireballBreathPhaseTimer - splittingFireballBreathYVelocityTimer)
|
||||
@@ -2150,7 +2160,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
int totalProjectiles = secondPhasePhase == 4 ? 12 : 10;
|
||||
float projectileVelocity = secondPhasePhase == 4 ? 16f : 12f;
|
||||
float radialOffset = secondPhasePhase == 4 ? 2.8f : 3.2f;
|
||||
DoFlareDustBulletHell(1, (int)spinPhaseTimer, projectileDamage, totalProjectiles, projectileVelocity, radialOffset, true);
|
||||
DoFlareDustBulletHell(1, (int)spinPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType<FlareDust>()), totalProjectiles, projectileVelocity, radialOffset, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2158,7 +2168,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
if (npc.ai[1] % flareDustSpawnDivisor == 0f)
|
||||
{
|
||||
int totalProjectiles = (secondPhasePhase == 2 ? 42 : 38) - (int)(npc.ai[1] / 12f); // 36 for first ring, 18 for last ring
|
||||
DoFlareDustBulletHell(0, (int)spinPhaseTimer, projectileDamage, totalProjectiles, 0f, 0f, true);
|
||||
DoFlareDustBulletHell(0, (int)spinPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType<FlareDust>()), totalProjectiles, 0f, 0f, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2220,7 +2230,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y);
|
||||
|
||||
if (expertMode)
|
||||
DoFireRing(300, projectileDamage, 1f);
|
||||
DoFireRing(300, npc.GetProjectileDamage(ModContent.ProjectileType<FlareBomb>()), 1f);
|
||||
|
||||
Vector2 vector7 = npc.Center + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 100f * (0.6f + Main.rand.NextFloat() * 0.4f);
|
||||
|
||||
|
||||
@@ -117,7 +117,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
float x = num232 * 16;
|
||||
float y = num231 * 16 + 900;
|
||||
Vector2 laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
int damage = Main.expertMode ? 75 : 100;
|
||||
int type = ModContent.ProjectileType<BirbAura>();
|
||||
int damage = projectile.GetProjectileDamage(type);
|
||||
if (projectile.ai[0] >= 2f)
|
||||
{
|
||||
x += 1000f;
|
||||
@@ -127,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num237 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
int num237 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num237].timeLeft = 900;
|
||||
Main.projectile[num237].netUpdate = true;
|
||||
|
||||
@@ -138,14 +139,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num238 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
int num238 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num238].timeLeft = 900;
|
||||
Main.projectile[num238].netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
laserVelocity.Normalize();
|
||||
int num236 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
int num236 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -29,6 +30,16 @@ namespace CalamityMod.Projectiles.Boss
|
||||
cooldownSlot = 1;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.localAI[0]);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.localAI[0] = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.velocity.Length() < (projectile.ai[1] == 0f ? 14f : 10f))
|
||||
@@ -48,6 +59,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.timeLeft < 60)
|
||||
projectile.Opacity = MathHelper.Clamp(projectile.timeLeft / 60f, 0f, 1f);
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
projectile.damage = projectile.GetProjectileDamage(ModContent.NPCType<SupremeCalamitas>());
|
||||
}
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0.75f, 0f, 0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,45 +29,41 @@ namespace CalamityMod.Projectiles.Boss
|
||||
cooldownSlot = 1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 4)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame > 5)
|
||||
projectile.frame = 0;
|
||||
public override void AI()
|
||||
{
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 4)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame > 5)
|
||||
projectile.frame = 0;
|
||||
|
||||
if (projectile.ai[1] == 1f)
|
||||
projectile.Opacity = MathHelper.Clamp(projectile.timeLeft / 60f, 0f, 1f);
|
||||
else
|
||||
projectile.Opacity = MathHelper.Clamp(1f - ((projectile.timeLeft - 60) / 60f), 0f, 1f);
|
||||
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, 0f, 0f);
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, 0f, 0f);
|
||||
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 20);
|
||||
}
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 20);
|
||||
}
|
||||
|
||||
int target = Player.FindClosest(projectile.Center, 1, 1);
|
||||
projectile.ai[0] += 1f;
|
||||
if (projectile.ai[0] > 20f)
|
||||
{
|
||||
float projSpeed = projectile.velocity.Length();
|
||||
Vector2 playerVec = Main.player[target].Center - projectile.Center;
|
||||
playerVec.Normalize();
|
||||
playerVec *= projSpeed;
|
||||
projectile.velocity = (projectile.velocity * 24f + playerVec) / 25f;
|
||||
projectile.velocity.Normalize();
|
||||
projectile.velocity *= projSpeed;
|
||||
}
|
||||
}
|
||||
int target = Player.FindClosest(projectile.Center, 1, 1);
|
||||
float projSpeed = projectile.velocity.Length();
|
||||
Vector2 playerVec = Main.player[target].Center - projectile.Center;
|
||||
playerVec.Normalize();
|
||||
playerVec *= projSpeed;
|
||||
projectile.velocity = (projectile.velocity * 24f + playerVec) / 25f;
|
||||
projectile.velocity.Normalize();
|
||||
projectile.velocity *= projSpeed;
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 20);
|
||||
}
|
||||
|
||||
float turnSpeed = revenge ? 100f : 80f; //100
|
||||
float homeSpeed = revenge ? 20f : 15f; //5
|
||||
float inertia = revenge ? 80f : 100f;
|
||||
float homeSpeed = revenge ? 20f : 15f;
|
||||
float minDist = 40f;
|
||||
int target = (int)projectile.ai[0];
|
||||
if (target >= 0 && Main.player[target].active && !Main.player[target].dead)
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (targetVec.HasNaNs())
|
||||
targetVec = Vector2.UnitY;
|
||||
|
||||
projectile.velocity = (projectile.velocity * (turnSpeed - 1f) + targetVec * homeSpeed) / turnSpeed;
|
||||
projectile.velocity = (projectile.velocity * (inertia - 1f) + targetVec * homeSpeed) / inertia;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -95,13 +95,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Lighting.AddLight(projectile.Center, 3f, 0f, 0f);
|
||||
|
||||
float inertia = (revenge ? 5f : 4.5f) + speedAdd; //100
|
||||
float speed = (revenge ? 1.5f : 1.35f) + (speedAdd * 0.25f); //5
|
||||
float inertia = (revenge ? 4.5f : 5f) + speedAdd;
|
||||
float speed = (revenge ? 1.5f : 1.35f) + (speedAdd * 0.25f);
|
||||
float minDist = 160f;
|
||||
|
||||
if (NPC.AnyNPCs(ModContent.NPCType<SoulSeekerSupreme>()))
|
||||
{
|
||||
inertia *= 0.5f;
|
||||
inertia *= 1.5f;
|
||||
speed *= 0.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -51,9 +52,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.velocity.Normalize();
|
||||
projectile.velocity *= scaleFactor2;
|
||||
}
|
||||
int projectileDamage = Main.expertMode ? 64 : 75;
|
||||
if (projectile.timeLeft == 950)
|
||||
projectile.damage = projectileDamage;
|
||||
projectile.damage = (int)projectile.ai[0];
|
||||
if (projectile.timeLeft < 85)
|
||||
projectile.damage = 0;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
float speed = 3f;
|
||||
int seeProjFileforDmg = 0;
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
speed = 5f;
|
||||
@@ -78,7 +77,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 vector255 = new Vector2(0f, -speed).RotatedBy(radians * i);
|
||||
Projectile.NewProjectile(projectile.Center, vector255, ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, 0f, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center, vector255, ModContent.ProjectileType<DoGBeam>(), 0, 0f, projectile.owner, projectile.damage, 0f);
|
||||
}
|
||||
}
|
||||
beamTimer = 180;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.ai[0] == 0f || (projectile.timeLeft > 135 && projectile.ai[1] == 1f))
|
||||
return;
|
||||
|
||||
float num953 = revenge ? 77f : 70f;
|
||||
float inertia = revenge ? 70f : 77f;
|
||||
float num954 = 40f;
|
||||
float scaleFactor12 = revenge ? 35f : 28f;
|
||||
int num959 = (int)projectile.ai[0];
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
vector102 = Vector2.UnitY;
|
||||
}
|
||||
projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953;
|
||||
projectile.velocity = (projectile.velocity * (inertia - 1f) + vector102 * scaleFactor12) / inertia;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -144,7 +144,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile.Center, 3);
|
||||
projectile.damage = Main.expertMode ? 75 : 90;
|
||||
projectile.Damage();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -126,9 +127,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.position.X = projectile.position.X + num624 * (float)-(float)projectile.direction;
|
||||
}
|
||||
|
||||
int damage = Main.expertMode ? 85 : 100;
|
||||
if (projectile.timeLeft == 480)
|
||||
projectile.damage = damage;
|
||||
projectile.damage = projectile.GetProjectileDamage(ModContent.NPCType<Yharon>());
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -45,6 +46,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.velocity.X *= 1.05f;
|
||||
}
|
||||
int num103 = Player.FindClosest(projectile.Center, 1, 1);
|
||||
if (projectile.ai[1] == 0f)
|
||||
{
|
||||
projectile.damage = projectile.GetProjectileDamage(ModContent.NPCType<Providence>());
|
||||
}
|
||||
projectile.ai[1] += 1f;
|
||||
if (projectile.ai[1] < 180f && projectile.ai[1] > 60f)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -127,10 +128,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.position.X = projectile.position.X + num624 * (float)-(float)projectile.direction;
|
||||
}
|
||||
|
||||
int damage = Main.expertMode ? 130 : 150;
|
||||
if (projectile.timeLeft == 600)
|
||||
projectile.damage = damage;
|
||||
}
|
||||
projectile.damage = projectile.GetProjectileDamage(ModContent.NPCType<Yharon>());
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -127,10 +128,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.position.X = projectile.position.X + num624 * (float)-(float)projectile.direction;
|
||||
}
|
||||
|
||||
int damage = Main.expertMode ? 130 : 150;
|
||||
if (projectile.timeLeft == 720)
|
||||
projectile.damage = damage;
|
||||
}
|
||||
projectile.damage = projectile.GetProjectileDamage(ModContent.NPCType<Yharon>());
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.tileCollide = false;
|
||||
projectile.alpha = 255;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 180;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.aiStyle = 1;
|
||||
projectile.extraUpdates = 1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void AI()
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 5)
|
||||
{
|
||||
@@ -52,14 +53,30 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame > 4)
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
|
||||
projectile.alpha -= 40;
|
||||
if (projectile.alpha < 0)
|
||||
{
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
|
||||
if (projectile.alpha < 40)
|
||||
{
|
||||
int num805 = Dust.NewDust(projectile.Center - Vector2.One * 5f, 10, 10, 244, -projectile.velocity.X / 3f, -projectile.velocity.Y / 3f, 150, Color.Transparent, 0.6f);
|
||||
Main.dust[num805].noGravity = true;
|
||||
}
|
||||
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
if (projectile.ai[1] == -1f)
|
||||
{
|
||||
if (projectile.velocity.Length() < 16f)
|
||||
projectile.velocity *= 1.05f;
|
||||
else
|
||||
projectile.tileCollide = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (projectile.ai[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] += 1f;
|
||||
@@ -67,20 +84,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
projectile.localAI[0] = 0f;
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.ai[1] = (float)Player.FindClosest(projectile.position, projectile.width, projectile.height);
|
||||
projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height);
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
|
||||
projectile.velocity.X = projectile.velocity.RotatedBy(0.0, default).X;
|
||||
projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f);
|
||||
|
||||
projectile.velocity.Y = projectile.velocity.Y - 0.08f;
|
||||
if (projectile.velocity.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - 0.2f;
|
||||
}
|
||||
if (projectile.velocity.Y < -7f)
|
||||
{
|
||||
projectile.velocity.Y = -7f;
|
||||
}
|
||||
}
|
||||
else if (projectile.ai[0] == 1f)
|
||||
{
|
||||
@@ -89,78 +104,63 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.ai[0] = 2f;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
|
||||
projectile.velocity.X = projectile.velocity.RotatedBy(0.0, default).X;
|
||||
projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f);
|
||||
|
||||
projectile.velocity.Y = projectile.velocity.Y - 0.08f;
|
||||
if (projectile.velocity.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - 0.2f;
|
||||
}
|
||||
if (projectile.velocity.Y < -7f)
|
||||
{
|
||||
projectile.velocity.Y = -7f;
|
||||
}
|
||||
}
|
||||
else if (projectile.ai[0] == 2f)
|
||||
{
|
||||
if (Main.player[(int)projectile.ai[1]].Center.Y < projectile.Center.Y)
|
||||
{
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
|
||||
float speed = revenge ? 9f : 7.5f;
|
||||
|
||||
Vector2 vector70 = Main.player[(int)projectile.ai[1]].Center - projectile.Center;
|
||||
if (vector70.Length() < 20f)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
vector70.Normalize();
|
||||
vector70 *= 14f;
|
||||
vector70 = Vector2.Lerp(projectile.velocity, vector70, 0.6f);
|
||||
if (vector70.Y < speed)
|
||||
{
|
||||
vector70.Y = speed;
|
||||
}
|
||||
|
||||
float num804 = 0.4f;
|
||||
if (projectile.velocity.X < vector70.X)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num804;
|
||||
if (projectile.velocity.X < 0f && vector70.X > 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num804;
|
||||
}
|
||||
}
|
||||
else if (projectile.velocity.X > vector70.X)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num804;
|
||||
if (projectile.velocity.X > 0f && vector70.X < 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num804;
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.velocity.Y < vector70.Y)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num804;
|
||||
if (projectile.velocity.Y < 0f && vector70.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num804;
|
||||
}
|
||||
}
|
||||
else if (projectile.velocity.Y > vector70.Y)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num804;
|
||||
if (projectile.velocity.Y > 0f && vector70.Y < 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num804;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (projectile.alpha < 40)
|
||||
{
|
||||
int num805 = Dust.NewDust(projectile.Center - Vector2.One * 5f, 10, 10, 244, -projectile.velocity.X / 3f, -projectile.velocity.Y / 3f, 150, Color.Transparent, 0.6f);
|
||||
Main.dust[num805].noGravity = true;
|
||||
}
|
||||
projectile.rotation = projectile.velocity.ToRotation() + 1.57079637f;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
@@ -184,8 +184,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Zombie, (int)projectile.position.X, (int)projectile.position.Y, 103, 1f, 0f);
|
||||
projectile.position = projectile.Center;
|
||||
projectile.width = projectile.height = 64;
|
||||
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
|
||||
projectile.position.X = projectile.position.X - (projectile.width / 2);
|
||||
projectile.position.Y = projectile.position.Y - (projectile.height / 2);
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default, 1.5f);
|
||||
|
||||
@@ -24,14 +24,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = 1;
|
||||
projectile.alpha = 255;
|
||||
projectile.timeLeft = 720;
|
||||
projectile.timeLeft = 600;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
projectile.ai[1] += 1f;
|
||||
if (projectile.ai[1] > 480)
|
||||
if (projectile.ai[1] > 420)
|
||||
{
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
@@ -45,9 +45,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
float num953 = revenge ? 75f : 60f;
|
||||
float scaleFactor12 = revenge ? 15f : 12f;
|
||||
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
|
||||
float inertia = revenge ? 90f : 110f;
|
||||
float scaleFactor12 = revenge ? 16f : 12f;
|
||||
float num954 = 40f;
|
||||
if (projectile.alpha > 0)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
vector102 = Vector2.UnitY;
|
||||
}
|
||||
projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953;
|
||||
projectile.velocity = (projectile.velocity * (inertia - 1f) + vector102 * scaleFactor12) / inertia;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.hostile = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.timeLeft = 420;
|
||||
projectile.alpha = 100;
|
||||
projectile.penetrate = -1;
|
||||
cooldownSlot = 1;
|
||||
@@ -48,52 +48,28 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.rotation += 0.5f * (float)projectile.direction;
|
||||
projectile.rotation += 0.5f * projectile.direction;
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
Main.PlaySound(SoundID.Item73, projectile.position);
|
||||
}
|
||||
|
||||
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
|
||||
projectile.ai[0] += 1f;
|
||||
if (projectile.ai[0] > 180f)
|
||||
if (projectile.ai[0] >= 150f)
|
||||
{
|
||||
if (projectile.ai[1] > 0f)
|
||||
if (projectile.ai[1] > 0f && projectile.ai[0] < 160f)
|
||||
{
|
||||
int num625 = (int)projectile.ai[1] - 1;
|
||||
if (num625 < Main.maxPlayers)
|
||||
{
|
||||
Vector2 value16 = Main.player[num625].Center - projectile.Center;
|
||||
if (value16.Length() < 200f || counter > 0)
|
||||
{
|
||||
counter--;
|
||||
if (counter <= 0 && projectile.localAI[0] == 2f)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
if (projectile.localAI[0] < 2f)
|
||||
{
|
||||
projectile.localAI[0] = 2f;
|
||||
float speed = 30f;
|
||||
Vector2 vector167 = new Vector2(projectile.Center.X + (float)(projectile.direction * 20), projectile.Center.Y + 6f);
|
||||
float num1373 = Main.player[num625].position.X + (float)Main.player[num625].width * 0.5f - vector167.X;
|
||||
float num1374 = Main.player[num625].Center.Y - vector167.Y;
|
||||
float num1375 = (float)Math.Sqrt((double)(num1373 * num1373 + num1374 * num1374));
|
||||
float num1376 = speed / num1375;
|
||||
num1373 *= num1376;
|
||||
num1374 *= num1376;
|
||||
projectile.velocity.X = (projectile.velocity.X * 50f + num1373) / 51f;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * 50f + num1374) / 51f;
|
||||
counter = 90;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.velocity = Vector2.Normalize(value16) * 15f;
|
||||
}
|
||||
projectile.velocity = Vector2.Normalize(value16) * 20f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,8 +81,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
projectile.localAI[1] += 1f;
|
||||
byte b2 = (byte)(((int)projectile.localAI[1]) * 3);
|
||||
byte a2 = (byte)(projectile.alpha * ((float)b2 / 255f));
|
||||
return new Color((int)b2, (int)b2, (int)b2, (int)a2);
|
||||
byte a2 = (byte)(projectile.alpha * (b2 / 255f));
|
||||
return new Color(b2, b2, b2, a2);
|
||||
}
|
||||
return new Color(255, 255, 255, projectile.alpha);
|
||||
}
|
||||
@@ -132,7 +108,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
|
||||
@@ -337,9 +337,16 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
// Large cthulhunadoes
|
||||
else if (projectile.type == ProjectileID.Sharknado)
|
||||
{
|
||||
projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron);
|
||||
}
|
||||
|
||||
// Larger cthulhunadoes
|
||||
else if (projectile.type == ProjectileID.Cthulunado)
|
||||
{
|
||||
projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron);
|
||||
|
||||
int num606 = 16;
|
||||
int num607 = 16;
|
||||
float num608 = 2f;
|
||||
@@ -688,7 +695,7 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
if (projectile.velocity.X != 0f)
|
||||
{
|
||||
projectile.direction = (projectile.spriteDirection = -Math.Sign(projectile.velocity.X));
|
||||
projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X);
|
||||
}
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 2)
|
||||
@@ -705,18 +712,18 @@ namespace CalamityMod.Projectiles
|
||||
projectile.localAI[0] = 1f;
|
||||
projectile.position.X += projectile.width / 2;
|
||||
projectile.position.Y += projectile.height / 2;
|
||||
projectile.scale = ((float)(num520 + num521) - projectile.ai[1]) * num522 / (float)(num521 + num520);
|
||||
projectile.width = (int)((float)num523 * projectile.scale);
|
||||
projectile.height = (int)((float)num524 * projectile.scale);
|
||||
projectile.scale = (num520 + num521 - projectile.ai[1]) * num522 / (num521 + num520);
|
||||
projectile.width = (int)(num523 * projectile.scale);
|
||||
projectile.height = (int)(num524 * projectile.scale);
|
||||
projectile.position.X -= projectile.width / 2;
|
||||
projectile.position.Y -= projectile.height / 2;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (projectile.ai[1] != -1f)
|
||||
{
|
||||
projectile.scale = ((float)(num520 + num521) - projectile.ai[1]) * num522 / (float)(num521 + num520);
|
||||
projectile.width = (int)((float)num523 * projectile.scale);
|
||||
projectile.height = (int)((float)num524 * projectile.scale);
|
||||
projectile.scale = (num520 + num521 - projectile.ai[1]) * num522 / (num521 + num520);
|
||||
projectile.width = (int)(num523 * projectile.scale);
|
||||
projectile.height = (int)(num524 * projectile.scale);
|
||||
}
|
||||
if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
|
||||
{
|
||||
@@ -746,25 +753,25 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
projectile.netUpdate = true;
|
||||
Vector2 center2 = projectile.Center;
|
||||
center2.Y -= (float)num524 * projectile.scale / 2f;
|
||||
float num525 = ((float)(num520 + num521) - projectile.ai[1] + 1f) * num522 / (float)(num521 + num520);
|
||||
center2.Y -= (float)num524 * num525 / 2f;
|
||||
center2.Y -= num524 * projectile.scale / 2f;
|
||||
float num525 = (num520 + num521 - projectile.ai[1] + 1f) * num522 / (num521 + num520);
|
||||
center2.Y -= num524 * num525 / 2f;
|
||||
center2.Y += 2f;
|
||||
Projectile.NewProjectile(center2, projectile.velocity, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, 10f, projectile.ai[1] - 1f);
|
||||
}
|
||||
if (projectile.ai[0] <= 0f)
|
||||
{
|
||||
float num529 = (float)Math.PI / 30f;
|
||||
float num530 = (float)projectile.width / 5f;
|
||||
float num530 = projectile.width / 5f;
|
||||
if (projectile.type == ProjectileID.Cthulunado)
|
||||
{
|
||||
num530 *= 2f;
|
||||
}
|
||||
float num531 = (float)(Math.Cos(num529 * (-projectile.ai[0])) - 0.5) * num530;
|
||||
projectile.position.X -= num531 * (float)(-projectile.direction);
|
||||
projectile.position.X -= num531 * (-projectile.direction);
|
||||
projectile.ai[0] -= 1f;
|
||||
num531 = (float)(Math.Cos(num529 * (-projectile.ai[0])) - 0.5) * num530;
|
||||
projectile.position.X += num531 * (float)(-projectile.direction);
|
||||
projectile.position.X += num531 * (-projectile.direction);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -13,7 +14,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public class YanmeisKnifeSlash : ModProjectile
|
||||
{
|
||||
// This is a rather weird thing, but it's what the patron asked for.
|
||||
public static readonly Func<NPC, bool> CanRecieveCoolEffectsFrom = (npc) => (npc.boss && npc.type != ModContent.NPCType<CeaselessVoid>()) || CalamityLists.bossMinionList.Contains(npc.type) || CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type);
|
||||
public static readonly Func<NPC, bool> CanRecieveCoolEffectsFrom = (npc) => (npc.boss && npc.type != ModContent.NPCType<CeaselessVoid>() && npc.type != ModContent.NPCType<DevourerofGodsBody>() && npc.type != ModContent.NPCType<DevourerofGodsBodyS>()) || CalamityLists.bossMinionList.Contains(npc.type) || CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type);
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Yanmei's Knife");
|
||||
|
||||
+12
-13
@@ -533,7 +533,7 @@ namespace CalamityMod
|
||||
50, // 36 in rapid fire
|
||||
92, // 68 in rapid fire
|
||||
112, // 84 in rapid fire
|
||||
124, // 94 in rapid fire
|
||||
124, // 92 in rapid fire
|
||||
168 } }, // 126 in rapid fire; 138 in non-rev master mode, 102 in rapid fire in non-rev master mode
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ModContent.ProjectileType<ScavengerLaser>()), new int[] { 0, 0, 120, 132, 180 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 88, 108, 120, 162 } }, // 132 in non-rev master mode
|
||||
@@ -576,14 +576,14 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasRun>(), ModContent.ProjectileType<BrimstoneFire>()), new int[] { 76, 120, 140, 152, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasRun2>(), ModContent.ProjectileType<BrimstoneBall>()), new int[] { 72, 116, 136, 144, 204 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SoulSeeker>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 60, 100, 108, 116, 162 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<LifeSeeker>(), ProjectileID.PinkLaser), new int[] { 50, 88, 92, 100, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<LifeSeeker>(), ProjectileID.PinkLaser), new int[] { 50, 88, 88, 88, 132 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 44, 76, 96, 108, 144 } }, // 114 in non-rev master mode
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 54, 96, 120, 132, 180 } }, // 144 in non-rev master mode
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 62, 108, 136, 148, 204 } }, // 162 in non-rev master mode
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<SporeGasPlantera>()), new int[] { 0, 0, 140, 152, 210 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Leviathan>(), ModContent.ProjectileType<LeviathanBomb>()), new int[] { 84, 132, 152, 164, 228 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Leviathan>(), ModContent.ProjectileType<LeviathanBomb>()), new int[] { 88, 140, 160, 172, 252 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Siren>(), ModContent.ProjectileType<WaterSpear>()), new int[] { 72, 116, 136, 144, 204 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Siren>(), ModContent.ProjectileType<FrostMist>()), new int[] { 72, 116, 136, 144, 204 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Siren>(), ModContent.ProjectileType<SirenSong>()), new int[] { 72, 116, 136, 144, 204 } },
|
||||
@@ -650,7 +650,7 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProfanedGuardianBoss2>(), ModContent.ProjectileType<ProfanedSpear>()), new int[] { 120, 200, 220, 232, 330 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Bumblefuck>(), ModContent.ProjectileType<RedLightningFeather>()), new int[] { 120, 200, 220, 232, 330 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Bumblefuck>(), ModContent.ProjectileType<RedLightning>()), new int[] { 200, 300, 332, 256, 498 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Bumblefuck>(), ModContent.ProjectileType<BirbAura>()), new int[] { 200, 300, 332, 256, 498 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Providence>(), ModContent.ProjectileType<HolyBlast>()), new int[] { 130, 208, 228, 240, 342 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Providence>(), ModContent.ProjectileType<HolyFire>()), new int[] { 120, 192, 220, 236, 330 } },
|
||||
@@ -668,7 +668,6 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProvSpawnOffense>(), ModContent.ProjectileType<FlareDust>()), new int[] { 120, 200, 220, 232, 330 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CeaselessVoid>(), ModContent.ProjectileType<DoGBeamPortal>()), new int[] { 120, 200, 232, 248, 348 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CeaselessVoid>(), ModContent.ProjectileType<DoGBeam>()), new int[] { 120, 200, 232, 248, 348 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CeaselessVoid>(), ModContent.ProjectileType<DarkEnergyBall>()), new int[] { 120, 200, 232, 248, 348 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CeaselessVoid>(), ModContent.ProjectileType<DarkEnergyBall2>()), new int[] { 120, 200, 232, 248, 348 } },
|
||||
|
||||
@@ -697,7 +696,7 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<OldDukeSharkron>(), ModContent.ProjectileType<OldDukeGore>()), new int[] { 140, 220, 244, 256, 366 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsBody>(), ModContent.ProjectileType<DoGNebulaShot>()), new int[] { 140, 232, 256, 272, 384 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsHeadS>(), ModContent.ProjectileType<DoGFire>()), new int[] { 160, 276, 304, 320, 456 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsHeadS>(), ModContent.ProjectileType<DoGFire>()), new int[] { 180, 300, 332, 348, 498 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsHeadS>(), ModContent.ProjectileType<DoGDeath>()), new int[] { 160, 276, 304, 320, 456 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<FlareBomb>()), new int[] { 180, 300, 332, 348, 498 } },
|
||||
@@ -710,17 +709,17 @@ namespace CalamityMod
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 400, 600, 632, 648, 948 } }, // 25% increased damage in bullet hell 1
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneGigaBlast>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneFireblast>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneMonster>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneFireblast>()), new int[] { 450, 676, 712, 732, 1068 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneMonster>()), new int[] { 500, 752, 788, 808, 1182 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneWave>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SCalWormBodyWeak>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SoulSeekerSupreme>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SCalWormBodyWeak>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SoulSeekerSupreme>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<BrimstoneWave>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 400, 600, 632, 648, 948 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 400, 600, 632, 648, 948 } }
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user