Merge branch 'master' into draedon-summoner
No files matched your search
@@ -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,21 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Cooldowns
|
||||
{
|
||||
public class Withered : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Withered");
|
||||
Description.SetDefault("Holding withered weapons causes you to suffer but makes your weapons strong");
|
||||
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().witheredDebuff = true;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 578 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 |
@@ -16,9 +16,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
canBeCleared = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().vHex = true;
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().vHex = true;
|
||||
if (npc.Calamity().vulnerabilityHex < npc.buffTime[buffIndex])
|
||||
npc.Calamity().vulnerabilityHex = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class WeakBrimstoneFlames : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Weak Brimstone Flames");
|
||||
Description.SetDefault("Health loss");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().weakBrimstoneFlames = true;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 568 B |
@@ -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,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class SepulcherMinionBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Sepulcher");
|
||||
Description.SetDefault("It is not benevolent");
|
||||
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<SepulcherMinion>()] > 0)
|
||||
modPlayer.sepulcher = true;
|
||||
|
||||
if (!modPlayer.sepulcher)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 704 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 |
@@ -31,6 +31,7 @@ using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.GreatSandShark;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.Other;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.Polterghast;
|
||||
@@ -117,7 +118,11 @@ namespace CalamityMod.CalPlayer
|
||||
public int defenseDamage = 0;
|
||||
public float rangedAmmoCost = 1f;
|
||||
public bool heldGaelsLastFrame = false;
|
||||
public bool blazingMouseDamageEffects = false;
|
||||
public bool ableToDrawBlazingMouse = false;
|
||||
public float blazingMouseAuraFade = 0f;
|
||||
public float GeneralScreenShakePower = 0f;
|
||||
public bool GivenBrimstoneLocus = false;
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Trackers
|
||||
@@ -157,6 +162,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool newCirrusInventory = false;
|
||||
public bool newAmidiasInventory = false;
|
||||
public bool newBanditInventory = false;
|
||||
public bool newCalamitasInventory = false;
|
||||
#endregion
|
||||
|
||||
#region Stat Meter
|
||||
@@ -278,6 +284,7 @@ namespace CalamityMod.CalPlayer
|
||||
public float rogueStealthMax = 0f;
|
||||
public float stealthGenStandstill = 1f;
|
||||
public float stealthGenMoving = 1f;
|
||||
public int flatStealthLossReduction = 0;
|
||||
public const float StealthAccelerationCap = 2f;
|
||||
public float stealthAcceleration = 1f;
|
||||
public bool stealthStrikeThisFrame = false;
|
||||
@@ -579,6 +586,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int roverDriveTimer = 0;
|
||||
public int roverFrameCounter = 0;
|
||||
public int roverFrame = 0;
|
||||
public bool rottenDogTooth = false;
|
||||
public bool angelicAlliance = false;
|
||||
public int angelicActivate = -1;
|
||||
#endregion
|
||||
@@ -718,6 +726,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool aCrunch = false;
|
||||
public bool irradiated = false;
|
||||
public bool bFlames = false;
|
||||
public bool weakBrimstoneFlames = false;
|
||||
public bool aFlames = false;
|
||||
public bool gsInferno = false;
|
||||
public bool astralInfection = false;
|
||||
@@ -931,6 +940,18 @@ namespace CalamityMod.CalPlayer
|
||||
public bool plaguebringerPatronSummon = false;
|
||||
public bool howlTrio = false;
|
||||
public bool mountedScanner = false;
|
||||
public bool sepulcher = false;
|
||||
public bool daedalusGolem = false;
|
||||
public bool deathstareEyeball = false;
|
||||
public bool witherBlossom = false;
|
||||
public bool flowersOfMortality = false;
|
||||
public bool viridVanguard = false;
|
||||
public bool sageSpirit = false;
|
||||
public bool fleshBall = false;
|
||||
public bool eyeOfNight = false;
|
||||
public bool soulSeeker = false;
|
||||
public bool perditionBeacon = false;
|
||||
|
||||
public List<DeadMinionProperties> PendingProjectilesToRespawn = new List<DeadMinionProperties>();
|
||||
|
||||
// Due to the way vanilla summons work, the buff must be applied manually for it to properly register, since
|
||||
@@ -1004,6 +1025,27 @@ namespace CalamityMod.CalPlayer
|
||||
public bool omegaBlueTransformationPower;
|
||||
#endregion
|
||||
|
||||
#region Calamitas Enchant Effects
|
||||
public bool cursedSummonsEnchant = false;
|
||||
public bool flamingItemEnchant = false;
|
||||
public bool lifeManaEnchant = false;
|
||||
public bool farProximityRewardEnchant = false;
|
||||
public bool closeProximityRewardEnchant = false;
|
||||
public bool dischargingItemEnchant = false;
|
||||
public bool explosiveMinionsEnchant = false;
|
||||
public bool bladeArmEnchant = false;
|
||||
public bool manaMonsterEnchant = false;
|
||||
|
||||
public bool witheringWeaponEnchant = false;
|
||||
public bool witheredDebuff = false;
|
||||
public int witheredWeaponHoldTime = 0;
|
||||
|
||||
public bool persecutedEnchant = false;
|
||||
public int persecutedEnchantSummonTimer = 0;
|
||||
|
||||
public bool lecherousOrbEnchant = false;
|
||||
#endregion Calamitas Enchant Effects
|
||||
|
||||
#endregion
|
||||
|
||||
#region SavingAndLoading
|
||||
@@ -1051,6 +1093,7 @@ namespace CalamityMod.CalPlayer
|
||||
newCirrusInventory = false;
|
||||
newAmidiasInventory = false;
|
||||
newBanditInventory = false;
|
||||
newCalamitasInventory = false;
|
||||
}
|
||||
|
||||
public override TagCompound Save()
|
||||
@@ -1099,6 +1142,8 @@ namespace CalamityMod.CalPlayer
|
||||
boost.AddWithCondition("newCirrusInventory", newCirrusInventory);
|
||||
boost.AddWithCondition("newAmidiasInventory", newAmidiasInventory);
|
||||
boost.AddWithCondition("newBanditInventory", newBanditInventory);
|
||||
boost.AddWithCondition("newCalamitasInventory", newCalamitasInventory);
|
||||
boost.AddWithCondition("GivenBrimstoneLocus", GivenBrimstoneLocus);
|
||||
|
||||
return new TagCompound
|
||||
{
|
||||
@@ -1174,6 +1219,8 @@ namespace CalamityMod.CalPlayer
|
||||
newCirrusInventory = boost.Contains("newCirrusInventory");
|
||||
newAmidiasInventory = boost.Contains("newAmidiasInventory");
|
||||
newBanditInventory = boost.Contains("newBanditInventory");
|
||||
newCalamitasInventory = boost.Contains("newCalamitasInventory");
|
||||
GivenBrimstoneLocus = boost.Contains("GivenBrimstoneLocus");
|
||||
|
||||
// Load rage from "stress" if this is an older save. Otherwise load it from "rage", its new name.
|
||||
if (tag.ContainsKey("stress"))
|
||||
@@ -1307,8 +1354,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
BitsByte flags6 = reader.ReadByte();
|
||||
newBanditInventory = flags6[0];
|
||||
finalTierAccessoryReforge = flags6[1];
|
||||
}
|
||||
finalTierAccessoryReforge = flags6[1];
|
||||
newCalamitasInventory = flags6[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
ModContent.GetInstance<CalamityMod>().Logger.Error("Unknown loadVersion: " + loadVersion);
|
||||
@@ -1493,6 +1541,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
noWings = false;
|
||||
blockAllDashes = false;
|
||||
blazingMouseDamageEffects = false;
|
||||
ableToDrawBlazingMouse = false;
|
||||
|
||||
luxorsGift = false;
|
||||
fungalSymbiote = false;
|
||||
@@ -1610,6 +1660,7 @@ namespace CalamityMod.CalPlayer
|
||||
noStupidNaturalARSpawns = false;
|
||||
burdenBreakerYeet = false;
|
||||
roverDrive = false;
|
||||
rottenDogTooth = false;
|
||||
angelicAlliance = false;
|
||||
|
||||
daedalusReflect = false;
|
||||
@@ -1735,6 +1786,7 @@ namespace CalamityMod.CalPlayer
|
||||
aCrunch = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
weakBrimstoneFlames = false;
|
||||
aFlames = false;
|
||||
gsInferno = false;
|
||||
astralInfection = false;
|
||||
@@ -1953,6 +2005,17 @@ namespace CalamityMod.CalPlayer
|
||||
plaguebringerPatronSummon = false;
|
||||
howlTrio = false;
|
||||
mountedScanner = false;
|
||||
sepulcher = false;
|
||||
daedalusGolem = false;
|
||||
deathstareEyeball = false;
|
||||
witherBlossom = false;
|
||||
flowersOfMortality = false;
|
||||
viridVanguard = false;
|
||||
sageSpirit = false;
|
||||
fleshBall = false;
|
||||
eyeOfNight = false;
|
||||
soulSeeker = false;
|
||||
perditionBeacon = false;
|
||||
|
||||
abyssalDivingSuitPrevious = abyssalDivingSuit;
|
||||
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
|
||||
@@ -1977,7 +2040,23 @@ namespace CalamityMod.CalPlayer
|
||||
RageDuration = DefaultRageDuration;
|
||||
RageDamageBoost = DefaultRageDamageBoost;
|
||||
|
||||
cursedSummonsEnchant = false;
|
||||
flamingItemEnchant = false;
|
||||
lifeManaEnchant = false;
|
||||
farProximityRewardEnchant = false;
|
||||
closeProximityRewardEnchant = false;
|
||||
dischargingItemEnchant = false;
|
||||
explosiveMinionsEnchant = false;
|
||||
bladeArmEnchant = false;
|
||||
manaMonsterEnchant = false;
|
||||
witheringWeaponEnchant = false;
|
||||
persecutedEnchant = false;
|
||||
lecherousOrbEnchant = false;
|
||||
flatStealthLossReduction = 0;
|
||||
|
||||
lastProjectileHit = null;
|
||||
|
||||
CalamityPlayerMiscEffects.EnchantHeldItemEffects(player, player.Calamity(), player.ActiveItem());
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -2087,6 +2166,7 @@ namespace CalamityMod.CalPlayer
|
||||
aCrunch = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
weakBrimstoneFlames = false;
|
||||
aFlames = false;
|
||||
gsInferno = false;
|
||||
astralInfection = false;
|
||||
@@ -2381,6 +2461,7 @@ namespace CalamityMod.CalPlayer
|
||||
animusBoost = 1f;
|
||||
potionTimer = 0;
|
||||
bloodflareCoreLostDefense = 0;
|
||||
persecutedEnchantSummonTimer = 0;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
@@ -4371,7 +4452,7 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s lungs collapsed.");
|
||||
}
|
||||
if (bFlames || aFlames)
|
||||
if (bFlames || aFlames || weakBrimstoneFlames)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was consumed by the black flames.");
|
||||
}
|
||||
@@ -4517,7 +4598,7 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
acidRoundMultiplier = 1D;
|
||||
|
||||
//Prismatic Breaker is a weird hybrid melee-ranged weapon so include it too. Why are you using desert prowler post-Yharon? don't ask me
|
||||
// Prismatic Breaker is a weird hybrid melee-ranged weapon so include it too. Why are you using desert prowler post-Yharon? don't ask me
|
||||
if (desertProwler && (item.ranged || item.type == ModContent.ItemType<PrismaticBreaker>()) && item.ammo == AmmoID.None)
|
||||
flat += 1f;
|
||||
}
|
||||
@@ -6832,6 +6913,12 @@ namespace CalamityMod.CalPlayer
|
||||
#region Shoot
|
||||
public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (bladeArmEnchant)
|
||||
return false;
|
||||
|
||||
if (rottenDogTooth && item.Calamity().rogue && item.type != ModContent.ItemType<SylvanSlasher>())
|
||||
damage = (int)(damage * (1f + RottenDogtooth.StealthStrikeDamageMultiplier));
|
||||
|
||||
if (veneratedLocket)
|
||||
{
|
||||
if (item.Calamity().rogue && item.type != ModContent.ItemType<SylvanSlasher>())
|
||||
@@ -7263,6 +7350,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
// Summon a portal if needed.
|
||||
if (player.Calamity().persecutedEnchant && NPC.CountNPCS(ModContent.NPCType<DemonPortal>()) < 2)
|
||||
{
|
||||
Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
int portal = NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType<DemonPortal>());
|
||||
if (Main.npc.IndexInRange(portal))
|
||||
Main.npc[portal].target = player.whoAmI;
|
||||
}
|
||||
|
||||
if (revivify)
|
||||
{
|
||||
int healAmt = (int)(damage / 15D);
|
||||
@@ -9479,20 +9575,21 @@ namespace CalamityMod.CalPlayer
|
||||
stealthStrikeThisFrame = true;
|
||||
stealthAcceleration = 1f; // Reset acceleration when you attack
|
||||
|
||||
float lossReductionRatio = flatStealthLossReduction / (rogueStealthMax * 100f);
|
||||
if (stealthStrikeHalfCost)
|
||||
{
|
||||
rogueStealth -= 0.5f * rogueStealthMax;
|
||||
rogueStealth -= 0.5f * rogueStealthMax - lossReductionRatio;
|
||||
if (rogueStealth <= 0f)
|
||||
rogueStealth = 0f;
|
||||
}
|
||||
else if (stealthStrike75Cost)
|
||||
{
|
||||
rogueStealth -= 0.75f * rogueStealthMax;
|
||||
{
|
||||
rogueStealth -= 0.75f * rogueStealthMax - lossReductionRatio;
|
||||
if (rogueStealth <= 0f)
|
||||
rogueStealth = 0f;
|
||||
}
|
||||
else
|
||||
rogueStealth = 0f;
|
||||
else
|
||||
rogueStealth = lossReductionRatio;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -10623,5 +10720,32 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mana Consumption Effects
|
||||
public override void OnConsumeMana(Item item, int manaConsumed)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (Main.rand.NextBool(4) && modPlayer.lifeManaEnchant)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
player.HealEffect(-5);
|
||||
player.statLife -= 5;
|
||||
if (player.statLife <= 0)
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason($"{player.name} converted all of their life to mana."), 1000, -1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Dust life = Dust.NewDustPerfect(player.Top + Main.rand.NextVector2Circular(player.width * 0.5f, 6f), 267);
|
||||
life.color = Color.Red;
|
||||
life.velocity = -Vector2.UnitY.RotatedByRandom(0.48f) * Main.rand.NextFloat(3f, 4.4f);
|
||||
life.scale = Main.rand.NextFloat(1.5f, 1.72f);
|
||||
life.fadeIn = 0.7f;
|
||||
life.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@ using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -95,6 +95,15 @@ namespace CalamityMod.CalPlayer
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (modPlayer.weakBrimstoneFlames)
|
||||
{
|
||||
if (player.lifeRegen > 0)
|
||||
player.lifeRegen = 0;
|
||||
|
||||
player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 5;
|
||||
}
|
||||
|
||||
if (modPlayer.bFlames)
|
||||
{
|
||||
if (player.lifeRegen > 0)
|
||||
@@ -400,7 +409,23 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.lifeRegen > 0)
|
||||
player.lifeRegen = 0;
|
||||
lifeRegenLost += 42; //the meaning of death
|
||||
}
|
||||
}
|
||||
if (modPlayer.witheredDebuff)
|
||||
{
|
||||
modPlayer.witheredWeaponHoldTime += modPlayer.witheringWeaponEnchant.ToDirectionInt();
|
||||
if (modPlayer.witheredWeaponHoldTime < 0)
|
||||
{
|
||||
modPlayer.witheredWeaponHoldTime = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lifeRegenLost += (int)(4D * Math.Pow(1.5D, modPlayer.witheredWeaponHoldTime / 87D));
|
||||
if (player.lifeRegen > 0)
|
||||
player.lifeRegen = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
modPlayer.witheredWeaponHoldTime = 0;
|
||||
|
||||
player.lifeRegen -= (int)(lifeRegenLost * lifeRegenMult);
|
||||
|
||||
@@ -653,6 +678,11 @@ namespace CalamityMod.CalPlayer
|
||||
player.lifeRegenTime += 1;
|
||||
player.lifeRegen += 2;
|
||||
}
|
||||
else if (modPlayer.rOoze)
|
||||
{
|
||||
if (!Main.dayTime)
|
||||
player.lifeRegen += 4;
|
||||
}
|
||||
|
||||
if (modPlayer.ursaSergeant)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
@@ -23,6 +24,7 @@ using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.Astral;
|
||||
using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.Other;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
@@ -78,6 +80,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);
|
||||
|
||||
@@ -117,6 +123,11 @@ namespace CalamityMod.CalPlayer
|
||||
// Check if schematics are present on the mouse, for the sake of registering their recipes.
|
||||
CheckIfMouseItemIsSchematic(player);
|
||||
|
||||
// Update all particle sets for items.
|
||||
// This must be done here instead of in the item logic because these sets are not properly instanced
|
||||
// in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items.
|
||||
CalamityGlobalItem.UpdateAllParticleSets();
|
||||
|
||||
// Regularly sync player stats during multiplayer
|
||||
if (player.whoAmI == Main.myPlayer && Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -345,7 +356,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc is null || !npc.IsAnEnemy())
|
||||
if (npc is null || !npc.IsAnEnemy() || npc.Calamity().DoesNotGenerateRage)
|
||||
continue;
|
||||
|
||||
// Take the longer of the two directions for the NPC's hitbox to be generous.
|
||||
@@ -480,8 +491,56 @@ namespace CalamityMod.CalPlayer
|
||||
#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;
|
||||
@@ -1184,6 +1243,19 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.aBulwarkRareTimer--;
|
||||
if (modPlayer.hellbornBoost > 0)
|
||||
modPlayer.hellbornBoost--;
|
||||
if (modPlayer.persecutedEnchantSummonTimer < 1800)
|
||||
modPlayer.persecutedEnchantSummonTimer++;
|
||||
else
|
||||
{
|
||||
modPlayer.persecutedEnchantSummonTimer = 0;
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().persecutedEnchant && NPC.CountNPCS(ModContent.NPCType<DemonPortal>()) < 2)
|
||||
{
|
||||
Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
int portal = NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType<DemonPortal>());
|
||||
if (Main.npc.IndexInRange(portal))
|
||||
Main.npc[portal].target = player.whoAmI;
|
||||
}
|
||||
}
|
||||
if (player.miscCounter % 20 == 0)
|
||||
modPlayer.canFireAtaxiaRangedProjectile = true;
|
||||
if (player.miscCounter % 100 == 0)
|
||||
@@ -1407,11 +1479,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Ambrosial Ampoule bonus and other light-granting bonuses
|
||||
float[] light = new float[3];
|
||||
if (modPlayer.aAmpoule)
|
||||
if ((modPlayer.rOoze && !Main.dayTime) || modPlayer.aAmpoule)
|
||||
{
|
||||
light[0] += 1f;
|
||||
light[1] += 1f;
|
||||
light[2] += 0.6f;
|
||||
}
|
||||
if (modPlayer.aAmpoule)
|
||||
{
|
||||
player.endurance += 0.05f;
|
||||
player.pickSpeed -= 0.25f;
|
||||
player.buffImmune[BuffID.Venom] = true;
|
||||
@@ -2032,6 +2107,43 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Calamitas Enchantment Held Item Effects
|
||||
public static void EnchantHeldItemEffects(Player player, CalamityPlayer modPlayer, Item heldItem)
|
||||
{
|
||||
if (heldItem.IsAir)
|
||||
return;
|
||||
|
||||
// Exhaustion recharge effects.
|
||||
foreach (Item item in player.inventory)
|
||||
{
|
||||
if (item.IsAir)
|
||||
continue;
|
||||
|
||||
if (item.Calamity().AppliedEnchantment.HasValue && item.Calamity().AppliedEnchantment.Value.ID == 600)
|
||||
{
|
||||
// Initialize the exhaustion if it is currently not defined.
|
||||
if (item.Calamity().DischargeEnchantExhaustion <= 0f)
|
||||
item.Calamity().DischargeEnchantExhaustion = CalamityGlobalItem.DischargeEnchantExhaustionCap;
|
||||
|
||||
// Slowly recharge the weapon over time. This is depleted when the item is actaully used.
|
||||
else if (item.Calamity().DischargeEnchantExhaustion < CalamityGlobalItem.DischargeEnchantExhaustionCap)
|
||||
item.Calamity().DischargeEnchantExhaustion++;
|
||||
}
|
||||
else
|
||||
item.Calamity().DischargeEnchantExhaustion = 0f;
|
||||
}
|
||||
|
||||
if (!heldItem.Calamity().AppliedEnchantment.HasValue || heldItem.Calamity().AppliedEnchantment.Value.HoldEffect is null)
|
||||
return;
|
||||
|
||||
heldItem.Calamity().AppliedEnchantment.Value.HoldEffect(player);
|
||||
|
||||
// Weak brimstone flame hold curse effect.
|
||||
if (modPlayer.flamingItemEnchant)
|
||||
player.AddBuff(ModContent.BuffType<WeakBrimstoneFlames>(), 10);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Max Life And Mana Effects
|
||||
private static void MaxLifeAndManaEffects(Player player, CalamityPlayer modPlayer, Mod mod)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,8 @@ namespace CalamityMod
|
||||
ProjectileType<SausageMakerSpear>(),
|
||||
ProjectileType<YateveoBloomSpear>(),
|
||||
ProjectileType<HydraulicVoltCrasherProjectile>(),
|
||||
ProjectileType<DragonRageStaff>()
|
||||
ProjectileType<DragonRageStaff>(),
|
||||
ProjectileType<TaintedBladeSlasher>()
|
||||
};
|
||||
|
||||
rangedProjectileExceptionList = new List<int>()
|
||||
@@ -423,13 +424,16 @@ 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<TaintedBladeSlasher>(),
|
||||
ProjectileType<PhotonRipperProjectile>(),
|
||||
ProjectileType<SpineOfThanatosProjectile>(),
|
||||
|
||||
//Some hostile boss projectiles
|
||||
ProjectileType<BrimstoneMonster>(),
|
||||
|
||||
@@ -42,6 +42,7 @@ using CalamityMod.Schematics;
|
||||
using CalamityMod.Skies;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.CalamitasEnchants;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -187,6 +188,7 @@ namespace CalamityMod
|
||||
BossHealthBarManager.Load(this);
|
||||
DraedonStructures.Load();
|
||||
CalamityLists.LoadLists();
|
||||
EnchantmentManager.LoadAllEnchantments();
|
||||
SetupVanillaDR();
|
||||
SetupBossKillTimes();
|
||||
SetupBossVelocityScalingValues();
|
||||
@@ -322,6 +324,7 @@ namespace CalamityMod
|
||||
bossVelocityDamageScaleValues?.Clear();
|
||||
bossVelocityDamageScaleValues = null;
|
||||
|
||||
EnchantmentManager.UnloadAllEnchantments();
|
||||
CalamityLists.UnloadLists();
|
||||
NPCStats.Unload();
|
||||
|
||||
@@ -549,7 +552,7 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<AquaticScourgeTail>(), 7200 },
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 10800 },
|
||||
{ ModContent.NPCType<Calamitas>(), 1200 },
|
||||
{ ModContent.NPCType<CalamitasRun3>(), 11400 },
|
||||
{ ModContent.NPCType<CalamitasRun3>(), 13200 },
|
||||
{ ModContent.NPCType<Leviathan>(), 10800 },
|
||||
{ ModContent.NPCType<Siren>(), 10800 },
|
||||
{ ModContent.NPCType<AstrumAureus>(), 10800 },
|
||||
@@ -901,11 +904,17 @@ namespace CalamityMod
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Calamitas Enchantment UI
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Calamitas Enchantment", () =>
|
||||
{
|
||||
CalamitasEnchantUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Codebreaker UI.
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Codebreaker Decryption GUI", () =>
|
||||
{
|
||||
DraedonDecryptUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Popup GUIs.
|
||||
|
||||
@@ -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,10 +10,16 @@ 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 FlameStreakShader;
|
||||
public static Effect FadingSolidTrailShader;
|
||||
public static Effect ScarletDevilShader;
|
||||
public static Effect BordernadoFireShader;
|
||||
public static Effect PrismCrystalShader;
|
||||
public static Effect SCalShieldShader;
|
||||
|
||||
public static void LoadShaders()
|
||||
@@ -23,9 +29,15 @@ 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");
|
||||
FlameStreakShader = CalamityMod.Instance.GetEffect("Effects/Flame");
|
||||
FadingSolidTrailShader = CalamityMod.Instance.GetEffect("Effects/FadingSolidTrail");
|
||||
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);
|
||||
@@ -33,10 +45,16 @@ namespace CalamityMod.Effects
|
||||
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:Flame"] = new MiscShaderData(new Ref<Effect>(FlameStreakShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:FadingSolidTrail"] = new MiscShaderData(new Ref<Effect>(FadingSolidTrailShader), "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,66 @@
|
||||
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;
|
||||
float shouldFlip;
|
||||
|
||||
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;
|
||||
if (shouldFlip == 1)
|
||||
coords.y = 1 - coords.y;
|
||||
|
||||
// Read the fade map as a streak.
|
||||
float4 fadeMapColor = tex2D(uImage1, coords);
|
||||
float opacity = fadeMapColor.r;
|
||||
return color * opacity;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
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: 10 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 932 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 783 B |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 196 B |
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 190 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 585 B |
|
After Width: | Height: | Size: 468 B |
|
After Width: | Height: | Size: 409 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 300 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 819 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 334 B |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 289 B |