Merge: Evil Smasher rework
This commit is contained in:
16 files changed
+687
-22
No files matched your search
@@ -454,6 +454,9 @@ namespace CalamityMod.CalPlayer
|
||||
public int consecutiveCaughtFish = 0;
|
||||
public float WeakTimeFreezeUseTimer = 0;
|
||||
public bool WeakTimeFreezeInUse = false;
|
||||
|
||||
public int DemonAltarDialogueCounter = 0;
|
||||
public int DemonAltarDialogueCooldown = 0;
|
||||
#endregion
|
||||
|
||||
#region Sound
|
||||
@@ -2642,6 +2645,9 @@ namespace CalamityMod.CalPlayer
|
||||
blunderBoosterVisibility = true;
|
||||
veneratedLocket = false;
|
||||
|
||||
if (DemonAltarDialogueCooldown > 0)
|
||||
DemonAltarDialogueCooldown--;
|
||||
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
daybroken = false;
|
||||
|
||||
@@ -469,6 +469,14 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Modify Hit NPC
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (target.HasBuff<SmashedEvil>())
|
||||
{
|
||||
//This is essentially 10 AP, but independent of armor amount
|
||||
modifiers.FlatBonusDamage += 5;
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
modifiers.CritDamage += critDamage;
|
||||
|
||||
@@ -69,6 +69,8 @@ using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Tiles.FurnitureAuric;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.DialogueDisplay;
|
||||
using CalamityMod.UI.DialogueDisplay.DisplayEffects;
|
||||
using CalamityMod.Utilities;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -1139,8 +1141,39 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
private void DemonAltarTalking()
|
||||
{
|
||||
|
||||
for (var h = -15; h < 15; h++)
|
||||
{
|
||||
for (var j = -15; j < 15; j++)
|
||||
{
|
||||
var tilePos = Player.Center.ToTileCoordinates() + new Point(h, j);
|
||||
if (Main.tile[tilePos.X, tilePos.Y].TileType == TileID.DemonAltar)
|
||||
{
|
||||
string type = WorldGen.crimson ? "Mods.CalamityMod.EvilSmasher.CrimsonAltar" : "Mods.CalamityMod.EvilSmasher.DemonAltar";
|
||||
if (DialogueDisplaySystem.ContainsDialogueKey(type))
|
||||
DialogueDisplaySystem.RemoveDialogue(DialogueDisplaySystem.GetSlot(type));
|
||||
DialogueDisplaySystem.StartDialogueOnClient(type, new Vector2(tilePos.X * 16 + 16, tilePos.Y * 16), DemonAltarDialogueCounter, 180, false, new AltarText());
|
||||
DemonAltarDialogueCounter++;
|
||||
DemonAltarDialogueCooldown = 300;
|
||||
if (DemonAltarDialogueCounter >= 4)
|
||||
{
|
||||
DemonAltarDialogueCooldown = 3600;
|
||||
DemonAltarDialogueCounter = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void MiscEffects()
|
||||
{
|
||||
if (Player.inventory.Any(x => x.type == ItemID.Pwnhammer) && !Player.inventory.Any(x => x.type == ModContent.ItemType<EvilSmasher>()) && Player.adjTile[TileID.DemonAltar] && DemonAltarDialogueCooldown <= 0 && Player.miscCounter % 30 == 0)
|
||||
{
|
||||
DemonAltarTalking();
|
||||
}
|
||||
|
||||
//Mana Burn update
|
||||
if (ManaBurnFireDrawer != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user