Merge branch '1.4.4' into Rogue_Auric_Tier_balancing
No files matched your search
@@ -256,15 +256,15 @@ namespace CalamityMod.Balancing
|
||||
// 30% resist to Dynamic Pursuer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
// 30% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.7f, AotCThrowCombo))));
|
||||
|
||||
// 25% resist to Aetherflux Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
|
||||
|
||||
// 25% resist to Murasama.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<MurasamaSlash>()))));
|
||||
|
||||
// 20% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
|
||||
|
||||
// 20% resist to Dragon Rage projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
|
||||
|
||||
@@ -330,9 +330,6 @@ namespace CalamityMod.Balancing
|
||||
// 35% resist to Anomaly's Nanogun bomb explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
|
||||
|
||||
// 30% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.7f, AotCThrowCombo))));
|
||||
|
||||
// 30% resist to Eclipse Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
@@ -348,6 +345,9 @@ namespace CalamityMod.Balancing
|
||||
// 30% resist to Prismatic Breaker's laser beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
|
||||
|
||||
// 25% resist to Dragon Rage projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
|
||||
|
||||
|
||||
@@ -230,6 +230,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int spiritOriginConvertedCrit = 0;
|
||||
public int RustyMedallionCooldown = 0;
|
||||
public float SulphWaterPoisoningLevel;
|
||||
public float holyInfernoFadeIntensity;
|
||||
public NPC unstableSelectedTarget;
|
||||
public int zapActivity = 0;
|
||||
public bool ragePulse = false;
|
||||
@@ -2230,6 +2231,7 @@ namespace CalamityMod.CalPlayer
|
||||
hideOfDeusTimer = 0;
|
||||
RustyMedallionCooldown = 0;
|
||||
SulphWaterPoisoningLevel = 0f;
|
||||
holyInfernoFadeIntensity = 0f;
|
||||
spiritOriginConvertedCrit = 0;
|
||||
rage = 0f;
|
||||
adrenaline = 0f;
|
||||
|
||||
@@ -924,8 +924,8 @@ namespace CalamityMod.CalPlayer
|
||||
providenceBurnIntensity = (Main.npc[CalamityGlobalNPC.holyBoss].ModNPC as ProvidenceBoss).CalculateBurnIntensity();
|
||||
ProvidenceBurnEffectDrawer.ParticleSpawnRate = int.MaxValue;
|
||||
|
||||
// If the burn intensity is great enough, cause the player to ignite into flames.
|
||||
if (providenceBurnIntensity > 0.45f)
|
||||
// If the player has holy inferno, cause the player to ignite into flames.
|
||||
if (hInferno)
|
||||
ProvidenceBurnEffectDrawer.ParticleSpawnRate = 1;
|
||||
|
||||
// Otherwise, if the intensity is too weak, but still present, cause the player to release holy cinders.
|
||||
@@ -936,17 +936,24 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!Main.rand.NextBool(3))
|
||||
continue;
|
||||
|
||||
Dust holyCinder = Dust.NewDustDirect(Player.position, Player.width, Player.head, (int)CalamityDusts.ProfanedFire);
|
||||
|
||||
Dust holyCinder = Dust.NewDustDirect(Player.position, Player.width, Player.height, (int)CalamityDusts.ProfanedFire);
|
||||
holyCinder.velocity = Main.rand.NextVector2Circular(3.5f, 3.5f);
|
||||
holyCinder.velocity.Y -= Main.rand.NextFloat(1f, 3f);
|
||||
holyCinder.scale = Main.rand.NextFloat(1.15f, 1.45f);
|
||||
holyCinder.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
ProvidenceBurnEffectDrawer.Update();
|
||||
|
||||
if (hInferno && holyInfernoFadeIntensity < 1f)
|
||||
{
|
||||
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity + 0.015f, 0f, 1f);
|
||||
}
|
||||
else if (!hInferno && holyInfernoFadeIntensity > 0f)
|
||||
{
|
||||
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity - 0.01f, 0f, 1f);
|
||||
}
|
||||
// Transformer immunity to Electrified
|
||||
if (transformer)
|
||||
Player.buffImmune[BuffID.Electrified] = true;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod
|
||||
public bool Afterimages { get; set; }
|
||||
|
||||
private const int MinParticleLimit = 100;
|
||||
private const float MaxParticleLimit = 1000;
|
||||
private const int MaxParticleLimit = 2000;
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
|
||||
@@ -305,9 +305,6 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:Leviathan"] = new Filter(new LevScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0.5f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:Leviathan"] = new LevSky();
|
||||
|
||||
Filters.Scene["CalamityMod:Providence"] = new Filter(new ProvScreenShaderData("FilterMiniTower").UseColor(0.45f, 0.4f, 0.2f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:Providence"] = new ProvSky();
|
||||
|
||||
Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky();
|
||||
|
||||
|
||||
@@ -179,12 +179,13 @@ namespace CalamityMod.Effects
|
||||
#endregion
|
||||
|
||||
//
|
||||
// All below shaders were added by Amber
|
||||
// Authorship goes to Toasty
|
||||
// All below shaders were added or created by Amber
|
||||
// Authorship for the PrimitiveClearShader goes to Toasty
|
||||
//
|
||||
|
||||
#region Amber's Shaders
|
||||
internal static Effect PrimitiveClearShader;
|
||||
internal static Effect HolyInfernoShader;
|
||||
#endregion
|
||||
|
||||
// Shorthand to register a loaded shader in Terraria's graphics engine
|
||||
@@ -390,6 +391,10 @@ namespace CalamityMod.Effects
|
||||
#region Loading Amber's Shaders
|
||||
PrimitiveClearShader = LoadShader("PrimitiveClearShader");
|
||||
RegisterScreenShader(PrimitiveClearShader, "AutoloadPass", "PrimitiveClearShader");
|
||||
|
||||
HolyInfernoShader = LoadShader("HolyInfernoShader");
|
||||
RegisterMiscShader(HolyInfernoShader, "InfernoPass", "HolyInfernoShader");
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
sampler diagonalNoise : register(s1);
|
||||
sampler upwardNoise : register(s2);
|
||||
sampler upwardPerlinTex : register(s3);
|
||||
|
||||
bool day;
|
||||
|
||||
float colorMult;
|
||||
float time;
|
||||
float radius;
|
||||
float maxOpacity;
|
||||
float burnIntensity;
|
||||
|
||||
float2 screenPosition;
|
||||
float2 screenSize;
|
||||
float2 anchorPoint;
|
||||
float2 playerPosition;
|
||||
|
||||
float InverseLerp(float a, float b, float t)
|
||||
{
|
||||
return saturate((t - a) / (b - a));
|
||||
}
|
||||
|
||||
float3 firePalette(float noise)
|
||||
{
|
||||
// Temperature range (in Kelvin).
|
||||
float temperature = 1500. + 1500. * noise;
|
||||
|
||||
float3 darkColor = float3(0.81, 0.45, 0.23) * colorMult;
|
||||
float3 midColor = float3(1., 0.75, 0.29) * colorMult;
|
||||
float3 brightColor = float3(1., 1., 0.95) * colorMult;
|
||||
if (!day)
|
||||
{
|
||||
darkColor.rgb = darkColor.bgr;
|
||||
midColor.rgb = midColor.bgr;
|
||||
brightColor.rgb = brightColor.bgr;
|
||||
}
|
||||
float3 fireColor;
|
||||
if (noise < 0.5)
|
||||
fireColor = lerp(darkColor, midColor, noise * 2.);
|
||||
else
|
||||
fireColor = lerp(midColor, brightColor, (noise - 0.5) * 2.);
|
||||
|
||||
fireColor = pow(fireColor, float3(5, 5, 5)) * (exp(1.43876719683e5 / (temperature * fireColor)) - 1.);
|
||||
|
||||
// Exposure level. Set to "50." For "70," change the "5" to a "7," etc.
|
||||
return 1. - exp(-1.3e8 / fireColor);
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 uv : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 worldUV = screenPosition + screenSize * uv;
|
||||
float2 provUV = anchorPoint / screenSize;
|
||||
float worldDistance = distance(worldUV, anchorPoint);
|
||||
float adjustedTime = time * 0.1;
|
||||
|
||||
// Pixelate the uvs
|
||||
float2 pixelatedUV = worldUV / screenSize;
|
||||
pixelatedUV.x -= worldUV.x % (1 / screenSize.x);
|
||||
pixelatedUV.y -= worldUV.y % (1 / (screenSize.y / 2) * 2);
|
||||
|
||||
// Sample the noise textures
|
||||
float noiseMesh1 = tex2D(upwardNoise, frac(pixelatedUV * 0.58 + float2(0, time * 0.25))).g;
|
||||
float noiseMesh2 = tex2D(upwardPerlinTex, frac(pixelatedUV * 1.57 + float2(0, time * 0.35))).g;
|
||||
float noiseMesh3 = tex2D(diagonalNoise, frac(pixelatedUV * 1.46 + float2(adjustedTime * 0.56, adjustedTime * 1.2))).g;
|
||||
float noiseMesh4 = tex2D(diagonalNoise, frac(pixelatedUV * 1.57 + float2(adjustedTime * -0.56, adjustedTime * 1.2))).g;
|
||||
float textureMesh = noiseMesh1 * 0.125 + noiseMesh2 * 0.2 + noiseMesh3 * 0.35 + noiseMesh4 * 0.35;
|
||||
|
||||
// Get the distance to the pixel from the player.
|
||||
float distToPlayer = distance(playerPosition, worldUV);
|
||||
// And get the correct opacity based on it.
|
||||
float opacity = burnIntensity;
|
||||
// Fade in quickly as the player approaches the pixels
|
||||
opacity += InverseLerp(800, 500, distToPlayer);
|
||||
|
||||
// Define the border and mix the inferno for a smooth transition
|
||||
bool border = worldDistance < radius && opacity > 0;
|
||||
float colorMult = 1;
|
||||
if (border)
|
||||
colorMult = InverseLerp(radius * 0.94, radius, worldDistance);
|
||||
opacity = clamp(opacity, 0, maxOpacity);
|
||||
// If the color multi has not been changed (not border pixel) and opacity is 0 OR it's within
|
||||
if (colorMult == 1 && (opacity == 0 || worldDistance < radius))
|
||||
return sampleColor;
|
||||
|
||||
return float4(firePalette(textureMesh), 1) * colorMult * opacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass InfernoPass
|
||||
{
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 285 KiB |
|
After Width: | Height: | Size: 325 KiB |
|
After Width: | Height: | Size: 327 KiB |
@@ -35,7 +35,7 @@ namespace CalamityMod.Graphics.Drawers
|
||||
On_Main.DrawNPCs += DrawNPCDrawers;
|
||||
On_Main.DrawProjectiles += DrawProjectileDrawers;
|
||||
On_Main.DrawPlayers_AfterProjectiles += DrawPlayerDrawers;
|
||||
On_Main.DoDraw_WallsTilesNPCs += DrawBeforeTileDrawers;
|
||||
On_Main.DrawBackgroundBlackFill += DrawBeforeTileDrawers;
|
||||
On_Main.DrawInfernoRings += DrawAfterEverythingDrawers;
|
||||
|
||||
var drawerType = typeof(BaseDrawer);
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Graphics.Drawers
|
||||
On_Main.DrawNPCs -= DrawNPCDrawers;
|
||||
On_Main.DrawProjectiles -= DrawProjectileDrawers;
|
||||
On_Main.DrawPlayers_AfterProjectiles -= DrawPlayerDrawers;
|
||||
On_Main.DoDraw_WallsTilesNPCs -= DrawBeforeTileDrawers;
|
||||
On_Main.DrawBackgroundBlackFill -= DrawBeforeTileDrawers;
|
||||
On_Main.DrawInfernoRings -= DrawAfterEverythingDrawers;
|
||||
|
||||
foreach (var drawer in Drawers)
|
||||
@@ -143,7 +143,7 @@ namespace CalamityMod.Graphics.Drawers
|
||||
Main.spriteBatch.End();
|
||||
}
|
||||
|
||||
private void DrawBeforeTileDrawers(On_Main.orig_DoDraw_WallsTilesNPCs orig, Main self)
|
||||
private void DrawBeforeTileDrawers(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
|
||||
{
|
||||
var drawers = Drawers.Where(drawer => drawer.ShouldDraw && drawer.Layer is DrawerLayer.BeforeTiles);
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ModLoader;
|
||||
using Rectangle = Microsoft.Xna.Framework.Rectangle;
|
||||
|
||||
namespace CalamityMod.Graphics.Drawers
|
||||
{
|
||||
public class HolyInfernoDrawer : BaseDrawer
|
||||
{
|
||||
#region Fields/Properties
|
||||
|
||||
public override DrawerLayer Layer => DrawerLayer.BeforeTiles;
|
||||
|
||||
public Providence Provi => (Main.npc[CalamityGlobalNPC.holyBoss].ModNPC as Providence);
|
||||
|
||||
//Should only draw if not in the main menu, provi is active and the boolean for drawing the border is true.
|
||||
public override bool ShouldDraw => !Main.gameMenu && CalamityGlobalNPC.holyBoss != -1 &&
|
||||
Main.npc[CalamityGlobalNPC.holyBoss].active && Providence.shouldDrawInfernoBorder;
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public override void DrawToTarget(SpriteBatch spriteBatch)
|
||||
{
|
||||
var npc = Main.npc[CalamityGlobalNPC.holyBoss];
|
||||
var borderDistance = Providence.borderRadius;
|
||||
if (npc.HasValidTarget)
|
||||
{
|
||||
var target = Main.player[Main.myPlayer];
|
||||
var holyInfernoIntensity = target.Calamity().holyInfernoFadeIntensity;
|
||||
|
||||
//Begin drawing the inferno
|
||||
var blackTile = TextureAssets.MagicPixel;
|
||||
var diagonalNoise = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/HarshNoise");
|
||||
var upwardPerlinNoise = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/Perlin");
|
||||
var upwardNoise = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/MeltyNoise");
|
||||
|
||||
var shader = GameShaders.Misc["CalamityMod:HolyInfernoShader"].Shader;
|
||||
shader.Parameters["colorMult"].SetValue(Main.dayTime ? 7.35f : 7.65f); //I want you to know it took considerable restraint to deliberately misspell colour.
|
||||
shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly);
|
||||
shader.Parameters["radius"].SetValue(borderDistance);
|
||||
shader.Parameters["anchorPoint"].SetValue(npc.Center);
|
||||
shader.Parameters["screenPosition"].SetValue(Main.screenPosition);
|
||||
shader.Parameters["screenSize"].SetValue(Main.ScreenSize.ToVector2());
|
||||
shader.Parameters["burnIntensity"].SetValue(holyInfernoIntensity);
|
||||
shader.Parameters["playerPosition"].SetValue(target.Center);
|
||||
shader.Parameters["maxOpacity"].SetValue(1f);
|
||||
shader.Parameters["day"].SetValue(Main.dayTime);
|
||||
|
||||
spriteBatch.GraphicsDevice.Textures[1] = diagonalNoise.Value;
|
||||
spriteBatch.GraphicsDevice.Textures[2] = upwardNoise.Value;
|
||||
spriteBatch.GraphicsDevice.Textures[3] = upwardPerlinNoise.Value;
|
||||
|
||||
//Manual end begin for the sampler state
|
||||
spriteBatch.End();
|
||||
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, SamplerState.LinearWrap, DepthStencilState.None, Main.Rasterizer, shader, Main.GameViewMatrix.TransformationMatrix);
|
||||
Rectangle rekt = new(Main.screenWidth / 2, Main.screenHeight / 2, Main.screenWidth, Main.screenHeight);
|
||||
spriteBatch.Draw(blackTile.Value, rekt, null, default, 0f, blackTile.Value.Size() * 0.5f, 0, 0f);
|
||||
//Inferno drawing complete
|
||||
spriteBatch.ExitShaderRegion();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -297,7 +297,7 @@ namespace CalamityMod.ILEditing
|
||||
self.velocity = Collision.AdvancedTileCollision(TileID.Sets.ForAdvancedCollision.ForSandshark, cPosition, self.velocity, cWidth, cHeight, fall, fall, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (self.active && self.Calamity().ShouldFallThroughPlatforms)
|
||||
fall = true;
|
||||
|
||||
|
||||
@@ -162,13 +162,22 @@ namespace CalamityMod.ILEditing
|
||||
{
|
||||
// Find the Tile ID of Meteorite and change it to something that doesn't matter.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// There are two checks for the Meteorite Tile ID. The first one is required for the switch cases to function properly, so we need to move past it.
|
||||
ILLabel label = null; // pointless label for MatchBeq
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchBeq(out label)))
|
||||
{
|
||||
LogFailure("Make Meteorite Explodable", "Could not locate the branching instruction.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(TileID.Meteorite))) // The Meteorite Tile ID check.
|
||||
{
|
||||
LogFailure("Make Meteorite Explodable", "Could not locate the Meteorite Tile ID variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_I4, TileID.HellstoneBrick); // Change to Hellstone Brick. They're made of Hellstone, so it makes sense they can't be exploded until Hardmode starts :^)
|
||||
cursor.Emit(OpCodes.Ldc_I4, TileID.HellstoneBrick); // This won't actually do anything since the ID is above Meteorite's and thus unreachable
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AscendantInsigniaHotKey);
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 46;
|
||||
Item.height = 52;
|
||||
Item.width = 42;
|
||||
Item.height = 42;
|
||||
Item.value = CalamityGlobalItem.Rarity13BuyPrice;
|
||||
Item.accessory = true;
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 1005 B |
@@ -15,6 +15,7 @@ using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using ReLogic.Utilities;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Items.Armor.DesertProwler
|
||||
{
|
||||
@@ -166,7 +167,7 @@ namespace CalamityMod.Items.Armor.DesertProwler
|
||||
|
||||
if (setBonusIndex != -1)
|
||||
{
|
||||
string dir = Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN";
|
||||
string dir = Language.GetTextValue(Main.ReversedUpDownArmorSetBonuses ? "Key.UP" : "Key.DOWN");
|
||||
TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem<DesertProwlerHat>("AbilityBrief").Format(dir));
|
||||
setBonus1.OverrideColor = Color.Lerp(new Color(255, 229, 156), new Color(233, 225, 198), 0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f));
|
||||
tooltips.Insert(setBonusIndex + 1, setBonus1);
|
||||
|
||||
@@ -10,6 +10,7 @@ using CalamityMod.Cooldowns;
|
||||
using Terraria.Audio;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria.Localization;
|
||||
using static Microsoft.Xna.Framework.Input.Keys;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -228,7 +229,7 @@ namespace CalamityMod.Items.Armor.Wulfrum
|
||||
|
||||
if (setBonusIndex != -1)
|
||||
{
|
||||
string dir = Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN";
|
||||
string dir = Language.GetTextValue(Main.ReversedUpDownArmorSetBonuses ? "Key.UP" : "Key.DOWN");
|
||||
TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem<WulfrumHat>("AbilityBrief").Format(dir));
|
||||
setBonus1.OverrideColor = Color.Lerp(new Color(194, 255, 67), new Color(112, 244, 244), 0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f));
|
||||
tooltips.Insert(setBonusIndex + 1, setBonus1);
|
||||
|
||||
@@ -797,9 +797,9 @@ namespace CalamityMod.Items
|
||||
|
||||
// Palladium
|
||||
if (item.type == ItemID.PalladiumBreastplate)
|
||||
EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.ChestplateDamagePercentageBoost + 3}% increased damage.");
|
||||
EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.ChestplateDamagePercentageBoost + 3}% increased damage");
|
||||
if (item.type == ItemID.PalladiumLeggings)
|
||||
EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.LeggingsDamagePercentageBoost + 2}% increased damage.");
|
||||
EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.LeggingsDamagePercentageBoost + 2}% increased damage");
|
||||
|
||||
// Mythril
|
||||
if (item.type == ItemID.MythrilHood)
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.DemonScythe, Do(AutoReuse, DamageExact(33)) },
|
||||
{ ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar
|
||||
{ ItemID.ElectrosphereLauncher, Do(DamageRatio(1.1f)) },
|
||||
{ ItemID.ElfMelter, Do(DamageExact(62), ShootSpeedDelta(+5f)) },
|
||||
{ ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) },
|
||||
{ ItemID.EmeraldStaff, Do(DamageExact(27)) },
|
||||
{ ItemID.EmpressBlade, Do(AutoReuse, DamageExact(60), UseExact(20)) }, // Terraprisma
|
||||
{ ItemID.EnchantedBoomerang, Do(DamageExact(24)) },
|
||||
@@ -107,7 +107,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.Flairon, Do(DamageExact(73)) },
|
||||
{ ItemID.Flamarang, Do(DamageExact(43)) },
|
||||
{ ItemID.Flamelash, Do(DamageRatio(1.25f)) },
|
||||
{ ItemID.Flamethrower, Do(ShootSpeedDelta(+3f)) },
|
||||
{ ItemID.Flamethrower, Do(DamageExact(24), ShootSpeedDelta(+3f)) },
|
||||
{ ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(30), DamageExact(70), ShootSpeedExact(14)) },
|
||||
{ ItemID.FlyingKnife, Do(DamageExact(70)) },
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 15;
|
||||
Item.damage = 18;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 42;
|
||||
Item.height = 38;
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
{
|
||||
"Fabsol, the mod's founder and owner", // Fabsol gets a line to himself
|
||||
"Altix",
|
||||
"Angel",
|
||||
"apotofkoolaid",
|
||||
"AquaSG",
|
||||
"Atalya",
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Tools
|
||||
Item.axe = 100 / 5;
|
||||
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.width = 36;
|
||||
Item.height = 36;
|
||||
Item.width = 50;
|
||||
Item.height = 46;
|
||||
Item.scale = 1.5f;
|
||||
Item.useTurn = true;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
|
||||
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 598 B |
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 250;
|
||||
Item.damage = 300;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 20;
|
||||
Item.width = 58;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public static float MaxThrowReach = 650;
|
||||
public static float snapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
|
||||
|
||||
public static float chargeDamageMultiplier = 1.2f; //Extra damage from charge
|
||||
public static float chargeDamageMultiplier = 1.4f; //Extra damage from charge
|
||||
public static float chainDamageMultiplier = 0.1f;
|
||||
|
||||
public static int DashIframes = 10;
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = Item.height = 136;
|
||||
Item.damage = 1770;
|
||||
Item.damage = 1700;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 49;
|
||||
Item.damage = 74;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 30;
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 3;
|
||||
Item.damage = 4;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 30;
|
||||
Item.height = 44;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
Item.useTime = 22;
|
||||
Item.useAnimation = 22;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 2.2f;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly SoundStyle Nanomachines = new("CalamityMod/Sounds/Item/NanoSwarm") { PitchVariance = 0.45f, Volume = 0.4f };
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 58;
|
||||
Item.damage = 52;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 76;
|
||||
Item.height = 36;
|
||||
|
||||
@@ -19,12 +19,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public bool shotReturn = false;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 185;
|
||||
Item.damage = 115;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 60;
|
||||
Item.height = 30;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 20;
|
||||
Item.useAnimation = 25;
|
||||
Item.autoReuse = true;
|
||||
Item.UseSound = Heartbeat;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 240;
|
||||
Item.damage = 290;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 108;
|
||||
Item.height = 38;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly SoundStyle Explosion = new("CalamityMod/Sounds/Item/DeadSunExplosion") { Volume = 0.5f };
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 182;
|
||||
Item.damage = 100;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 70;
|
||||
Item.height = 24;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 83;
|
||||
Item.damage = 94;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 64;
|
||||
Item.height = 34;
|
||||
|
||||
@@ -14,15 +14,21 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.6f };
|
||||
public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.5f };
|
||||
public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.68f };
|
||||
public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.75f };
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 1205;
|
||||
Item.damage = 444;
|
||||
Item.knockBack = 5.5f;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = Item.useAnimation = 39;
|
||||
|
||||
// Burst of 5, one every 5 frames for 25 total. Cooldown of 39 frames.
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 25;
|
||||
Item.reuseDelay = 39;
|
||||
Item.useLimitPerAnimation = 5;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useAmmo = AmmoID.Gel;
|
||||
Item.shootSpeed = 12f;
|
||||
Item.shoot = ModContent.ProjectileType<HalleysComet>();
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.width = 208;
|
||||
Item.height = 66;
|
||||
|
||||
Item.damage = 118;
|
||||
Item.damage = 445;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = Item.useAnimation = LightBombCooldown;
|
||||
Item.shootSpeed = 6f;
|
||||
@@ -65,7 +65,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
// Only one out at a time
|
||||
if (Main.projectile.Any(n => n.active && n.type == Item.shoot && n.owner == player.whoAmI))
|
||||
return;
|
||||
Projectile.NewProjectile(Item.GetSource_FromThis(), player.Center, Vector2.Zero, Item.shoot, 0, 0f, player.whoAmI);
|
||||
// If you don't have any Gel don't even spawn the holdout
|
||||
if (!player.HasAmmo(Item))
|
||||
return;
|
||||
|
||||
var source = player.GetSource_ItemUse_WithPotentialAmmo(Item, ItemID.Gel);
|
||||
Projectile.NewProjectile(source, player.Center, Vector2.Zero, Item.shoot, 0, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public int frameCounter = 0;
|
||||
public int frame = 0;
|
||||
public static int BaseDamage = 70;
|
||||
public static int BaseDamage = 80;
|
||||
public bool Trail = true;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 58;
|
||||
Item.damage = 78;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 68;
|
||||
Item.height = 22;
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.damage = 225;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 43;
|
||||
Item.useAnimation = 37;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 43;
|
||||
Item.useTime = 37;
|
||||
Item.knockBack = 9f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -13,10 +13,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 82;
|
||||
Item.height = 82;
|
||||
Item.damage = 16;
|
||||
Item.damage = 12;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 24;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = Item.useAnimation = 24;
|
||||
Item.knockBack = 3.5f;
|
||||
@@ -29,6 +28,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 0.65f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
Item.damage = 450;
|
||||
Item.damage = 240;
|
||||
Item.noMelee = true;
|
||||
Item.consumable = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.damage = 50;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 45;
|
||||
Item.useAnimation = 40;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 45;
|
||||
Item.useTime = 40;
|
||||
Item.knockBack = 2f;
|
||||
Item.UseSound = ThrowSound;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public float Knockback = 2f;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 8;
|
||||
Item.damage = 10;
|
||||
Item.mana = 10;
|
||||
Item.width = Item.height = 44;
|
||||
Item.useTime = Item.useAnimation = 32;
|
||||
|
||||
@@ -240,7 +240,6 @@ AsgardianAegis: {
|
||||
Immune to most debuffs
|
||||
+40 max life and +0.5 HP/s life regen
|
||||
Grants a cosmic inferno dash which can slam through enemies without taking damage
|
||||
Can be used to ram enemies
|
||||
+20 defense while submerged in liquid
|
||||
'''
|
||||
}
|
||||
@@ -664,7 +663,6 @@ ElysianAegis: {
|
||||
Grants immunity to knockback and the Burning, On Fire!, and Holy Flames debuffs
|
||||
+30 max life
|
||||
Grants an enhanced holy flame dash which can slam through enemies without taking damage
|
||||
Can be used to ram enemies
|
||||
Blessed by the Profaned Flame
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ ElementalEruption: {
|
||||
DisplayName: Elemental Eruption
|
||||
Tooltip:
|
||||
'''
|
||||
Charge and then spew rainbow flames and pairs of high-energy homing flares
|
||||
Charges up to spew rainbow flames and pairs of homing elemental flares
|
||||
Uses gel for ammo
|
||||
70% chance to save ammo
|
||||
'''
|
||||
@@ -563,7 +563,7 @@ HalleysInferno: {
|
||||
DisplayName: Halley's Inferno
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a highly concentrated shot of lunar fire
|
||||
Fires a burst of intensely concentrated lunar fire jets
|
||||
Press <right> to zoom out
|
||||
Uses gel for ammo
|
||||
50% chance to save ammo
|
||||
@@ -580,7 +580,7 @@ HavocsBreath: {
|
||||
DisplayName: Havoc's Breath
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a cone of scorching brimstone fire
|
||||
Projects cone-shaped blasts of scorching brimstone fire
|
||||
Uses gel for ammo
|
||||
'''
|
||||
}
|
||||
@@ -881,8 +881,8 @@ Photoviscerator: {
|
||||
DisplayName: Photoviscerator
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a stream of exo flames and light that explodes into homing sparks
|
||||
Press <right> to fire homing flares which stick to enemies and incinerate them
|
||||
Emits a continuous beam of exo radiation that disintegrates everything
|
||||
Press <right> to fire homing exo flares which stick to and incinerate enemies
|
||||
Uses gel for ammo
|
||||
95% chance to save ammo
|
||||
'''
|
||||
@@ -1212,7 +1212,7 @@ TerraFlameburster: {
|
||||
DisplayName: Terra Flameburster
|
||||
Tooltip:
|
||||
'''
|
||||
Charge and then spew high-energy flames and pairs of homing flares
|
||||
Charges up to emit a stream of energized flames and pairs of homing terra flares
|
||||
Uses gel for ammo
|
||||
50% chance to save ammo
|
||||
'''
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float mistVelocity = death ? 10f : 8f;
|
||||
Vector2 projectileVelocity = Vector2.Normalize(npc.Center + npc.velocity * 10f - npc.Center);
|
||||
Vector2 projectileVelocity = (npc.Center + npc.velocity * 10f - npc.Center).SafeNormalize(Vector2.UnitY);
|
||||
int type = ModContent.ProjectileType<SulphuricAcidMist>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 5f, projectileVelocity * mistVelocity, type, damage, 0f, Main.myPlayer);
|
||||
@@ -172,7 +172,7 @@ namespace CalamityMod.NPCs
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(vector255) * 5f, vector255, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ namespace CalamityMod.NPCs
|
||||
// Velocity boost
|
||||
if (calamityGlobalNPC.newAI[3] == spiralGateValue)
|
||||
{
|
||||
npc.velocity.Normalize();
|
||||
npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY);
|
||||
npc.velocity *= 24f;
|
||||
}
|
||||
|
||||
@@ -283,14 +283,14 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < totalProjectiles; i++)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
velocity.Normalize();
|
||||
velocity = velocity.SafeNormalize(Vector2.UnitY);
|
||||
velocity *= Main.rand.Next(phase3 ? 300 : 100, 401) * 0.01f;
|
||||
|
||||
float maximumVelocityMult = death ? 0.75f : 0.5f;
|
||||
if (expertMode)
|
||||
velocity *= 1f + (maximumVelocityMult * (0.5f - lifeRatio));
|
||||
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(velocity) * 5f, velocity, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + velocity.SafeNormalize(Vector2.UnitY) * 5f, velocity, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -319,7 +319,7 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float toothVelocity = death ? 9f : 8f;
|
||||
Vector2 projectileVelocity = Vector2.Normalize(player.Center - npc.Center);
|
||||
Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY);
|
||||
int type = ModContent.ProjectileType<SandTooth>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
float accelerate = phase4 ? 1f : 0f;
|
||||
@@ -467,12 +467,12 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (scourgeSpeed > scourgeHigherSpeed)
|
||||
{
|
||||
npc.velocity.Normalize();
|
||||
npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY);
|
||||
npc.velocity *= scourgeHigherSpeed;
|
||||
}
|
||||
else if (scourgeSpeed < scourgeLowerSpeed)
|
||||
{
|
||||
npc.velocity.Normalize();
|
||||
npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY);
|
||||
npc.velocity *= scourgeLowerSpeed;
|
||||
}
|
||||
}
|
||||
@@ -984,11 +984,11 @@ namespace CalamityMod.NPCs
|
||||
type = ModContent.ProjectileType<FrostMist>();
|
||||
SoundEngine.PlaySound(SoundID.Item30, player.Center);
|
||||
}
|
||||
Vector2 projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * velocity;
|
||||
Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(projectileVelocity) * 5f, projectileVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 5f, projectileVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y);
|
||||
Main.projectile[proj].timeLeft = 240;
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
@@ -1004,7 +1004,7 @@ namespace CalamityMod.NPCs
|
||||
type = ModContent.ProjectileType<WaterSpear>();
|
||||
SoundEngine.PlaySound(SoundID.Item21, player.Center);
|
||||
}
|
||||
projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * velocity;
|
||||
projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity;
|
||||
int numProj = death ? 8 : 4;
|
||||
int spread = death ? 90 : 45;
|
||||
if (Main.getGoodWorld)
|
||||
@@ -1019,7 +1019,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1)));
|
||||
int proj2 = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(perturbedSpeed) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
int proj2 = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
Main.projectile[proj2].extraUpdates += 1;
|
||||
}
|
||||
@@ -1063,10 +1063,10 @@ namespace CalamityMod.NPCs
|
||||
float radialOffset = 0.2f;
|
||||
float diameter = 80f;
|
||||
|
||||
projectileVelocity = Vector2.Normalize(projectileVelocity) * projectileSpeed;
|
||||
projectileVelocity = projectileVelocity.SafeNormalize(Vector2.UnitY) * projectileSpeed;
|
||||
|
||||
Vector2 velocity = projectileVelocity;
|
||||
velocity.Normalize();
|
||||
velocity = velocity.SafeNormalize(Vector2.UnitY);
|
||||
velocity *= diameter;
|
||||
|
||||
int totalProjectiles = 6;
|
||||
@@ -1107,7 +1107,7 @@ namespace CalamityMod.NPCs
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(vector255) * 5f, vector255, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
}
|
||||
@@ -1118,7 +1118,7 @@ namespace CalamityMod.NPCs
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(vector255) * 5f, vector255 * 0.75f, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255 * 0.75f, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
}
|
||||
@@ -1158,13 +1158,13 @@ namespace CalamityMod.NPCs
|
||||
Vector2 aimAt = player.Center + player.velocity * 20f;
|
||||
float aimResponsiveness = bossRush ? 0.05f : (npc.ai[2] == 1f || death) ? 0.1f : 0.25f;
|
||||
|
||||
Vector2 aimVector = Vector2.Normalize(aimAt - source);
|
||||
Vector2 aimVector = (aimAt - source).SafeNormalize(Vector2.UnitY);
|
||||
if (aimVector.HasNaNs())
|
||||
aimVector = -Vector2.UnitY;
|
||||
aimVector = Vector2.Normalize(Vector2.Lerp(aimVector, Vector2.Normalize(npc.velocity), aimResponsiveness));
|
||||
aimVector = (Vector2.Lerp(aimVector, npc.velocity.SafeNormalize(Vector2.UnitY), aimResponsiveness)).SafeNormalize(Vector2.UnitY);
|
||||
aimVector *= 6f;
|
||||
|
||||
Vector2 laserVelocity = Vector2.Normalize(aimVector);
|
||||
Vector2 laserVelocity = aimVector.SafeNormalize(Vector2.UnitY);
|
||||
if (laserVelocity.HasNaNs())
|
||||
laserVelocity = -Vector2.UnitY;
|
||||
|
||||
@@ -1203,7 +1203,7 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 laserVelocity2 = new Vector2(npc.localAI[0], npc.localAI[1]);
|
||||
laserVelocity2.Normalize();
|
||||
laserVelocity2 = laserVelocity2.SafeNormalize(Vector2.UnitY);
|
||||
int type = ModContent.ProjectileType<BrimstoneRay>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
|
||||
|
||||
@@ -1783,12 +1783,15 @@ namespace CalamityMod.NPCs
|
||||
// First kill: Notify of Abyss chests being unlocked.
|
||||
if (!NPC.downedBoss3)
|
||||
{
|
||||
// Abyss chest auto unlock has been shelved, the bug has still not fucking died despite several attempts to fix it.
|
||||
// Commented it out just in case someone is willing to fix it in the future - Shade
|
||||
/*
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient) //Only the server should do this to prevent already unlocked chests from attempting to be unlocked
|
||||
{
|
||||
World.Abyss.AbleToUnlockChests = true;
|
||||
World.Abyss.UnlockAllAbyssChests();
|
||||
}
|
||||
|
||||
*/
|
||||
string keysk = "Mods.CalamityMod.Status.Progression.SkeletronAbyssChestNotification";
|
||||
CalamityUtils.DisplayLocalizedText(keysk, new Color(76, 181, 76));
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
SoundEngine.PlaySound(SoundID.Item12, player.Center);
|
||||
float maxProjectileVelocity = bossRush ? 20f : death ? 16f : revenge ? 14.25f : expertMode ? 13.5f : 12f;
|
||||
float maxProjectileVelocity = bossRush ? 24f : death ? 20f : revenge ? 18.25f : expertMode ? 17.5f : 16f;
|
||||
float minProjectileVelocity = maxProjectileVelocity * 0.25f;
|
||||
float projectileVelocity = MathHelper.Clamp(Vector2.Distance(player.Center, NPC.Center) * 0.01f, minProjectileVelocity, maxProjectileVelocity);
|
||||
Vector2 velocityVector = Vector2.Normalize(player.Center - NPC.Center) * projectileVelocity;
|
||||
@@ -257,7 +257,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.TargetClosest();
|
||||
SoundEngine.PlaySound(SoundID.Item12, player.Center);
|
||||
NPC.localAI[0] = 0f;
|
||||
float maxProjectileVelocity = bossRush ? 18f : death ? 14f : revenge ? 12.25f : expertMode ? 11.5f : 10f;
|
||||
float maxProjectileVelocity = bossRush ? 22f : death ? 18f : revenge ? 16.25f : expertMode ? 15.5f : 14f;
|
||||
float minProjectileVelocity = maxProjectileVelocity * 0.25f;
|
||||
float projectileVelocity = MathHelper.Clamp(Vector2.Distance(player.Center, NPC.Center) * 0.01f, minProjectileVelocity, maxProjectileVelocity);
|
||||
Vector2 velocityVector = Vector2.Normalize(player.Center - NPC.Center) * projectileVelocity;
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.Providence
|
||||
{
|
||||
public class ProvScreenShaderData : ScreenShaderData
|
||||
{
|
||||
private int ProvIndex;
|
||||
|
||||
public ProvScreenShaderData(string passName)
|
||||
: base(passName)
|
||||
{
|
||||
}
|
||||
|
||||
private void UpdatePIndex()
|
||||
{
|
||||
int ProvType = ModContent.NPCType<Providence>();
|
||||
if (ProvIndex >= 0 && Main.npc[ProvIndex].active && Main.npc[ProvIndex].type == ProvType)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ProvIndex = -1;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == ProvType)
|
||||
{
|
||||
ProvIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (ProvIndex == -1)
|
||||
{
|
||||
UpdatePIndex();
|
||||
if (ProvIndex == -1)
|
||||
Filters.Scene["CalamityMod:Providence"].Deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply()
|
||||
{
|
||||
UpdatePIndex();
|
||||
if (ProvIndex != -1)
|
||||
{
|
||||
UseTargetPosition(Main.npc[ProvIndex].Center);
|
||||
}
|
||||
base.Apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.Providence
|
||||
{
|
||||
public class ProvSky : CustomSky
|
||||
{
|
||||
private bool isActive = false;
|
||||
private float intensity = 0f;
|
||||
private int ProvIndex = -1;
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (ProvIndex == -1)
|
||||
{
|
||||
UpdatePIndex();
|
||||
if (ProvIndex == -1)
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
if (isActive && intensity < 1f)
|
||||
{
|
||||
intensity += 0.01f;
|
||||
}
|
||||
else if (!isActive && intensity > 0f)
|
||||
{
|
||||
intensity -= 0.01f;
|
||||
}
|
||||
}
|
||||
|
||||
private float GetIntensity()
|
||||
{
|
||||
if (UpdatePIndex())
|
||||
{
|
||||
float x = 0f;
|
||||
if (ProvIndex != -1)
|
||||
x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[ProvIndex].Center);
|
||||
|
||||
float spawnAnimationTimer = 180f;
|
||||
float intensityScalar = 0.25f;
|
||||
if (Main.npc[ProvIndex].Calamity().newAI[3] < spawnAnimationTimer)
|
||||
intensityScalar = MathHelper.Lerp(0f, intensityScalar, Main.npc[ProvIndex].Calamity().newAI[3] / spawnAnimationTimer);
|
||||
|
||||
return (Main.player[Main.myPlayer].HasBuff(ModContent.BuffType<HolyInferno>()) ? 0.75f : (1f - Utils.SmoothStep(3000f, 6000f, x)) * intensityScalar);
|
||||
}
|
||||
return 0f;
|
||||
}
|
||||
|
||||
public override Color OnTileColor(Color inColor)
|
||||
{
|
||||
float intensity = GetIntensity();
|
||||
return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity));
|
||||
}
|
||||
|
||||
private bool UpdatePIndex()
|
||||
{
|
||||
int ProvType = ModContent.NPCType<Providence>();
|
||||
if (ProvIndex >= 0 && Main.npc[ProvIndex].active && Main.npc[ProvIndex].type == ProvType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
ProvIndex = -1;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == ProvType)
|
||||
{
|
||||
ProvIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ProvIndex != -1;
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
|
||||
{
|
||||
if (maxDepth >= 0 && minDepth < 0)
|
||||
{
|
||||
float intensity = GetIntensity();
|
||||
Color color = Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : Main.dayTime ? new Color(255, 200, 100) : new Color(100, 150, 255);
|
||||
spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color * intensity);
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetCloudAlpha()
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
|
||||
public override void Activate(Vector2 position, params object[] args)
|
||||
{
|
||||
isActive = true;
|
||||
}
|
||||
|
||||
public override void Deactivate(params object[] args)
|
||||
{
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
public override bool IsActive()
|
||||
{
|
||||
return isActive || intensity > 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,11 +37,9 @@ using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Bestiary;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.UI;
|
||||
using Filters = Terraria.Graphics.Effects.Filters;
|
||||
|
||||
namespace CalamityMod.NPCs.Providence
|
||||
@@ -89,10 +87,12 @@ namespace CalamityMod.NPCs.Providence
|
||||
private int phaseChange = 0;
|
||||
private int frameUsed = 0;
|
||||
private int healTimer = 0;
|
||||
internal bool challenge = Main.expertMode/* && Main.netMode == NetmodeID.SinglePlayer*/; //Used to determine if Profaned Soul Crystal should drop, couldn't figure out mp mems always dropping it so challenge is singleplayer only.
|
||||
internal bool challenge = Main.expertMode; //Used to determine if Profaned Soul Crystal should drop, couldn't figure out mp mems always dropping it so challenge is singleplayer only.
|
||||
internal bool hasTakenDaytimeDamage = false;
|
||||
public static bool shouldDrawInfernoBorder = true; //This is only here for other mods to disable it if they don't want it drawing.
|
||||
public bool Dying = false;
|
||||
public int DeathAnimationTimer;
|
||||
public static float borderRadius = 3000f;
|
||||
|
||||
//Sounds
|
||||
public static readonly SoundStyle SpawnSound = new("CalamityMod/Sounds/Custom/Providence/ProvidenceSpawn") { Volume = 1.2f };
|
||||
@@ -190,6 +190,8 @@ namespace CalamityMod.NPCs.Providence
|
||||
writer.Write(SoundWarningLevel);
|
||||
writer.Write(Dying);
|
||||
writer.Write(DeathAnimationTimer);
|
||||
writer.Write(borderRadius);
|
||||
writer.Write(shouldDrawInfernoBorder);
|
||||
for (int i = 0; i < 4; i++)
|
||||
writer.Write(NPC.Calamity().newAI[i]);
|
||||
}
|
||||
@@ -215,6 +217,9 @@ namespace CalamityMod.NPCs.Providence
|
||||
SoundWarningLevel = reader.ReadSingle();
|
||||
Dying = reader.ReadBoolean();
|
||||
DeathAnimationTimer = reader.ReadInt32();
|
||||
borderRadius = reader.ReadSingle();
|
||||
shouldDrawInfernoBorder = reader.ReadBoolean();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
NPC.Calamity().newAI[i] = reader.ReadSingle();
|
||||
|
||||
@@ -228,6 +233,10 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
// Set the border drawing to true if it isn't set to true
|
||||
// Can happen when another mod sets to false for a difficulty and that difficulty is then toggled off.
|
||||
shouldDrawInfernoBorder = true;
|
||||
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
// whoAmI variable for Guardians and other things
|
||||
@@ -370,7 +379,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
float distanceX = Math.Abs(NPC.Center.X - player.Center.X);
|
||||
|
||||
// Inflict Holy Inferno if target is too far away
|
||||
float burnIntensity = CalculateBurnIntensity();
|
||||
float burnIntensity = CalculateBurnIntensity(attackDelayAfterCocoon);
|
||||
|
||||
if (!player.dead && player.active && !player.creativeGodMode && !Dying)
|
||||
{
|
||||
@@ -1809,7 +1818,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
}
|
||||
|
||||
public float CalculateBurnIntensity()
|
||||
public float CalculateBurnIntensity(float attackDelayAfterCocoon = 1f)
|
||||
{
|
||||
float distanceToTarget = Vector2.Distance(Main.player[NPC.target].Center, NPC.Center);
|
||||
float aiTimer = NPC.ai[3];
|
||||
@@ -1826,6 +1835,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
if (CalamityGlobalNPC.holyBossAttacker != -1 && Main.npc[CalamityGlobalNPC.holyBossAttacker].active)
|
||||
guardianAlive = true;
|
||||
|
||||
|
||||
if (CalamityGlobalNPC.holyBossDefender != -1 && Main.npc[CalamityGlobalNPC.holyBossDefender].active)
|
||||
guardianAlive = true;
|
||||
|
||||
@@ -1838,16 +1848,23 @@ namespace CalamityMod.NPCs.Providence
|
||||
// It is determined based on how much time has elapsed during the attack thus far, specifically for the two cocoon attacks.
|
||||
// This shave-off does not happen when guardians are present.
|
||||
float shorterDistanceFade = Utils.GetLerpValue(0f, 120f, aiTimer, true);
|
||||
|
||||
//Distance does not get shorter if in GFB / Guardians are alive
|
||||
if (!guardianAlive && NPC.localAI[1] < (float)BossMode.Red)
|
||||
{
|
||||
maxDistance = baseDistance;
|
||||
if (AIState == (int)Phase.FlameCocoon || AIState == (int)Phase.SpearCocoon)
|
||||
maxDistance -= shorterDistance * shorterDistanceFade;
|
||||
else if (attackDelayAfterCocoon > 1f)
|
||||
maxDistance -= shorterDistance * (NPC.localAI[2] / attackDelayAfterCocoon);
|
||||
}
|
||||
|
||||
float drawFireDistanceStart = maxDistance - 800f;
|
||||
return Utils.GetLerpValue(drawFireDistanceStart, maxDistance, distanceToTarget, true);
|
||||
float previousBorderEnd = borderRadius;
|
||||
float clampedDistance = MathHelper.Clamp(maxDistance, previousBorderEnd - 10, previousBorderEnd + 10);
|
||||
// Only set the border distance if it's not called from playermisceffects, that way it has mod compatability
|
||||
borderRadius = clampedDistance;
|
||||
return Utils.GetLerpValue(drawFireDistanceStart, clampedDistance, distanceToTarget, true);
|
||||
}
|
||||
|
||||
private void DespawnSpecificProjectiles(bool dying = false)
|
||||
@@ -2341,7 +2358,6 @@ namespace CalamityMod.NPCs.Providence
|
||||
Vector2 pos = NPC.Center + NPC.gfxOffY * Vector2.UnitY - Main.screenPosition;
|
||||
Main.spriteBatch.Draw(heatTex, shieldDrawPos, null, Color.White, 0, heatTex.Size() / 2f, shieldScale * scaleMult * 0.5f, 0, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.FairyQueenRangedItemShot, Do(PiercingExact(7), ExtraUpdatesExact(1)) }, // Eventide Convert
|
||||
{ ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(400)) },
|
||||
{ ProjectileID.Flamarang, Do(ExtraUpdatesExact(2)) },
|
||||
{ ProjectileID.Flames, Do(IDStaticIFrames(5)) }, // Flamethrower AND Elf Melter flames
|
||||
{ ProjectileID.FlamingJack, Do(ExtraUpdatesExact(1)) },
|
||||
{ ProjectileID.FlowerPetal, Do(MaxUpdatesExact(4), LocalIFrames(10)) }, // Orichalcum armor
|
||||
{ ProjectileID.FlowerPow, Do(ExtraUpdatesExact(1)) },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 1.15);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 1.15);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -432,13 +432,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Combo == 3f)
|
||||
{
|
||||
SoundEngine.PlaySound(CommonCalamitySounds.ScissorGuillotineSnapSound with { Volume =CommonCalamitySounds.ScissorGuillotineSnapSound.Volume * 1.3f }, Projectile.Center);
|
||||
|
||||
if (Charge <= 1)
|
||||
{
|
||||
ArkoftheCosmos sword = (Owner.HeldItem.ModItem as ArkoftheCosmos);
|
||||
if (sword != null)
|
||||
sword.Charge = 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
// This is all copied straight from PwnagehammerEcho with some minor edits.
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 78;
|
||||
Projectile.height = 78;
|
||||
Projectile.width = 74;
|
||||
Projectile.height = 76;
|
||||
Projectile.aiStyle = 0;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.MeleeNoSpeed;
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -269,7 +269,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using CalamityMod.Buffs.Pets;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
public class MiniHiveMind : ModProjectile, ILocalizedModType
|
||||
@@ -76,7 +78,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
playerVec.Normalize();
|
||||
Projectile.velocity = playerVec * 8f;
|
||||
charging = 50;
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar with { Volume = SoundID.ForceRoar.Volume * 0.5f }, Projectile.Center);
|
||||
SoundEngine.PlaySound(HiveMind.FastRoarSound with { Volume = SoundID.ForceRoar.Volume * 0.5f }, Projectile.Center);
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public static int FramesPerLoad = 13;
|
||||
public static int MaxLoadableShots = 15;
|
||||
public static float BulletSpeed = 12f;
|
||||
public int Time = 0;
|
||||
|
||||
private Player Owner => Main.player[Projectile.owner];
|
||||
public SlotId NovaChargeSlot;
|
||||
@@ -43,6 +44,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
if (Owner.dead) // destroy the holdout if the player dies
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -214,11 +221,17 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 40f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
if (Projectile.velocity != oldVelocity)
|
||||
{
|
||||
Projectile.netSpam = 0;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
Projectile.Center = armPosition + Projectile.velocity * MathHelper.Clamp(30f - ShootRecoilTimer, 0f, 30f) + new Vector2 (0, 7);
|
||||
Vector2 shootOffset = Projectile.velocity * MathHelper.Clamp(30f - ShootRecoilTimer, 0f, 30f) + new Vector2(0, 7);
|
||||
Projectile.Center = armPosition + shootOffset;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f);
|
||||
Projectile.spriteDirection = Projectile.direction;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.timeLeft = Lifetime;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 8;
|
||||
Projectile.idStaticNPCHitCooldown = 6;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -130,7 +130,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.88f); // 12% damage nerf for every enemy hit
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.85f); // 15% damage nerf for every enemy hit
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.MaxUpdates = 10;
|
||||
Projectile.timeLeft = 15 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 27 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
SoundEngine.PlaySound(DeadSunsWind.Explosion with { Pitch = HitCount * 0.05f }, Projectile.Center);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<DeadSunExplosion>(), Projectile.damage / 2, 4f, Projectile.owner, HitCount * 10, BounceHits > 0f ? 5 : 0);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<DeadSunExplosion>(), (int)(Projectile.damage * 1.5f), 4f, Projectile.owner, HitCount * 10, BounceHits > 0f ? 5 : 0);
|
||||
if (HitCount >= 15)
|
||||
HitCount = 6;
|
||||
else
|
||||
@@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile.timeLeft = 15 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 27 * Projectile.MaxUpdates;
|
||||
float numberOflines = 5;
|
||||
float rotFactorlines = 360f / numberOflines;
|
||||
for (int i = 0; i < numberOflines; i++)
|
||||
@@ -105,18 +105,18 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
AltSparkParticle spark = new AltSparkParticle(Projectile.Center + offset, velOffset, false, 20, Main.rand.NextFloat(1.9f, 2.3f), Color.Black);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
float numberOfDusts = 25;
|
||||
float numberOfDusts = 12;
|
||||
float rotFactor = 360f / numberOfDusts;
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f));
|
||||
Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 156 : 191, new Vector2(velOffset.X, velOffset.Y));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, 66, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.noLight = dust.type == 191 ? true : false;
|
||||
dust.velocity = dust.type == 191 ? velOffset * 2.5f : velOffset;
|
||||
dust.scale = dust.type == 191 ? Main.rand.NextFloat(0.9f, 1.9f) : Main.rand.NextFloat(2.6f, 3.2f);
|
||||
dust.velocity = velOffset;
|
||||
dust.scale = Main.rand.NextFloat(1.6f, 2.2f);
|
||||
dust.color = InnerColor;
|
||||
}
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, InnerColor, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (BounceHits * 0.25f), 25);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
@@ -186,7 +186,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.ai[1] == 1 ? 4 : Projectile.width + Time * 0.1f, targetHitbox);
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.89f); // 11% damage nerf for every enemy hit
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.89f); // 11% damage nerf for every enemy hit
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
private ref int ShotDelay => ref Owner.ActiveItem().useTime; // 6
|
||||
public int ShotCooldown;
|
||||
public int FireBlobs = 0;
|
||||
public int Time = 0;
|
||||
private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed;
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -38,6 +39,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
if (Owner.dead || ShotsFired >= 24) // destroy the holdout if the player dies or is out of shots
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -119,9 +126,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 35f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
if (Projectile.velocity != oldVelocity)
|
||||
{
|
||||
Projectile.netSpam = 0;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
Projectile.Center = armPosition + Projectile.velocity * 20;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f);
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.timeLeft = Lifetime * Projectile.MaxUpdates;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.penetrate = 7;
|
||||
Projectile.MaxUpdates = 4;
|
||||
Projectile.timeLeft = Lifetime; // 24 effectively
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
@@ -86,7 +86,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 360);
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.75f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D fire = ModContent.Request<Texture2D>(Texture).Value;
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.MaxUpdates = 180;
|
||||
Projectile.timeLeft = 240;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 6;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (audioCooldown == 0)
|
||||
{
|
||||
SoundEngine.PlaySound(Photoviscerator.HitSound, target.Center);
|
||||
audioCooldown = 6;
|
||||
audioCooldown = 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
@@ -20,10 +19,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public Color sparkColor;
|
||||
public bool PostTileHit = false;
|
||||
public ref int audioCooldown => ref Main.player[Projectile.owner].Calamity().PhotoAudioCooldown;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.NeedsUUID[Projectile.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -32,11 +27,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = 20;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 6;
|
||||
Projectile.localNPCHitCooldown = 22;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.timeLeft = 420;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -53,10 +48,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
PhotoMetaball2.SpawnParticle(Projectile.Center, 85);
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 600f, 12f, 20f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
float numberOflines = 2;
|
||||
float numberOflines = 5;
|
||||
float rotFactorlines = 360f / numberOflines;
|
||||
for (int i = 0; i < numberOflines; i++)
|
||||
{
|
||||
@@ -76,9 +72,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (audioCooldown == 0)
|
||||
{
|
||||
SoundEngine.PlaySound(Photoviscerator.HitSound, target.Center);
|
||||
audioCooldown = 6;
|
||||
audioCooldown = 10;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
if (!PostTileHit)
|
||||
@@ -116,6 +113,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
|
||||
@@ -17,13 +17,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 12;
|
||||
Projectile.width = Projectile.height = 32;
|
||||
Projectile.friendly = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.MaxUpdates = 10;
|
||||
Projectile.timeLeft = 15 * Projectile.MaxUpdates;
|
||||
Projectile.MaxUpdates = 15;
|
||||
Projectile.timeLeft = 20 * Projectile.MaxUpdates;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
@@ -32,13 +33,25 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Projectile.rotation = Projectile.velocity.ToRotation();
|
||||
Time++;
|
||||
if (Time > 6f)
|
||||
|
||||
// Render the needle beam as a pair of severely stretched spark particles.
|
||||
// This has to be done only on specific extra updates or it'll instantly overload the particle limit.
|
||||
bool isDrawingUpdate = Projectile.numUpdates % 3 == 0;
|
||||
if (Time > 6f && isDrawingUpdate)
|
||||
{
|
||||
SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1.9f, Color.MediumBlue);
|
||||
Color outerSparkColor = new Color(8, 35, 156);
|
||||
float scaleBoost = MathHelper.Clamp(Time * 0.005f, 0f, 2f);
|
||||
float outerSparkScale = 3.2f + scaleBoost;
|
||||
SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity, false, 7, outerSparkScale, outerSparkColor);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1f, Color.Aqua);
|
||||
|
||||
Color innerSparkColor = new Color(184, 215, 245);
|
||||
float innerSparkScale = 1.6f + scaleBoost;
|
||||
SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 7, innerSparkScale, innerSparkColor);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
|
||||
// 5th update: Spawn two pulse rings and some dust as firing vfx
|
||||
else if (Time == 5f)
|
||||
{
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.rotation, 0.2f, 0.03f, 20);
|
||||
@@ -58,14 +71,17 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
}
|
||||
|
||||
Lighting.AddLight(Projectile.Center, Color.MediumBlue.ToVector3() * 0.4f);
|
||||
if (Projectile.FinalExtraUpdate())
|
||||
Lighting.AddLight(Projectile.Center, Color.MediumBlue.ToVector3() * 0.4f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Nightwither>(), 450);
|
||||
SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center);
|
||||
for (int i = 0; i <= 13; i++)
|
||||
|
||||
// Dust emission on hit
|
||||
for (int i = 0; i < 14; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity);
|
||||
dust.scale = Main.rand.NextFloat(1.1f, 1.9f);
|
||||
@@ -77,6 +93,16 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Nightwither>(), 450);
|
||||
SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center);
|
||||
|
||||
// Dust emission on hit
|
||||
for (int i = 0; i < 14; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity);
|
||||
dust.scale = Main.rand.NextFloat(1.1f, 1.9f);
|
||||
dust.velocity = Projectile.velocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.2f, 2.1f);
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,9 +141,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 55f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
if (Projectile.velocity != oldVelocity)
|
||||
{
|
||||
Projectile.netSpam = 0;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
Projectile.Center = armPosition + Projectile.velocity * MathHelper.Clamp(47f - (framesBetweenShots * 2), 0f, 47f) + new Vector2 (0, 5);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f);
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
private ref float ShotsLoaded => ref Projectile.ai[1];
|
||||
private ref float ShootTimer => ref Projectile.ai[2];
|
||||
private bool FullyCharged => CurrentChargingFrames >= MagnaCannon.FullChargeFrames;
|
||||
public int Time = 0;
|
||||
|
||||
private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed;
|
||||
|
||||
@@ -42,6 +43,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
if (Owner.dead) // destroy the holdout if the player dies
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -141,7 +148,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 40f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = 5;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.MaxUpdates = 3;
|
||||
Projectile.timeLeft = Lifetime; // 24 effectively
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
|
||||
@@ -69,7 +69,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.88f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.88f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.80f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.80f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetItemName<OpalStriker>();
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Ranged/OpalStriker";
|
||||
|
||||
public static float ChargedDamageMult = 6f;
|
||||
public static float ChargedDamageMult = 4.3f;
|
||||
public static float ChargedKBMult = 3f;
|
||||
public static float BulletSpeed = 12f;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
private ref float CurrentChargingFrames => ref Projectile.ai[0];
|
||||
private bool FullyCharged => CurrentChargingFrames >= OpalStriker.FullChargeFrames;
|
||||
|
||||
public int Time = 0;
|
||||
private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed;
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -40,6 +40,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
if (Owner.dead) // destroy the holdout if the player dies
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -130,7 +136,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 35f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using System;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil;
|
||||
using ReLogic.Utilities;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.Items.Weapons.Ranged.Photoviscerator;
|
||||
@@ -42,6 +40,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (PhotoTimer > 0)
|
||||
PhotoTimer--;
|
||||
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
sparkColor = Main.rand.Next(4) switch
|
||||
{
|
||||
0 => Color.Red,
|
||||
@@ -192,7 +195,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public void RightClickAttack(Vector2 armPosition, Vector2 verticalOffset)
|
||||
{
|
||||
|
||||
// Multiplied by the ratio of attack speed gained from modifiers
|
||||
ShootTimer = (RightClickCooldown * Owner.ActiveItem().useTime / (float)LightBombCooldown) - 1f;
|
||||
ForcedLifespan = ShootTimer;
|
||||
@@ -222,14 +224,16 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust.color = sparkColor;
|
||||
}
|
||||
SoundEngine.PlaySound(HalleysInferno.Shoot, Owner.MountedCenter);
|
||||
Projectile.NewProjectile(source, position, velocity, ProjectileType<ExoFlareCluster>(), (int)(damage * 1.2f), knockback, Projectile.owner);
|
||||
|
||||
int rightClickDamage = (int)(0.5f * damage);
|
||||
Projectile.NewProjectile(source, position, velocity, ProjectileType<ExoFlareCluster>(), rightClickDamage, knockback, Projectile.owner);
|
||||
}
|
||||
|
||||
public void UpdateProjectileHeldVariables(Vector2 armPosition)
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 90f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
if (Projectile.velocity != oldVelocity)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 150;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 3;
|
||||
Projectile.idStaticNPCHitCooldown = 2;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
// Holdout stuff
|
||||
Projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - Projectile.Size / 2f;
|
||||
Projectile.position = (player.RotatedRelativePoint(player.MountedCenter, true) - Projectile.Size / 2f ) + Projectile.velocity * 95;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation();
|
||||
Projectile.spriteDirection = Projectile.direction;
|
||||
Projectile.timeLeft = 2;
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
private ref int ShotDelay => ref Owner.ActiveItem().useTime; // 8
|
||||
public int ShotCooldown;
|
||||
public int FireBlobs = 0;
|
||||
public int Time = 0;
|
||||
private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed;
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -38,6 +39,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
if (Time == 1)
|
||||
Projectile.alpha = 255;
|
||||
else
|
||||
Projectile.alpha = 0;
|
||||
|
||||
if (Owner.dead || ShotsFired >= 16) // destroy the holdout if the player dies or is out of shots
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -106,7 +113,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true);
|
||||
float interpolant = Utils.GetLerpValue(5f, 40f, Projectile.Distance(Main.MouseWorld), true);
|
||||
Vector2 oldVelocity = Projectile.velocity;
|
||||
Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
{
|
||||
Projectile.damage = 1;
|
||||
|
||||
@@ -81,7 +81,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.ModifyHitNPCSticky(2);
|
||||
posthit = true;
|
||||
}
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
posthit = true;
|
||||
}
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
spark.Scale -= 0.1f;
|
||||
}
|
||||
}
|
||||
else // Idol state
|
||||
else // Idle state
|
||||
{
|
||||
Projectile.rotation += Projectile.velocity.X * 0.06f; // Spins faster the faster it moves in the X-axis.
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (!MinionBuffMode) // "Break" the minion after every 3 hits if in charging
|
||||
{
|
||||
HitCounter++;
|
||||
if (HitCounter >= 3)
|
||||
if (HitCounter >= 4)
|
||||
{
|
||||
for (int i = 0; i <= 5; i++)
|
||||
{
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Systems
|
||||
{
|
||||
public class ProvBackgroundScene : ModSceneEffect
|
||||
{
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BossHigh;
|
||||
|
||||
public override bool IsSceneEffectActive(Player player) => NPC.AnyNPCs(ModContent.NPCType<Providence>());
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Providence", isActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override bool IsLockedChest(int i, int j) => Main.tile[i, j].TileFrameX / 36 == 1;
|
||||
public override bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual)
|
||||
{
|
||||
//Skeletron must be dead, NPC.downedBoss3 is added as failsave in case chests fail to open in the Abyss' method. AbleToUnlockChests should be false unless
|
||||
//the Abyss' unlock method is being run to prevent chests spawning already unlocked.
|
||||
if (World.Abyss.AbleToUnlockChests || NPC.downedBoss3)
|
||||
//Only unlock if Skeletron is dead
|
||||
if (NPC.downedBoss3)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.World
|
||||
public static bool AtLeftSideOfWorld = false;
|
||||
public static int AbyssChasmBottom = 0;
|
||||
|
||||
public static bool AbleToUnlockChests = false; //used for unlocking chests during skeletron's death and so that they cannot be opened beforehand
|
||||
//public static bool AbleToUnlockChests = false; //used for unlocking chests during skeletron's death and so that they cannot be opened beforehand
|
||||
public static void PlaceAbyss()
|
||||
{
|
||||
int x = Main.maxTilesX;
|
||||
@@ -1155,7 +1155,9 @@ namespace CalamityMod.World
|
||||
|
||||
WorldGen.PlaceObject(i, j - 2, (ushort)ModContent.TileType<AbyssFossilTile>());
|
||||
}
|
||||
|
||||
// Commented out the method in case we ever use it again in the future, or some guy in the public github fixes it,
|
||||
// but for now this is a buggy mess that is too disruptive especially in multiplayer despite several attempts at fixing it - Shade
|
||||
/*
|
||||
public static void UnlockAllAbyssChests()
|
||||
{
|
||||
int genLimit = Main.maxTilesX / 2;
|
||||
@@ -1181,5 +1183,6 @@ namespace CalamityMod.World
|
||||
}
|
||||
AbleToUnlockChests = false; //reseting the variable in case players generate multiple worlds to prevent already unlocked chests from spawning
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||