This commit is contained in:
Phuc Nguyen (Brav) committed 2022-06-13 19:08:30 -07:00
commit 8f7f7de94e
92 files changed
+439 -245

No files matched your search

+1
View File
@@ -20,6 +20,7 @@ using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Balancing
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class BalancingChangesManager
{
internal static List<IBalancingRule[]> UniversalBalancingChanges = null;
+4 -1
View File
@@ -4462,7 +4462,7 @@ namespace CalamityMod.CalPlayer
if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && Player.whoAmI == Main.myPlayer)
{
if (CalamityConfig.Instance.Proficiency)
if (CalamityConfig.Instance.Proficiency && item.DamageType == DamageClass.Melee)
{
if (gainLevelCooldown <= 0)
{
@@ -5777,6 +5777,9 @@ namespace CalamityMod.CalPlayer
Player.lifeRegen = 0;
}
if (meteorSet)
Player.spaceGun = false;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<GiantIbanRobotOfDoom>()] > 0)
Player.yoraiz0rEye = 0;
+2 -1
View File
@@ -1,5 +1,6 @@
using CalamityMod.Balancing;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.EntitySources;
using CalamityMod.Enums;
using CalamityMod.Items.Mounts;
using Microsoft.Xna.Framework;
@@ -45,7 +46,7 @@ namespace CalamityMod.CalPlayer
public void ModDashMovement()
{
var source = Player.GetSource_Misc("2");
var source = new ProjectileSource_PlayerDashHit(Player);
// Handle collision slam-through effects.
if (HasCustomDash && Player.dashDelay < 0 && Player.whoAmI == Main.myPlayer)
+1
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
namespace CalamityMod.CalPlayer.Dashes
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class PlayerDashManager
{
internal static Dictionary<string, PlayerDashEffect> DashIdentificationTable = new();
+17 -2
View File
@@ -75,6 +75,7 @@ using static Terraria.ModLoader.ModContent;
namespace CalamityMod
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class CalamityLists
{
public static IList<string> donatorList;
@@ -1953,7 +1954,11 @@ namespace CalamityMod
NPCID.SantaNK1,
NPCID.Everscream,
NPCID.DD2Betsy,
NPCID.Mothron
NPCID.Mothron,
NPCID.MartianSaucer,
NPCID.MartianSaucerCannon,
NPCID.MartianSaucerCore,
NPCID.MartianSaucerTurret,
};
heartDropBlockList = new List<int>()
@@ -2442,7 +2447,6 @@ namespace CalamityMod
};
// Collections
// NOTE - Be sure to reference the NeedsFourLifeBytes list in the IL Editing code if changes are made here.
BossRushHPChanges = new SortedDictionary<int, int>
{
// Tier 1
@@ -2602,6 +2606,7 @@ namespace CalamityMod
bossMinionList = new List<int>()
{
NPCType<KingSlimeJewel>(),
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceTail>(),
@@ -2642,11 +2647,13 @@ namespace CalamityMod
NPCID.QueenSlimeMinionBlue,
NPCID.QueenSlimeMinionPink,
NPCID.QueenSlimeMinionPurple,
NPCType<CryogenShield>(),
NPCID.PrimeCannon,
NPCID.PrimeLaser,
NPCID.PrimeSaw,
NPCID.PrimeVice,
NPCType<Brimling>(),
NPCID.Probe,
NPCID.TheDestroyer,
NPCID.TheDestroyerBody,
NPCID.TheDestroyerTail,
@@ -2658,6 +2665,8 @@ namespace CalamityMod
NPCType<Catastrophe>(),
NPCType<SoulSeeker>(),
NPCID.PlanterasTentacle,
NPCType<AnahitasIceShield>(),
NPCType<AquaticAberration>(),
NPCType<AureusSpawn>(),
NPCID.Spore,
NPCID.GolemHead,
@@ -2678,18 +2687,24 @@ namespace CalamityMod
NPCID.CultistDragonBody4,
NPCID.CultistDragonTail,
NPCID.AncientCultistSquidhead,
NPCID.AncientDoom,
NPCID.MoonLordLeechBlob,
NPCID.MoonLordFreeEye,
NPCID.MoonLordHand,
NPCID.MoonLordHead,
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<Bumblefuck2>(),
NPCType<ProvSpawnOffense>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnHealer>(),
NPCType<DarkEnergy>(),
NPCType<CosmicLantern>(),
NPCType<PolterPhantom>(),
NPCType<CosmicGuardianHead>(),
NPCType<CosmicGuardianBody>(),
NPCType<CosmicGuardianTail>(),
NPCType<BrimstoneHeart>(),
NPCType<SupremeCataclysm>(),
NPCType<SupremeCatastrophe>()
};
+23 -2
View File
@@ -74,7 +74,9 @@ namespace CalamityMod
{
public class CalamityMod : Mod
{
// CONSIDER -- I have been advised by Jopo that Mods should never contain static variables
// TODO -- A huge amount of random floating variables exist here.
// These should all be moved to other files, whether that's CalamityLists or brand new ModSystems.
// It is best to have a ton of small ModSystems.
// Boss Spawners
public static int ghostKillCount = 0;
@@ -117,8 +119,11 @@ namespace CalamityMod
public static int[] holyEnemyImmunities = new int[4] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType<HolyFlames>(), ModContent.BuffType<Nightwither>() };
internal static CalamityMod Instance;
// TODO -- Mod references should be contained in a ModSystem (example name "ModLoadedChecker")
internal Mod musicMod = null; // This is Calamity's official music mod, CalamityModMusic
internal bool MusicAvailable => !(musicMod is null);
internal Mod ancientsAwakened = null;
internal Mod bossChecklist = null;
internal Mod census = null;
@@ -144,7 +149,7 @@ namespace CalamityMod
manaOriginal = TextureAssets.Mana;
carpetOriginal = TextureAssets.FlyingCarpet;
// Apply IL edits instantly afterwards.
// Apply IL edits as soon as possible.
ILChanges.Load();
// If any of these mods aren't loaded, it will simply keep them as null.
@@ -190,6 +195,11 @@ namespace CalamityMod
Mount.mounts[MountID.MinecartMech].dashSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
Mount.mounts[MountID.MinecartMech].runSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
// Make Graveyard biomes require more Gravestones
SceneMetrics.GraveyardTileMax = 88;
SceneMetrics.GraveyardTileMin = 68;
SceneMetrics.GraveyardTileThreshold = 80;
if (!Main.dedServ)
{
LoadClient();
@@ -198,6 +208,7 @@ namespace CalamityMod
CooldownRegistry.Load();
BossRushEvent.Load();
// TODO -- As ModBossBarStyle is a ModType, its Load function does not need to be called directly here.
BossHealthBarManager.Load(this);
DraedonStructures.Load();
EnchantmentManager.LoadAllEnchantments();
@@ -219,6 +230,7 @@ namespace CalamityMod
{
AstralSky = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AstralSky", AssetRequestMode.ImmediateLoad).Value;
// TODO -- Sky shaders should probably be loaded in a ModSystem
Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky();
@@ -271,6 +283,8 @@ namespace CalamityMod
ChargeMeterUI.Load();
AstralArcanumUI.Load(this);
// TODO -- Is this not possible to place in ModNPC.Load or ModNPC.SetStaticDefaults ?
// Centralizing head texture registration like this seems absurdly stiff
Apollo.LoadHeadIcons();
Artemis.LoadHeadIcons();
DevourerofGodsHead.LoadHeadIcons();
@@ -285,6 +299,8 @@ namespace CalamityMod
ThanatosBody2.LoadHeadIcons();
ThanatosTail.LoadHeadIcons();
// TODO -- Is this not possible to place in ModItem.Load or ModItem.SetStaticDefaults ?
// Centralizing hair dye shaders like this seems absurdly stiff
GameShaders.Hair.BindShader(ModContent.ItemType<AdrenalineHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax))));
GameShaders.Hair.BindShader(ModContent.ItemType<RageHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax))));
GameShaders.Hair.BindShader(ModContent.ItemType<WingTimeHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(139, 205, 255), ((float)player.wingTime / (float)player.wingTimeMax))));
@@ -359,11 +375,16 @@ namespace CalamityMod
TextureAssets.FlyingCarpet = carpetOriginal;
GeneralParticleHandler.Unload();
}
Mount.mounts[MountID.Unicorn].dashSpeed /= CalamityPlayer.UnicornSpeedNerfPower;
Mount.mounts[MountID.Unicorn].runSpeed /= CalamityPlayer.UnicornSpeedNerfPower;
Mount.mounts[MountID.MinecartMech].dashSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
Mount.mounts[MountID.MinecartMech].runSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
SceneMetrics.GraveyardTileMax = 36;
SceneMetrics.GraveyardTileMin = 16;
SceneMetrics.GraveyardTileThreshold = 28;
heartOriginal2 = null;
heartOriginal = null;
rainOriginal = null;
+1
View File
@@ -6,6 +6,7 @@ using Terraria.ModLoader.Core;
namespace CalamityMod.Cooldowns
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class CooldownRegistry
{
// Indexed by ushort netID. Contains every registered cooldown.
+1
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.DataStructures
Phoenix, Aries, Polaris, Andromeda //Galaxia
}
// TODO -- Attunements should be managed by an Attunement ModSystem
public abstract class Attunement
{
public static Attunement[] attunementArray;
+39 -38
View File
@@ -41,6 +41,7 @@ using CalamityMod.NPCs.AcidRain;
namespace CalamityMod
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static partial class NPCStats
{
private const double ExpertContactVanillaMultiplier = 2D;
@@ -529,17 +530,17 @@ namespace CalamityMod
{ ModContent.NPCType<CosmicGuardianBody>(), new int[] { 130, 260, 290, 320, 420 } },
{ ModContent.NPCType<CosmicGuardianTail>(), new int[] { 100, 200, 230, 260, 330 } },
{ ModContent.NPCType<Yharon>(), new int[] { 330, 528, 560, 576, 690 } },
{ ModContent.NPCType<Yharon>(), new int[] { 280, 448, 480, 512, 624 } },
{ ModContent.NPCType<SupremeCalamitas>(), new int[] { 350, 560, 592, 608, 768 } },
{ ModContent.NPCType<SupremeCalamitas>(), new int[] { 320, 512, 544, 560, 696 } },
{ ModContent.NPCType<Apollo>(), new int[] { 350, 560, 592, 608, 768 } },
{ ModContent.NPCType<Artemis>(), new int[] { 330, 528, 560, 576, 690 } },
{ ModContent.NPCType<Apollo>(), new int[] { 320, 512, 544, 560, 696 } },
{ ModContent.NPCType<Artemis>(), new int[] { 300, 480, 512, 528, 660 } },
{ ModContent.NPCType<ThanatosHead>(), new int[] { 400, 640, 680, 704, 864 } },
{ ModContent.NPCType<ThanatosBody1>(), new int[] { 330, 528, 560, 576, 690 } },
{ ModContent.NPCType<ThanatosBody2>(), new int[] { 330, 528, 560, 576, 690 } },
{ ModContent.NPCType<ThanatosTail>(), new int[] { 260, 416, 446, 464, 570 } },
{ ModContent.NPCType<ThanatosHead>(), new int[] { 350, 560, 592, 608, 756 } },
{ ModContent.NPCType<ThanatosBody1>(), new int[] { 300, 480, 512, 528, 660 } },
{ ModContent.NPCType<ThanatosBody2>(), new int[] { 300, 480, 512, 528, 660 } },
{ ModContent.NPCType<ThanatosTail>(), new int[] { 250, 400, 424, 440, 552 } },
{ ModContent.NPCType<AdultEidolonWyrmHead>(), new int[] { 400, 800, 850, 880, 1000 } }
};
@@ -771,43 +772,43 @@ namespace CalamityMod
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<SkyFlareRevenge>()), new int[] { 300, 520, 548, 564, 822 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<FlareBomb>()), new int[] { 220, 384, 424, 444, 600 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<Flarenado>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<Infernado>()), new int[] { 300, 520, 548, 564, 822 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<Infernado2>()), new int[] { 300, 520, 548, 564, 822 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<Infernado>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<Infernado2>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<FlareDust>()), new int[] { 220, 384, 424, 444, 600 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<FlareDust2>()), new int[] { 220, 384, 424, 444, 600 } },
{ new Tuple<int, int>(ModContent.NPCType<Yharon>(), ModContent.ProjectileType<YharonFireball>()), new int[] { 220, 384, 424, 444, 600 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 360, 540, 568, 584, 858 } }, // 25% increased damage in bullet hell 1
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<SCalBrimstoneFireblast>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<SCalBrimstoneGigablast>()), new int[] { 400, 608, 640, 658, 960 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneMonster>()), new int[] { 450, 676, 710, 728, 1062 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneWave>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 320, 480, 504, 532, 774 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<SCalWormBodyWeak>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 320, 480, 504, 532, 774 } },
{ new Tuple<int, int>(ModContent.NPCType<SoulSeekerSupreme>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 320, 480, 504, 532, 774 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<SupremeCataclysmFist>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 320, 480, 504, 532, 774 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<SupremeCatastropheSlash>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 320, 480, 504, 532, 774 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<SCalBrimstoneFireblast>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<SCalBrimstoneGigablast>()), new int[] { 300, 508, 528, 544, 780 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneMonster>()), new int[] { 350, 592, 624, 656, 918 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneWave>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCalamitas>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SCalWormBodyWeak>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<SoulSeekerSupreme>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<SupremeCataclysmFist>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCataclysm>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<SupremeCatastropheSlash>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 250, 440, 464, 476, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisSpinLaserbeam>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloFireball>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloRocket>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisSpinLaserbeam>()), new int[] { 300, 508, 528, 544, 780 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloFireball>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloRocket>()), new int[] { 280, 476, 484, 500, 726 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosHead>(), ModContent.ProjectileType<ThanatosBeamStart>()), new int[] { 450, 676, 710, 728, 1062 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosHead>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosBody1>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosBody2>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosTail>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosHead>(), ModContent.ProjectileType<ThanatosBeamStart>()), new int[] { 350, 592, 624, 656, 918 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosHead>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosBody1>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosBody2>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosTail>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<AresBody>(), ModContent.ProjectileType<AresDeathBeamStart>()), new int[] { 400, 608, 640, 658, 960 } },
{ new Tuple<int, int>(ModContent.NPCType<AresLaserCannon>(), ModContent.ProjectileType<AresLaserBeamStart>()), new int[] { 360, 540, 568, 584, 858 } },
{ new Tuple<int, int>(ModContent.NPCType<AresLaserCannon>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<AresPlasmaFlamethrower>(), ModContent.ProjectileType<AresPlasmaFireball>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<AresTeslaCannon>(), ModContent.ProjectileType<AresTeslaOrb>()), new int[] { 288, 432, 454, 478, 696 } },
{ new Tuple<int, int>(ModContent.NPCType<AresGaussNuke>(), ModContent.ProjectileType<AresGaussNukeProjectile>()), new int[] { 450, 676, 710, 728, 1062 } },
{ new Tuple<int, int>(ModContent.NPCType<AresBody>(), ModContent.ProjectileType<AresDeathBeamStart>()), new int[] { 300, 508, 528, 544, 780 } },
{ new Tuple<int, int>(ModContent.NPCType<AresLaserCannon>(), ModContent.ProjectileType<AresLaserBeamStart>()), new int[] { 300, 508, 528, 544, 780 } },
{ new Tuple<int, int>(ModContent.NPCType<AresLaserCannon>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<AresPlasmaFlamethrower>(), ModContent.ProjectileType<AresPlasmaFireball>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<AresTeslaCannon>(), ModContent.ProjectileType<AresTeslaOrb>()), new int[] { 240, 408, 432, 456, 630 } },
{ new Tuple<int, int>(ModContent.NPCType<AresGaussNuke>(), ModContent.ProjectileType<AresGaussNukeProjectile>()), new int[] { 400, 608, 640, 658, 960 } },
{ new Tuple<int, int>(ModContent.NPCType<AdultEidolonWyrmHead>(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } },
{ new Tuple<int, int>(ModContent.NPCType<AdultEidolonWyrmHead>(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } },
+1
View File
@@ -7,6 +7,7 @@ using Terraria.Graphics.Shaders;
namespace CalamityMod.Effects
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class CalamityShaders
{
public static Effect AstralFogShader;
+1 -1
View File
@@ -28,7 +28,7 @@ float4 CalculateDiffusion(float4 sampleColor : TEXCOORD, float2 coords : TEXCOOR
// nextField[i, j] = currentField[i, j] + diffusionFactor * (totalCardinalState - currentField[i, j])
// However, this would considerably restrict the freedom of the simulation, as any visocity values above 1 would result
// in overshooting estimations and cause unstable behavior.
// Instead of doing this instead of using the current state to calculate the next one, we attempt to solve for a state that when
// Instead of using the current state to calculate the next one, we attempt to solve for a state that when
// done in reverse returns the original state. Mathematically, this is written like so:
// currentField[i, j] = nextField[i, j] - diffusionFactor * (averageNextCardinalState - currentField[i, j])
@@ -0,0 +1,13 @@
#nullable enable
using Terraria;
using Terraria.DataStructures;
namespace CalamityMod.EntitySources
{
public class ProjectileSource_PlayerDashHit : IEntitySource
{
public Player player;
public ProjectileSource_PlayerDashHit(Player p) => player = p;
public string? Context => null;
}
}
+1
View File
@@ -39,6 +39,7 @@ using Terraria.DataStructures;
namespace CalamityMod.Events
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class BossRushEvent
{
public enum TimeChangeContext
+1
View File
@@ -8,6 +8,7 @@ using Terraria.ModLoader;
namespace CalamityMod.ILEditing
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public partial class ILChanges
{
/// <summary>
+5 -5
View File
@@ -211,7 +211,7 @@ namespace CalamityMod.Items.Accessories
int proj = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedHuges>(), boomDamage, 0f, player.whoAmI, projType == 1 ? 1f : 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
Main.projectile[proj].originalDamage = boomBaseDamage;
}
break;
@@ -219,7 +219,7 @@ namespace CalamityMod.Items.Accessories
int proj2 = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedSmalls>(), boomDamage, 0f, player.whoAmI, 0f);
if (proj2.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj2].Calamity().forceMinion = true;
Main.projectile[proj2].DamageType = DamageClass.Summon;
Main.projectile[proj2].originalDamage = boomBaseDamage;
}
break;
@@ -260,7 +260,7 @@ namespace CalamityMod.Items.Accessories
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), magefireDamage, 1f, player.whoAmI, enrage ? 1f : 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
Main.projectile[proj].originalDamage = magefireBaseDamage;
}
player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25;
@@ -285,7 +285,7 @@ namespace CalamityMod.Items.Accessories
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
Main.projectile[proj].originalDamage = shardBaseDamage;
}
SoundEngine.PlaySound(SoundID.Item20, player.Center);
@@ -300,7 +300,7 @@ namespace CalamityMod.Items.Accessories
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 1f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
Main.projectile[proj].originalDamage = shardBaseDamage;
}
SoundEngine.PlaySound(SoundID.Item20, player.Center);
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories
{
CreateRecipe().
AddIngredient(ItemID.Diamond, 5).
AddIngredient(ItemID.IronBar, 15).
AddRecipeGroup("IronBar", 15).
AddTile(TileID.Anvils).
Register();
}
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Items
{
CreateRecipe().
AddIngredient<SulphuricScale>(20).
AddIngredient(ItemID.IronBar, 10).
AddRecipeGroup("IronBar", 10).
AddTile(TileID.Anvils).
Register();
}
+2
View File
@@ -7,6 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items
{
// TODO -- The item tweaks database and functions should be stored in a ModSystem.
// ApplyTweaks(ref Item item) would be the one exposed function, which CalamityGlobalItem would call in SetDefaults.
public partial class CalamityGlobalItem : GlobalItem
{
#region Database and Initialization
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.DifficultyItems
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.IronBar, 10).
AddRecipeGroup("IronBar", 10).
AddIngredient(ItemID.Chain).
AddTile(TileID.Anvils).
Register();
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.LabFinders
CreateRecipe().
AddIngredient<MysteriousCircuitry>(4).
AddIngredient<DubiousPlating>(4).
AddIngredient(ItemID.IronBar, 10).
AddRecipeGroup("IronBar", 10).
AddTile(TileID.Anvils).
Register();
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.DraedonStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -32,7 +32,12 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4).AddIngredient(ModContent.ItemType<DubiousPlating>(), 4).AddIngredient(ModContent.ItemType<Items.Placeables.DraedonStructures.RustedPlating>(), 10).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.Anvils).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4).
AddIngredient(ModContent.ItemType<DubiousPlating>(), 4).
AddIngredient(ModContent.ItemType<RustedPlating>(), 10).
AddRecipeGroup("IronBar", 2).
AddTile(TileID.Anvils).Register();
}
}
}
@@ -26,8 +26,16 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryPanelWall>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(25).
AddRecipeGroup("IronBar").
AddRecipeGroup("AnyStoneBlock", 3).
AddTile(TileID.HeavyWorkBench).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryPanelWall>(), 4).
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Placeables.Walls.DraedonStructures;
using CalamityMod.Items.Placeables.Walls.DraedonStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.DraedonStructures
@@ -26,12 +26,35 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<RustedPlating>()).AddTile(TileID.Anvils).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryShelf>(), 2).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryPlatingWall>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryPlateBeam>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryPlatePillar>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(25).
AddRecipeGroup("IronBar").
AddRecipeGroup("AnyStoneBlock", 3).
AddTile(TileID.HeavyWorkBench).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<RustedPlating>()).
AddTile(TileID.Anvils).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryShelf>(), 2).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryPlatingWall>(), 4).
AddTile(TileID.WorkBenches).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryPlateBeam>(), 4).
AddTile(TileID.WorkBenches).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryPlatePillar>(), 4).
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -25,7 +25,10 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(5).AddIngredient(ItemID.IronBar).AddTile(TileID.Anvils).Register();
CreateRecipe(5).
AddRecipeGroup("IronBar").
AddTile(TileID.Anvils).
Register();
}
}
}
@@ -26,12 +26,35 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<LaboratoryPlating>()).AddTile(TileID.Anvils).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<RustedShelf>(), 2).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<RustedPlatingWall>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<RustedPlateBeam>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(1).AddIngredient(ModContent.ItemType<RustedPlatePillar>(), 4).AddTile(TileID.WorkBenches).Register();
CreateRecipe(25).
AddRecipeGroup("IronBar").
AddRecipeGroup("AnyStoneBlock", 3).
AddTile(TileID.HeavyWorkBench).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<LaboratoryPlating>()).
AddTile(TileID.Anvils).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<RustedShelf>(), 2).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<RustedPlatingWall>(), 4).
AddTile(TileID.WorkBenches).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<RustedPlateBeam>(), 4).
AddTile(TileID.WorkBenches).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<RustedPlatePillar>(), 4).
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.DraedonStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -32,7 +32,13 @@ namespace CalamityMod.Items.Placeables.DraedonStructures
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4).AddIngredient(ModContent.ItemType<DubiousPlating>(), 4).AddIngredient(ModContent.ItemType<Items.Placeables.DraedonStructures.LaboratoryPlating>(), 10).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.Anvils).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4).
AddIngredient(ModContent.ItemType<DubiousPlating>(), 4).
AddIngredient(ModContent.ItemType<LaboratoryPlating>(), 10).
AddRecipeGroup("IronBar", 2).
AddTile(TileID.Anvils).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
@@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 10).AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 20).AddTile(TileID.Anvils).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 10).
AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 20).
AddTile(TileID.Anvils).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureAbyss
@@ -28,7 +28,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<SmoothAbyssGravel>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<VoidCondenser>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<SmoothAbyssGravel>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<VoidCondenser>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureAbyss
@@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<SmoothAbyssGravel>(), 10).AddTile(ModContent.TileType<VoidCondenser>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<SmoothAbyssGravel>(), 10).
AddTile(ModContent.TileType<VoidCondenser>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.FurnitureAcidwood;
using CalamityMod.Tiles.FurnitureAcidwood;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Placeables.FurnitureAcidwood
@@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAcidwood
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<Acidwood>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.WorkBenches).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<Acidwood>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.FurnitureAcidwood;
using CalamityMod.Tiles.FurnitureAcidwood;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureAcidwood
@@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureAcidwood
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<Acidwood>(), 10).AddTile(TileID.Sawmill).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<Acidwood>(), 10).
AddTile(TileID.Sawmill).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureAshen
@@ -28,7 +28,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAshen
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<SmoothBrimstoneSlag>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<AshenAltar>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<SmoothBrimstoneSlag>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<AshenAltar>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureBotanic
@@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureBotanic
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<UelibloomBrick>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<BotanicPlanter>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<UelibloomBrick>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<BotanicPlanter>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureBotanic
@@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureBotanic
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<UelibloomBrick>(), 10).AddIngredient(ItemID.IronBar, 3).AddTile(ModContent.TileType<BotanicPlanter>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<UelibloomBrick>(), 10).
AddRecipeGroup("IronBar", 3).
AddTile(ModContent.TileType<BotanicPlanter>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using Terraria.ID;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Tiles.FurnitureCosmilite;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -29,7 +29,11 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 10).AddIngredient(ItemID.IronBar, 5).AddTile(ModContent.TileType<CosmicAnvil>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 10).
AddRecipeGroup("IronBar", 5).
AddTile(ModContent.TileType<CosmicAnvil>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureCosmilite
@@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<CosmicAnvil>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<CosmicAnvil>()).
Register();
}
}
}
@@ -1,4 +1,4 @@

