Merge branch 'master' into Calamitas-NPC
This commit is contained in:
commit
7f56e4a000
162 files changed
+869
-1098
No files matched your search
+87
-79
@@ -2441,6 +2441,15 @@ namespace CalamityMod.CalPlayer
|
||||
bool useNebulaS = NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHeadS>());
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:DevourerofGodsHeadS", useNebulaS);
|
||||
|
||||
bool useFlash = NPC.AnyNPCs(ModContent.NPCType<StormWeaverHeadNaked>());
|
||||
if (SkyManager.Instance["CalamityMod:StormWeaverFlash"] != null && useFlash != SkyManager.Instance["CalamityMod:StormWeaverFlash"].IsActive())
|
||||
{
|
||||
if (useFlash)
|
||||
SkyManager.Instance.Activate("CalamityMod:StormWeaverFlash", player.Center);
|
||||
else
|
||||
SkyManager.Instance.Deactivate("CalamityMod:StormWeaverFlash");
|
||||
}
|
||||
|
||||
bool useBrimstone = NPC.AnyNPCs(ModContent.NPCType<CalamitasRun3>());
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:CalamitasRun3", useBrimstone);
|
||||
|
||||
@@ -2451,13 +2460,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (SkyManager.Instance["CalamityMod:Cryogen"] != null && useCryogen != SkyManager.Instance["CalamityMod:Cryogen"].IsActive())
|
||||
{
|
||||
if (useCryogen)
|
||||
{
|
||||
SkyManager.Instance.Activate("CalamityMod:Cryogen", player.Center);
|
||||
}
|
||||
else
|
||||
{
|
||||
SkyManager.Instance.Deactivate("CalamityMod:Cryogen");
|
||||
}
|
||||
}
|
||||
|
||||
Point point = player.Center.ToTileCoordinates();
|
||||
@@ -2485,13 +2490,17 @@ namespace CalamityMod.CalPlayer
|
||||
if (SkyManager.Instance["CalamityMod:Cryogen"] != null && cryogenActive != SkyManager.Instance["CalamityMod:Cryogen"].IsActive())
|
||||
{
|
||||
if (cryogenActive)
|
||||
{
|
||||
SkyManager.Instance.Activate("CalamityMod:Cryogen");
|
||||
}
|
||||
else
|
||||
{
|
||||
SkyManager.Instance.Deactivate("CalamityMod:Cryogen");
|
||||
}
|
||||
}
|
||||
|
||||
if (SkyManager.Instance["CalamityMod:StormWeaverFlash"] != null && useFlash != SkyManager.Instance["CalamityMod:StormWeaverFlash"].IsActive())
|
||||
{
|
||||
if (useFlash)
|
||||
SkyManager.Instance.Activate("CalamityMod:StormWeaverFlash", player.Center);
|
||||
else
|
||||
SkyManager.Instance.Deactivate("CalamityMod:StormWeaverFlash");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3523,9 +3532,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Takes the % move speed boost and reduces it to a quarter to get the actual speed increase
|
||||
// 400% move speed boost = 100% run speed boost, so an 8 run speed would become 16 with a 400% move speed stat
|
||||
// 400% move speed boost = 80% run speed boost, so an 8 run speed would become 14.4 with a 400% move speed stat
|
||||
float accRunSpeedMin = player.accRunSpeed * 0.5f;
|
||||
player.accRunSpeed += player.accRunSpeed * moveSpeedStat * 0.0025f;
|
||||
player.accRunSpeed += player.accRunSpeed * moveSpeedStat * 0.002f;
|
||||
|
||||
if (player.accRunSpeed < accRunSpeedMin)
|
||||
player.accRunSpeed = accRunSpeedMin;
|
||||
@@ -4490,16 +4499,26 @@ namespace CalamityMod.CalPlayer
|
||||
#region Get Weapon Damage And KB
|
||||
public override void ModifyWeaponDamage(Item item, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
if (item.type == ModContent.ItemType<GaelsGreatsword>())
|
||||
mult += GaelsGreatsword.BaseDamage / (float)GaelsGreatsword.BaseDamage - 1f;
|
||||
|
||||
if (flamethrowerBoost && item.ranged && (item.useAmmo == AmmoID.Gel || CalamityLists.flamethrowerList.Contains(item.type)))
|
||||
mult += hoverboardBoost ? 0.35f : 0.25f;
|
||||
|
||||
if (cinnamonRoll && CalamityLists.fireWeaponList.Contains(item.type))
|
||||
mult += 0.15f;
|
||||
if (fireball && cinnamonRoll && CalamityLists.fireWeaponList.Contains(item.type))
|
||||
{
|
||||
mult += 0.125f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fireball && CalamityLists.fireWeaponList.Contains(item.type))
|
||||
mult += 0.05f;
|
||||
|
||||
if (cinnamonRoll && CalamityLists.fireWeaponList.Contains(item.type))
|
||||
mult += 0.1f;
|
||||
}
|
||||
|
||||
if (evergreenGin && CalamityLists.natureWeaponList.Contains(item.type))
|
||||
mult += 0.15f;
|
||||
|
||||
if (fireball && CalamityLists.fireWeaponList.Contains(item.type))
|
||||
mult += 0.1f;
|
||||
|
||||
if (eskimoSet && CalamityLists.iceWeaponList.Contains(item.type))
|
||||
@@ -4518,45 +4537,34 @@ namespace CalamityMod.CalPlayer
|
||||
public override void GetWeaponKnockback(Item item, ref float knockback)
|
||||
{
|
||||
if (auricBoost)
|
||||
{
|
||||
knockback *= 1f + (1f - modStealth) * 0.5f;
|
||||
}
|
||||
|
||||
if (whiskey)
|
||||
{
|
||||
knockback *= 1.04f;
|
||||
}
|
||||
|
||||
if (tequila && Main.dayTime)
|
||||
{
|
||||
knockback *= 1.03f;
|
||||
}
|
||||
|
||||
if (tequilaSunrise && Main.dayTime)
|
||||
{
|
||||
knockback *= 1.07f;
|
||||
}
|
||||
|
||||
if (moscowMule)
|
||||
{
|
||||
knockback *= 1.09f;
|
||||
}
|
||||
|
||||
if (titanHeartMask && item.Calamity().rogue)
|
||||
{
|
||||
knockback *= 1.05f;
|
||||
}
|
||||
|
||||
if (titanHeartMantle && item.Calamity().rogue)
|
||||
{
|
||||
knockback *= 1.05f;
|
||||
}
|
||||
|
||||
if (titanHeartBoots && item.Calamity().rogue)
|
||||
{
|
||||
knockback *= 1.05f;
|
||||
}
|
||||
|
||||
if (titanHeartSet && item.Calamity().rogue)
|
||||
{
|
||||
knockback *= 1.2f;
|
||||
}
|
||||
|
||||
if (titanHeartSet && StealthStrikeAvailable() && item.Calamity().rogue)
|
||||
{
|
||||
knockback *= 2f;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -5278,7 +5286,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (screwdriver)
|
||||
{
|
||||
if (proj.penetrate > 1 || proj.penetrate == -1)
|
||||
damageMult += 0.1;
|
||||
damageMult += 0.05;
|
||||
}
|
||||
|
||||
if (auricSet && godSlayerDamage && isTrueMelee)
|
||||
@@ -5711,7 +5719,7 @@ namespace CalamityMod.CalPlayer
|
||||
contactDamageReduction += 0.1;
|
||||
|
||||
if (vHex)
|
||||
contactDamageReduction -= 0.3;
|
||||
contactDamageReduction -= 0.1;
|
||||
|
||||
if (irradiated)
|
||||
contactDamageReduction -= 0.1;
|
||||
@@ -6153,7 +6161,7 @@ namespace CalamityMod.CalPlayer
|
||||
projectileDamageReduction += 0.1;
|
||||
|
||||
if (vHex)
|
||||
projectileDamageReduction -= 0.3;
|
||||
projectileDamageReduction -= 0.1;
|
||||
|
||||
if (irradiated)
|
||||
projectileDamageReduction -= 0.1;
|
||||
@@ -6723,46 +6731,43 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region On Hit
|
||||
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
||||
{
|
||||
if (sulfurSet)
|
||||
npc.AddBuff(BuffID.Poisoned, 120);
|
||||
#region On Hit
|
||||
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
||||
{
|
||||
if (sulfurSet)
|
||||
npc.AddBuff(BuffID.Poisoned, 120);
|
||||
|
||||
if (CalamityWorld.revenge || CalamityWorld.malice)
|
||||
{
|
||||
if (npc.type == NPCID.ShadowFlameApparition || (npc.type == NPCID.ChaosBall && (Main.hardMode || areThereAnyDamnBosses)))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.Spazmatism && npc.ai[0] != 1f && npc.ai[0] != 2f && npc.ai[0] != 0f)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 300);
|
||||
}
|
||||
else if (npc.type == NPCID.Plantera && npc.life < npc.lifeMax / 2)
|
||||
{
|
||||
player.AddBuff(BuffID.Poisoned, 180);
|
||||
player.AddBuff(BuffID.Venom, 180);
|
||||
player.AddBuff(BuffID.Bleeding, 300);
|
||||
}
|
||||
else if (npc.type == NPCID.PlanterasTentacle)
|
||||
{
|
||||
player.AddBuff(BuffID.Poisoned, 120);
|
||||
player.AddBuff(BuffID.Venom, 120);
|
||||
player.AddBuff(BuffID.Bleeding, 180);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientDoom)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Shadowflame>(), 120);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientLight)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (npc.type == NPCID.ShadowFlameApparition || (npc.type == NPCID.ChaosBall && (Main.hardMode || areThereAnyDamnBosses)))
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
|
||||
}
|
||||
else if (npc.type == NPCID.Spazmatism && npc.ai[0] != 1f && npc.ai[0] != 2f && npc.ai[0] != 0f)
|
||||
{
|
||||
player.AddBuff(BuffID.Bleeding, 300);
|
||||
}
|
||||
else if (npc.type == NPCID.Plantera && npc.life < npc.lifeMax / 2)
|
||||
{
|
||||
player.AddBuff(BuffID.Poisoned, 180);
|
||||
player.AddBuff(BuffID.Venom, 180);
|
||||
player.AddBuff(BuffID.Bleeding, 300);
|
||||
}
|
||||
else if (npc.type == NPCID.PlanterasTentacle)
|
||||
{
|
||||
player.AddBuff(BuffID.Poisoned, 120);
|
||||
player.AddBuff(BuffID.Venom, 120);
|
||||
player.AddBuff(BuffID.Bleeding, 180);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientDoom)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<Shadowflame>(), 120);
|
||||
}
|
||||
else if (npc.type == NPCID.AncientLight)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile proj, int damage, bool crit)
|
||||
{
|
||||
@@ -6781,7 +6786,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if ((CalamityWorld.revenge || CalamityWorld.malice) && proj.hostile)
|
||||
if (proj.hostile)
|
||||
{
|
||||
if (proj.type == ProjectileID.Explosives)
|
||||
{
|
||||
@@ -7427,7 +7432,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (npcDist < freezeDist)
|
||||
{
|
||||
float duration = Main.rand.Next(30 + (int)damage / 3, 80 + (int)damage / 2);
|
||||
float duration = Main.rand.Next(10 + (int)damage / 4, 20 + (int)damage / 3);
|
||||
if (duration > 120)
|
||||
duration = 120;
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<GlacialState>(), (int)duration, false);
|
||||
}
|
||||
}
|
||||
@@ -8043,7 +8051,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<GlacialState>(), 300);
|
||||
npc.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
|
||||
@@ -1483,7 +1483,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (!npc.buffImmune[buffType] && Vector2.Distance(player.Center, npc.Center) <= freezeDist)
|
||||
{
|
||||
if (npc.FindBuffIndex(buffType) == -1)
|
||||
npc.AddBuff(buffType, 120, false);
|
||||
npc.AddBuff(buffType, 60, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2801,7 +2801,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.vHex)
|
||||
{
|
||||
player.blind = true;
|
||||
player.statDefense -= 30;
|
||||
player.statDefense -= 10;
|
||||
player.moveSpeed -= 0.1f;
|
||||
|
||||
if (player.wingTimeMax < 0)
|
||||
@@ -4013,7 +4013,7 @@ namespace CalamityMod.CalPlayer
|
||||
private static void EnduranceReductions(Player player, CalamityPlayer modPlayer)
|
||||
{
|
||||
if (modPlayer.vHex)
|
||||
player.endurance -= 0.3f;
|
||||
player.endurance -= 0.1f;
|
||||
|
||||
if (modPlayer.irradiated)
|
||||
player.endurance -= 0.1f;
|
||||
|
||||
@@ -743,10 +743,6 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffType<HolyFlames>(), duration, false);
|
||||
target.AddBuff(BuffType<Plague>(), duration, false);
|
||||
target.AddBuff(BuffType<BrimstoneFlames>(), duration, false);
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
target.AddBuff(BuffType<GlacialState>(), duration, false);
|
||||
}
|
||||
}
|
||||
if (modPlayer.cryogenSoul || modPlayer.frostFlare)
|
||||
{
|
||||
@@ -764,9 +760,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<AbyssalFlames>());
|
||||
}
|
||||
|
||||
if (modPlayer.auricSet && modPlayer.godSlayerDamage && Main.rand.NextBool(4) && proj)
|
||||
target.AddBuff(BuffType<SilvaStun>(), 60);
|
||||
}
|
||||
if (modPlayer.armorCrumbling || modPlayer.armorShattering)
|
||||
{
|
||||
@@ -823,7 +816,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.tearMinions)
|
||||
{
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 60);
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 30);
|
||||
}
|
||||
|
||||
if (modPlayer.shadowMinions)
|
||||
@@ -896,10 +889,6 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffType<HolyFlames>(), duration, false);
|
||||
target.AddBuff(BuffType<Plague>(), duration, false);
|
||||
target.AddBuff(BuffType<BrimstoneFlames>(), duration, false);
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
target.AddBuff(BuffType<GlacialState>(), duration, false);
|
||||
}
|
||||
}
|
||||
if (modPlayer.aWeapon)
|
||||
{
|
||||
@@ -917,8 +906,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
CalamityUtils.Inflict246DebuffsPvp(target, BuffID.OnFire, 4f);
|
||||
}
|
||||
if (modPlayer.auricSet && modPlayer.godSlayerDamage && Main.rand.NextBool(4) && proj)
|
||||
target.AddBuff(BuffType<SilvaStun>(), 60);
|
||||
}
|
||||
if (modPlayer.armorCrumbling || modPlayer.armorShattering)
|
||||
{
|
||||
@@ -972,7 +959,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.tearMinions)
|
||||
{
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 60);
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 30);
|
||||
}
|
||||
|
||||
if (modPlayer.shadowMinions)
|
||||
|
||||
@@ -258,6 +258,7 @@ namespace CalamityMod
|
||||
|
||||
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
|
||||
SkyManager.Instance["CalamityMod:Cryogen"] = new CryogenSky();
|
||||
SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky();
|
||||
|
||||
CalamityShaders.LoadShaders();
|
||||
|
||||
|
||||
@@ -13,14 +13,12 @@ namespace CalamityMod.Dusts
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
//update position
|
||||
// Update position
|
||||
dust.position += dust.velocity;
|
||||
|
||||
dust.scale -= 0.02f;
|
||||
if (dust.scale < 0.1f)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class CeaselessDust : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
float scale = dust.scale;
|
||||
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f), scale * 0.4f, scale * 0.1f, scale);
|
||||
|
||||
dust.position += dust.velocity;
|
||||
dust.velocity *= 0.95f;
|
||||
dust.scale -= 0.05f;
|
||||
|
||||
if (dust.scale <= 0.05f)
|
||||
dust.active = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Dust dust, Color lightColor)
|
||||
{
|
||||
int newColor = (int)(250f * dust.scale);
|
||||
return new Color(newColor, newColor, newColor, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 204 B |
@@ -1570,7 +1570,7 @@ namespace CalamityMod.Items
|
||||
public override void HorizontalWingSpeeds(Item item, Player player, ref float speed, ref float acceleration)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
float moveSpeedBoost = modPlayer.moveSpeedStat * 0.0015f;
|
||||
float moveSpeedBoost = modPlayer.moveSpeedStat * 0.001f;
|
||||
|
||||
float flightSpeedMult = 1f +
|
||||
(modPlayer.soaring ? 0.1f : 0f) +
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
DisplayName.SetDefault("Cinnamon Roll");
|
||||
Tooltip.SetDefault(@"A great-tasting cinnamon whiskey with a touch of cream soda
|
||||
Boosts mana regeneration rate and all fire-based weapon damage by 15%
|
||||
Boosts mana regeneration rate and multiplies all fire-based weapon damage by 1.1
|
||||
Cursed flame, shadowflame, god slayer inferno, brimstone flame, and frostburn weapons will not receive this benefit
|
||||
The weapon must be more fire-related than anything else
|
||||
Reduces defense by 10%");
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
DisplayName.SetDefault("Evergreen Gin");
|
||||
Tooltip.SetDefault(@"It tastes like a Christmas tree if you can imagine that
|
||||
Boosts nature-based weapon damage by 15% and damage reduction by 5%
|
||||
Multiplies nature-based weapon damage by 1.1 and increases damage reduction by 5%
|
||||
Reduces life regen by 1");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
DisplayName.SetDefault("Fireball");
|
||||
Tooltip.SetDefault(@"A great-tasting cinnamon whiskey
|
||||
Boosts all fire-based weapon damage by 10%
|
||||
Multiplies all fire-based weapon damage by 1.05
|
||||
Cursed flame, shadowflame, god slayer inferno, brimstone flame, and frostburn weapons will not receive this benefit
|
||||
The weapon must be more fire-related than anything else
|
||||
Reduces life regen by 1");
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
DisplayName.SetDefault("Screwdriver");
|
||||
Tooltip.SetDefault(@"Do you have a screw loose?
|
||||
Boosts piercing projectile damage by 10%
|
||||
Multiplies piercing projectile damage by 1.05
|
||||
Reduces life regen by 1");
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.05);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 308;
|
||||
item.damage = 230;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 116;
|
||||
item.damage = 87;
|
||||
item.magic = true;
|
||||
item.mana = 20;
|
||||
item.width = 72;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 400;
|
||||
item.damage = 300;
|
||||
item.magic = true;
|
||||
item.mana = 78;
|
||||
item.width = 38;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 142;
|
||||
item.damage = 200;
|
||||
item.magic = true;
|
||||
item.mana = 10;
|
||||
item.width = 20;
|
||||
@@ -30,13 +30,13 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
item.knockBack = 4f;
|
||||
item.value = Item.buyPrice(1, 80, 0, 0);
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.autoReuse = true;
|
||||
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<T1000Proj>();
|
||||
item.shootSpeed = 24f;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<Purge>());
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>());
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class TheWand : ModItem
|
||||
{
|
||||
public static int BaseDamage = 799;
|
||||
public static int BaseDamage = 599;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 206;
|
||||
item.damage = 155;
|
||||
item.magic = true;
|
||||
item.mana = 42;
|
||||
item.width = 90;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 100;
|
||||
item.damage = 75;
|
||||
item.magic = true;
|
||||
item.mana = 60;
|
||||
item.width = 130;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 150;
|
||||
item.damage = 125;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 16;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
|
||||
int p = Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<DarkIceZero>(), (int)(item.damage * player.MeleeDamage()), knockBack * 3f, player.whoAmI);
|
||||
Main.projectile[p].Kill();
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
|
||||
int p = Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<DarkIceZero>(), (int)(item.damage * player.MeleeDamage()), 12f, player.whoAmI);
|
||||
Main.projectile[p].Kill();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 102;
|
||||
item.damage = 200;
|
||||
item.damage = 150;
|
||||
item.melee = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 15;
|
||||
@@ -34,8 +34,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.UseSound = SoundID.Item60;
|
||||
item.autoReuse = true;
|
||||
item.height = 102;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.shoot = ModContent.ProjectileType<EonBeam>();
|
||||
item.shootSpeed = 28f;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 94;
|
||||
item.height = 92;
|
||||
item.melee = true;
|
||||
item.damage = 1460;
|
||||
item.damage = 1095;
|
||||
item.knockBack = 2.5f;
|
||||
item.useAnimation = 19;
|
||||
item.useTime = 19;
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 420);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 360);
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 420);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 420);
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 360);
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 80;
|
||||
item.damage = 2000;
|
||||
item.damage = 1500;
|
||||
item.useAnimation = 14;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = 14;
|
||||
|
||||
@@ -29,7 +29,7 @@ Summons a barrage of petals and waterfalls on enemy hits");
|
||||
item.width = 76;
|
||||
item.height = 82;
|
||||
item.melee = true;
|
||||
item.damage = 1800;
|
||||
item.damage = 1350;
|
||||
item.knockBack = 9f;
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 20;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 320;
|
||||
item.damage = 240;
|
||||
item.knockBack = 7.5f;
|
||||
item.useAnimation = item.useTime = 25;
|
||||
item.melee = true;
|
||||
|
||||
@@ -147,9 +147,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 240);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 240);
|
||||
target.AddBuff(BuffID.CursedInferno, 240);
|
||||
@@ -167,9 +166,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 240);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 240);
|
||||
target.AddBuff(BuffID.CursedInferno, 240);
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 12;
|
||||
item.width = 56;
|
||||
item.height = 56;
|
||||
item.damage = 1080;
|
||||
item.damage = 810;
|
||||
item.melee = true;
|
||||
item.knockBack = 9.9f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
|
||||
@@ -14,14 +14,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
DisplayName.SetDefault("Glacial Crusher");
|
||||
Tooltip.SetDefault("Fires very slow frost projectiles that gain strength as they travel and freeze enemies\n" +
|
||||
"Enemies are frozen for longer the further the projectile travels\n" +
|
||||
"True melee strikes cause tremendous damage to frozen enemies\n" +
|
||||
"Enemies that cannot be frozen take increased damage");
|
||||
"True melee strikes cause tremendous damage to frozen enemies");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 60;
|
||||
item.damage = 65;
|
||||
item.damage = 120;
|
||||
item.melee = true;
|
||||
item.useAnimation = 27;
|
||||
item.useTime = 27;
|
||||
@@ -40,19 +39,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 67);
|
||||
}
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 67);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref float knockBack, ref bool crit)
|
||||
{
|
||||
if (target.buffImmune[ModContent.BuffType<GlacialState>()])
|
||||
{
|
||||
damage *= 2;
|
||||
knockBack *= 2f;
|
||||
}
|
||||
else if (target.Calamity().gState > 0)
|
||||
if (target.Calamity().gState > 0)
|
||||
{
|
||||
damage *= 3;
|
||||
knockBack *= 3f;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.height = 128;
|
||||
item.width = 56;
|
||||
item.damage = 8001;
|
||||
item.damage = 6001;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Oracle : ModItem
|
||||
{
|
||||
public const int YoyoBaseDamage = 150;
|
||||
public const int AuraBaseDamage = 50;
|
||||
public const int AuraMaxDamage = 160;
|
||||
public const int YoyoBaseDamage = 115;
|
||||
public const int AuraBaseDamage = 40;
|
||||
public const int AuraMaxDamage = 120;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -136,7 +136,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(BuffID.CursedInferno, 120);
|
||||
@@ -148,7 +147,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
target.AddBuff(BuffID.CursedInferno, 120);
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 480);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 480);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 480);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 480);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 480);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 480);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 480);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 480);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<TemporalSadness>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<TemporalSadness>(), 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,19 +63,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
|
||||
if (!target.canGhostHeal || player.moonLeech)
|
||||
return;
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 62;
|
||||
item.damage = 80;
|
||||
item.damage = 60;
|
||||
item.melee = true;
|
||||
item.useTime = 15;
|
||||
item.useAnimation = 15;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 639;
|
||||
item.damage = 479;
|
||||
item.ranged = true;
|
||||
item.width = 48;
|
||||
item.height = 30;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 120;
|
||||
item.damage = 90;
|
||||
item.ranged = true;
|
||||
item.width = 76;
|
||||
item.height = 24;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 105;
|
||||
item.damage = 78;
|
||||
item.ranged = true;
|
||||
item.width = 64;
|
||||
item.height = 28;
|
||||
|
||||
@@ -24,7 +24,7 @@ Right click to fire two devastating barrages of five empowered fireballs.
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 280;
|
||||
item.damage = 210;
|
||||
item.knockBack = 1f;
|
||||
item.shootSpeed = 18f;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 240;
|
||||
item.damage = 180;
|
||||
item.ranged = true;
|
||||
item.width = 44;
|
||||
item.height = 58;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 580;
|
||||
item.damage = 435;
|
||||
item.ranged = true;
|
||||
item.width = 84;
|
||||
item.height = 30;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 100;
|
||||
item.damage = 75;
|
||||
item.ranged = true;
|
||||
item.width = 84;
|
||||
item.height = 30;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 1680;
|
||||
item.damage = 1260;
|
||||
item.knockBack = 9.5f;
|
||||
item.ranged = true;
|
||||
item.useTime = 55;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 452;
|
||||
item.damage = 340;
|
||||
item.knockBack = 6f;
|
||||
item.useAnimation = item.useTime = 20;
|
||||
item.Calamity().rogue = true;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
}
|
||||
|
||||
// Gains 10% of missing health as base damage.
|
||||
public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public override void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
int lifeAmount = player.statLifeMax2 - player.statLife;
|
||||
flat += lifeAmount * 0.1f * player.RogueDamage();
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 5f / 9f : 1f;
|
||||
public override float SafeSetUseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 5f / 9f : 1f;
|
||||
|
||||
public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public override void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
mult += flexMult - 1f;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
type = ModContent.ProjectileType<EclipsesStealth>();
|
||||
damage = (int)(damage * 0.6);
|
||||
damage = (int)(damage * 0.36);
|
||||
}
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
|
||||
@@ -57,11 +57,13 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && counter == 0 && stealth.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
bool usingStealth = player.Calamity().StealthStrikeAvailable() && counter == 0;
|
||||
if (usingStealth)
|
||||
damage *= 2;
|
||||
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (usingStealth && stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
counter++;
|
||||
if (counter >= item.useAnimation / item.useTime)
|
||||
|
||||
@@ -16,9 +16,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
"Stealth strikes perform a horizontal swing that leaves a lingering fire aura\n" +
|
||||
"Stealth strikes performed while pressing up fling yourself at the enemy and slice through them, causing homing fireballs to emerge");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 2000;
|
||||
item.damage = 1500;
|
||||
item.Calamity().rogue = true;
|
||||
item.width = 78;
|
||||
item.height = 66;
|
||||
@@ -38,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] +
|
||||
player.ownedProjectileCounts[ProjectileType<FinalDawnFireSlash>()] +
|
||||
player.ownedProjectileCounts[ProjectileType<FinalDawnHorizontalSlash>()] +
|
||||
|
||||
@@ -49,7 +49,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
damage = (int)(damage * 1.55);
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable() && player.itemAnimation == item.useAnimation - 1) //setting up the stealth strikes
|
||||
{
|
||||
{
|
||||
damage *= 2;
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<HypothermiaChunk>(), damage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position, currentDirection, type, damage, knockBack + 6f, player.whoAmI);
|
||||
int p = Projectile.NewProjectile(position, currentDirection, type, (int)(damage * 1.8), knockBack + 6f, player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float UseTimeMultiplier (Player player)
|
||||
public override float SafeSetUseTimeMultiplier(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
return 1f;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override float UseTimeMultiplier (Player player)
|
||||
public override float SafeSetUseTimeMultiplier(Player player)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse == 2)
|
||||
return 1f;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
damage = (int)(damage * 1.22);
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -43,6 +43,7 @@ Stealth strikes continuously leave spectral clones in their wake");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
damage = (int)(damage * 1.22);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 72;
|
||||
item.damage = 400;
|
||||
item.damage = 300;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 13;
|
||||
|
||||
@@ -78,10 +78,12 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
// Add both the player's dedicated rogue damage and stealth strike damage as applicable.
|
||||
// Rogue weapons are internally throwing so they already benefit from throwing damage boosts.
|
||||
// 5E-06 to prevent downrounding is not needed anymore, added by TML itself
|
||||
public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public sealed override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
CalamityPlayer mp = player.Calamity();
|
||||
|
||||
SafeModifyWeaponDamage(player, ref add, ref mult, ref flat);
|
||||
|
||||
// Both regular rogue damage stat and stealth damage are added to the weapon simultaneously.
|
||||
add += mp.throwingDamage + mp.stealthDamage - 1f;
|
||||
|
||||
@@ -90,6 +92,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
mult += StealthStrikePrefixBonus - 1f;
|
||||
}
|
||||
|
||||
public virtual void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { }
|
||||
|
||||
// Simply add the player's dedicated rogue crit chance.
|
||||
// Rogue crit isn't boosted by Calamity universal crit boosts, so this won't double-add universal crit.
|
||||
public override void GetWeaponCrit(Player player, ref int crit)
|
||||
@@ -97,9 +101,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
crit += player.Calamity().throwingCrit;
|
||||
}
|
||||
|
||||
public override float UseTimeMultiplier(Player player)
|
||||
public sealed override float UseTimeMultiplier(Player player)
|
||||
{
|
||||
float rogueAS = 1f;
|
||||
float baseMultiplier = SafeSetUseTimeMultiplier(player);
|
||||
float rogueAS = baseMultiplier == -1f ? 1f : baseMultiplier;
|
||||
if (player.Calamity().gloveOfPrecision)
|
||||
rogueAS -= 0.2f;
|
||||
if (player.Calamity().gloveOfRecklessness)
|
||||
@@ -109,6 +114,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return rogueAS;
|
||||
}
|
||||
|
||||
public virtual float SafeSetUseTimeMultiplier(Player player) => -1f;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
TooltipLine damageTooltip = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria");
|
||||
|
||||
@@ -21,7 +21,7 @@ Stealth strikes release energy as they fly");
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 34;
|
||||
item.damage = 900;
|
||||
item.damage = 675;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 24;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.mana = 100;
|
||||
item.damage = 1200;
|
||||
item.damage = 900;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.width = 74;
|
||||
item.height = 72;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
@@ -70,27 +71,45 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead)
|
||||
{
|
||||
npc.TargetClosest(true);
|
||||
}
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
bool malice = CalamityWorld.malice;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || malice;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive || malice;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive || malice;
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState)
|
||||
{
|
||||
if (!detectsPlayer)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Scare"), (int)Main.player[npc.target].position.X, (int)Main.player[npc.target].position.Y);
|
||||
}
|
||||
|
||||
detectsPlayer = true;
|
||||
}
|
||||
npc.damage = 1500;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.damage = 0;
|
||||
}
|
||||
|
||||
npc.chaseable = detectsPlayer;
|
||||
|
||||
if (detectsPlayer)
|
||||
{
|
||||
if (npc.soundDelay <= 0 && Main.netMode != NetmodeID.Server)
|
||||
@@ -102,14 +121,12 @@ namespace CalamityMod.NPCs.Abyss
|
||||
else
|
||||
{
|
||||
if (Main.rand.NextBool(900) && Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), (int)npc.position.X, (int)npc.position.Y);
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.ai[2] > 0f)
|
||||
{
|
||||
npc.realLife = (int)npc.ai[2];
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (!TailSpawned && npc.ai[0] == 0f)
|
||||
@@ -148,8 +165,6 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (npc.localAI[0] >= 300f)
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
npc.TargetClosest(true);
|
||||
npc.netUpdate = true;
|
||||
int damage = Main.expertMode ? 300 : 400;
|
||||
float xPos = Main.rand.NextBool(2) ? npc.position.X + 200f : npc.position.X - 200f;
|
||||
Vector2 vector2 = new Vector2(xPos, npc.position.Y + Main.rand.Next(-200, 201));
|
||||
@@ -214,13 +229,9 @@ namespace CalamityMod.NPCs.Abyss
|
||||
}
|
||||
|
||||
if (npc.velocity.X < 0f)
|
||||
{
|
||||
npc.spriteDirection = -1;
|
||||
}
|
||||
else if (npc.velocity.X > 0f)
|
||||
{
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
|
||||
if (Main.player[npc.target].dead)
|
||||
{
|
||||
@@ -242,14 +253,10 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
npc.alpha -= 42;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType<EidolonWyrmTailHuge>()))
|
||||
{
|
||||
npc.active = false;
|
||||
}
|
||||
|
||||
float num188 = speed;
|
||||
float num189 = turnSpeed;
|
||||
@@ -264,7 +271,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (!detectsPlayer)
|
||||
{
|
||||
num192 += 800;
|
||||
if (Math.Abs(npc.Center.X - num191) < 400f) //500
|
||||
if (Math.Abs(npc.Center.X - num191) < 400f)
|
||||
{
|
||||
if (npc.velocity.X > 0f)
|
||||
{
|
||||
|
||||
+9
-35
@@ -4100,33 +4100,8 @@ namespace CalamityMod.NPCs
|
||||
else if (npc.timeLeft < 1800)
|
||||
npc.timeLeft = 1800;
|
||||
|
||||
// Detect active tiles around Ceaseless Void
|
||||
int radius = 30; // 30 tile radius
|
||||
int diameter = radius * 2;
|
||||
int npcCenterX = (int)(vector.X / 16f);
|
||||
int npcCenterY = (int)(vector.Y / 16f);
|
||||
Rectangle area = new Rectangle(npcCenterX - radius, npcCenterY - radius, diameter, diameter);
|
||||
int nearbyActiveTiles = 0; // 0 to 3600
|
||||
for (int x = area.Left; x < area.Right; x++)
|
||||
{
|
||||
for (int y = area.Top; y < area.Bottom; y++)
|
||||
{
|
||||
if (Main.tile[x, y] != null)
|
||||
{
|
||||
if (Main.tile[x, y].nactive() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type])
|
||||
nearbyActiveTiles++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Scale multiplier based on nearby active tiles
|
||||
float tileEnrageMult = 1f;
|
||||
if (nearbyActiveTiles < 1000)
|
||||
tileEnrageMult += (1000 - nearbyActiveTiles) * 0.0005f; // Ranges from 1f to 1.5f
|
||||
|
||||
// Maximize enrage during Malice Mode
|
||||
if (malice && !BossRushEvent.BossRushActive)
|
||||
tileEnrageMult = 1.5f;
|
||||
float tileEnrageMult = (malice && !BossRushEvent.BossRushActive) ? 1.25f : 1f;
|
||||
|
||||
// Set AI variable to be used by Dark Energies
|
||||
npc.ai[1] = tileEnrageMult;
|
||||
@@ -4134,14 +4109,11 @@ namespace CalamityMod.NPCs
|
||||
// Increase projectile fire rate based on number of nearby active tiles
|
||||
float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f));
|
||||
|
||||
// Decrease projectile time left based on number of nearby active tiles
|
||||
int baseProjectileTimeLeft = (int)(300f * tileEnrageMult);
|
||||
|
||||
// Succ attack
|
||||
if (!anyDarkEnergies)
|
||||
{
|
||||
// This is here because it's used in multiple places
|
||||
float suckDistance = (malice ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f) * tileEnrageMult;
|
||||
float suckDistance = malice ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f;
|
||||
|
||||
// Move closer to the target before trying to succ
|
||||
if (movingDuringSuccPhase)
|
||||
@@ -4195,9 +4167,8 @@ namespace CalamityMod.NPCs
|
||||
if (Main.rand.NextBool(var))
|
||||
{
|
||||
dustOffset = dustOffset.RotatedBy(angleIncrement);
|
||||
int dust = Dust.NewDust(vector, 1, 1, (int)CalamityDusts.PurpleCosmolite);
|
||||
int dust = Dust.NewDust(vector, 1, 1, ModContent.DustType<CeaselessDust>());
|
||||
Main.dust[dust].position = vector + dustOffset;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].fadeIn = 1f;
|
||||
Main.dust[dust].velocity = Vector2.Normalize(vector - Main.dust[dust].position) * dustVelocity;
|
||||
Main.dust[dust].scale = 3f - h;
|
||||
@@ -4241,7 +4212,11 @@ namespace CalamityMod.NPCs
|
||||
npc.HealEffect(-damageAmt, true);
|
||||
|
||||
if (npc.life <= 0)
|
||||
npc.StrikeNPCNoInteraction(9999, 0f, 0);
|
||||
{
|
||||
npc.life = 0;
|
||||
npc.HitEffect();
|
||||
npc.checkDead();
|
||||
}
|
||||
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
@@ -4257,8 +4232,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < numBeamPortals; i++)
|
||||
{
|
||||
float ai1 = i * degrees;
|
||||
int proj = Projectile.NewProjectile(player.Center.X + (float)(Math.Sin(i * degrees) * beamPortalDistance), player.Center.Y + (float)(Math.Cos(i * degrees) * beamPortalDistance), 0f, 0f, type, damage, 0f, player.whoAmI, ai1, 0f);
|
||||
Main.projectile[proj].timeLeft = baseProjectileTimeLeft / 2;
|
||||
Projectile.NewProjectile(player.Center.X + (float)(Math.Sin(i * degrees) * beamPortalDistance), player.Center.Y + (float)(Math.Cos(i * degrees) * beamPortalDistance), 0f, 0f, type, damage, 0f, player.whoAmI, ai1, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+26
-10
@@ -3521,7 +3521,7 @@ namespace CalamityMod.NPCs
|
||||
npc.velocity *= 0.85f;
|
||||
else if (slowed > 0 || tesla > 0 || vaporfied > 0)
|
||||
npc.velocity *= 0.9f;
|
||||
else if (kamiFlu > 0)
|
||||
else if (kamiFlu > 420)
|
||||
npc.velocity = Vector2.Clamp(npc.velocity, new Vector2(-KamiDebuff.MaxNPCSpeed), new Vector2(KamiDebuff.MaxNPCSpeed));
|
||||
}
|
||||
}
|
||||
@@ -3692,7 +3692,12 @@ namespace CalamityMod.NPCs
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
}
|
||||
else if (DevourerOfGodsIDs.Contains(npc.type))
|
||||
else if (npc.type == NPCType<SCalWormHeart>())
|
||||
{
|
||||
GrenadeResist(projectile, ref damage);
|
||||
PierceResistGlobal(projectile, ref damage);
|
||||
}
|
||||
else if (DevourerOfGodsIDs.Contains(npc.type))
|
||||
{
|
||||
// No grenade or global pierce resist here, body DR covers this appropriately
|
||||
|
||||
@@ -3708,11 +3713,20 @@ namespace CalamityMod.NPCs
|
||||
else if (projectile.type == ProjectileType<DarkSparkBeam>())
|
||||
damage = (int)(damage * 0.85);
|
||||
}
|
||||
else if (CosmicGuardianIDs.Contains(npc.type) || npc.type == NPCType<DarkEnergy>())
|
||||
else if (CosmicGuardianIDs.Contains(npc.type))
|
||||
{
|
||||
GrenadeResist(projectile, ref damage);
|
||||
PierceResistGlobal(projectile, ref damage);
|
||||
}
|
||||
else if (npc.type == NPCType<DarkEnergy>())
|
||||
{
|
||||
// 50% resist to Nuclear Fury
|
||||
if (projectile.type == ProjectileType<NuclearFuryProjectile>())
|
||||
damage = (int)(damage * 0.5);
|
||||
|
||||
GrenadeResist(projectile, ref damage);
|
||||
PierceResistGlobal(projectile, ref damage);
|
||||
}
|
||||
else if (StormWeaverIDs.Contains(npc.type))
|
||||
{
|
||||
GrenadeResist(projectile, ref damage);
|
||||
@@ -3877,13 +3891,15 @@ namespace CalamityMod.NPCs
|
||||
if (projectile.IsSummon() || projectile.aiStyle == 99)
|
||||
return;
|
||||
|
||||
if (projectile.penetrate == -1)
|
||||
damage = (int)(damage * 0.5);
|
||||
else if (projectile.penetrate > 1)
|
||||
{
|
||||
float newBaseDamage = damage * (float)Math.Pow(0.9, projectile.penetrate) / projectile.Calamity().ResistDamagePenaltyHarshness;
|
||||
damage = (int)MathHelper.Clamp(newBaseDamage, damage * projectile.Calamity().ResistDamagePenaltyMinCapFactor, damage);
|
||||
}
|
||||
if (projectile.penetrate == -1)
|
||||
{
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
else if (projectile.penetrate > 1)
|
||||
{
|
||||
float newBaseDamage = damage * (float)Math.Pow(0.9, projectile.penetrate) / projectile.Calamity().ResistDamagePenaltyHarshness;
|
||||
damage = (int)MathHelper.Clamp(newBaseDamage, damage * projectile.Calamity().ResistDamagePenaltyMinCapFactor, damage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
// Distance from Ceaseless Void
|
||||
double maxDistance = malice ? 1200D : death ? 1040D : revenge ? 960D : expertMode ? 880D : minMaxDistance;
|
||||
double rateOfChangeIncrease = (maxDistance / minMaxDistance) - 1D;
|
||||
double rateOfChange = (npc.ai[1] * 0.5f) + 1D + tileEnrageMult + rateOfChangeIncrease;
|
||||
double rateOfChange = (npc.ai[1] * 0.5f) + 2D + (tileEnrageMult - 1f) + rateOfChangeIncrease;
|
||||
if (npc.Calamity().newAI[0] == 0f)
|
||||
{
|
||||
distance += rateOfChange;
|
||||
@@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
|
||||
// Rotation velocity
|
||||
float minRotationVelocity = 0.5f + tileEnrageMult - 1f;
|
||||
float rotationVelocityIncrease = malice ? 0.4f : death ? 0.2f : revenge ? 0.15f : expertMode ? 0.1f : 0f;
|
||||
float rotationVelocityIncrease = death ? 0.2f : revenge ? 0.15f : expertMode ? 0.1f : 0f;
|
||||
rotationVelocityIncrease += rotationVelocityIncrease * (npc.ai[1] * 0.5f);
|
||||
|
||||
// Rotate around Ceaseless Void
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -80,8 +80,6 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool expertMode = Main.expertMode;
|
||||
|
||||
if (invinceTime > 0)
|
||||
{
|
||||
invinceTime--;
|
||||
@@ -97,9 +95,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
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[2] > 0f)
|
||||
{
|
||||
npc.realLife = (int)npc.ai[2];
|
||||
}
|
||||
|
||||
bool flag = false;
|
||||
if (npc.ai[1] <= 0f)
|
||||
@@ -128,11 +124,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Main.dust[num935].noLight = true;
|
||||
}
|
||||
}
|
||||
|
||||
npc.alpha -= 42;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
@@ -144,6 +139,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
vector18.Y = (int)(vector18.Y / 16f) * 16;
|
||||
num191 -= vector18.X;
|
||||
num192 -= vector18.Y;
|
||||
|
||||
float num193 = (float)System.Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
@@ -155,7 +151,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
} catch
|
||||
{
|
||||
}
|
||||
npc.rotation = (float)System.Math.Atan2(num192, num191) + 1.57f;
|
||||
|
||||
npc.rotation = (float)System.Math.Atan2(num192, num191) + MathHelper.PiOver2;
|
||||
num193 = (float)System.Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
int num194 = npc.width;
|
||||
num193 = (num193 - num194) / num193;
|
||||
@@ -164,14 +161,11 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + num191;
|
||||
npc.position.Y = npc.position.Y + num192;
|
||||
|
||||
if (num191 < 0f)
|
||||
{
|
||||
npc.spriteDirection = -1;
|
||||
}
|
||||
else if (num191 > 0f)
|
||||
{
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,17 +237,22 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, hitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeBody1"), 1f);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeBody2"), 1f);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeBody3"), 1f);
|
||||
|
||||
npc.position.X = npc.position.X + (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (npc.height / 2);
|
||||
npc.width = 30;
|
||||
npc.height = 30;
|
||||
npc.position.X = npc.position.X - (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (npc.height / 2);
|
||||
|
||||
for (int num621 = 0; num621 < 20; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
|
||||
@@ -264,6 +263,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num623 = 0; num623 < 40; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
|
||||
|
||||
@@ -16,18 +16,24 @@ using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
[AutoloadBossHead]
|
||||
public class StormWeaverHeadNaked : ModNPC
|
||||
{
|
||||
private const float BoltAngleSpread = 280;
|
||||
private const float BoltAngleSpread = 280;
|
||||
private const float speed = 13f;
|
||||
private const float turnSpeed = 0.35f;
|
||||
private bool tail = false;
|
||||
private int invinceTime = 180;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
// Lightning flash variables
|
||||
public float lightning = 0f;
|
||||
private float lightningDecay = 1f;
|
||||
private float lightningSpeed = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Storm Weaver");
|
||||
NPCID.Sets.TrailingMode[npc.type] = 1;
|
||||
@@ -118,35 +124,30 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.dontTakeDamage = false;
|
||||
}
|
||||
|
||||
if (!Main.raining && !BossRushEvent.BossRushActive && CalamityWorld.DoGSecondStageCountdown <= 0)
|
||||
{
|
||||
if (!Main.raining)
|
||||
CalamityUtils.StartRain();
|
||||
}
|
||||
|
||||
double lifeRatio = npc.life / (double)npc.lifeMax;
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression;
|
||||
|
||||
int lifePercentage = (int)(100.0 * lifeRatio);
|
||||
// Start charging at the target
|
||||
bool phase2 = lifeRatio < 0.7f;
|
||||
|
||||
int BoltProjectiles = 2;
|
||||
if (lifePercentage < 33 || death)
|
||||
{
|
||||
BoltProjectiles = 4;
|
||||
}
|
||||
else if (lifePercentage < 66)
|
||||
{
|
||||
BoltProjectiles = 3;
|
||||
}
|
||||
// Lightning strike flash phase
|
||||
bool phase3 = lifeRatio < 0.4f;
|
||||
|
||||
// Become weak and cancel the storm
|
||||
bool phase4 = npc.life / (float)npc.lifeMax < 0.05f;
|
||||
|
||||
int boltProjectiles = (phase3 || death) ? 4 : phase2 ? 3 : 2;
|
||||
|
||||
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[2] > 0f)
|
||||
{
|
||||
npc.realLife = (int)npc.ai[2];
|
||||
}
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
@@ -168,9 +169,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
npc.alpha -= 12;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -199,7 +198,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
tail = true;
|
||||
}
|
||||
|
||||
if (expertMode)
|
||||
if (expertMode && !phase4)
|
||||
{
|
||||
npc.localAI[0] += malice ? 1.5f : 1f;
|
||||
if (npc.localAI[0] >= 450f)
|
||||
@@ -225,11 +224,11 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
npc.TargetClosest(false);
|
||||
|
||||
npc.velocity.Y = npc.velocity.Y - 10f;
|
||||
if ((double)npc.position.Y < Main.topWorld + 16f)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y - 10f;
|
||||
}
|
||||
|
||||
if ((double)npc.position.Y < Main.topWorld + 16f)
|
||||
{
|
||||
CalamityWorld.DoGSecondStageCountdown = 0;
|
||||
@@ -240,7 +239,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
for (int num957 = 0; num957 < 200; num957++)
|
||||
for (int num957 = 0; num957 < Main.maxNPCs; num957++)
|
||||
{
|
||||
if (Main.npc[num957].active && (Main.npc[num957].type == ModContent.NPCType<StormWeaverBodyNaked>()
|
||||
|| Main.npc[num957].type == ModContent.NPCType<StormWeaverHeadNaked>()
|
||||
@@ -262,7 +261,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
for (int num957 = 0; num957 < 200; num957++)
|
||||
for (int num957 = 0; num957 < Main.maxNPCs; num957++)
|
||||
{
|
||||
if (Main.npc[num957].type == ModContent.NPCType<StormWeaverBodyNaked>()
|
||||
|| Main.npc[num957].type == ModContent.NPCType<StormWeaverHeadNaked>()
|
||||
@@ -274,13 +273,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
}
|
||||
|
||||
if (npc.velocity.X < 0f)
|
||||
{
|
||||
npc.spriteDirection = -1;
|
||||
}
|
||||
else if (npc.velocity.X > 0f)
|
||||
{
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2);
|
||||
@@ -288,63 +283,67 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
float num188 = malice ? 15f : revenge ? 13f : 12f;
|
||||
float num189 = malice ? 0.36f : revenge ? 0.31f : 0.28f;
|
||||
|
||||
calamityGlobalNPC.newAI[0] += 1f;
|
||||
if (calamityGlobalNPC.newAI[0] >= 400f)
|
||||
// Start charging at the player when in phase 2
|
||||
if (phase2 && !phase4)
|
||||
{
|
||||
if (npc.localAI[1] == 0f)
|
||||
npc.localAI[1] = 1f;
|
||||
|
||||
if (calamityGlobalNPC.newAI[0] >= 500f)
|
||||
calamityGlobalNPC.newAI[0] += 1f;
|
||||
if (calamityGlobalNPC.newAI[0] >= 400f)
|
||||
{
|
||||
npc.TargetClosest();
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
if (npc.localAI[1] == 0f)
|
||||
npc.localAI[1] = 1f;
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
if (npc.localAI[1] == 2f)
|
||||
if (calamityGlobalNPC.newAI[0] >= 500f)
|
||||
{
|
||||
num188 += Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.01f * (1f - (float)lifeRatio);
|
||||
num189 += Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.0001f * (1f - (float)lifeRatio);
|
||||
num188 *= 2f;
|
||||
num189 *= 0.85f;
|
||||
|
||||
float stopChargeDistance = 800f * npc.localAI[2];
|
||||
if (stopChargeDistance < 0)
|
||||
{
|
||||
if (npc.Center.X < Main.player[npc.target].Center.X + stopChargeDistance)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.Center.X > Main.player[npc.target].Center.X + stopChargeDistance)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
}
|
||||
npc.TargetClosest();
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
|
||||
int dustAmt = 5;
|
||||
for (int num1474 = 0; num1474 < dustAmt; num1474++)
|
||||
if (revenge)
|
||||
{
|
||||
Vector2 vector171 = Vector2.Normalize(npc.velocity) * new Vector2((npc.width + 50) / 2f, npc.height) * 0.75f;
|
||||
vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)MathHelper.Pi / (float)dustAmt) + npc.Center;
|
||||
Vector2 value18 = ((float)(Main.rand.NextDouble() * MathHelper.Pi) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8);
|
||||
int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 206, value18.X, value18.Y, 100, default, 3f);
|
||||
Main.dust[num1475].noGravity = true;
|
||||
Main.dust[num1475].noLight = true;
|
||||
Main.dust[num1475].velocity /= 4f;
|
||||
Main.dust[num1475].velocity -= npc.velocity;
|
||||
if (npc.localAI[1] == 2f)
|
||||
{
|
||||
num188 += Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.01f * (0.7f - lifeRatio);
|
||||
num189 += Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.0001f * (0.7f - lifeRatio);
|
||||
num188 *= 2f;
|
||||
num189 *= 0.85f;
|
||||
|
||||
float stopChargeDistance = 800f * npc.localAI[2];
|
||||
if (stopChargeDistance < 0)
|
||||
{
|
||||
if (npc.Center.X < Main.player[npc.target].Center.X + stopChargeDistance)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.Center.X > Main.player[npc.target].Center.X + stopChargeDistance)
|
||||
{
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int dustAmt = 5;
|
||||
for (int num1474 = 0; num1474 < dustAmt; num1474++)
|
||||
{
|
||||
Vector2 vector171 = Vector2.Normalize(npc.velocity) * new Vector2((npc.width + 50) / 2f, npc.height) * 0.75f;
|
||||
vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)MathHelper.Pi / (float)dustAmt) + npc.Center;
|
||||
Vector2 value18 = ((float)(Main.rand.NextDouble() * MathHelper.Pi) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8);
|
||||
int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 206, value18.X, value18.Y, 100, default, 3f);
|
||||
Main.dust[num1475].noGravity = true;
|
||||
Main.dust[num1475].noLight = true;
|
||||
Main.dust[num1475].velocity /= 4f;
|
||||
Main.dust[num1475].velocity -= npc.velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (revenge)
|
||||
calamityGlobalNPC.newAI[0] += malice ? 4f : death ? 2f : 2f * (0.7f - lifeRatio);
|
||||
}
|
||||
else if (revenge)
|
||||
calamityGlobalNPC.newAI[0] += malice ? 4f : death ? 2f : 2f * (float)(1D - lifeRatio);
|
||||
|
||||
float num48 = num188 * 1.3f;
|
||||
float num49 = num188 * 0.7f;
|
||||
@@ -363,48 +362,72 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.localAI[1] == 1f)
|
||||
if (phase2 && !phase4)
|
||||
{
|
||||
npc.localAI[1] = 2f;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), (int)Main.player[npc.target].Center.X, (int)Main.player[npc.target].Center.Y);
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (npc.localAI[1] == 1f)
|
||||
{
|
||||
int speed2 = revenge ? 8 : 7;
|
||||
if (npc.Calamity().enraged > 0)
|
||||
// Play lightning sound on the target if not in phase 3
|
||||
Vector2 soundCenter = Main.player[npc.target].Center;
|
||||
|
||||
// Play lightning sound on all nearby players if in phase 3
|
||||
if (phase3 && Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
speed2 += 1;
|
||||
if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < 2800f)
|
||||
{
|
||||
soundCenter = Main.player[Main.myPlayer].Center;
|
||||
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), (int)soundCenter.X, (int)soundCenter.Y);
|
||||
|
||||
// Set how quickly the lightning flash dissipates
|
||||
lightningDecay = Main.rand.NextFloat() * 0.05f + 0.008f;
|
||||
|
||||
// Set how quickly the lightning flash intensifies
|
||||
lightningSpeed = Main.rand.NextFloat() * 0.05f + 0.05f;
|
||||
}
|
||||
}
|
||||
float spawnX2 = npc.Center.X > Main.player[npc.target].Center.X ? 1000f : -1000f;
|
||||
float spawnY2 = -1000f + Main.player[npc.target].Center.Y;
|
||||
Vector2 baseSpawn = new Vector2(spawnX2 + Main.player[npc.target].Center.X, spawnY2);
|
||||
Vector2 baseVelocity = Main.player[npc.target].Center - baseSpawn;
|
||||
baseVelocity.Normalize();
|
||||
baseVelocity *= speed2;
|
||||
for (int i = 0; i < BoltProjectiles; i++)
|
||||
else
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), (int)soundCenter.X, (int)soundCenter.Y);
|
||||
|
||||
npc.localAI[1] = 2f;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 source = baseSpawn;
|
||||
source.X += i * 30 - (BoltProjectiles * 15);
|
||||
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 = 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);
|
||||
int speed2 = revenge ? 8 : 7;
|
||||
if (npc.Calamity().enraged > 0)
|
||||
speed2 += 1;
|
||||
|
||||
float spawnX2 = npc.Center.X > Main.player[npc.target].Center.X ? 1000f : -1000f;
|
||||
float spawnY2 = -1000f + Main.player[npc.target].Center.Y;
|
||||
Vector2 baseSpawn = new Vector2(spawnX2 + Main.player[npc.target].Center.X, spawnY2);
|
||||
Vector2 baseVelocity = Main.player[npc.target].Center - baseSpawn;
|
||||
baseVelocity.Normalize();
|
||||
baseVelocity *= speed2;
|
||||
|
||||
for (int i = 0; i < boltProjectiles; i++)
|
||||
{
|
||||
Vector2 source = baseSpawn;
|
||||
source.X += i * 30f - (boltProjectiles * 15f);
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-BoltAngleSpread / 2 + (BoltAngleSpread * i / boltProjectiles)));
|
||||
velocity.X = velocity.X + 3f * Main.rand.NextFloat() - 1.5f;
|
||||
Vector2 vector94 = Main.player[npc.target].Center - source;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if (revenge)
|
||||
npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * (num188 + Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.01f * (0.7f - lifeRatio)) * 2f;
|
||||
|
||||
float chargeDirection = 0;
|
||||
if (npc.velocity.X < 0f)
|
||||
chargeDirection = -1f;
|
||||
else if (npc.velocity.X > 0f)
|
||||
chargeDirection = 1f;
|
||||
|
||||
npc.localAI[2] = chargeDirection;
|
||||
}
|
||||
|
||||
if (revenge)
|
||||
npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * (num188 + Vector2.Distance(Main.player[npc.target].Center, npc.Center) * 0.01f * (1f - (float)lifeRatio)) * 2f;
|
||||
|
||||
float chargeDirection = 0;
|
||||
if (npc.velocity.X < 0f)
|
||||
chargeDirection = -1f;
|
||||
else if (npc.velocity.X > 0f)
|
||||
chargeDirection = 1f;
|
||||
|
||||
npc.localAI[2] = chargeDirection;
|
||||
}
|
||||
|
||||
num191 = (int)(num191 / 16f) * 16;
|
||||
@@ -419,6 +442,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
float num198 = num188 / num193;
|
||||
num191 *= num198;
|
||||
num192 *= num198;
|
||||
|
||||
if ((npc.velocity.X > 0f && num191 > 0f) || (npc.velocity.X < 0f && num191 < 0f) || (npc.velocity.Y > 0f && num192 > 0f) || (npc.velocity.Y < 0f && num192 < 0f))
|
||||
{
|
||||
if (npc.velocity.X < num191)
|
||||
@@ -428,10 +452,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
else
|
||||
{
|
||||
if (npc.velocity.X > num191)
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X - num189;
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.velocity.Y < num192)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y + num189;
|
||||
@@ -439,31 +462,23 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
else
|
||||
{
|
||||
if (npc.velocity.Y > num192)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y - num189;
|
||||
}
|
||||
}
|
||||
|
||||
if (Math.Abs(num192) < num188 * 0.2 && ((npc.velocity.X > 0f && num191 < 0f) || (npc.velocity.X < 0f && num191 > 0f)))
|
||||
{
|
||||
if (npc.velocity.Y > 0f)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y + num189 * 2f;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y - num189 * 2f;
|
||||
}
|
||||
}
|
||||
|
||||
if (Math.Abs(num191) < num188 * 0.2 && ((npc.velocity.Y > 0f && num192 < 0f) || (npc.velocity.Y < 0f && num192 > 0f)))
|
||||
{
|
||||
if (npc.velocity.X > 0f)
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X + num189 * 2f; //changed from 2
|
||||
}
|
||||
npc.velocity.X = npc.velocity.X + num189 * 2f;
|
||||
else
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X - num189 * 2f; //changed from 2
|
||||
}
|
||||
npc.velocity.X = npc.velocity.X - num189 * 2f;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -471,50 +486,69 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (num196 > num197)
|
||||
{
|
||||
if (npc.velocity.X < num191)
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X + num189 * 1.1f; //changed from 1.1
|
||||
}
|
||||
npc.velocity.X = npc.velocity.X + num189 * 1.1f;
|
||||
else if (npc.velocity.X > num191)
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X - num189 * 1.1f; //changed from 1.1
|
||||
}
|
||||
npc.velocity.X = npc.velocity.X - num189 * 1.1f;
|
||||
|
||||
if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < num188 * 0.5)
|
||||
{
|
||||
if (npc.velocity.Y > 0f)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y + num189;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y - num189;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.velocity.Y < num192)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y + num189 * 1.1f;
|
||||
}
|
||||
else if (npc.velocity.Y > num192)
|
||||
{
|
||||
npc.velocity.Y = npc.velocity.Y - num189 * 1.1f;
|
||||
}
|
||||
|
||||
if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < num188 * 0.5)
|
||||
{
|
||||
if (npc.velocity.X > 0f)
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X + num189;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X - num189;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + 1.57f;
|
||||
}
|
||||
|
||||
npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
if (phase4)
|
||||
{
|
||||
// Become weak and stop the storm when in phase 4
|
||||
npc.localAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
CalamityMod.StopRain();
|
||||
}
|
||||
else if (phase3)
|
||||
{
|
||||
// Adjust lightning flash variables when in phase 3
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
if (lightningSpeed > 0f)
|
||||
{
|
||||
lightning += lightningSpeed;
|
||||
if (lightning >= 1f)
|
||||
{
|
||||
lightning = 1f;
|
||||
lightningSpeed = 0f;
|
||||
}
|
||||
}
|
||||
else if (lightning > 0f)
|
||||
lightning -= lightningDecay;
|
||||
}
|
||||
|
||||
// Start a storm when in third phase
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient || (Main.netMode == NetmodeID.SinglePlayer && Main.gameMenu))
|
||||
return;
|
||||
|
||||
CalamityUtils.StartRain(true, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
@@ -580,19 +614,20 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeHead1"), 1f);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeHead2"), 1f);
|
||||
|
||||
npc.position.X = npc.position.X + (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (npc.height / 2);
|
||||
npc.width = 30;
|
||||
npc.height = 30;
|
||||
npc.position.X = npc.position.X - (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (npc.height / 2);
|
||||
|
||||
for (int num621 = 0; num621 < 20; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
|
||||
@@ -603,6 +638,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num623 = 0; num623 < 40; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
|
||||
@@ -616,13 +652,12 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override bool CheckDead()
|
||||
{
|
||||
for (int num569 = 0; num569 < 200; num569++)
|
||||
for (int num569 = 0; num569 < Main.maxNPCs; num569++)
|
||||
{
|
||||
if (Main.npc[num569].active && (Main.npc[num569].type == ModContent.NPCType<StormWeaverBodyNaked>() || Main.npc[num569].type == ModContent.NPCType<StormWeaverTailNaked>()))
|
||||
{
|
||||
Main.npc[num569].life = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,9 +95,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
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[2] > 0f)
|
||||
{
|
||||
npc.realLife = (int)npc.ai[2];
|
||||
}
|
||||
|
||||
bool flag = false;
|
||||
if (npc.ai[1] <= 0f)
|
||||
@@ -126,11 +124,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Main.dust[num935].noLight = true;
|
||||
}
|
||||
}
|
||||
|
||||
npc.alpha -= 42;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
@@ -142,6 +139,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
vector18.Y = (int)(vector18.Y / 16f) * 16;
|
||||
num191 -= vector18.X;
|
||||
num192 -= vector18.Y;
|
||||
|
||||
float num193 = (float)System.Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
@@ -153,7 +151,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
} catch
|
||||
{
|
||||
}
|
||||
npc.rotation = (float)System.Math.Atan2(num192, num191) + 1.57f;
|
||||
|
||||
npc.rotation = (float)System.Math.Atan2(num192, num191) + MathHelper.PiOver2;
|
||||
num193 = (float)System.Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
int num194 = npc.width;
|
||||
num193 = (num193 - num194) / num193;
|
||||
@@ -162,14 +161,11 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + num191;
|
||||
npc.position.Y = npc.position.Y + num192;
|
||||
|
||||
if (num191 < 0f)
|
||||
{
|
||||
npc.spriteDirection = -1;
|
||||
}
|
||||
else if (num191 > 0f)
|
||||
{
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,20 +227,21 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeTail1"), 1f);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNudeTail2"), 1f);
|
||||
|
||||
npc.position.X = npc.position.X + (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (npc.height / 2);
|
||||
npc.width = 30;
|
||||
npc.height = 30;
|
||||
npc.position.X = npc.position.X - (npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (npc.height / 2);
|
||||
|
||||
for (int num621 = 0; num621 < 20; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
|
||||
@@ -255,6 +252,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num623 = 0; num623 < 40; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.width = 24;
|
||||
npc.height = 24;
|
||||
npc.defense = 0;
|
||||
npc.LifeMaxNERB(48000, 55200);
|
||||
npc.LifeMaxNERB(25600, 29440);
|
||||
npc.aiStyle = -1;
|
||||
aiType = -1;
|
||||
npc.knockBackResist = 0f;
|
||||
@@ -38,19 +38,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.netUpdate = true;
|
||||
return;
|
||||
}
|
||||
|
||||
npc.alpha -= 42;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<Celestus2>())
|
||||
{
|
||||
damage = (int)(damage * 0.66);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.damage = 0;
|
||||
npc.defense = 60;
|
||||
npc.DR_NERD(0.25f);
|
||||
npc.LifeMaxNERB(Main.expertMode ? 45000 : 28125, 51750);
|
||||
npc.LifeMaxNERB(Main.expertMode ? 24000 : 15000, 28000);
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
CalamityGlobalNPC global = npc.Calamity();
|
||||
global.multDRReductions.Add(BuffID.CursedInferno, 0.9f);
|
||||
npc.value = Item.buyPrice(10, 0, 0, 0);
|
||||
npc.LifeMaxNERB(1500000, 1725000);
|
||||
npc.LifeMaxNERB(1000000, 1150000);
|
||||
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
|
||||
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
|
||||
npc.aiStyle = -1;
|
||||
@@ -2146,14 +2146,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<SonOfYharon>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.DR_NERD(0.25f, null, null, null, true);
|
||||
CalamityGlobalNPC global = npc.Calamity();
|
||||
global.multDRReductions.Add(BuffID.CursedInferno, 0.9f);
|
||||
npc.LifeMaxNERB(360000, 414000);
|
||||
npc.LifeMaxNERB(240000, 276000);
|
||||
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
|
||||
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
|
||||
npc.aiStyle = -1;
|
||||
@@ -203,14 +203,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<SonOfYharon>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.DR_NERD(0.25f, null, null, null, true);
|
||||
CalamityGlobalNPC global = npc.Calamity();
|
||||
global.multDRReductions.Add(BuffID.CursedInferno, 0.9f);
|
||||
npc.LifeMaxNERB(360000, 414000);
|
||||
npc.LifeMaxNERB(240000, 276000);
|
||||
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
|
||||
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
|
||||
npc.aiStyle = -1;
|
||||
@@ -203,14 +203,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<SonOfYharon>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
|
||||
|
||||
@@ -2946,6 +2946,8 @@ namespace CalamityMod.NPCs.Yharon
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<TimeBoltKnife>())
|
||||
damage = (int)(damage * 0.85);
|
||||
if (projectile.type == ModContent.ProjectileType<ReaperProjectile>())
|
||||
damage = (int)(damage * 0.9);
|
||||
if (projectile.type == ModContent.ProjectileType<PhantasmalSoul>() || projectile.type == ModContent.ProjectileType<PhantasmalRuinProj>() || projectile.type == ModContent.ProjectileType<PhantasmalRuinGhost>())
|
||||
damage = (int)(damage * 0.95);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<DemonFlames>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60, true);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<DemonFlames>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 600, true);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60, true);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
else
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
target.AddBuff(BuffID.Frostburn, 360);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -96,7 +97,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -54,7 +55,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 120);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
target.immune[projectile.owner] = 5;
|
||||
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
|
||||
Vector2 vector80 = projectile.rotation.ToRotationVector2();
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 480);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
else if (snow)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), debuffTime / 2);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), debuffTime / 3);
|
||||
}
|
||||
else if (beach)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
else if (glow)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<TemporalSadness>(), debuffTime);
|
||||
target.AddBuff(ModContent.BuffType<TemporalSadness>(), debuffTime / 3);
|
||||
}
|
||||
else if (hell)
|
||||
{
|
||||
|
||||
@@ -176,15 +176,12 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.rarity < 2)
|
||||
{
|
||||
if (projectile.ai[1] >= 45f && (projectile.ai[0] != 1f || projectile.ai[0] != 2f))
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 120);
|
||||
}
|
||||
else if (projectile.ai[1] >= 45f && (projectile.ai[0] != 1f || projectile.ai[0] != 2f))
|
||||
{
|
||||
else
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 60);
|
||||
}
|
||||
projectile.ai[0] = 1f;
|
||||
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.netUpdate = true;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/ClamImpact"), (int)projectile.position.X, (int)projectile.position.Y);
|
||||
}
|
||||
|
||||
@@ -104,10 +104,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Player player = Main.player[projectile.owner];
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
if (projectile.localAI[1] <= 0f && projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<CosmicIceBurst>(), projectile.damage, 10f, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.NewProjectile(toSpawn, toTarget, ModContent.ProjectileType<GalaxyStar>(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner);
|
||||
}
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 360);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 360);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 360);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 360);
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 240);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
@@ -73,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.ai[1] = 5 + Main.rand.Next(-2, 3);
|
||||
target.immune[projectile.owner] = 0; //so that all blades can hit the enemy
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(BuffID.Frostburn, 180);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 480);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
target.AddBuff(BuffID.ShadowFlame, 300);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user