Merge branch 'suggs-2' of https://github.com/CalamityTeam/CalamityMod into suggs-2

This commit is contained in:
Dominic committed 2021-10-28 19:12:38 -05:00
commit 493f0fdf0d
780 files changed
+15675 -4908

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void SetDefaults()
{
DisplayName.SetDefault("Trippy");
Description.SetDefault("You see the world for what it truly is...and you also have a 50% increase to all damage");
Description.SetDefault("You see the world for what it truly is... and you also have a 50% increase to all damage");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+20
View File
@@ -0,0 +1,20 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class ManaBurn : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Mana Burn");
Description.SetDefault("The excess of mana sears your body and mind");
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().ManaBurn = true;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

+24
View File
@@ -0,0 +1,24 @@
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Mounts.Minecarts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
{
public class DoGCartBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Devourer Cart");
Description.SetDefault("Riding a cosmic terror");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.mount.SetMount(ModContent.MountType<DoGCartMount>(), player);
player.buffTime[buffIndex] = 10;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

+24
View File
@@ -0,0 +1,24 @@
using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
{
public class DraedonGamerChairBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Exo Chair");
Description.SetDefault("Riding a physics defying gamer chair");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.mount.SetMount(ModContent.MountType<DraedonGamerChairMount>(), player);
player.buffTime[buffIndex] = 10;
player.Calamity().ExoChair = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Pets
public override void SetDefaults()
{
DisplayName.SetDefault("Supreme Calamitas");
Description.SetDefault("Watching over you with supreme calamitous energy...how adorable");
Description.SetDefault("Watching over you with supreme calamitous energy... how adorable");
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetDefaults()
{
DisplayName.SetDefault("Abyssal Weapon");
Description.SetDefault("Melee weapons inflict abyssal flames, 10% increased movement speed");
Description.SetDefault("Melee and rogue weapons inflict abyssal flames, 10% increased movement speed");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetDefaults()
{
DisplayName.SetDefault("Yharim's Power");
Description.SetDefault("You feel like you can break the world in two...with your bare hands!");
Description.SetDefault("You feel like you can break the world in two... with your bare hands!");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+226 -144
View File
@@ -13,6 +13,7 @@ using CalamityMod.Items.Armor;
using CalamityMod.Items.DifficultyItems;
using CalamityMod.Items.Dyes;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Mounts.Minecarts;
using CalamityMod.Items.Tools;
using CalamityMod.Items.TreasureBags;
using CalamityMod.Items.Weapons.Melee;
@@ -28,6 +29,7 @@ using CalamityMod.NPCs.Calamitas;
using CalamityMod.NPCs.Crags;
using CalamityMod.NPCs.Cryogen;
using CalamityMod.NPCs.DevourerofGods;
using CalamityMod.NPCs.ExoMechs;
using CalamityMod.NPCs.ExoMechs.Apollo;
using CalamityMod.NPCs.GreatSandShark;
using CalamityMod.NPCs.Leviathan;
@@ -64,6 +66,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameInput;
@@ -135,6 +138,9 @@ namespace CalamityMod.CalPlayer
public float blazingMouseAuraFade = 0f;
public float GeneralScreenShakePower = 0f;
public bool GivenBrimstoneLocus = false;
public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount];
public float SmoothenedMinecartRotation;
public float MusicMuffleFactor;
#endregion
#region Tile Entity Trackers
@@ -321,6 +327,7 @@ namespace CalamityMod.CalPlayer
public bool angryDog = false;
public bool fab = false;
public bool crysthamyr = false;
public bool ExoChair = false;
public AndromedaPlayerState andromedaState;
public int andromedaCripple;
public const float UnicornSpeedNerfPower = 0.8f;
@@ -615,6 +622,9 @@ namespace CalamityMod.CalPlayer
public bool rottenDogTooth = false;
public bool angelicAlliance = false;
public int angelicActivate = -1;
public bool BloomStoneRegen = false;
public bool ChaosStone = false;
public bool CryoStone = false;
#endregion
#region Armor Set
@@ -785,6 +795,7 @@ namespace CalamityMod.CalPlayer
public bool divineBlessCooldown = false;
public bool banishingFire = false;
public bool wither = false;
public bool ManaBurn = false;
#endregion
#region Buff
@@ -1081,6 +1092,10 @@ namespace CalamityMod.CalPlayer
public FireParticleSet ProvidenceBurnEffectDrawer = new FireParticleSet(-1, int.MaxValue, Color.Yellow, Color.Red * 1.2f, 10f, 0.65f);
#endregion Draw Effects
#region Draedon Summoning
public bool AbleToSelectExoMech = false;
#endregion Draedon Summoning
#endregion
#region SavingAndLoading
@@ -1466,6 +1481,8 @@ namespace CalamityMod.CalPlayer
ResetRogueStealth();
MusicMuffleFactor = 0f;
contactDamageReduction = 0D;
projectileDamageReduction = 0D;
@@ -1514,6 +1531,7 @@ namespace CalamityMod.CalPlayer
angryDog = false;
fab = false;
crysthamyr = false;
ExoChair = false;
miniOldDuke = false;
abyssalDivingSuitPlates = false;
@@ -1704,6 +1722,9 @@ namespace CalamityMod.CalPlayer
roverDrive = false;
rottenDogTooth = false;
angelicAlliance = false;
BloomStoneRegen = false;
ChaosStone = false;
CryoStone = false;
daedalusReflect = false;
daedalusSplit = false;
@@ -1865,6 +1886,7 @@ namespace CalamityMod.CalPlayer
divineBlessCooldown = false;
banishingFire = false;
wither = false;
ManaBurn = false;
revivify = false;
trinketOfChiBuff = false;
@@ -2110,6 +2132,8 @@ namespace CalamityMod.CalPlayer
lastProjectileHit = null;
AbleToSelectExoMech = false;
CalamityPlayerMiscEffects.EnchantHeldItemEffects(player, player.Calamity(), player.ActiveItem());
}
#endregion
@@ -2275,6 +2299,7 @@ namespace CalamityMod.CalPlayer
angryDog = false;
fab = false;
crysthamyr = false;
ExoChair = false;
abyssalDivingSuitPlates = false;
sirenWaterBuff = false;
sirenIce = false;
@@ -2502,27 +2527,8 @@ namespace CalamityMod.CalPlayer
if (BossRushEvent.BossRushActive)
{
if (!CalamityGlobalNPC.AnyLivingPlayers())
{
BossRushEvent.BossRushActive = false;
BossRushEvent.BossRushStage = 0;
CalamityNetcode.SyncWorld();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.BossRushStage);
netMessage.Write(BossRushEvent.BossRushStage);
netMessage.Send();
}
for (int doom = 0; doom < Main.maxNPCs; doom++)
{
if (Main.npc[doom].active && Main.npc[doom].boss)
{
Main.npc[doom].active = false;
Main.npc[doom].netUpdate = true;
}
}
}
if (player.whoAmI == 0 && !CalamityGlobalNPC.AnyLivingPlayers() && CalamityUtils.CountProjectiles(ModContent.ProjectileType<BossRushFailureEffectThing>()) == 0)
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BossRushFailureEffectThing>(), 0, 0f);
}
if (player.respawnTimer > 300)
@@ -2536,8 +2542,34 @@ namespace CalamityMod.CalPlayer
#endregion
#region BiomeStuff
internal static readonly FieldInfo EffectsField = typeof(SkyManager).GetField("_effects", BindingFlags.NonPublic | BindingFlags.Instance);
public override void UpdateBiomeVisuals()
{
bool useBossRushBackground = BossRushEvent.BossRushActive && BossRushEvent.StartTimer > 100;
player.ManageSpecialBiomeVisuals("CalamityMod:BossRush", useBossRushBackground);
if (useBossRushBackground)
{
// Clear all other skies, including the vanilla ones.
Dictionary<string, CustomSky> skies = EffectsField.GetValue(SkyManager.Instance) as Dictionary<string, CustomSky>;
bool updateRequired = false;
foreach (string skyName in skies.Keys)
{
if (skies[skyName].IsActive() && skyName != "CalamityMod:BossRush")
{
skies[skyName].Opacity = 0f;
skies[skyName].Deactivate();
updateRequired = true;
}
}
if (updateRequired)
SkyManager.Instance.Update(new GameTime());
return;
}
bool useNebula = NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>());
player.ManageSpecialBiomeVisuals("CalamityMod:DevourerofGodsHead", useNebula);
@@ -2568,6 +2600,13 @@ namespace CalamityMod.CalPlayer
SkyManager.Instance.Deactivate("CalamityMod:Cryogen");
}
bool useExoMechs = ExoMechsSky.CanSkyBeActive;
player.ManageSpecialBiomeVisuals("CalamityMod:ExoMechs", useExoMechs);
if (useExoMechs)
SkyManager.Instance.Activate("CalamityMod:ExoMechs", player.Center);
else
SkyManager.Instance.Deactivate("CalamityMod:ExoMechs");
Point point = player.Center.ToTileCoordinates();
bool aboveGround = point.Y > Main.maxTilesY - 320;
bool overworld = player.ZoneOverworldHeight && (point.X < 380 || point.X > Main.maxTilesX - 380);
@@ -3160,7 +3199,7 @@ namespace CalamityMod.CalPlayer
}
// Trigger for pressing the God Slayer dash key
if (CalamityMod.GodSlayerDashHotKey.JustPressed && (player.controlUp || player.controlDown || player.controlLeft || player.controlRight))
if (CalamityMod.GodSlayerDashHotKey.JustPressed && (player.controlUp || player.controlDown || player.controlLeft || player.controlRight) && !player.pulley && player.grappling[0] == -1 && !player.tongued && !player.mount.Active && !godSlayerCooldown && player.dashDelay == 0)
godSlayerDashHotKeyPressed = true;
// Trigger for pressing the Rage hotkey.
@@ -3207,7 +3246,7 @@ namespace CalamityMod.CalPlayer
}
// Activating Rage Mode
if (rage >= rageMax && CalamityConfig.Instance.Rippers && !rageModeActive)
if (rage >= rageMax && !rageModeActive)
{
// Rage duration isn't calculated here because the buff keeps itself alive automatically as long as the player has Rage left.
player.AddBuff(ModContent.BuffType<RageMode>(), 2);
@@ -3237,7 +3276,7 @@ namespace CalamityMod.CalPlayer
}
// Trigger for pressing the Adrenaline hotkey.
if (CalamityMod.AdrenalineHotKey.JustPressed && CalamityConfig.Instance.Rippers && CalamityWorld.revenge)
if (CalamityMod.AdrenalineHotKey.JustPressed && CalamityWorld.revenge)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
{
@@ -3658,14 +3697,15 @@ namespace CalamityMod.CalPlayer
CalamityConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
if (CalamityConfig.Instance.MiningSpeedBoost)
{
player.pickSpeed *= 0.75f;
}
// Increase tile placement speed to speed up early game a bit and make building more fun
player.tileSpeed += 0.5f;
// Takes the % move speed boost and reduces it to a quarter to get the actual speed increase
// 400% move speed boost = 80% run speed boost, so an 8 run speed would become 14.4 with a 400% move speed stat
float accRunSpeedMin = player.accRunSpeed * 0.5f;
// Increase wall placement speed to speed up early game a bit and make building more fun
player.wallSpeed += 0.5f;
// Takes the % move speed boost and reduces it to a quarter to get the actual speed increase
// 400% move speed boost = 80% run speed boost, so an 8 run speed would become 14.4 with a 400% move speed stat
float accRunSpeedMin = player.accRunSpeed * 0.5f;
player.accRunSpeed += player.accRunSpeed * moveSpeedStat * 0.002f;
if (player.accRunSpeed < accRunSpeedMin)
@@ -3901,6 +3941,47 @@ namespace CalamityMod.CalPlayer
}
#endregion
#region PreUpdateMovement
public override void PreUpdateMovement()
{
// Remove acceleration when using the exo chair.
if (ExoChair)
{
float speed = DraedonGamerChairMount.MovementSpeed;
if (CalamityMod.ExoChairSpeedupHotkey.Current)
speed *= 2f;
if (player.controlLeft)
{
player.velocity.X = -speed;
player.direction = -1;
}
else if (player.controlRight)
{
player.velocity.X = speed;
player.direction = 1;
}
else
player.velocity.X = 0f;
if (player.controlUp)
player.velocity.Y = -speed;
else if (player.controlDown)
{
player.velocity.Y = speed;
if (Collision.TileCollision(player.position, player.velocity, player.width, player.height, true, false, (int)player.gravDir).Y == 0f)
player.velocity.Y = 0.5f;
}
else
player.velocity.Y = 0f;
if (player.controlJump)
player.velocity *= 0.5f;
}
}
#endregion
#region PostUpdateBuffs
public override void PostUpdateBuffs() => ForceVariousEffects();
#endregion
@@ -3937,75 +4018,78 @@ namespace CalamityMod.CalPlayer
public override void PostUpdateRunSpeeds()
{
#region SpeedBoosts
float runAccMult = 1f +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(auricSet ? 0.1f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(blueCandle ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && player.IsUnderwater()) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
#region SpeedBoosts
if (!player.mount.Active)
{
float runAccMult = 1f +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(auricSet ? 0.1f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(blueCandle ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && player.IsUnderwater()) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
float runSpeedMult = 1f +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(auricSet ? 0.1f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && player.IsUnderwater()) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
float runSpeedMult = 1f +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(auricSet ? 0.1f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && player.IsUnderwater()) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
if (abyssalDivingSuit && !player.IsUnderwater())
{
float multiplier = 0.4f + abyssalDivingSuitPlateHits * 0.2f;
runAccMult *= multiplier;
runSpeedMult *= multiplier;
}
if (fabledTortoise)
{
float multiplier = shellBoost ? 0.8f : 0.5f;
runAccMult *= multiplier;
runSpeedMult *= multiplier;
}
if (ursaSergeant)
{
runAccMult *= 0.65f;
runSpeedMult *= 0.65f;
}
if (elysianGuard)
{
runAccMult *= 0.5f;
runSpeedMult *= 0.5f;
}
if ((player.slippy || player.slippy2) && player.iceSkate)
{
runAccMult *= 0.6f;
}
if (CalamityWorld.death && deathModeBlizzardTime > 0)
{
float speedMult = (3600 - deathModeBlizzardTime) / 3600f;
runAccMult *= speedMult;
runSpeedMult *= speedMult;
}
if (abyssalDivingSuit && !player.IsUnderwater())
{
float multiplier = 0.4f + abyssalDivingSuitPlateHits * 0.2f;
runAccMult *= multiplier;
runSpeedMult *= multiplier;
}
if (fabledTortoise)
{
float multiplier = shellBoost ? 0.8f : 0.5f;
runAccMult *= multiplier;
runSpeedMult *= multiplier;
}
if (ursaSergeant)
{
runAccMult *= 0.65f;
runSpeedMult *= 0.65f;
}
if (elysianGuard)
{
runAccMult *= 0.5f;
runSpeedMult *= 0.5f;
}
if ((player.slippy || player.slippy2) && player.iceSkate)
{
runAccMult *= 0.6f;
}
if (CalamityWorld.death && deathModeBlizzardTime > 0)
{
float speedMult = (3600 - deathModeBlizzardTime) / 3600f;
runAccMult *= speedMult;
runSpeedMult *= speedMult;
}
player.runAcceleration *= runAccMult;
player.maxRunSpeed *= runSpeedMult;
player.runAcceleration *= runAccMult;
player.maxRunSpeed *= runSpeedMult;
}
#endregion
#region DashEffects
@@ -4121,7 +4205,7 @@ namespace CalamityMod.CalPlayer
for (int j = 0; j < 30; j++)
{
int num = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
int num = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num];
dust.position.X += Main.rand.Next(-20, 21);
dust.position.Y += Main.rand.Next(-20, 21);
@@ -4526,7 +4610,7 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " vaporized into thin air.");
}
if (manaOverloader)
if (manaOverloader || ManaBurn)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s life was completely converted into mana.");
}
@@ -5296,7 +5380,7 @@ namespace CalamityMod.CalPlayer
if (witheredDebuff && witheringWeaponEnchant)
damageMult += 0.6;
if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers)
if (CalamityWorld.revenge)
{
CalamityUtils.ApplyRippersToDamage(this, ref damageMult);
}
@@ -5432,7 +5516,7 @@ namespace CalamityMod.CalPlayer
if (witheredDebuff)
damageMult += 0.6;
if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers)
if (CalamityWorld.revenge)
CalamityUtils.ApplyRippersToDamage(this, ref damageMult);
if ((filthyGlove || electricianGlove) && proj.Calamity().stealthStrike && proj.Calamity().rogue)
@@ -5819,17 +5903,14 @@ namespace CalamityMod.CalPlayer
if (CalamityWorld.revenge)
{
if (CalamityConfig.Instance.Rippers)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
{
double adrenalineDRBoost = 0D +
(adrenalineBoostOne ? 0.05 : 0D) +
(adrenalineBoostTwo ? 0.05 : 0D) +
(adrenalineBoostThree ? 0.05 : 0D);
contactDamageReduction += 0.5 + adrenalineDRBoost;
}
}
if (adrenaline == adrenalineMax && !adrenalineModeActive)
{
double adrenalineDRBoost = 0D +
(adrenalineBoostOne ? 0.05 : 0D) +
(adrenalineBoostTwo ? 0.05 : 0D) +
(adrenalineBoostThree ? 0.05 : 0D);
contactDamageReduction += 0.5 + adrenalineDRBoost;
}
}
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>()) && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
@@ -5915,7 +5996,7 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By Proj
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
{
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile)
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && damage > 0)
{
if (player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>() && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
@@ -5924,11 +6005,9 @@ namespace CalamityMod.CalPlayer
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = (int)(GaelsGreatsword.BaseDamage * player.MeleeDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
bool isImmune = false;
for (int j = 0; j < player.hurtCooldowns.Length; j++)
@@ -5980,11 +6059,9 @@ namespace CalamityMod.CalPlayer
// The Evolution
if (projRefRare)
{
int damage2 = (int)(proj.damage * 10 * player.AverageDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -2f;
proj.damage = damage2;
proj.extraUpdates += 1;
proj.penetrate = 1;
bool isImmune = false;
@@ -6015,11 +6092,9 @@ namespace CalamityMod.CalPlayer
// Arcanum of the Void
else if (projRef)
{
int damage2 = (int)(proj.damage * 5 * player.AverageDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.extraUpdates += 1;
proj.penetrate = 1;
bool isImmune = false;
@@ -6048,11 +6123,9 @@ namespace CalamityMod.CalPlayer
// Daedalus Melee set bonus
else if (daedalusReflect)
{
int damage2 = (int)(proj.damage * player.AverageDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
bool isImmune = false;
for (int j = 0; j < player.hurtCooldowns.Length; j++)
@@ -6271,17 +6344,14 @@ namespace CalamityMod.CalPlayer
if (CalamityWorld.revenge)
{
if (CalamityConfig.Instance.Rippers)
{
if (adrenaline == adrenalineMax && !adrenalineModeActive)
{
double adrenalineDRBoost = 0D +
(adrenalineBoostOne ? 0.05 : 0D) +
(adrenalineBoostTwo ? 0.05 : 0D) +
(adrenalineBoostThree ? 0.05 : 0D);
projectileDamageReduction += 0.5 + adrenalineDRBoost;
}
}
if (adrenaline == adrenalineMax && !adrenalineModeActive)
{
double adrenalineDRBoost = 0D +
(adrenalineBoostOne ? 0.05 : 0D) +
(adrenalineBoostTwo ? 0.05 : 0D) +
(adrenalineBoostThree ? 0.05 : 0D);
projectileDamageReduction += 0.5 + adrenalineDRBoost;
}
}
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>()) && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
@@ -6946,9 +7016,8 @@ namespace CalamityMod.CalPlayer
}
else if (proj.type == ProjectileID.CultistBossIceMist)
{
player.AddBuff(BuffID.Frozen, 60);
player.AddBuff(BuffID.Chilled, 120);
player.AddBuff(BuffID.Frostburn, 240);
player.AddBuff(BuffID.Frozen, 90);
player.AddBuff(BuffID.Chilled, 180);
}
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
{
@@ -7202,6 +7271,18 @@ namespace CalamityMod.CalPlayer
if (weakPetrification)
WeakPetrification();
// Disable vanilla dashes during god slayer dash
if (godSlayerDashHotKeyPressed)
{
// Set the player to have no registered vanilla dashes.
player.dash = 0;
// Prevent the possibility of Shield of Cthulhu invulnerability exploits.
player.eocHit = -1;
if (player.eocDash != 0)
player.eocDash = 0;
}
if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (dashMod == 9 && player.dashDelay < 0))
{
if (player.lifeRegen < 0)
@@ -7372,7 +7453,7 @@ namespace CalamityMod.CalPlayer
// Shattered Community makes the player gain rage based on the amount of damage taken.
// Also set the Rage gain cooldown to prevent bizarre abuse cases.
if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers && shatteredCommunity && rageGainCooldown == 0)
if (CalamityWorld.revenge && shatteredCommunity && rageGainCooldown == 0)
{
float HPRatio = (float)damage / player.statLifeMax2;
float rageConversionRatio = 0.8f;
@@ -7431,7 +7512,7 @@ namespace CalamityMod.CalPlayer
modStealth = 1f;
// Give Rage combat frames because being hurt counts as combat.
if (CalamityConfig.Instance.Rippers && CalamityWorld.revenge)
if (CalamityWorld.revenge)
rageCombatFrames = RageCombatDelayTime;
if (player.whoAmI == Main.myPlayer)
@@ -7476,7 +7557,7 @@ namespace CalamityMod.CalPlayer
witheringDamageDone = 0;
}
if (CalamityConfig.Instance.Rippers && CalamityWorld.revenge)
if (CalamityWorld.revenge)
{
if (!adrenalineModeActive && damage > 0) // To prevent paladin's shield ruining adren even with 0 dmg taken
{
@@ -8460,7 +8541,7 @@ namespace CalamityMod.CalPlayer
for (int j = 0; j < 30; j++)
{
int dust = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
int dust = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
Dust dust2 = Main.dust[dust];
dust2.position.X += Main.rand.Next(-20, 21);
dust2.position.Y += Main.rand.Next(-20, 21);
@@ -8676,7 +8757,7 @@ namespace CalamityMod.CalPlayer
player.maxFallSpeed = 50f;
for (int m = 0; m < 24; m++)
{
int num14 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f), player.width, player.height - 8, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2.75f);
int num14 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f), player.width, player.height - 8, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2.75f);
Main.dust[num14].velocity *= 0.1f;
Main.dust[num14].scale *= 1f + (float)Main.rand.Next(20) * 0.01f;
Main.dust[num14].shader = GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
@@ -8686,7 +8767,8 @@ namespace CalamityMod.CalPlayer
Main.dust[num14].fadeIn = 0.5f;
}
}
num7 = 40f;
num7 = 40f; // 46 frames before hitting this gate value
num10 = 0.8f;
}
if (dashMod > 0)
{
@@ -8908,7 +8990,7 @@ namespace CalamityMod.CalPlayer
for (int d = 0; d < 60; d++)
{
int idx = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
int idx = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
Dust dust = Main.dust[idx];
dust.position.X += Main.rand.NextFloat(-5f, 5f);
dust.position.Y += Main.rand.NextFloat(-5f, 5f);
@@ -9191,7 +9273,7 @@ namespace CalamityMod.CalPlayer
}
else if (dashMod == 9)
{
int num7 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num3), player.width + 8, 4, (int)CalamityDusts.PurpleCosmolite, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 3f);
int num7 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num3), player.width + 8, 4, (int)CalamityDusts.PurpleCosmilite, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 3f);
Main.dust[num7].velocity.X *= 0.2f;
Main.dust[num7].velocity.Y *= 0.2f;
Main.dust[num7].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
@@ -9265,7 +9347,7 @@ namespace CalamityMod.CalPlayer
}
else if (dashMod == 9)
{
int num12 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num8), player.width + 8, 4, (int)CalamityDusts.PurpleCosmolite, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 3f);
int num12 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num8), player.width + 8, 4, (int)CalamityDusts.PurpleCosmilite, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 3f);
Main.dust[num12].velocity.X *= 0.2f;
Main.dust[num12].velocity.Y *= 0.2f;
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
+19
View File
@@ -428,6 +428,16 @@ namespace CalamityMod.CalPlayer
else
modPlayer.witheredWeaponHoldTime = 0;
if (modPlayer.ManaBurn)
{
int debuffIndex = player.FindBuffIndex(ModContent.BuffType<ManaBurn>());
float debuffIntensity = debuffIndex == -1 ? 0f : player.buffTime[debuffIndex] / (float)Player.manaSickTimeMax;
lifeRegenLost += (int)(Math.Sqrt(debuffIntensity) * Math.Pow(6D, debuffIntensity + 1f));
if (player.lifeRegen > 0)
player.lifeRegen = 0;
}
player.lifeRegen -= (int)(lifeRegenLost * lifeRegenMult);
// Buffs
@@ -821,6 +831,15 @@ namespace CalamityMod.CalPlayer
player.statLife += 1;
}
if (modPlayer.BloomStoneRegen)
{
float dayTimeCompletion = !Main.dayTime ? 1f : (float)(Main.time / Main.dayLength);
float regenBenefitFactor = MathHelper.SmoothStep(0.25f, 1f, Utils.InverseLerp(0f, 0.24f, dayTimeCompletion, true) * Utils.InverseLerp(1f, 0.76f, dayTimeCompletion, true));
player.lifeRegen += (int)MathHelper.Lerp(2f, 6f, regenBenefitFactor);
player.lifeRegenTime += (int)MathHelper.Lerp(1f, 3f, regenBenefitFactor);
}
// Standing still healing bonuses (all exclusive with vanilla Shiny Stone)
if (!player.shinyStone)
{
+137 -59
View File
@@ -5,14 +5,19 @@ using CalamityMod.Buffs.Potions;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon;
using CalamityMod.CustomRecipes;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Events;
using CalamityMod.Items;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor;
using CalamityMod.Items.DraedonMisc;
using CalamityMod.Items.Dyes;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Fishing.FishingRods;
using CalamityMod.Items.Mounts.Minecarts;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.Weapons.Melee;
@@ -39,6 +44,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.GameContent.Events;
using Terraria.GameInput;
@@ -124,6 +130,9 @@ namespace CalamityMod.CalPlayer
// Potions (Quick Buff && Potion Sickness)
HandlePotions(player, modPlayer);
// 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.
@@ -154,57 +163,6 @@ namespace CalamityMod.CalPlayer
{
if (CalamityWorld.revenge || CalamityWorld.malice)
{
// This effect is way too annoying during the fight so I disabled it - Fab
// Signus headcrab effect
/*if (CalamityGlobalNPC.signus != -1)
{
if (Main.npc[CalamityGlobalNPC.signus].active)
{
if (Vector2.Distance(player.Center, Main.npc[CalamityGlobalNPC.signus].Center) <= 5200f)
{
float signusLifeRatio = 1f - (Main.npc[CalamityGlobalNPC.signus].life / Main.npc[CalamityGlobalNPC.signus].lifeMax);
// Reduce the power of Signus darkness based on your light level.
float multiplier = 1f;
switch (modPlayer.GetTotalLightStrength())
{
case 0:
break;
case 1:
case 2:
multiplier = 0.75f;
break;
case 3:
case 4:
multiplier = 0.5f;
break;
case 5:
case 6:
multiplier = 0.25f;
break;
default:
multiplier = 0f;
break;
}
// Increased darkness in Death Mode
if (CalamityWorld.death)
multiplier += (1f - multiplier) * 0.1f;
// Total darkness
float signusDarkness = signusLifeRatio * multiplier;
// Headcrab effect
if (!modPlayer.ZoneAbyss && !player.headcovered)
{
float screenObstructionAmt = MathHelper.Clamp(signusDarkness, 0f, 0.63f);
float targetValue = MathHelper.Clamp(screenObstructionAmt * 0.33f, 0.1f, 0.2f);
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, screenObstructionAmt, targetValue);
}
}
}
}*/
// Adjusts the life steal cap in rev/death
float lifeStealCap = CalamityWorld.malice ? 30f : CalamityWorld.death ? 50f : 60f;
/*if (Main.masterMode)
@@ -237,7 +195,7 @@ namespace CalamityMod.CalPlayer
}
// Adrenaline and Rage
if (CalamityConfig.Instance.Rippers && CalamityWorld.revenge)
if (CalamityWorld.revenge)
UpdateRippers(mod, player, modPlayer);
}
}
@@ -468,7 +426,7 @@ namespace CalamityMod.CalPlayer
void harmNPC(NPC npc)
{
int damage = (int)(player.AverageDamage() * Main.rand.Next(1950, 2050));
int damage = (int)(player.AverageDamage() * Main.rand.Next(550, 600));
npc.StrikeNPC(damage, 0f, 0);
player.addDPS(damage);
@@ -498,6 +456,45 @@ namespace CalamityMod.CalPlayer
}
}
// Calculate/reset DoG cart rotations based on whether the DoG cart is in use.
if (player.mount.Active && player.mount.Type == ModContent.MountType<DoGCartMount>())
{
modPlayer.SmoothenedMinecartRotation = MathHelper.Lerp(modPlayer.SmoothenedMinecartRotation, DelegateMethods.Minecart.rotation, 0.05f);
// Initialize segments from null if necessary.
int direction = (player.velocity.SafeNormalize(Vector2.UnitX * player.direction).X > 0f).ToDirectionInt();
if (player.velocity.X == 0f)
direction = player.direction;
float idealRotation = DoGCartMount.CalculateIdealWormRotation(player);
float minecartRotation = DelegateMethods.Minecart.rotation;
if (Math.Abs(minecartRotation) < 0.5f)
minecartRotation = 0f;
Vector2 stickOffset = minecartRotation.ToRotationVector2() * player.velocity.Length() * direction * 1.25f;
for (int i = 0; i < modPlayer.DoGCartSegments.Length; i++)
{
if (modPlayer.DoGCartSegments[i] is null)
{
modPlayer.DoGCartSegments[i] = new DoGCartSegment
{
Center = player.Center - idealRotation.ToRotationVector2() * i * 20f
};
}
}
Vector2 startingStickPosition = player.Center + stickOffset + Vector2.UnitY * 12f;
modPlayer.DoGCartSegments[0].Update(player, startingStickPosition, idealRotation);
modPlayer.DoGCartSegments[0].Center = startingStickPosition;
for (int i = 1; i < modPlayer.DoGCartSegments.Length; i++)
{
Vector2 waveOffset = DoGCartMount.CalculateSegmentWaveOffset(i, player);
modPlayer.DoGCartSegments[i].Update(player, modPlayer.DoGCartSegments[i - 1].Center + waveOffset, modPlayer.DoGCartSegments[i - 1].Rotation);
}
}
else
modPlayer.DoGCartSegments = new DoGCartSegment[modPlayer.DoGCartSegments.Length];
// Dust on hand when holding the phosphorescent gauntlet.
if (player.ActiveItem().type == ModContent.ItemType<PhosphorescentGauntlet>())
PhosphorescentGauntletPunches.GenerateDustOnOwnerHand(player);
@@ -1308,6 +1305,20 @@ namespace CalamityMod.CalPlayer
player.buffImmune[debuff] = true;
}
// Auric dye cinders.
int auricDyeCount = player.dye.Count(dyeItem => dyeItem.type == ModContent.ItemType<AuricDye>());
if (auricDyeCount > 0)
{
int sparkCreationChance = (int)MathHelper.Lerp(15f, 50f, Utils.InverseLerp(4f, 1f, auricDyeCount, true));
if (Main.rand.NextBool(sparkCreationChance))
{
Dust spark = Dust.NewDustDirect(player.position, player.width, player.height, 267);
spark.color = Color.Lerp(Color.Cyan, Color.SeaGreen, Main.rand.NextFloat(0.5f));
spark.velocity = -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2 * 1.33f) * Main.rand.NextFloat(2f, 5.4f);
spark.noGravity = true;
}
}
// Silva invincibility effects
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
{
@@ -3596,17 +3607,36 @@ namespace CalamityMod.CalPlayer
{
if (player.whoAmI == Main.myPlayer)
{
for (int i = 0; i < Main.projectile.Length; i++)
int auraType = ModContent.ProjectileType<TeslaAura>();
for (int i = 0; i < Main.maxProjectiles; i++)
{
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<TeslaAura>() && Main.projectile[i].owner == player.whoAmI)
{
Main.projectile[i].Kill();
break;
}
if (Main.projectile[i].type != auraType || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI)
continue;
Main.projectile[i].Kill();
break;
}
}
}
if (modPlayer.CryoStone)
{
if (player.whoAmI == Main.myPlayer && player.ownedProjectileCounts[ModContent.ProjectileType<CryonicShield>()] == 0)
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<CryonicShield>(), (int)(player.AverageDamage() * 70), 0f, player.whoAmI);
}
else if (player.whoAmI == Main.myPlayer)
{
int shieldType = ModContent.ProjectileType<CryonicShield>();
for (int i = 0; i < Main.maxProjectiles; i++)
{
if (Main.projectile[i].type != shieldType || !Main.projectile[i].active || Main.projectile[i].owner != player.whoAmI)
continue;
Main.projectile[i].Kill();
break;
}
}
if (modPlayer.prismaticLasers > 1800 && player.whoAmI == Main.myPlayer)
{
float shootSpeed = 18f;
@@ -4227,6 +4257,54 @@ namespace CalamityMod.CalPlayer
}
#endregion
#region Mouse Item Checks
public static void CheckIfMouseItemIsSchematic(Player player)
{
if (Main.myPlayer != player.whoAmI)
return;
bool shouldSync = false;
// ActiveItem doesn't need to be checked as the other possibility involves
// the item in question already being in the inventory.
if (Main.mouseItem != null && !Main.mouseItem.IsAir)
{
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicSunkenSea>() && !RecipeUnlockHandler.HasFoundSunkenSeaSchematic)
{
RecipeUnlockHandler.HasFoundSunkenSeaSchematic = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicPlanetoid>() && !RecipeUnlockHandler.HasFoundPlanetoidSchematic)
{
RecipeUnlockHandler.HasFoundPlanetoidSchematic = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicJungle>() && !RecipeUnlockHandler.HasFoundJungleSchematic)
{
RecipeUnlockHandler.HasFoundJungleSchematic = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicHell>() && !RecipeUnlockHandler.HasFoundHellSchematic)
{
RecipeUnlockHandler.HasFoundHellSchematic = true;
shouldSync = true;
}
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicIce>() && !RecipeUnlockHandler.HasFoundIceSchematic)
{
RecipeUnlockHandler.HasFoundIceSchematic = true;
shouldSync = true;
}
}
if (shouldSync)
CalamityNetcode.SyncWorld();
}
#endregion
#region Potion Handling
private static void HandlePotions(Player player, CalamityPlayer modPlayer)
{
+11 -3
View File
@@ -496,7 +496,7 @@ namespace CalamityMod.CalPlayer
break;
}
}
int projectileIndex = Projectile.NewProjectile(projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType<InfernadoFriendly>(), (int)(400 * player.RogueDamage()), 15f, Main.myPlayer, 16f, 16f);
int projectileIndex = Projectile.NewProjectile(projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType<InfernadoFriendly>(), (int)(550 * player.RogueDamage()), 15f, Main.myPlayer, 16f, 16f);
if (projectileIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[projectileIndex].Calamity().forceTypeless = true;
@@ -809,7 +809,11 @@ namespace CalamityMod.CalPlayer
{
target.AddBuff(BuffID.Venom, 240);
}
}
if (modPlayer.aWeapon)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<AbyssalFlames>());
}
}
if (summon)
{
if (modPlayer.pArtifact && !modPlayer.profanedCrystal)
@@ -956,7 +960,11 @@ namespace CalamityMod.CalPlayer
{
target.AddBuff(BuffID.Venom, 240);
}
}
if (modPlayer.aWeapon)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<AbyssalFlames>());
}
}
if (summon)
{
if (modPlayer.pArtifact && !modPlayer.profanedCrystal)
-24
View File
@@ -148,24 +148,12 @@ namespace CalamityMod
[Tooltip("Adds vanilla boss summons to NPC shops after the corresponding boss is defeated.\nThis does not affect Calamity's boss summons, which are always sold.\nTo apply changes, close and reopen the shop.")]
public bool SellVanillaSummons { get; set; }
[Label("Boost Mining Speed")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
[Tooltip("Increases the player's mining speed by 75%.\nThis does not affect drills.")]
public bool MiningSpeedBoost { get; set; }
[Label("Boss Zen")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
[Tooltip("While a boss is alive, all players near a boss receive the Boss Effects buff, which drastically reduces enemy spawn rates.")]
public bool BossZen { get; set; }
[Label("Never Weaken Reactive Boss DR")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
[Tooltip("Sets Reactive Boss DR to always be full strength, even if the boss has already been defeated.\nIf disabled, the effect is only 66% as powerful after the boss has been defeated.\n\nReactive Boss DR makes bosses smoothly take less damage if they are being killed very quickly.\nIn most cases, the system has no noticeable effect.")]
public bool FullPowerReactiveBossDR { get; set; }
[Label("Let Town NPCs spawn at night.")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
@@ -211,12 +199,6 @@ namespace CalamityMod
[Tooltip("When enabled, water in the Snow and Ice biomes will rapidly drain the player's breath instead of inflicting Chilled.")]
public bool ReworkChilledWater { get; set; }
[Label("Reduce Celestial Pillar Kill Count")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
[Tooltip("Reduces the kills required to destroy a Celestial Pillar shield in Expert Mode from 150 to 100.\nThis makes the value equivalent to Normal Mode.")]
public bool NerfExpertPillars { get; set; }
[Label("Disable Expert Enemy Spawns in Towns")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
@@ -225,12 +207,6 @@ namespace CalamityMod
[Header("Revengeance Mode Changes")]
[Label("Rage and Adrenaline")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
[Tooltip("Enables Rage and Adrenaline, the two Revengeance Mode mechanics.")]
public bool Rippers { get; set; }
private const float MinMeterShake = 0f;
private const float MaxMeterShake = 4f;
+84 -76
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories;
using CalamityMod.Items.Accessories.Wings;
using CalamityMod.Items.Ammo.FiniteUse;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.DraedonMisc;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Fishing.FishingRods;
@@ -36,6 +37,7 @@ using CalamityMod.NPCs.Crags;
using CalamityMod.NPCs.Cryogen;
using CalamityMod.NPCs.DesertScourge;
using CalamityMod.NPCs.DevourerofGods;
using CalamityMod.NPCs.ExoMechs.Ares;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.NPCs.GreatSandShark;
using CalamityMod.NPCs.HiveMind;
@@ -75,7 +77,6 @@ namespace CalamityMod
public class CalamityLists
{
public static IList<string> donatorList;
public static List<int> trueMeleeProjectileList; // DO NOT, EVER, DELETE THIS LIST, OR I WILL COME FOR YOU :D
public static List<int> rangedProjectileExceptionList;
public static List<int> projectileDestroyExceptionList;
public static List<int> projectileMinionList;
@@ -152,8 +153,9 @@ namespace CalamityMod
public static List<int> minibossList;
public static List<int> heartDropBlockList;
public static List<int> pierceResistList;
public static List<int> pierceResistExceptionList;
public static List<int> legOverrideList;
public static List<int> legOverrideList;
public static List<int> kamiDebuffColorImmuneList;
@@ -161,6 +163,8 @@ namespace CalamityMod
public static List<int> ZeroMinionSlotExceptionList;
public static List<int> DontCopyOriginalMinionAIList;
public static Dictionary<int, int> EncryptedSchematicIDRelationship;
public static void LoadLists()
{
donatorList = new List<string>()
@@ -510,73 +514,6 @@ namespace CalamityMod
"James"
};
trueMeleeProjectileList = new List<int>()
{
// Vanilla shit
ProjectileID.Spear,
ProjectileID.Trident,
ProjectileID.TheRottedFork,
ProjectileID.Swordfish,
ProjectileID.Arkhalis,
ProjectileID.DarkLance,
ProjectileID.CobaltNaginata,
ProjectileID.PalladiumPike,
ProjectileID.MythrilHalberd,
ProjectileID.OrichalcumHalberd,
ProjectileID.AdamantiteGlaive,
ProjectileID.TitaniumTrident,
ProjectileID.MushroomSpear,
ProjectileID.Gungnir,
ProjectileID.ObsidianSwordfish,
ProjectileID.MonkStaffT1,
ProjectileID.MonkStaffT2,
// Tools
ProjectileID.CobaltDrill,
ProjectileID.MythrilDrill,
ProjectileID.AdamantiteDrill,
ProjectileID.PalladiumDrill,
ProjectileID.OrichalcumDrill,
ProjectileID.TitaniumDrill,
ProjectileID.ChlorophyteDrill,
ProjectileID.CobaltChainsaw,
ProjectileID.MythrilChainsaw,
ProjectileID.AdamantiteChainsaw,
ProjectileID.PalladiumChainsaw,
ProjectileID.OrichalcumChainsaw,
ProjectileID.TitaniumChainsaw,
ProjectileID.ChlorophyteChainsaw,
ProjectileID.VortexDrill,
ProjectileID.VortexChainsaw,
ProjectileID.NebulaDrill,
ProjectileID.NebulaChainsaw,
ProjectileID.SolarFlareDrill,
ProjectileID.SolarFlareChainsaw,
ProjectileID.StardustDrill,
ProjectileID.StardustChainsaw,
ProjectileID.Hamdrax,
ProjectileID.ChlorophyteJackhammer,
ProjectileID.SawtoothShark,
ProjectileID.ButchersChainsaw,
// Calamity shit
ProjectileType<DevilsSunriseProj>(),
ProjectileType<MarniteObliteratorProj>(),
ProjectileType<MurasamaSlash>(),
ProjectileType<AstralPikeProj>(),
ProjectileType<BrimlanceProj>(),
ProjectileType<DiseasedPikeSpear>(),
ProjectileType<ExsanguinationLanceProjectile>(),
ProjectileType<FulgurationHalberdProj>(),
ProjectileType<GildedProboscisProj>(),
ProjectileType<MarniteSpearProjectile>(),
ProjectileType<SausageMakerSpear>(),
ProjectileType<YateveoBloomSpear>(),
ProjectileType<HydraulicVoltCrasherProjectile>(),
ProjectileType<DragonRageStaff>(),
ProjectileType<TaintedBladeSlasher>()
};
rangedProjectileExceptionList = new List<int>()
{
ProjectileID.Phantasm,
@@ -658,15 +595,23 @@ namespace CalamityMod
ProjectileType<FinalDawnHorizontalSlash>(),
ProjectileType<FinalDawnFireSlash>(),
//Some hostile boss projectiles
// Some hostile boss projectiles
ProjectileID.SaucerDeathray,
ProjectileID.PhantasmalDeathray,
ProjectileType<BrimstoneMonster>(),
ProjectileType<InfernadoRevenge>(),
ProjectileType<OverlyDramaticDukeSummoner>(),
ProjectileType<ProvidenceHolyRay>(),
ProjectileType<OldDukeVortex>(),
ProjectileType<BrimstoneRay>(),
ProjectileType<BrimstoneTargetRay>()
};
ProjectileType<AresDeathBeamStart>(),
ProjectileType<AresGaussNukeProjectileBoom>(),
ProjectileType<AresLaserBeamStart>(),
ProjectileType<ArtemisLaserBeamStart>(),
ProjectileType<BirbAura>(),
ProjectileType<ThanatosBeamStart>()
};
projectileMinionList = new List<int>()
{
@@ -2001,7 +1946,11 @@ namespace CalamityMod
NPCType<DevourerofGodsTailS>(),
NPCType<ThanatosBody1>(),
NPCType<ThanatosBody2>(),
NPCType<ThanatosTail>()
NPCType<ThanatosTail>(),
NPCType<AresLaserCannon>(),
NPCType<AresTeslaCannon>(),
NPCType<AresPlasmaFlamethrower>(),
NPCType<AresGaussNuke>()
};
needsDebuffIconDisplayList = new List<int>()
@@ -2768,7 +2717,56 @@ namespace CalamityMod
NPCType<ThanatosBody1>(),
NPCType<ThanatosBody2>(),
NPCType<ThanatosTail>(),
NPCType<BrimstoneHeart>()
NPCType<BrimstoneHeart>(),
NPCType<AresBody>(),
NPCType<AresLaserCannon>(),
NPCType<AresTeslaCannon>(),
NPCType<AresPlasmaFlamethrower>(),
NPCType<AresGaussNuke>()
};
pierceResistExceptionList = new List<int>()
{
ProjectileID.FlyingKnife,
ProjectileID.Arkhalis,
ProjectileID.MonkStaffT3,
ProjectileType<FlakKrakenProj>(),
ProjectileType<MurasamaSlash>(),
ProjectileType<OmnibladeSwing>(),
ProjectileType<DragonRageStaff>(),
ProjectileType<YateveoBloomProj>(),
ProjectileType<UrchinBall>(),
ProjectileType<TyphonsGreedStaff>(),
ProjectileType<DevilsSunriseProj>(),
ProjectileType<DevilsSunriseCyclone>(),
ProjectileType<PhaseslayerProjectile>(),
ProjectileType<TaserHook>(),
ProjectileType<Snowflake>(),
ProjectileType<InsidiousHarpoon>(),
ProjectileType<PhotonRipperProjectile>(),
ProjectileType<AcidicSaxBubble>(),
ProjectileType<WaterLeechProj>(),
ProjectileType<BonebreakerProjectile>(),
ProjectileType<UrchinBallSpike>(),
ProjectileType<EmesisGore>(),
ProjectileType<ExoLightBurst>(),
ProjectileType<SulphuricAcidBubble2>(),
ProjectileType<EclipsesStealth>(),
ProjectileType<EradicatorProjectile>(),
ProjectileType<FantasyTalismanProj>(),
ProjectileType<FantasyTalismanStealth>(),
ProjectileType<GodsParanoiaProj>(),
ProjectileType<JawsProjectile>(),
ProjectileType<LeviathanTooth>(),
ProjectileType<LionfishProj>(),
ProjectileType<MetalShard>(),
ProjectileType<NastyChollaBol>(),
ProjectileType<SacrificeProjectile>(),
ProjectileType<SnapClamProj>(),
ProjectileType<SnapClamStealth>(),
ProjectileType<StickyBol>(),
ProjectileType<UrchinStingerProj>(),
ProjectileType<EyeOfNightCell>()
};
bossMinionList = new List<int>()
@@ -2910,12 +2908,19 @@ namespace CalamityMod
{
ProjectileType<GammaHead>()
};
EncryptedSchematicIDRelationship = new Dictionary<int, int>()
{
[1] = ItemType<EncryptedSchematicPlanetoid>(),
[2] = ItemType<EncryptedSchematicJungle>(),
[3] = ItemType<EncryptedSchematicHell>(),
[4] = ItemType<EncryptedSchematicIce>(),
};
}
public static void UnloadLists()
{
donatorList = null;
trueMeleeProjectileList = null;
rangedProjectileExceptionList = null;
projectileDestroyExceptionList = null;
projectileMinionList = null;
@@ -2992,14 +2997,17 @@ namespace CalamityMod
minibossList = null;
heartDropBlockList = null;
pierceResistList = null;
pierceResistExceptionList = null;
legOverrideList = null;
legOverrideList = null;
kamiDebuffColorImmuneList = null;
MinionsToNotResurrectList = null;
ZeroMinionSlotExceptionList = null;
DontCopyOriginalMinionAIList = null;
EncryptedSchematicIDRelationship = null;
}
}
}
+70 -8
View File
@@ -84,6 +84,7 @@ namespace CalamityMod
public static ModHotKey PlaguePackHotKey;
public static ModHotKey AngelicAllianceHotKey;
public static ModHotKey GodSlayerDashHotKey;
public static ModHotKey ExoChairSpeedupHotkey;
// Boss Spawners
public static int ghostKillCount = 0;
@@ -182,8 +183,9 @@ namespace CalamityMod
PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q");
AngelicAllianceHotKey = RegisterHotKey("Angelic Alliance Blessing", "G");
GodSlayerDashHotKey = RegisterHotKey("God Slayer Dash", "H");
ExoChairSpeedupHotkey = RegisterHotKey("Exo Chair Speed Up", "LeftShift");
if (!Main.dedServ)
if (!Main.dedServ)
LoadClient();
ILChanges.Load();
@@ -266,6 +268,12 @@ namespace CalamityMod
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);
SkyManager.Instance["CalamityMod:BossRush"] = new BossRushSky();
Filters.Scene["CalamityMod:ExoMechs"] = new Filter(new ExoMechsScreenShaderData("FilterMiniTower").UseColor(ExoMechsSky.DrawColor).UseOpacity(0.25f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:ExoMechs"] = new ExoMechsSky();
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
SkyManager.Instance["CalamityMod:Cryogen"] = new CryogenSky();
SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky();
@@ -275,7 +283,14 @@ namespace CalamityMod
RipperUI.Load();
AstralArcanumUI.Load(this);
Apollo.LoadHeadIcons();
Artemis.LoadHeadIcons();
Polterghast.LoadHeadIcons();
SupremeCalamitas.LoadHeadIcons();
ThanatosHead.LoadHeadIcons();
ThanatosBody1.LoadHeadIcons();
ThanatosBody2.LoadHeadIcons();
ThanatosTail.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))));
@@ -544,10 +559,10 @@ namespace CalamityMod
{ ModContent.NPCType<HiveMindP2>(), 5400 },
{ ModContent.NPCType<PerforatorHive>(), 7200 },
{ ModContent.NPCType<SlimeGodCore>(), 10800 },
{ ModContent.NPCType<SlimeGod>(), 3600 },
{ ModContent.NPCType<SlimeGodRun>(), 3600 },
{ ModContent.NPCType<SlimeGodSplit>(), 3600 },
{ ModContent.NPCType<SlimeGodRunSplit>(), 3600 },
{ ModContent.NPCType<SlimeGod>(), 5400 },
{ ModContent.NPCType<SlimeGodRun>(), 5400 },
{ ModContent.NPCType<SlimeGodSplit>(), 5400 },
{ ModContent.NPCType<SlimeGodRunSplit>(), 5400 },
{ ModContent.NPCType<Cryogen>(), 10800 },
{ ModContent.NPCType<AquaticScourgeHead>(), 7200 },
{ ModContent.NPCType<AquaticScourgeBody>(), 7200 },
@@ -821,13 +836,45 @@ namespace CalamityMod
priority = MusicPriority.BossMedium;
}
}
// This section handles boss rush music. However, at the time of PR-ing the boss rush visuals branch not all
// of the boss rush themes have been completed. As such, the custom music is intentionally omitted for the time being.
/*
if (BossRushEvent.BossRushActive && BossRushEvent.StartTimer >= BossRushEvent.StartEffectTotalTime)
{
music = BossRushEvent.MusicToPlay;
priority = MusicPriority.BossHigh;
}
*/
}
}
}
#endregion
#endregion
#region Mod Support
public override void PostSetupContent() => WeakReferenceSupport.Setup();
#region Lighting Effects
public override void ModifySunLightColor(ref Color tileColor, ref Color backgroundColor)
{
if (Main.gameMenu)
BossRushEvent.StartTimer = 0;
if (BossRushEvent.BossRushActive || BossRushEvent.StartTimer > 0)
{
backgroundColor = Color.Lerp(backgroundColor, Color.LightGray, BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime);
tileColor = Color.Lerp(tileColor, Color.LightGray, BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime);
}
else if (SkyManager.Instance["CalamityMod:ExoMechs"].IsActive())
{
float intensity = SkyManager.Instance["CalamityMod:ExoMechs"].Opacity;
backgroundColor = Color.Lerp(backgroundColor, Color.DarkGray, intensity * 0.9f);
backgroundColor = Color.Lerp(backgroundColor, Color.Black, intensity * 0.67f);
tileColor = Color.Lerp(tileColor, Color.DarkGray, intensity * 0.8f);
tileColor = Color.Lerp(tileColor, Color.Black, intensity * 0.3f);
}
}
#endregion
#region Mod Support
public override void PostSetupContent() => WeakReferenceSupport.Setup();
public override object Call(params object[] args) => ModCalls.Call(args);
#endregion
@@ -920,6 +967,13 @@ namespace CalamityMod
CalamitasEnchantUI.Draw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
// Codebreaker UI.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Codebreaker Decryption GUI", () =>
{
CodebreakerUI.Draw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
// Popup GUIs.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Popup GUIs", () =>
@@ -927,6 +981,14 @@ namespace CalamityMod
PopupGUIManager.UpdateAndDraw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
// Exo Mech selection.
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Exo Mech Selection", () =>
{
if (Main.LocalPlayer.Calamity().AbleToSelectExoMech)
ExoMechSelectionUI.Draw(Main.spriteBatch);
return true;
}, InterfaceScaleType.None));
}
// Invasion UIs.
+39
View File
@@ -184,6 +184,15 @@ namespace CalamityMod
case CalamityModMessageType.LabHologramProjector:
TELabHologramProjector.ReadSyncPacket(mod, reader);
break;
case CalamityModMessageType.UpdateCodebreakerConstituents:
TECodebreaker.ReadConstituentsUpdateSync(mod, reader);
break;
case CalamityModMessageType.UpdateCodebreakerContainedStuff:
TECodebreaker.ReadContainmentSync(mod, reader);
break;
case CalamityModMessageType.UpdateCodebreakerDecryptCountdown:
TECodebreaker.ReadDecryptCountdownSync(mod, reader);
break;
//
// Boss Rush
@@ -193,6 +202,12 @@ namespace CalamityMod
int stage = reader.ReadInt32();
BossRushEvent.BossRushStage = stage;
break;
case CalamityModMessageType.BossRushStartTimer:
BossRushEvent.StartTimer = reader.ReadInt32();
break;
case CalamityModMessageType.BossRushEndTimer:
BossRushEvent.EndTimer = reader.ReadInt32();
break;
case CalamityModMessageType.BossSpawnCountdownSync:
int countdown2 = reader.ReadInt32();
CalamityWorld.bossSpawnCountdown = countdown2;
@@ -201,6 +216,9 @@ namespace CalamityMod
int type = reader.ReadInt32();
CalamityWorld.bossType = type;
break;
case CalamityModMessageType.EndBossRush:
BossRushEvent.EndEffects();
break;
case CalamityModMessageType.BRHostileProjKillSync:
int countdown3 = reader.ReadInt32();
CalamityWorld.bossRushHostileProjKillCounter = countdown3;
@@ -225,6 +243,17 @@ namespace CalamityMod
CalamityWorld.encounteredOldDuke = reader.ReadBoolean();
break;
//
// Draedon Summoner stuff
//
case CalamityModMessageType.CodebreakerSummonStuff:
CalamityWorld.DraedonSummonCountdown = reader.ReadInt32();
CalamityWorld.DraedonSummonPosition = reader.ReadVector2();
break;
case CalamityModMessageType.ExoMechSelection:
CalamityWorld.DraedonMechToSummon = (ExoMech)reader.ReadInt32();
break;
//
// Death Mode environmental syncs
//
@@ -340,11 +369,21 @@ namespace CalamityMod
ChargingStationItemChange,
Turret,
LabHologramProjector,
UpdateCodebreakerConstituents,
UpdateCodebreakerContainedStuff,
UpdateCodebreakerDecryptCountdown,
// Draedon Summoner
CodebreakerSummonStuff,
ExoMechSelection,
// Boss Rush
BossRushStage,
BossRushStartTimer,
BossRushEndTimer,
BossSpawnCountdownSync,
BossTypeSync,
EndBossRush,
BRHostileProjKillSync, // TODO -- Simplify this. Only one packet needs be sent: "kill all hostile projectiles for N frames".
TeleportPlayer, // also used by Astral Arcanum.
+55
View File
@@ -0,0 +1,55 @@
using CalamityMod.World;
using Terraria.ModLoader;
namespace CalamityMod.CustomRecipes
{
public class ArsenalTierGatedRecipe : ModRecipe
{
public int Tier;
public bool AllowedInOldWorlds;
public ArsenalTierGatedRecipe(Mod mod, int tier, bool allowedInOldWorlds = false) : base(mod)
{
Tier = tier;
AllowedInOldWorlds = allowedInOldWorlds;
}
public static bool HasTierBeenLearned(int tier)
{
switch (tier)
{
case 1:
return RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes;
case 2:
return RecipeUnlockHandler.HasUnlockedT2ArsenalRecipes;
case 3:
return RecipeUnlockHandler.HasUnlockedT3ArsenalRecipes;
case 4:
return RecipeUnlockHandler.HasUnlockedT4ArsenalRecipes;
case 5:
return RecipeUnlockHandler.HasUnlockedT5ArsenalRecipes;
}
return false;
}
public override bool RecipeAvailable()
{
if (AllowedInOldWorlds && !CalamityWorld.IsWorldAfterDraedonUpdate)
return true;
switch (Tier)
{
case 1:
return RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes;
case 2:
return RecipeUnlockHandler.HasUnlockedT2ArsenalRecipes;
case 3:
return RecipeUnlockHandler.HasUnlockedT3ArsenalRecipes;
case 4:
return RecipeUnlockHandler.HasUnlockedT4ArsenalRecipes;
case 5:
return RecipeUnlockHandler.HasUnlockedT5ArsenalRecipes;
}
return false;
}
}
}
+100
View File
@@ -0,0 +1,100 @@
using System.Collections.Generic;
using System.IO;
using Terraria;
namespace CalamityMod.CustomRecipes
{
public static class RecipeUnlockHandler
{
public static bool HasUnlockedT1ArsenalRecipes = false;
public static bool HasUnlockedT2ArsenalRecipes = false;
public static bool HasUnlockedT3ArsenalRecipes = false;
public static bool HasUnlockedT4ArsenalRecipes = false;
public static bool HasUnlockedT5ArsenalRecipes = false;
public static bool HasFoundSunkenSeaSchematic = false;
public static bool HasFoundPlanetoidSchematic = false;
public static bool HasFoundJungleSchematic = false;
public static bool HasFoundHellSchematic = false;
public static bool HasFoundIceSchematic = false;
public static void Save(List<string> boolTagContainer)
{
boolTagContainer.AddWithCondition("HasUnlockedT1ArsenalRecipes", HasUnlockedT1ArsenalRecipes);
boolTagContainer.AddWithCondition("HasUnlockedT2ArsenalRecipes", HasUnlockedT2ArsenalRecipes);
boolTagContainer.AddWithCondition("HasUnlockedT3ArsenalRecipes", HasUnlockedT3ArsenalRecipes);
boolTagContainer.AddWithCondition("HasUnlockedT4ArsenalRecipes", HasUnlockedT4ArsenalRecipes);
boolTagContainer.AddWithCondition("HasUnlockedT5ArsenalRecipes", HasUnlockedT5ArsenalRecipes);
boolTagContainer.AddWithCondition("HasFoundSunkenSeaSchematic", HasFoundSunkenSeaSchematic);
boolTagContainer.AddWithCondition("HasFoundPlanetoidSchematic", HasFoundPlanetoidSchematic);
boolTagContainer.AddWithCondition("HasFoundJungleSchematic", HasFoundJungleSchematic);
boolTagContainer.AddWithCondition("HasFoundHellSchematic", HasFoundHellSchematic);
boolTagContainer.AddWithCondition("HasFoundIceSchematic", HasFoundIceSchematic);
HasUnlockedT1ArsenalRecipes = false;
HasUnlockedT2ArsenalRecipes = false;
HasUnlockedT3ArsenalRecipes = false;
HasUnlockedT4ArsenalRecipes = false;
HasUnlockedT5ArsenalRecipes = false;
HasFoundSunkenSeaSchematic = false;
HasFoundPlanetoidSchematic = false;
HasFoundJungleSchematic = false;
HasFoundHellSchematic = false;
HasFoundIceSchematic = false;
}
public static void Load(IList<string> boolTagContainer)
{
HasUnlockedT1ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT1ArsenalRecipes");
HasUnlockedT2ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT2ArsenalRecipes");
HasUnlockedT3ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT3ArsenalRecipes");
HasUnlockedT4ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT4ArsenalRecipes");
HasUnlockedT5ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT5ArsenalRecipes");
HasFoundSunkenSeaSchematic = boolTagContainer.Contains("HasFoundSunkenSeaSchematic");
HasFoundPlanetoidSchematic = boolTagContainer.Contains("HasFoundPlanetoidSchematic");
HasFoundJungleSchematic = boolTagContainer.Contains("HasFoundJungleSchematic");
HasFoundHellSchematic = boolTagContainer.Contains("HasFoundHellSchematic");
HasFoundIceSchematic = boolTagContainer.Contains("HasFoundIceSchematic");
}
public static void SendData(BinaryWriter writer)
{
BitsByte flags = new BitsByte();
flags[0] = HasUnlockedT1ArsenalRecipes;
flags[1] = HasUnlockedT2ArsenalRecipes;
flags[2] = HasUnlockedT3ArsenalRecipes;
flags[3] = HasUnlockedT4ArsenalRecipes;
flags[4] = HasUnlockedT5ArsenalRecipes;
flags[5] = HasFoundSunkenSeaSchematic;
flags[6] = HasFoundPlanetoidSchematic;
flags[7] = HasFoundJungleSchematic;
BitsByte flags2 = new BitsByte();
flags2[0] = HasFoundHellSchematic;
flags2[1] = HasFoundIceSchematic;
writer.Write(flags);
writer.Write(flags2);
}
public static void ReceiveData(BinaryReader reader)
{
BitsByte flags = reader.ReadByte();
HasUnlockedT1ArsenalRecipes = flags[0];
HasUnlockedT2ArsenalRecipes = flags[1];
HasUnlockedT3ArsenalRecipes = flags[2];
HasUnlockedT4ArsenalRecipes = flags[3];
HasUnlockedT5ArsenalRecipes = flags[4];
HasFoundSunkenSeaSchematic = flags[5];
HasFoundPlanetoidSchematic = flags[6];
HasFoundJungleSchematic = flags[7];
BitsByte flags2 = reader.ReadByte();
HasFoundHellSchematic = flags2[0];
HasFoundIceSchematic = flags2[1];
}
}
}
+33
View File
@@ -0,0 +1,33 @@
using CalamityMod.World;
using Terraria.ModLoader;
namespace CalamityMod.CustomRecipes
{
public class SchematicRecipe : ModRecipe
{
public string SchematicName;
public SchematicRecipe(Mod mod, string schematicName) : base(mod) => SchematicName = schematicName;
public override bool RecipeAvailable()
{
// Allow old worlds to craft the new schematics; They don't exist in old worlds
if (!CalamityWorld.IsWorldAfterDraedonUpdate)
return true;
switch (SchematicName)
{
case "Sunken Sea":
return RecipeUnlockHandler.HasFoundSunkenSeaSchematic;
case "Planetoid":
return RecipeUnlockHandler.HasFoundPlanetoidSchematic;
case "Jungle":
return RecipeUnlockHandler.HasFoundJungleSchematic;
case "Hell":
return RecipeUnlockHandler.HasFoundHellSchematic;
case "Ice":
return RecipeUnlockHandler.HasFoundIceSchematic;
}
return false;
}
}
}
+4 -4
View File
@@ -25,16 +25,16 @@ namespace CalamityMod.DataStructures
private Vector2 PrivateEvaluate(Vector2[] points, float T)
{
if (points.Length > 2)
while (points.Length > 2)
{
Vector2[] nextPoints = new Vector2[points.Length - 1];
for (int k = 0; k < points.Length - 1; k++)
nextPoints[k] = Vector2.Lerp(points[k], points[k + 1], T);
return PrivateEvaluate(nextPoints, T);
points = nextPoints;
}
else
return Vector2.Lerp(points[0], points[1], T);
return Vector2.Lerp(points[0], points[1], T);
}
}
}
+31
View File
@@ -0,0 +1,31 @@
using Microsoft.Xna.Framework;
using Terraria;
namespace CalamityMod.DataStructures
{
public class DoGCartSegment
{
public Vector2 Center;
public float Rotation;
public int OldDirection;
public void Update(Player player, Vector2 aheadPosition, float idealRotation)
{
int direction = (player.velocity.SafeNormalize(Vector2.UnitX * player.direction).X > 0f).ToDirectionInt();
if (player.velocity.X == 0f)
direction = player.direction;
if (OldDirection != direction)
{
// Flip the segments if the player flips their direction.
if (OldDirection != 0)
Center = player.Center - Center + player.Center;
OldDirection = direction;
}
Vector2 offsetDirection = (aheadPosition - Center).SafeNormalize(Vector2.Zero);
offsetDirection = offsetDirection.ToRotation().AngleTowards(idealRotation, 0.2f).ToRotationVector2();
Rotation = offsetDirection.ToRotation();
Center = aheadPosition - offsetDirection * 20f;
}
}
}
+4 -2
View File
@@ -12,7 +12,9 @@ namespace CalamityMod.Dusts
Phantoplasm = 60,
Plague = 46,
ProfanedFire = 244,
Nightwither = 185,
PurpleCosmolite = 173
Nightwither = 185,
PurpleCosmilite = 173,
// This is what God Slayer Slugs use, at least. I'm not sure about other Cosmilite stuff, didn't bother to check.
BlueCosmilite = 180,
}
}
Binary file not shown.
+10
View File
@@ -12,22 +12,27 @@ namespace CalamityMod.Effects
public static Effect LightShader;
public static Effect SCalMouseShader;
public static Effect TentacleShader;
public static Effect TeleportDisplacementShader;
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 ImpFlameTrailShader;
public static Effect SCalShieldShader;
public static void LoadShaders()
{
if (Main.dedServ)
return;
AstralFogShader = CalamityMod.Instance.GetEffect("Effects/CustomShader");
LightShader = CalamityMod.Instance.GetEffect("Effects/LightBurstShader");
TentacleShader = CalamityMod.Instance.GetEffect("Effects/TentacleShader");
TeleportDisplacementShader = CalamityMod.Instance.GetEffect("Effects/TeleportDisplacementShader");
SCalMouseShader = CalamityMod.Instance.GetEffect("Effects/SCalMouseShader");
LightDistortionShader = CalamityMod.Instance.GetEffect("Effects/DistortionShader");
PhaseslayerRipShader = CalamityMod.Instance.GetEffect("Effects/PhaseslayerRipShader");
@@ -35,7 +40,9 @@ namespace CalamityMod.Effects
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");
ImpFlameTrailShader = CalamityMod.Instance.GetEffect("Effects/ImpFlameTrail");
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);
@@ -45,13 +52,16 @@ namespace CalamityMod.Effects
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:TeleportDisplacement"] = new MiscShaderData(new Ref<Effect>(TeleportDisplacementShader), "GlitchPass");
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:ImpFlameTrail"] = new MiscShaderData(new Ref<Effect>(ImpFlameTrailShader), "TrailPass");
GameShaders.Misc["CalamityMod:SupremeShield"] = new MiscShaderData(new Ref<Effect>(SCalShieldShader), "ShieldPass");
}
}
+57
View File
@@ -0,0 +1,57 @@
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;
float BlendFunction(float from, float to)
{
return (to <= 0.5) ? 2.22 * from * to : 1 - 2.22 * (1 - from) * (1 - to);
}
float3 BlendColor(float3 from, float3 to)
{
return float3(BlendFunction(from.r, to.r), BlendFunction(from.g, to.g), BlendFunction(from.b, to.b));
}
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
// Calculate an updraft noise color. This takes world position into account, allowing movement to influence the shader.
float updraftXCoord = sin(3.141 * frac(coords.x + uWorldPosition.x * 0.0003));
float updraftYCoord = sin(3.141 * frac(pow(frameY, 4) + uTime * 1.21 + uWorldPosition.y * 0.0003));
float2 updraftCoords = float2(updraftXCoord, updraftYCoord);
float4 updraftNoiseColor = tex2D(uImage1, updraftCoords * float2(0.075, 0.03));
float4 color = tex2D(uImage0, coords);
// Calculate a cloud color based on noise.
float4 cloudColor = tex2D(uImage1, float2(coords.x + uTime * 0.11, frameY));
cloudColor = pow(cloudColor, 2);
// Calculate the updraft color based on the noise.
float4 updraftColor = float4(uSecondaryColor, 1) * pow(updraftNoiseColor.r, 3) * 4.7;
// Along with the metal.
float4 metalColor = lerp(color, float4(BlendColor(color.rgb * 0.6, uColor), 1), 0.7);
// And mix it all together.
return (color * 0.35 + metalColor * 0.65 + updraftColor * 0.8 + cloudColor * 0.3) * color.a * 0.85;
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
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
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
// Calculate noise for red flames.
float flameXCoord = sin(3.141 * frac(coords.x + 0.56));
float flameYCoord = sin(3.141 * frac(frameY + uTime * 0.21));
float2 flameCoords = float2(flameXCoord, flameYCoord);
float4 noiseColor = tex2D(uImage1, float2(coords.x, frameY) * 0.4);
float4 color = tex2D(uImage0, coords);
// Calculate the flame noise based on zoomed in noise coordinates.
float4 flameNoiseColor = tex2D(uImage1, flameCoords * float2(0.05, 0.06));
float4 flameColor = float4(uSecondaryColor, 1) * pow(flameNoiseColor.r, 4) * 4.7;
// Calculate the astal stone color by approaching the first inputted color from the pixel color with linear interpolation.
float4 stoneColor = lerp(color, float4(uColor, 1), 0.55) * color.a;
// Become notably darker to reinforce the stone aesthetic.
stoneColor.rgb *= 0.2 + noiseColor.r * 0.65;
return (stoneColor + flameColor * 0.4) * color.a;
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
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
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
// Define a baseline gold color. This will be used when creating a reflective metal texture.
float3 goldColor = float3(228 / 255.0, 175 / 255.0, 72 / 255.0);
// Calculate noise with a zoomed in Y texture coordinate.
float4 noiseColor = tex2D(uImage1, float2(coords.x, sin(3.141 * frac(frameY + frac(uTime * 0.51)))) * 0.067);
float4 color = tex2D(uImage0, coords);
// Calculate a degree of shine depending on the noise. This is greatly expanded depending on the result.
float shineFactor = pow(noiseColor.r, 0.8);
color *= lerp(0.7, 5, shineFactor);
float3 metalColor = lerp(uColor, uSecondaryColor, shineFactor);
// Fade to the metal color with linear interpolation.
color.rgb = lerp(color.rgb, metalColor, lerp(0.35, 0.8, shineFactor));
// Use a specialized blend method to create the shine effect.
color.rgb = (length(color.rgb) <= 0.5) ? 2 * color.rgb * goldColor : 1 - 2 * (1 - color.rgb) * (1 - goldColor);
return (color + noiseColor * 0.45) * color.a;
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
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
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
float4 color = tex2D(uImage0, coords);
float3 alteredColor = lerp(uColor, float3(1, 0, 0), 0.65);
float3 alteredSecondaryColor = lerp(uSecondaryColor, float3(1, 0, 0), 0.65);
// Fade out at the edges of the trail to give a blur effect.
// This is very important.
float flameStreakBrightness = tex2D(uImage1, float2(frac(frameY + uTime * 1.4) * 0.4, coords.x * 0.65)).r;
float fadeToRed = lerp(0.2, 1, flameStreakBrightness);
float3 flameColor = lerp(alteredColor, alteredSecondaryColor, fadeToRed);
flameColor.r = 0.6 + sqrt(fadeToRed) * 0.4;
color = lerp(color, float4(flameColor, 1), 0.45) * color.a;
return color * lerp(1.3, 5.4, pow(flameStreakBrightness, 4.44));
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -16,11 +16,11 @@ float2 uImageSize1;
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
{
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w; // Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float2 swirlOffset = float2(sin(uTime * 0.96 + 1.754) * 0.31, sin(uTime * 0.96) * 0.16) * uSaturation;
float2 swirlOffset = float2(sin(uTime * 0.26 + 1.754) * 0.31, sin(uTime * 0.26) * 0.16) * uSaturation;
float4 color = tex2D(uImage0, coords);
float4 noiseColor = tex2D(uImage1, frac(float2(coords.x, frameY + uTime * 0.36) + swirlOffset - uWorldPosition * 0.0006) * 0.26);
float4 noiseColor = tex2D(uImage1, frac(float2(coords.x, frameY + uTime * 0.16) + swirlOffset - uWorldPosition * 0.0006) * 0.26);
float4 flameColor = tex2D(uImage1, frac(float2(coords.x, frameY + uTime * 0.44)) * 0.1);
float brightnessFactor = noiseColor.r * 2;
float brightnessFactor = lerp(noiseColor.r, noiseColor.g, sin(uTime * 2.46) * 0.5 + 0.5) * 2.35;
float normalizedDistanceFromCenter = distance(float2(coords.x, frameY), float2(0.5, 0.5)) * 2;
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
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
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
float4 color = tex2D(uImage0, coords);
float3 cosmiliteMetalColor = float3(122 / 255.0, 127 / 255.0, 155 / 255.0);
float4 noiseColor = tex2D(uImage1, float2(coords.x, frac(frameY + uTime * 1.51)) * 0.12);
float4 noiseColor2 = tex2D(uImage1, float2(coords.x, frac(frameY + uTime * 1.51 - 0.458)) * 0.12);
float opacity = color.a;
float3 baseColor = lerp(uColor, cosmiliteMetalColor, 0.3) * (1 - pow(noiseColor.r, 3) * 0.5);
baseColor = lerp(color.rgb, baseColor, 0.67);
baseColor *= 1 + pow(baseColor, 5).r * 8 - noiseColor2.r * 1.25;
baseColor = lerp(baseColor, uSecondaryColor * 2, pow(noiseColor.r, 2));
return float4(baseColor, 1) * opacity;
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+69
View File
@@ -0,0 +1,69 @@
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;
float3 specialPalette[9] =
{
float3(250, 255, 112) / 255.0,
float3(211, 235, 108) / 255.0,
float3(166, 240, 105) / 255.0,
float3(105, 240, 220) / 255.0,
float3(64, 130, 145) / 255.0,
float3(145, 96, 145) / 255.0,
float3(242, 112, 73) / 255.0,
float3(199, 62, 62) / 255.0,
float3(250, 255, 112) / 255.0,
};
float InverseLerp(float from, float to, float x)
{
return saturate((x - from) / (to - from));
}
// Multi-color lerp which uses the palette.
float3 PaletteLerp(float interpolant)
{
float startingIndex = floor(interpolant * 8);
float squashedInterpolant = frac(interpolant * 8);
return lerp(specialPalette[startingIndex], specialPalette[startingIndex + 1], squashedInterpolant);
}
// (Co)sines use a lot of instructions. As such, a more linear wave constructed by moduli is used instead.
// Is this kind of ridiculous? Probably. But there's basically nothing I can do until 1.4 rolls around
// and the pathetically low instruction count cap is increased significantly. -Dominic
float TriangleWave(float x)
{
if (x % 2 < 1)
return x % 2;
return -(x % 2) + 2;
}
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
{
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w; // Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float4 noiseColor = tex2D(uImage1, float2(coords.x, frameY - uTime * 0.45) * 0.1);
float4 color = tex2D(uImage0, coords);
float3 blendColor = PaletteLerp(frac(frameY + uTime * 1.3));
float blendFactor = (TriangleWave(uTime * 9 + coords.x * 2 - frameY * 2.1) * 0.5 + 0.5) * 0.5;
float brightness = (blendFactor * 0.4 + noiseColor.r * 0.9) * 1.2;
float4 colorBlendMultiplier = lerp(float4(blendColor, 1), float4(1, 1, 1, 1), saturate(blendFactor * 1.5));
return (lerp(color, float4(blendColor, 1), blendFactor * 0.5 + 0.2) * color.a) * colorBlendMultiplier * (1 + brightness);
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
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
{
// Gets a 0-1 representation of the y position on a given frame, with 0 being the top, and 1 being the bottom.
float frameY = (coords.y * uImageSize0.y - uSourceRect.y) / uSourceRect.w;
float4 color = tex2D(uImage0, coords);
float4 noiseColor = tex2D(uImage1, float2(coords.x, frac(frameY - uTime * 0.27)) * 0.5) * 1.5;
float verticalFlowMovement = (sin(coords.x * 14.71 + frameY * 13.5 - uTime * 1.6) * 0.5 + 0.5) * noiseColor.r;
// Adjust coords to have an offset to the sprite.
if (color.a == 0 && frameY < 0.82)
coords.y = saturate(coords.y + verticalFlowMovement / uSourceRect.w / 17);
// Prepare the dark outlines.
float outlineFade = pow(1 - (color.r + color.g + color.b) / 3, 2);
color = lerp(color, float4(uColor * 0.8, 1), outlineFade * 0.7) * (color.a + outlineFade * color.a * 0.15);
// Prepare the bright in-lines.
color = lerp(color, float4(uSecondaryColor * 0.85, 1), saturate(1 - outlineFade) * 0.4) * color.a;
// Handle sludge fades based on noise.
color = lerp(color, float4(uSecondaryColor * 0.375, 1), pow(noiseColor.r, 3) * 0.3 + verticalFlowMovement * 0.3 + 0.13) * color.a;
return color * (1 + (1 - outlineFade) * 0.1);
}
technique Technique1
{
pass DyePass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+72
View File
@@ -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.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, 6, pow(coords.x, 2)));
opacity *= pow(sin(coords.x * 3.141), 0.4);
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();
}
}
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+42
View File
@@ -0,0 +1,42 @@
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;
float2 frameCount;
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
{
float frameY = coords.y * frameCount.y;
// 17.07947 is 2pi * e, while 25.13274 is 8pi.
// When two sinusoids are added in this way and the periods of each sinusoid are irrational,
// the resulting sinusoid from the addition has no period, meaning that it has pseudo-random
// bumps and valleys. This is ideal for a glitch effect. The * 0.5 at the end is make the range
// of the result be -1 to 1 like a typical sine.
float offsetBase = (sin(frameY * 17.07947 + uTime * 16) + sin(coords.y * 25.13274)) * 0.5;
// Here, a power is used to make the valleys and hills sharper, and bias everything else
// towards 0, making horizontal stretches more noticable and powerful when they happen.
// Higher values of uOpacity will result in more powerful offsets, with a uOpacity of 0
// doing nothing at all.
float horizontalOffset = pow(offsetBase, 3) * uOpacity / frameCount.x * 0.46;
float2 samplePosition = float2(saturate(coords.x + horizontalOffset), coords.y);
return tex2D(uImage0, samplePosition) * float4(uSecondaryColor, uSaturation);
}
technique Technique1
{
pass GlitchPass
{
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
namespace CalamityMod
{
public enum ExoMech
{
None,
Destroyer,
Prime,
Twins
}
}
+127 -18
View File
@@ -27,6 +27,7 @@ using CalamityMod.NPCs.SlimeGod;
using CalamityMod.NPCs.StormWeaver;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.Yharon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
@@ -84,7 +85,11 @@ namespace CalamityMod.Events
public static List<Boss> Bosses = new List<Boss>();
public static Dictionary<int, int[]> BossIDsAfterDeath = new Dictionary<int, int[]>();
public static Dictionary<int, Action<NPC>> BossDeathEffects = new Dictionary<int, Action<NPC>>();
public static int StartTimer;
public static int EndTimer;
public static readonly Color XerocTextColor = Color.LightCoral;
public const int StartEffectTotalTime = 120;
public const int EndVisualEffectTime = 340;
public static int ClosestPlayerToWorldCenter => Player.FindClosest(new Vector2(Main.maxTilesX, Main.maxTilesY) * 16f * 0.5f, 1, 1);
public static int CurrentlyFoughtBoss => Bosses[BossRushStage].EntityID;
public static int NextBossToFight => Bosses[BossRushStage + 1].EntityID;
@@ -287,7 +292,7 @@ namespace CalamityMod.Events
}
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);
}, permittedNPCs: new int[] { ModContent.NPCType<SCalWormArm>(), ModContent.NPCType<SCalWormHead>(), ModContent.NPCType<SCalWormBodyWeak>(), ModContent.NPCType<SCalWormTail>(),
}, permittedNPCs: new int[] { ModContent.NPCType<SCalWormArm>(), ModContent.NPCType<SCalWormHead>(), ModContent.NPCType<SCalWormBody>(), ModContent.NPCType<SCalWormBodyWeak>(), ModContent.NPCType<SCalWormTail>(),
ModContent.NPCType<SoulSeekerSupreme>(), ModContent.NPCType<BrimstoneHeart>(), ModContent.NPCType<SupremeCataclysm>(), ModContent.NPCType<SupremeCatastrophe>() }),
new Boss(ModContent.NPCType<Yharon>(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType<DetonatingFlare>(), ModContent.NPCType<DetonatingFlare2>() }),
@@ -321,22 +326,11 @@ namespace CalamityMod.Events
},
[ModContent.NPCType<DevourerofGodsHeadS>()] = npc =>
{
DropHelper.DropItem(npc, ModContent.ItemType<Rock>(), true);
BossRushStage = 0;
CalamityUtils.KillAllHostileProjectiles();
CalamityWorld.bossRushHostileProjKillCounter = 3;
BossRushActive = false;
CalamityNetcode.SyncWorld();
if (Main.netMode == NetmodeID.Server)
{
var netMessage = CalamityMod.Instance.GetPacket();
netMessage.Write((byte)CalamityModMessageType.BossRushStage);
netMessage.Write(BossRushStage);
netMessage.Send();
}
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.BossRushTierFiveEndText", XerocTextColor);
if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType<BossRushEndEffectThing>(), 0, 0f, Main.myPlayer);
}
};
}
@@ -347,10 +341,48 @@ namespace CalamityMod.Events
BossIDsAfterDeath = null;
BossDeathEffects = null;
}
#endregion
#endregion
#region Updates
internal static void MiscUpdateEffects()
#region Properties
public static int CurrentTier
{
get
{
if (BossRushStage > Bosses.FindIndex(boss => boss.EntityID == NPCID.CultistBoss))
return 3;
if (BossRushStage > Bosses.FindIndex(boss => boss.EntityID == NPCID.TheDestroyer))
return 2;
return 1;
}
}
public static int MusicToPlay
{
get
{
if (CalamityMod.Instance.musicMod != null)
return CalamityMod.Instance.GetMusicFromMusicMod($"BossRushTier{CurrentTier}") ?? 0;
switch (CurrentTier)
{
case 1:
return MusicID.Boss1;
case 2:
return MusicID.Boss4;
case 3:
return MusicID.Boss2;
case 4:
return MusicID.Boss3;
case 5:
return MusicID.LunarBoss;
}
return 0;
}
}
#endregion Properties
#region Updates
internal static void MiscUpdateEffects()
{
if (!BossRushActive)
return;
@@ -381,6 +413,7 @@ namespace CalamityMod.Events
if (!BossRushActive)
{
BossRushSpawnCountdown = 180;
BossRushSky.CurrentInterestMin = 0f;
if (BossRushStage != 0)
{
BossRushStage = 0;
@@ -404,7 +437,7 @@ namespace CalamityMod.Events
BossRushSpawnCountdown--;
// Cooldown and boss spawn
if (BossRushSpawnCountdown <= 0)
if (BossRushSpawnCountdown <= 0 && BossRushStage < Bosses.Count)
{
// Cooldown before next boss spawns.
BossRushSpawnCountdown = 60;
@@ -429,6 +462,53 @@ namespace CalamityMod.Events
Bosses[BossRushStage].SpawnContext.Invoke(CurrentlyFoughtBoss);
}
}
if (EndTimer > 0)
BossRushSky.CurrentInterest = MathHelper.Lerp(0.5f, 0.75f, Utils.InverseLerp(5f, 145f, EndTimer, true));
BossRushSky.CurrentInterestMin = MathHelper.Lerp(0f, 0.5f, (float)Math.Pow(BossRushStage / (float)Bosses.Count, 5D));
}
public static void End()
{
if (Main.netMode == NetmodeID.SinglePlayer)
{
EndEffects();
return;
}
var netMessage = CalamityMod.Instance.GetPacket();
netMessage.Write((byte)CalamityModMessageType.EndBossRush);
netMessage.Send();
}
internal static void EndEffects()
{
for (int doom = 0; doom < Main.maxNPCs; doom++)
{
NPC n = Main.npc[doom];
if (!n.active)
continue;
// will also correctly despawn EoW because none of his segments are boss flagged
bool shouldDespawn = n.boss || n.type == NPCID.EaterofWorldsHead || n.type == NPCID.EaterofWorldsBody || n.type == NPCID.EaterofWorldsTail;
if (shouldDespawn)
{
n.life = 0;
n.HitEffect();
n.checkDead();
n.active = false;
}
}
BossRushActive = false;
BossRushStage = 0;
StartTimer = 0;
EndTimer = 0;
CalamityUtils.KillAllHostileProjectiles();
// Send the EndBossRush packet again if this is called serverside to ensure that the changes are recieved by clients.
if (Main.netMode == NetmodeID.Server)
End();
}
#endregion
@@ -518,6 +598,35 @@ namespace CalamityMod.Events
netMessage2.Write(CalamityWorld.bossRushHostileProjKillCounter);
netMessage2.Send();
}
BossRushSky.CurrentInterest = 0.85f;
}
#endregion
#region Netcode
public static void SyncStartTimer(int time)
{
StartTimer = time;
if (Main.netMode != NetmodeID.Server)
return;
var netMessage = CalamityMod.Instance.GetPacket();
netMessage.Write((byte)CalamityModMessageType.BossRushStartTimer);
netMessage.Write(StartTimer);
netMessage.Send();
}
public static void SyncEndTimer(int time)
{
EndTimer = time;
if (Main.netMode != NetmodeID.Server)
return;
var netMessage = CalamityMod.Instance.GetPacket();
netMessage.Write((byte)CalamityModMessageType.BossRushEndTimer);
netMessage.Write(EndTimer);
netMessage.Send();
}
#endregion
}
+16
View File
@@ -0,0 +1,16 @@
using Terraria;
using Terraria.Graphics.Shaders;
namespace CalamityMod.Events
{
public class BossRushScreenShader : ScreenShaderData
{
public BossRushScreenShader(string passName) : base(passName) { }
public override void Apply()
{
UseTargetPosition(Main.LocalPlayer.Center);
base.Apply();
}
}
}
+109
View File
@@ -0,0 +1,109 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ModLoader;
namespace CalamityMod.Events
{
public class BossRushSky : CustomSky
{
public bool CurrentlyActive = false;
public float Intensity = 0f;
public static float IdleTimer = 0f;
public static float CurrentInterest = 0f;
public static float IncrementalInterest = 0f;
public static float CurrentInterestMin = 0f;
public static Color GeneralColor => Color.LightGray * 0.2f;
public override void Update(GameTime gameTime)
{
if (CurrentlyActive)
{
if (Intensity < 1f)
Intensity += 0.03f;
CurrentInterest = MathHelper.Clamp(CurrentInterest - 0.005f, CurrentInterestMin, 1f);
IncrementalInterest = MathHelper.Lerp(IncrementalInterest, CurrentInterest, 0.085f);
IdleTimer += MathHelper.Lerp(0.04f, 0.1f, IncrementalInterest);
}
else if (!CurrentlyActive && Intensity > 0f)
{
Intensity -= 0.03f;
CurrentInterest = 0f;
IncrementalInterest = 0f;
IdleTimer = 0f;
}
}
private float GetIntensity()
{
float fadeRatio = BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime;
return Utils.InverseLerp(0.57f, 1f, fadeRatio, true);
}
public override Color OnTileColor(Color inColor) => new Color(Vector4.Lerp(GeneralColor.ToVector4() * 0.5f, inColor.ToVector4(), 1f - GetIntensity()));
public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
{
if (GetIntensity() == 0f)
return;
if (maxDepth >= 0 && minDepth < 0 && GetIntensity() > 0f)
spriteBatch.Draw(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), GeneralColor * GetIntensity() * 0.5f);
Main.spriteBatch.End();
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive);
// Make the entire background fade to white at the end of the event.
if (BossRushEvent.EndTimer >= 100f)
{
Texture2D whiteTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/XerocLight");
Vector2 screenCenter = new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f;
float fadeToWhite = Utils.InverseLerp(110f, 140f, BossRushEvent.EndTimer, true);
fadeToWhite *= Utils.InverseLerp(BossRushEvent.EndVisualEffectTime - 5f, BossRushEvent.EndVisualEffectTime - 25f, BossRushEvent.EndTimer, true);
float backScale = MathHelper.Lerp(0.01f, 8f, fadeToWhite);
Color backFadeColor = Color.White * fadeToWhite * 0.64f;
spriteBatch.Draw(whiteTexture, screenCenter, null, backFadeColor, 0f, whiteTexture.Size() * 0.5f, backScale, SpriteEffects.None, 0f);
}
Main.spriteBatch.End();
Main.spriteBatch.Begin();
// Draw the Xeroc eye at the back of the background.
if (maxDepth >= float.MaxValue && minDepth < float.MaxValue && BossRushEvent.EndTimer < BossRushEvent.EndVisualEffectTime - 40f)
{
Vector2 screenCenter = Main.screenPosition + new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f;
float scale = MathHelper.Lerp(0.8f, 0.9f, IncrementalInterest) + (float)Math.Sin(IdleTimer) * 0.01f;
Vector2 drawWorldPosition = new Vector2(Main.LocalPlayer.Center.X, 1120f);
Vector2 drawPosition = (drawWorldPosition - screenCenter) * 0.097f + screenCenter - Main.screenPosition - Vector2.UnitY * 100f;
Texture2D eyeTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/XerocEye");
Color baseColorDraw = Color.Lerp(Color.White, Color.Red, IncrementalInterest);
spriteBatch.Draw(eyeTexture, drawPosition, null, baseColorDraw, 0f, eyeTexture.Size() * 0.5f, scale, SpriteEffects.None, 0f);
Color fadedColor = Color.Lerp(baseColorDraw, Color.Coral, 0.3f) * MathHelper.Lerp(0.18f, 0.3f, IncrementalInterest);
fadedColor.A = 0;
float backEyeOutwardness = MathHelper.Lerp(8f, 4f, IncrementalInterest);
int backInstances = (int)MathHelper.Lerp(6f, 24f, IncrementalInterest);
for (int i = 0; i < backInstances; i++)
{
Vector2 drawOffset = (MathHelper.TwoPi * 2f * i / backInstances + Main.GlobalTime * 2.1f).ToRotationVector2() * backEyeOutwardness;
spriteBatch.Draw(eyeTexture, drawPosition + drawOffset, null, fadedColor, 0f, eyeTexture.Size() * 0.5f, scale, SpriteEffects.None, 0f);
}
}
}
public override float GetCloudAlpha() => 1f - GetIntensity();
public override void Activate(Vector2 position, params object[] args) => CurrentlyActive = true;
public override void Deactivate(params object[] args) => CurrentlyActive = false;
public override void Reset() => CurrentlyActive = false;
public override bool IsActive() => CurrentlyActive || Intensity > 0f;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Loaded 100 of 780 files, more files were not shown because too many files have changed in this diff. Show more