Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
b8fdbfe056
11 files changed
+63
-41
No files matched your search
@@ -204,43 +204,69 @@ namespace CalamityMod.CalPlayer
|
||||
public bool HandleHorizontalDash(out DashDirection direction)
|
||||
{
|
||||
direction = DashDirection.Directionless;
|
||||
bool justDashed = false;
|
||||
bool dashWasExecuted = false;
|
||||
|
||||
// If the manual hotkey is bound, standard Terraria dashes cannot be triggered by double tapping.
|
||||
bool manualHotkeyBound = CalamityKeybinds.DashHotkey.GetAssignedKeys().Count > 0;
|
||||
bool pressedManualHotkey = CalamityKeybinds.DashHotkey.JustPressed;
|
||||
var manualDashHotkeys = CalamityKeybinds.DashHotkey.GetAssignedKeys();
|
||||
bool manualHotkeyBound = (manualDashHotkeys?.Count ?? 0) > 0;
|
||||
bool pressedManualHotkey = manualHotkeyBound && CalamityKeybinds.DashHotkey.JustPressed;
|
||||
|
||||
bool vanillaRightDashInput = Player.controlRight && Player.releaseRight && !manualHotkeyBound;
|
||||
bool manualRightDashInput = pressedManualHotkey && Player.direction == 1;
|
||||
bool executeRightDash = vanillaRightDashInput || manualRightDashInput;
|
||||
int dashDirectionToUse = 0;
|
||||
|
||||
bool vanillaLeftDashInput = Player.controlLeft && Player.releaseLeft && !manualHotkeyBound;
|
||||
bool manualLeftDashInput = pressedManualHotkey && Player.direction == -1;
|
||||
bool executeLeftDash = vanillaLeftDashInput || manualLeftDashInput;
|
||||
// The manual hotkey is bound. Dashing is controlled solely by this hotkey. Vanilla inputs will not function.
|
||||
if (pressedManualHotkey)
|
||||
{
|
||||
// If you are holding D but not A, then always dash right.
|
||||
if (Player.controlRight && !Player.controlLeft)
|
||||
dashDirectionToUse = 1;
|
||||
// If you are holding A but not D, then always dash left.
|
||||
else if (Player.controlLeft && !Player.controlRight)
|
||||
dashDirectionToUse = -1;
|
||||
|
||||
if (executeRightDash)
|
||||
// If you are holding neither A nor D, or holding both, then dash in the direction the player is moving.
|
||||
// If the player is not moving at all, then dash the direction the player is facing.
|
||||
else
|
||||
{
|
||||
if (MathF.Abs(Player.velocity.X) <= 0.01f)
|
||||
dashDirectionToUse = Player.direction;
|
||||
else
|
||||
dashDirectionToUse = Player.velocity.X > 0f ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
// The manual hotkey is not bound. Dashing is controlled via vanilla inputs.
|
||||
else if (!manualHotkeyBound)
|
||||
{
|
||||
// Check whether or not a horizontal dash was declared via vanilla methods this frame.
|
||||
bool vanillaLeftDashInput = !manualHotkeyBound && Player.controlLeft && Player.releaseLeft;
|
||||
bool vanillaRightDashInput = !manualHotkeyBound && Player.controlRight && Player.releaseRight;
|
||||
dashDirectionToUse = vanillaRightDashInput ? 1 : vanillaLeftDashInput ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
if (dashDirectionToUse == 1)
|
||||
{
|
||||
if (dashTimeMod > 0 || pressedManualHotkey)
|
||||
{
|
||||
direction = DashDirection.Right;
|
||||
justDashed = true;
|
||||
dashWasExecuted = true;
|
||||
dashTimeMod = 0;
|
||||
}
|
||||
else
|
||||
dashTimeMod = 15;
|
||||
}
|
||||
else if (executeLeftDash)
|
||||
else if (dashDirectionToUse == -1)
|
||||
{
|
||||
if (dashTimeMod < 0 || pressedManualHotkey)
|
||||
{
|
||||
direction = DashDirection.Left;
|
||||
justDashed = true;
|
||||
dashWasExecuted = true;
|
||||
dashTimeMod = 0;
|
||||
}
|
||||
else
|
||||
dashTimeMod = -15;
|
||||
}
|
||||
return justDashed;
|
||||
return dashWasExecuted;
|
||||
}
|
||||
|
||||
public bool HandleOmnidirectionalDash(out DashDirection direction)
|
||||
|
||||
@@ -34,10 +34,12 @@ namespace CalamityMod.Items.Accessories
|
||||
//No lifesteal, no regen, no healing pots
|
||||
if (player.statLife >= (int)(player.statLifeMax2 * 0.5f))
|
||||
{
|
||||
player.statLife = (int)(player.statLifeMax2 * 0.5f);
|
||||
player.lifeRegenCount = 0;
|
||||
player.statLife = (int)(player.statLifeMax2 * 0.5f);
|
||||
player.moonLeech = true;
|
||||
modPlayer.healingPotBonus = 0;
|
||||
|
||||
if (player.lifeRegenCount > 0)
|
||||
player.lifeRegenCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,6 +330,7 @@ namespace CalamityMod.Items
|
||||
evilBossTwo.Add(ModContent.ItemType<AerialiteOre>(), 5, 16, 28); // 20% 16-28 Aerialite Ore
|
||||
evilBossTwo.Add(ModContent.ItemType<AerialiteBar>(), fifteenPercent, 4, 7); // 15% 4-7 Aerialite Bar
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofSunlight>(), 5, 2, 4); // 20% 2-4 Essence of Sunlight
|
||||
loot.AddIf(() => NPC.downedMoonlord, ModContent.ItemType<ExodiumCluster>(), 5, 16, 28); // 20% 16-28 Exodium Clusters
|
||||
break;
|
||||
|
||||
case ItemID.FrozenCrate:
|
||||
@@ -342,7 +343,7 @@ namespace CalamityMod.Items
|
||||
|
||||
case ItemID.LavaCrate:
|
||||
case ItemID.LavaCrateHard:
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofHavoc>(), 5, 2, 4); // 20% 2-4 Essence of Chaos
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofHavoc>(), 5, 2, 4); // 20% 2-4 Essence of Havoc
|
||||
break;
|
||||
|
||||
// Calamity does not touch Oasis Crates yet
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Vehemence");
|
||||
Tooltip.SetDefault("Casts intense bolts of hellish power that explode into skulls\n" +
|
||||
"Direct hits inflict Demon Flames for an extended period of time");
|
||||
Tooltip.SetDefault("Casts intense bolts of hellish power that explode into skulls");
|
||||
Item.staff[Item.type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Catastrophe Claymore");
|
||||
Tooltip.SetDefault("Fires sparkles which inflicts Frostbite, Hellfire, or Ichor");
|
||||
Tooltip.SetDefault("Fires sparkles which inflict Frostbite, Hellfire, or Ichor");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -144,10 +143,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 240);
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
target.AddBuff(BuffID.OnFire, 360);
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
|
||||
if (!target.canGhostHeal || player.moonLeech)
|
||||
return;
|
||||
@@ -159,10 +155,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 240);
|
||||
target.AddBuff(BuffID.Frostburn, 300);
|
||||
target.AddBuff(BuffID.OnFire, 360);
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
|
||||
@@ -24,9 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.damage = 37;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 18;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 20;
|
||||
Item.knockBack = 1f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = Item.height = 120;
|
||||
Item.damage = 616;
|
||||
Item.knockBack = 8.5f;
|
||||
Item.useAnimation = 16; //Has to be different than UseTime to prevent clockwork
|
||||
Item.useTime = 17;
|
||||
Item.useAnimation = Item.useTime = 17;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 18f;
|
||||
|
||||
@@ -25,9 +25,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.damage = 150;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 37; //Has to be different than UseTime to prevent clockwork
|
||||
Item.useAnimation = Item.useTime = 38;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 38;
|
||||
Item.knockBack = 10f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace CalamityMod
|
||||
public const string CalamityWikiURL = "https://calamitymod.wiki.gg/wiki/{}";
|
||||
|
||||
/// <summary>
|
||||
/// <b>Vanilla main bosses:</b><br />
|
||||
/// 1.0 = King Slime<br />
|
||||
/// 2.0 = Eye of Cthulhu<br />
|
||||
/// 3.0 = Eater of Worlds / Brain of Cthulhu<br />
|
||||
@@ -156,12 +157,12 @@ namespace CalamityMod
|
||||
{ "Crabulon", 2.7f },
|
||||
{ "HiveMind", 3.98f },
|
||||
{ "Perforators", 3.99f },
|
||||
{ "SlimeGod", 6.5f },
|
||||
{ "SlimeGod", 6.7f }, // Thorium Granite Energy Storm is 6.4f, Buried Champion is 6.5f, and Star Scouter is 6.9f
|
||||
{ "Cryogen", 8.5f },
|
||||
{ "AquaticScourge", 9.5f },
|
||||
{ "CragmawMire", 9.52f },
|
||||
{ "BrimstoneElemental", 10.5f },
|
||||
{ "CalamitasClone", 11.7f },
|
||||
{ "CalamitasClone", 11.7f }, // Thorium Lich is 11.6f
|
||||
{ "GreatSandShark", 12.09f },
|
||||
{ "Leviathan", 12.8f },
|
||||
{ "AstrumAureus", 12.81f },
|
||||
@@ -170,10 +171,10 @@ namespace CalamityMod
|
||||
{ "AstrumDeus", 17.5f },
|
||||
{ "ProfanedGuardians", 18.5f },
|
||||
{ "Dragonfolly", 18.6f },
|
||||
{ "Providence", 19.01f }, // Thorium's Ragnarok will most likely be 19f
|
||||
{ "CeaselessVoid", 19.5f },
|
||||
{ "StormWeaver", 19.51f },
|
||||
{ "Signus", 19.52f },
|
||||
{ "Providence", 19f }, // Thorium Primordials (Ragnarok) is 19.5f
|
||||
{ "CeaselessVoid", 19.6f },
|
||||
{ "StormWeaver", 19.61f },
|
||||
{ "Signus", 19.62f },
|
||||
{ "Polterghast", 20f },
|
||||
{ "Mauler", 20.491f },
|
||||
{ "NuclearTerror", 20.492f },
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -418,6 +419,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
npcLoot.AddIf(() => NPC.downedGolemBoss, ItemID.MartianConduitPlating, 1, 10, 30);
|
||||
npcLoot.Add(ModContent.ItemType<EssenceofSunlight>(), 3);
|
||||
npcLoot.Add(ModContent.ItemType<TheTransformer>(), 10);
|
||||
var postML = npcLoot.DefineConditionalDropSet(() => NPC.downedMoonlord);
|
||||
postML.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<ExodiumCluster>(), 1, 8, 12, 11, 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user