Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
e0f9082d6f
9 files changed
+51
-30
No files matched your search
@@ -18,8 +18,6 @@ namespace CalamityMod.Events
|
||||
// Any other mods are changing the invasion ID as well.
|
||||
public const int InvasionID = 57;
|
||||
|
||||
public const int MinibossDeathValue = 5;
|
||||
|
||||
// A partially bright pale-ish cyan with a hint of yellow.
|
||||
public static readonly Color TextColor = new Color(115, 194, 147);
|
||||
|
||||
@@ -63,15 +61,15 @@ namespace CalamityMod.Events
|
||||
( ModContent.NPCType<SulfurousSkater>(), 1, false )
|
||||
};
|
||||
|
||||
public static List<(int, bool)> PossibleMinibossesAS = new List<(int, bool)>()
|
||||
public static List<(int, int, bool)> PossibleMinibossesAS = new List<(int, int, bool)>()
|
||||
{
|
||||
(ModContent.NPCType<CragmawMire>(), true)
|
||||
(ModContent.NPCType<CragmawMire>(), 5, true)
|
||||
};
|
||||
|
||||
public static List<(int, bool)> PossibleMinibossesPolter = new List<(int, bool)>()
|
||||
public static List<(int, int, bool)> PossibleMinibossesPolter = new List<(int, int, bool)>()
|
||||
{
|
||||
(ModContent.NPCType<CragmawMire>(), true),
|
||||
(ModContent.NPCType<NuclearTerror>(), false)
|
||||
(ModContent.NPCType<CragmawMire>(), 4, true),
|
||||
(ModContent.NPCType<NuclearTerror>(), 8, false)
|
||||
};
|
||||
|
||||
public static readonly List<int> AllMinibosses = PossibleMinibossesAS.Select(miniboss => miniboss.Item1).ToList().Concat(PossibleMinibossesPolter.Select(miniboss => miniboss.Item1)).Distinct().ToList();
|
||||
|
||||
@@ -673,14 +673,15 @@ namespace CalamityMod.Items
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<ColdDivinityPointyThing>() && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
if (Main.projectile[i].ai[1] >= 1f)
|
||||
if (Main.projectile[i].ai[1] > 1f)
|
||||
{
|
||||
canContinue = false;
|
||||
break;
|
||||
}
|
||||
else if (Main.projectile[i].ai[1] == 0f)
|
||||
{
|
||||
count++;
|
||||
if (((ColdDivinityPointyThing)Main.projectile[i].modProjectile).circlingPlayer)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -691,14 +692,15 @@ namespace CalamityMod.Items
|
||||
{
|
||||
int height = unluckyTarget.getRect().Height;
|
||||
int width = unluckyTarget.getRect().Width;
|
||||
float dist = (height > width ? height : width) * 1.5f; //create distance between hitbox and spears.
|
||||
int pointyThingyAmount = count;
|
||||
pointyThingyAmount += dist > 100 ? (int)dist / 100 : 0;
|
||||
float angleVariance = MathHelper.TwoPi / pointyThingyAmount;
|
||||
float angle = 0f;
|
||||
|
||||
for (int i = 0; i < pointyThingyAmount; i++)
|
||||
{
|
||||
int projj = Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType<ColdDivinityPointyThing>(), (int)((80 * player.MinionDamage())), 1f, player.whoAmI, angle, 2f);
|
||||
if (Main.projectile.Length == Main.maxProjectiles)
|
||||
break;
|
||||
int projj = Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType<ColdDivinityPointyThing>(), (int)(80 * player.MinionDamage()), 1f, player.whoAmI, angle, 2f);
|
||||
angle += angleVariance;
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 69;
|
||||
item.damage = 50;
|
||||
item.width = 22;
|
||||
item.height = 24;
|
||||
item.useAnimation = 29;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 80;
|
||||
item.damage = 325;
|
||||
item.damage = 150;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 22;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 80;
|
||||
item.damage = 52;
|
||||
item.mana = 20;
|
||||
item.width = 52;
|
||||
item.height = 50;
|
||||
|
||||
@@ -3436,10 +3436,14 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
if (projectile.type == ModContent.ProjectileType<SeasSearingSpout>())
|
||||
else if (projectile.type == ModContent.ProjectileType<SeasSearingSpout>())
|
||||
{
|
||||
damage = (int)(damage * 0.25);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<SulphuricNukesplosion>())
|
||||
{
|
||||
damage /= 3;
|
||||
}
|
||||
}
|
||||
else if (AquaticScourgeIDs.Contains(npc.type))
|
||||
{
|
||||
@@ -3476,14 +3480,22 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
damage = (int)(damage * 0.4);
|
||||
}
|
||||
if (projectile.type == (ModContent.ProjectileType<ReaperProjectile>() | ModContent.ProjectileType<BloodBombExplosion>() | ModContent.ProjectileType<CrescentMoonFlail>()))
|
||||
else if (projectile.type == (ModContent.ProjectileType<ReaperProjectile>() | ModContent.ProjectileType<BloodBombExplosion>() | ModContent.ProjectileType<CrescentMoonFlail>()))
|
||||
{
|
||||
damage = (int)(damage * 0.6);
|
||||
}
|
||||
if (projectile.type == (ModContent.ProjectileType<ValedictionBoomerang>() | ProjectileID.LunarFlare))
|
||||
else if (projectile.type == (ModContent.ProjectileType<ValedictionBoomerang>() | ProjectileID.LunarFlare))
|
||||
{
|
||||
damage = (int)(damage * 0.8);
|
||||
}
|
||||
else if (projectile.type == (ModContent.ProjectileType<GhastlySoulLarge>() | ModContent.ProjectileType<GhastlySoulMedium>() | ModContent.ProjectileType<GhastlySoulSmall>() | ModContent.ProjectileType<GhostFire>()))
|
||||
{
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<CalamariInk>())
|
||||
{
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
if (!projectile.npcProj && !projectile.trap)
|
||||
@@ -3992,7 +4004,7 @@ namespace CalamityMod.NPCs
|
||||
if (!(CalamityWorld.downedPolterghast && CalamityWorld.acidRainPoints == 2))
|
||||
{
|
||||
List<(int, int, bool)> PossibleEnemies = AcidRainEvent.PossibleEnemiesPreHM;
|
||||
List<(int, bool)> PossibleMinibosses = new List<(int, bool)>();
|
||||
List<(int, int, bool)> PossibleMinibosses = new List<(int, int, bool)>();
|
||||
if (CalamityWorld.downedAquaticScourge)
|
||||
{
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesAS;
|
||||
@@ -4014,7 +4026,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
foreach (int enemy in PossibleMinibosses.Select(miniboss => miniboss.Item1).ToList())
|
||||
{
|
||||
if (spawnInfo.water || !PossibleMinibosses.First(potential => potential.Item1 == enemy).Item2)
|
||||
if (spawnInfo.water || !PossibleMinibosses.First(potential => potential.Item1 == enemy).Item3)
|
||||
{
|
||||
pool.Add(enemy, 0.05f);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.Astral;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
@@ -1598,6 +1599,7 @@ namespace CalamityMod.NPCs
|
||||
private void AcidRainProgression(NPC npc)
|
||||
{
|
||||
List<(int, int, bool)> PossibleEnemies = AcidRainEvent.PossibleEnemiesPreHM;
|
||||
List<(int, int, bool)> PossibleMinibosses = new List<(int, int, bool)>();
|
||||
if (CalamityWorld.downedAquaticScourge)
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesAS;
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
@@ -1610,10 +1612,11 @@ namespace CalamityMod.NPCs
|
||||
CalamityWorld.acidRainPoints = (int)MathHelper.Max(2, CalamityWorld.acidRainPoints); // Cap at 2. The last points are for Old Duke.
|
||||
}
|
||||
}
|
||||
PossibleMinibosses = CalamityWorld.downedPolterghast ? AcidRainEvent.PossibleMinibossesPolter : PossibleMinibosses;
|
||||
if (AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Item1).Contains(npc.type) ||
|
||||
AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Item1).Contains(npc.type))
|
||||
{
|
||||
CalamityWorld.acidRainPoints -= AcidRainEvent.MinibossDeathValue;
|
||||
CalamityWorld.acidRainPoints -= PossibleMinibosses.Find(enemy => enemy.Item1 == npc.type).Item2;
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
CalamityWorld.acidRainPoints = (int)MathHelper.Max(2, CalamityWorld.acidRainPoints); // Cap at 2. The last points are for Old Duke.
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.tileCollide = false;
|
||||
projectile.alpha = 255;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 4;
|
||||
|
||||
}
|
||||
|
||||
public override bool PreAI()
|
||||
|
||||
@@ -91,6 +91,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override bool PreAI()
|
||||
{
|
||||
if (recharging == -1)
|
||||
{
|
||||
recharging = projectile.ai[1] == 0f ? 300 : 0;
|
||||
dust(30);
|
||||
}
|
||||
if (projectile.ai[1] == 1f && projectile.timeLeft > 1000)
|
||||
{
|
||||
projectile.ai[1] = 0f;
|
||||
@@ -98,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
circling = circlingPlayer = false;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
else if (projectile.ai[1] == 2f && projectile.timeLeft > 900)
|
||||
else if (projectile.ai[1] >= 2f && projectile.timeLeft > 900)
|
||||
{
|
||||
target = CalamityUtils.MinionHoming(projectile.position, 1000f, Main.player[projectile.owner]);
|
||||
projectile.timeLeft = 800;
|
||||
@@ -106,17 +111,14 @@ namespace CalamityMod.Projectiles.Summon
|
||||
circlingPlayer = false;
|
||||
float height = target.getRect().Height;
|
||||
float width = target.getRect().Width;
|
||||
floatyDistance = (height > width ? height : width) * 1.15f;
|
||||
floatyDistance = (height > width ? height : width) * 1.5f;
|
||||
if (floatyDistance > Main.LogicCheckScreenWidth / 3)
|
||||
floatyDistance = Main.LogicCheckScreenWidth / 3;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesIDStaticNPCImmunity = true;
|
||||
projectile.idStaticNPCHitCooldown = 4;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (recharging == -1)
|
||||
{
|
||||
recharging = projectile.ai[1] == 0f ? 300 : 0;
|
||||
dust(30);
|
||||
}
|
||||
if (circlingPlayer)
|
||||
{
|
||||
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
|
||||
@@ -182,10 +184,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
recharging = 0;
|
||||
projectile.usesIDStaticNPCImmunity = false;
|
||||
projectile.penetrate = 1;
|
||||
float applicableDist = target.getRect().Width > target.getRect().Height ? target.getRect().Width : target.getRect().Height;
|
||||
if (projectile.timeLeft > 60)
|
||||
floatyDistance += Main.rand.Next(0, 5);
|
||||
floatyDistance += Main.rand.Next(0, 10);
|
||||
else
|
||||
floatyDistance -= Main.rand.Next(5, 10);
|
||||
floatyDistance -= Main.rand.Next(10, 20);
|
||||
}
|
||||
if (circlingPlayer)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user