Merge branch 'master' into laser-fixes
No files matched your search
@@ -11,7 +11,11 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
public override void Update(int type, Player player, ref int buffIndex)
|
||||
{
|
||||
if (type == BuffID.Panic)
|
||||
if (type == BuffID.MagicPower)
|
||||
{
|
||||
player.magicDamage -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.Panic)
|
||||
{
|
||||
player.moveSpeed -= 0.5f;
|
||||
}
|
||||
@@ -85,9 +89,13 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
|
||||
//Vanilla buffs
|
||||
// Vanilla buffs
|
||||
switch (type)
|
||||
{
|
||||
case BuffID.MagicPower:
|
||||
tip = "10% increased magic damage";
|
||||
break;
|
||||
|
||||
case BuffID.Archery:
|
||||
tip = "20% increased arrow speed and 1.05x arrow damage";
|
||||
break;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Devotion");
|
||||
Description.SetDefault("The profaned soul within has been defiled by the powerful magic of a supreme witch");
|
||||
Description.SetDefault("");
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (CalamityWorld.downedSCal && (player.Calamity().minionSlotStat - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce)
|
||||
if (CalamityWorld.downedSCal && CalamityWorld.downedExoMechs && (player.Calamity().minionSlotStat - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce)
|
||||
{
|
||||
player.Calamity().profanedCrystalBuffs = true;
|
||||
}
|
||||
@@ -47,10 +47,14 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
(enrage ? "\nYour weakened life force fuels your desperate attacks" : "");
|
||||
}
|
||||
}
|
||||
else if (CalamityWorld.downedSCal)
|
||||
else if (CalamityWorld.downedSCal && CalamityWorld.downedExoMechs)
|
||||
{
|
||||
tip = "Your profaned soul is constrained by your insufficient summoning powers";
|
||||
}
|
||||
else
|
||||
{
|
||||
tip = !CalamityWorld.downedExoMechs ? "The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations" : "The profaned soul within has been defiled by the powerful magic of a supreme witch";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,11 +140,16 @@ namespace CalamityMod.CalPlayer
|
||||
public bool GivenBrimstoneLocus = false;
|
||||
public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount];
|
||||
public float SmoothenedMinecartRotation;
|
||||
public float MusicMuffleFactor;
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Trackers
|
||||
public int CurrentlyViewedFactoryID = -1;
|
||||
#region Speedrun Timer
|
||||
public int speedrunTimer = 0;
|
||||
public int bossTypeJustDowned = -1;
|
||||
public int bossTypeJustDownedTime = 0;
|
||||
#endregion
|
||||
|
||||
#region Tile Entity Trackers
|
||||
public int CurrentlyViewedFactoryID = -1;
|
||||
public int CurrentlyViewedChargerID = -1;
|
||||
public int CurrentlyViewedHologramID = -1;
|
||||
public string CurrentlyViewedHologramText;
|
||||
@@ -1098,7 +1103,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#endregion
|
||||
|
||||
#region SavingAndLoading
|
||||
#region Saving And Loading
|
||||
public override void Initialize()
|
||||
{
|
||||
extraAccessoryML = false;
|
||||
@@ -1220,8 +1225,11 @@ namespace CalamityMod.CalPlayer
|
||||
{ "itemTypeLastReforged", itemTypeLastReforged },
|
||||
{ "reforgeTierSafety", reforgeTierSafety },
|
||||
{ "moveSpeedStat", moveSpeedStat },
|
||||
{ "defenseDamage", defenseDamage }
|
||||
};
|
||||
{ "defenseDamage", defenseDamage },
|
||||
{ "speedrunTimer", speedrunTimer },
|
||||
{ "bossTypeJustDowned", bossTypeJustDowned },
|
||||
{ "bossTypeJustDownedTime", bossTypeJustDownedTime }
|
||||
};
|
||||
}
|
||||
|
||||
public override void Load(TagCompound tag)
|
||||
@@ -1312,7 +1320,11 @@ namespace CalamityMod.CalPlayer
|
||||
moveSpeedStat = tag.GetInt("moveSpeedStat");
|
||||
|
||||
defenseDamage = tag.GetInt("defenseDamage");
|
||||
}
|
||||
|
||||
speedrunTimer = tag.GetInt("speedrunTimer");
|
||||
bossTypeJustDowned = tag.GetInt("bossTypeJustDowned");
|
||||
bossTypeJustDownedTime = tag.GetInt("bossTypeJustDownedTime");
|
||||
}
|
||||
|
||||
public override void LoadLegacy(BinaryReader reader)
|
||||
{
|
||||
@@ -1351,7 +1363,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
defenseDamage = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
speedrunTimer = reader.ReadInt32();
|
||||
bossTypeJustDowned = reader.ReadInt32();
|
||||
bossTypeJustDownedTime = reader.ReadInt32();
|
||||
|
||||
if (loadVersion == 0)
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
extraAccessoryML = flags[0];
|
||||
@@ -1481,8 +1497,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ResetRogueStealth();
|
||||
|
||||
MusicMuffleFactor = 0f;
|
||||
|
||||
contactDamageReduction = 0D;
|
||||
projectileDamageReduction = 0D;
|
||||
|
||||
@@ -2573,10 +2587,7 @@ namespace CalamityMod.CalPlayer
|
||||
bool useNebula = NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>());
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:DevourerofGodsHead", useNebula);
|
||||
|
||||
bool useNebulaS = NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHeadS>());
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:DevourerofGodsHeadS", useNebulaS);
|
||||
|
||||
bool useFlash = NPC.AnyNPCs(ModContent.NPCType<StormWeaverHeadNaked>());
|
||||
bool useFlash = NPC.AnyNPCs(ModContent.NPCType<StormWeaverHead>());
|
||||
if (SkyManager.Instance["CalamityMod:StormWeaverFlash"] != null && useFlash != SkyManager.Instance["CalamityMod:StormWeaverFlash"].IsActive())
|
||||
{
|
||||
if (useFlash)
|
||||
@@ -3888,10 +3899,17 @@ namespace CalamityMod.CalPlayer
|
||||
player.AddBuff(ModContent.BuffType<ProfanedCrystalBuff>(), 60, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region PreUpdate
|
||||
public override void PreUpdate()
|
||||
#region Update Autopause
|
||||
public override void UpdateAutopause()
|
||||
{
|
||||
speedrunTimer++;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PreUpdate
|
||||
public override void PreUpdate()
|
||||
{
|
||||
tailFrameUp++;
|
||||
if (tailFrameUp == 8)
|
||||
@@ -3927,7 +3945,9 @@ namespace CalamityMod.CalPlayer
|
||||
GameShaders.Armor.GetSecondaryShader(player.dye[i].dye, player)?.UseColor(CalamityPlayerDrawEffects.GetCurrentMoonlightDyeColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
speedrunTimer++;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PreUpdateBuffs
|
||||
@@ -5079,10 +5099,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
case ProjectileID.TheRottedFork:
|
||||
case ProjectileID.TheMeatball:
|
||||
case ProjectileID.CrimsonYoyo:
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 60);
|
||||
break;
|
||||
|
||||
case ProjectileID.BallOHurt:
|
||||
case ProjectileID.CorruptYoyo:
|
||||
target.AddBuff(BuffID.ShadowFlame, 60);
|
||||
break;
|
||||
|
||||
@@ -5559,10 +5581,6 @@ namespace CalamityMod.CalPlayer
|
||||
int defenseAdd = (int)(target.defense * 0.05 * (proj.damage / 50D) * acidRoundMultiplier); //100 defense * 0.05 = 5
|
||||
damage += defenseAdd;
|
||||
}
|
||||
if (uberBees && CalamityLists.friendlyBeeList.Contains(proj.type))
|
||||
{
|
||||
damage += Main.rand.Next(20, 31);
|
||||
}
|
||||
if (plaguebringerPatronSummon)
|
||||
{
|
||||
if (isSummon && proj.active && proj.friendly && !proj.npcProj && !proj.trap && proj.damage > 0)
|
||||
@@ -5782,11 +5800,19 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (!isImmune && !invincible && !lol)
|
||||
{
|
||||
double defenseStatDamageMult = (CalamityWorld.death || CalamityWorld.malice) ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.05;
|
||||
double defenseStatDamageMult = CalamityWorld.malice ? 0.2 : CalamityWorld.death ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.075;
|
||||
if (draedonsHeart)
|
||||
defenseStatDamageMult *= 0.5;
|
||||
|
||||
int damageToDefense = (int)(damage * defenseStatDamageMult);
|
||||
|
||||
if (areThereAnyDamnBosses)
|
||||
{
|
||||
int defenseDamageFloor = (CalamityWorld.malice ? 5 : CalamityWorld.death ? 4 : CalamityWorld.revenge ? 3 : Main.expertMode ? 2 : 1) * (NPC.downedMoonlord ? 3 : Main.hardMode ? 2 : 1);
|
||||
if (damageToDefense < defenseDamageFloor)
|
||||
damageToDefense = defenseDamageFloor;
|
||||
}
|
||||
|
||||
defenseDamage += damageToDefense;
|
||||
|
||||
if (timeBeforeDefenseDamageRecovery < defaultTimeBeforeDefenseDamageRecovery)
|
||||
@@ -6229,12 +6255,20 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (!isImmune && !invincible && !lol)
|
||||
{
|
||||
double defenseStatDamageMult = (CalamityWorld.death || CalamityWorld.malice) ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.05;
|
||||
if (draedonsHeart)
|
||||
double defenseStatDamageMult = CalamityWorld.malice ? 0.2 : CalamityWorld.death ? 0.15 : CalamityWorld.revenge ? 0.125 : Main.expertMode ? 0.1 : 0.075;
|
||||
if (draedonsHeart)
|
||||
defenseStatDamageMult *= 0.5;
|
||||
|
||||
int damageToDefense = (int)(damage * defenseStatDamageMult);
|
||||
defenseDamage += damageToDefense;
|
||||
|
||||
if (areThereAnyDamnBosses)
|
||||
{
|
||||
int defenseDamageFloor = (CalamityWorld.malice ? 5 : CalamityWorld.death ? 4 : CalamityWorld.revenge ? 3 : Main.expertMode ? 2 : 1) * (NPC.downedMoonlord ? 3 : Main.hardMode ? 2 : 1);
|
||||
if (damageToDefense < defenseDamageFloor)
|
||||
damageToDefense = defenseDamageFloor;
|
||||
}
|
||||
|
||||
defenseDamage += damageToDefense;
|
||||
|
||||
if (timeBeforeDefenseDamageRecovery < defaultTimeBeforeDefenseDamageRecovery)
|
||||
timeBeforeDefenseDamageRecovery = defaultTimeBeforeDefenseDamageRecovery;
|
||||
@@ -6548,7 +6582,7 @@ namespace CalamityMod.CalPlayer
|
||||
else if (proj.type == ProjectileID.CultistBossIceMist || proj.type == ProjectileID.CultistBossLightningOrbArc)
|
||||
{
|
||||
if (bannerNPCType == ModContent.NPCType<EidolonWyrmHead>() || bannerNPCType == ModContent.NPCType<Eidolist>())
|
||||
reduceDamage = !NPC.AnyNPCs(ModContent.NPCType<StormWeaverHead>()) && !NPC.AnyNPCs(ModContent.NPCType<StormWeaverHeadNaked>()) && !NPC.AnyNPCs(NPCID.CultistBoss) && proj.Calamity().lineColor != 1;
|
||||
reduceDamage = !NPC.AnyNPCs(ModContent.NPCType<StormWeaverHead>()) && !NPC.AnyNPCs(NPCID.CultistBoss) && proj.Calamity().lineColor != 1;
|
||||
}
|
||||
else if (proj.type == ProjectileID.SaucerScrap)
|
||||
{
|
||||
@@ -7470,23 +7504,6 @@ namespace CalamityMod.CalPlayer
|
||||
// Rage capping is handled in MiscEffects
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
// Apply custom damage in Revengeance Mode. All this actually does is provide a minimum damage
|
||||
customDamage = true;
|
||||
|
||||
// Revengeance uses the same defense effectiveness as Expert, 75%.
|
||||
double defenseMultiplier = /*Main.masterMode ? 1D :*/ 0.75;
|
||||
double newDamage = damage - (player.statDefense * defenseMultiplier);
|
||||
|
||||
double newDamageLimit = NPC.downedMoonlord ? 20D : (NPC.downedPlantBoss || CalamityWorld.downedCalamitas) ? 15D : Main.hardMode ? 10D : 5D;
|
||||
|
||||
if (newDamage < newDamageLimit)
|
||||
newDamage = newDamageLimit;
|
||||
|
||||
damage = (int)newDamage;
|
||||
}
|
||||
|
||||
// Resilient Candle makes defense 5% more effective, aka 5% of defense is subtracted from all incoming damage.
|
||||
if (purpleCandle)
|
||||
damage = (int)(damage - (player.statDefense * 0.05));
|
||||
|
||||
@@ -1,10 +1,38 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
using CalamityMod.NPCs.BrimstoneElemental;
|
||||
using CalamityMod.NPCs.Bumblebirb;
|
||||
using CalamityMod.NPCs.Calamitas;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.Perforator;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.Polterghast;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.Signus;
|
||||
using CalamityMod.NPCs.SlimeGod;
|
||||
using CalamityMod.NPCs.StormWeaver;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -17,8 +45,6 @@ using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public class CalamityPlayerDrawEffects : ModPlayer
|
||||
@@ -349,7 +375,62 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer ForbiddenCircletSign = new PlayerLayer("CalamityMod", "ForbiddenSigil", PlayerLayer.BackAcc, drawInfo =>
|
||||
public static readonly PlayerLayer DrawRancorBookManually = new PlayerLayer("CalamityMod", "RancorBook", PlayerLayer.Arms, drawInfo =>
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
if (drawInfo.shadow != 0f || drawPlayer.dead)
|
||||
return;
|
||||
|
||||
int bookType = ModContent.ProjectileType<RancorHoldout>();
|
||||
Texture2D bookTexture = Main.projectileTexture[bookType];
|
||||
Projectile book = Main.projectile[drawPlayer.heldProj];
|
||||
Rectangle frame = bookTexture.Frame(1, Main.projFrames[bookType], 0, book.frame);
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
Vector2 drawPosition = drawPlayer.Center + Vector2.UnitX * drawPlayer.direction * 8f - Main.screenPosition;
|
||||
Color drawColor = book.GetAlpha(Color.White);
|
||||
SpriteEffects direction = book.spriteDirection == 1f ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
DrawData bookDrawData = new DrawData(bookTexture, drawPosition, frame, drawColor, book.rotation, origin, book.scale, direction, 0);
|
||||
Main.playerDrawData.Add(bookDrawData);
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer ArtemisAndApolloMaskPieces = new PlayerLayer("CalamityMod", "ArtemisApolloMaskPieces", PlayerLayer.Head, drawInfo =>
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
if (drawInfo.shadow != 0f || drawPlayer.dead)
|
||||
return;
|
||||
|
||||
int dyeShader = drawPlayer.dye?[0].dye ?? 0;
|
||||
int headItemType = drawPlayer.armor[0].type;
|
||||
if (drawPlayer.armor[10].type > ItemID.None)
|
||||
headItemType = drawPlayer.armor[10].type;
|
||||
|
||||
Vector2 origin = drawInfo.headOrigin;
|
||||
Vector2 headDrawPosition = drawInfo.position + origin - Main.screenPosition;
|
||||
headDrawPosition.Y += drawPlayer.mount.PlayerOffset;
|
||||
if (headItemType == ModContent.ItemType<ArtemisMask>())
|
||||
{
|
||||
headDrawPosition.X -= drawPlayer.direction == 1f ? 16f : 12f;
|
||||
headDrawPosition.Y -= 10f;
|
||||
|
||||
Texture2D extraPieceTexture = ModContent.GetTexture("CalamityMod/Items/Armor/Vanity/ArtemisMask_Extra");
|
||||
Rectangle frame = extraPieceTexture.Frame(1, 20, 0, drawPlayer.bodyFrame.Y / drawPlayer.bodyFrame.Height);
|
||||
DrawData pieceDrawData = new DrawData(extraPieceTexture, headDrawPosition, frame, drawInfo.eyeColor, drawPlayer.fullRotation, origin, 1f, drawInfo.spriteEffects, 0);
|
||||
Main.playerDrawData.Add(pieceDrawData);
|
||||
}
|
||||
if (headItemType == ModContent.ItemType<ApolloMask>())
|
||||
{
|
||||
headDrawPosition.X -= drawPlayer.direction == 1f ? 16f : 4.5f;
|
||||
headDrawPosition.Y -= 10f;
|
||||
|
||||
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);
|
||||
Main.playerDrawData.Add(pieceDrawData);
|
||||
}
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer ForbiddenCircletSign = new PlayerLayer("CalamityMod", "ForbiddenSigil", PlayerLayer.BackAcc, drawInfo =>
|
||||
{
|
||||
DrawData drawData = new DrawData();
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
@@ -656,20 +737,24 @@ namespace CalamityMod.CalPlayer
|
||||
list[list.IndexOf(PlayerLayer.ShoeAcc)].visible = false;
|
||||
|
||||
if (player.Calamity().fab || player.Calamity().crysthamyr || player.Calamity().onyxExcavator)
|
||||
{
|
||||
AddPlayerLayer(list, clAfterAll, list[list.Count - 1], false);
|
||||
}
|
||||
|
||||
if (player.heldProj != -1 && Main.projectile[player.heldProj].active && Main.projectile[player.heldProj].type == ModContent.ProjectileType<RancorHoldout>())
|
||||
list.Insert(list.IndexOf(PlayerLayer.Arms), DrawRancorBookManually);
|
||||
|
||||
if (player.Calamity().fathomSwarmerTail)
|
||||
{
|
||||
int skinIndex = list.IndexOf(PlayerLayer.Skin);
|
||||
list.Insert(skinIndex - 1, Tail);
|
||||
}
|
||||
|
||||
if (player.Calamity().forbiddenCirclet)
|
||||
{
|
||||
int drawTheStupidSign = list.IndexOf(PlayerLayer.Skin);
|
||||
list.Insert(drawTheStupidSign, ForbiddenCircletSign);
|
||||
}
|
||||
|
||||
list.Add(ArtemisAndApolloMaskPieces);
|
||||
list.Add(ColdDivinityOverlay);
|
||||
list.Add(ConcentratedVoidAura);
|
||||
list.Add(RoverDriveShield);
|
||||
@@ -685,8 +770,269 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
CalamityPlayer calamityPlayer = player.Calamity();
|
||||
|
||||
// Dust modifications while high.
|
||||
if (calamityPlayer.trippy)
|
||||
if (Main.myPlayer == player.whoAmI && !Main.gameMenu)
|
||||
{
|
||||
if (CalamityConfig.Instance.SpeedrunTimer)
|
||||
{
|
||||
double fractionsOfSeconds = calamityPlayer.speedrunTimer / 60D;
|
||||
fractionsOfSeconds -= Math.Truncate(fractionsOfSeconds);
|
||||
fractionsOfSeconds *= 1000D;
|
||||
int milliseconds = (int)Math.Truncate(fractionsOfSeconds);
|
||||
int seconds = calamityPlayer.speedrunTimer / 60;
|
||||
int minutes = calamityPlayer.speedrunTimer / 3600;
|
||||
int hours = calamityPlayer.speedrunTimer / 216000;
|
||||
|
||||
seconds -= minutes * 60;
|
||||
minutes -= hours * 60;
|
||||
|
||||
if (hours > 99)
|
||||
{
|
||||
seconds = minutes = 59;
|
||||
hours = 99;
|
||||
}
|
||||
|
||||
string fractionsOfSecondsText = milliseconds > 99 ? milliseconds.ToString() : "0" + milliseconds.ToString();
|
||||
string secondsText = seconds > 9 ? seconds.ToString() : "0" + seconds.ToString();
|
||||
string minutesText = minutes > 9 ? minutes.ToString() : "0" + minutes.ToString();
|
||||
string hoursText = hours > 9 ? hours.ToString() : "0" + hours.ToString();
|
||||
|
||||
string text = hoursText + ":" + minutesText + ":" + secondsText + "." + fractionsOfSecondsText;
|
||||
float scale = 2f;
|
||||
float xOffset = CalamityConfig.Instance.SpeedrunTimerPosX;
|
||||
float yOffset = CalamityConfig.Instance.SpeedrunTimerPosY;
|
||||
|
||||
Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, text, Main.screenWidth / 2f - xOffset, yOffset, Color.White, Color.Black, default, scale);
|
||||
|
||||
if (calamityPlayer.bossTypeJustDowned > -1)
|
||||
{
|
||||
fractionsOfSeconds = calamityPlayer.bossTypeJustDownedTime / 60D;
|
||||
fractionsOfSeconds -= Math.Truncate(fractionsOfSeconds);
|
||||
fractionsOfSeconds *= 1000D;
|
||||
milliseconds = (int)Math.Truncate(fractionsOfSeconds);
|
||||
seconds = calamityPlayer.bossTypeJustDownedTime / 60;
|
||||
minutes = calamityPlayer.bossTypeJustDownedTime / 3600;
|
||||
hours = calamityPlayer.bossTypeJustDownedTime / 216000;
|
||||
|
||||
seconds -= minutes * 60;
|
||||
minutes -= hours * 60;
|
||||
|
||||
if (hours > 99)
|
||||
{
|
||||
seconds = minutes = 59;
|
||||
hours = 99;
|
||||
}
|
||||
|
||||
fractionsOfSecondsText = milliseconds > 99 ? milliseconds.ToString() : "0" + milliseconds.ToString();
|
||||
secondsText = seconds > 9 ? seconds.ToString() : "0" + seconds.ToString();
|
||||
minutesText = minutes > 9 ? minutes.ToString() : "0" + minutes.ToString();
|
||||
hoursText = hours > 9 ? hours.ToString() : "0" + hours.ToString();
|
||||
|
||||
text = hoursText + ":" + minutesText + ":" + secondsText + "." + fractionsOfSecondsText;
|
||||
scale = 1f;
|
||||
yOffset += 44f;
|
||||
|
||||
Texture2D texture = null;
|
||||
switch (calamityPlayer.bossTypeJustDowned)
|
||||
{
|
||||
// King Slime
|
||||
case 1:
|
||||
texture = Main.npcHeadBossTexture[7];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<DesertScourgeHead>()]];
|
||||
break;
|
||||
|
||||
// Eye of Cthulhu
|
||||
case 3:
|
||||
texture = Main.npcHeadBossTexture[1];
|
||||
break;
|
||||
|
||||
case 4:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CrabulonIdle>()]];
|
||||
break;
|
||||
|
||||
// Eater of Worlds
|
||||
case 5:
|
||||
texture = Main.npcHeadBossTexture[2];
|
||||
break;
|
||||
|
||||
// Brain of Cthulhu
|
||||
case 6:
|
||||
texture = Main.npcHeadBossTexture[23];
|
||||
break;
|
||||
|
||||
case 7:
|
||||
texture = ModContent.GetTexture("CalamityMod/NPCs/HiveMind/HiveMindP2_Head_Boss");
|
||||
break;
|
||||
|
||||
case 8:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<PerforatorHive>()]];
|
||||
break;
|
||||
|
||||
// Queen Bee
|
||||
case 9:
|
||||
texture = Main.npcHeadBossTexture[14];
|
||||
break;
|
||||
|
||||
// Skeletron
|
||||
case 10:
|
||||
texture = Main.npcHeadBossTexture[19];
|
||||
break;
|
||||
|
||||
case 11:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<SlimeGodCore>()]];
|
||||
break;
|
||||
|
||||
// Wall of Flesh
|
||||
case 12:
|
||||
texture = Main.npcHeadBossTexture[22];
|
||||
break;
|
||||
|
||||
case 13:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Cryogen>()]];
|
||||
break;
|
||||
|
||||
// The Twins
|
||||
case 14:
|
||||
texture = Main.npcHeadBossTexture[21];
|
||||
break;
|
||||
|
||||
case 15:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AquaticScourgeHead>()]];
|
||||
break;
|
||||
|
||||
// The Destroyer
|
||||
case 16:
|
||||
texture = Main.npcHeadBossTexture[25];
|
||||
break;
|
||||
|
||||
case 17:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<BrimstoneElemental>()]];
|
||||
break;
|
||||
|
||||
// Skeletron Prime
|
||||
case 18:
|
||||
texture = Main.npcHeadBossTexture[18];
|
||||
break;
|
||||
|
||||
case 19:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CalamitasRun3>()]];
|
||||
break;
|
||||
|
||||
// Plantera
|
||||
case 20:
|
||||
texture = Main.npcHeadBossTexture[12];
|
||||
break;
|
||||
|
||||
case 21:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Leviathan>()]];
|
||||
break;
|
||||
|
||||
case 22:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AstrumAureus>()]];
|
||||
break;
|
||||
|
||||
// Golem
|
||||
case 23:
|
||||
texture = Main.npcHeadBossTexture[5];
|
||||
break;
|
||||
|
||||
case 24:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<PlaguebringerGoliath>()]];
|
||||
break;
|
||||
|
||||
// Duke Fishron
|
||||
case 25:
|
||||
texture = Main.npcHeadBossTexture[4];
|
||||
break;
|
||||
|
||||
case 26:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<RavagerBody>()]];
|
||||
break;
|
||||
|
||||
// Lunatic Cultist
|
||||
case 27:
|
||||
texture = Main.npcHeadBossTexture[31];
|
||||
break;
|
||||
|
||||
case 28:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AstrumDeusHeadSpectral>()]];
|
||||
break;
|
||||
|
||||
// Moon Lord
|
||||
case 29:
|
||||
texture = Main.npcHeadBossTexture[8];
|
||||
break;
|
||||
|
||||
case 30:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<ProfanedGuardianBoss>()]];
|
||||
break;
|
||||
|
||||
case 31:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Bumblefuck>()]];
|
||||
break;
|
||||
|
||||
case 32:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Providence>()]];
|
||||
break;
|
||||
|
||||
case 33:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<CeaselessVoid>()]];
|
||||
break;
|
||||
|
||||
case 34:
|
||||
texture = ModContent.GetTexture("CalamityMod/NPCs/StormWeaver/StormWeaverHeadNaked_Head_Boss");
|
||||
break;
|
||||
|
||||
case 35:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Signus>()]];
|
||||
break;
|
||||
|
||||
case 36:
|
||||
texture = ModContent.GetTexture("CalamityMod/NPCs/Polterghast/Necroplasm_Head_Boss");
|
||||
break;
|
||||
|
||||
case 37:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<OldDuke>()]];
|
||||
break;
|
||||
|
||||
case 38:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<DevourerofGodsHead>()]];
|
||||
break;
|
||||
|
||||
case 39:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<Yharon>()]];
|
||||
break;
|
||||
|
||||
case 40:
|
||||
texture = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/HoodlessHeadIcon");
|
||||
break;
|
||||
|
||||
case 41:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<AresBody>()]];
|
||||
break;
|
||||
|
||||
case 42:
|
||||
texture = Main.npcHeadBossTexture[NPCID.Sets.BossHeadTextures[ModContent.NPCType<EidolonWyrmHeadHuge>()]];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
xOffset -= 58f;
|
||||
|
||||
if (texture != null)
|
||||
Main.spriteBatch.Draw(texture, new Vector2(Main.screenWidth / 2f - xOffset - texture.Width - 4f, yOffset), null, Color.White, 0f, default, 1f, SpriteEffects.None, 0f);
|
||||
|
||||
Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, text, Main.screenWidth / 2f - xOffset, yOffset, Color.White, Color.Black, default, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dust modifications while high.
|
||||
if (calamityPlayer.trippy)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -482,7 +482,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 startingStickPosition = player.Center + stickOffset + Vector2.UnitY * 12f;
|
||||
Vector2 startingStickPosition = player.Center + stickOffset + new Vector2(direction * (float)Math.Cos(modPlayer.SmoothenedMinecartRotation * 2f) * -34f, 12f);
|
||||
modPlayer.DoGCartSegments[0].Update(player, startingStickPosition, idealRotation);
|
||||
modPlayer.DoGCartSegments[0].Center = startingStickPosition;
|
||||
|
||||
@@ -1079,7 +1079,7 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.AllCritBoost(critUp);
|
||||
}
|
||||
|
||||
bool canProvideBuffs = modPlayer.profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (modPlayer.profanedCrystal && CalamityWorld.downedSCal);
|
||||
bool canProvideBuffs = modPlayer.profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (modPlayer.profanedCrystal && CalamityWorld.downedSCal && CalamityWorld.downedExoMechs);
|
||||
bool attack = player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0;
|
||||
// Guardian bonuses if not burnt out
|
||||
if (!modPlayer.bOut && canProvideBuffs)
|
||||
@@ -3004,7 +3004,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (modPlayer.pFlames)
|
||||
{
|
||||
player.blind = !modPlayer.alchFlask;
|
||||
player.blind = !modPlayer.reducedPlagueDmg;
|
||||
player.statDefense -= Plague.DefenseReduction;
|
||||
player.moveSpeed -= 0.15f;
|
||||
}
|
||||
@@ -3482,7 +3482,6 @@ namespace CalamityMod.CalPlayer
|
||||
player.lifeRegen += 5;
|
||||
}
|
||||
bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5);
|
||||
bool notRetro = Lighting.NotRetro;
|
||||
if (!modPlayer.ZoneAbyss) //No abyss memes.
|
||||
Lighting.AddLight(player.Center, enrage ? 1.2f : offenseBuffs ? 1f : 0.2f, enrage ? 0.21f : offenseBuffs ? 0.2f : 0.01f, 0);
|
||||
if (enrage)
|
||||
|
||||
@@ -118,6 +118,28 @@ namespace CalamityMod
|
||||
[Tooltip("The Y position of the Charge Meter.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.")]
|
||||
public float ChargeMeterPosY { get; set; }
|
||||
|
||||
[Label("Speedrun Timer")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
[Tooltip("Enables a Speedrun Timer.")]
|
||||
public bool SpeedrunTimer { get; set; }
|
||||
|
||||
[Label("Speedrun Timer X Position")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(-800f, 800f)]
|
||||
[DefaultValue(68f)]
|
||||
[Tooltip("The X position of the Speedrun Timer.")]
|
||||
public float SpeedrunTimerPosX { get; set; }
|
||||
|
||||
[Label("Speedrun Timer Y Position")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(16f, 1000f)]
|
||||
[DefaultValue(16f)]
|
||||
[Tooltip("The Y position of the Speedrun Timer.")]
|
||||
public float SpeedrunTimerPosY { get; set; }
|
||||
|
||||
[Header("General Gameplay Changes")]
|
||||
|
||||
[Label("Early Hardmode Progression Rework")]
|
||||
@@ -142,12 +164,6 @@ namespace CalamityMod
|
||||
[Tooltip("Enables the Proficiency system which allows the player to gain slight stat bonuses by persistently using one damage class.\nDisabling the system does not remove levels players already have, but disables their stat bonuses and prevents experience gain.")]
|
||||
public bool Proficiency { get; set; }
|
||||
|
||||
[Label("Sell Vanilla Boss Summons")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
[Tooltip("Adds vanilla boss summons to NPC shops after the corresponding boss is defeated.\nThis does not affect Calamity's boss summons, which are always sold.\nTo apply changes, close and reopen the shop.")]
|
||||
public bool SellVanillaSummons { get; set; }
|
||||
|
||||
[Label("Boss Zen")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
|
||||
@@ -37,7 +37,9 @@ using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.Cryogen;
|
||||
using CalamityMod.NPCs.DesertScourge;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.NPCs.ExoMechs.Apollo;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
||||
using CalamityMod.NPCs.GreatSandShark;
|
||||
using CalamityMod.NPCs.HiveMind;
|
||||
@@ -47,6 +49,8 @@ using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.Perforator;
|
||||
using CalamityMod.NPCs.PlaguebringerGoliath;
|
||||
using CalamityMod.NPCs.PlagueEnemies;
|
||||
using CalamityMod.NPCs.Polterghast;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.Signus;
|
||||
@@ -62,7 +66,6 @@ using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee.Spears;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -155,6 +158,8 @@ namespace CalamityMod
|
||||
public static List<int> pierceResistList;
|
||||
public static List<int> pierceResistExceptionList;
|
||||
|
||||
public static SortedDictionary<int, int> bossTypes;
|
||||
|
||||
public static List<int> legOverrideList;
|
||||
|
||||
public static List<int> kamiDebuffColorImmuneList;
|
||||
@@ -225,7 +230,7 @@ namespace CalamityMod
|
||||
"Sandblast",
|
||||
"ThomasThePencil",
|
||||
"Aero (Aero#4599)",
|
||||
"GlitchOut",
|
||||
"Shirosity", // used to be GlitchOut
|
||||
"Daawnz",
|
||||
"CrabBar",
|
||||
"Yatagarasu",
|
||||
@@ -291,7 +296,7 @@ namespace CalamityMod
|
||||
"Mendzey",
|
||||
"GameRDheAsianSandwich",
|
||||
"Tobias",
|
||||
"Streakist .",
|
||||
"Streakist",
|
||||
"Eisaya",
|
||||
"Xenocrona",
|
||||
"RKMoon",
|
||||
@@ -308,7 +313,7 @@ namespace CalamityMod
|
||||
"dawn thunder",
|
||||
"asdf935",
|
||||
"GentSkeleton",
|
||||
"Fizzlpoprock .",
|
||||
"Fizzlpoprock",
|
||||
"Pigeon",
|
||||
"Aleksh",
|
||||
"Just a random guy",
|
||||
@@ -359,7 +364,7 @@ namespace CalamityMod
|
||||
"Timon",
|
||||
"F00d Demon",
|
||||
"Olkothan",
|
||||
"Vmar98 .",
|
||||
"Vmar98",
|
||||
"Dasdruid",
|
||||
"Cinder",
|
||||
"Brutzli",
|
||||
@@ -414,7 +419,7 @@ namespace CalamityMod
|
||||
"Arcadia",
|
||||
"JensB__",
|
||||
"Nuclei",
|
||||
"Picasso’s Bean",
|
||||
"Picasso's Bean",
|
||||
"Corn M. Cobb",
|
||||
"kgh8090",
|
||||
"Luke",
|
||||
@@ -509,7 +514,7 @@ namespace CalamityMod
|
||||
"WillyDilly",
|
||||
"xAqult",
|
||||
"Himakaze",
|
||||
"Face.",
|
||||
"Face",
|
||||
"Carboniferous",
|
||||
"James"
|
||||
};
|
||||
@@ -579,6 +584,8 @@ namespace CalamityMod
|
||||
ProjectileType<DarkSparkBeam>(),
|
||||
ProjectileType<GhastlyVisageProj>(),
|
||||
ProjectileType<ApotheosisWorm>(),
|
||||
ProjectileType<SpiritCongregation>(),
|
||||
ProjectileType<RancorLaserbeam>(),
|
||||
|
||||
ProjectileType<FlakKrakenProj>(),
|
||||
ProjectileType<InfernadoFriendly>(),
|
||||
@@ -1354,6 +1361,7 @@ namespace CalamityMod
|
||||
|
||||
fiftySizeBuffList = new List<int>()
|
||||
{
|
||||
ItemID.EnchantedSword,
|
||||
ItemID.BreakerBlade,
|
||||
ItemID.StylistKilLaKillScissorsIWish,
|
||||
ItemID.NightsEdge,
|
||||
@@ -1938,12 +1946,8 @@ namespace CalamityMod
|
||||
NPCType<AstrumDeusTailSpectral>(),
|
||||
NPCType<StormWeaverBody>(),
|
||||
NPCType<StormWeaverTail>(),
|
||||
NPCType<StormWeaverBodyNaked>(),
|
||||
NPCType<StormWeaverTailNaked>(),
|
||||
NPCType<DevourerofGodsBody>(),
|
||||
NPCType<DevourerofGodsTail>(),
|
||||
NPCType<DevourerofGodsBodyS>(),
|
||||
NPCType<DevourerofGodsTailS>(),
|
||||
NPCType<ThanatosBody1>(),
|
||||
NPCType<ThanatosBody2>(),
|
||||
NPCType<ThanatosTail>(),
|
||||
@@ -2701,18 +2705,15 @@ namespace CalamityMod
|
||||
NPCType<AstrumDeusBodySpectral>(),
|
||||
NPCType<AstrumDeusTailSpectral>(),
|
||||
NPCType<DarkEnergy>(),
|
||||
NPCType<StormWeaverHeadNaked>(),
|
||||
NPCType<StormWeaverBodyNaked>(),
|
||||
NPCType<StormWeaverTailNaked>(),
|
||||
NPCType<StormWeaverHead>(),
|
||||
NPCType<StormWeaverBody>(),
|
||||
NPCType<StormWeaverTail>(),
|
||||
NPCType<DevourerofGodsHead>(),
|
||||
NPCType<DevourerofGodsBody>(),
|
||||
NPCType<DevourerofGodsTail>(),
|
||||
NPCType<DevourerofGodsHead2>(),
|
||||
NPCType<DevourerofGodsBody2>(),
|
||||
NPCType<DevourerofGodsTail2>(),
|
||||
NPCType<DevourerofGodsHeadS>(),
|
||||
NPCType<DevourerofGodsBodyS>(),
|
||||
NPCType<DevourerofGodsTailS>(),
|
||||
NPCType<ThanatosHead>(),
|
||||
NPCType<ThanatosBody1>(),
|
||||
NPCType<ThanatosBody2>(),
|
||||
@@ -2769,6 +2770,61 @@ namespace CalamityMod
|
||||
ProjectileType<EyeOfNightCell>()
|
||||
};
|
||||
|
||||
bossTypes = new SortedDictionary<int, int>()
|
||||
{
|
||||
{ NPCID.KingSlime, 1 },
|
||||
{ NPCType<DesertScourgeHead>(), 2 },
|
||||
{ NPCID.EyeofCthulhu, 3 },
|
||||
{ NPCType<CrabulonIdle>(), 4 },
|
||||
{ NPCID.EaterofWorldsHead, 5 },
|
||||
{ NPCID.EaterofWorldsBody, 5 },
|
||||
{ NPCID.EaterofWorldsTail, 5 },
|
||||
{ NPCID.BrainofCthulhu, 6 },
|
||||
{ NPCType<HiveMind>(), 7 },
|
||||
{ NPCType<PerforatorHive>(), 8 },
|
||||
{ NPCID.QueenBee, 9 },
|
||||
{ NPCID.SkeletronHead, 10 },
|
||||
{ NPCType<SlimeGodCore>(), 11 },
|
||||
{ NPCType<SlimeGodSplit>(), 11 },
|
||||
{ NPCType<SlimeGodRunSplit>(), 11 },
|
||||
{ NPCID.WallofFlesh, 12 },
|
||||
{ NPCType<Cryogen>(), 13 },
|
||||
{ NPCID.Retinazer, 14 },
|
||||
{ NPCID.Spazmatism, 14 },
|
||||
{ NPCType<AquaticScourgeHead>(), 15 },
|
||||
{ NPCID.TheDestroyer, 16 },
|
||||
{ NPCType<BrimstoneElemental>(), 17 },
|
||||
{ NPCID.SkeletronPrime, 18 },
|
||||
{ NPCType<CalamitasRun3>(), 19 },
|
||||
{ NPCID.Plantera, 20 },
|
||||
{ NPCType<Leviathan>(), 21 },
|
||||
{ NPCType<Siren>(), 21 },
|
||||
{ NPCType<AstrumAureus>(), 22 },
|
||||
{ NPCID.Golem, 23 },
|
||||
{ NPCType<PlaguebringerGoliath>(), 24 },
|
||||
{ NPCID.DukeFishron, 25 },
|
||||
{ NPCType<RavagerBody>(), 26 },
|
||||
{ NPCID.CultistBoss, 27 },
|
||||
{ NPCType<AstrumDeusHeadSpectral>(), 28 },
|
||||
{ NPCID.MoonLordCore, 29 },
|
||||
{ NPCType<ProfanedGuardianBoss>(), 30 },
|
||||
{ NPCType<Bumblefuck>(), 31 },
|
||||
{ NPCType<Providence>(), 32 },
|
||||
{ NPCType<CeaselessVoid>(), 33 },
|
||||
{ NPCType<StormWeaverHead>(), 34 },
|
||||
{ NPCType<Signus>(), 35 },
|
||||
{ NPCType<Polterghast>(), 36 },
|
||||
{ NPCType<OldDuke>(), 37 },
|
||||
{ NPCType<DevourerofGodsHead>(), 38 },
|
||||
{ NPCType<Yharon>(), 39 },
|
||||
{ NPCType<SupremeCalamitas>(), 40 },
|
||||
{ NPCType<AresBody>(), 41 },
|
||||
{ NPCType<ThanatosHead>(), 41 },
|
||||
{ NPCType<Artemis>(), 41 },
|
||||
{ NPCType<Apollo>(), 41 },
|
||||
{ NPCType<EidolonWyrmHeadHuge>(), 42 }
|
||||
};
|
||||
|
||||
bossMinionList = new List<int>()
|
||||
{
|
||||
NPCType<DesertNuisanceHead>(),
|
||||
@@ -2894,7 +2950,10 @@ namespace CalamityMod
|
||||
ProjectileType<MechwormHead>(),
|
||||
ProjectileType<MechwormBody>(),
|
||||
ProjectileType<MechwormTail>(),
|
||||
ProjectileType<EndoHydraHead>()
|
||||
ProjectileType<EndoHydraHead>(),
|
||||
ProjectileType<EndoHydraBody>(),
|
||||
ProjectileType<SeekerSummonProj>(),
|
||||
ProjectileType<SepulcherMinion>()
|
||||
};
|
||||
|
||||
ZeroMinionSlotExceptionList = new List<int>()
|
||||
@@ -2999,6 +3058,9 @@ namespace CalamityMod
|
||||
pierceResistList = null;
|
||||
pierceResistExceptionList = null;
|
||||
|
||||
bossTypes?.Clear();
|
||||
bossTypes = null;
|
||||
|
||||
legOverrideList = null;
|
||||
|
||||
kamiDebuffColorImmuneList = null;
|
||||
|
||||
@@ -62,6 +62,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.Config;
|
||||
using Terraria.UI;
|
||||
using CalamityMod.Particles;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
@@ -241,9 +242,6 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky();
|
||||
|
||||
Filters.Scene["CalamityMod:DevourerofGodsHeadS"] = new Filter(new DoGScreenShaderDataS("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:DevourerofGodsHeadS"] = new DoGSkyS();
|
||||
|
||||
Filters.Scene["CalamityMod:CalamitasRun3"] = new Filter(new CalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.6f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:CalamitasRun3"] = new CalSky();
|
||||
|
||||
@@ -279,14 +277,21 @@ namespace CalamityMod
|
||||
SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky();
|
||||
|
||||
CalamityShaders.LoadShaders();
|
||||
FusableParticleManager.LoadParticleRenderSets();
|
||||
Main.OnPreDraw += _ => FusableParticleManager.PrepareFusableParticleTargets();
|
||||
|
||||
RipperUI.Load();
|
||||
AstralArcanumUI.Load(this);
|
||||
|
||||
Apollo.LoadHeadIcons();
|
||||
Artemis.LoadHeadIcons();
|
||||
DevourerofGodsHead.LoadHeadIcons();
|
||||
DevourerofGodsBody.LoadHeadIcons();
|
||||
DevourerofGodsTail.LoadHeadIcons();
|
||||
HiveMind.LoadHeadIcons();
|
||||
Polterghast.LoadHeadIcons();
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
StormWeaverHead.LoadHeadIcons();
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
ThanatosHead.LoadHeadIcons();
|
||||
ThanatosBody1.LoadHeadIcons();
|
||||
ThanatosBody2.LoadHeadIcons();
|
||||
@@ -355,6 +360,9 @@ namespace CalamityMod
|
||||
|
||||
TileFraming.Unload();
|
||||
|
||||
FusableParticleManager.UnloadParticleRenderSets();
|
||||
Main.OnPreDraw -= _ => FusableParticleManager.PrepareFusableParticleTargets();
|
||||
|
||||
RipperUI.Unload();
|
||||
AstralArcanumUI.Unload();
|
||||
|
||||
@@ -404,6 +412,19 @@ namespace CalamityMod
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fusable Particle Updating
|
||||
public override void MidUpdateProjectileItem()
|
||||
{
|
||||
// Update all fusable particles.
|
||||
// These are really only visual and as such don't really need any complex netcode.
|
||||
foreach (BaseFusableParticleSet.FusableParticleRenderCollection particleSet in FusableParticleManager.ParticleSets)
|
||||
{
|
||||
foreach (BaseFusableParticleSet.FusableParticle particle in particleSet.ParticleSet.Particles)
|
||||
particleSet.ParticleSet.UpdateBehavior(particle);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Vanilla Enemy DR
|
||||
private void SetupVanillaDR()
|
||||
{
|
||||
@@ -555,8 +576,7 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DesertScourgeBody>(), 3600 },
|
||||
{ ModContent.NPCType<DesertScourgeTail>(), 3600 },
|
||||
{ ModContent.NPCType<CrabulonIdle>(), 5400 },
|
||||
{ ModContent.NPCType<HiveMind>(), 1800 },
|
||||
{ ModContent.NPCType<HiveMindP2>(), 5400 },
|
||||
{ ModContent.NPCType<HiveMind>(), 7200 },
|
||||
{ ModContent.NPCType<PerforatorHive>(), 7200 },
|
||||
{ ModContent.NPCType<SlimeGodCore>(), 10800 },
|
||||
{ ModContent.NPCType<SlimeGod>(), 5400 },
|
||||
@@ -583,18 +603,15 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<Providence>(), 14400 },
|
||||
{ ModContent.NPCType<CeaselessVoid>(), 10800 },
|
||||
{ ModContent.NPCType<DarkEnergy>(), 1200 },
|
||||
{ ModContent.NPCType<StormWeaverHeadNaked>(), 7200 },
|
||||
{ ModContent.NPCType<StormWeaverBodyNaked>(), 7200 },
|
||||
{ ModContent.NPCType<StormWeaverTailNaked>(), 7200 },
|
||||
{ ModContent.NPCType<StormWeaverHead>(), 8100 },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), 8100 },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), 8100 },
|
||||
{ ModContent.NPCType<Signus>(), 7200 },
|
||||
{ ModContent.NPCType<Polterghast>(), 10800 },
|
||||
{ ModContent.NPCType<OldDuke>(), 10800 },
|
||||
{ ModContent.NPCType<DevourerofGodsHead>(), 5400 },
|
||||
{ ModContent.NPCType<DevourerofGodsBody>(), 5400 },
|
||||
{ ModContent.NPCType<DevourerofGodsTail>(), 5400 },
|
||||
{ ModContent.NPCType<DevourerofGodsHeadS>(), 9000 },
|
||||
{ ModContent.NPCType<DevourerofGodsBodyS>(), 9000 },
|
||||
{ ModContent.NPCType<DevourerofGodsTailS>(), 9000 },
|
||||
{ ModContent.NPCType<DevourerofGodsHead>(), 14400 },
|
||||
{ ModContent.NPCType<DevourerofGodsBody>(), 14400 },
|
||||
{ ModContent.NPCType<DevourerofGodsTail>(), 14400 },
|
||||
{ ModContent.NPCType<Yharon>(), 15300 },
|
||||
{ ModContent.NPCType<SupremeCalamitas>(), 18000 },
|
||||
{ ModContent.NPCType<Apollo>(), 21600 },
|
||||
@@ -657,7 +674,7 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DesertNuisanceBody>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DesertNuisanceTail>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<CrabulonIdle>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<HiveMindP2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<HiveMind>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<PerforatorHive>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<PerforatorHeadLarge>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<PerforatorBodyLarge>(), velocityScaleMin },
|
||||
@@ -710,9 +727,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<StormWeaverHead>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<StormWeaverHeadNaked>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<StormWeaverBodyNaked>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<StormWeaverTailNaked>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<Signus>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<CosmicLantern>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<Polterghast>(), bitingEnemeyVelocityScale },
|
||||
@@ -724,9 +738,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<DevourerofGodsHead2>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<DevourerofGodsBody2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DevourerofGodsTail2>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DevourerofGodsHeadS>(), bitingEnemeyVelocityScale },
|
||||
{ ModContent.NPCType<DevourerofGodsBodyS>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DevourerofGodsTailS>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<Yharon>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DetonatingFlare>(), velocityScaleMin },
|
||||
{ ModContent.NPCType<DetonatingFlare2>(), velocityScaleMin },
|
||||
@@ -828,14 +839,6 @@ namespace CalamityMod
|
||||
music = GetMusicFromMusicMod("Sulphur") ?? MusicID.Desert;
|
||||
}
|
||||
}
|
||||
if (CalamityWorld.DoGSecondStageCountdown <= 530 && CalamityWorld.DoGSecondStageCountdown > 50) // 8 seconds before DoG spawns
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
music = GetMusicFromMusicMod("UniversalCollapse") ?? MusicID.LunarBoss;
|
||||
priority = MusicPriority.BossMedium;
|
||||
}
|
||||
}
|
||||
|
||||
// This section handles boss rush music. However, at the time of PR-ing the boss rush visuals branch not all
|
||||
// of the boss rush themes have been completed. As such, the custom music is intentionally omitted for the time being.
|
||||
|
||||
@@ -280,11 +280,11 @@ namespace CalamityMod
|
||||
Main.player[reader.ReadInt32()].Calamity().HandleReforgeTierSafety(reader);
|
||||
break;
|
||||
|
||||
//
|
||||
// Default case: with no idea how long the packet is, we can't safely read data.
|
||||
// Throw an exception now instead of allowing the network stream to corrupt.
|
||||
//
|
||||
default:
|
||||
//
|
||||
// Default case: with no idea how long the packet is, we can't safely read data.
|
||||
// Throw an exception now instead of allowing the network stream to corrupt.
|
||||
//
|
||||
default:
|
||||
CalamityMod.Instance.Logger.Error($"Failed to parse Calamity packet: No Calamity packet exists with ID {msgType}.");
|
||||
throw new Exception("Failed to parse Calamity packet: Invalid Calamity packet ID.");
|
||||
}
|
||||
@@ -399,6 +399,6 @@ namespace CalamityMod
|
||||
|
||||
// Reforge syncs
|
||||
ItemTypeLastReforgedSync, // TODO -- there has to be a better way to do this, but I don't know what it is
|
||||
ReforgeTierSafetySync,
|
||||
}
|
||||
ReforgeTierSafetySync
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,10 @@ namespace CalamityMod.Effects
|
||||
public static Effect PrismCrystalShader;
|
||||
public static Effect ImpFlameTrailShader;
|
||||
public static Effect SCalShieldShader;
|
||||
public static Effect RancorMagicCircleShader;
|
||||
|
||||
public static Effect BaseFusableParticleEdgeShader;
|
||||
public static Effect AdditiveFusableParticleEdgeShader;
|
||||
|
||||
public static void LoadShaders()
|
||||
{
|
||||
@@ -44,6 +48,10 @@ namespace CalamityMod.Effects
|
||||
FadingSolidTrailShader = CalamityMod.Instance.GetEffect("Effects/FadingSolidTrail");
|
||||
ImpFlameTrailShader = CalamityMod.Instance.GetEffect("Effects/ImpFlameTrail");
|
||||
SCalShieldShader = CalamityMod.Instance.GetEffect("Effects/SupremeShieldShader");
|
||||
RancorMagicCircleShader = CalamityMod.Instance.GetEffect("Effects/RancorMagicCircle");
|
||||
|
||||
BaseFusableParticleEdgeShader = CalamityMod.Instance.GetEffect("Effects/ParticleFusion/BaseFusableParticleEdgeShader");
|
||||
AdditiveFusableParticleEdgeShader = CalamityMod.Instance.GetEffect("Effects/ParticleFusion/AdditiveFusableParticleEdgeShader");
|
||||
|
||||
Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref<Effect>(AstralFogShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh);
|
||||
|
||||
@@ -63,6 +71,10 @@ namespace CalamityMod.Effects
|
||||
GameShaders.Misc["CalamityMod:PrismaticStreak"] = new MiscShaderData(new Ref<Effect>(PrismCrystalShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:ImpFlameTrail"] = new MiscShaderData(new Ref<Effect>(ImpFlameTrailShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:SupremeShield"] = new MiscShaderData(new Ref<Effect>(SCalShieldShader), "ShieldPass");
|
||||
GameShaders.Misc["CalamityMod:RancorMagicCircle"] = new MiscShaderData(new Ref<Effect>(RancorMagicCircleShader), "ShieldPass");
|
||||
|
||||
GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"] = new MiscShaderData(new Ref<Effect>(BaseFusableParticleEdgeShader), "ParticlePass");
|
||||
GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"] = new MiscShaderData(new Ref<Effect>(AdditiveFusableParticleEdgeShader), "ParticlePass");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
// Inputted images go into uImage1 sampler, in case you have a noise map or something similar.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
// Fade out at the edges of the trail to give a blur effect.
|
||||
// This is very important.
|
||||
float flameStreakBrightness = tex2D(uImage1, float2(frac(coords.x - uTime * 2.9), coords.y)).r;
|
||||
float bloomOpacity = lerp(pow(sin(coords.y * 3.141), lerp(3, 10, coords.x)), 0.7, coords.x);
|
||||
return color * pow(bloomOpacity, 6.0) * lerp(2.0, 7, flameStreakBrightness);
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
float edgeBorderSize;
|
||||
bool borderShouldBeSolid;
|
||||
float3 edgeBorderColor;
|
||||
float2 screenArea;
|
||||
float2 renderTargetArea;
|
||||
float2 screenMoveOffset;
|
||||
float2 generalBackgroundOffset;
|
||||
bool invertedScreen;
|
||||
float2 upscaleFactor;
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 originalCoords = coords;
|
||||
if (invertedScreen)
|
||||
coords.y = 1 - coords.y;
|
||||
|
||||
// Account for screen movements. Not doing this causes the scene to move based on that.
|
||||
coords += screenMoveOffset / renderTargetArea;
|
||||
|
||||
float2 offset = 3 / screenArea;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float4 leftColor = tex2D(uImage0, coords + float2(-offset.x, 0));
|
||||
float4 rightColor = tex2D(uImage0, coords + float2(-offset.x, 0));
|
||||
float4 topColor = tex2D(uImage0, coords + float2(0, -offset.y));
|
||||
float4 bottomColor = tex2D(uImage0, coords + float2(0, offset.y));
|
||||
float4 avergeColor = (color + leftColor + rightColor + topColor + bottomColor) / 4.7;
|
||||
avergeColor = lerp(avergeColor, float4(1, 1, 1, 1), pow(avergeColor.b, 0.5)) * avergeColor.a;
|
||||
return avergeColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass ParticlePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
float edgeBorderSize;
|
||||
bool borderShouldBeSolid;
|
||||
float3 edgeBorderColor;
|
||||
float2 screenArea;
|
||||
float2 renderTargetArea;
|
||||
float2 screenMoveOffset;
|
||||
float2 generalBackgroundOffset;
|
||||
bool invertedScreen;
|
||||
float2 upscaleFactor;
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 originalCoords = coords;
|
||||
if (invertedScreen)
|
||||
coords.y = 1 - coords.y;
|
||||
|
||||
// Account for screen movements. Not doing this causes the scene to move based on that.
|
||||
coords += screenMoveOffset / renderTargetArea;
|
||||
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
|
||||
// Determine how much downscaling is required to reasonably zoom in on things.
|
||||
float downscaleFactor = float2(5, 5) / upscaleFactor / max(renderTargetArea.x, renderTargetArea.y) / 2;
|
||||
float2 backgroundCoords = frac((renderTargetArea * (originalCoords + generalBackgroundOffset * upscaleFactor) + uWorldPosition) * downscaleFactor);
|
||||
float4 backgroundColor = tex2D(uImage1, backgroundCoords);
|
||||
|
||||
// Equivalent to edgeBorderSize pixels in both the X and Y direction.
|
||||
float2 edgeOffset = float2(edgeBorderSize, edgeBorderSize) / renderTargetArea;
|
||||
|
||||
// Check if the cardinal directions are not intersecting with any other active parts of the render target.
|
||||
// If one of them isn't, that means that a border should be rendered.
|
||||
float4 aboveColor = tex2D(uImage0, coords + float2(0, edgeOffset.y));
|
||||
float4 belowColor = tex2D(uImage0, coords - float2(0, edgeOffset.y));
|
||||
float4 leftColor = tex2D(uImage0, coords + float2(edgeOffset.x, 0));
|
||||
float4 rightColor = tex2D(uImage0, coords - float2(edgeOffset.x, 0));
|
||||
|
||||
// Invert color check thresholds based on whether the border should be solid when drawing.
|
||||
float checkThreshold = 0.02;
|
||||
if (!borderShouldBeSolid)
|
||||
checkThreshold = 0.95;
|
||||
|
||||
// If any cardinal color is sufficiently close to transparency choose an edge border color.
|
||||
// Opacity multipliers ensure that this does not affect completely invisible areas of the render target.
|
||||
if (aboveColor.r < checkThreshold || belowColor.r < checkThreshold || leftColor.r < checkThreshold || rightColor.r < checkThreshold)
|
||||
{
|
||||
float borderOpacity = color.a;
|
||||
|
||||
// Use binary opacity if the border should be solid when drawing.
|
||||
if (borderOpacity > 0 && borderShouldBeSolid)
|
||||
borderOpacity = 1;
|
||||
|
||||
return float4(edgeBorderColor, 1) * borderOpacity;
|
||||
}
|
||||
|
||||
return backgroundColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass ParticlePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity : register(C0);
|
||||
float uSaturation;
|
||||
float uCircularRotation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
float2 overallImageSize;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float2 Coordinates : TEXCOORD0;
|
||||
float4 Color : COLOR0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float2 Coordinates : TEXCOORD0;
|
||||
float4 Color : COLOR0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float2 coords = input.Coordinates - 0.5;
|
||||
float rotationSine = sin(uSaturation);
|
||||
float rotationCosine = cos(uSaturation);
|
||||
float rotationOriginSine = sin(uCircularRotation);
|
||||
float rotationOriginCosine = cos(uCircularRotation);
|
||||
float2x2 rotationMatrix = float2x2(rotationCosine, -rotationSine, rotationSine, rotationCosine);
|
||||
float2x2 circularRotationMatrix = float2x2(rotationOriginCosine, -rotationOriginSine, rotationOriginSine, rotationOriginCosine);
|
||||
float2x2 scalingMatrix = float2x2(2, 0, 0, 1);
|
||||
|
||||
output.Color = input.Color;
|
||||
|
||||
// Rotate based on direction, squash the result, and then rotate the squashed result by the circular rotation.
|
||||
output.Coordinates = mul(input.Coordinates - 0.5, rotationMatrix) + 0.5;
|
||||
output.Coordinates = mul(output.Coordinates - 0.5, scalingMatrix) + 0.5;
|
||||
output.Coordinates = mul(output.Coordinates - 0.5, circularRotationMatrix) + 0.5;
|
||||
output.Position = mul(input.Position, uWorldViewProjection);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 PixelFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float2 updatedCoords = input.Coordinates;
|
||||
|
||||
// Adjust for horizontal rotation.
|
||||
if (uDirection == -1)
|
||||
updatedCoords.y = 1 - updatedCoords.y;
|
||||
|
||||
float overallAdjustedYCoord = 0.5 + lerp(-uImageSize0.y / overallImageSize.y, uImageSize0.y / overallImageSize.y, updatedCoords.y) * 0.5;
|
||||
float4 baseColor = tex2D(uImage0, updatedCoords);
|
||||
float colorFade = abs(sin(overallAdjustedYCoord + uTime * 0.5));
|
||||
float luminosity = (baseColor.r + baseColor.g + baseColor.b) / 3;
|
||||
float4 endColor = baseColor * float4(lerp(uColor, uSecondaryColor, colorFade), 1);
|
||||
endColor *= 1 + luminosity * 0.5;
|
||||
return (endColor * 0.7 + baseColor * 0.5) * baseColor.a * uOpacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass ShieldPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelFunction();
|
||||
}
|
||||
}
|
||||
@@ -97,12 +97,6 @@ namespace CalamityMod.Events
|
||||
#region Loading and Unloading
|
||||
public static void Load()
|
||||
{
|
||||
BossIDsAfterDeath = new Dictionary<int, int[]>()
|
||||
{
|
||||
[ModContent.NPCType<HiveMind>()] = new int[] { ModContent.NPCType<HiveMindP2>() },
|
||||
[ModContent.NPCType<StormWeaverHead>()] = new int[] { ModContent.NPCType<StormWeaverHeadNaked>(), ModContent.NPCType<StormWeaverBodyNaked>(), ModContent.NPCType<StormWeaverTailNaked>() },
|
||||
};
|
||||
|
||||
Bosses = new List<Boss>()
|
||||
{
|
||||
new Boss(NPCID.QueenBee),
|
||||
@@ -297,13 +291,13 @@ namespace CalamityMod.Events
|
||||
|
||||
new Boss(ModContent.NPCType<Yharon>(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType<DetonatingFlare>(), ModContent.NPCType<DetonatingFlare2>() }),
|
||||
|
||||
new Boss(ModContent.NPCType<DevourerofGodsHeadS>(), TimeChangeContext.Day, type =>
|
||||
new Boss(ModContent.NPCType<DevourerofGodsHead>(), TimeChangeContext.Day, type =>
|
||||
{
|
||||
Player player = Main.player[ClosestPlayerToWorldCenter];
|
||||
|
||||
Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DevourerSpawn"), player.Center);
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
|
||||
}, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType<DevourerofGodsBodyS>(), ModContent.NPCType<DevourerofGodsTailS>() })
|
||||
}, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType<DevourerofGodsBody>(), ModContent.NPCType<DevourerofGodsTail>() })
|
||||
};
|
||||
|
||||
BossDeathEffects = new Dictionary<int, Action<NPC>>()
|
||||
@@ -324,7 +318,7 @@ namespace CalamityMod.Events
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.BossRushTierFourEndText", XerocTextColor);
|
||||
},
|
||||
[ModContent.NPCType<DevourerofGodsHeadS>()] = npc =>
|
||||
[ModContent.NPCType<DevourerofGodsHead>()] = npc =>
|
||||
{
|
||||
CalamityUtils.KillAllHostileProjectiles();
|
||||
CalamityWorld.bossRushHostileProjKillCounter = 3;
|
||||
|
||||
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 377 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 790 B |
|
After Width: | Height: | Size: 635 B |
|
After Width: | Height: | Size: 574 B |
|
After Width: | Height: | Size: 803 B |
|
After Width: | Height: | Size: 809 B |
|
After Width: | Height: | Size: 448 B |
|
After Width: | Height: | Size: 646 B |
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 746 B |
@@ -5,6 +5,7 @@ using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
using CalamityMod.World;
|
||||
@@ -17,6 +18,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
@@ -129,7 +131,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.QuickMana += ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.ItemCheck += ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.AddBuff += AllowBuffTimeStackingForManaBurn;
|
||||
IL.Terraria.Main.UpdateAudio += ManipulateSoundMuffleFactor;
|
||||
IL.Terraria.Main.DoDraw += DrawFusableParticles;
|
||||
|
||||
// Ravager platform fall fix
|
||||
On.Terraria.NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
|
||||
@@ -145,6 +147,10 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.Update += RunSpeedAdjustments;
|
||||
IL.Terraria.Player.Update += ReduceWingHoverVelocities;
|
||||
|
||||
// Mana regen balance
|
||||
IL.Terraria.Player.Update += ManaRegenDelayAdjustment;
|
||||
IL.Terraria.Player.UpdateManaRegen += ManaRegenAdjustment;
|
||||
|
||||
// World generation
|
||||
IL.Terraria.WorldGen.Pyramid += ReplacePharaohSetInPyramids;
|
||||
IL.Terraria.WorldGen.MakeDungeon += PreventDungeonHorizontalCollisions;
|
||||
@@ -157,16 +163,17 @@ namespace CalamityMod.ILEditing
|
||||
// Removal of vanilla stupidity
|
||||
IL.Terraria.Item.Prefix += RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC += MakeVoodooDemonDollWork;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
On.Terraria.Main.InitLifeBytes += BossRushLifeBytes;
|
||||
IL.Terraria.NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unloads all IL Editing changes in the mod.
|
||||
/// </summary>
|
||||
internal static void Unload()
|
||||
/// <summary>
|
||||
/// Unloads all IL Editing changes in the mod.
|
||||
/// </summary>
|
||||
internal static void Unload()
|
||||
{
|
||||
VanillaSpawnTownNPCs = null;
|
||||
labDoorOpen = labDoorClosed = aLabDoorOpen = aLabDoorClosed = -1;
|
||||
@@ -187,7 +194,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.QuickMana -= ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.ItemCheck -= ApplyManaBurnIfNeeded;
|
||||
IL.Terraria.Player.AddBuff -= AllowBuffTimeStackingForManaBurn;
|
||||
IL.Terraria.Main.UpdateAudio -= ManipulateSoundMuffleFactor;
|
||||
IL.Terraria.Main.DoDraw -= DrawFusableParticles;
|
||||
|
||||
// Ravager platform fall fix
|
||||
On.Terraria.NPC.Collision_DecideFallThroughPlatforms -= EnableCalamityBossPlatformCollision;
|
||||
@@ -203,8 +210,12 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.Update -= RunSpeedAdjustments;
|
||||
IL.Terraria.Player.Update -= ReduceWingHoverVelocities;
|
||||
|
||||
// World generation
|
||||
IL.Terraria.WorldGen.Pyramid -= ReplacePharaohSetInPyramids;
|
||||
// Mana regen balance
|
||||
IL.Terraria.Player.Update -= ManaRegenDelayAdjustment;
|
||||
IL.Terraria.Player.UpdateManaRegen -= ManaRegenAdjustment;
|
||||
|
||||
// World generation
|
||||
IL.Terraria.WorldGen.Pyramid -= ReplacePharaohSetInPyramids;
|
||||
IL.Terraria.WorldGen.MakeDungeon -= PreventDungeonHorizontalCollisions;
|
||||
IL.Terraria.WorldGen.DungeonHalls -= PreventDungeonHallCollisions;
|
||||
IL.Terraria.WorldGen.GrowLivingTree -= BlockLivingTreesNearOcean;
|
||||
@@ -215,6 +226,7 @@ namespace CalamityMod.ILEditing
|
||||
// Removal of vanilla stupidity
|
||||
IL.Terraria.Item.Prefix -= RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns -= PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC -= MakeVoodooDemonDollWork;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
On.Terraria.Main.InitLifeBytes -= BossRushLifeBytes;
|
||||
@@ -498,33 +510,6 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Brtrue, finalReturn);
|
||||
}
|
||||
|
||||
private static void ManipulateSoundMuffleFactor(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new ILCursor(il);
|
||||
cursor.GotoNext(MoveType.After, i => i.MatchStloc(20));
|
||||
|
||||
cursor.Emit(OpCodes.Ldloc, 20);
|
||||
cursor.EmitDelegate<Func<float, float>>(originalMuffleFactor =>
|
||||
{
|
||||
if (Main.gameMenu || !Main.LocalPlayer.active)
|
||||
return originalMuffleFactor;
|
||||
|
||||
float playerMuffleFactor = 1f - Main.LocalPlayer.Calamity().MusicMuffleFactor;
|
||||
float result = MathHelper.Clamp(originalMuffleFactor * playerMuffleFactor, -1f, 1f);
|
||||
if (result <= 0)
|
||||
{
|
||||
for (int i = 0; i < Main.music.Length; i++)
|
||||
{
|
||||
if (Main.music[i] != null && Main.music[i].IsPlaying)
|
||||
Main.music[i].Stop(AudioStopOptions.Immediate);
|
||||
}
|
||||
Main.curMusic = 0;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
cursor.Emit(OpCodes.Stloc, 20);
|
||||
}
|
||||
|
||||
#region Fire Cursor
|
||||
private static void UseCoolFireCursorEffect(On.Terraria.Main.orig_DrawCursor orig, Vector2 bonus, bool smart)
|
||||
{
|
||||
@@ -620,6 +605,36 @@ namespace CalamityMod.ILEditing
|
||||
Main.spriteBatch.Draw(crosshairTexture, baseDrawPosition, null, cursorColor, 0f, crosshairTexture.Size() * 0.5f, Main.cursorScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private static void DrawFusableParticles(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new ILCursor(il);
|
||||
|
||||
// Over NPCs but before Projectiles.
|
||||
if (!cursor.TryGotoNext(c => c.MatchCallOrCallvirt<Main>("SortDrawCacheWorms")))
|
||||
{
|
||||
LogFailure("Fusable Particle Rendering", "Could not locate the SortDrawCacheWorms reference method to attach to.");
|
||||
return;
|
||||
}
|
||||
cursor.EmitDelegate<Action>(() => FusableParticleManager.RenderAllFusableParticles(FusableParticleRenderLayer.OverNPCsBeforeProjectiles));
|
||||
|
||||
// Over Players.
|
||||
if (!cursor.TryGotoNext(MoveType.After, c => c.MatchCallOrCallvirt<Main>("DrawPlayers")))
|
||||
{
|
||||
LogFailure("Fusable Particle Rendering", "Could not locate the DrawPlayers reference method to attach to.");
|
||||
return;
|
||||
}
|
||||
cursor.EmitDelegate<Action>(() => FusableParticleManager.RenderAllFusableParticles(FusableParticleRenderLayer.OverPlayers));
|
||||
|
||||
// Over Water.
|
||||
if (!cursor.TryGotoNext(c => c.MatchCallOrCallvirt<MoonlordDeathDrama>("DrawWhite")))
|
||||
{
|
||||
LogFailure("Fusable Particle Rendering", "Could not locate the DrawWhite reference method to attach to.");
|
||||
return;
|
||||
}
|
||||
cursor.EmitDelegate<Action>(() => FusableParticleManager.RenderAllFusableParticles(FusableParticleRenderLayer.OverWater));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Damage and health balance
|
||||
@@ -877,12 +892,57 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 10.8f); // Reduce by 10%.
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region World generation
|
||||
#region Mana regen balance
|
||||
private static void ManaRegenDelayAdjustment(ILContext il)
|
||||
{
|
||||
// Decrease the max mana regen delay so that mage is less annoying to play without mana regen buffs.
|
||||
// Decreases the max mana regen delay from a range of 31.5 - 199.5 to 4 - 52.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(45f))) // The flat amount added to max regen delay in the formula.
|
||||
{
|
||||
LogFailure("Max Mana Regen Delay Reduction", "Could not locate the max mana regen flat variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 20f); // Decrease to 20f.
|
||||
|
||||
// Note: There is no need to replace the other Pharaoh piece, due to how the vanilla code works.
|
||||
private static void ReplacePharaohSetInPyramids(ILContext il)
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(0.7f))) // The multiplier for max mana regen delay.
|
||||
{
|
||||
LogFailure("Max Mana Regen Delay Reduction", "Could not locate the max mana regen delay multiplier variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 0.2f); // Decrease to 0.2f.
|
||||
}
|
||||
|
||||
private static void ManaRegenAdjustment(ILContext il)
|
||||
{
|
||||
// Increase the base mana regen so that mage is less annoying to play without mana regen buffs.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(0.8f))) // The multiplier for the mana regen formula: (float)statMana / (float)statManaMax2 * 0.8f + 0.2f.
|
||||
{
|
||||
LogFailure("Mana Regen Buff", "Could not locate the mana regen multiplier variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 0.25f); // Decrease to 0.25f.
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(0.2f))) // The flat added mana regen amount.
|
||||
{
|
||||
LogFailure("Mana Regen Buff", "Could not locate the flat mana regen variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 0.75f); // Increase to 0.75f.
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region World generation
|
||||
|
||||
// Note: There is no need to replace the other Pharaoh piece, due to how the vanilla code works.
|
||||
private static void ReplacePharaohSetInPyramids(ILContext il)
|
||||
{
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
@@ -1094,6 +1154,31 @@ namespace CalamityMod.ILEditing
|
||||
if (!Main.player[plr].Calamity().bossZen)
|
||||
orig(plr);
|
||||
}
|
||||
|
||||
// This may seem absolutely obscene, but vanilla spawn behavior does not occur within the spawn pool that TML provides, only modded
|
||||
// spawns do. Pretty much everything else is simply a fuckton of manual conditional NPC.NewNPC calls. As such, the only way to bypass
|
||||
// vanilla spawn behaviors is the IL edit them out of existence. Here, simply replacing the voodoo demon ID with an empty one is performed.
|
||||
// Something cleaner could probably be done, such as getting rid of the entire NPC.NewNPC call, but this is the easiest solution I can come up with.
|
||||
private static void MakeVoodooDemonDollWork(ILContext il)
|
||||
{
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(NPCID.VoodooDemon)))
|
||||
{
|
||||
LogFailure("Voodoo Demon Doll Mechanic", "Could not locate the Voodoo Demon ID.");
|
||||
return;
|
||||
}
|
||||
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldloc, 6);
|
||||
cursor.EmitDelegate<Func<int, int>>(spawnPlayerIndex =>
|
||||
{
|
||||
if (Main.player[spawnPlayerIndex].active && Main.player[spawnPlayerIndex].Calamity().disableVoodooSpawns)
|
||||
return NPCID.None;
|
||||
|
||||
return NPCID.VoodooDemon;
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Vanilla bugs exposed by Calamity mechanics
|
||||
|
||||
@@ -11,9 +11,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Alchemical Flask");
|
||||
Tooltip.SetDefault("All attacks inflict the plague\n" +
|
||||
"Reduces the damage caused to you by the plague\n" +
|
||||
"Removes the blindness effect caused by the plague\n" +
|
||||
Tooltip.SetDefault("All attacks inflict the Plague debuff\n" +
|
||||
"Projectiles spawn plague seekers on enemy hits");
|
||||
}
|
||||
|
||||
@@ -30,14 +28,13 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.alchFlask = true;
|
||||
modPlayer.reducedPlagueDmg = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.BottledWater);
|
||||
recipe.AddIngredient(ItemID.Bezoar);
|
||||
recipe.AddIngredient(ItemID.BeeWax, 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 10);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories
|
||||
item.height = 26;
|
||||
item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
item.accessory = true;
|
||||
item.expert = true;
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,12 +13,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Plague Hive");
|
||||
Tooltip.SetDefault("The power of your bees and wasps will rival the Moon Lord himself\n" +
|
||||
"Summons a damaging plague aura around the player to destroy nearby enemies\n" +
|
||||
"Releases bees when damaged\n" +
|
||||
"All of your attacks inflict the plague\n" +
|
||||
"Reduces the damage caused to you by the plague\n" +
|
||||
"Projectiles spawn plague seekers on enemy hits");
|
||||
Tooltip.SetDefault("The power of bees and wasps will rival the Moon Lord himself\n" +
|
||||
"All attacks inflict the Plague debuff\n" +
|
||||
"Releases bees when damaged that inflict the Plague\n" +
|
||||
"Projectiles spawn plague seekers on enemy hits");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -26,7 +24,6 @@ namespace CalamityMod.Items.Accessories
|
||||
item.width = 42;
|
||||
item.height = 48;
|
||||
item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
||||
item.expert = true;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.accessory = true;
|
||||
}
|
||||
@@ -34,9 +31,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<ToxicHeart>());
|
||||
recipe.AddIngredient(ModContent.ItemType<AlchemicalFlask>());
|
||||
recipe.AddIngredient(ItemID.HiveBackpack);
|
||||
recipe.AddIngredient(ItemID.HoneyComb);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
@@ -48,44 +43,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.bee = true;
|
||||
modPlayer.uberBees = true;
|
||||
player.strongBees = true;
|
||||
modPlayer.alchFlask = true;
|
||||
modPlayer.reducedPlagueDmg = true;
|
||||
int plagueCounter = 0;
|
||||
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.1f, 2f, 0.2f);
|
||||
int num = ModContent.BuffType<Plague>();
|
||||
float num2 = 300f;
|
||||
bool flag = plagueCounter % 60 == 0;
|
||||
int num3 = (int)(60 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (random == 0)
|
||||
{
|
||||
for (int l = 0; l < 200; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
|
||||
{
|
||||
if (nPC.FindBuffIndex(num) == -1)
|
||||
{
|
||||
nPC.AddBuff(num, 120, false);
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plagueCounter++;
|
||||
if (plagueCounter >= 180)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,9 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!CalamityWorld.downedSCal)
|
||||
bool scal = CalamityWorld.downedSCal;
|
||||
bool draedon = CalamityWorld.downedExoMechs;
|
||||
if (!scal || !draedon)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (TooltipLine line in tooltips)
|
||||
@@ -85,8 +87,8 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tooltips.Insert(index+1, new TooltipLine(CalamityMod.Instance, "Tooltip1", "[c/f05a5a:The soul within this crystal has been defiled by the powerful magic of a supreme witch]\nMerchants will reject a defiled soul such as this."));
|
||||
string rejectionReason = (!draedon) ? "[c/f05a5a:The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations]" : "[c/f05a5a:The soul within this crystal has been defiled by the powerful magic of a supreme witch]"; //there might be a better way to word the draedon line, not sure
|
||||
tooltips.Insert(index+1, new TooltipLine(CalamityMod.Instance, "Tooltip1", rejectionReason + "\nMerchants will reject a defiled soul such as this."));
|
||||
}
|
||||
else if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs)
|
||||
{
|
||||
@@ -99,7 +101,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CalamityWorld.downedSCal)
|
||||
if (scal && draedon)
|
||||
{
|
||||
if (!CalamityWorld.death)
|
||||
{
|
||||
|
||||
@@ -18,8 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Extends the duration of potion buffs by 100% and potion buffs remain active even after you die\n" +
|
||||
"15% increased damage\n" +
|
||||
"Shade rains down when you are hit\n" +
|
||||
"Nearby enemies receive a variety of debuffs when you are hit\n" +
|
||||
"You will confuse nearby enemies when you are struck");
|
||||
"Nearby enemies receive a variety of debuffs when you are hit");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(9, 6));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories
|
||||
item.height = 26;
|
||||
item.value = CalamityGlobalItem.Rarity7BuyPrice;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.expert = true;
|
||||
item.accessory = true;
|
||||
item.defense = 10;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -12,7 +13,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Toxic Heart");
|
||||
Tooltip.SetDefault("Summons a damaging plague aura around the player to destroy nearby enemies");
|
||||
Tooltip.SetDefault("Summons a plague aura around you that damages nearby enemies\n" +
|
||||
"Reduces the damage caused by the Plague debuff and removes its blindness effect");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -27,12 +29,14 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.reducedPlagueDmg = true;
|
||||
int plagueCounter = 0;
|
||||
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.05f, 1f, 0.1f);
|
||||
int num = ModContent.BuffType<Plague>();
|
||||
float num2 = 300f;
|
||||
bool flag = plagueCounter % 60 == 0;
|
||||
int num3 = (int)(30 * player.AverageDamage());
|
||||
int num3 = (int)(50 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
DisplayName.SetDefault("Exodus Wings");
|
||||
Tooltip.SetDefault("Pulsing with an alien heartbeat\n" +
|
||||
"Horizontal speed: 8.5\n" +
|
||||
"Acceleration multiplier: 2\n" +
|
||||
"Horizontal speed: 9.0\n" +
|
||||
"Acceleration multiplier: 2.5\n" +
|
||||
"Good vertical speed\n" +
|
||||
"Flight time: 180\n" +
|
||||
"5% increased rogue damage and critical strike chance while wearing the Empyrean Armor");
|
||||
@@ -70,8 +70,8 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
|
||||
{
|
||||
speed = 8.5f;
|
||||
acceleration *= 2f;
|
||||
speed = 9f;
|
||||
acceleration *= 2.5f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 42;
|
||||
item.damage = 28;
|
||||
item.ranged = true;
|
||||
item.width = 22;
|
||||
item.height = 22;
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.UpdateJumpHeight();
|
||||
if (shouldBoost)
|
||||
if (shouldBoost && !player.mount.Active)
|
||||
{
|
||||
player.velocity.X *= 1.3f;
|
||||
player.velocity.X *= 1.1f;
|
||||
shouldBoost = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace CalamityMod.Items
|
||||
public bool canFirePointBlankShots = false;
|
||||
public bool trueMelee = false;
|
||||
|
||||
public static readonly Color ExhumedTooltipColor = new Color(198, 27, 64);
|
||||
|
||||
// See RogueWeapon.cs for rogue modifier shit
|
||||
#region Modifiers
|
||||
public CalamityGlobalItem()
|
||||
@@ -266,7 +268,6 @@ namespace CalamityMod.Items
|
||||
case ItemID.Spear:
|
||||
case ItemID.Trident:
|
||||
case ItemID.PalladiumPike:
|
||||
case ItemID.ObsidianSwordfish:
|
||||
case ItemID.CobaltDrill:
|
||||
case ItemID.MythrilDrill:
|
||||
case ItemID.AdamantiteDrill:
|
||||
@@ -321,12 +322,100 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
|
||||
// Set Celestial Sigil stack to 1 because it's not consumable anymore
|
||||
case ItemID.SlimeCrown:
|
||||
case ItemID.SuspiciousLookingEye:
|
||||
case ItemID.WormFood:
|
||||
case ItemID.BloodySpine:
|
||||
case ItemID.Abeemination:
|
||||
case ItemID.MechanicalEye:
|
||||
case ItemID.MechanicalWorm:
|
||||
case ItemID.MechanicalSkull:
|
||||
case ItemID.CelestialSigil:
|
||||
item.maxStack = 1;
|
||||
item.consumable = false;
|
||||
break;
|
||||
|
||||
// True melee weapon adjustments
|
||||
case ItemID.BladedGlove:
|
||||
item.damage = 15;
|
||||
item.useTime = 7;
|
||||
item.useAnimation = 7;
|
||||
break;
|
||||
|
||||
case ItemID.IceBlade:
|
||||
item.damage = 26;
|
||||
item.useTime = 33;
|
||||
break;
|
||||
|
||||
case ItemID.EnchantedSword:
|
||||
item.damage = 42;
|
||||
item.useAnimation = 20;
|
||||
item.shootSpeed = 15f;
|
||||
break;
|
||||
|
||||
case ItemID.Starfury:
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.WoodYoyo:
|
||||
case ItemID.Chik:
|
||||
case ItemID.FormatC:
|
||||
case ItemID.HelFire:
|
||||
case ItemID.Amarok:
|
||||
case ItemID.Gradient:
|
||||
case ItemID.Code2:
|
||||
case ItemID.Yelets:
|
||||
case ItemID.RedsYoyo:
|
||||
case ItemID.ValkyrieYoyo:
|
||||
case ItemID.Kraken:
|
||||
case ItemID.TheEyeOfCthulhu:
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.Rally:
|
||||
item.damage = 20;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.JungleYoyo:
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.CrimsonYoyo:
|
||||
item.damage = 30;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.CorruptYoyo:
|
||||
item.damage = 27;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.Code1:
|
||||
item.damage = 25;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.Valor:
|
||||
item.damage = 32;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.ObsidianSwordfish:
|
||||
item.damage = 45;
|
||||
trueMelee = true;
|
||||
break;
|
||||
|
||||
case ItemID.BloodyMachete:
|
||||
item.damage = 30;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.Cascade:
|
||||
item.damage = 39;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.SlapHand:
|
||||
item.damage = 120;
|
||||
break;
|
||||
@@ -517,6 +606,7 @@ namespace CalamityMod.Items
|
||||
|
||||
case ItemID.Terrarian:
|
||||
item.damage = 352;
|
||||
item.autoReuse = true;
|
||||
break;
|
||||
|
||||
case ItemID.RainbowRod:
|
||||
@@ -925,7 +1015,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SavingAndLoading
|
||||
#region Saving And Loading
|
||||
public override bool NeedsSaving(Item item)
|
||||
{
|
||||
return rogue || canFirePointBlankShots || trueMelee || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
|
||||
@@ -1583,6 +1673,15 @@ namespace CalamityMod.Items
|
||||
{
|
||||
switch (item.type)
|
||||
{
|
||||
case ItemID.MagicHat:
|
||||
player.magicDamage -= 0.02f;
|
||||
player.magicCrit -= 2;
|
||||
break;
|
||||
|
||||
case ItemID.WizardHat:
|
||||
player.magicDamage -= 0.1f;
|
||||
break;
|
||||
|
||||
case ItemID.GladiatorHelmet:
|
||||
case ItemID.ObsidianHelm:
|
||||
player.Calamity().throwingDamage += 0.03f;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// The Picksaw always drops if the player doesn't have one in their inventory. Otherwise it has a 25% chance.
|
||||
bool playerHasPicksaw = player.InventoryHas(ItemID.Picksaw);
|
||||
DropHelper.DropItemChance(player, ItemID.Picksaw, playerHasPicksaw ? 1.0f : 0.25f);
|
||||
DropHelper.DropItemChance(player, ItemID.Picksaw, playerHasPicksaw ? 0.25f : 1.0f);
|
||||
|
||||
DropHelper.DropItem(player, ModContent.ItemType<EssenceofCinder>(), 8, 13);
|
||||
break;
|
||||
|
||||
@@ -44,20 +44,20 @@ namespace CalamityMod.Items
|
||||
// This is placed between vanilla tooltip edits and mod mechanics because it can apply to vanilla items.
|
||||
StealthGenAccessoryTooltip(item, tooltips);
|
||||
|
||||
// If an item has special tags (specifically Ice, Fire, and Nature), show that in the tooltip.
|
||||
ElementTooltip(item, tooltips);
|
||||
// Adds "Does extra damage to enemies shot at point-blank range" to weapons capable of it.
|
||||
if (canFirePointBlankShots)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(mod, "PointBlankShot", "Does extra damage to enemies shot at point-blank range");
|
||||
tooltips.Add(line);
|
||||
}
|
||||
|
||||
// If an item has special tags (specifically Ice, Fire, and Nature), show that in the tooltip.
|
||||
ElementTooltip(item, tooltips);
|
||||
|
||||
// If an item has an enchantment, show its prefix in the first tooltip line and append its description to the
|
||||
// tooltip list.
|
||||
EnchantmentTooltips(item, tooltips);
|
||||
|
||||
// Adds "Does extra damage to enemies shot at point-blank range" to weapons capable of it.
|
||||
if (canFirePointBlankShots)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(mod, "PointBlankShot", "Does extra damage to enemies shot at point-blank range");
|
||||
tooltips.Add(line);
|
||||
}
|
||||
|
||||
// Everything below this line can only apply to modded items. If the item is vanilla, stop here for efficiency.
|
||||
if (item.type < ItemID.Count)
|
||||
return;
|
||||
@@ -410,10 +410,10 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.AntlionClaw || item.type == ItemID.BoneSword || item.type == ItemID.BreakerBlade)
|
||||
EditTooltipByName("Knockback", (line) => line.text += "\nIgnores 50% of enemy defense");
|
||||
|
||||
if (item.type == ItemID.LightsBane || item.type == ItemID.NightsEdge || item.type == ItemID.TrueNightsEdge || item.type == ItemID.BallOHurt)
|
||||
if (item.type == ItemID.LightsBane || item.type == ItemID.NightsEdge || item.type == ItemID.TrueNightsEdge || item.type == ItemID.BallOHurt || item.type == ItemID.CorruptYoyo)
|
||||
EditTooltipByName("Knockback", (line) => line.text += "\nInflicts Shadowflame on hit");
|
||||
|
||||
if (item.type == ItemID.BloodButcherer || item.type == ItemID.TheRottedFork || item.type == ItemID.TheMeatball)
|
||||
if (item.type == ItemID.BloodButcherer || item.type == ItemID.TheRottedFork || item.type == ItemID.TheMeatball || item.type == ItemID.CrimsonYoyo)
|
||||
EditTooltipByName("Knockback", (line) => line.text += "\nInflicts Burning Blood on hit");
|
||||
#endregion
|
||||
|
||||
@@ -493,6 +493,19 @@ namespace CalamityMod.Items
|
||||
// Rebalances to vanilla item stats
|
||||
#region Vanilla Item Rebalance Tooltips
|
||||
|
||||
// Magic Power Potion nerf
|
||||
if (item.type == ItemID.MagicPowerPotion)
|
||||
EditTooltipByNum(0, (line) => line.text = "10% increased magic damage");
|
||||
|
||||
// Magic and Wizard Hat nerfs
|
||||
// Magic Hat
|
||||
if (item.type == ItemID.MagicHat)
|
||||
EditTooltipByNum(0, (line) => line.text = "5% increased magic damage and critical strike chance");
|
||||
|
||||
// Wizard Hat
|
||||
if (item.type == ItemID.WizardHat)
|
||||
EditTooltipByNum(0, (line) => line.text = "5% increased magic damage");
|
||||
|
||||
// Reduce DD2 armor piece bonuses because they're overpowered
|
||||
// Squire armor
|
||||
if (item.type == ItemID.SquirePlating)
|
||||
@@ -568,6 +581,14 @@ namespace CalamityMod.Items
|
||||
EditTooltipByNum(0, (line) => line.text = line.text.Replace("40%", "20%"));
|
||||
#endregion
|
||||
|
||||
// Non-consumable boss summon items
|
||||
#region Vanilla Boss Summon Non-consumable Tooltips
|
||||
if (item.type == ItemID.SlimeCrown || item.type == ItemID.SuspiciousLookingEye || item.type == ItemID.WormFood ||
|
||||
item.type == ItemID.BloodySpine || item.type == ItemID.Abeemination || item.type == ItemID.MechanicalEye ||
|
||||
item.type == ItemID.MechanicalWorm || item.type == ItemID.MechanicalSkull || item.type == ItemID.CelestialSigil)
|
||||
EditTooltipByNum(0, (line) => line.text += "\nNot consumable");
|
||||
#endregion
|
||||
|
||||
// Items which provide immunity to either heat or cold in Death Mode, or interact with Lethal Lava
|
||||
#region Lava and Death Mode Environmental Immunity Tooltips
|
||||
string heatProtectionLine = "\nProvides heat protection in Death Mode";
|
||||
|
||||
@@ -13,18 +13,30 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Death");
|
||||
Tooltip.SetDefault("Makes bosses even more EXTREME.\n" +
|
||||
"Allows certain bosses to spawn naturally.\n" +
|
||||
"Certain biomes and events have additional weather effects.\n" +
|
||||
"Lethal lava effects are always enabled.\n" +
|
||||
"Enemies and bosses buffed by Revengeance Mode are even stronger in this mode.\n" +
|
||||
"Greatly boosts enemy spawn rates during the blood moon.\n" +
|
||||
"Nerfs the effectiveness of life steal.\n" +
|
||||
"Makes the abyss more treacherous to navigate.\n" +
|
||||
"Nurse no longer heals while a boss is alive.\n" +
|
||||
"Increases damage done by 50% for several debuffs and all alcohols that reduce life regen.\n" +
|
||||
"Effect can be toggled on and off.\n" +
|
||||
"Effect will only work if Revengeance Mode is active.");
|
||||
Tooltip.SetDefault("Enables/disables Death Mode, can only be used in Revengeance Mode.\n" +
|
||||
|
||||
// Rev Mode line
|
||||
"All effects from Revengeance Mode are enabled, including the following:\n" +
|
||||
|
||||
// Biome effect lines
|
||||
"Allows certain bosses to spawn naturally depending on what biome you're in.\n" +
|
||||
"Certain biomes and events have additional weather effects.\n" +
|
||||
"Lethal Lava effects are always enabled.\n" +
|
||||
"Greatly boosts enemy spawn rates during the Blood Moon.\n" +
|
||||
"Makes the Abyss more treacherous to navigate.\n" +
|
||||
|
||||
// General enemy lines
|
||||
"Certain non-boss enemies and projectiles deal between 6% and 15% more damage.\n" +
|
||||
|
||||
// Misc lines
|
||||
"Nerfs the effectiveness of life steal a bit more.\n" +
|
||||
"The Nurse no longer heals you while a boss is alive.\n" +
|
||||
"Defense damage is increased by 2.5%.\n" +
|
||||
"Increases damage done by 50% for several debuffs and all alcohols that reduce life regen.\n" +
|
||||
|
||||
// Boss lines
|
||||
"Changes all boss AIs and some enemy AIs a bit more.\n" +
|
||||
"Increases the damage of all bosses a bit more.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -4,7 +4,6 @@ using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -17,9 +16,22 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Malice");
|
||||
Tooltip.SetDefault("Enrages every boss and allows them to drop special items.\n" +
|
||||
"Nurse no longer heals while a boss is alive.\n" +
|
||||
"Effect can be toggled on and off.");
|
||||
Tooltip.SetDefault("Enables/disables Malice Mode.\n" +
|
||||
|
||||
// Misc lines
|
||||
"Greatly nerfs the effectiveness of life steal.\n" +
|
||||
"Nerfs the effectiveness of the Titanium Armor set bonus, doesn't stack with Revengeance Mode.\n" +
|
||||
"The Nurse no longer heals you while a boss is alive.\n" +
|
||||
"Defense damage is 5% higher than Death Mode.\n" +
|
||||
"Increases damage done by 50% for several debuffs and all alcohols that reduce life regen.\n" +
|
||||
|
||||
// Boss lines
|
||||
"All boss minions no longer drop hearts.\n" +
|
||||
"Gives every boss a new enraged AI and allows them to drop special items.\n" +
|
||||
"Bosses and their projectiles deal 35% more damage.\n" +
|
||||
"Most bosses will enter later phases sooner if the fight has gone on for a long time.\n" +
|
||||
"Increases the velocity of most boss projectiles by 25%, this is increased to 35% during Boss Rush.\n" +
|
||||
"Boss reactive DR is always active outside of Boss Rush and is increased by 50%.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -14,16 +14,27 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Revengeance");
|
||||
Tooltip.SetDefault("Enables/disables Revengeance Mode, can only be used in expert mode.\n" +
|
||||
Tooltip.SetDefault("Enables/disables Revengeance Mode, can only be used in Expert Mode.\n" +
|
||||
|
||||
// Rage and Adrenaline lines
|
||||
"RAGE TOOLTIP LINE HERE\n" +
|
||||
"You gain Rage when in proximity of enemies or by using special items.\n" +
|
||||
"ADRENALINE TOOLTIP LINE HERE\n" +
|
||||
"You gain Adrenaline whenever a boss is alive. Getting hit drops Adrenaline back to 0.\n" +
|
||||
|
||||
// General enemy lines
|
||||
"All enemies drop 50% more coins and spawn 15% more frequently.\n" +
|
||||
"Certain enemies and projectiles deal between 5% and 25% more damage.\n" +
|
||||
"Certain non-boss enemies and projectiles deal between 10% and 25% more damage.\n" +
|
||||
"Makes certain enemies block life steal and nerfs the effectiveness of life steal.\n" +
|
||||
"Nerfs the effectiveness of the Titanium Armor set bonus.\n" +
|
||||
"Changes ALL boss AIs and some enemy AIs in vanilla and the Calamity Mod.\n" +
|
||||
|
||||
// Misc lines
|
||||
"Nerfs the effectiveness of the Titanium Armor set bonus.\n" +
|
||||
"Defense damage is increased by 2.5%.\n" +
|
||||
|
||||
// Boss lines
|
||||
"All boss minions no longer drop hearts.\n" +
|
||||
"Changes all boss AIs and some enemy AIs.\n" +
|
||||
"Increases the health and damage of all bosses.\n" +
|
||||
"Most bosses will enter later phases sooner if the fight has gone on for a long time.");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,12 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Schematic");
|
||||
Tooltip.SetDefault("You can barely make out its text...\n" +
|
||||
"Finely detailed diagrams of numerous devices and weaponry dance across the holographic screen\n" +
|
||||
"Picking up this item or holding it in your inventory permanently unlocks new recipes");
|
||||
Tooltip.SetDefault("Finely detailed diagrams of numerous devices and weaponry dance across the holographic screen.\n" +
|
||||
"The weaponry I supply to the workers of the laboratories is weak. Hardly suited for battle.\n" +
|
||||
"However, they suffice for self defense against any lab mechanisms or creations which may have gone rogue.\n" +
|
||||
"Addendum: For those who think themselves powerful, search the upper bounds of this planet’s atmosphere for a structure similar to that of the Sunken Seas.\n" +
|
||||
"I will know by the end if you are worthy of battling my creations.\n" +
|
||||
"Picking up this item or holding it in your inventory permanently unlocks new recipes");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace CalamityMod.Items.Mounts
|
||||
mountData.swimFrameStart = 0;
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
mountData.frontTextureGlow = ModContent.GetTexture("CalamityMod/Items/Mounts/DraedonGamerChairMount_Glowmask");
|
||||
mountData.textureWidth = mountData.frontTexture.Width;
|
||||
mountData.textureHeight = mountData.frontTexture.Height;
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Death Whistle");
|
||||
Tooltip.SetDefault("A very old temple whistle\n" +
|
||||
"Summons the Ravager");
|
||||
"Summons the Ravager\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Yellow;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -49,8 +49,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment, 5);
|
||||
recipe.AddIngredient(ItemID.LihzahrdBrick, 10);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment, 15);
|
||||
recipe.AddIngredient(ItemID.LihzahrdBrick, 25);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -12,19 +12,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Chunk");
|
||||
Tooltip.SetDefault("Summons Astrum Aureus");
|
||||
Tooltip.SetDefault("Summons Astrum Aureus\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -50,8 +50,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<Stardust>(), 15);
|
||||
recipe.AddIngredient(ItemID.FallenStar, 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<Stardust>(), 30);
|
||||
recipe.AddIngredient(ItemID.FallenStar, 20);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.Bumblebirb;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -10,19 +11,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Exotic Pheromones");
|
||||
Tooltip.SetDefault("Attracts the failed draconic experiment");
|
||||
Tooltip.SetDefault("Attracts the failed draconic experiment\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -44,8 +45,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.LunarBar, 3);
|
||||
recipe.AddIngredient(ItemID.FragmentSolar, 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
||||
recipe.AddIngredient(ItemID.FragmentSolar, 20);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -12,19 +12,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Bloody Worm Food");
|
||||
Tooltip.SetDefault("Summons the Perforator Hive");
|
||||
Tooltip.SetDefault("Summons the Perforator Hive\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -46,9 +46,9 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.Vertebrae, 9);
|
||||
recipe.AddIngredient(ModContent.ItemType<BloodSample>(), 5);
|
||||
recipe.AddIngredient(ItemID.CrimtaneBar, 2);
|
||||
recipe.AddIngredient(ItemID.Vertebrae, 13);
|
||||
recipe.AddIngredient(ModContent.ItemType<BloodSample>(), 7);
|
||||
recipe.AddIngredient(ItemID.CrimtaneBar, 3);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -11,19 +11,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Portabulb");
|
||||
Tooltip.SetDefault("Summons Plantera");
|
||||
Tooltip.SetDefault("Summons Plantera\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
|
||||
@@ -15,19 +15,18 @@ namespace CalamityMod.Items.SummonItems
|
||||
DisplayName.SetDefault("Charred Idol");
|
||||
Tooltip.SetDefault("Use in the Brimstone Crag at your own risk\n" +
|
||||
"Summons the Brimstone Elemental\n" +
|
||||
"The boss enrages outside of her home in the crags");
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.LightPurple;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -50,9 +49,9 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<UnholyCore>());
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 7);
|
||||
recipe.AddIngredient(ModContent.ItemType<UnholyCore>(), 2);
|
||||
recipe.AddTile(TileID.AdamantiteForge);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -6,7 +6,6 @@ using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.SummonItems
|
||||
@@ -47,7 +46,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return !NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>()) && !NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHeadS>()) && CalamityWorld.DoGSecondStageCountdown <= 0 && !BossRushEvent.BossRushActive;
|
||||
return !NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>()) && CalamityWorld.DoGSecondStageCountdown <= 0 && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player)
|
||||
|
||||
@@ -13,19 +13,18 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Cryo Key");
|
||||
Tooltip.SetDefault("Summons Cryogen\n" +
|
||||
"The boss enrages outside of the snowy tundra");
|
||||
"The boss enrages outside of the snowy tundra\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Pink;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -47,10 +46,10 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddRecipeGroup("AnyIceBlock", 25);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 3);
|
||||
recipe.AddIngredient(ItemID.SoulofLight, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 5);
|
||||
recipe.AddRecipeGroup("AnyIceBlock", 50);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 5);
|
||||
recipe.AddIngredient(ItemID.SoulofLight, 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 8);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -10,19 +10,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Decapodita Sprout");
|
||||
Tooltip.SetDefault("Summons Crabulon");
|
||||
Tooltip.SetDefault("Summons Crabulon\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Green;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.GlowingMushroom, 25);
|
||||
recipe.AddIngredient(ItemID.GlowingMushroom, 50);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -11,19 +11,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Draedon's Remote");
|
||||
Tooltip.SetDefault("Mayhem...");
|
||||
Tooltip.SetDefault("Mayhem...\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Yellow;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
|
||||
@@ -14,19 +14,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Desert Medallion");
|
||||
Tooltip.SetDefault("The desert sand stirs...\n" +
|
||||
"Summons the Desert Scourge");
|
||||
"Summons the Desert Scourge\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Green;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -61,10 +61,10 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SandBlock, 15);
|
||||
recipe.AddIngredient(ItemID.AntlionMandible, 3);
|
||||
recipe.AddIngredient(ItemID.Cactus, 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<StormlionMandible>());
|
||||
recipe.AddIngredient(ItemID.SandBlock, 25);
|
||||
recipe.AddIngredient(ItemID.Cactus, 15);
|
||||
recipe.AddIngredient(ItemID.AntlionMandible, 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<StormlionMandible>(), 2);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -11,18 +11,18 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eidolon Tablet");
|
||||
}
|
||||
Tooltip.SetDefault("Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
|
||||
@@ -56,7 +56,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 100);
|
||||
recipe.AddIngredient(ItemID.SpookyWood, 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 50);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -11,33 +11,31 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Old Power Cell");
|
||||
Tooltip.SetDefault("Summons the ancient golem when used in the Temple");
|
||||
Tooltip.SetDefault("Summons the Golem when used in the Temple\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
bool canSummon = false;
|
||||
if ((double)player.Center.Y > Main.worldSurface * 16.0)
|
||||
if (player.Center.Y > Main.worldSurface * 16.0)
|
||||
{
|
||||
int num = (int)player.Center.X / 16;
|
||||
int num2 = (int)player.Center.Y / 16;
|
||||
Tile tile = Framing.GetTileSafely(num, num2);
|
||||
if (tile.wall == 87)
|
||||
{
|
||||
canSummon = true;
|
||||
}
|
||||
}
|
||||
return canSummon && !NPC.AnyNPCs(NPCID.Golem) && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
@@ -56,8 +54,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment, 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>(), 5);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment, 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>(), 10);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -13,19 +13,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Overloaded Sludge");
|
||||
Tooltip.SetDefault("It looks corrupted\n" +
|
||||
"Summons the Slime God");
|
||||
"Summons the Slime God\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.LightRed;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -48,13 +48,13 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<EbonianGel>(), 25);
|
||||
recipe.AddRecipeGroup("AnyEvilBlock", 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<EbonianGel>(), 40);
|
||||
recipe.AddRecipeGroup("AnyEvilBlock", 40);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 40);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -14,18 +14,18 @@ namespace CalamityMod.Items.SummonItems
|
||||
DisplayName.SetDefault("Profaned Shard");
|
||||
Tooltip.SetDefault("A shard of the unholy flame\n" +
|
||||
"Summons the Profaned Guardians\n" +
|
||||
"Can only be used during daytime");
|
||||
"Can only be used during daytime\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<UnholyEssence>(), 15);
|
||||
recipe.AddIngredient(ItemID.LunarBar, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<UnholyEssence>(), 25);
|
||||
recipe.AddIngredient(ItemID.LunarBar, 5);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return (player.ZoneSkyHeight || player.ZoneUnderworldHeight || player.ZoneDungeon) &&
|
||||
!NPC.AnyNPCs(ModContent.NPCType<StormWeaverHead>()) && !NPC.AnyNPCs(ModContent.NPCType<StormWeaverHeadNaked>()) && !NPC.AnyNPCs(ModContent.NPCType<CeaselessVoid>()) && !NPC.AnyNPCs(ModContent.NPCType<Signus>()) &&
|
||||
!NPC.AnyNPCs(ModContent.NPCType<StormWeaverHead>()) && !NPC.AnyNPCs(ModContent.NPCType<CeaselessVoid>()) && !NPC.AnyNPCs(ModContent.NPCType<Signus>()) &&
|
||||
CalamityWorld.DoGSecondStageCountdown <= 0 && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Sandstorm's Core");
|
||||
Tooltip.SetDefault("Summons the Great Sand Shark");
|
||||
Tooltip.SetDefault("Summons the Great Sand Shark\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Lime;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -43,10 +43,10 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.AncientBattleArmorMaterial, 2);
|
||||
recipe.AddIngredient(ItemID.Ectoplasm, 5);
|
||||
recipe.AddIngredient(ItemID.Ectoplasm, 10);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 5);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.AddIngredient(ItemID.AncientBattleArmorMaterial, 3);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -14,19 +14,19 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Seafood");
|
||||
Tooltip.SetDefault("The sulphuric sand stirs...\n" +
|
||||
"Summons the Aquatic Scourge");
|
||||
"Summons the Aquatic Scourge\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 26;
|
||||
item.height = 24;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Pink;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
@@ -49,9 +49,9 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SulphurousSand>(), 10);
|
||||
recipe.AddIngredient(ItemID.Starfish, 5);
|
||||
recipe.AddIngredient(ItemID.SharkFin);
|
||||
recipe.AddIngredient(ModContent.ItemType<SulphurousSand>(), 20);
|
||||
recipe.AddIngredient(ItemID.Starfish, 10);
|
||||
recipe.AddIngredient(ItemID.SharkFin, 5);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -12,24 +12,24 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Teratoma");
|
||||
Tooltip.SetDefault("Summons the Hive Mind");
|
||||
Tooltip.SetDefault("Summons the Hive Mind\n" +
|
||||
"Not consumable");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 18;
|
||||
item.maxStack = 20;
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.useAnimation = 45;
|
||||
item.useTime = 45;
|
||||
item.useStyle = ItemUseStyleID.HoldingUp;
|
||||
item.consumable = true;
|
||||
item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return player.ZoneCorrupt && !NPC.AnyNPCs(ModContent.NPCType<HiveMind>()) && !NPC.AnyNPCs(ModContent.NPCType<HiveMindP2>()) && !BossRushEvent.BossRushActive;
|
||||
return player.ZoneCorrupt && !NPC.AnyNPCs(ModContent.NPCType<HiveMind>()) && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player)
|
||||
@@ -46,9 +46,9 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.RottenChunk, 9);
|
||||
recipe.AddIngredient(ModContent.ItemType<TrueShadowScale>(), 5);
|
||||
recipe.AddIngredient(ItemID.DemoniteBar, 2);
|
||||
recipe.AddIngredient(ItemID.RottenChunk, 13);
|
||||
recipe.AddIngredient(ModContent.ItemType<TrueShadowScale>(), 7);
|
||||
recipe.AddIngredient(ItemID.DemoniteBar, 3);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -13,10 +13,11 @@ namespace CalamityMod.Items.Tools
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 15;
|
||||
item.damage = 40;
|
||||
item.melee = true;
|
||||
item.width = 36;
|
||||
item.height = 36;
|
||||
item.scale = 1.5f;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 25;
|
||||
item.useTurn = true;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
{
|
||||
public class DevourerofGodsBag : ModItem
|
||||
{
|
||||
public override int BossBagNPC => ModContent.NPCType<DevourerofGodsHeadS>();
|
||||
public override int BossBagNPC => ModContent.NPCType<DevourerofGodsHead>();
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
{
|
||||
public class HiveMindBag : ModItem
|
||||
{
|
||||
public override int BossBagNPC => ModContent.NPCType<HiveMindP2>();
|
||||
public override int BossBagNPC => ModContent.NPCType<HiveMind>();
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -58,9 +58,6 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<Death>(), Main.expertMode);
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<DefiledRune>(), Main.expertMode);
|
||||
|
||||
// Speedrun King Slime
|
||||
DropHelper.DropItem(player, ItemID.SlimeCrown);
|
||||
|
||||
// The Lad
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<JoyfulHeart>(), player.name == "Aleksh" || player.name == "Shark Lad");
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
{
|
||||
public class StormWeaverBag : ModItem
|
||||
{
|
||||
public override int BossBagNPC => ModContent.NPCType<StormWeaverHeadNaked>();
|
||||
public override int BossBagNPC => ModContent.NPCType<StormWeaverHead>();
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -69,11 +69,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 5);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 4);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 8);
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class GruesomeEminence : ModItem
|
||||
{
|
||||
public const string PoeticTooltipLine = "The spirits of the amalgam could never pass on to their desired afterlife,\n" +
|
||||
"Tainted and melded by rage as they were.";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Gruesome Eminence");
|
||||
Tooltip.SetDefault("Summons a gaseous conglomeration of spirits near the cursor\n" +
|
||||
"At first, the spirits will fly wildly. This can hurt enemies and players\n" +
|
||||
"However, over time they will begin to accumulate to create a single, controllable monstrosity\n" +
|
||||
CalamityUtils.ColorMessage(PoeticTooltipLine, CalamityGlobalItem.ExhumedTooltipColor));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 888;
|
||||
item.magic = true;
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
item.mana = 8;
|
||||
item.width = 42;
|
||||
item.height = 74;
|
||||
item.useTime = 27;
|
||||
item.useAnimation = 27;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 5f;
|
||||
item.shootSpeed = 9f;
|
||||
item.shoot = ModContent.ProjectileType<GruesomeEminenceHoldout>();
|
||||
|
||||
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
// This weapon uses a holdout projectile.
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, item.shoot, damage, knockBack, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 604 B |
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 230;
|
||||
item.damage = 500;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 444;
|
||||
item.damage = 888;
|
||||
item.magic = true;
|
||||
item.mana = 10;
|
||||
item.width = 38;
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class Rancor : ModItem
|
||||
{
|
||||
public const string PoeticTooltipLine = "Forgiveness can only heal so much,\n" +
|
||||
"If the recipient has not yet forgiven themselves.";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Rancor");
|
||||
Tooltip.SetDefault("Casts a magic circle that charges energy and eventually releases a powerful laser burst of controlled maleficent magic\n" +
|
||||
"The laser causes arms and searing lava to appear on surfaces it touches which harm both you and enemies\n" +
|
||||
CalamityUtils.ColorMessage(PoeticTooltipLine, CalamityGlobalItem.ExhumedTooltipColor));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 2222;
|
||||
item.magic = true;
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
item.mana = 10;
|
||||
item.width = 66;
|
||||
item.height = 82;
|
||||
item.useTime = 27;
|
||||
item.useAnimation = 27;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 5f;
|
||||
item.shootSpeed = 9f;
|
||||
item.shoot = ModContent.ProjectileType<RancorHoldout>();
|
||||
|
||||
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
// This weapon uses a holdout projectile.
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, item.shoot, damage, knockBack, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 30;
|
||||
item.damage = 44;
|
||||
item.magic = true;
|
||||
item.mana = 7;
|
||||
item.width = 60;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.melee = true;
|
||||
item.damage = 20;
|
||||
item.damage = 21;
|
||||
item.knockBack = 4f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 25;
|
||||
item.damage = 23;
|
||||
item.knockBack = 4.25f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.damage = 38;
|
||||
item.damage = 55;
|
||||
item.melee = true;
|
||||
item.useAnimation = 30;
|
||||
item.useTime = 30;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 18;
|
||||
item.damage = 11;
|
||||
item.knockBack = 3f;
|
||||
item.useTime = 25;
|
||||
item.useAnimation = 25;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 14;
|
||||
item.width = 42;
|
||||
item.height = 38;
|
||||
item.damage = 24;
|
||||
item.damage = 35;
|
||||
item.melee = true;
|
||||
item.knockBack = 4f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = ItemRarityID.Green;
|
||||
item.shoot = ModContent.ProjectileType<EutrophicSpark>();
|
||||
item.shootSpeed = 3f;
|
||||
item.shootSpeed = 10f;
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 54;
|
||||
item.damage = 23;
|
||||
item.damage = 38;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.shoot = ModContent.ProjectileType<GoldplumeSpearProjectile>();
|
||||
item.shootSpeed = 5f;
|
||||
item.shootSpeed = 8f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 50;
|
||||
item.damage = 22;
|
||||
item.damage = 38;
|
||||
item.melee = true;
|
||||
item.useAnimation = 25;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.shoot = ModContent.ProjectileType<DarkBall>();
|
||||
item.shootSpeed = 5f;
|
||||
item.shootSpeed = 10f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.height = 134;
|
||||
item.width = 54;
|
||||
item.damage = 4050;
|
||||
item.damage = 3725;
|
||||
|
||||
// Displayed axe% is 1/5th of axePower here because trees have 500% hardness. This corrects for that.
|
||||
item.axe = 6000 / 5;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 74;
|
||||
item.damage = 75;
|
||||
item.damage = 80;
|
||||
item.melee = true;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.damage = 20;
|
||||
item.damage = 35;
|
||||
item.melee = true;
|
||||
item.useAnimation = 19;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = ItemRarityID.Green;
|
||||
item.shoot = ModContent.ProjectileType<RedtideWhirlpool>();
|
||||
item.shootSpeed = 6f;
|
||||
item.shootSpeed = 9f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.EnchantedSword);
|
||||
item.useTime = 30;
|
||||
item.damage = 26;
|
||||
item.melee = true;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 40;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 33;
|
||||
item.damage = 29;
|
||||
item.knockBack = 3.5f;
|
||||
item.useTime = 21;
|
||||
item.useAnimation = 21;
|
||||
|
||||