Merge branch 'master' into ares-arms
This commit is contained in:
commit
b2793371f1
99 files changed
+475
-440
No files matched your search
@@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.Pets
|
||||
DisplayName.SetDefault("Archer of Lunamoon");
|
||||
Description.SetDefault("You have a personal spotter");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.lightPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -4958,6 +4958,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (witheringWeaponEnchant)
|
||||
witheringDamageDone += (int)(damage * (crit ? 2D : 1D));
|
||||
|
||||
if (flamingItemEnchant)
|
||||
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 120);
|
||||
|
||||
switch (item.type)
|
||||
{
|
||||
case ItemID.CobaltSword:
|
||||
@@ -7537,7 +7540,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Summon a portal if needed.
|
||||
if (player.Calamity().persecutedEnchant && NPC.CountNPCS(ModContent.NPCType<DemonPortal>()) < 2)
|
||||
{
|
||||
Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
int tries = 0;
|
||||
Vector2 spawnPosition;
|
||||
do
|
||||
{
|
||||
spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
tries++;
|
||||
}
|
||||
while (Collision.SolidCollision(spawnPosition - Vector2.One * 24f, 48, 24) && tries < 100);
|
||||
CalamityNetcode.NewNPC_ClientSide(spawnPosition, ModContent.NPCType<DemonPortal>(), player);
|
||||
}
|
||||
|
||||
|
||||
@@ -427,6 +427,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Texture2D extraPieceTexture = ModContent.GetTexture("CalamityMod/Items/Armor/Vanity/ApolloMask_Extra");
|
||||
DrawData pieceDrawData = new DrawData(extraPieceTexture, headDrawPosition, drawPlayer.bodyFrame, drawInfo.eyeColor, 0f, origin, 1f, drawInfo.spriteEffects, 0);
|
||||
pieceDrawData.shader = dyeShader;
|
||||
Main.playerDrawData.Add(pieceDrawData);
|
||||
}
|
||||
});
|
||||
@@ -456,6 +457,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle headFrame = extraPieceTexture.Frame(1, 20, 0, headVerticalFrame);
|
||||
|
||||
DrawData pieceDrawData = new DrawData(extraPieceTexture, headDrawPosition, headFrame, drawInfo.eyeColor, drawPlayer.fullRotation, origin, 1f, drawInfo.spriteEffects, 0);
|
||||
pieceDrawData.shader = dyeShader;
|
||||
Main.playerDrawData.Add(pieceDrawData);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.lifeRegen = 0;
|
||||
|
||||
player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 5;
|
||||
lifeRegenLost += 7;
|
||||
}
|
||||
|
||||
if (modPlayer.bFlames)
|
||||
|
||||
@@ -1279,7 +1279,14 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.persecutedEnchantSummonTimer = 0;
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().persecutedEnchant && NPC.CountNPCS(ModContent.NPCType<DemonPortal>()) < 2)
|
||||
{
|
||||
Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
int tries = 0;
|
||||
Vector2 spawnPosition;
|
||||
do
|
||||
{
|
||||
spawnPosition = player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(270f, 420f);
|
||||
tries++;
|
||||
}
|
||||
while (Collision.SolidCollision(spawnPosition - Vector2.One * 24f, 48, 24) && tries < 100);
|
||||
CalamityNetcode.NewNPC_ClientSide(spawnPosition, ModContent.NPCType<DemonPortal>(), player);
|
||||
}
|
||||
}
|
||||
@@ -3421,7 +3428,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.gArtifact)
|
||||
{
|
||||
player.maxMinions += 8;
|
||||
player.maxMinions += 10;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<YharonKindleBuff>()) == -1)
|
||||
|
||||
+69
-64
@@ -85,7 +85,7 @@ namespace CalamityMod
|
||||
public static ModHotKey SpectralVeilHotKey;
|
||||
public static ModHotKey PlaguePackHotKey;
|
||||
public static ModHotKey AngelicAllianceHotKey;
|
||||
public static ModHotKey GodSlayerDashHotKey;
|
||||
public static ModHotKey GodSlayerDashHotKey;
|
||||
public static ModHotKey ExoChairSpeedupHotkey;
|
||||
|
||||
// Boss Spawners
|
||||
@@ -113,21 +113,21 @@ namespace CalamityMod
|
||||
public const float velocityScaleMin = 0.5f;
|
||||
public const float bitingEnemeyVelocityScale = 0.8f;
|
||||
|
||||
// Life steal cap
|
||||
public const int lifeStealCap = 10;
|
||||
// Life steal cap
|
||||
public const int lifeStealCap = 10;
|
||||
|
||||
// Debuff immunities, these are used in the NPCDebuffs file
|
||||
public static int[] slimeEnemyImmunities = new int[1] { BuffID.Poisoned };
|
||||
public static int[] iceEnemyImmunities = new int[3] { BuffID.Frostburn, ModContent.BuffType<GlacialState>(), ModContent.BuffType<ExoFreeze>() };
|
||||
public static int[] sulphurEnemyImmunities = new int[4] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<SulphuricPoisoning>(), ModContent.BuffType<Irradiated>() };
|
||||
public static int[] sunkenSeaEnemyImmunities = new int[2] { ModContent.BuffType<Eutrophication>(), ModContent.BuffType<PearlAura>() };
|
||||
public static int[] abyssEnemyImmunities = new int[1] { ModContent.BuffType<CrushDepth>() };
|
||||
public static int[] cragEnemyImmunities = new int[3] { BuffID.OnFire, ModContent.BuffType<AbyssalFlames>(), ModContent.BuffType<BrimstoneFlames>() };
|
||||
public static int[] astralEnemyImmunities = new int[2] { BuffID.Poisoned, ModContent.BuffType<AstralInfectionDebuff>() };
|
||||
public static int[] plagueEnemyImmunities = new int[3] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<Plague>() };
|
||||
public static int[] holyEnemyImmunities = new int[3] { BuffID.OnFire, ModContent.BuffType<HolyFlames>(), ModContent.BuffType<Nightwither>() };
|
||||
// Debuff immunities, these are used in the NPCDebuffs file
|
||||
public static int[] slimeEnemyImmunities = new int[1] { BuffID.Poisoned };
|
||||
public static int[] iceEnemyImmunities = new int[3] { BuffID.Frostburn, ModContent.BuffType<GlacialState>(), ModContent.BuffType<ExoFreeze>() };
|
||||
public static int[] sulphurEnemyImmunities = new int[4] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<SulphuricPoisoning>(), ModContent.BuffType<Irradiated>() };
|
||||
public static int[] sunkenSeaEnemyImmunities = new int[2] { ModContent.BuffType<Eutrophication>(), ModContent.BuffType<PearlAura>() };
|
||||
public static int[] abyssEnemyImmunities = new int[1] { ModContent.BuffType<CrushDepth>() };
|
||||
public static int[] cragEnemyImmunities = new int[3] { BuffID.OnFire, ModContent.BuffType<AbyssalFlames>(), ModContent.BuffType<BrimstoneFlames>() };
|
||||
public static int[] astralEnemyImmunities = new int[2] { BuffID.Poisoned, ModContent.BuffType<AstralInfectionDebuff>() };
|
||||
public static int[] plagueEnemyImmunities = new int[3] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<Plague>() };
|
||||
public static int[] holyEnemyImmunities = new int[3] { BuffID.OnFire, ModContent.BuffType<HolyFlames>(), ModContent.BuffType<Nightwither>() };
|
||||
|
||||
internal static CalamityMod Instance;
|
||||
internal static CalamityMod Instance;
|
||||
internal Mod musicMod = null; // This is Calamity's official music mod, CalamityModMusic
|
||||
internal bool MusicAvailable => !(musicMod is null);
|
||||
internal Mod ancientsAwakened = null;
|
||||
@@ -169,10 +169,10 @@ namespace CalamityMod
|
||||
carpetOriginal = Main.flyingCarpetTexture;
|
||||
Mount.mounts[Mount.Unicorn].dashSpeed *= CalamityPlayer.UnicornSpeedNerfPower;
|
||||
Mount.mounts[Mount.Unicorn].runSpeed *= CalamityPlayer.UnicornSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].dashSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].runSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].dashSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].runSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
|
||||
NormalityRelocatorHotKey = RegisterHotKey("Normality Relocator", "Z");
|
||||
NormalityRelocatorHotKey = RegisterHotKey("Normality Relocator", "Z");
|
||||
RageHotKey = RegisterHotKey("Rage Mode", "V");
|
||||
AdrenalineHotKey = RegisterHotKey("Adrenaline Mode", "B");
|
||||
AegisHotKey = RegisterHotKey("Elysian Guard", "N");
|
||||
@@ -184,7 +184,7 @@ namespace CalamityMod
|
||||
SpectralVeilHotKey = RegisterHotKey("Spectral Veil Teleport", "Z");
|
||||
PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q");
|
||||
AngelicAllianceHotKey = RegisterHotKey("Angelic Alliance Blessing", "G");
|
||||
GodSlayerDashHotKey = RegisterHotKey("God Slayer Dash", "H");
|
||||
GodSlayerDashHotKey = RegisterHotKey("God Slayer Dash", "H");
|
||||
ExoChairSpeedupHotkey = RegisterHotKey("Exo Chair Speed Up", "LeftShift");
|
||||
|
||||
if (!Main.dedServ)
|
||||
@@ -262,10 +262,10 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky();
|
||||
|
||||
Filters.Scene["CalamityMod:AdultEidolonWyrm"] = new Filter(new AEWScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0.25f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:AdultEidolonWyrm"] = new AEWSky();
|
||||
Filters.Scene["CalamityMod:AdultEidolonWyrm"] = new Filter(new AEWScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0.25f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:AdultEidolonWyrm"] = new AEWSky();
|
||||
|
||||
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:Signus"] = new SignusSky();
|
||||
|
||||
Filters.Scene["CalamityMod:BossRush"] = new Filter(new BossRushScreenShader("FilterMiniTower").UseColor(BossRushSky.GeneralColor).UseOpacity(0.75f), EffectPriority.VeryHigh);
|
||||
@@ -287,13 +287,13 @@ namespace CalamityMod
|
||||
|
||||
Apollo.LoadHeadIcons();
|
||||
Artemis.LoadHeadIcons();
|
||||
DevourerofGodsHead.LoadHeadIcons();
|
||||
DevourerofGodsBody.LoadHeadIcons();
|
||||
DevourerofGodsTail.LoadHeadIcons();
|
||||
HiveMind.LoadHeadIcons();
|
||||
DevourerofGodsHead.LoadHeadIcons();
|
||||
DevourerofGodsBody.LoadHeadIcons();
|
||||
DevourerofGodsTail.LoadHeadIcons();
|
||||
HiveMind.LoadHeadIcons();
|
||||
Polterghast.LoadHeadIcons();
|
||||
StormWeaverHead.LoadHeadIcons();
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
StormWeaverHead.LoadHeadIcons();
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
ThanatosHead.LoadHeadIcons();
|
||||
ThanatosBody1.LoadHeadIcons();
|
||||
ThanatosBody2.LoadHeadIcons();
|
||||
@@ -335,8 +335,8 @@ namespace CalamityMod
|
||||
SandCloakHotkey = null;
|
||||
SpectralVeilHotKey = null;
|
||||
PlaguePackHotKey = null;
|
||||
AngelicAllianceHotKey = null;
|
||||
GodSlayerDashHotKey = null;
|
||||
AngelicAllianceHotKey = null;
|
||||
GodSlayerDashHotKey = null;
|
||||
|
||||
AstralCactusTexture = null;
|
||||
AstralCactusGlowTexture = null;
|
||||
@@ -379,10 +379,10 @@ namespace CalamityMod
|
||||
}
|
||||
Mount.mounts[Mount.Unicorn].dashSpeed /= CalamityPlayer.UnicornSpeedNerfPower;
|
||||
Mount.mounts[Mount.Unicorn].runSpeed /= CalamityPlayer.UnicornSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].dashSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].runSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].dashSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
Mount.mounts[Mount.MinecartMech].runSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower;
|
||||
|
||||
heartOriginal2 = null;
|
||||
heartOriginal2 = null;
|
||||
heartOriginal = null;
|
||||
rainOriginal = null;
|
||||
manaOriginal = null;
|
||||
@@ -604,8 +604,8 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<ProfanedGuardianBoss>(), 5400 },
|
||||
{ ModContent.NPCType<Bumblefuck>(), 7200 },
|
||||
{ ModContent.NPCType<Providence>(), 14400 },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<StormWeaverHead>(), 8100 },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), 8100 },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), 8100 },
|
||||
@@ -617,19 +617,19 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DevourerofGodsTail>(), 14400 },
|
||||
{ ModContent.NPCType<Yharon>(), 15300 },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 },
|
||||
{ ModContent.NPCType<Apollo>(), 21600 },
|
||||
{ ModContent.NPCType<Artemis>(), 21600 },
|
||||
{ ModContent.NPCType<AresBody>(), 21600 },
|
||||
{ ModContent.NPCType<AresGaussNuke>(), 21600 },
|
||||
{ ModContent.NPCType<AresLaserCannon>(), 21600 },
|
||||
{ ModContent.NPCType<AresPlasmaFlamethrower>(), 21600 },
|
||||
{ ModContent.NPCType<AresTeslaCannon>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosHead>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosTail>(), 21600 },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 }
|
||||
};
|
||||
{ ModContent.NPCType<Apollo>(), 21600 },
|
||||
{ ModContent.NPCType<Artemis>(), 21600 },
|
||||
{ ModContent.NPCType<AresBody>(), 21600 },
|
||||
{ ModContent.NPCType<AresGaussNuke>(), 21600 },
|
||||
{ ModContent.NPCType<AresLaserCannon>(), 21600 },
|
||||
{ ModContent.NPCType<AresPlasmaFlamethrower>(), 21600 },
|
||||
{ ModContent.NPCType<AresTeslaCannon>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosHead>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), 21600 },
|
||||
{ ModContent.NPCType<ThanatosTail>(), 21600 },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), 18000 }
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -745,14 +745,14 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DetonatingFlare>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DetonatingFlare2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<Apollo>(), velocityScaleMin }, // Increases in phase 2
|
||||
{ ModContent.NPCType<Apollo>(), velocityScaleMin }, // Increases in phase 2
|
||||
{ ModContent.NPCType<Artemis>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosHead>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosTail>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), bitingEnemeyVelocityScale }
|
||||
};
|
||||
{ ModContent.NPCType<ThanatosHead>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<ThanatosBody1>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosBody2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<ThanatosTail>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<EidolonWyrmHeadHuge>(), bitingEnemeyVelocityScale }
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -760,7 +760,7 @@ namespace CalamityMod
|
||||
|
||||
// This function returns an available Calamity Music Mod track, or null if the Calamity Music Mod is not available.
|
||||
public int? GetMusicFromMusicMod(string songFilename) => MusicAvailable ? (int?)musicMod.GetSoundSlot(SoundType.Music, "Sounds/Music/" + songFilename) : null;
|
||||
|
||||
|
||||
public override void UpdateMusic(ref int music, ref MusicPriority priority)
|
||||
{
|
||||
if (Main.musicVolume != 0)
|
||||
@@ -855,11 +855,11 @@ namespace CalamityMod
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Lighting Effects
|
||||
public override void ModifySunLightColor(ref Color tileColor, ref Color backgroundColor)
|
||||
{
|
||||
#region Lighting Effects
|
||||
public override void ModifySunLightColor(ref Color tileColor, ref Color backgroundColor)
|
||||
{
|
||||
if (Main.gameMenu)
|
||||
BossRushEvent.StartTimer = 0;
|
||||
|
||||
@@ -877,10 +877,10 @@ namespace CalamityMod
|
||||
tileColor = Color.Lerp(tileColor, Color.Black, intensity * 0.3f);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Mod Support
|
||||
public override void PostSetupContent() => WeakReferenceSupport.Setup();
|
||||
#region Mod Support
|
||||
public override void PostSetupContent() => WeakReferenceSupport.Setup();
|
||||
|
||||
public override object Call(params object[] args) => ModCalls.Call(args);
|
||||
#endregion
|
||||
@@ -973,7 +973,7 @@ namespace CalamityMod
|
||||
CalamitasEnchantUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
|
||||
// Codebreaker UI.
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Codebreaker Decryption GUI", () =>
|
||||
{
|
||||
@@ -1550,7 +1550,12 @@ namespace CalamityMod
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Time Handler
|
||||
public override void MidUpdateTimeWorld() => TileEntityTimeHandler.Update();
|
||||
public override void MidUpdateTimeWorld() => TileEntityTimeHandler.Update();
|
||||
#endregion
|
||||
|
||||
#region Post NPC Updating
|
||||
// TODO - Apply caching to this process. For now most of the looping issues should be eradicated but it can be reduced further.
|
||||
public override void MidUpdateNPCGore() => CalamityGlobalTownNPC.ResetTownNPCNameBools();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -61,8 +61,6 @@ namespace CalamityMod.Effects
|
||||
|
||||
Filters.Scene["CalamityMod:LightBurst"] = new Filter(new ScreenShaderData(new Ref<Effect>(LightShader), "BurstPass"), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:LightBurst"].Load();
|
||||
Filters.Scene["CalamityMod:DoGPortal"] = new Filter(new ScreenShaderData(new Ref<Effect>(DoGPortalShader), "ScreenPass"), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:DoGPortal"].Load();
|
||||
|
||||
GameShaders.Misc["CalamityMod:FireMouse"] = new MiscShaderData(new Ref<Effect>(SCalMouseShader), "DyePass");
|
||||
GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref<Effect>(TentacleShader), "BurstPass");
|
||||
@@ -81,6 +79,8 @@ namespace CalamityMod.Effects
|
||||
|
||||
GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"] = new MiscShaderData(new Ref<Effect>(BaseFusableParticleEdgeShader), "ParticlePass");
|
||||
GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"] = new MiscShaderData(new Ref<Effect>(AdditiveFusableParticleEdgeShader), "ParticlePass");
|
||||
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"] = new MiscShaderData(new Ref<Effect>(DoGPortalShader), "ScreenPass");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +1,36 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
sampler uImage2 : register(s2);
|
||||
sampler uImage3 : register(s3);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float2 uScreenResolution;
|
||||
float2 uScreenPosition;
|
||||
float2 uTargetPosition;
|
||||
float2 uDirection;
|
||||
float uOpacity;
|
||||
float uTime;
|
||||
float uIntensity;
|
||||
float uProgress;
|
||||
float2 uImageSize1;
|
||||
float2 uImageSize2;
|
||||
float2 uImageSize3;
|
||||
float2 uImageOffset;
|
||||
float uOpacity : register(C0);
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uZoom;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
|
||||
float4 PixelShaderFunction(float4 position : SV_POSITION, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
// Calculate relative screen values.
|
||||
float2 targetUVCoords = (uTargetPosition - uScreenPosition) / uScreenResolution;
|
||||
float2 centerOffset = (coords - targetUVCoords) * (uScreenResolution / uScreenResolution.y);
|
||||
float distanceFromTargetPosition = distance(coords, targetUVCoords) / uZoom;
|
||||
float distanceFromTargetPosition = distance(coords, 0.5);
|
||||
|
||||
// Calculate the swirl coordinates.
|
||||
float2 centeredCoords = (targetUVCoords - coords) * (uScreenResolution / uScreenResolution.y);
|
||||
float swirlRotation = length(centeredCoords) * 21.2 - uTime * 6;
|
||||
float2 centeredCoords = coords - 0.5;
|
||||
float swirlRotation = length(centeredCoords) * 41.2 - uTime * 6;
|
||||
float swirlSine = sin(swirlRotation);
|
||||
float swirlCosine = cos(swirlRotation);
|
||||
float2x2 swirlRotationMatrix = float2x2(swirlCosine, -swirlSine, swirlSine, swirlCosine);
|
||||
float2 swirlCoordinates = mul(centeredCoords, swirlRotationMatrix) + 0.5;
|
||||
|
||||
// Calculate fade, swirl arm colors, and draw the portal to the screen.
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float swirlColorFade = saturate(distanceFromTargetPosition * 3) / (uProgress + 0.0001);
|
||||
float swirlColorFade = saturate(distanceFromTargetPosition * 3) / (uOpacity + 0.0001);
|
||||
float3 swirlBaseColor = lerp(uColor, uSecondaryColor, pow(swirlColorFade, 0.33));
|
||||
float4 swirlNoiseColor = tex2D(uImage1, swirlCoordinates) * (1 - swirlColorFade);
|
||||
float4 endColor = lerp(float4(swirlBaseColor, 0.1), color, swirlColorFade);
|
||||
return lerp(color, endColor * (1 + (1 - swirlColorFade) * 2), saturate(swirlNoiseColor.r));
|
||||
float4 swirlNoiseColor = tex2D(uImage0, swirlCoordinates) * (1 - swirlColorFade);
|
||||
float4 endColor = lerp(float4(swirlBaseColor, 0.1), 0, swirlColorFade);
|
||||
return lerp(0, endColor * (1 + (1 - swirlColorFade) * 2), saturate(swirlNoiseColor.r));
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
|
||||
Binary file not shown.
@@ -97,6 +97,7 @@ namespace CalamityMod.Events
|
||||
#region Loading and Unloading
|
||||
public static void Load()
|
||||
{
|
||||
BossIDsAfterDeath = new Dictionary<int, int[]>();
|
||||
Bosses = new List<Boss>()
|
||||
{
|
||||
new Boss(NPCID.QueenBee),
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 507 B |
@@ -137,6 +137,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Main.DoDraw += DrawFusableParticles;
|
||||
IL.Terraria.Main.DrawTiles += DrawCustomLava;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw += DrawCustomLava2;
|
||||
IL.Terraria.Main.oldDrawWater += DrawCustomLava3;
|
||||
IL.Terraria.WaterfallManager.DrawWaterfall += DrawCustomLavafalls;
|
||||
|
||||
// Ravager platform fall fix
|
||||
@@ -203,6 +204,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Main.DoDraw -= DrawFusableParticles;
|
||||
IL.Terraria.Main.DrawTiles -= DrawCustomLava;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw -= DrawCustomLava2;
|
||||
IL.Terraria.Main.oldDrawWater -= DrawCustomLava3;
|
||||
IL.Terraria.WaterfallManager.DrawWaterfall -= DrawCustomLavafalls;
|
||||
|
||||
// Ravager platform fall fix
|
||||
@@ -708,6 +710,37 @@ namespace CalamityMod.ILEditing
|
||||
});
|
||||
}
|
||||
|
||||
private static void DrawCustomLava3(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new ILCursor(il);
|
||||
|
||||
// Select the lava color.
|
||||
if (!cursor.TryGotoNext(MoveType.After, c => c.MatchCallOrCallvirt<Lighting>("get_NotRetro")))
|
||||
{
|
||||
LogFailure("Custom Lava Drawing", "Could not locate the retro style check.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Pass the texture in so that the method can ensure it is not messing around with non-lava textures.
|
||||
cursor.Emit(OpCodes.Ldloc, 13);
|
||||
cursor.Emit(OpCodes.Ldsfld, typeof(Main).GetField("liquidTexture"));
|
||||
cursor.Emit(OpCodes.Ldloc, 15);
|
||||
cursor.Emit(OpCodes.Ldelem_Ref);
|
||||
cursor.EmitDelegate<Func<Color, Texture2D, Color>>((initialColor, initialTexture) => SelectLavaColor(initialTexture, initialColor));
|
||||
cursor.Emit(OpCodes.Stloc, 13);
|
||||
|
||||
// Go back to the start and change textures as necessary.
|
||||
cursor.Index = 0;
|
||||
|
||||
while (cursor.TryGotoNext(c => c.MatchLdsfld<Main>("liquidTexture")))
|
||||
{
|
||||
// While this may seem crazy, under no circumstances should there not be a load after exactly 3 instructions.
|
||||
// The order is load is texture array field -> load index -> load the reference to the texture at that index.
|
||||
cursor.Index += 3;
|
||||
cursor.EmitDelegate<Func<Texture2D, Texture2D>>(initialTexture => SelectLavaTexture(initialTexture, true));
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawCustomLavafalls(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new ILCursor(il);
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.width = 34;
|
||||
item.height = 64;
|
||||
item.value = CalamityGlobalItem.Rarity7BuyPrice;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.accessory = true;
|
||||
|
||||
@@ -2370,13 +2370,9 @@ namespace CalamityMod.Items
|
||||
|
||||
public override bool PreDrawInInventory(Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
void drawItemManually(Color color, float generalScale)
|
||||
{
|
||||
Texture2D itemTexture = Main.itemTexture[item.type];
|
||||
Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture);
|
||||
Vector2 itemOrigin = frame.Size() * 0.5f;
|
||||
spriteBatch.Draw(itemTexture, position, itemFrame, color, 0f, itemOrigin, scale * generalScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
// I want to strangle somebody.
|
||||
Texture2D itemTexture = Main.itemTexture[item.type];
|
||||
Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture);
|
||||
|
||||
if (!EnchantmentManager.ItemUpgradeRelationship.ContainsKey(item.type) || !Main.LocalPlayer.InventoryHas(ModContent.ItemType<BrimstoneLocus>()))
|
||||
return true;
|
||||
@@ -2387,19 +2383,11 @@ namespace CalamityMod.Items
|
||||
if (calamitasNPCIndex != -1)
|
||||
currentPower = Utils.InverseLerp(11750f, 1000f, Main.LocalPlayer.Distance(Main.npc[calamitasNPCIndex].Center), true);
|
||||
|
||||
// Adjust the offset of the position. This vector does not have any specific static member that can be referenced and it is not
|
||||
// as simply computable as a texture.Size() * 0.5f.
|
||||
position += new Vector2(14f, 16f) * Main.inventoryScale;
|
||||
Vector2 particleDrawCenter = position + new Vector2(12f, 16f) * Main.inventoryScale;
|
||||
|
||||
EnchantmentEnergyParticles.InterpolationSpeed = MathHelper.Lerp(0.035f, 0.1f, currentPower);
|
||||
EnchantmentEnergyParticles.DrawSet(position + Main.screenPosition);
|
||||
|
||||
float pulse = Main.GlobalTime * 0.79f % 1f;
|
||||
float pulseFade = Utils.InverseLerp(0.87f, 0.27f, pulse, true);
|
||||
float pulseScale = scale * MathHelper.Lerp(1.6f, 1f, pulseFade) / scale;
|
||||
Color pulseColor = Color.Lerp(drawColor, Color.BlueViolet, pulseFade) * pulseFade;
|
||||
drawItemManually(pulseColor, pulseScale);
|
||||
drawItemManually(drawColor, 1f);
|
||||
EnchantmentEnergyParticles.DrawSet(particleDrawCenter + Main.screenPosition);
|
||||
spriteBatch.Draw(itemTexture, position, itemFrame, drawColor, 0f, origin, scale, SpriteEffects.None, 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,8 +125,6 @@ namespace CalamityMod.Items
|
||||
nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f);
|
||||
if (item.type == ModContent.ItemType<RedSun>())
|
||||
nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f);
|
||||
if (item.type == ModContent.ItemType<GaelsGreatsword>())
|
||||
nameLine.overrideColor = new Color(146, 0, 0);
|
||||
if (item.type == ModContent.ItemType<CrystylCrusher>())
|
||||
nameLine.overrideColor = new Color(129, 29, 149);
|
||||
if (item.type == ModContent.ItemType<Svantechnical>())
|
||||
@@ -233,6 +231,8 @@ namespace CalamityMod.Items
|
||||
legendaryColor = CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 3f);
|
||||
if (item.type == ModContent.ItemType<TheCommunity>())
|
||||
legendaryColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
|
||||
if (item.type == ModContent.ItemType<GaelsGreatsword>())
|
||||
legendaryColor = new Color(146, 0, 0);
|
||||
|
||||
Color lineColor = legendaryColor.GetValueOrDefault(CalamityUtils.ChallengeDropColor);
|
||||
string text = legendaryColor.HasValue ? "- Legendary Challenge Drop -" : "- Challenge Drop -";
|
||||
|
||||
@@ -56,6 +56,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 0.9f);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 2222;
|
||||
item.damage = 444;
|
||||
item.magic = true;
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 82;
|
||||
item.damage = 88;
|
||||
item.magic = true;
|
||||
item.mana = 60;
|
||||
item.width = 130;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 125;
|
||||
item.damage = 88;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 16;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
item.Calamity().devItem = true;
|
||||
item.Calamity().challengeDrop = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<GaelSkull>();
|
||||
item.shootSpeed = 15f;
|
||||
|
||||
@@ -24,7 +24,7 @@ Right click to fire two devastating barrages of five empowered fireballs.
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 80;
|
||||
item.damage = 124;
|
||||
item.knockBack = 1f;
|
||||
item.shootSpeed = 18f;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
//Check if stealth is full
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.2f);
|
||||
|
||||
int star = Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (star.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[star].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -38,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
}
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
speedY *= 0.7f; //since the barrel is heavy
|
||||
speedY *= 0.85f;
|
||||
Vector2 initialVelocity = new Vector2(speedX, speedY);
|
||||
|
||||
//unitY additive is do it doesn't exploe initially
|
||||
// A vertical offset is added to ensure that the barrel does not immediately collide with tiles and explode.
|
||||
int p = Projectile.NewProjectile(position - Vector2.UnitY * 12f, initialVelocity, type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (item.stack != 1)
|
||||
{
|
||||
damage = (int)(damage * 1.55f);
|
||||
|
||||
for (int i = 0; i < item.stack; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-MathHelper.ToRadians(8f), MathHelper.ToRadians(8f), i / (float)(item.stack - 1)));
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 0.85f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -46,7 +46,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedMult = 1.25f;
|
||||
}
|
||||
damage = (int)(damage * 1.3f);
|
||||
}
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX * speedMult, speedY * speedMult), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
|
||||
@@ -38,17 +38,19 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
for (int i = -6; i <= 6; i += 6)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
int stealth = Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType<CobaltEnergy>(), damage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
{
|
||||
damage = (int)(damage * 1.4f);
|
||||
|
||||
for (int i = -6; i <= 6; i += 6)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
int stealth = Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType<CobaltEnergy>(), damage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.rare = ItemRarityID.Yellow;
|
||||
item.Calamity().donorItem = true;
|
||||
item.shoot = ModContent.ProjectileType<CorpusAvertorProj>();
|
||||
item.shootSpeed = 5f;
|
||||
item.shootSpeed = 8.5f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int dagger = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<CorpusAvertorStealth>(), damage * 2, knockBack * 2f, player.whoAmI);
|
||||
int dagger = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<CorpusAvertorStealth>(), (int)(damage * 3.5f), knockBack * 2f, player.whoAmI);
|
||||
if (dagger.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[dagger].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 26;
|
||||
item.damage = 114;
|
||||
item.damage = 92;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useTime = 2;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
damage = (int)(damage * 1.75f);
|
||||
type = ModContent.ProjectileType<CraniumSmasherStealth>();
|
||||
}
|
||||
else if (Main.rand.NextBool(5))
|
||||
|
||||
@@ -71,30 +71,25 @@ Stealth strikes launch all 4 sphere types at once");
|
||||
ProjectileType<SphereBlue>()
|
||||
});
|
||||
|
||||
//Kinda ugly but idk how to make it cleaner
|
||||
float SpeedX = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX2 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY2 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX3 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY3 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX4 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY4 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage / 2, knockBack, player.whoAmI);
|
||||
int stealth2 = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ProjectileType<SphereBladed>(), damage / 2, knockBack, player.whoAmI);
|
||||
int stealth3 = Projectile.NewProjectile(position.X, position.Y, SpeedX3, SpeedY3, ProjectileType<SphereYellow>(), damage / 2, knockBack, player.whoAmI);
|
||||
int stealth4 = Projectile.NewProjectile(position.X, position.Y, SpeedX4, SpeedY4, ProjectileType<SphereBlue>(), damage / 2, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
if (stealth2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth2].Calamity().stealthStrike = true;
|
||||
if (stealth3.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth3].Calamity().stealthStrike = true;
|
||||
if (stealth4.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth4].Calamity().stealthStrike = true;
|
||||
// This is done to allow looping when creating projectiles, instead of having to create many projectile/velocity variables all at once,
|
||||
// which this shoot code used to do.
|
||||
int[] projectilesToShoot = new int[]
|
||||
{
|
||||
type,
|
||||
ProjectileType<SphereBladed>(),
|
||||
ProjectileType<SphereYellow>(),
|
||||
ProjectileType<SphereBlue>()
|
||||
};
|
||||
|
||||
foreach (int projectileType in projectilesToShoot)
|
||||
{
|
||||
Vector2 shootVelocity = new Vector2(speedX, speedY) + Main.rand.NextVector2Square(-1.5f, 1.5f);
|
||||
int stealth = Projectile.NewProjectile(position, shootVelocity, projectileType, (int)(damage * 0.625f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ Stealth strikes summon more lightning and travel faster");
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 457;
|
||||
item.damage = 466;
|
||||
item.knockBack = 10f;
|
||||
|
||||
item.width = 56;
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.2f);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(proj))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
item.width = 34;
|
||||
item.height = 34;
|
||||
item.damage = 52;
|
||||
item.damage = 80;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.autoReuse = true;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 2f, damage);
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 1.15f), knockBack, player.whoAmI, 2f, damage);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Stealth strikes release more souls and leave behind souls as they travel");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FantasyTalismanStealth>(), damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FantasyTalismanStealth>(), (int)(damage * 0.8f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -54,7 +54,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int proj = Projectile.NewProjectile(position, perturbedspeed, type, Math.Max(damage / 3, 1), knockBack / 3f, player.whoAmI, 0f, 1f);
|
||||
int proj = Projectile.NewProjectile(position, perturbedspeed, type, Math.Max((int)(damage / 2.7272f), 1), knockBack / 3f, player.whoAmI, 0f, 1f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
spread -= 10;
|
||||
@@ -64,7 +64,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl
|
||||
for (int i = 0; i < icicleAmt; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread2));
|
||||
Projectile.NewProjectile(position, perturbedspeed, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), Math.Max(damage / 3, 1), 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position, perturbedspeed, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), Math.Max((int)(damage / 2.7272f), 1), 0f, player.whoAmI, 0f, 0f);
|
||||
spread2 -= Main.rand.Next(1,4);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int flare = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FrostyFlareStealth>(), damage, knockBack, player.whoAmI);
|
||||
int flare = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FrostyFlareStealth>(), (int)(damage * 0.9f), knockBack, player.whoAmI);
|
||||
if (flare.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[flare].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position.X, position.Y, 0f, -10f, type, damage, knockBack, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(position.X, position.Y, 0f, -10f, type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.6), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -68,9 +68,11 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
float stealthDamageFactor = player.Calamity().StealthStrikeAvailable() ? 1.25f : 1f;
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
{
|
||||
int bomb = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int bomb = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * stealthDamageFactor), knockBack, player.whoAmI);
|
||||
if (bomb.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[bomb].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
return false;
|
||||
@@ -81,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
for (float i = -2.5f; i < 3f; ++i)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
Projectile.NewProjectile(position, perturbedSpeed, type, (int)(damage * dmgMult), knockBack, player.whoAmI);
|
||||
Projectile.NewProjectile(position, perturbedSpeed, type, (int)(damage * dmgMult * stealthDamageFactor), knockBack, player.whoAmI);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
teethCount = 3;
|
||||
stealthStrike = true;
|
||||
damage = (int)(damage * 1.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(proj))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
return false;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
for (float i = -6.5f; i <= 6.5f; i += 6.5f)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
int stealth = Projectile.NewProjectile(position, perturbedSpeed, type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, perturbedSpeed, type, damage * 2, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.25f);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
p.Calamity().stealthStrike = true;
|
||||
int pID = p.identity;
|
||||
|
||||
CreateOrbs(position, (int)(orbDamage * 0.75f), knockBack, pID, player, true);
|
||||
CreateOrbs(position, (int)(orbDamage * 0.675f), knockBack, pID, player, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -38,7 +38,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int javelin = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.425f);
|
||||
|
||||
int javelin = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (javelin.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[javelin].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -47,7 +47,7 @@ Stealth strikes don't slow down and souls always deal full damage");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.75f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.15f), knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -42,7 +42,7 @@ Stealth strikes explode into energy stars");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.2f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 150;
|
||||
item.damage = 260;
|
||||
item.knockBack = 5f;
|
||||
item.useAnimation = item.useTime = 25;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
// Directly nerf stealth strikes by 20%, but only stealth strikes.
|
||||
int stealthDamage = (int)(damage * 0.8f);
|
||||
// Directly nerf stealth strikes by 32%, but only stealth strikes.
|
||||
int stealthDamage = (int)(damage * 0.72f);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, stealthDamage, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.value = Item.buyPrice(0, 1, 0, 0);
|
||||
item.rare = ItemRarityID.Yellow;
|
||||
item.shoot = ModContent.ProjectileType<ShockGrenadeProjectile>();
|
||||
item.shootSpeed = 7.5f;
|
||||
item.shootSpeed = 12.5f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 1f);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 0.8f), knockBack, player.whoAmI, 0f, 1f);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -45,15 +45,17 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() && player.ownedProjectileCounts[item.shoot] < knifeLimit)
|
||||
{
|
||||
int knifeAmt = knifeCount;
|
||||
if ((player.ownedProjectileCounts[item.shoot] + knifeCount) >= knifeLimit)
|
||||
knifeAmt = knifeLimit - player.ownedProjectileCounts[item.shoot];
|
||||
if (knifeAmt <= 0)
|
||||
{
|
||||
damage = (int)(damage * 1.1f);
|
||||
|
||||
int knifeAmt = knifeCount;
|
||||
if ((player.ownedProjectileCounts[item.shoot] + knifeCount) >= knifeLimit)
|
||||
knifeAmt = knifeLimit - player.ownedProjectileCounts[item.shoot];
|
||||
if (knifeAmt <= 0)
|
||||
{
|
||||
int knife = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (knife.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife].Calamity().stealthStrike = true;
|
||||
}
|
||||
if (knife.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
int spread = 20;
|
||||
for (int i = 0; i < knifeCount; i++)
|
||||
@@ -61,9 +63,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
speedX *= 0.9f;
|
||||
Vector2 perturbedspeed = new Vector2(speedX, speedY + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int knife2 = Projectile.NewProjectile(position, perturbedspeed, type, damage, knockBack, player.whoAmI, 1f, i % 5 == 0 ? 1f : 0f);
|
||||
if (knife2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife2].Calamity().stealthStrike = true;
|
||||
spread -= Main.rand.Next(1, 3);
|
||||
if (knife2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife2].Calamity().stealthStrike = true;
|
||||
spread -= Main.rand.Next(1, 3);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position, new Vector2(speedX * 1.6f, speedY * 1.6f), ModContent.ProjectileType<StormfrontRazorProjectile>(), damage, knockBack, player.whoAmI, 0, 40f);
|
||||
int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY) * 1.6f, ModContent.ProjectileType<StormfrontRazorProjectile>(), (int)(damage * 1.1f), knockBack, player.whoAmI, 0, 40f);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -64,11 +64,12 @@ Stealth strikes travel slower and are rapidly orbited by the smaller disks");
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedX *= 0.75f;
|
||||
speedY *= 0.75f;
|
||||
}
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedX *= 0.75f;
|
||||
speedY *= 0.75f;
|
||||
damage = (int)(damage * 0.9f);
|
||||
}
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
float stealthDamageMult = 3.25f;
|
||||
float stealthDamageMult = 4.875f;
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<TalonLargeProj>(), (int)(damage * stealthDamageMult), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 1f);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.2f), knockBack, player.whoAmI, 0f, 1f);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -41,7 +41,7 @@ Stealth strikes leak tar as they fly");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.15f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.value = 10000;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.shoot = ModContent.ProjectileType<AntumbraShardProjectile>();
|
||||
item.shootSpeed = 16f;
|
||||
item.shootSpeed = 24f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.5f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
DisplayName.SetDefault("Yharon's Kindle Staff");
|
||||
Tooltip.SetDefault("Summons the Son of Yharon to fight for you\n" +
|
||||
"Requires 4 minion slots to use");
|
||||
"Requires 5 minion slots to use");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
item.damage = 40;
|
||||
item.mana = 10;
|
||||
item.width = 62;
|
||||
item.height = 62;
|
||||
item.width = 52;
|
||||
item.height = 52;
|
||||
item.useTime = item.useAnimation = 25;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.noMelee = true;
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
item.damage = BaseDamage;
|
||||
item.mana = 10;
|
||||
item.width = 58;
|
||||
item.height = 58;
|
||||
item.width = 68;
|
||||
item.height = 68;
|
||||
item.useTime = item.useAnimation = 10; // 9 because of useStyle 1
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.noMelee = true;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 333;
|
||||
item.damage = 150;
|
||||
item.mana = 10;
|
||||
item.width = item.height = 32;
|
||||
item.useTime = item.useAnimation = 10;
|
||||
|
||||
@@ -494,8 +494,8 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("CeaselessVoid", out float order);
|
||||
List<int> bosses = new List<int>() { NPCType<CeaselessVoid>(), NPCType<DarkEnergy>() };
|
||||
int summon = ItemType<RuneofCos>();
|
||||
List<int> loot = new List<int>() { ItemType<DarkPlasma>(), ItemType<MirrorBlade>(), ItemType<ArcanumoftheVoid>(), ItemType<TheEvolution>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<CeaselessVoidTrophy>(), ItemType<CeaselessVoidMask>(), ItemType<KnowledgeSentinels>() };
|
||||
List<int> loot = new List<int>() { ItemType<CeaselessVoidBag>(), ItemType<DarkPlasma>(), ItemType<MirrorBlade>(), ItemType<VoidConcentrationStaff>(), ItemType<ArcanumoftheVoid>(), ItemType<TheEvolution>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<CeaselessVoidTrophy>(), ItemType<CeaselessVoidMask>(), ItemType<GodSlayerHornedHelm>(), ItemType<GodSlayerVisage>(), ItemType<AncientGodSlayerHelm>(), ItemType<AncientGodSlayerChestplate>(), ItemType<AncientGodSlayerLeggings>(), ItemType<KnowledgeSentinels>() };
|
||||
string instructions = $"Use a [i:{summon}] in the Dungeon";
|
||||
string despawn = CalamityUtils.ColorMessage("The rift in time and space has moved away from your reach.", new Color(0x4B, 0x00, 0x82));
|
||||
AddBoss(bossChecklist, calamity, "Ceaseless Void", order, bosses, DownedCeaselessVoid, summon, loot, collection, instructions, despawn);
|
||||
@@ -506,8 +506,8 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("StormWeaver", out float order);
|
||||
List<int> segments = new List<int>() { NPCType<StormWeaverHead>(), NPCType<StormWeaverBody>(), NPCType<StormWeaverTail>() };
|
||||
int summon = ItemType<RuneofCos>();
|
||||
List<int> loot = new List<int>() { ItemType<ArmoredShell>(), ItemType<TheStorm>(), ItemType<StormDragoon>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<WeaverTrophy>(), ItemType<StormWeaverMask>(), ItemType<KnowledgeSentinels>() };
|
||||
List<int> loot = new List<int>() { ItemType<StormWeaverBag>(), ItemType<ArmoredShell>(), ItemType<TheStorm>(), ItemType<StormDragoon>(), ItemType<LittleLight>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<WeaverTrophy>(), ItemType<StormWeaverMask>(), ItemType<GodSlayerHornedHelm>(), ItemType<GodSlayerVisage>(), ItemType<AncientGodSlayerHelm>(), ItemType<AncientGodSlayerChestplate>(), ItemType<AncientGodSlayerLeggings>(), ItemType<KnowledgeSentinels>() };
|
||||
string instructions = $"Use a [i:{summon}] in Space";
|
||||
string despawn = CalamityUtils.ColorMessage("Storm Weaver hid itself once again within the stormfront.", new Color(0xEE, 0x82, 0xEE));
|
||||
string bossLogTex = "CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist";
|
||||
@@ -519,8 +519,8 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("Signus", out float order);
|
||||
int type = NPCType<Signus>();
|
||||
int summon = ItemType<RuneofCos>();
|
||||
List<int> loot = new List<int>() { ItemType<TwistingNether>(), ItemType<Cosmilamp>(), ItemType<CosmicKunai>(), ItemType<LanternoftheSoul>(), ItemType<SpectralVeil>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<SignusTrophy>(), ItemType<SignusMask>(), ItemType<KnowledgeSentinels>() };
|
||||
List<int> loot = new List<int>() { ItemType<SignusBag>(), ItemType<TwistingNether>(), ItemType<Cosmilamp>(), ItemType<CosmicKunai>(), ItemType<LanternoftheSoul>(), ItemType<SpectralVeil>(), ItemType<SupremeHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<SignusTrophy>(), ItemType<SignusMask>(), ItemType<GodSlayerHornedHelm>(), ItemType<GodSlayerVisage>(), ItemType<AncientGodSlayerHelm>(), ItemType<AncientGodSlayerChestplate>(), ItemType<AncientGodSlayerLeggings>(), ItemType<KnowledgeSentinels>() };
|
||||
string instructions = $"Use a [i:{summon}] in the Underworld";
|
||||
string despawn = CalamityUtils.ColorMessage("The Devourer's assassin has finished its easy task.", new Color(0xBA, 0x55, 0xD3));
|
||||
AddBoss(bossChecklist, calamity, "Signus", order, type, DownedSignus, summon, loot, collection, instructions, despawn);
|
||||
@@ -556,7 +556,7 @@ namespace CalamityMod
|
||||
int type = NPCType<DevourerofGodsHead>();
|
||||
int summon = ItemType<CosmicWorm>();
|
||||
List<int> loot = new List<int>() { ItemType<DevourerofGodsBag>(), ItemType<CosmiliteBar>(), ItemType<CosmiliteBrick>(), ItemType<Excelsus>(), ItemType<TheObliterator>(), ItemType<Deathwind>(), ItemType<DeathhailStaff>(), ItemType<StaffoftheMechworm>(), ItemType<Eradicator>(), ItemType<Skullmasher>(), ItemType<Norfleet>(), ItemType<CosmicDischarge>(), ItemType<NebulousCore>(), ItemType<Fabsol>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<DevourerofGodsTrophy>(), ItemType<DevourerofGodsMask>(), ItemType<KnowledgeDevourerofGods>() };
|
||||
List<int> collection = new List<int>() { ItemType<DevourerofGodsTrophy>(), ItemType<DevourerofGodsMask>(), ItemType<SilvaHornedHelm>(), ItemType<SilvaMask>(), ItemType<KnowledgeDevourerofGods>() };
|
||||
string instructions = $"Use a [i:{summon}]";
|
||||
string despawn = CalamityUtils.ColorMessage("The Devourer of Gods has slain everyone and feasted on their essence.", new Color(0x00, 0xFF, 0xFF));
|
||||
string bossLogTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist";
|
||||
@@ -597,8 +597,8 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("SupremeCalamitas", out float order);
|
||||
int type = NPCType<SupremeCalamitas>();
|
||||
int summon = ItemType<EyeofExtinction>();
|
||||
List<int> loot = new List<int>() { ItemType<CalamitousEssence>(), ItemType<Vehemenc>(), ItemType<Heresy>(), ItemType<Perdition>(), ItemType<Vigilance>(), ItemType<Sacrifice>(), ItemType<Violence>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<SupremeCalamitasTrophy>(), ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
|
||||
List<int> loot = new List<int>() { ItemType<SCalBag>(), ItemType<CalamitousEssence>(), ItemType<Vehemenc>(), ItemType<Heresy>(), ItemType<Perdition>(), ItemType<Vigilance>(), ItemType<Sacrifice>(), ItemType<Violence>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<SupremeCalamitasTrophy>(), ItemType<AshenHorns>(), ItemType<SCalMask>(), ItemType<SCalRobes>(), ItemType<SCalBoots>(), ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
|
||||
string instructions = $"Use an [i:{summon}]";
|
||||
string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00));
|
||||
AddBoss(bossChecklist, calamity, "Supreme Calamitas", order, type, DownedSCal, summon, loot, collection, instructions, despawn);
|
||||
|
||||
@@ -759,8 +759,6 @@ namespace CalamityMod.NPCs
|
||||
|
||||
ResetSavedIndex(ref adultEidolonWyrmHead, NPCType<EidolonWyrmHeadHuge>());
|
||||
|
||||
CalamityGlobalTownNPC.ResetTownNPCNameBools(npc, mod);
|
||||
|
||||
// Reset the enraged state every frame. The expectation is that bosses will continuously set it back to true if necessary.
|
||||
CurrentlyEnraged = false;
|
||||
CanHaveBossHealthBar = false;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.NPCs
|
||||
#endregion
|
||||
|
||||
#region Town NPC Names
|
||||
public static void ResetTownNPCNameBools(NPC npc, Mod mod)
|
||||
public static void ResetTownNPCNameBools()
|
||||
{
|
||||
void ResetName(int npcID, ref bool nameBool)
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (Main.npc[(int)npc.ai[2]].ModNPC<DevourerofGodsHead>()?.AttemptingToEnterPortal ?? false)
|
||||
{
|
||||
Projectile portal = Main.projectile[Main.npc[(int)npc.ai[2]].ModNPC<DevourerofGodsHead>().PortalIndex];
|
||||
float newOpacity = 1f - Utils.InverseLerp(150f, 70f, npc.Distance(portal.Center), true);
|
||||
float newOpacity = 1f - Utils.InverseLerp(130f, 80f, npc.Distance(portal.Center), true);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && newOpacity > 0f && npc.Opacity > newOpacity)
|
||||
{
|
||||
npc.Opacity = newOpacity;
|
||||
|
||||
@@ -365,10 +365,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Rotation
|
||||
npc.rotation = npc.velocity.X * 0.003f;
|
||||
|
||||
// Light
|
||||
// Light and enrage check
|
||||
if (EnragedState == (float)Enraged.Yes)
|
||||
{
|
||||
Lighting.AddLight(npc.Center, 0.5f * npc.Opacity, 0f, 0f);
|
||||
npc.Calamity().CurrentlyEnraged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1033,7 +1033,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
// A general factor for the aura.
|
||||
// Used to cause fade-ins/outs as the attack starts/stops.
|
||||
float auraGeneralPower = Utils.InverseLerp(0f, deathrayTelegraphDuration * 0.333f, npc.Calamity().newAI[2], true);
|
||||
auraGeneralPower *= Utils.InverseLerp(deathrayTelegraphDuration + deathrayDuration, deathrayTelegraphDuration + deathrayDuration - 40f, npc.Calamity().newAI[2], true);
|
||||
auraGeneralPower *= Utils.InverseLerp(deathrayTelegraphDuration + deathrayDuration, deathrayTelegraphDuration + deathrayDuration, npc.Calamity().newAI[2], true);
|
||||
|
||||
// Determine the characteristics of the aura. This requires intermediate computations to determine if Thanatos is in its final phase as well as for pulsing.
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class ArtemisLaserBeamStart : ModProjectile
|
||||
public class ArtemisLaserBeamStart : BaseLaserbeamProjectile
|
||||
{
|
||||
public int OwnerIndex
|
||||
{
|
||||
get => (int)projectile.ai[0];
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
public override float MaxScale => 1f;
|
||||
public override float MaxLaserLength => 4800f;
|
||||
public override float Lifetime => 600;
|
||||
public override Color LaserOverlayColor => new Color(250, 180, 100, 100);
|
||||
public override Color LightCastColor => Color.White;
|
||||
public override Texture2D LaserBeginTexture => Main.projectileTexture[projectile.type];
|
||||
public override Texture2D LaserMiddleTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresLaserBeamMiddle");
|
||||
public override Texture2D LaserEndTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd");
|
||||
public override string Texture => "CalamityMod/Projectiles/Boss/AresLaserBeamStart";
|
||||
|
||||
public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[0]) ? Main.npc[(int)projectile.ai[0]] : null;
|
||||
public ref float RotationDirection => ref projectile.ai[1];
|
||||
public ref float Time => ref projectile.localAI[0];
|
||||
public ref float LengthOfLaser => ref projectile.localAI[1];
|
||||
public const int Lifetime = 180;
|
||||
public const float BeamPosOffset = 16f;
|
||||
private const int maxFrames = 5;
|
||||
private int frameDrawn = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ohio Beam");
|
||||
Main.projFrames[projectile.type] = 5;
|
||||
// This is its serious name
|
||||
// DisplayName.SetDefault("Exothermal Artemis Beam");
|
||||
}
|
||||
@@ -47,179 +50,128 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(frameDrawn);
|
||||
writer.Write(Time);
|
||||
writer.Write(LengthOfLaser);
|
||||
writer.Write(projectile.localAI[0]);
|
||||
writer.Write(projectile.localAI[1]);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
frameDrawn = reader.ReadInt32();
|
||||
Time = reader.ReadSingle();
|
||||
LengthOfLaser = reader.ReadSingle();
|
||||
projectile.localAI[0] = reader.ReadSingle();
|
||||
projectile.localAI[1] = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
public override void AttachToSomething()
|
||||
{
|
||||
// Difficulty modes
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
bool revenge = CalamityWorld.revenge || malice;
|
||||
bool expertMode = Main.expertMode || malice;
|
||||
if (Main.npc[OwnerIndex].active && Main.npc[OwnerIndex].type == ModContent.NPCType<Artemis>())
|
||||
{
|
||||
Vector2 fireFrom = Main.npc[OwnerIndex].Center + Vector2.UnitY * Main.npc[OwnerIndex].gfxOffY;
|
||||
fireFrom += projectile.velocity.SafeNormalize(Vector2.UnitY) * 78f;
|
||||
projectile.Center = fireFrom;
|
||||
}
|
||||
|
||||
// Die if the thing to attach to disappears.
|
||||
if (ThingToAttachTo is null || !ThingToAttachTo.active || ThingToAttachTo.Calamity().newAI[0] != 3f)
|
||||
// Die of the owner is invalid in some way.
|
||||
else
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
projectile.rotation = ThingToAttachTo.rotation;
|
||||
// Die if the owner is not performing Artemis' deathray attack.
|
||||
if (Main.npc[OwnerIndex].Calamity().newAI[0] != (float)Artemis.Phase.Deathray)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public override float DetermineLaserLength()
|
||||
{
|
||||
float[] sampledLengths = new float[10];
|
||||
Collision.LaserScan(projectile.Center, projectile.velocity, projectile.width * projectile.scale, MaxLaserLength, sampledLengths);
|
||||
|
||||
float newLaserLength = sampledLengths.Average();
|
||||
|
||||
// Fire laser through walls at max length if target is behind tiles.
|
||||
if (!Collision.CanHitLine(Main.npc[OwnerIndex].Center, 1, 1, Main.player[Main.npc[OwnerIndex].target].Center, 1, 1))
|
||||
newLaserLength = MaxLaserLength;
|
||||
|
||||
return newLaserLength;
|
||||
}
|
||||
|
||||
public override void UpdateLaserMotion()
|
||||
{
|
||||
projectile.rotation = Main.npc[OwnerIndex].rotation;
|
||||
projectile.velocity = (projectile.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
}
|
||||
|
||||
// Offset to move the beam forward so that it starts in Artemis' focus jewel thing.
|
||||
float beamStartForwardsOffset = 80f;
|
||||
|
||||
// Set the starting location of the beam to the center of the NPC.
|
||||
projectile.Center = ThingToAttachTo.Center;
|
||||
// Add a fixed offset to align with the NPC's spritesheet (?)
|
||||
projectile.position += projectile.velocity * BeamPosOffset + new Vector2(0f, -ThingToAttachTo.gfxOffY);
|
||||
// Add the forwards offset, measured in pixels.
|
||||
projectile.position += projectile.velocity * beamStartForwardsOffset;
|
||||
|
||||
Time++;
|
||||
if (Time >= Lifetime)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
float scale = 1f;
|
||||
projectile.scale = (float)Math.Sin(Time * MathHelper.Pi / Lifetime) * 10f * scale;
|
||||
if (projectile.scale > scale)
|
||||
projectile.scale = scale;
|
||||
|
||||
float arraySize = 3f;
|
||||
Vector2 samplingPoint = projectile.Center;
|
||||
float[] samples = new float[(int)arraySize];
|
||||
Collision.LaserScan(samplingPoint, projectile.velocity, projectile.width * projectile.scale, 4800f, samples);
|
||||
float laserLength = 0f;
|
||||
for (int i = 0; i < samples.Length; i++)
|
||||
{
|
||||
laserLength += samples[i];
|
||||
}
|
||||
laserLength /= arraySize;
|
||||
|
||||
// Fire laser through walls at max length if target cannot be seen
|
||||
if (!Collision.CanHitLine(ThingToAttachTo.Center, 1, 1, Main.player[ThingToAttachTo.target].Center, 1, 1))
|
||||
laserLength = 4800f;
|
||||
|
||||
float amount = 0.5f;
|
||||
LengthOfLaser = MathHelper.Lerp(LengthOfLaser, laserLength, amount);
|
||||
|
||||
// Spawn dust at the end of the beam
|
||||
int dustType = (int)CalamityDusts.Brimstone;
|
||||
Vector2 dustPos = projectile.Center + projectile.velocity * (LengthOfLaser - 14f);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float dustRot = projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float dustVelMult = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 dustVel = new Vector2((float)Math.Cos(dustRot) * dustVelMult, (float)Math.Sin(dustRot) * dustVelMult);
|
||||
int dust = Dust.NewDust(dustPos, 0, 0, dustType, dustVel.X, dustVel.Y, 0, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].scale = 1.7f;
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 dustRot = projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * projectile.width;
|
||||
int dust = Dust.NewDust(dustPos + dustRot - Vector2.One * 4f, 8, 8, dustType, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
Main.dust[dust].velocity.Y = -Math.Abs(Main.dust[dust].velocity.Y);
|
||||
}
|
||||
|
||||
DelegateMethods.v3_1 = new Vector3(0.3f, 0.65f, 0.7f);
|
||||
Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * LengthOfLaser, projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight));
|
||||
public override void PostAI()
|
||||
{
|
||||
// Determine frames.
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter % 5f == 0f)
|
||||
projectile.frame = (projectile.frame + 1) % Main.projFrames[projectile.type];
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
// This should never happen, but just in case.
|
||||
if (projectile.velocity == Vector2.Zero)
|
||||
return false;
|
||||
|
||||
Texture2D beamStart = Main.projectileTexture[projectile.type];
|
||||
Texture2D beamMiddle = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresLaserBeamMiddle");
|
||||
Texture2D beamEnd = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd");
|
||||
Color beamColor = LaserOverlayColor;
|
||||
Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
|
||||
float drawLength = LengthOfLaser;
|
||||
Color color = new Color(250, 180, 100, 100);
|
||||
// Start texture drawing.
|
||||
spriteBatch.Draw(LaserBeginTexture,
|
||||
projectile.Center - Main.screenPosition,
|
||||
startFrameArea,
|
||||
beamColor,
|
||||
projectile.rotation,
|
||||
LaserBeginTexture.Size() / 2f,
|
||||
projectile.scale,
|
||||
SpriteEffects.FlipVertically,
|
||||
0f);
|
||||
|
||||
if (Time % 5 == 0)
|
||||
// Prepare things for body drawing.
|
||||
float laserBodyLength = LaserLength + middleFrameArea.Height;
|
||||
Vector2 centerOnLaser = projectile.Center + projectile.velocity * projectile.scale * 5f;
|
||||
|
||||
// Body drawing.
|
||||
if (laserBodyLength > 0f)
|
||||
{
|
||||
frameDrawn++;
|
||||
if (frameDrawn >= maxFrames)
|
||||
frameDrawn = 0;
|
||||
}
|
||||
|
||||
// Draw start of beam
|
||||
Vector2 vector = projectile.Center - Main.screenPosition;
|
||||
Rectangle? sourceRectangle = new Rectangle(0, beamStart.Height / maxFrames * frameDrawn, beamStart.Width, beamStart.Height / maxFrames);
|
||||
spriteBatch.Draw(beamStart, vector, sourceRectangle, color, projectile.rotation, new Vector2(beamStart.Width, beamStart.Height / maxFrames) / 2f, projectile.scale, SpriteEffects.None, 0f);
|
||||
|
||||
// Draw middle of beam
|
||||
drawLength -= (beamStart.Height / maxFrames / 2 + beamEnd.Height / maxFrames) * projectile.scale;
|
||||
Vector2 center = projectile.Center;
|
||||
center += projectile.velocity * projectile.scale * beamStart.Height / maxFrames / 2f;
|
||||
if (drawLength > 0f)
|
||||
{
|
||||
float i = 0f;
|
||||
int middleFrameDrawn = frameDrawn;
|
||||
while (i + 1f < drawLength)
|
||||
float laserOffset = middleFrameArea.Height * projectile.scale;
|
||||
float incrementalBodyLength = 0f;
|
||||
while (incrementalBodyLength + 1f < laserBodyLength)
|
||||
{
|
||||
Rectangle rectangle = new Rectangle(0, beamMiddle.Height / maxFrames * middleFrameDrawn, beamMiddle.Width, beamMiddle.Height / maxFrames);
|
||||
|
||||
if (drawLength - i < rectangle.Height)
|
||||
rectangle.Height = (int)(drawLength - i);
|
||||
|
||||
spriteBatch.Draw(beamMiddle, center - Main.screenPosition, rectangle, color, projectile.rotation, new Vector2(rectangle.Width / 2f, 0f), projectile.scale, SpriteEffects.None, 0f);
|
||||
|
||||
middleFrameDrawn++;
|
||||
if (middleFrameDrawn >= maxFrames)
|
||||
middleFrameDrawn = 0;
|
||||
|
||||
i += rectangle.Height * projectile.scale;
|
||||
center += projectile.velocity * rectangle.Height * projectile.scale;
|
||||
|
||||
rectangle.Y += beamMiddle.Height / maxFrames;
|
||||
if (rectangle.Y + rectangle.Height > beamMiddle.Height / maxFrames)
|
||||
rectangle.Y = 0;
|
||||
spriteBatch.Draw(LaserMiddleTexture,
|
||||
centerOnLaser - Main.screenPosition,
|
||||
middleFrameArea,
|
||||
beamColor,
|
||||
projectile.rotation,
|
||||
LaserMiddleTexture.Size() * 0.5f,
|
||||
projectile.scale,
|
||||
SpriteEffects.None,
|
||||
0f);
|
||||
incrementalBodyLength += laserOffset;
|
||||
centerOnLaser += projectile.velocity * laserOffset;
|
||||
middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[projectile.type];
|
||||
if (middleFrameArea.Y + middleFrameArea.Height > LaserMiddleTexture.Height)
|
||||
middleFrameArea.Y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw end of beam
|
||||
Vector2 vector2 = center - Main.screenPosition;
|
||||
sourceRectangle = new Rectangle(0, beamEnd.Height / maxFrames * frameDrawn, beamEnd.Width, beamEnd.Height / maxFrames);
|
||||
spriteBatch.Draw(beamEnd, vector2, sourceRectangle, color, projectile.rotation, new Vector2(beamEnd.Width, beamEnd.Height / maxFrames) / 2f, projectile.scale, SpriteEffects.None, 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Vector2 unit = projectile.velocity;
|
||||
Utils.PlotTileLine(projectile.Center, projectile.Center + unit * LengthOfLaser, projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles));
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (projHitbox.Intersects(targetHitbox))
|
||||
return true;
|
||||
|
||||
float collisionPoint = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * LengthOfLaser, 30f * projectile.scale, ref collisionPoint))
|
||||
return true;
|
||||
|
||||
Vector2 laserEndCenter = centerOnLaser - Main.screenPosition;
|
||||
spriteBatch.Draw(LaserEndTexture,
|
||||
laserEndCenter,
|
||||
endFrameArea,
|
||||
beamColor,
|
||||
projectile.rotation,
|
||||
LaserEndTexture.Size() * 0.5f,
|
||||
projectile.scale,
|
||||
SpriteEffects.FlipVertically,
|
||||
0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 60000;
|
||||
projectile.hide = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -44,24 +45,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.Kill();
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
public override void DrawBehind(int index, List<int> drawCacheProjsBehindNPCsAndTiles, List<int> drawCacheProjsBehindNPCs, List<int> drawCacheProjsBehindProjectiles, List<int> drawCacheProjsOverWiresUI)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server && Filters.Scene["CalamityMod:DoGPortal"].IsActive())
|
||||
Filters.Scene["CalamityMod:DoGPortal"].Deactivate();
|
||||
drawCacheProjsOverWiresUI.Add(index);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
// Manage a screen shader that acts as the projectile.
|
||||
if (Filters.Scene["CalamityMod:DoGPortal"].IsActive())
|
||||
Filters.Scene["CalamityMod:DoGPortal"].Deactivate();
|
||||
spriteBatch.EnterShaderRegion();
|
||||
|
||||
Filters.Scene.Activate("CalamityMod:DoGPortal", projectile.Center).GetShader().UseTargetPosition(projectile.Center);
|
||||
Filters.Scene["CalamityMod:DoGPortal"].GetShader().UseImage("Images/Misc/Perlin");
|
||||
Filters.Scene["CalamityMod:DoGPortal"].GetShader().UseColor(Color.Cyan);
|
||||
Filters.Scene["CalamityMod:DoGPortal"].GetShader().UseSecondaryColor(Color.Fuchsia);
|
||||
Filters.Scene["CalamityMod:DoGPortal"].GetShader().UseImage(ModContent.GetTexture("CalamityMod/ExtraTextures/VoronoiShapes"));
|
||||
Filters.Scene["CalamityMod:DoGPortal"].GetShader().UseProgress(projectile.scale);
|
||||
Texture2D noiseTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/VoronoiShapes");
|
||||
Vector2 drawPosition = projectile.Center - Main.screenPosition;
|
||||
Vector2 origin = noiseTexture.Size() * 0.5f;
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"].UseOpacity(projectile.scale);
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"].UseColor(Color.Cyan);
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"].UseSecondaryColor(Color.Fuchsia);
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"].Apply();
|
||||
|
||||
spriteBatch.Draw(noiseTexture, drawPosition, null, Color.White, 0f, origin, 3.5f, SpriteEffects.None, 0f);
|
||||
spriteBatch.ExitShaderRegion();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
player.ChangeDir(projectile.direction);
|
||||
player.itemTime = 2;
|
||||
player.itemAnimation = 2;
|
||||
player.itemRotation = projectile.rotation * projectile.direction;
|
||||
player.itemRotation = CalamityUtils.WrapAngle90Degrees(projectile.rotation);
|
||||
}
|
||||
|
||||
private void OnShrinkEffects()
|
||||
|
||||
@@ -60,9 +60,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
// Every so often, generate some lightning at a nearby enemy, if one exists.
|
||||
if (Time % LightningFireRate == 0f && Main.myPlayer == projectile.owner)
|
||||
{
|
||||
int lightningDamage = projectile.damage;
|
||||
int totalSystemBanes = Main.player[projectile.owner].ownedProjectileCounts[projectile.type];
|
||||
|
||||
// Make the damage of the lightning have diminishing returns depending on how many systems are present.
|
||||
lightningDamage = (int)Math.Ceiling(lightningDamage / Math.Pow(totalSystemBanes, 1D / 3D));
|
||||
|
||||
NPC potentialTarget = projectile.Center.ClosestNPCAt(900f);
|
||||
if (potentialTarget != null)
|
||||
Projectile.NewProjectile(projectile.Center, projectile.SafeDirectionTo(potentialTarget.Center) * 15f, ModContent.ProjectileType<SystemBaneLightning>(), projectile.damage, projectile.knockBack, projectile.owner);
|
||||
Projectile.NewProjectile(projectile.Center, projectile.SafeDirectionTo(potentialTarget.Center) * 15f, ModContent.ProjectileType<SystemBaneLightning>(), lightningDamage, projectile.knockBack, projectile.owner);
|
||||
}
|
||||
|
||||
// Sometimes generate lightning from the outside of the energy field if the projectile was spawned by a stealth strike.
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:TrailStreak"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.GetTexture("CalamityMod/ExtraTextures/FabstaffStreak"));
|
||||
TrailDrawer.Draw(projectile.oldPos, projectile.Size * 0.5f - Main.screenPosition, 120, projectile.oldRot);
|
||||
TrailDrawer.Draw(projectile.oldPos, projectile.Size * 0.5f - Main.screenPosition, 80, projectile.oldRot);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.GetTexture("CalamityMod/ExtraTextures/ScarletDevilStreak"));
|
||||
TrailDrawer.Draw(projectile.oldPos, projectile.Size * 0.5f - Main.screenPosition, 76);
|
||||
TrailDrawer.Draw(projectile.oldPos, projectile.Size * 0.5f - Main.screenPosition, 32);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.hide = true;
|
||||
projectile.timeLeft = 90000;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.tileCollide = false;
|
||||
projectile.magic = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 90000;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
for (int i = 0; i < projectile.oldPos.Length; i++)
|
||||
{
|
||||
float hitboxRadius = CongregationDiameter * MathHelper.Lerp(0.45f, 0.17f, i / (float)projectile.oldPos.Length);
|
||||
float hitboxRadius = CongregationDiameter * MathHelper.Lerp(0.45f, 0.17f, i / (float)projectile.oldPos.Length) * 1.4f;
|
||||
Vector2 hitboxCircle = Vector2.One * hitboxRadius;
|
||||
if (CalamityUtils.CircularHitboxCollision(projectile.oldPos[i] + hitboxCircle * 0.5f, hitboxRadius, targetHitbox))
|
||||
return true;
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 80;
|
||||
projectile.height = 34;
|
||||
projectile.width = 58;
|
||||
projectile.height = 94;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
@@ -113,7 +113,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
projectile.Center = player.RotatedRelativePoint(player.MountedCenter, true) + projectile.velocity.SafeNormalize(Vector2.UnitX * player.direction) * 6f;
|
||||
projectile.Center = player.RotatedRelativePoint(player.MountedCenter, true) + projectile.velocity.SafeNormalize(Vector2.UnitX * player.direction) * 8f;
|
||||
projectile.position.Y -= 8f;
|
||||
projectile.spriteDirection = projectile.direction;
|
||||
projectile.timeLeft = 2;
|
||||
player.ChangeDir(projectile.direction);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
// TODO - Abstract away most of the direct vector math away in here into things like SafeDirectionTo calls.
|
||||
public class AtaraxiaHoming : ModProjectile
|
||||
{
|
||||
private static int NumAnimationFrames = 5;
|
||||
@@ -106,11 +109,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
dx *= homingFactor;
|
||||
dy *= homingFactor;
|
||||
|
||||
// The projectile loses 1/6th of its current velocity and replaces it with homing power.
|
||||
float homingStrength = 6f;
|
||||
// The projectile loses 1/5th of its current velocity and replaces it with homing power.
|
||||
float homingStrength = 5f;
|
||||
projectile.velocity.X = (projectile.velocity.X * (homingStrength - 1f) + dx) / homingStrength;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * (homingStrength - 1f) + dy) / homingStrength;
|
||||
|
||||
// And then approaches the homing velocity by an increment of 0.3.
|
||||
projectile.velocity = projectile.velocity.MoveTowards(new Vector2(dx, dy), 0.3f);
|
||||
|
||||
// Re-scale resulting velocity to the projectile's set maximum speed
|
||||
projectile.velocity.Normalize();
|
||||
projectile.velocity *= speed;
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
DisplayName.SetDefault("Daawnlight");
|
||||
Main.projFrames[projectile.type] = 12;
|
||||
Main.projPet[projectile.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
}
|
||||
|
||||
int baseUseTime = 35;
|
||||
int baseUseTime = 38;
|
||||
int modifier = 3;
|
||||
bool timeToFire = false;
|
||||
if (projectile.ai[1] <= 0f)
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
projectile.localAI[0]++;
|
||||
if (projectile.localAI[0] > 30f) //dragon dust trail counter, but only empowered proj spawns it
|
||||
if (projectile.localAI[0] > 60f) //dragon dust trail counter, but only empowered proj spawns it
|
||||
{
|
||||
projectile.localAI[0] = 0f;
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
vel.X += Main.rand.Next(-100, 101);
|
||||
vel.Normalize();
|
||||
vel *= 30f;
|
||||
Projectile.NewProjectile(pos, vel + target.velocity, ModContent.ProjectileType<SkyFlareFriendly>(), projectile.damage * 3, projectile.knockBack * 5f, projectile.owner);
|
||||
Projectile.NewProjectile(pos, vel + target.velocity, ModContent.ProjectileType<SkyFlareFriendly>(), (int)(projectile.damage * 1.5f), projectile.knockBack * 5f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.localAI[0] = 1f;
|
||||
}
|
||||
projectile.rotation += Math.Sign(projectile.velocity.X) * MathHelper.ToRadians(8f);
|
||||
if (projectile.velocity.Y < 15f)
|
||||
projectile.velocity.Y += 0.3f;
|
||||
if (projectile.velocity.Y < 10f)
|
||||
projectile.velocity.Y += 0.2f;
|
||||
|
||||
if (CollideX && BounceEffectCooldown == 0)
|
||||
{
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Main.PlaySound(SoundID.Item, projectile.Center, 103);
|
||||
int proj = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(projectile.damage * 0.33), projectile.knockBack, projectile.owner);
|
||||
Main.projectile[proj].timeLeft += 20;
|
||||
Main.projectile[proj].Center = projectile.Center;
|
||||
Main.projectile[proj].Calamity().rogue = true;
|
||||
}
|
||||
@@ -72,6 +73,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Main.PlaySound(SoundID.Item, projectile.Center, 103);
|
||||
int proj = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<ShadowflameExplosionBig>(), (int)(projectile.damage * 0.33), projectile.knockBack, projectile.owner);
|
||||
Main.projectile[proj].timeLeft += 20;
|
||||
Main.projectile[proj].Center = projectile.Center;
|
||||
Main.projectile[proj].Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.penetrate = 2;
|
||||
projectile.aiStyle = 2;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 14;
|
||||
aiType = ProjectileID.ThrowingKnife;
|
||||
projectile.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Point result;
|
||||
if (WorldUtils.Find(projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
|
||||
{
|
||||
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<SubductionFlameburst>(), projectile.damage, 2f, projectile.owner, 1f);
|
||||
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType<SubductionFlameburst>(), (int)(projectile.damage * 1.5f), 2f, projectile.owner, 1f);
|
||||
projectile.localAI[0] = 30f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,15 +19,17 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.penetrate = 4;
|
||||
projectile.localNPCHitCooldown = 13;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -35,14 +35,18 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 44, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
// Die early.
|
||||
if (projectile.timeLeft < 240)
|
||||
projectile.Kill();
|
||||
|
||||
projectile.localAI[0] += Main.rand.Next(0,3);
|
||||
if (projectile.localAI[0] >= 10f)
|
||||
{
|
||||
if (projectile.localAI[0] >= 10f)
|
||||
{
|
||||
projectile.localAI[0] = 0f;
|
||||
Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.NextFloat(-10f,10f), Main.rand.NextFloat(-10f,10f)),
|
||||
(projectile.velocity).RotatedByRandom(0.1f) * 0.25f,
|
||||
ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
|
||||
}
|
||||
Vector2 flowerSpawnPosition = projectile.Center + Main.rand.NextVector2Square(-10f, 10f);
|
||||
Vector2 flowerShootVelocity = projectile.velocity.RotatedByRandom(0.1f) * 0.25f;
|
||||
Projectile.NewProjectile(flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
cinder.scale = 1f + cinder.velocity.Length() * 0.17f;
|
||||
cinder.noGravity = true;
|
||||
|
||||
int shootRate = (int)MathHelper.Lerp(24f, 3f, Utils.InverseLerp(0f, 300f, AttackTime, true));
|
||||
int shootRate = (int)MathHelper.Lerp(24f, 6f, Utils.InverseLerp(0f, 300f, AttackTime, true));
|
||||
AttackTimer++;
|
||||
|
||||
if (AttackTimer < shootRate || Main.myPlayer != projectile.owner)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.ignoreWater = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = projectile.MaxUpdates * 9;
|
||||
projectile.minionSlots = 4f;
|
||||
projectile.minionSlots = 5f;
|
||||
projectile.timeLeft = 90000;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 398 B |
@@ -589,7 +589,8 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
ModContent.TileType<DraedonLabTurret>(),
|
||||
ModContent.TileType<AstralBeacon>(),
|
||||
ModContent.TileType<CodebreakerTile>()
|
||||
ModContent.TileType<CodebreakerTile>(),
|
||||
ModContent.TileType<SCalAltar>()
|
||||
};
|
||||
|
||||
Tile checkTile = CalamityUtils.ParanoidTileRetrieval(x, y);
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Void Condenser");
|
||||
AddMapEntry(new Color(191, 142, 111), name);
|
||||
animationFrameHeight = 54;
|
||||
animationFrameHeight = 46;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -254,7 +254,7 @@ namespace CalamityMod.UI.CalamitasEnchants
|
||||
player => player.Calamity().witheringWeaponEnchant = true,
|
||||
item => item.IsEnchantable() && item.damage > 0 && !item.summon),
|
||||
|
||||
new Enchantment("Persecuted", "When attacked, or over time, demon portals appear near you. If sufficiently damaged they are friendly; otherwise they attack you.",
|
||||
new Enchantment("Persecuted", "When attacked, or over time, demon portals appear near you. If sufficiently damaged they are friendly; otherwise they attack you. They become angered if a portal is damaged.",
|
||||
1100,
|
||||
"CalamityMod/ExtraTextures/UI/EnchantmentSymbols/CurseIcon_Persecuted",
|
||||
null,
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Waters
|
||||
internal static void Unload()
|
||||
{
|
||||
foreach (CustomLavaStyle lavaStyle in CustomLavaStyles)
|
||||
lavaStyle.Unload();
|
||||
lavaStyle?.Unload();
|
||||
|
||||
CustomLavaStyles = null;
|
||||
LavaBlockTexture = null;
|
||||
|
||||
Reference in new issue
Block a user