Merge branch 'master' into br-visuals
No files matched your search
@@ -89,6 +89,10 @@ namespace CalamityMod.Buffs
|
||||
//Vanilla buffs
|
||||
switch (type)
|
||||
{
|
||||
case BuffID.Archery:
|
||||
tip = "20% increased arrow speed and 1.05x arrow damage";
|
||||
break;
|
||||
|
||||
case BuffID.Swiftness:
|
||||
tip = "15% increased movement speed";
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Cooldowns
|
||||
{
|
||||
public class DivineBlessCooldown : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Divine Recharge");
|
||||
Description.SetDefault("Your divine powers are recharging");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
canBeCleared = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().divineBlessCooldown = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 619 B |
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Cooldowns
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("God Slayer Cooldown");
|
||||
Description.SetDefault("Life regen is halved; godslayer effect is recharging");
|
||||
Description.SetDefault("God Slayer dash is recharging");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Cooldowns
|
||||
{
|
||||
public class UniverseSplitterCooldown : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Universe Splitter Cooldown");
|
||||
Description.SetDefault("You cannot use the Universe Splitter");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
canBeCleared = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 391 B |
@@ -0,0 +1,31 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class BanishingFire : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Banishing Fire");
|
||||
Description.SetDefault("You shall not be forgiven for your sins");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().banishingFire = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().banishingFire < npc.buffTime[buffIndex])
|
||||
npc.Calamity().banishingFire = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 567 B |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class SagePoison : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Sage Poison");
|
||||
Description.SetDefault("Poisoned");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().sagePoisonTime < npc.buffTime[buffIndex])
|
||||
npc.Calamity().sagePoisonTime = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 558 B |
@@ -20,5 +20,13 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
player.Calamity().vHex = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().vulnerabilityHex < npc.buffTime[buffIndex])
|
||||
npc.Calamity().vulnerabilityHex = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class LittleLightBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Little Light");
|
||||
Description.SetDefault("Endearing");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.lightPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
|
||||
player.Calamity().littleLightPet = true;
|
||||
bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<LittleLightProj>()] <= 0;
|
||||
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(player.Center, -Vector2.UnitY * 10f, ModContent.ProjectileType<LittleLightProj>(), 0, 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 571 B |
@@ -3,21 +3,22 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class ScarfMeleeBoost : ModBuff
|
||||
public class DivineBless : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Scarf Boost");
|
||||
Description.SetDefault("10% increased damage, 5% increased crit chance, and 5% increased melee speed");
|
||||
Main.debuff[Type] = false;
|
||||
DisplayName.SetDefault("Divine Bless");
|
||||
Description.SetDefault("Increased health regen and minions inflict Banishing Fire");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
canBeCleared = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().sMeleeBoost = true;
|
||||
player.Calamity().divineBless = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 684 B |
@@ -1,23 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class EvasionScarfBoost : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Evasion Scarf Boost");
|
||||
Description.SetDefault("10% increased damage, 10% increased crit chance, and 15% increased melee speed");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().eScarfBoost = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 547 B |
@@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 575 B |
@@ -7,8 +7,8 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Silva Invulnerability");
|
||||
Description.SetDefault("You are invulnerable");
|
||||
DisplayName.SetDefault("Silva Immunity");
|
||||
Description.SetDefault("You are unkillable and immune to most debuffs");
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class DaedalusGolemBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Daedalus Golem");
|
||||
Description.SetDefault("A crystal golem is following you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<DaedalusGolem>()] > 0)
|
||||
{
|
||||
modPlayer.daedalusGolem = true;
|
||||
}
|
||||
if (!modPlayer.daedalusGolem)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 506 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class DeathstareBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Miniature Eye of Cthulhu");
|
||||
Description.SetDefault("It's watching you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<DeathstareEyeball>()] > 0)
|
||||
{
|
||||
modPlayer.deathstareEyeball = true;
|
||||
}
|
||||
if (!modPlayer.deathstareEyeball)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 404 B |
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class EyeOfNightBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eye of Night");
|
||||
Description.SetDefault("It eerily watches");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<EyeOfNightSummon>()] > 0)
|
||||
modPlayer.eyeOfNight = true;
|
||||
|
||||
if (modPlayer.eyeOfNight)
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
else
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 543 B |
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class FleshOfInfidelityBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Flesh Ball");
|
||||
Description.SetDefault("Why is it following you?");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<FleshBallMinion>()] > 0)
|
||||
modPlayer.fleshBall = true;
|
||||
|
||||
if (modPlayer.fleshBall)
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
else
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 563 B |
@@ -0,0 +1,35 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class FlowersOfMortalityBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Flowers of Mortality");
|
||||
Description.SetDefault("Celestial blossoms surround you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<FlowersOfMortalityPetal>()] > 0)
|
||||
modPlayer.flowersOfMortality = true;
|
||||
|
||||
if (!modPlayer.flowersOfMortality)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 634 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class PerditionBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Perdition");
|
||||
Description.SetDefault("How unfortunate");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<PerditionBeacon>()] > 0)
|
||||
modPlayer.perditionBeacon = true;
|
||||
|
||||
if (!modPlayer.perditionBeacon)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 489 B |
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class SageSpiritBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Sage Spirit");
|
||||
Description.SetDefault("It's uncomfortably close");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
//Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SageSpirit>()] > 0)
|
||||
modPlayer.sageSpirit = true;
|
||||
|
||||
if (modPlayer.sageSpirit)
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
else
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 514 B |
@@ -0,0 +1,35 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class SoulSeekerBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Soul Seeker");
|
||||
Description.SetDefault("It definitely wants something from you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SeekerSummonProj>()] > 0)
|
||||
modPlayer.soulSeeker = true;
|
||||
|
||||
if (!modPlayer.soulSeeker)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 633 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class ViridVanguardBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Virid Vanguard");
|
||||
Description.SetDefault("A perfect act of unity surrounds you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ViridVanguardBlade>()] > 0)
|
||||
{
|
||||
modPlayer.viridVanguard = true;
|
||||
}
|
||||
if (!modPlayer.viridVanguard)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 660 B |
@@ -0,0 +1,35 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class WitherBlossomsBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Wither Blossoms");
|
||||
Description.SetDefault("Pestilence surrounds you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<WitherBlossom>()] > 0)
|
||||
modPlayer.witherBlossom = true;
|
||||
|
||||
if (!modPlayer.witherBlossom)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 567 B |
@@ -5,6 +5,7 @@ using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -472,32 +473,7 @@ namespace CalamityMod.CalPlayer
|
||||
int totalMoonlightDyes = drawPlayer.dye.Count(dyeItem => dyeItem.type == ModContent.ItemType<ProfanedMoonlightDye>());
|
||||
if (totalMoonlightDyes <= 0)
|
||||
return;
|
||||
float auroraCount = 5 + (int)MathHelper.Clamp(totalMoonlightDyes, 0f, 4f) * 2;
|
||||
float opacity = MathHelper.Clamp(totalMoonlightDyes / 3f, 0f, 1f);
|
||||
|
||||
opacity *= Main.dayTime ? 0.4f : 0.25f;
|
||||
|
||||
float time = Main.GlobalTime % 3f / 3f;
|
||||
Texture2D auroraTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/AuroraTexture");
|
||||
for (int i = 0; i < auroraCount; i++)
|
||||
{
|
||||
float incrementOffsetAngle = MathHelper.TwoPi * i / auroraCount;
|
||||
float xOffset = (float)Math.Sin(time * MathHelper.TwoPi + incrementOffsetAngle * 2f) * 20f;
|
||||
float yOffset = (float)Math.Sin(time * MathHelper.TwoPi + incrementOffsetAngle * 2f + MathHelper.ToRadians(60f)) * 6f;
|
||||
float rotation = (float)Math.Sin(incrementOffsetAngle) * MathHelper.Pi / 12f;
|
||||
Color color = GetCurrentMoonlightDyeColor(incrementOffsetAngle);
|
||||
Vector2 offset = new Vector2(xOffset, yOffset - 14f);
|
||||
DrawData drawData = new DrawData(auroraTexture,
|
||||
drawPlayer.Top + offset - Main.screenPosition,
|
||||
null,
|
||||
color * opacity,
|
||||
rotation + MathHelper.PiOver2,
|
||||
auroraTexture.Size() * 0.5f,
|
||||
0.135f,
|
||||
SpriteEffects.None,
|
||||
1);
|
||||
Main.playerDrawData.Add(drawData);
|
||||
}
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 5 + (int)MathHelper.Clamp(totalMoonlightDyes, 0f, 4f) * 2, MathHelper.Clamp(totalMoonlightDyes / 3f, 0f, 1f), GetCurrentMoonlightDyeColor());
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer AuralisAuroraEffects = new PlayerLayer("CalamityMod", "AuralisAurora", PlayerLayer.Body, drawInfo =>
|
||||
@@ -506,30 +482,16 @@ namespace CalamityMod.CalPlayer
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
if (modPlayer.auralisAuroraCounter < 300 || modPlayer.auralisAuroraCooldown > 0)
|
||||
return;
|
||||
float auroraCount = 7;
|
||||
float opacity = 0.4f;
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 7, 0.4f, CalamityUtils.ColorSwap(Auralis.blueColor, Auralis.greenColor, 3f));
|
||||
});
|
||||
|
||||
float time = Main.GlobalTime % 3f / 3f;
|
||||
Texture2D auroraTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/AuroraTexture");
|
||||
for (int i = 0; i < auroraCount; i++)
|
||||
{
|
||||
float incrementOffsetAngle = MathHelper.TwoPi * i / auroraCount;
|
||||
float xOffset = (float)Math.Sin(time * MathHelper.TwoPi + incrementOffsetAngle * 2f) * 20f;
|
||||
float yOffset = (float)Math.Sin(time * MathHelper.TwoPi + incrementOffsetAngle * 2f + MathHelper.ToRadians(60f)) * 6f;
|
||||
float rotation = (float)Math.Sin(incrementOffsetAngle) * MathHelper.Pi / 12f;
|
||||
Color color = CalamityUtils.ColorSwap(Auralis.blueColor, Auralis.greenColor, 3f);
|
||||
Vector2 offset = new Vector2(xOffset, yOffset - 14f);
|
||||
DrawData drawData = new DrawData(auroraTexture,
|
||||
drawPlayer.Top + offset - Main.screenPosition,
|
||||
null,
|
||||
color * opacity,
|
||||
rotation + MathHelper.PiOver2,
|
||||
auroraTexture.Size() * 0.5f,
|
||||
0.135f,
|
||||
SpriteEffects.None,
|
||||
1);
|
||||
Main.playerDrawData.Add(drawData);
|
||||
}
|
||||
public static readonly PlayerLayer AngelicAllianceAurora = new PlayerLayer("CalamityMod", "AngelicAllianceAurora", PlayerLayer.Body, drawInfo =>
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
if (!modPlayer.divineBless)
|
||||
return;
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 7, 0.4f, CalamityUtils.ColorSwap(new Color(255, 163, 56), new Color(242, 48, 187), 3f));
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer IbanDevRobot = new PlayerLayer("CalamityMod", "IbanDevRobot", PlayerLayer.Body, drawInfo =>
|
||||
@@ -686,6 +648,7 @@ namespace CalamityMod.CalPlayer
|
||||
list.Add(StratusSphereDrawing);
|
||||
list.Add(ProfanedMoonlightDyeEffects);
|
||||
list.Add(AuralisAuroraEffects);
|
||||
list.Add(AngelicAllianceAurora);
|
||||
list.Add(IbanDevRobot);
|
||||
list.Add(DyeInvisibilityFix);
|
||||
}
|
||||
@@ -1010,7 +973,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.playerDrawDust.Add(dust);
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.hFlames || calamityPlayer.hInferno)
|
||||
if (calamityPlayer.hFlames || calamityPlayer.hInferno || calamityPlayer.banishingFire)
|
||||
{
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -27,7 +28,7 @@ namespace CalamityMod.CalPlayer
|
||||
lifeRegenMult *= 0.8;
|
||||
int lifeRegenLost = 0;
|
||||
|
||||
// Initial Debuffs
|
||||
// Initial Debuffs
|
||||
|
||||
// Get fucked, Nebula Armor
|
||||
player.nebulaLevelLife = 0;
|
||||
@@ -208,6 +209,15 @@ namespace CalamityMod.CalPlayer
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (modPlayer.banishingFire)
|
||||
{
|
||||
if (player.lifeRegen > 0)
|
||||
player.lifeRegen = 0;
|
||||
|
||||
player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 60;
|
||||
}
|
||||
|
||||
if (modPlayer.waterLeechBleeding)
|
||||
{
|
||||
if (player.lifeRegen > 0)
|
||||
@@ -396,6 +406,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Buffs
|
||||
|
||||
if (modPlayer.divineBless)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && player.miscCounter % 15 == 0) // Flat 4 health per second
|
||||
{
|
||||
if (!modPlayer.noLifeRegen)
|
||||
player.statLife += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.bloodfinBoost)
|
||||
{
|
||||
if (player.lifeRegen < 0)
|
||||
@@ -564,7 +583,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.mount.Dismount(player);
|
||||
}
|
||||
|
||||
if (modPlayer.lol || (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet))
|
||||
if (modPlayer.lol || (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) || (modPlayer.dashMod == 9 && player.dashDelay < 0))
|
||||
{
|
||||
if (player.lifeRegen < 0)
|
||||
player.lifeRegen = 0;
|
||||
@@ -748,8 +767,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
player.lifeRegen += 7;
|
||||
|
||||
if (player.lifeRegenTime < 1800)
|
||||
player.lifeRegenTime = 1800;
|
||||
if (player.lifeRegenTime < 1800)
|
||||
player.lifeRegenTime = 1800;
|
||||
|
||||
player.lifeRegenTime += 4;
|
||||
}
|
||||
@@ -933,12 +952,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (player.lifeRegen > 0)
|
||||
{
|
||||
if (modPlayer.godSlayerCooldown)
|
||||
player.lifeRegen /= 2;
|
||||
}
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (CalamityConfig.Instance.BossRushHealthCurse)
|
||||
|
||||
@@ -21,6 +21,7 @@ using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.Astral;
|
||||
using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
@@ -75,6 +76,10 @@ namespace CalamityMod.CalPlayer
|
||||
// Bool for any existing events, true if any event is active
|
||||
CalamityPlayer.areThereAnyDamnEvents = CalamityGlobalNPC.AnyEvents(player);
|
||||
|
||||
// Hurt the nearest NPC to the mouse if using the burning mouse.
|
||||
if (modPlayer.blazingMouseDamageEffects)
|
||||
HandleBlazingMouseEffects(player, modPlayer);
|
||||
|
||||
// Revengeance effects
|
||||
RevengeanceModeMiscEffects(player, modPlayer, mod);
|
||||
|
||||
@@ -261,7 +266,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// If Revengeance Mode is not active, then set rippers to zero
|
||||
else if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
{
|
||||
modPlayer.rage = 0;
|
||||
modPlayer.adrenaline = 0;
|
||||
}
|
||||
@@ -285,8 +290,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.rageGainCooldown > 0)
|
||||
--modPlayer.rageGainCooldown;
|
||||
|
||||
// This is how much Rage will be changed by this frame.
|
||||
float rageDiff = 0;
|
||||
// This is how much Rage will be changed by this frame.
|
||||
float rageDiff = 0;
|
||||
|
||||
// If the player equips multiple rage generation accessories they get the max possible effect without stacking any of them.
|
||||
{
|
||||
@@ -395,87 +400,135 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool rageFading = modPlayer.rageCombatFrames <= 0 && !modPlayer.heartOfDarkness && !modPlayer.shatteredCommunity;
|
||||
|
||||
// If Rage Mode is currently active, you smoothly lose all rage over the duration.
|
||||
if (modPlayer.rageModeActive)
|
||||
// If Rage Mode is currently active, you smoothly lose all rage over the duration.
|
||||
if (modPlayer.rageModeActive)
|
||||
rageDiff -= modPlayer.rageMax / modPlayer.RageDuration;
|
||||
|
||||
// If out of combat and NOT using Heart of Darkness or Shattered Community, Rage fades away.
|
||||
else if (!modPlayer.rageModeActive && rageFading)
|
||||
rageDiff -= modPlayer.rageMax / CalamityPlayer.RageFadeTime;
|
||||
|
||||
// Apply the rage change and cap rage in both directions.
|
||||
modPlayer.rage += rageDiff;
|
||||
if (modPlayer.rage < 0)
|
||||
modPlayer.rage = 0;
|
||||
// Apply the rage change and cap rage in both directions.
|
||||
modPlayer.rage += rageDiff;
|
||||
if (modPlayer.rage < 0)
|
||||
modPlayer.rage = 0;
|
||||
|
||||
if (modPlayer.rage >= modPlayer.rageMax)
|
||||
{
|
||||
if (modPlayer.rage >= modPlayer.rageMax)
|
||||
{
|
||||
// Rage IS NOT capped while active. It can go above 100%.
|
||||
if (!modPlayer.rageModeActive)
|
||||
modPlayer.rage = modPlayer.rageMax;
|
||||
modPlayer.rage = modPlayer.rageMax;
|
||||
|
||||
// Play a sound when the Rage Meter is full
|
||||
if (modPlayer.playFullRageSound)
|
||||
{
|
||||
modPlayer.playFullRageSound = false;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullRage"), (int)player.position.X, (int)player.position.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
modPlayer.playFullRageSound = true;
|
||||
// Play a sound when the Rage Meter is full
|
||||
if (modPlayer.playFullRageSound)
|
||||
{
|
||||
modPlayer.playFullRageSound = false;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullRage"), (int)player.position.X, (int)player.position.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
modPlayer.playFullRageSound = true;
|
||||
|
||||
// This is how much Adrenaline will be changed by this frame.
|
||||
float adrenalineDiff = 0;
|
||||
bool SCalAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>());
|
||||
bool wofAndNotHell = Main.wof >= 0 && player.position.Y < (float)((Main.maxTilesY - 200) * 16);
|
||||
// This is how much Adrenaline will be changed by this frame.
|
||||
float adrenalineDiff = 0;
|
||||
bool SCalAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>());
|
||||
bool wofAndNotHell = Main.wof >= 0 && player.position.Y < (float)((Main.maxTilesY - 200) * 16);
|
||||
|
||||
// If Adrenaline Mode is currently active, you smoothly lose all adrenaline over the duration.
|
||||
if (modPlayer.adrenalineModeActive)
|
||||
// If Adrenaline Mode is currently active, you smoothly lose all adrenaline over the duration.
|
||||
if (modPlayer.adrenalineModeActive)
|
||||
adrenalineDiff = -modPlayer.adrenalineMax / modPlayer.AdrenalineDuration;
|
||||
|
||||
else
|
||||
{
|
||||
// If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly.
|
||||
// EXCEPTION: Wall of Flesh is alive and you are not in hell. Then you don't get anything.
|
||||
if ((CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) &&
|
||||
!wofAndNotHell)
|
||||
{
|
||||
else
|
||||
{
|
||||
// If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly.
|
||||
// EXCEPTION: Wall of Flesh is alive and you are not in hell. Then you don't get anything.
|
||||
if ((CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) &&
|
||||
!wofAndNotHell)
|
||||
{
|
||||
adrenalineDiff += modPlayer.adrenalineMax / modPlayer.AdrenalineChargeTime;
|
||||
}
|
||||
}
|
||||
|
||||
// If you aren't actively in a boss fight, adrenaline rapidly fades away.
|
||||
else
|
||||
else
|
||||
adrenalineDiff = -modPlayer.adrenalineMax / modPlayer.AdrenalineFadeTime;
|
||||
}
|
||||
}
|
||||
|
||||
// In the SCal fight, adrenaline charges 33% slower (meaning it takes 50% longer to fully charge it).
|
||||
if (SCalAlive && adrenalineDiff > 0f)
|
||||
adrenalineDiff *= 0.67f;
|
||||
if (SCalAlive && adrenalineDiff > 0f)
|
||||
adrenalineDiff *= 0.67f;
|
||||
|
||||
// Apply the adrenaline change and cap adrenaline in both directions.
|
||||
modPlayer.adrenaline += adrenalineDiff;
|
||||
if (modPlayer.adrenaline < 0)
|
||||
modPlayer.adrenaline = 0;
|
||||
// Apply the adrenaline change and cap adrenaline in both directions.
|
||||
modPlayer.adrenaline += adrenalineDiff;
|
||||
if (modPlayer.adrenaline < 0)
|
||||
modPlayer.adrenaline = 0;
|
||||
|
||||
if (modPlayer.adrenaline >= modPlayer.adrenalineMax)
|
||||
{
|
||||
modPlayer.adrenaline = modPlayer.adrenalineMax;
|
||||
if (modPlayer.adrenaline >= modPlayer.adrenalineMax)
|
||||
{
|
||||
modPlayer.adrenaline = modPlayer.adrenalineMax;
|
||||
|
||||
// Play a sound when the Adrenaline Meter is full
|
||||
if (modPlayer.playFullAdrenalineSound)
|
||||
{
|
||||
modPlayer.playFullAdrenalineSound = false;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullAdrenaline"), (int)player.position.X, (int)player.position.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
modPlayer.playFullAdrenalineSound = true;
|
||||
}
|
||||
// Play a sound when the Adrenaline Meter is full
|
||||
if (modPlayer.playFullAdrenalineSound)
|
||||
{
|
||||
modPlayer.playFullAdrenalineSound = false;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullAdrenaline"), (int)player.position.X, (int)player.position.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
modPlayer.playFullAdrenalineSound = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Misc Effects
|
||||
|
||||
private static void HandleBlazingMouseEffects(Player player, CalamityPlayer modPlayer)
|
||||
{
|
||||
Rectangle auraRectangle = Utils.CenteredRectangle(Main.MouseWorld, new Vector2(35f, 62f));
|
||||
modPlayer.blazingMouseAuraFade = MathHelper.Clamp(modPlayer.blazingMouseAuraFade - 0.025f, 0.25f, 1f);
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (!Main.npc[i].CanBeChasedBy() || !Main.npc[i].Hitbox.Intersects(auraRectangle) || !Main.rand.NextBool(2))
|
||||
continue;
|
||||
|
||||
harmNPC(Main.npc[i]);
|
||||
modPlayer.blazingMouseAuraFade = MathHelper.Clamp(modPlayer.blazingMouseAuraFade + 0.15f, 0.25f, 1f);
|
||||
}
|
||||
|
||||
void harmNPC(NPC npc)
|
||||
{
|
||||
int damage = (int)(player.AverageDamage() * Main.rand.Next(1950, 2050));
|
||||
npc.StrikeNPC(damage, 0f, 0);
|
||||
|
||||
player.addDPS(damage);
|
||||
npc.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 900);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Dust fire = Dust.NewDustDirect(npc.position, npc.width, npc.height, 267);
|
||||
fire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.45f);
|
||||
fire.scale = 1f + fire.velocity.Length() / 6f;
|
||||
fire.color = Color.Lerp(Color.Orange, Color.Red, Main.rand.NextFloat(0.85f));
|
||||
fire.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void MiscEffects(Player player, CalamityPlayer modPlayer, Mod mod)
|
||||
{
|
||||
// Do a vanity/social slot check for SCal's expert drop since alternatives to get this working are a pain in the ass to create.
|
||||
int blazingMouseItem = ModContent.ItemType<Calamity>();
|
||||
for (int i = 13; i < 18 + player.extraAccessorySlots; i++)
|
||||
{
|
||||
if (player.armor[i].type == blazingMouseItem)
|
||||
{
|
||||
modPlayer.ableToDrawBlazingMouse = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Dust on hand when holding the phosphorescent gauntlet.
|
||||
if (player.ActiveItem().type == ModContent.ItemType<PhosphorescentGauntlet>())
|
||||
PhosphorescentGauntletPunches.GenerateDustOnOwnerHand(player);
|
||||
|
||||
if (modPlayer.stealthUIAlpha > 0f && (modPlayer.rogueStealth <= 0f || modPlayer.rogueStealthMax <= 0f))
|
||||
{
|
||||
modPlayer.stealthUIAlpha -= 0.035f;
|
||||
@@ -1059,7 +1112,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (modPlayer.shadowMinions)
|
||||
player.maxMinions += 3;
|
||||
else if (modPlayer.tearMinions)
|
||||
else if (modPlayer.holyMinions)
|
||||
player.maxMinions += 2;
|
||||
|
||||
if (modPlayer.starTaintedGenerator)
|
||||
@@ -1100,8 +1153,12 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.gSabatonFall--;
|
||||
if (modPlayer.astralStarRainCooldown > 0)
|
||||
modPlayer.astralStarRainCooldown--;
|
||||
if (modPlayer.tarraRangedCooldown > 0)
|
||||
modPlayer.tarraRangedCooldown--;
|
||||
if (modPlayer.bloodflareMageCooldown > 0)
|
||||
modPlayer.bloodflareMageCooldown--;
|
||||
if (modPlayer.silvaMageCooldown > 0)
|
||||
modPlayer.silvaMageCooldown--;
|
||||
if (modPlayer.tarraMageHealCooldown > 0)
|
||||
modPlayer.tarraMageHealCooldown--;
|
||||
if (modPlayer.featherCrownCooldown > 0)
|
||||
@@ -1202,14 +1259,20 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.auralisAuroraCooldown > 0)
|
||||
modPlayer.auralisAuroraCooldown--;
|
||||
|
||||
// God Slayer Armor dash debuff immunity
|
||||
if (modPlayer.dashMod == 9 && player.dashDelay < 0)
|
||||
{
|
||||
foreach (int debuff in CalamityLists.debuffList)
|
||||
player.buffImmune[debuff] = true;
|
||||
}
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
{
|
||||
foreach (int debuff in CalamityLists.debuffList)
|
||||
player.buffImmune[debuff] = true;
|
||||
|
||||
player.buffImmune[ModContent.BuffType<VulnerabilityHex>()] = true;
|
||||
modPlayer.silvaCountdown -= modPlayer.auricSet ? 2 : 1;
|
||||
modPlayer.silvaCountdown -= 1;
|
||||
if (modPlayer.silvaCountdown <= 0)
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
|
||||
|
||||
@@ -1477,7 +1540,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1787,6 +1850,13 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.prismaticLasers = 1800;
|
||||
player.AddBuff(ModContent.BuffType<PrismaticCooldown>(), CalamityUtils.SecondsToFrames(30f), true);
|
||||
}
|
||||
if (!modPlayer.angelicAlliance && modPlayer.divineBless)
|
||||
{
|
||||
modPlayer.divineBless = false;
|
||||
player.ClearBuff(ModContent.BuffType<DivineBless>());
|
||||
int seconds = CalamityUtils.SecondsToFrames(60f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBlessCooldown>(), seconds, false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -2012,24 +2082,6 @@ namespace CalamityMod.CalPlayer
|
||||
#region Max Life And Mana Effects
|
||||
private static void MaxLifeAndManaEffects(Player player, CalamityPlayer modPlayer, Mod mod)
|
||||
{
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaHitCounter > 0)
|
||||
{
|
||||
player.statLifeMax2 -= modPlayer.silvaHitCounter * 100;
|
||||
if (player.statLifeMax2 <= 400)
|
||||
{
|
||||
player.statLifeMax2 = 400;
|
||||
if (modPlayer.silvaCountdown > 0)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<SilvaRevival>()) > -1)
|
||||
player.ClearBuff(ModContent.BuffType<SilvaRevival>());
|
||||
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)player.position.X, (int)player.position.Y);
|
||||
}
|
||||
modPlayer.silvaCountdown = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// New textures
|
||||
if (Main.netMode != NetmodeID.Server && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -2452,7 +2504,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.irradiated)
|
||||
{
|
||||
player.statDefense -= 10;
|
||||
player.statDefense -= 10;
|
||||
player.moveSpeed -= 0.1f;
|
||||
player.allDamage += 0.05f;
|
||||
player.minionKB += 0.5f;
|
||||
@@ -2477,17 +2529,6 @@ namespace CalamityMod.CalPlayer
|
||||
player.meleeDamage += 0.2f;
|
||||
}
|
||||
|
||||
if (modPlayer.eScarfBoost)
|
||||
{
|
||||
player.allDamage += 0.1f;
|
||||
modPlayer.AllCritBoost(10);
|
||||
}
|
||||
if (modPlayer.sMeleeBoost)
|
||||
{
|
||||
player.allDamage += 0.1f;
|
||||
modPlayer.AllCritBoost(5);
|
||||
}
|
||||
|
||||
if (modPlayer.tFury)
|
||||
{
|
||||
player.meleeDamage += 0.3f;
|
||||
@@ -2748,8 +2789,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
bool offenseBuffs = (Main.dayTime && !player.wet) || player.lavaWet;
|
||||
if (offenseBuffs)
|
||||
flightTimeMult += 0.1;
|
||||
}
|
||||
flightTimeMult += 0.1;
|
||||
}
|
||||
|
||||
// Increase wing time
|
||||
if (player.wingTimeMax > 0)
|
||||
@@ -2758,7 +2799,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.vHex)
|
||||
{
|
||||
player.blind = true;
|
||||
player.statDefense -= 30;
|
||||
player.statDefense -= 10;
|
||||
player.moveSpeed -= 0.1f;
|
||||
|
||||
if (player.wingTimeMax < 0)
|
||||
@@ -2905,7 +2946,19 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.gState)
|
||||
{
|
||||
player.statDefense -= GlacialState.DefenseReduction;
|
||||
player.velocity = Vector2.Zero;
|
||||
player.velocity.X *= 0.5f;
|
||||
player.velocity.Y += 0.05f;
|
||||
if (player.velocity.Y > 15f)
|
||||
player.velocity.Y = 15f;
|
||||
}
|
||||
|
||||
if (modPlayer.eFreeze)
|
||||
{
|
||||
player.statDefense -= GlacialState.DefenseReduction;
|
||||
player.velocity.X *= 0.5f;
|
||||
player.velocity.Y += 0.1f;
|
||||
if (player.velocity.Y > 15f)
|
||||
player.velocity.Y = 15f;
|
||||
}
|
||||
|
||||
if (modPlayer.eFreeze || modPlayer.silvaStun || modPlayer.eutrophication)
|
||||
@@ -3311,15 +3364,16 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool crystal = modPlayer.profanedCrystal && !modPlayer.profanedCrystalForce;
|
||||
bool summonSet = modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet;
|
||||
int guardianAmt = 1;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (crystal || player.Calamity().minionSlotStat >= 10)
|
||||
{
|
||||
player.Calamity().gDefense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
@@ -3327,7 +3381,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
player.Calamity().gOffense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
@@ -3420,11 +3474,15 @@ namespace CalamityMod.CalPlayer
|
||||
ModContent.ProjectileType<FungalClumpMinion>(),
|
||||
ModContent.ProjectileType<HowlsHeartHowl>(),
|
||||
ModContent.ProjectileType<HowlsHeartCalcifer>(),
|
||||
ModContent.ProjectileType<HowlsHeartTurnipHead>()
|
||||
ModContent.ProjectileType<HowlsHeartTurnipHead>(),
|
||||
ModContent.ProjectileType<MiniGuardianAttack>(),
|
||||
ModContent.ProjectileType<MiniGuardianDefense>(),
|
||||
ModContent.ProjectileType<MiniGuardianHealer>()
|
||||
};
|
||||
int projAmt = 1;
|
||||
for (int i = 0; i < summonDeleteList.Count; i++)
|
||||
{
|
||||
if (player.ownedProjectileCounts[summonDeleteList[i]] > 1)
|
||||
if (player.ownedProjectileCounts[summonDeleteList[i]] > projAmt)
|
||||
{
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
{
|
||||
@@ -3583,6 +3641,30 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.angelicAlliance && Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = player.buffType[l];
|
||||
if (hasBuff == ModContent.BuffType<DivineBless>())
|
||||
{
|
||||
modPlayer.angelicActivate = player.buffTime[l];
|
||||
}
|
||||
if (hasBuff == ModContent.BuffType<DivineBlessCooldown>())
|
||||
{
|
||||
if (player.buffTime[l] == 1)
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<AllianceTriangle>(), 0, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (modPlayer.angelicActivate == 1)
|
||||
{
|
||||
int seconds = CalamityUtils.SecondsToFrames(60f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBlessCooldown>(), seconds, false);
|
||||
}
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DivineBless>()) == -1)
|
||||
modPlayer.angelicActivate = -1;
|
||||
}
|
||||
|
||||
if (modPlayer.theBee)
|
||||
{
|
||||
if (player.statLife >= player.statLifeMax2)
|
||||
@@ -3602,8 +3684,8 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.GetStatBonuses();
|
||||
|
||||
// True melee damage bonuses
|
||||
double damageAdd = (modPlayer.dodgeScarf ? 0.15 : 0) +
|
||||
(modPlayer.evasionScarf ? 0.1 : 0) +
|
||||
double damageAdd = (modPlayer.dodgeScarf ? 0.1 : 0) +
|
||||
(modPlayer.evasionScarf ? 0.05 : 0) +
|
||||
((modPlayer.aBulwarkRare && modPlayer.aBulwarkRareMeleeBoostTimer > 0) ? 0.5 : 0) +
|
||||
(modPlayer.fungalSymbiote ? 0.15 : 0) +
|
||||
((player.head == ArmorIDs.Head.MoltenHelmet && player.body == ArmorIDs.Body.MoltenBreastplate && player.legs == ArmorIDs.Legs.MoltenGreaves) ? 0.2 : 0) +
|
||||
@@ -3956,7 +4038,7 @@ namespace CalamityMod.CalPlayer
|
||||
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
|
||||
if (player.endurance > 0f)
|
||||
player.endurance = 1f - (1f / (1f + player.endurance));
|
||||
|
||||
|
||||
// Do not apply reduced aggro if there are any bosses alive and it's singleplayer
|
||||
if (CalamityPlayer.areThereAnyDamnBosses && Main.netMode == NetmodeID.SinglePlayer)
|
||||
{
|
||||
@@ -3970,10 +4052,10 @@ 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;
|
||||
player.endurance -= 0.1f;
|
||||
|
||||
if (modPlayer.corrEffigy)
|
||||
player.endurance -= 0.05f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
@@ -17,6 +18,7 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
using CalamityMod.Items.Accessories;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -240,21 +242,12 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (modPlayer.tarraRanged && Main.rand.Next(0, 100) >= 88 && player.ownedProjectileCounts[ProjectileType<TarraEnergy>()] < 5 && (proj.timeLeft <= 2 || proj.penetrate <= 1))
|
||||
{
|
||||
int projAmt = Main.rand.Next(2, 4);
|
||||
for (int projCount = 0; projCount < projAmt; projCount++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(proj.Center, velocity, ProjectileType<TarraEnergy>(), CalamityUtils.DamageSoftCap(proj.damage * 0.33, 65), 0f, proj.owner);
|
||||
}
|
||||
}
|
||||
if (npcCheck)
|
||||
{
|
||||
if (modPlayer.tarraRanged && crit && proj.ranged)
|
||||
if (modPlayer.tarraRanged && proj.ranged && modPlayer.tarraRangedCooldown <= 0)
|
||||
{
|
||||
int leafAmt = Main.rand.Next(2, 4);
|
||||
for (int l = 0; l < leafAmt; l++)
|
||||
modPlayer.tarraRangedCooldown = 60;
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int FUCKYOU = Projectile.NewProjectile(position, velocity, ProjectileID.Leaf, CalamityUtils.DamageSoftCap(proj.damage * 0.25, 60), 0f, player.whoAmI);
|
||||
@@ -264,7 +257,15 @@ namespace CalamityMod.CalPlayer
|
||||
Main.projectile[FUCKYOU].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player.ownedProjectileCounts[ProjectileType<TarraEnergy>()] < 2)
|
||||
{
|
||||
for (int projCount = 0; projCount < 2; projCount++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
Projectile.NewProjectile(proj.Center, velocity, ProjectileType<TarraEnergy>(), CalamityUtils.DamageSoftCap(proj.damage * 0.33, 65), 0f, proj.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (proj.type == ProjectileType<PolarStar>())
|
||||
{
|
||||
modPlayer.polarisBoostCounter += 1;
|
||||
@@ -304,8 +305,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (modPlayer.silvaMage && proj.penetrate == 1 && Main.rand.Next(0, 100) >= 97)
|
||||
if (modPlayer.silvaMage && modPlayer.silvaMageCooldown <= 0 && (proj.penetrate == 1 || proj.timeLeft <= 5))
|
||||
{
|
||||
modPlayer.silvaMageCooldown = 300;
|
||||
Main.PlaySound(SoundID.Zombie, (int)proj.position.X, (int)proj.position.Y, 103);
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(proj, 96);
|
||||
for (int d = 0; d < 3; d++)
|
||||
@@ -325,6 +327,7 @@ namespace CalamityMod.CalPlayer
|
||||
proj.localNPCHitCooldown = 10;
|
||||
proj.usesLocalNPCImmunity = true;
|
||||
proj.Damage();
|
||||
proj.Kill();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -557,15 +560,18 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.moonCrown && modProj.stealthStrike && modPlayer.moonCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
|
||||
{
|
||||
int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage());
|
||||
float lunarFlareKB = 3f;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (position - source) / 10f;
|
||||
int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, (int)(60 * player.RogueDamage()), 3, proj.owner);
|
||||
int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner);
|
||||
if (flare.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[flare].Calamity().forceTypeless = true;
|
||||
modPlayer.moonCrownCooldown = 60;
|
||||
}
|
||||
|
||||
modPlayer.moonCrownCooldown = 60;
|
||||
}
|
||||
|
||||
if (modPlayer.nanotech && modProj.stealthStrike && modPlayer.nanoFlareCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
|
||||
@@ -729,6 +735,7 @@ namespace CalamityMod.CalPlayer
|
||||
public static void NPCDebuffs(Player player, Mod mod, NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool proj)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (melee) //prevents Deep Sea Dumbell from snagging true melee debuff memes
|
||||
{
|
||||
if (modPlayer.eGauntlet)
|
||||
@@ -743,10 +750,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 +767,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)
|
||||
{
|
||||
@@ -820,10 +820,14 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
target.AddBuff(Main.dayTime ? BuffType<HolyFlames>() : BuffType<Nightwither>(), 600);
|
||||
}
|
||||
|
||||
if (modPlayer.tearMinions)
|
||||
if (modPlayer.divineBless)
|
||||
{
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 60);
|
||||
target.AddBuff(BuffType<BanishingFire>(), 60);
|
||||
}
|
||||
|
||||
if (modPlayer.holyMinions)
|
||||
{
|
||||
target.AddBuff(BuffType<HolyFlames>(), 300);
|
||||
}
|
||||
|
||||
if (modPlayer.shadowMinions)
|
||||
@@ -896,10 +900,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 +917,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)
|
||||
{
|
||||
@@ -970,9 +968,9 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(Main.dayTime ? BuffType<HolyFlames>() : BuffType<Nightwither>(), 600);
|
||||
}
|
||||
|
||||
if (modPlayer.tearMinions)
|
||||
if (modPlayer.holyMinions)
|
||||
{
|
||||
target.AddBuff(BuffType<TemporalSadness>(), 60);
|
||||
target.AddBuff(BuffType<HolyFlames>(), 300);
|
||||
}
|
||||
|
||||
if (modPlayer.shadowMinions)
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace CalamityMod
|
||||
[Tooltip("Enables rendering afterimages for Calamity NPCs, projectiles, etc.\nDisable to improve performance.")]
|
||||
public bool Afterimages { get; set; }
|
||||
|
||||
[Label("Disable Screenshakes")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
[Tooltip("Disables all screen-shaking effects.")]
|
||||
public bool DisableScreenShakes { get; set; }
|
||||
|
||||
[Label("Stealth Invisibility")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
|
||||
@@ -22,6 +22,7 @@ using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.Astral;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
@@ -35,12 +36,15 @@ using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
||||
using CalamityMod.NPCs.GreatSandShark;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.Perforator;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.Signus;
|
||||
@@ -146,6 +150,7 @@ namespace CalamityMod
|
||||
public static List<int> mossHornetList;
|
||||
public static List<int> bossMinionList;
|
||||
public static List<int> minibossList;
|
||||
public static List<int> heartDropBlockList;
|
||||
|
||||
public static List<int> legOverrideList;
|
||||
|
||||
@@ -305,11 +310,8 @@ namespace CalamityMod
|
||||
ProjectileID.MushroomSpear,
|
||||
ProjectileID.Gungnir,
|
||||
ProjectileID.ObsidianSwordfish,
|
||||
ProjectileID.ChlorophytePartisan,
|
||||
ProjectileID.MonkStaffT1,
|
||||
ProjectileID.MonkStaffT2,
|
||||
ProjectileID.MonkStaffT3,
|
||||
ProjectileID.NorthPoleWeapon,
|
||||
|
||||
// Tools
|
||||
ProjectileID.CobaltDrill,
|
||||
@@ -343,28 +345,14 @@ namespace CalamityMod
|
||||
ProjectileType<DevilsSunriseProj>(),
|
||||
ProjectileType<MarniteObliteratorProj>(),
|
||||
ProjectileType<MurasamaSlash>(),
|
||||
ProjectileType<AmidiasTridentProj>(),
|
||||
ProjectileType<AstralPikeProj>(),
|
||||
ProjectileType<BansheeHookProj>(),
|
||||
ProjectileType<BrimlanceProj>(),
|
||||
ProjectileType<DiseasedPikeSpear>(),
|
||||
ProjectileType<EarthenPikeSpear>(),
|
||||
ProjectileType<ExsanguinationLanceProjectile>(),
|
||||
ProjectileType<FulgurationHalberdProj>(),
|
||||
ProjectileType<GildedProboscisProj>(),
|
||||
ProjectileType<GoldplumeSpearProjectile>(),
|
||||
ProjectileType<HellionFlowerSpearProjectile>(),
|
||||
ProjectileType<InsidiousImpalerProj>(),
|
||||
ProjectileType<MarniteSpearProjectile>(),
|
||||
ProjectileType<NadirSpear>(),
|
||||
ProjectileType<SausageMakerSpear>(),
|
||||
ProjectileType<SpatialLanceProjectile>(),
|
||||
ProjectileType<StarnightLanceProjectile>(),
|
||||
ProjectileType<StreamGougeProj>(),
|
||||
ProjectileType<TenebreusTidesProjectile>(),
|
||||
ProjectileType<TerraLanceProjectile>(),
|
||||
ProjectileType<TyphonsGreedStaff>(),
|
||||
ProjectileType<UrchinSpearProjectile>(),
|
||||
ProjectileType<YateveoBloomSpear>(),
|
||||
ProjectileType<HydraulicVoltCrasherProjectile>(),
|
||||
ProjectileType<DragonRageStaff>()
|
||||
@@ -432,13 +420,15 @@ namespace CalamityMod
|
||||
ProjectileType<YharimsCrystalBeam>(),
|
||||
ProjectileType<DarkSparkBeam>(),
|
||||
ProjectileType<GhastlyVisageProj>(),
|
||||
// ProjectileType<ApotheosisWorm>(), // TODO: ADD THE APOTHEOSIS WORM HERE LATER. IT IS IN A DIFFERENT BRANCH AS OF WRITING THIS.
|
||||
ProjectileType<ApotheosisWorm>(),
|
||||
|
||||
ProjectileType<FlakKrakenProj>(),
|
||||
ProjectileType<SylvanSlashAttack>(),
|
||||
ProjectileType<InfernadoFriendly>(),
|
||||
ProjectileType<MurasamaSlash>(),
|
||||
ProjectileType<PhaseslayerProjectile>(),
|
||||
ProjectileType<PhotonRipperProjectile>(),
|
||||
ProjectileType<SpineOfThanatosProjectile>(),
|
||||
|
||||
//Some hostile boss projectiles
|
||||
ProjectileType<BrimstoneMonster>(),
|
||||
@@ -488,6 +478,8 @@ namespace CalamityMod
|
||||
NPCID.SkeletronHand,
|
||||
NPCID.WallofFlesh,
|
||||
NPCID.WallofFleshEye,
|
||||
NPCID.PirateShipCannon,
|
||||
NPCID.Probe,
|
||||
NPCID.Retinazer,
|
||||
NPCID.Spazmatism,
|
||||
NPCID.SkeletronPrime,
|
||||
@@ -496,7 +488,11 @@ namespace CalamityMod
|
||||
NPCID.PrimeLaser,
|
||||
NPCID.PrimeVice,
|
||||
NPCID.Plantera,
|
||||
NPCID.PlanterasTentacle,
|
||||
NPCID.Everscream,
|
||||
NPCID.SantaNK1,
|
||||
NPCID.IceQueen,
|
||||
NPCID.MourningWood,
|
||||
NPCID.Pumpking,
|
||||
NPCID.Mothron,
|
||||
NPCID.Golem,
|
||||
@@ -504,12 +500,21 @@ namespace CalamityMod
|
||||
NPCID.GolemHeadFree,
|
||||
NPCID.GolemFistRight,
|
||||
NPCID.GolemFistLeft,
|
||||
NPCID.GolemHeadFree,
|
||||
NPCID.MartianSaucerCore,
|
||||
NPCID.MartianSaucerCannon,
|
||||
NPCID.MartianSaucerTurret,
|
||||
NPCID.DukeFishron,
|
||||
NPCID.Sharkron,
|
||||
NPCID.Sharkron2,
|
||||
NPCID.CultistBoss,
|
||||
NPCID.MoonLordHead,
|
||||
NPCID.CultistDragonHead,
|
||||
NPCID.CultistDragonBody1,
|
||||
NPCID.CultistDragonBody2,
|
||||
NPCID.CultistDragonBody3,
|
||||
NPCID.CultistDragonBody4,
|
||||
NPCID.CultistDragonTail,
|
||||
NPCID.AncientCultistSquidhead,
|
||||
NPCID.MoonLordHead,
|
||||
NPCID.MoonLordHand,
|
||||
NPCID.MoonLordCore,
|
||||
NPCID.MoonLordFreeEye,
|
||||
@@ -548,8 +553,47 @@ namespace CalamityMod
|
||||
NPCType<SlimeGodRun>(),
|
||||
NPCType<SlimeGodSplit>(),
|
||||
NPCType<SlimeGodRunSplit>(),
|
||||
NPCType<BobbitWormHead>()
|
||||
};
|
||||
NPCType<Horse>(),
|
||||
NPCType<ThiccWaifu>(),
|
||||
NPCType<CryogenIce>(),
|
||||
NPCType<AquaticScourgeHead>(),
|
||||
NPCType<AquaticScourgeBody>(),
|
||||
NPCType<AquaticScourgeBodyAlt>(),
|
||||
NPCType<AquaticScourgeTail>(),
|
||||
NPCType<CragmawMire>(),
|
||||
NPCType<CalamitasRun>(),
|
||||
NPCType<CalamitasRun2>(),
|
||||
NPCType<SoulSeeker>(),
|
||||
NPCType<GreatSandShark>(),
|
||||
NPCType<SirenIce>(),
|
||||
NPCType<AureusSpawn>(),
|
||||
NPCType<PlaguebringerShade>(),
|
||||
NPCType<PlagueHomingMissile>(),
|
||||
NPCType<PlagueMine>(),
|
||||
NPCType<RavagerClawLeft>(),
|
||||
NPCType<RavagerClawRight>(),
|
||||
NPCType<RavagerLegLeft>(),
|
||||
NPCType<RavagerLegRight>(),
|
||||
NPCType<RockPillar>(),
|
||||
NPCType<RavagerHead>(),
|
||||
NPCType<Bumblefuck2>(),
|
||||
NPCType<ProvSpawnDefense>(),
|
||||
NPCType<ProvSpawnHealer>(),
|
||||
NPCType<ProvSpawnOffense>(),
|
||||
NPCType<BobbitWormHead>(),
|
||||
NPCType<Mauler>(),
|
||||
NPCType<ColossalSquid>(),
|
||||
NPCType<Reaper>(),
|
||||
NPCType<EidolonWyrmHead>(),
|
||||
NPCType<NuclearTerror>(),
|
||||
NPCType<OldDukeToothBall>(),
|
||||
NPCType<OldDukeSharkron>(),
|
||||
NPCType<DetonatingFlare>(),
|
||||
NPCType<DetonatingFlare2>(),
|
||||
NPCType<SupremeCataclysm>(),
|
||||
NPCType<SupremeCatastrophe>(),
|
||||
NPCType<SoulSeekerSupreme>()
|
||||
};
|
||||
|
||||
confusionEnemyList = new List<int>()
|
||||
{
|
||||
@@ -754,8 +798,9 @@ namespace CalamityMod
|
||||
BuffType<Vaporfied>(),
|
||||
BuffType<Eutrophication>(),
|
||||
BuffType<LethalLavaBurn>(),
|
||||
BuffType<Nightwither>()
|
||||
};
|
||||
BuffType<Nightwither>(),
|
||||
BuffType<VulnerabilityHex>()
|
||||
};
|
||||
|
||||
fireWeaponList = new List<int>()
|
||||
{
|
||||
@@ -1262,7 +1307,8 @@ namespace CalamityMod
|
||||
|
||||
sixtySixDamageBuffList = new List<int>()
|
||||
{
|
||||
ItemID.TrueNightsEdge,
|
||||
ItemID.PulseBow,
|
||||
ItemID.TrueNightsEdge,
|
||||
ItemID.MedusaHead,
|
||||
ItemID.StaffofEarth,
|
||||
ItemID.ChristmasTreeSword,
|
||||
@@ -1274,11 +1320,12 @@ namespace CalamityMod
|
||||
|
||||
fiftyDamageBuffList = new List<int>()
|
||||
{
|
||||
ItemID.EldMelter,
|
||||
ItemID.IceBow,
|
||||
ItemID.Marrow,
|
||||
ItemID.EldMelter,
|
||||
ItemID.Flamethrower,
|
||||
ItemID.MoonlordTurretStaff,
|
||||
ItemID.WaspGun,
|
||||
ItemID.PulseBow,
|
||||
ItemID.PaladinsHammer,
|
||||
ItemID.SolarEruption,
|
||||
ItemID.DayBreak,
|
||||
@@ -1296,8 +1343,6 @@ namespace CalamityMod
|
||||
thirtyThreeDamageBuffList = new List<int>()
|
||||
{
|
||||
ItemID.WandofSparking,
|
||||
ItemID.IceBow,
|
||||
ItemID.Marrow,
|
||||
ItemID.CrystalVileShard,
|
||||
ItemID.SoulDrain,
|
||||
ItemID.ClingerStaff,
|
||||
@@ -1334,6 +1379,52 @@ namespace CalamityMod
|
||||
|
||||
tenDamageBuffList = new List<int>()
|
||||
{
|
||||
ItemID.WoodenArrow,
|
||||
ItemID.FlamingArrow,
|
||||
ItemID.UnholyArrow,
|
||||
ItemID.JestersArrow,
|
||||
ItemID.HellfireArrow,
|
||||
ItemID.HolyArrow,
|
||||
ItemID.CursedArrow,
|
||||
ItemID.FrostburnArrow,
|
||||
ItemID.ChlorophyteArrow,
|
||||
ItemID.IchorArrow,
|
||||
ItemID.VenomArrow,
|
||||
ItemID.BoneArrow,
|
||||
ItemID.EndlessQuiver,
|
||||
ItemID.MoonlordArrow,
|
||||
ItemID.DD2BetsyBow,
|
||||
ItemID.BorealWoodBow,
|
||||
ItemID.CopperBow,
|
||||
ItemID.DemonBow,
|
||||
ItemID.EbonwoodBow,
|
||||
ItemID.GoldBow,
|
||||
ItemID.HellwingBow,
|
||||
ItemID.IronBow,
|
||||
ItemID.LeadBow,
|
||||
ItemID.MoltenFury,
|
||||
ItemID.PalmWoodBow,
|
||||
ItemID.PearlwoodBow,
|
||||
ItemID.DD2PhoenixBow,
|
||||
ItemID.PlatinumBow,
|
||||
ItemID.RichMahoganyBow,
|
||||
ItemID.ShadewoodBow,
|
||||
ItemID.ShadowFlameBow,
|
||||
ItemID.SilverBow,
|
||||
ItemID.TendonBow,
|
||||
ItemID.BeesKnees,
|
||||
ItemID.TinBow,
|
||||
ItemID.Tsunami,
|
||||
ItemID.TungstenBow,
|
||||
ItemID.WoodenBow,
|
||||
ItemID.AdamantiteRepeater,
|
||||
ItemID.ChlorophyteShotbow,
|
||||
ItemID.CobaltRepeater,
|
||||
ItemID.HallowedRepeater,
|
||||
ItemID.MythrilRepeater,
|
||||
ItemID.OrichalcumRepeater,
|
||||
ItemID.PalladiumRepeater,
|
||||
ItemID.TitaniumRepeater,
|
||||
ItemID.MagnetSphere,
|
||||
ItemID.BatScepter,
|
||||
ItemID.ElectrosphereLauncher
|
||||
@@ -1431,8 +1522,8 @@ namespace CalamityMod
|
||||
|
||||
tenDamageNerfList = new List<int>()
|
||||
{
|
||||
ItemID.Phantasm,
|
||||
ItemID.StarWrath
|
||||
ItemID.DaedalusStormbow,
|
||||
ItemID.StarWrath
|
||||
};
|
||||
|
||||
quarterDamageNerfList = new List<int>()
|
||||
@@ -1440,7 +1531,6 @@ namespace CalamityMod
|
||||
ItemID.LastPrism,
|
||||
ItemID.DemonScythe,
|
||||
ItemID.Razorpine,
|
||||
ItemID.DaedalusStormbow,
|
||||
ItemID.PhoenixBlaster,
|
||||
ItemID.InfluxWaver,
|
||||
ItemID.Xenopopper,
|
||||
@@ -1714,7 +1804,10 @@ namespace CalamityMod
|
||||
NPCType<DevourerofGodsTail>(),
|
||||
NPCType<DevourerofGodsBodyS>(),
|
||||
NPCType<DevourerofGodsTailS>(),
|
||||
};
|
||||
NPCType<ThanatosBody1>(),
|
||||
NPCType<ThanatosBody2>(),
|
||||
NPCType<ThanatosTail>()
|
||||
};
|
||||
|
||||
needsDebuffIconDisplayList = new List<int>()
|
||||
{
|
||||
@@ -2369,7 +2462,69 @@ namespace CalamityMod
|
||||
NPCID.Mothron
|
||||
};
|
||||
|
||||
bossMinionList = new List<int>()
|
||||
heartDropBlockList = new List<int>()
|
||||
{
|
||||
NPCID.BlueSlime,
|
||||
NPCID.YellowSlime,
|
||||
NPCID.RedSlime,
|
||||
NPCID.PurpleSlime,
|
||||
NPCID.GreenSlime,
|
||||
NPCID.IceSlime,
|
||||
NPCID.SlimeSpiked,
|
||||
NPCID.UmbrellaSlime,
|
||||
NPCID.RainbowSlime,
|
||||
NPCID.Pinky,
|
||||
NPCID.ServantofCthulhu,
|
||||
NPCID.EaterofWorldsHead,
|
||||
NPCID.EaterofWorldsBody,
|
||||
NPCID.EaterofWorldsTail,
|
||||
NPCID.Creeper,
|
||||
NPCID.TheHungryII,
|
||||
NPCID.LeechHead,
|
||||
NPCID.LeechBody,
|
||||
NPCID.LeechTail,
|
||||
NPCID.Probe,
|
||||
NPCID.Bee,
|
||||
NPCID.BeeSmall,
|
||||
NPCID.PlanterasTentacle,
|
||||
NPCID.Sharkron,
|
||||
NPCID.Sharkron2,
|
||||
NPCType<DesertScourgeHeadSmall>(),
|
||||
NPCType<DriedSeekerHead>(),
|
||||
NPCType<CrabShroom>(),
|
||||
NPCType<DankCreeper>(),
|
||||
NPCID.DevourerHead,
|
||||
NPCID.EaterofSouls,
|
||||
NPCType<PerforatorHeadLarge>(),
|
||||
NPCType<PerforatorHeadMedium>(),
|
||||
NPCType<PerforatorHeadSmall>(),
|
||||
NPCType<SlimeSpawnCorrupt2>(),
|
||||
NPCType<SlimeSpawnCrimson>(),
|
||||
NPCType<SlimeSpawnCrimson2>(),
|
||||
NPCType<SlimeGod>(),
|
||||
NPCType<SlimeGodRun>(),
|
||||
NPCType<SlimeGodSplit>(),
|
||||
NPCType<SlimeGodRunSplit>(),
|
||||
NPCType<IceMass>(),
|
||||
NPCType<Cryocore>(),
|
||||
NPCType<Cryocore2>(),
|
||||
NPCType<Parasea>(),
|
||||
NPCType<AquaticAberration>(),
|
||||
NPCType<PlagueBeeG>(),
|
||||
NPCType<PlagueBeeLargeG>(),
|
||||
NPCType<PlaguebringerShade>(),
|
||||
NPCType<RavagerClawLeft>(),
|
||||
NPCType<RavagerClawRight>(),
|
||||
NPCType<Bumblefuck2>(),
|
||||
NPCType<DarkEnergy>(),
|
||||
NPCType<CosmicLantern>(),
|
||||
NPCType<OldDukeSharkron>(),
|
||||
NPCType<OldDukeToothBall>(),
|
||||
NPCType<DetonatingFlare>(),
|
||||
NPCType<DetonatingFlare2>()
|
||||
};
|
||||
|
||||
bossMinionList = new List<int>()
|
||||
{
|
||||
NPCType<DesertScourgeHeadSmall>(),
|
||||
NPCType<DesertScourgeBodySmall>(),
|
||||
@@ -2458,8 +2613,6 @@ namespace CalamityMod
|
||||
NPCType<ProvSpawnDefense>(),
|
||||
NPCType<ProvSpawnHealer>(),
|
||||
NPCType<DarkEnergy>(),
|
||||
NPCType<DarkEnergy2>(),
|
||||
NPCType<DarkEnergy3>(),
|
||||
NPCType<CosmicLantern>(),
|
||||
NPCType<DevourerofGodsHead2>(),
|
||||
NPCType<DevourerofGodsBody2>(),
|
||||
@@ -2588,6 +2741,7 @@ namespace CalamityMod
|
||||
mossHornetList = null;
|
||||
bossMinionList = null;
|
||||
minibossList = null;
|
||||
heartDropBlockList = null;
|
||||
|
||||
legOverrideList = null;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Dyes.HairDye;
|
||||
using CalamityMod.Localization;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
@@ -21,6 +22,7 @@ using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
@@ -76,6 +78,8 @@ namespace CalamityMod
|
||||
public static ModHotKey SandCloakHotkey;
|
||||
public static ModHotKey SpectralVeilHotKey;
|
||||
public static ModHotKey PlaguePackHotKey;
|
||||
public static ModHotKey AngelicAllianceHotKey;
|
||||
public static ModHotKey GodSlayerDashHotKey;
|
||||
|
||||
// Boss Spawners
|
||||
public static int ghostKillCount = 0;
|
||||
@@ -172,11 +176,11 @@ namespace CalamityMod
|
||||
SandCloakHotkey = RegisterHotKey("Sand Cloak Effect", "C");
|
||||
SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z");
|
||||
PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q");
|
||||
AngelicAllianceHotKey = RegisterHotKey("Angelic Alliance Blessing", "G");
|
||||
GodSlayerDashHotKey = RegisterHotKey("God Slayer Dash", "H");
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
LoadClient();
|
||||
}
|
||||
|
||||
ILChanges.Load();
|
||||
BossRushEvent.Load();
|
||||
@@ -251,7 +255,10 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky();
|
||||
|
||||
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:AdultEidolonWyrm"] = new Filter(new AEWScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0.25f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:AdultEidolonWyrm"] = new AEWSky();
|
||||
|
||||
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:Signus"] = new SignusSky();
|
||||
|
||||
Filters.Scene["CalamityMod:BossRush"] = new Filter(new BossRushScreenShader("FilterMiniTower").UseColor(BossRushSky.GeneralColor).UseOpacity(0.75f), EffectPriority.VeryHigh);
|
||||
@@ -259,12 +266,15 @@ namespace CalamityMod
|
||||
|
||||
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
|
||||
SkyManager.Instance["CalamityMod:Cryogen"] = new CryogenSky();
|
||||
SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky();
|
||||
|
||||
CalamityShaders.LoadShaders();
|
||||
|
||||
RipperUI.Load();
|
||||
AstralArcanumUI.Load(this);
|
||||
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<AdrenalineHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<RageHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<WingTimeHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(139, 205, 255), ((float)player.wingTime / (float)player.wingTimeMax))));
|
||||
@@ -301,6 +311,8 @@ namespace CalamityMod
|
||||
SandCloakHotkey = null;
|
||||
SpectralVeilHotKey = null;
|
||||
PlaguePackHotKey = null;
|
||||
AngelicAllianceHotKey = null;
|
||||
GodSlayerDashHotKey = null;
|
||||
|
||||
AstralCactusTexture = null;
|
||||
AstralCactusGlowTexture = null;
|
||||
@@ -552,12 +564,11 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<ProfanedGuardianBoss>(), 5400 },
|
||||
{ ModContent.NPCType<Bumblefuck>(), 7200 },
|
||||
{ ModContent.NPCType<Providence>(), 14400 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<DarkEnergy2>(), 1200 },
|
||||
{ ModContent.NPCType<DarkEnergy3>(), 1200 },
|
||||
{ ModContent.NPCType<StormWeaverHeadNaked>(), 5400 },
|
||||
{ ModContent.NPCType<StormWeaverBodyNaked>(), 5400 },
|
||||
{ ModContent.NPCType<StormWeaverTailNaked>(), 5400 },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<StormWeaverHeadNaked>(), 7200 },
|
||||
{ ModContent.NPCType<StormWeaverBodyNaked>(), 7200 },
|
||||
{ ModContent.NPCType<StormWeaverTailNaked>(), 7200 },
|
||||
{ ModContent.NPCType<Signus>(), 7200 },
|
||||
{ ModContent.NPCType<Polterghast>(), 10800 },
|
||||
{ ModContent.NPCType<OldDuke>(), 10800 },
|
||||
@@ -568,8 +579,13 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DevourerofGodsBodyS>(), 9000 },
|
||||
{ ModContent.NPCType<DevourerofGodsTailS>(), 9000 },
|
||||
{ ModContent.NPCType<Yharon>(), 15300 },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 }
|
||||
};
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 },
|
||||
{ ModContent.NPCType<ThanatosHead>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosTail>(), 21600 },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 }
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -668,8 +684,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<Bumblefuck2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DarkEnergy>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DarkEnergy2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DarkEnergy3>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<StormWeaverHead>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), velocityScaleMin },
|
||||
@@ -693,8 +707,13 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<Yharon>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DetonatingFlare>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DetonatingFlare2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin }
|
||||
};
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosHead>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosTail>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), bitingEnemeyVelocityScale }
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 204 B |
@@ -0,0 +1,71 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
// Read the fade map as a streak.
|
||||
float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.y + cos(uTime) * 0.01), frac(coords.x - uTime * 1.4 * uSaturation)));
|
||||
fadeMapColor.r *= pow(coords.x, 0.2);
|
||||
|
||||
float opacity = lerp(1.45, 1.95, fadeMapColor.r) * color.a;
|
||||
opacity *= pow(sin(coords.y * 3.141), lerp(1, 4, pow(coords.x, 2)));
|
||||
opacity *= fadeMapColor.r * 1.5 + 1;
|
||||
opacity *= lerp(0.4, 0.9, fadeMapColor.r);
|
||||
|
||||
float3 transformColor = lerp(float3(1, 205 / 255.0, 119 / 255.0), float3(1, 76 / 255.0, 79 / 255.0), fadeMapColor.r);
|
||||
color.rgb = lerp(color.rgb, transformColor, fadeMapColor.r);
|
||||
return color * opacity * 1.6;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,15 @@ namespace CalamityMod.Effects
|
||||
{
|
||||
public static Effect AstralFogShader;
|
||||
public static Effect LightShader;
|
||||
public static Effect SCalMouseShader;
|
||||
public static Effect TentacleShader;
|
||||
public static Effect LightDistortionShader;
|
||||
public static Effect PhaseslayerRipShader;
|
||||
public static Effect FadedUVMapStreakShader;
|
||||
public static Effect ScarletDevilShader;
|
||||
public static Effect BordernadoFireShader;
|
||||
public static Effect PrismCrystalShader;
|
||||
public static Effect SCalShieldShader;
|
||||
|
||||
public static void LoadShaders()
|
||||
{
|
||||
@@ -21,17 +27,29 @@ namespace CalamityMod.Effects
|
||||
AstralFogShader = CalamityMod.Instance.GetEffect("Effects/CustomShader");
|
||||
LightShader = CalamityMod.Instance.GetEffect("Effects/LightBurstShader");
|
||||
TentacleShader = CalamityMod.Instance.GetEffect("Effects/TentacleShader");
|
||||
SCalMouseShader = CalamityMod.Instance.GetEffect("Effects/SCalMouseShader");
|
||||
LightDistortionShader = CalamityMod.Instance.GetEffect("Effects/DistortionShader");
|
||||
PhaseslayerRipShader = CalamityMod.Instance.GetEffect("Effects/PhaseslayerRipShader");
|
||||
ScarletDevilShader = CalamityMod.Instance.GetEffect("Effects/ScarletDevilStreak");
|
||||
BordernadoFireShader = CalamityMod.Instance.GetEffect("Effects/BordernadoFire");
|
||||
PrismCrystalShader = CalamityMod.Instance.GetEffect("Effects/PrismCrystalStreak");
|
||||
FadedUVMapStreakShader = CalamityMod.Instance.GetEffect("Effects/FadedUVMapStreak");
|
||||
SCalShieldShader = CalamityMod.Instance.GetEffect("Effects/SupremeShieldShader");
|
||||
|
||||
Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref<Effect>(AstralFogShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh);
|
||||
|
||||
Filters.Scene["CalamityMod:LightBurst"] = new Filter(new ScreenShaderData(new Ref<Effect>(LightShader), "BurstPass"), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:LightBurst"].Load();
|
||||
|
||||
GameShaders.Misc["CalamityMod:FireMouse"] = new MiscShaderData(new Ref<Effect>(SCalMouseShader), "DyePass");
|
||||
GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref<Effect>(TentacleShader), "BurstPass");
|
||||
GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref<Effect>(LightDistortionShader), "DistortionPass");
|
||||
GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"] = new MiscShaderData(new Ref<Effect>(PhaseslayerRipShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:TrailStreak"] = new MiscShaderData(new Ref<Effect>(FadedUVMapStreakShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"] = new MiscShaderData(new Ref<Effect>(ScarletDevilShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:Bordernado"] = new MiscShaderData(new Ref<Effect>(BordernadoFireShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:PrismaticStreak"] = new MiscShaderData(new Ref<Effect>(PrismCrystalShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:SupremeShield"] = new MiscShaderData(new Ref<Effect>(SCalShieldShader), "ShieldPass");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
// Read the fade map as a streak.
|
||||
float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.x - uTime * 2.5), coords.y));
|
||||
float opacity = fadeMapColor.r;
|
||||
|
||||
// Fade out at the edges of the trail to give a blur effect.
|
||||
// This is very important.
|
||||
float power = lerp(3, 10, coords.x);
|
||||
opacity = lerp(pow(sin(coords.y * 3.141), power), opacity, coords.x);
|
||||
|
||||
// Fade out at the end of the streak.
|
||||
if (coords.x > 0.7)
|
||||
opacity *= pow(1 - (coords.x - 0.7) / 0.3, 6);
|
||||
return color * opacity * 1.5;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
float slashMapColor = tex2D(uImage1, coords);
|
||||
float opacity = 1 - slashMapColor.r;
|
||||
return color * pow(opacity, 3);
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
// Inputted images go into uImage1 sampler, in case you have a noise map or something similar.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
float areaFadeGlow = lerp(1.2, 17, coords.x);
|
||||
if (coords.x < 0.25)
|
||||
areaFadeGlow = lerp(areaFadeGlow, 1.2, 1 - coords.x / 0.25);
|
||||
float2 mapColor = tex2D(uImage1, float2(frac(coords.x - uTime * 4.2), coords.y));
|
||||
float opacity = pow(sin(coords.y * 3.141), areaFadeGlow) + 0.6 * lerp(1.1, 0.3, coords.x) * mapColor.r;
|
||||
|
||||
if (coords.x > 0.66)
|
||||
opacity = lerp(opacity, 0, (coords.x - 0.66) / 0.3);
|
||||
|
||||
return color * opacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float fadeInterpolant = cos(coords.y * coords.x * 6.283 - uTime * 13.1) * 0.5 + 0.5;
|
||||
|
||||
float4 fadeColor = float4(lerp(uColor, uSecondaryColor, fadeInterpolant), 1);
|
||||
float4 color = tex2D(uImage0, coords) * fadeColor;
|
||||
color *= 1 + fadeInterpolant * 0.5;
|
||||
return color;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
// Inputted images go into uImage1 sampler, in case you have a noise map or something similar.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
float areaFadeGlow = lerp(1.2, 17, coords.x);
|
||||
if (coords.x < 0.25)
|
||||
areaFadeGlow = lerp(areaFadeGlow, 1.2, 1 - coords.x / 0.25);
|
||||
float2 mapColor = tex2D(uImage1, float2(frac(coords.x - uTime * 2.5), coords.y));
|
||||
float opacity = pow(sin(coords.y * 3.141), areaFadeGlow) + 0.6 * lerp(1.1, 0.3, coords.x) * mapColor.r;
|
||||
|
||||
if (coords.x > 0.66)
|
||||
opacity = lerp(opacity, 0, (coords.x - 0.66) / 0.3);
|
||||
|
||||
return color * opacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity : register(C0);
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
|
||||
float inverseLerp(float x, float min, float max)
|
||||
{
|
||||
return saturate((x - min) / (max - min));
|
||||
}
|
||||
float4 PixelFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 baseColor = tex2D(uImage0, coords);
|
||||
float4 noiseColor = tex2D(uImage1, float2(coords.x, frac(coords.y + uTime * 0.7)));
|
||||
float start = 0.45 + sin(uTime * 3) * 0.04;
|
||||
float ringRadus = 0.1;
|
||||
float distanceRatio = distance(coords, float2(0.5, 0.5)) * 1.414;
|
||||
float3 colorToUse = lerp(uColor, uSecondaryColor, pow(distanceRatio, 0.6));
|
||||
float originalAlpha = pow(inverseLerp(distanceRatio, 0, start), 2.6);
|
||||
float ringAlpha = sin(3.141 * inverseLerp(distanceRatio, start, start + ringRadus)) * 1.96;
|
||||
if (distanceRatio < start)
|
||||
originalAlpha *= lerp(1, 2.6, noiseColor.r);
|
||||
else
|
||||
originalAlpha = lerp(originalAlpha, ringAlpha, inverseLerp(distanceRatio, start, start + ringRadus * 0.5));
|
||||
|
||||
originalAlpha *= lerp(1, 0.56, distanceRatio) * lerp(1, 2.45, min(1, pow(sin(uTime * 3.1), 10) * 0.7 + uSaturation));
|
||||
baseColor = float4(lerp(baseColor.rgb, colorToUse, 0.5), 1.0);
|
||||
return baseColor * originalAlpha * uOpacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass ShieldPass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelFunction();
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,8 @@ namespace CalamityMod.Events
|
||||
player.ClearBuff(ModContent.BuffType<ExtremeGravity>());
|
||||
}
|
||||
}
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
|
||||
Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SupremeCalamitasSpawn"), Main.player[ClosestPlayerToWorldCenter].Center);
|
||||
CalamityUtils.SpawnBossBetter(Main.player[ClosestPlayerToWorldCenter].Top - new Vector2(42f, 84f), type);
|
||||
}),
|
||||
new Boss(ModContent.NPCType<Yharon>(), TimeChangeContext.Day),
|
||||
new Boss(ModContent.NPCType<DevourerofGodsHeadS>(), TimeChangeContext.Day, type =>
|
||||
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 794 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 160 B |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 408 B |
|
After Width: | Height: | Size: 420 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 635 B |