Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
No files matched your search
@@ -516,7 +516,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Create a direct strike to hit this specific NPC.
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Calamity>()));
|
||||
Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, i);
|
||||
Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, i);
|
||||
|
||||
// Enable crits by setting the sigil's damage class to be whatever the player's strongest damage class is.
|
||||
sigilStrike.DamageType = Player.GetBestClass();
|
||||
|
||||
// Incinerate the target with Vulnerability Hex.
|
||||
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), VulnerabilityHex.CalamityDuration);
|
||||
|
||||
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 515 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 808 B |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 884 B |
|
After Width: | Height: | Size: 639 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 604 B |
|
After Width: | Height: | Size: 509 B |
|
After Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 365 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 876 B |
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// This is ONLY the direct DPS of having the cursor over the enemy, not the damage from the flames debuff.
|
||||
// The debuff is VulnerabilityHex, check that file for its DPS.
|
||||
public const int BaseDamage = 266;
|
||||
public const int BaseDamage = 320;
|
||||
public const int HitsPerSecond = 12;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AstralBar : ModItem
|
||||
{
|
||||
public int frameCounter = 0;
|
||||
public int frame = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 25;
|
||||
@@ -25,13 +28,27 @@ namespace CalamityMod.Items.Placeables
|
||||
Item.useTime = 10;
|
||||
Item.autoReuse = true;
|
||||
Item.consumable = true;
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.width = 32;
|
||||
Item.height = 26;
|
||||
Item.maxStack = 99;
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
Item.value = Item.sellPrice(gold: 1, silver: 20);
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Items/Placeables/AstralBar_Animated").Value;
|
||||
spriteBatch.Draw(texture, position, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 12), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Items/Placeables/AstralBar_Animated").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 12), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Placeables.Ores
|
||||
Item.useTime = 10;
|
||||
Item.autoReuse = true;
|
||||
Item.consumable = true;
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.width = 22;
|
||||
Item.height = 22;
|
||||
Item.maxStack = 999;
|
||||
Item.value = Item.sellPrice(silver: 36);
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
|
||||
|
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 277 B |
@@ -104,18 +104,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
CreateRecipe().
|
||||
AddIngredient<Disseminator>().
|
||||
AddIngredient(ItemID.StarCloak, 3).
|
||||
AddIngredient<ArmoredShell>(2).
|
||||
AddIngredient<CosmiliteBar>(8).
|
||||
AddIngredient<AscendantSpiritEssence>(5).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
|
||||
CreateRecipe().
|
||||
AddIngredient<Disseminator>().
|
||||
AddIngredient(ItemID.StarCloak, 3).
|
||||
AddIngredient<ArmoredShell>(2).
|
||||
AddIngredient<NebulousCore>().
|
||||
AddIngredient<AscendantSpiritEssence>(5).
|
||||
AddIngredient<CosmiliteBar>(5).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -209,6 +209,12 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bloatfish").Type, NPC.scale);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bloatfish2").Type, NPC.scale);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bloatfish3").Type, NPC.scale);
|
||||
}
|
||||
}
|
||||
if (NPC.scale < 2f)
|
||||
{
|
||||
|
||||
@@ -120,6 +120,11 @@ namespace CalamityMod.NPCs.Crags
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("CalamityEye").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("CalamityEye2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerBody").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerBody2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -421,6 +421,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerHead").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerHead2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,11 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerTail").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("ArmoredDiggerTail2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,12 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 155, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bohldohr").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bohldohr2").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Bohldohr3").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,13 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("AngryDog").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("AngryDog2").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("AngryDog3").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("AngryDog4").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,11 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Catfish").Type, 1f);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Catfish2").Type, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 251 B |
@@ -1,6 +1,9 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,8 +12,13 @@ namespace CalamityMod.Tiles.Ores
|
||||
{
|
||||
public class AstralOre : ModTile
|
||||
{
|
||||
internal static Texture2D GlowTexture;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Ores/AstralOreGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
@@ -79,5 +87,28 @@ namespace CalamityMod.Tiles.Ores
|
||||
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AstralDirt>(), false, false, false, false, resetFrame);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
// If the cached textures don't exist for some reason, don't bother using them.
|
||||
if (GlowTexture is null)
|
||||
return;
|
||||
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j);
|
||||
int xPos = tile.TileFrameX;
|
||||
int frameOffset = (i + j) % 2 * AnimationFrameHeight;
|
||||
int yPos = tile.TileFrameY + frameOffset;
|
||||
Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset;
|
||||
|
||||
if (!tile.IsHalfBlock && tile.Slope == 0)
|
||||
{
|
||||
spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
else if (tile.IsHalfBlock)
|
||||
{
|
||||
spriteBatch.Draw(GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -26,6 +26,50 @@ namespace CalamityMod
|
||||
public static float CalcDamage<T>(this Player player, float baseDamage) where T : DamageClass => player.GetTotalDamage<T>().ApplyTo(baseDamage);
|
||||
public static int CalcIntDamage<T>(this Player player, float baseDamage) where T : DamageClass => (int)player.CalcDamage<T>(baseDamage);
|
||||
|
||||
// Naively determines the player's chosen (aka "best") class by whichever has the highest damage boost.
|
||||
public static DamageClass GetBestClass(this Player player)
|
||||
{
|
||||
// Check the five Calamity classes to see what the strongest one is, and use that for the typical damage stat.
|
||||
float bestDamage = 1f;
|
||||
DamageClass bestClass = DamageClass.Generic;
|
||||
|
||||
float melee = player.GetTotalDamage<MeleeDamageClass>().Additive;
|
||||
if (melee > bestDamage)
|
||||
{
|
||||
bestDamage = melee;
|
||||
bestClass = DamageClass.Melee;
|
||||
}
|
||||
float ranged = player.GetTotalDamage<RangedDamageClass>().Additive;
|
||||
if (ranged > bestDamage)
|
||||
{
|
||||
bestDamage = ranged;
|
||||
bestClass = DamageClass.Ranged;
|
||||
}
|
||||
float magic = player.GetTotalDamage<MagicDamageClass>().Additive;
|
||||
if (magic > bestDamage)
|
||||
{
|
||||
bestDamage = magic;
|
||||
bestClass = DamageClass.Magic;
|
||||
}
|
||||
|
||||
// Summoner intentionally has a reduction. As the only class with no crit, it tends to have higher raw damage than other classes.
|
||||
float summon = player.GetTotalDamage<SummonDamageClass>().Additive * BalancingConstants.SummonAllClassScalingFactor;
|
||||
if (summon > bestDamage)
|
||||
{
|
||||
bestDamage = summon;
|
||||
bestClass = DamageClass.Summon;
|
||||
}
|
||||
// We intentionally don't check whip class, because it inherits 100% from Summon
|
||||
|
||||
float rogue = player.GetTotalDamage<RogueDamageClass>().Additive;
|
||||
if (rogue > bestDamage)
|
||||
{
|
||||
bestClass = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
return bestClass;
|
||||
}
|
||||
|
||||
public static StatModifier GetBestClassDamage(this Player player)
|
||||
{
|
||||
StatModifier ret = StatModifier.Default;
|
||||
|
||||
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 4.6 KiB |