using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
@@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 10).AddTile(ModContent.TileType<CosmicAnvil>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<CosmiliteBrick>(), 10).
AddTile(ModContent.TileType<CosmicAnvil>()).
Register();
}
}
}
+6 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.FurnitureExo;
using Terraria.ModLoader;
using Terraria.ID;
@@ -29,7 +29,11 @@ namespace CalamityMod.Items.Placeables.FurnitureExo
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<ExoPlating>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<DraedonsForge>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<ExoPlating>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<DraedonsForge>()).
Register();
}
}
}
+7 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.FurnitureExo;
using Terraria.ID;
using Terraria.ModLoader;
@@ -29,7 +29,12 @@ namespace CalamityMod.Items.Placeables.FurnitureExo
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<ExoPlating>(), 10).AddTile(ModContent.TileType<DraedonsForge>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<ExoPlating>(), 10).
AddTile(ModContent.TileType<DraedonsForge>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Placeables.FurnitureMonolith
@@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureMonolith
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<AstralMonolith>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<MonolithAmalgam>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<AstralMonolith>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<MonolithAmalgam>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureMonolith
@@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureMonolith
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<AstralMonolith>(), 10).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddTile(ModContent.TileType<MonolithAmalgam>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<AstralMonolith>(), 10).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddTile(ModContent.TileType<MonolithAmalgam>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
@@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurniturePlagued
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<PlaguedContainmentBrick>(), 8).AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 2).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<PlagueInfuser>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<PlaguedContainmentBrick>(), 8).
AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 2).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<PlagueInfuser>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
@@ -28,7 +28,13 @@ namespace CalamityMod.Items.Placeables.FurniturePlagued
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<PlaguedContainmentBrick>(), 10).AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 2).AddIngredient(ItemID.Glass, 6).AddIngredient(ItemID.IronBar, 3).AddTile(ModContent.TileType<PlagueInfuser>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<PlaguedContainmentBrick>(), 10).
AddIngredient(ModContent.ItemType<PlagueCellCanister>(), 2).
AddIngredient(ItemID.Glass, 6).
AddRecipeGroup("IronBar", 3).
AddTile(ModContent.TileType<PlagueInfuser>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureProfaned
@@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureProfaned
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<ProfanedRock>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<ProfanedCrucible>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<ProfanedRock>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<ProfanedCrucible>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureProfaned
@@ -26,7 +26,12 @@ namespace CalamityMod.Items.Placeables.FurnitureProfaned
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<ProfanedRock>(), 10).AddTile(ModContent.TileType<ProfanedCrucible>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<ProfanedRock>(), 10).
AddTile(ModContent.TileType<ProfanedCrucible>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureStatigel
@@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<StatigelBlock>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<StaticRefiner>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<StatigelBlock>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<StaticRefiner>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureStatigel
@@ -26,7 +26,12 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<StatigelBlock>(), 10).AddTile(ModContent.TileType<StaticRefiner>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<StatigelBlock>(), 10).
AddTile(ModContent.TileType<StaticRefiner>()).
Register();
}
}
}
@@ -1,4 +1,4 @@
using Terraria.ID;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureStratus
{
@@ -25,7 +25,11 @@ namespace CalamityMod.Items.Placeables.FurnitureStratus
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<StratusBricks>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.LunarCraftingStation).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<StratusBricks>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
@@ -1,4 +1,4 @@
using Terraria.ID;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureStratus
{
@@ -25,7 +25,12 @@ namespace CalamityMod.Items.Placeables.FurnitureStratus
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<StratusBricks>(), 10).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddTile(TileID.LunarCraftingStation).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<StratusBricks>(), 10).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
+6 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureVoid
@@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureVoid
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ModContent.ItemType<SmoothVoidstone>(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType<VoidCondenser>()).Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<SmoothVoidstone>(), 8).
AddRecipeGroup("IronBar", 2).
AddTile(ModContent.TileType<VoidCondenser>()).
Register();
}
}
}
@@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurnitureVoid
public override void AddRecipes()
{
CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType<SmoothVoidstone>(), 10).AddTile(ModContent.TileType<VoidCondenser>()).Register();
CreateRecipe(1).
AddRecipeGroup("IronBar", 3).
AddIngredient(ItemID.Glass, 6).
AddIngredient(ModContent.ItemType<SmoothVoidstone>(), 10).
AddTile(ModContent.TileType<VoidCondenser>()).
Register();
}
}
}
+1 -1
View File
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.SummonItems
{
CreateRecipe().
AddIngredient<PlagueCellCanister>(20).
AddIngredient(ItemID.IronBar, 8).
AddRecipeGroup("IronBar", 8).
AddIngredient(ItemID.Stinger, 5).
AddIngredient(ItemID.Obsidian, 3).
AddTile(TileID.MythrilAnvil).
+1 -1
View File
@@ -61,7 +61,7 @@ namespace CalamityMod.Items.SummonItems
Register();
CreateRecipe().
AddIngredient(ItemID.IronBar, 30).
AddRecipeGroup("IronBar", 30).
AddIngredient(ItemID.LunarBar, 10).
AddIngredient<GalacticaSingularity>(20).
AddIngredient(ItemID.SoulofLight, 20).
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.ID;
namespace CalamityMod.Items.VanillaArmorChanges
@@ -21,7 +21,6 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override void ApplyArmorSetBonus(Player player)
{
player.spaceGun = false;
player.Calamity().meteorSet = true;
}
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
@@ -7,6 +7,7 @@ using Terraria.ID;
namespace CalamityMod.Items.VanillaArmorChanges
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class VanillaArmorChangeManager
{
internal static List<VanillaArmorChange> ArmorChanges;
+1 -1
View File
@@ -67,7 +67,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
CreateRecipe().
AddIngredient(ItemID.MusketBall, 100).
AddIngredient(ItemID.IronBar, 7).
AddRecipeGroup("IronBar", 7).
AddIngredient<AerialiteBar>(3).
AddTile(TileID.Anvils).
Register();
+1 -1
View File
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
CreateRecipe().
AddIngredient<Shroomer>().
AddIngredient(ItemID.IronBar, 50).
AddRecipeGroup("IronBar", 50).
AddIngredient<DivineGeode>(5).
AddIngredient(ItemID.TigerSkin).
AddTile(TileID.LunarCraftingStation).
+1 -1
View File
@@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
{
CreateRecipe().
AddIngredient(ItemID.IllegalGunParts).
AddIngredient(ItemID.IronBar, 20).
AddRecipeGroup("IronBar", 20).
AddRecipeGroup("AnyAdamantiteBar", 15).
AddTile(TileID.MythrilAnvil).
Register();
+1 -1
View File
@@ -93,7 +93,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
CreateRecipe().
AddIngredient(ItemID.Shotgun).
AddIngredient(ItemID.IllegalGunParts).
AddIngredient(ItemID.IronBar, 20).
AddRecipeGroup("IronBar", 20).
AddIngredient(ItemID.Ectoplasm, 20).
AddTile(TileID.MythrilAnvil).
Register();
+1 -1
View File
@@ -81,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
{
CreateRecipe().
AddIngredient(ItemID.FlintlockPistol).
AddIngredient(ItemID.IronBar, 10).
AddRecipeGroup("IronBar", 10).
AddIngredient(ItemID.Diamond, 5).
AddTile(TileID.Anvils).
Register();
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Typeless
CreateRecipe().
AddIngredient(ItemID.PsychoKnife).
AddIngredient(ItemID.Obsidian, 10).
AddIngredient(ItemID.IronBar, 20).
AddRecipeGroup("IronBar", 20).
AddIngredient<PlagueCellCanister>(50).
AddTile(TileID.MythrilAnvil).
Register();
+11 -12
View File
@@ -389,7 +389,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Projectile damage values
int bulletHellblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast2>());
int firstBulletHellblastDamage = (int)Math.Round(bulletHellblastDamage * 1.25);
int barrageDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneBarrage>());
int gigablastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneFireblast>());
int fireblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneGigablast>());
@@ -695,22 +694,22 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
float distance = Main.rand.NextBool() ? -1000f : 1000f;
float velocity = (distance == -1000f ? 4f : -4f) * uDieLul;
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
if (bulletHellCounter2 < 300) // Blasts from above
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
else if (bulletHellCounter2 < 600) // Blasts from left and right
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
else // Blasts from above, left, and right
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
}
}
@@ -781,7 +780,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
float distance = Main.rand.NextBool() ? -1000f : 1000f;
float velocity = (distance == -1000f ? 4f : -4f) * uDieLul;
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
if (bulletHellCounter2 < 1200) // Blasts from below
{
@@ -842,7 +841,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
float distance = Main.rand.NextBool() ? -1000f : 1000f;
float velocity = (distance == -1000f ? 4f : -4f) * uDieLul;
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
if (bulletHellCounter2 < 2100) // Blasts from above
{
@@ -915,7 +914,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
float distance = Main.rand.NextBool() ? -1000f : 1000f;
float velocity = (distance == -1000f ? 4f : -4f) * uDieLul;
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
if (bulletHellCounter2 < 3000) // Blasts from below
{
@@ -986,7 +985,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
float distance = Main.rand.NextBool() ? -1000f : 1000f;
float velocity = (distance == -1000f ? 4f : -4f) * uDieLul;
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), firstBulletHellblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType<BrimstoneHellblast2>(), bulletHellblastDamage, 0f, Main.myPlayer);
}
if (bulletHellCounter2 < 3900) // Blasts from above
{
+2
View File
@@ -16,6 +16,8 @@ namespace CalamityMod.Particles
// As such, it is littered with many netMode checks. While some may be overprotective in their nature it is critical that
// failsafes exist there, as visual failures tend to result in engine crashes, which will kill a lot of MP servers.
// If someone other than me for any reason attempts to notably expand upon this system you must keep this in mind. -Dominic
// TODO -- This can be made into a ModSystem. Its main thread load dependency with render targets is safe to put in OnModLoad.
public static class FusableParticleManager
{
internal static List<FusableParticleRenderCollection> ParticleSets = new List<FusableParticleRenderCollection>();
+1
View File
@@ -11,6 +11,7 @@ using Terraria.ModLoader.Core;
namespace CalamityMod.Particles
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class GeneralParticleHandler
{
private static List<Particle> particles;
@@ -17,6 +17,8 @@ namespace CalamityMod.Projectiles.BaseProjectiles
public abstract int IntendedProjectileType { get; }
public static Dictionary<int, int> ItemProjectileRelationship = new();
// TODO -- There is no reason this load hook should need to be called from CalamityMod.
// All subclasses of this should be ILoadable and should load themselves.
public static void LoadAll()
{
ItemProjectileRelationship = new Dictionary<int, int>();
+14 -1
View File
@@ -25,6 +25,8 @@ using static Terraria.ModLoader.ModContent;
using NanotechProjectile = CalamityMod.Projectiles.Typeless.Nanotech;
using Terraria.Audio;
using Terraria.GameContent;
using Terraria.DataStructures;
using CalamityMod.EntitySources;
namespace CalamityMod.Projectiles
{
@@ -50,6 +52,9 @@ namespace CalamityMod.Projectiles
public bool forceClassless = false;
public bool forceHostile = false;
// Source variables.
public bool CreatedByPlayerDash = false;
// Damage Adjusters
public const float PierceResistHarshness = 0.12f;
public const float PierceResistCap = 0.8f;
@@ -127,6 +132,14 @@ namespace CalamityMod.Projectiles
// Update priority variable.
public float UpdatePriority = 0f;
#region On Spawn
public override void OnSpawn(Projectile projectile, IEntitySource source)
{
CreatedByPlayerDash = source is ProjectileSource_PlayerDashHit;
}
#endregion On Spawn
#region SetDefaults
public override void SetDefaults(Projectile projectile)
{
@@ -2515,7 +2528,7 @@ namespace CalamityMod.Projectiles
if (modPlayer.rottenDogTooth && projectile.Calamity().stealthStrike)
target.AddBuff(BuffType<ArmorCrunch>(), RottenDogtooth.ArmorCrunchDebuffTime);
if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj)
if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj && !projectile.Calamity().CreatedByPlayerDash)
target.AddBuff(BuffType<VulnerabilityHex>(), VulnerabilityHex.AflameDuration);
if (modPlayer.farProximityRewardEnchant)
@@ -195,7 +195,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
Main.projectile[laser].originalDamage = Projectile.originalDamage;
Main.projectile[laser].tileCollide = false;
Main.projectile[laser].netUpdate = true;
Main.projectile[laser].Calamity().forceMinion = true;
Main.projectile[laser].DamageType = DamageClass.Summon;
}
}
Projectile.ai[1]++;
-26
View File
@@ -105,29 +105,6 @@ namespace CalamityMod.Projectiles.Pets
Projectile.position.Y -= Projectile.velocity.Y;
}
public void SpawnDoggo()
{
Player player = Main.player[Projectile.owner];
string doggoType = "DevourerofGodsHead";
if (player.name == "Terry")
{
doggoType += "S";
Main.NewText("It's not over yet, kid!", Color.Cyan);
}
else
{
doggoType += "2";
Main.NewText("Don't get cocky, kid!", Color.Cyan);
}
int type = Mod.Find<ModNPC>(doggoType).Type;
int n = NPC.NewNPC(Projectile.GetSource_FromAI(), (int)Projectile.position.X, (int)Projectile.position.Y, type);
NetMessage.SendData(MessageID.SyncNPC, -1, -1, (NetworkText)null, n, 0.0f, 0.0f, 0.0f, 0, 0, 0);
Main.npc[n].netUpdate = true;
}
public override void AI()
{
Projectile.type = trueType; //asserts real type after running black Cat AI 26 (ensures chibii pet isnt drawn as black cat and other weird stuff)
@@ -240,9 +217,6 @@ namespace CalamityMod.Projectiles.Pets
player.Hurt(PlayerDeathReason.ByCustomReason(player.name + " couldn't stand the sharp objects."), 500, 0, false, false, false, -1);
}
player.RemoveAllIFrames();
if (Main.netMode != NetmodeID.MultiplayerClient)
SpawnDoggo();
}
Projectile.netUpdate = true;
}
+2 -56
View File
@@ -334,36 +334,7 @@ namespace CalamityMod.Projectiles.Summon
if (Projectile.owner == Main.myPlayer)
{
SoundEngine.PlaySound(GaussRifle.FireSound, Projectile.Center);
int damage = LaserBaseDamage;
if (player.HeldItem != null)
{
if (player.HeldItem.CountsAsClass<MagicDamageClass>())
{
damage = (int)player.GetTotalDamage<MagicDamageClass>().ApplyTo(damage);
}
else if (player.HeldItem.CountsAsClass<MeleeDamageClass>())
{
damage = (int)player.GetTotalDamage<MeleeDamageClass>().ApplyTo(damage);
}
else if (player.HeldItem.CountsAsClass<RangedDamageClass>())
{
damage = (int)player.GetTotalDamage<RangedDamageClass>().ApplyTo(damage);
}
else if (player.HeldItem.CountsAsClass<SummonDamageClass>())
{
damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(damage);
}
else if (player.HeldItem.CountsAsClass<ThrowingDamageClass>())
{
damage = (int)player.GetTotalDamage<ThrowingDamageClass>().ApplyTo(damage);
}
// If we can't tell what you are using, it scales with your best class.
else
{
damage = (int)player.GetBestClassDamage().ApplyTo(damage);
}
}
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(LaserBaseDamage);
Vector2 laserVelocity = (Main.MouseWorld - (Main.player[Projectile.owner].Center + new Vector2(Projectile.spriteDirection == 1 ? 48f : 22f, -28f))).SafeNormalize(Vector2.UnitX * Projectile.spriteDirection);
Projectile deathLaser = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(),
Projectile.Center,
@@ -375,32 +346,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.whoAmI);
deathLaser.originalDamage = damage;
if (player.HeldItem != null && deathLaser.whoAmI.WithinBounds(Main.maxProjectiles))
{
if (player.HeldItem.CountsAsClass<MagicDamageClass>())
{
deathLaser.Calamity().forceMagic = true;
}
else if (player.HeldItem.CountsAsClass<MeleeDamageClass>())
{
deathLaser.Calamity().forceMelee = true;
}
else if (player.HeldItem.CountsAsClass<RangedDamageClass>())
{
deathLaser.Calamity().forceRanged = true;
}
else if (player.HeldItem.CountsAsClass<SummonDamageClass>())
{
deathLaser.Calamity().forceMinion = true;
}
else if (player.HeldItem.CountsAsClass<ThrowingDamageClass>())
{
deathLaser.Calamity().forceRogue = true;
}
else
{
deathLaser.Calamity().forceClassless = true;
}
}
deathLaser.DamageType = DamageClass.Summon;
}
}
}
+1 -1
View File
@@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon
if (Main.projectile.IndexInRange(soul))
{
Main.projectile[soul].originalDamage = Projectile.originalDamage;
Main.projectile[soul].Calamity().forceMinion = true;
Main.projectile[soul].DamageType = DamageClass.Summon;
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon
{
Projectile aura = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), dmg, 0f, Projectile.owner, l);
if (aura.whoAmI.WithinBounds(Main.maxProjectiles))
aura.Calamity().forceMinion = true;
aura.DamageType = DamageClass.Summon;
}
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon
float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f;
int shard = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 2, 0f, Projectile.owner);
if (shard.WithinBounds(Main.maxProjectiles))
Main.projectile[shard].Calamity().forceMinion = true;
Main.projectile[shard].DamageType = DamageClass.Summon;
}
}
}
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].originalDamage = damage;
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
}
if (innerSplits > 0) //only runs if there's still inner splits to create
{
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].originalDamage = damage;
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
}
}
innerSplits--;
@@ -634,7 +634,7 @@ namespace CalamityMod.Projectiles.Summon
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].originalDamage = (int)(Projectile.originalDamage * 1.5);
Main.projectile[proj].Calamity().forceMinion = true;
Main.projectile[proj].DamageType = DamageClass.Summon;
}
((ProfanedCrystalRangedHuges)Main.projectile[proj].ModProjectile).boomerSwarm = true;
}
+1 -1
View File
@@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Summon
int beam = Projectile.NewProjectile(Projectile.GetSource_FromThis(), source, velocity, ProjectileID.HeatRay, Projectile.damage, Projectile.knockBack, Projectile.owner);
if (beam.WithinBounds(Main.maxProjectiles))
{
Main.projectile[beam].Calamity().forceMinion = true;
Main.projectile[beam].DamageType = DamageClass.Summon;
Main.projectile[beam].originalDamage = Projectile.originalDamage;
}
Projectile.ai[0] = 50f;
+2 -2
View File
@@ -283,7 +283,7 @@ namespace CalamityMod.Projectiles.Summon
int spark = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkS, ModContent.ProjectileType<Spark>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
if (spark.WithinBounds(Main.maxProjectiles))
{
Main.projectile[spark].Calamity().forceMinion = true;
Main.projectile[spark].DamageType = DamageClass.Summon;
Main.projectile[spark].originalDamage = Projectile.originalDamage;
Main.projectile[spark].timeLeft = 120;
Main.projectile[spark].penetrate = 3;
@@ -327,7 +327,7 @@ namespace CalamityMod.Projectiles.Summon
int spark = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkS, ModContent.ProjectileType<Spark>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
if (spark.WithinBounds(Main.maxProjectiles))
{
Main.projectile[spark].Calamity().forceMinion = true;
Main.projectile[spark].DamageType = DamageClass.Summon;
Main.projectile[spark].originalDamage = Projectile.originalDamage;
Main.projectile[spark].timeLeft = 120;
Main.projectile[spark].penetrate = 3;
+1 -1
View File
@@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Summon
// Regardless of what was fired, force it to be a summon projectile so that summon accessories work.
if (projIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[projIndex].Calamity().forceMinion = true;
Main.projectile[projIndex].DamageType = DamageClass.Summon;
Main.projectile[projIndex].originalDamage = Projectile.originalDamage;
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon
Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2CircularEdge(8f, 8f);
int seeker = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType<PlagueSeeker>(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner);
Main.projectile[seeker].originalDamage = Projectile.damage / 2;
Main.projectile[seeker].Calamity().forceMinion = true;
Main.projectile[seeker].DamageType = DamageClass.Summon;
}
}
}
+1 -2
View File
@@ -19,8 +19,7 @@ namespace CalamityMod.Projectiles.Typeless
// This is a rather weird thing, but it's what the patron asked for.
public static readonly Func<NPC, bool> CanRecieveCoolEffectsFrom = (npc) =>
{
bool validBoss = npc.boss && npc.type != ModContent.NPCType<CeaselessVoid>()
&& npc.type != ModContent.NPCType<DevourerofGodsBody>()
bool validBoss = npc.boss && npc.type != ModContent.NPCType<DevourerofGodsBody>()
&& npc.type != ModContent.NPCType<AstrumDeusBody>()
&& npc.type != ModContent.NPCType<ThanatosHead>()
&& npc.type != ModContent.NPCType<ThanatosBody1>()
+1
View File
@@ -10,6 +10,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Schematics
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class SchematicManager
{
internal const string RustedWorkshopKey = "Rusted Workshop";
+1
View File
@@ -2,6 +2,7 @@
namespace CalamityMod.Systems
{
// TODO -- Expand this ModSystem to contain the Speedrun Timer itself, as well as the UI.
public class SpeedrunTimerStoppingSystem : ModSystem
{
public override void PreSaveAndQuit() => CalamityMod.SpeedrunTimer?.Stop();
+1
View File
@@ -10,6 +10,7 @@ using ReLogic.Content;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class AstralArcanumUI
{
enum CircleStyle
@@ -13,6 +13,7 @@ using Terraria.ModLoader;
namespace CalamityMod.UI.CalamitasEnchants
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class EnchantmentManager
{
internal const int ClearEnchantmentID = -18591774;
+1
View File
@@ -9,6 +9,7 @@ using Terraria.ModLoader;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class ChargeMeterUI
{
// These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision.
+2 -1
View File
@@ -1,10 +1,11 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class InvasionProgressUIManager
{
private static readonly List<InvasionProgressUI> gUIs = new List<InvasionProgressUI>();
+2 -1
View File
@@ -1,4 +1,4 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,6 +6,7 @@ using Terraria;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class PopupGUIManager
{
private static readonly List<PopupGUI> gUIs = new List<PopupGUI>();
+1
View File
@@ -11,6 +11,7 @@ using Terraria.ModLoader;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class RipperUI
{
// These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision.
+1
View File
@@ -32,6 +32,7 @@ using Terraria.ModLoader;
namespace CalamityMod.UI
{
// TODO -- Combine with SpeedrunTimerStoppingSystem, which should be renamed and call the UI draw code in this file.
public class SpeedrunTimerUI
{
// These values put the Speedrun Timer roughly at the top center of a 1080p screen.
+1
View File
@@ -9,6 +9,7 @@ using Terraria.ModLoader;
namespace CalamityMod.UI
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public class StealthUI
{
// These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision.
+1
View File
@@ -18,6 +18,7 @@ using Terraria.ModLoader;
namespace CalamityMod
{
// TODO -- Change this to a ModSystem so it does not need to be manually loaded from CalamityMod
internal class CalamityRecipes
{
private static Recipe CreateRecipe(int itemID, int stack = 1) => CalamityMod.Instance.CreateRecipe(itemID, stack);
+2
View File
@@ -13,6 +13,8 @@ using Terraria.ModLoader;
namespace CalamityMod
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
// OnModLoad is guaranteed to be run after all content has autoloaded.
public static class TileFraming
{
private static int[][] PlantCheckAgainst;
+1
View File
@@ -10,6 +10,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Waters
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class CustomLavaManagement
{
internal static List<CustomLavaStyle> CustomLavaStyles;
+1
View File
@@ -14,6 +14,7 @@ using static CalamityMod.Schematics.SchematicManager;
namespace CalamityMod.World
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public static class DraedonStructures
{
private static int[] otherModTilesToAvoid;