Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
deea6f4e76
27 files changed
+99
-28
No files matched your search
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.miniOldDuke = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
const int damage = 2000;
|
||||
const int damage = 1750;
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<YoungDuke>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero,
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 20;
|
||||
item.damage = 14;
|
||||
item.magic = true;
|
||||
item.mana = 9;
|
||||
item.width = 48;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class Eternity : ModItem
|
||||
{
|
||||
public const int BaseDamage = 4770;
|
||||
public const int BaseDamage = 7777;
|
||||
public const int ExplosionDamage = 50000;
|
||||
public const int MaxHomers = 40;
|
||||
public const int dustID = 16;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 123;
|
||||
item.damage = 78;
|
||||
item.magic = true;
|
||||
item.mana = 16;
|
||||
item.width = 50;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 90;
|
||||
item.damage = 47;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.width = 30;
|
||||
item.height = 52;
|
||||
item.damage = 22;
|
||||
item.damage = 17;
|
||||
item.melee = true;
|
||||
item.useAnimation = item.useTime = 26;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 12;
|
||||
item.damage = 9;
|
||||
item.ranged = true;
|
||||
item.width = 20;
|
||||
item.height = 54;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 20;
|
||||
item.damage = 17;
|
||||
item.mana = 10;
|
||||
item.width = 10;
|
||||
item.height = 32;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack;
|
||||
item.summon = true;
|
||||
item.mana = 11;
|
||||
item.damage = 456;
|
||||
item.damage = 200;
|
||||
item.knockBack = 2f;
|
||||
item.autoReuse = true;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
item.UseSound = SoundID.DD2_DarkMageHealImpact;
|
||||
item.summon = true;
|
||||
item.mana = 12;
|
||||
item.damage = 111;
|
||||
item.damage = 51;
|
||||
item.knockBack = 2f;
|
||||
item.autoReuse = true;
|
||||
item.useTime = item.useAnimation = 21;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 300;
|
||||
item.damage = 276;
|
||||
item.mana = 30;
|
||||
item.width = 64;
|
||||
item.height = 62;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
item.UseSound = SoundID.Item60;
|
||||
item.summon = true;
|
||||
item.mana = 25;
|
||||
item.damage = 2563;
|
||||
item.damage = 1450;
|
||||
item.knockBack = 3f;
|
||||
item.autoReuse = true;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.mana = 10;
|
||||
item.damage = 50;
|
||||
item.damage = 44;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.width = 32;
|
||||
item.height = 32;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
item.summon = true;
|
||||
item.mana = 100;
|
||||
item.damage = 666;
|
||||
item.damage = 720;
|
||||
item.knockBack = 3f;
|
||||
item.autoReuse = true;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
|
||||
@@ -7,6 +7,7 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Ammo;
|
||||
using CalamityMod.Items.Materials;
|
||||
@@ -56,6 +57,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -3666,6 +3668,12 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
spawnRate = (int)(spawnRate * 0.7);
|
||||
maxSpawns = (int)(maxSpawns * 1.2f);
|
||||
|
||||
if (player.Calamity().ZoneSulphur && !player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid)
|
||||
{
|
||||
spawnRate = 23;
|
||||
maxSpawns = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player.Calamity().ZoneAbyss)
|
||||
@@ -3794,6 +3802,14 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
pool[0] = 0f;
|
||||
}
|
||||
if (spawnInfo.player.Calamity().ZoneSulphur && !spawnInfo.player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid)
|
||||
{
|
||||
pool.Clear();
|
||||
foreach (int enemy in AcidRainEvent.PossibleEnemies.Select(enemyType => enemyType.Item1))
|
||||
{
|
||||
pool.Add(enemy, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.DifficultyItems;
|
||||
@@ -32,6 +33,7 @@ using CalamityMod.NPCs.StormWeaver;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -755,6 +757,7 @@ namespace CalamityMod.NPCs
|
||||
if (CalamityWorld.armageddon)
|
||||
ArmageddonLoot(npc);
|
||||
|
||||
AcidRainProgression(npc);
|
||||
CheckBossSpawn(npc);
|
||||
ArmorSetLoot(npc);
|
||||
RareLoot(npc);
|
||||
@@ -1579,6 +1582,17 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Acid Rain
|
||||
private void AcidRainProgression(NPC npc)
|
||||
{
|
||||
if (AcidRainEvent.PossibleEnemies.Select(enemy => enemy.Item1).Contains(npc.type) && CalamityWorld.rainingAcid)
|
||||
{
|
||||
Main.invasionSize -= AcidRainEvent.PossibleEnemies.Find(enemy => enemy.Item1 == npc.type).Item2;
|
||||
}
|
||||
AcidRainEvent.UpdateInvasion();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Common Loot
|
||||
private void CommonLoot(NPC npc)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.ai[0]++;
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
NPC target = projectile.Center.ClosestNPCAt(4400f);
|
||||
NPC target = projectile.Center.ClosestNPCAt(4400f, true);
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.tileCollide = false;
|
||||
projectile.timeLeft = int.MaxValue; //Killed manually
|
||||
projectile.extraUpdates = extraUpdateCount;
|
||||
projectile.alpha = 255;
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
@@ -38,9 +39,35 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
if (!target.active)
|
||||
{
|
||||
DeathDust();
|
||||
projectile.Kill();
|
||||
return;
|
||||
NPC potentialNPC = projectile.Center.ClosestNPCAt(4400f, true);
|
||||
if (potentialNPC != null)
|
||||
{
|
||||
projectile.ai[0] = potentialNPC.whoAmI;
|
||||
target = Main.npc[(int)projectile.ai[0]];
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile proj = Main.projectile[i];
|
||||
if ((proj.whoAmI == projectile.whoAmI ||
|
||||
proj.type == ModContent.ProjectileType<EternityCrystal>()) &&
|
||||
proj.active && proj.owner == projectile.owner)
|
||||
{
|
||||
if (proj.type == ModContent.ProjectileType<EternityCrystal>())
|
||||
proj.ai[0] = projectile.ai[0];
|
||||
for (int j = 0; j < 44; j++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(proj.Center, Eternity.dustID, newColor: new Color(245, 112, 218));
|
||||
dust.velocity = Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(2f, 6f);
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DeathDust();
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.localAI[1] >= Main.projectile.Length || projectile.localAI[0] < 0)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.timeLeft = 600;
|
||||
projectile.penetrate = 10;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 3;
|
||||
projectile.localNPCHitCooldown = 7;
|
||||
projectile.magic = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.penetrate = 4;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 5;
|
||||
projectile.localNPCHitCooldown = 6;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 6;
|
||||
projectile.localNPCHitCooldown = 8;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
if (projectile.timeLeft % 18f == 0f)
|
||||
if (projectile.timeLeft % 25f == 0f)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(8f));
|
||||
Projectile.NewProjectile(spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 24f, ModContent.ProjectileType<IgneousBladeStrike>(),
|
||||
projectile.damage, projectile.knockBack, projectile.owner);
|
||||
(int)(projectile.damage * 0.666), projectile.knockBack, projectile.owner);
|
||||
}
|
||||
for (int i = 0; i < Main.rand.Next(28, 41); i++)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f);
|
||||
angle *= Math.Sign(target.Center.X - projectile.Center.X);
|
||||
Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f,
|
||||
new Vector2(0f, -Main.rand.NextFloat(14f, 23f)).RotatedBy(angle),
|
||||
new Vector2(0f, -Main.rand.NextFloat(21f, 30.5f)).RotatedBy(angle),
|
||||
ModContent.ProjectileType<OldDukeSharkVomit>(), projectile.damage, 5f,
|
||||
projectile.owner);
|
||||
}
|
||||
|
||||
@@ -78,19 +78,19 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Vector2 velocity = projectile.DirectionTo(destination) * projectile.Distance(destination) / 36f;
|
||||
projectile.velocity = velocity;
|
||||
}
|
||||
int timeNeeded = (int)MathHelper.Lerp(60f, 10f, MathHelper.Clamp(projectile.localAI[1] / 320f, 0f, 1f));
|
||||
int timeNeeded = (int)MathHelper.Lerp(60f, 18f, MathHelper.Clamp(projectile.localAI[1] / 320f, 0f, 1f));
|
||||
if (projectile.ai[0] >= timeNeeded)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center,
|
||||
projectile.DirectionTo(potentialTarget.Center) * 14f,
|
||||
ModContent.ProjectileType<MK2RocketNormal>(),
|
||||
projectile.damage / 2,
|
||||
(int)(projectile.damage / 0.3),
|
||||
3f,
|
||||
projectile.owner);
|
||||
Projectile.NewProjectile(projectile.Center,
|
||||
projectile.DirectionTo(potentialTarget.Center) * 11.5f,
|
||||
ModContent.ProjectileType<MK2RocketHoming>(),
|
||||
projectile.damage / 2,
|
||||
(int)(projectile.damage / 0.3),
|
||||
3f,
|
||||
projectile.owner);
|
||||
projectile.ai[0] = 0;
|
||||
@@ -116,6 +116,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
Vector2 velocity = distanceToDestination.SafeNormalize(projectile.direction * Vector2.UnitX) * speed;
|
||||
projectile.velocity = (projectile.velocity * 20f + velocity) / 21f;
|
||||
if (distance > 2250f)
|
||||
projectile.Center = player.Center;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -115,6 +115,18 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
projectile.ai[1] = 0f;
|
||||
projectile.velocity = (projectile.velocity * 24f + projectile.DirectionTo(player.Center) * 13f) / 25f;
|
||||
if (projectile.Distance(player.Center) > 3250f)
|
||||
{
|
||||
projectile.Center = player.Center;
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner &&
|
||||
Main.projectile[i].type == ModContent.ProjectileType<SkeletalDragonChild>())
|
||||
{
|
||||
Main.projectile[i].Center = player.Center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace CalamityMod
|
||||
{
|
||||
for (int index = 0; index < Main.npc.Length; index++)
|
||||
{
|
||||
if (Main.npc[index].CanBeChasedBy(null, false) && Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1))
|
||||
if (Main.npc[index].CanBeChasedBy(null, false))
|
||||
{
|
||||
if (Vector2.Distance(origin, Main.npc[index].Center) < distance)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user