Merge branch '1.4.4' into dog-tweaks
No files matched your search
|
After Width: | Height: | Size: 2.9 KiB |
@@ -10,6 +10,11 @@ namespace CalamityMod.Backgrounds
|
||||
private int SSBG2;
|
||||
private int SSBG3;
|
||||
|
||||
private int BGBG0;
|
||||
private int BGBG1;
|
||||
private int BGBG2;
|
||||
private int BGBG3;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
@@ -19,14 +24,35 @@ namespace CalamityMod.Backgrounds
|
||||
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
BGBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
BGBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
|
||||
BGBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
BGBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
|
||||
}
|
||||
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
textureSlots[0] = SSBG0;
|
||||
textureSlots[1] = SSBG1;
|
||||
textureSlots[2] = SSBG2;
|
||||
textureSlots[3] = SSBG3;
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) ||
|
||||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) ||
|
||||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) ||
|
||||
Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
|
||||
{
|
||||
textureSlots[0] = SSBG0;
|
||||
textureSlots[1] = SSBG1;
|
||||
textureSlots[2] = SSBG2;
|
||||
textureSlots[3] = SSBG3;
|
||||
}
|
||||
if (!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) &&
|
||||
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) &&
|
||||
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) &&
|
||||
!Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
|
||||
{
|
||||
textureSlots[0] = BGBG0;
|
||||
textureSlots[1] = BGBG1;
|
||||
textureSlots[2] = BGBG2;
|
||||
textureSlots[3] = BGBG3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,25 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.BasaltGullyBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (pos.Y >= Main.maxTilesY - 450)
|
||||
{
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == 0)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.Red, 0.6f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToTarget(On_Main.orig_CheckMonoliths orig)
|
||||
|
||||
@@ -25,8 +25,9 @@ namespace CalamityMod.BiomeManagers
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBasaltTiles > 1000 && MoreThanShores && MoreThanReefs && MoreThanPolyp && MoreThanBurrows;
|
||||
return BiomeTileCounterSystem.SunkenSeaBasaltTiles > 2500 && (MoreThanShores || MoreThanReefs || MoreThanPolyp || MoreThanBurrows);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 && MoreThanReefs && MoreThanPolyp;
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 3000 && MoreThanReefs && MoreThanPolyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 1000 && MoreThanReefs && MoreThanBurrows;
|
||||
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 200 && MoreThanReefs && MoreThanBurrows;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,9 @@ namespace CalamityMod.BiomeManagers
|
||||
bool MoreThanShores = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaShoresTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
|
||||
|
||||
return ((BiomeTileCounterSystem.SunkenSeaReefsTiles > 500) || (BiomeTileCounterSystem.SunkenSeaBasaltTiles + BiomeTileCounterSystem.SunkenSeaReefsTiles > 500)) && MoreThanBurrows && MoreThanPolyp && MoreThanShores;
|
||||
return ((BiomeTileCounterSystem.SunkenSeaReefsTiles > 2000) && MoreThanBasalt && MoreThanBurrows && MoreThanPolyp && MoreThanShores);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,9 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
|
||||
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaShoresTiles > 1000 && MoreThanReefs && MoreThanBasalt;
|
||||
return (BiomeTileCounterSystem.SunkenSeaShoresTiles > 1200) && MoreThanReefs && MoreThanBasalt && MoreThanUnderground;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1553,6 +1553,7 @@ namespace CalamityMod.CalPlayer
|
||||
public float ViridVanguardRotation = 0;
|
||||
public float ViridVanguardActiveCooldown = 0;
|
||||
public float ViridVanguardRotationToAdd = 0;
|
||||
public bool InvertExaltationLineRotationDirections = false;
|
||||
public bool sageSpirit = false;
|
||||
public bool fleshBall = false;
|
||||
public bool eyeOfNight = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.Cooldowns;
|
||||
@@ -2565,7 +2565,8 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<HideOfAstrumDeusExplosion>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
|
||||
}
|
||||
// TODO -- Make Deific Amulet and Rampart of Deities' retaliation effects way cooler
|
||||
// In the meantime, gave them homing astral bombers instead of the lame falling stars
|
||||
// In the meantime, gave them homing astral stars instead of the lame falling stars.
|
||||
// This also serves to make the Honeycomb in Sweetheart Necklace make sense
|
||||
if (dAmulet)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<DeificAmulet>()));
|
||||
|
||||
@@ -246,15 +246,7 @@ namespace CalamityMod
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude1 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude2 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude3 { get; set; }
|
||||
public bool Interludes { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace CalamityMod
|
||||
CooldownAddition,
|
||||
CooldownRemoval,
|
||||
SyncCooldownDictionary,
|
||||
ExaltationDirection,
|
||||
|
||||
// Syncs for specific bosses or entities
|
||||
SyncDestroyerLaserColor,
|
||||
|
||||
@@ -314,6 +314,7 @@ namespace CalamityMod.DataStructures
|
||||
|
||||
if (IsGreenGemActive)
|
||||
{
|
||||
Owner.Calamity().ammoCost *= GemTechHeadgear.RangedAmmoReduction;
|
||||
Owner.GetCritChance<RangedDamageClass>() += (int)(GemTechHeadgear.RangedCritBoost * 100f);
|
||||
Owner.GetDamage<RangedDamageClass>() += GemTechHeadgear.RangedDamageBoost;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Removal of vanilla stupidity
|
||||
IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs;
|
||||
IL_NPC.VanillaHitEffect += PreventLavaSlimeLavaDrop;
|
||||
IL_NPC.StrikeNPC_HitInfo_bool_bool += LetDetonatingBubblesTakeDamage;
|
||||
IL_Player.ItemCheck_EmitUseVisuals += MakeMagmaStoneFireGauntletDustToggleable;
|
||||
IL_Projectile.EmitEnchantmentVisualsAt += MakeMagmaStoneFireGauntletProjectileDustToggleable;
|
||||
|
||||
@@ -33,6 +33,7 @@ using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Tiles;
|
||||
using CalamityMod.Walls;
|
||||
using CalamityMod.Walls.UnsafeWalls;
|
||||
using CalamityMod.Waterfalls;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -1865,7 +1866,7 @@ namespace CalamityMod.ILEditing
|
||||
if (Style == 2)
|
||||
{
|
||||
// Check if it's an Abyss wall
|
||||
if (t.WallType == ModContent.WallType<SulphurousShaleWall>() || t.WallType == ModContent.WallType<AbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<VoidstoneWallUnsafe>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<SulphurousSandstoneWall>())
|
||||
if (t.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || t.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
|
||||
{
|
||||
// If an Abyss wall is detected, try to find another teleportation location
|
||||
bool canSpawn = false;
|
||||
@@ -1894,7 +1895,7 @@ namespace CalamityMod.ILEditing
|
||||
// Potion of Return triggers Jared if used in the Abyss
|
||||
if (Style == 8)
|
||||
{
|
||||
if (t.WallType == ModContent.WallType<SulphurousShaleWall>() || t.WallType == ModContent.WallType<AbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<VoidstoneWallUnsafe>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<SulphurousSandstoneWall>())
|
||||
if (t.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || t.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
|
||||
self.AddBuff(BuffID.ChaosState, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +181,25 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Prevent Lava Slime Dropping Lava
|
||||
private static void PreventLavaSlimeLavaDrop(ILContext il)
|
||||
{
|
||||
// Disable Lava Slimes dropping lava if its respective config is enabled.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// Go to the check for Remix world.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld<Main>("remixWorld")))
|
||||
{
|
||||
LogFailure("Prevent Lava Slime Dropping Lava", "Could not find the check for Remix World.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Add an additional check for the config.
|
||||
cursor.Remove();
|
||||
cursor.EmitDelegate<Func<bool>>(() => CalamityServerConfig.Instance.RemoveLavaDropsFromLavaSlimes || Main.remixWorld);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Disable Detonating Bubble StrikeNPC Hardcoded Override
|
||||
private static void LetDetonatingBubblesTakeDamage(ILContext il)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -23,20 +28,61 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
#region Toggleable Panic Necklace
|
||||
|
||||
bool panicNecklaceEnabled = true;
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", panicNecklaceEnabled ? this.GetLocalizedValue("ToggleEffect") : "");
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
panicNecklaceEnabled = !panicNecklaceEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("panic", panicNecklaceEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
panicNecklaceEnabled = tag.GetBool("panic");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(panicNecklaceEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
panicNecklaceEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, panicNecklaceEnabled);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.longInvince = true;
|
||||
modPlayer.dAmulet = true;
|
||||
player.panic = panicNecklaceEnabled;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.StarVeil).
|
||||
AddIngredient(ItemID.SweetheartNecklace).
|
||||
AddIngredient<AstralBar>(10).
|
||||
AddIngredient<SeaPrism>(15).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
AddTile(TileID.TinkerersWorkbench).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -19,14 +24,53 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.accessory = true;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
#region Toggleable Mana Flower
|
||||
|
||||
bool manaFlowerEnabled = true;
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!manaFlowerEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip3");
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
manaFlowerEnabled = !manaFlowerEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("manaFlower", manaFlowerEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
manaFlowerEnabled = tag.GetBool("manaFlower");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(manaFlowerEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
manaFlowerEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, manaFlowerEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.eTalisman = true;
|
||||
|
||||
player.manaMagnet = true;
|
||||
if (!hideVisual)
|
||||
if (manaFlowerEnabled)
|
||||
player.manaFlower = true;
|
||||
|
||||
player.statManaMax2 += 150;
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -13,6 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class RampartofDeities : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 64;
|
||||
@@ -23,6 +30,45 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
#region Toggleable Panic Necklace
|
||||
|
||||
bool panicNecklaceEnabled = true;
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", panicNecklaceEnabled ? this.GetLocalizedValue("ToggleEffect") : "");
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
panicNecklaceEnabled = !panicNecklaceEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("panic", panicNecklaceEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
panicNecklaceEnabled = tag.GetBool("panic");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(panicNecklaceEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
panicNecklaceEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, panicNecklaceEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -31,6 +77,9 @@ namespace CalamityMod.Items.Accessories
|
||||
player.longInvince = true;
|
||||
modPlayer.dAmulet = true;
|
||||
|
||||
//Panic Necklace effect if enabled
|
||||
player.panic = panicNecklaceEnabled;
|
||||
|
||||
// Large hit iframe effect taken from Seraph Tracers
|
||||
modPlayer.rampartOfDeities = true;
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -25,6 +29,47 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
Item.accessory = true;
|
||||
}
|
||||
#region Toggleable Tiger Gear
|
||||
|
||||
bool toggleEnabled = true;
|
||||
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", toggleEnabled ? this.GetLocalizedValue("ToggleEffect") : "");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
@@ -35,7 +80,8 @@ namespace CalamityMod.Items.Accessories
|
||||
player.blackBelt = true;
|
||||
player.dashType = 0;
|
||||
player.Calamity().DashID = StatisNinjaBeltDash.ID;
|
||||
player.spikedBoots = 2;
|
||||
if (toggleEnabled)
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.Calamity().statisNinjaBelt = true;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -11,6 +13,7 @@ using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -35,7 +38,47 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
#region Toggleable Tiger Gear
|
||||
|
||||
bool toggleEnabled = true;
|
||||
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[TOGGLE]", toggleEnabled ? this.GetLocalizedValue("ToggleEffect") : "");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -49,7 +92,8 @@ namespace CalamityMod.Items.Accessories
|
||||
player.blackBelt = true;
|
||||
modPlayer.DashID = StatisVoidSashDash.ID;
|
||||
player.dashType = 0;
|
||||
player.spikedBoots = 2;
|
||||
if (toggleEnabled)
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.Calamity().statisVoidSash = true;
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
|
||||
{
|
||||
if (Item.wingSlot == -1) return;
|
||||
ascentWhenFalling = BonusAscentWhileFalling;
|
||||
ascentWhenRising = BonusAscentWhileRising;
|
||||
maxCanAscendMultiplier = RisingSpeedThreshold;
|
||||
@@ -67,7 +68,15 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
WingStats stats = ArmorIDs.Wing.Sets.Stats[Item.wingSlot];
|
||||
if (Item.wingSlot == -1) return;
|
||||
WingStats stats = new();
|
||||
if (Item.type == ModContent.ItemType<TracersCelestial>())
|
||||
stats = ArmorIDs.Wing.Sets.Stats[TracersCelestial.wingSlot];
|
||||
else if (Item.type == ModContent.ItemType<TracersElysian>())
|
||||
stats = ArmorIDs.Wing.Sets.Stats[TracersElysian.wingSlot];
|
||||
else if (Item.type == ModContent.ItemType<TracersSeraph>())
|
||||
stats = ArmorIDs.Wing.Sets.Stats[TracersSeraph.wingSlot];
|
||||
else stats = ArmorIDs.Wing.Sets.Stats[Item.wingSlot];
|
||||
int time = stats.FlyTime;
|
||||
float run = stats.AccRunSpeedOverride;
|
||||
float rAcc = stats.AccRunAccelerationMult * 0.08f;
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
@@ -17,7 +22,12 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
public override float MaxAscentSpeed => 2.5f;
|
||||
public override float BaseAscent => 0.125f;
|
||||
|
||||
public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(75, 6.5f, 1f);
|
||||
public static int wingSlot = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(75, 6.5f, 1f);
|
||||
wingSlot = Item.wingSlot;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -27,10 +37,57 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice;
|
||||
Item.rare = ItemRarityID.LightPurple;
|
||||
}
|
||||
#region Toggleable Wings
|
||||
bool toggleEnabled
|
||||
{
|
||||
get { return Item.wingSlot != -1; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Item.wingSlot = wingSlot;
|
||||
else
|
||||
Item.wingSlot = -1;
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!toggleEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip0");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
if (toggleEnabled && player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
{
|
||||
player.rocketDelay2--;
|
||||
if (player.rocketDelay2 <= 0)
|
||||
@@ -95,7 +152,6 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
// Mirrors the +5% luck from Lucky Horseshoe (vanilla behavior).
|
||||
player.Calamity().calamityBonusLuck += 0.05f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 631 B |
@@ -1,4 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -7,6 +10,7 @@ using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
@@ -20,20 +24,70 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
public override float MaxAscentSpeed => 2.5f;
|
||||
public override float BaseAscent => 0.125f;
|
||||
|
||||
public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(160, 9f, 2.6f);
|
||||
public static int wingSlot = 0;
|
||||
|
||||
public override void SetStaticDefaults() {
|
||||
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(160, 9f, 2.6f);
|
||||
wingSlot = Item.wingSlot;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
base.SetDefaults();
|
||||
Item.width = 36;
|
||||
Item.height = 32;
|
||||
Item.height = 40;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
|
||||
#region Toggleable Wings
|
||||
bool toggleEnabled
|
||||
{
|
||||
get { return Item.wingSlot != -1; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Item.wingSlot = wingSlot;
|
||||
else
|
||||
Item.wingSlot = -1;
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!toggleEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip0");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual && toggleEnabled)
|
||||
{
|
||||
int dustXOffset = 4;
|
||||
if (player.direction == 1)
|
||||
@@ -57,7 +111,13 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
player.fireWalk = true;
|
||||
player.lavaImmune = true;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
modPlayer.tracersDust = !hideVisual;
|
||||
player.noFallDmg = true;
|
||||
if (!toggleEnabled) //Both these effects just boost flight time, but we don't want Tracers to boost it's own flight time when functioning as wings. All other Angel Tread effects are covered above.
|
||||
{
|
||||
player.rocketBoots = player.vanityRocketBoots = 4;
|
||||
modPlayer.angelTreads = true;
|
||||
}
|
||||
modPlayer.tracersDust = !hideVisual && toggleEnabled;
|
||||
modPlayer.tracersCelestial = true;
|
||||
}
|
||||
|
||||
@@ -73,18 +133,18 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
texture: TextureAssets.Item[Type].Value,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 0.9f,
|
||||
drawOffset: new(1f, 0f)
|
||||
);
|
||||
var tex = TextureAssets.Item[Type].Value;
|
||||
frame = tex.Frame(2, 1, toggleEnabled ? 0 : 1);
|
||||
spriteBatch.Draw(tex, position, frame, Color.White, 0, frame.Size() * 0.5f, Main.inventoryScale * 0.8f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
|
||||
var tex = TextureAssets.Item[Type].Value;
|
||||
var frame = tex.Frame(2, 1, toggleEnabled ? 0 : 1);
|
||||
spriteBatch.Draw(tex, Item.Center - Main.screenPosition, frame, lightColor, rotation, frame.Size() * 0.5f, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 807 B |
@@ -1,4 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
@@ -10,6 +13,7 @@ using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
@@ -23,7 +27,12 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
public override float MaxAscentSpeed => 2.7f;
|
||||
public override float BaseAscent => 0.135f;
|
||||
|
||||
public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(220, 10f, 2.7f);
|
||||
public static int wingSlot = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(220, 10f, 2.7f);
|
||||
wingSlot = Item.wingSlot;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -33,10 +42,55 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
#region Toggleable Wings
|
||||
bool toggleEnabled
|
||||
{
|
||||
get { return Item.wingSlot != -1; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Item.wingSlot = wingSlot;
|
||||
else
|
||||
Item.wingSlot = -1;
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!toggleEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip0");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual && toggleEnabled)
|
||||
{
|
||||
int dustXOffset = 4;
|
||||
if (player.direction == 1)
|
||||
@@ -60,7 +114,14 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
player.fireWalk = true;
|
||||
player.lavaImmune = true;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
modPlayer.tracersDust = !hideVisual;
|
||||
player.noFallDmg = true;
|
||||
player.socialShadowRocketBoots = true;
|
||||
if (!toggleEnabled) //Both these effects just boost flight time, but we don't want Tracers to boost it's own flight time when functioning as wings. All other Angel Tread effects are covered above.
|
||||
{
|
||||
player.rocketBoots = player.vanityRocketBoots = 1;
|
||||
modPlayer.angelTreads = true;
|
||||
}
|
||||
modPlayer.tracersDust = !hideVisual && toggleEnabled;
|
||||
modPlayer.tracersElysian = true;
|
||||
}
|
||||
|
||||
@@ -74,22 +135,5 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
texture: TextureAssets.Item[Type].Value,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 0.9f,
|
||||
drawOffset: new(1f, 0f)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1008 B After Width: | Height: | Size: 985 B |
@@ -1,5 +1,9 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -10,6 +14,7 @@ using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
@@ -23,8 +28,13 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
public override float MaxAscentSpeed => 2.9f;
|
||||
public override float BaseAscent => 0.145f;
|
||||
|
||||
public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(250, 11f, 2.8f);
|
||||
public static int wingSlot = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(250, 11f, 2.8f);
|
||||
wingSlot = Item.wingSlot;
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
base.SetDefaults();
|
||||
@@ -33,10 +43,56 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
#region Toggleable Wings
|
||||
bool toggleEnabled
|
||||
{
|
||||
get { return Item.wingSlot != -1; }
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
Item.wingSlot = wingSlot;
|
||||
else
|
||||
Item.wingSlot = -1;
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
if (!toggleEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip0");
|
||||
base.ModifyTooltips(tooltips);
|
||||
}
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual && toggleEnabled)
|
||||
{
|
||||
int dustXOffset = 4;
|
||||
if (player.direction == 1)
|
||||
@@ -60,7 +116,13 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
player.fireWalk = true;
|
||||
player.lavaImmune = true;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
modPlayer.tracersDust = !hideVisual;
|
||||
player.noFallDmg = true;
|
||||
if (!toggleEnabled) //Both these effects just boost flight time, but we don't want Tracers to boost it's own flight time when functioning as wings. All other Angel Tread effects are covered above.
|
||||
{
|
||||
player.rocketBoots = player.vanityRocketBoots = 2;
|
||||
modPlayer.angelTreads = true;
|
||||
}
|
||||
modPlayer.tracersDust = !hideVisual && toggleEnabled;
|
||||
modPlayer.tracersSeraph = true; // Grants immunity to Auric Rejection and other walk-on-block effects
|
||||
}
|
||||
|
||||
@@ -73,22 +135,5 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
texture: TextureAssets.Item[Type].Value,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 0.8f,
|
||||
drawOffset: new(1f, 0f)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 1.2 KiB |
@@ -12,8 +12,9 @@ namespace CalamityMod.Items.Armor.Astral
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
|
||||
public static int MaxManaBoost = 80;
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public static float DamageBoost = 0.07f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, DamageBoost.ToPercent());
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, DamageBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -26,6 +27,8 @@ namespace CalamityMod.Items.Armor.Astral
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
@@ -6,10 +7,13 @@ using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
@@ -31,13 +35,49 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
Item.defense = 42;
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
#region Toggleable Magic Carpet
|
||||
|
||||
bool toggleEnabled = true;
|
||||
|
||||
public override bool CanRightClick() => Main.keyState.PressingShift();
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
toggleEnabled = !toggleEnabled;
|
||||
Item.NetStateChanged();
|
||||
}
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
public override void SaveData(TagCompound tag)
|
||||
{
|
||||
tag.Add("toggleEffect", toggleEnabled);
|
||||
}
|
||||
|
||||
public override void LoadData(TagCompound tag)
|
||||
{
|
||||
toggleEnabled = tag.GetBool("toggleEffect");
|
||||
}
|
||||
|
||||
public override void NetSend(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(toggleEnabled);
|
||||
}
|
||||
|
||||
public override void NetReceive(BinaryReader reader)
|
||||
{
|
||||
toggleEnabled = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
player.carpet = true;
|
||||
player.carpet = toggleEnabled;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
@@ -51,6 +91,9 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips);
|
||||
}
|
||||
|
||||
if (!toggleEnabled)
|
||||
tooltips.RemoveAll(x => x.Name == "Tooltip2");
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
|
||||
public static float RangedDamageBoost = 0.22f;
|
||||
public static int RangedCritBoost = 20;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.7f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -57,6 +58,8 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/BloodflareRangerActivation");
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public static int RangedCritBoost = 10; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent());
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int SoulCooldown = CalamityUtils.SecondsToFrames(30);
|
||||
@@ -52,6 +53,8 @@ namespace CalamityMod.Items.Armor.Bloodflare
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
|
||||
public static float RangedDamageBoost = 0.13f;
|
||||
public static int RangedCritBoost = 7;
|
||||
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.8f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int ShardDamage => CalamityUtils.ScaleWithDifficulty(30);
|
||||
@@ -47,9 +47,10 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
player.ammoCost80 = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -16,10 +16,11 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
public string FrontArmTexture => "CalamityMod/Items/Armor/Demonshade/DemonshadeBreastplate_Arms";
|
||||
|
||||
public static int MaxManaBoost = 200;
|
||||
public static float AmmoReduction = 0.7f;
|
||||
public static float DamageBoost = 0.15f;
|
||||
public static int CritBoost = 15; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public static float MeleeSpeedBoost = 0.25f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, DamageBoost.ToPercent(), MeleeSpeedBoost.ToPercent());
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, DamageBoost.ToPercent(), MeleeSpeedBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -35,6 +36,7 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.shadeRegen = true;
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.statManaMax2 += MaxManaBoost;
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
public const float MeleeSpeedBoost = 0.26f;
|
||||
|
||||
public const int MaxFlechettes = 8;
|
||||
public static float RangedAmmoReduction = 0.7f;
|
||||
public const float RangedDamageBoost = 0.5f;
|
||||
public const float RangedCritBoost = 0.16f;
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 12;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.7f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int ShrapnelRoundCooldown = CalamityUtils.SecondsToFrames(2.5f);
|
||||
@@ -54,6 +55,8 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public static float RangedDamageBoost = 0.12f;
|
||||
public static int RangedCritBoost = 10;
|
||||
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int FlareCooldown = CalamityUtils.SecondsToFrames(0.33f);
|
||||
@@ -49,9 +49,10 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
player.ammoCost75 = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace CalamityMod.Items.Armor.LunicCorps
|
||||
|
||||
public static float RangedDamageBoost = 0.15f;
|
||||
public static int RangedCritBoost = 15; // NOTE: Tooltip shares this number with damage % as they're equal
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent());
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,6 +29,8 @@ namespace CalamityMod.Items.Armor.LunicCorps
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
@@ -14,9 +14,10 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public static float DamageBoost = 0.18f;
|
||||
public static int CritBoost = 12;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost);
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -43,6 +44,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
var modPlayer = player.Calamity();
|
||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||
player.GetCritChance<GenericDamageClass>() += CritBoost;
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
modPlayer.omegaBlueChestplate = true;
|
||||
modPlayer.noLifeRegen = true;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 8;
|
||||
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static float SetBonusFlightTimeBoost = 0.05f;
|
||||
@@ -63,9 +63,10 @@ namespace CalamityMod.Items.Armor.PlagueReaper
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
player.ammoCost75 = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -16,7 +16,8 @@ namespace CalamityMod.Items.Armor.Tarragon
|
||||
|
||||
public static float RangedDamageBoost = 0.1f;
|
||||
public static int RangedCritBoost = 7;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
public static float AmmoReduction = 0.75f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
public static int OnHitEffectCooldown = CalamityUtils.SecondsToFrames(1);
|
||||
@@ -52,6 +53,8 @@ namespace CalamityMod.Items.Armor.Tarragon
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.ammoCost *= AmmoReduction;
|
||||
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
|
||||
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
|
||||
}
|
||||
|
||||
@@ -240,6 +240,10 @@ namespace CalamityMod.Items
|
||||
if (item.accessory)
|
||||
CannotBeEnchanted = true;
|
||||
|
||||
// Music boxes are pre-boss and sold from the Merchant, so they should now use the blue rarity.
|
||||
if (item.type == ItemID.MusicBox || item.createTile == TileID.MusicBoxes || ItemID.Sets.ShimmerTransformToItem[item.type] == ItemID.MusicBox)
|
||||
item.rare = ItemRarityID.Blue;
|
||||
|
||||
// Modified Pearlwood items are now Light Red.
|
||||
if (item.type == ItemID.PearlwoodBow || item.type == ItemID.PearlwoodHammer || item.type == ItemID.PearlwoodSword)
|
||||
item.rare = ItemRarityID.LightRed;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -19,16 +20,15 @@ namespace CalamityMod.Items.Materials
|
||||
Item.width = 30;
|
||||
Item.height = 24;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.value = Item.sellPrice(silver: 36);
|
||||
Item.value = Item.sellPrice(silver: 6);
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PearlShard>(2).
|
||||
AddIngredient(ItemID.Coral, 2).
|
||||
AddIngredient(ItemID.Starfish, 2).
|
||||
AddIngredient(ItemID.Seashell, 2).
|
||||
AddIngredient<WillOWisp>(1).
|
||||
//AddIngredient<PolypItem>(2).
|
||||
AddIngredient<PearlShard>(3).
|
||||
AddTile(TileID.Furnaces).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
public class WillOWisp : ModItem, ILocalizedModType
|
||||
{
|
||||
public int textureVariant = 0;
|
||||
|
||||
public static Asset<Texture2D> altTexture = null;
|
||||
public new string LocalizationCategory => "Items.Materials";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 25;
|
||||
ItemID.Sets.SortingPriorityMaterials[Type] = 60; // Meteorite
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 26;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.value = Item.sellPrice(silver: 1);
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
{
|
||||
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Material;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
var tex = textureVariant == 0 ? TextureAssets.Item[Type] : CalamityUtils.GetTextureEfficient(ref altTexture, "CalamityMod/Items/Materials/WillOWisp2");
|
||||
float rotationAmount = 0.25f;
|
||||
float rotationSpeedMult = 0.033f;
|
||||
spriteBatch.Draw(tex.Value, Item.Center - Main.screenPosition, null, lightColor, rotation + (rotationAmount * (float)Math.Sin(Item.whoAmI + Main.timeForVisualEffects * rotationSpeedMult)), tex.Size() / 2, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
if (textureVariant == 0)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
var tex = CalamityUtils.GetTextureEfficient(ref altTexture, "CalamityMod/Items/Materials/WillOWisp2");
|
||||
spriteBatch.Draw(tex.Value, position, null, drawColor, 0, tex.Size() / 2, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public override void OnSpawn(IEntitySource source)
|
||||
{
|
||||
textureVariant = Main.rand.NextBool().ToInt();
|
||||
}
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
|
||||
if (Collision.SolidCollision(Item.position, Item.width, Item.height + CalamityUtils.TilesToPixels(3), true))
|
||||
gravity *= 0.2f;
|
||||
maxFallSpeed *= 0.1f;
|
||||
if (Collision.SolidCollision(Item.position, Item.width, Item.height + CalamityUtils.TilesToPixels(2), true))
|
||||
gravity *= -1;
|
||||
Item.velocity.X /= 0.95f;
|
||||
Item.velocity.X *= 0.975f;
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
var d = Dust.NewDustDirect(Item.position, Item.width, Item.height, DustID.Obsidian, newColor: Color.Red, Scale: 0.9f);
|
||||
d.velocity *= 1f;
|
||||
d.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 475 B |
|
After Width: | Height: | Size: 420 B |
@@ -12,8 +12,7 @@ namespace CalamityMod.Items.Placeables.Abyss
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<SulphurousShale>();
|
||||
|
||||
// +5 flat damage, equal to other sand variants
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<SulphurousSandBallGun>(), 5);
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<SulphurousSandBallGun>(), 0);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace CalamityMod.Items.Placeables.Astral
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemTrader.ChlorophyteExtractinator.AddOption_OneWay(Type, 1, ItemID.SandBlock, 1);
|
||||
|
||||
// +5 flat damage, equal to other sand variants
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<AstralSandBallGun>(), 5);
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<AstralSandBallGun>(), 0);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
@@ -11,8 +12,16 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Shellstone>();
|
||||
|
||||
//+5 flat damage
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<DuneSandBallGun>(), 5);
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.Dunesand>());
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.Dunesand>());
|
||||
Item.ammo = AmmoID.Sand;
|
||||
Item.notAmmo = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Navystone>();
|
||||
|
||||
// +5 flat damage, equal to other sand variants
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<EutrophicSandBallGun>(), 5);
|
||||
// -5 flat damage
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<EutrophicSandBallGun>(),-5);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -24,14 +24,5 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
Item.ammo = AmmoID.Sand;
|
||||
Item.notAmmo = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<EutrophicSandWallSafe>(4).
|
||||
AddTile(TileID.WorkBenches).
|
||||
DisableDecraft().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<NavystoneWallSafe>(4).
|
||||
AddIngredient<NavystoneWall>(4).
|
||||
AddTile(TileID.WorkBenches).
|
||||
DisableDecraft().
|
||||
Register();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
@@ -9,8 +10,15 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<PolypSandBallGun>(), 0);
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.PolypSand>());
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.PolypSand>());
|
||||
Item.ammo = AmmoID.Sand;
|
||||
Item.notAmmo = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
{
|
||||
public class TableCoralLeft : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.Ambient.TableCoralLeft>());
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 663 B |
@@ -1,4 +1,5 @@
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
@@ -9,8 +10,14 @@ namespace CalamityMod.Items.Placeables.SunkenSea
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<VolcanicSandBallGun>(), 0);
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.VolcanicSand>());
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.SunkenSea.VolcanicSand>());
|
||||
Item.ammo = AmmoID.Sand;
|
||||
Item.notAmmo = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AbyssGravelWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AbyssGravelWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralDirtWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralDirtWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -12,6 +12,6 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralGrassWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralGrassWall>());
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralIceWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralIceWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSandstoneWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSandstoneWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSnowWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSnowWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralStoneWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralStoneWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 291 B |
@@ -1,27 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class EutrophicSandWallSafe : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<EutrophicSandWall>();
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.EutrophicSandWallSafe>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<EutrophicSand>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 291 B |
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.HardenedAstralSandWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.HardenedAstralSandWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
using CalamityMod.Walls.UnsafeWalls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
[LegacyName("NavystoneWallSafe")]
|
||||
public class NavystoneWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
ItemID.Sets.DrawUnsafeIndicator[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<NavystoneWallSafe>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<UnsafeNavystoneWall>();
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.NavystoneWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<Navystone>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class NavystoneWallSafe : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<NavystoneWall>();
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.NavystoneWallSafe>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<Navystone>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandstoneWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandstoneWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousShaleWallSafe>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousShaleWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
using WallTiles = CalamityMod.Walls.UnsafeWalls;
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class EutrophicSandWall : ModItem, ILocalizedModType
|
||||
public class UnsafeNavystoneWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
ItemID.Sets.DrawUnsafeIndicator[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<EutrophicSandWallSafe>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Items.Placeables.Walls.NavystoneWall>();
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.EutrophicSandWall>());
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.UnsafeNavystoneWall>());
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
@@ -64,6 +66,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
AddIngredient<DubiousPlating>(7).
|
||||
AddIngredient<AerialiteBar>(4).
|
||||
AddIngredient<SeaPrism>(7).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(1, out Func<bool> condition), condition).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -47,6 +47,13 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 67)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -71,5 +71,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
type = Item.shoot;
|
||||
position += player.itemRotation.ToRotationVector2() * player.direction * 48f;
|
||||
int bulletAmt = 40;
|
||||
for (int i = 0; i < bulletAmt; i++)
|
||||
{
|
||||
|
||||
@@ -67,12 +67,14 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) > 80 && SineCounter % 4 == 0)
|
||||
if (Main.rand.Next(0, 100) < 20 && SineCounter % 4 == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Packets;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -59,7 +61,20 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
if (!Main.keyState.PressingShift())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections;
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity());
|
||||
}
|
||||
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -103,6 +118,24 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
var tex = TextureAssets.Item[Type].Value;
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
tex,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 0.75f,
|
||||
spriteEffects: Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections ? SpriteEffects.FlipHorizontally : SpriteEffects.None,
|
||||
rotation: Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections ? MathHelper.PiOver2 : 0
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Packets;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Weapons.Summon
|
||||
@@ -46,8 +49,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public static float SwordDmgMult => 1f;
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
private static Texture2D BladeOutline = null;
|
||||
public static Texture2D GetBladeOutlineTex()
|
||||
{
|
||||
@@ -92,6 +93,39 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
Item.shoot = ModContent.ProjectileType<ViridVanguardBlade>();
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
if (!Main.keyState.PressingShift())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections;
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity());
|
||||
}
|
||||
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
var tex = TextureAssets.Item[Type].Value;
|
||||
CalamityUtils.DrawInventoryCustomScale(
|
||||
spriteBatch,
|
||||
tex,
|
||||
position,
|
||||
frame,
|
||||
drawColor,
|
||||
itemColor,
|
||||
origin,
|
||||
scale,
|
||||
wantedScale: 0.9f,
|
||||
spriteEffects: Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections ? SpriteEffects.FlipHorizontally : SpriteEffects.None
|
||||
);
|
||||
return false;
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
float totalSlots = 0f;
|
||||
@@ -143,4 +177,5 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@ DoubleTapDown: Double tap {0}
|
||||
// Miscellaneous stats/info
|
||||
AggroBoost: Enemies are more likely to target you
|
||||
AggroReduction: Enemies are less likely to target you
|
||||
AmmoUseReduction: "{0}% chance to save ammo"
|
||||
KnockbackImmunity: Grants immunity to knockback
|
||||
AbyssLightLevel1: Provides a small amount of light in the abyss
|
||||
AbyssLightLevel2: Provides a moderate amount of light in the abyss
|
||||
|
||||
@@ -171,19 +171,15 @@ CalamityClientConfig: {
|
||||
'''
|
||||
}
|
||||
|
||||
Interlude1: {
|
||||
Label: "[i:CalamityModMusic/Interlude1MusicBox] Interlude 1"
|
||||
Tooltip: Plays Calamity Mod OST - "Silence before the storms", after Calamitas Clone has been defeated.
|
||||
}
|
||||
|
||||
Interlude2: {
|
||||
Label: "[i:CalamityModMusic/Interlude2MusicBox] Interlude 2"
|
||||
Tooltip: Plays Calamity Mod OST - "Storms before the catastrophes", after the Moon Lord has been defeated.
|
||||
}
|
||||
|
||||
Interlude3: {
|
||||
Label: "[i:CalamityModMusic/Interlude3MusicBox] Interlude 3"
|
||||
Tooltip: Plays Calamity Mod OST - "Catastrophes before the calamity", after Yharon has been defeated.
|
||||
Interludes: {
|
||||
Label: "[i:CalamityModMusic/Interlude1MusicBox] Interludes"
|
||||
Tooltip:
|
||||
'''
|
||||
Enables the playing of three interlude tracks in-game:
|
||||
Plays Calamity Mod OST - "Silence before the storms", after Calamitas Clone has been defeated.
|
||||
Plays Calamity Mod OST - "Storms before the catastrophes", after the Moon Lord has been defeated.
|
||||
Plays Calamity Mod OST - "Catastrophes before the calamity", after Yharon has been defeated.
|
||||
'''
|
||||
}
|
||||
|
||||
MeterPosLock: {
|
||||
@@ -528,7 +524,7 @@ CalamityServerConfig: {
|
||||
|
||||
RemoveLavaDropsFromLavaSlimes: {
|
||||
Label: "[i:LavaWaders] Remove Lava Drops From Lava Slimes"
|
||||
Tooltip: When enabled, Lava Slimes will be replaced with a new Lava Slime that no longer drops lava.
|
||||
Tooltip: When enabled, Lava Slimes will be prevented from dropping lava in Expert Mode.
|
||||
}
|
||||
|
||||
RemoveReforgeRNG: {
|
||||
|
||||
@@ -53,6 +53,7 @@ MOAB: {
|
||||
{$CommonItemTooltip.FlightAndSlowfall}
|
||||
32% increased jump speed and allows auto-jump
|
||||
Grants the player cloud, blizzard, and sandstorm mid-air jumps
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:Jetpack] [c/aaaaaa:jetpack]
|
||||
'The Mother Of All Balloons'
|
||||
'''
|
||||
}
|
||||
@@ -103,9 +104,10 @@ TracersCelestial: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.FlightAndSlowfall}
|
||||
24% increased running acceleration and greater mobility on ice
|
||||
Provides the ability to walk on water, honey, and lava
|
||||
Grants immunity to fire and lava
|
||||
24% increased running acceleration
|
||||
Provides the effects of [i:CalamityMod/AngelTreads] Angel Treads
|
||||
Provides immunity to lava
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:AngelWings] [c/aaaaaa:wings]
|
||||
'Ludicrous speed!'
|
||||
'''
|
||||
}
|
||||
@@ -115,9 +117,10 @@ TracersElysian: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.FlightAndSlowfall}
|
||||
36% increased running acceleration and greater mobility on ice
|
||||
Provides the ability to walk on water, honey, and lava
|
||||
Grants immunity to fire and lava
|
||||
36% increased running acceleration
|
||||
Provides the effects of [i:CalamityMod/AngelTreads] Angel Treads
|
||||
Provides immunity to lava
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:AngelWings] [c/aaaaaa:wings]
|
||||
'Ludicrous speed!'
|
||||
'''
|
||||
}
|
||||
@@ -127,9 +130,10 @@ TracersSeraph: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.FlightAndSlowfall}
|
||||
50% increased running acceleration and greater mobility on ice
|
||||
Provides the ability to walk on water, honey, and lava
|
||||
Grants immunity to fire, lava, and harmful block effects
|
||||
50% increased running acceleration
|
||||
Provides the effects of [i:CalamityMod/AngelTreads] Angel Treads
|
||||
Provides immunity to lava and damaging tiles, including [i:CalamityMod/AuricOre] Auric Ore
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:AngelWings] [c/aaaaaa:wings]
|
||||
'Taking speed EVEN FURTHER BEYOND!'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -573,10 +573,13 @@ DeificAmulet: {
|
||||
DisplayName: Deific Amulet
|
||||
Tooltip:
|
||||
'''
|
||||
Causes stars to fall and increases length of invincibility after taking damage
|
||||
Grants bonus invincibility frames based on your missing health
|
||||
Releases a burst of homing stars [TOGGLE]after taking damage
|
||||
Increases the length of invincibility from various sources
|
||||
Grants bonus invincibility frames when hurt, based on your missing health
|
||||
This effect scales from 10 frames at full HP to 40 frames at 25% or less HP
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle] [i:PanicNecklace] [c/aaaaaa:Panic Necklace's effect]
|
||||
'''
|
||||
ToggleEffect: "and increases movement speed "
|
||||
}
|
||||
|
||||
DepthCharm: {
|
||||
@@ -751,7 +754,8 @@ EtherealTalisman: {
|
||||
15% increased magic damage, 5% increased magic critical strike chance
|
||||
+150 max mana and 10% decreased mana usage
|
||||
Increases pickup range for mana stars
|
||||
You automatically use mana potions when needed if visibility is on
|
||||
You automatically use mana potions when needed
|
||||
[c/aaaaaa:Shift-<right> in your inventory to toggle] [i:ManaFlower] [c/aaaaaa:Mana Flower's effect]
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1433,14 +1437,17 @@ RampartofDeities: {
|
||||
DisplayName: Rampart of Deities
|
||||
Tooltip:
|
||||
'''
|
||||
Causes stars to fall and increases length of invincibility after taking damage
|
||||
Grants bonus invincibility frames based on your missing health
|
||||
Releases a burst of homing stars [TOGGLE]after taking damage
|
||||
Increases the length of invincibility from various sources
|
||||
Grants bonus invincibility frames when struck, based on your missing health
|
||||
This effect scales from 10 frames at full HP to 40 frames at 25% or less HP
|
||||
Being struck for over 200 damage grants 30 additional invincibility frames
|
||||
Grants immunity to knockback
|
||||
Puts a shell around the owner when below 50% life that reduces damage by 25%
|
||||
Absorbs 25% of damage done to players on your team when above 25% life
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle] [i:PanicNecklace] [c/aaaaaa:Panic Necklace's effect]
|
||||
'''
|
||||
ToggleEffect: "and increases movement speed "
|
||||
}
|
||||
|
||||
RareElementalinaBottle: {
|
||||
@@ -1732,8 +1739,10 @@ StatisNinjaBelt: {
|
||||
Provides a high-speed dash
|
||||
10% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.6x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
Grants the ability to swim[TOGGLE] and dodge attacks
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:ClimbingClaws] [c/aaaaaa:Climbing Claws]
|
||||
'''
|
||||
ToggleEffect: ", climb walls,"
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
|
||||
@@ -1744,9 +1753,11 @@ StatisVoidSash: {
|
||||
Provides a high-speed dash
|
||||
20% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.85x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
Grants the ability to swim[TOGGLE] and dodge attacks
|
||||
Visual effects are reduced if visibility is disabled
|
||||
[c/aaaaaa:Shift-<right> this item in your inventory to toggle the] [i:ClimbingClaws] [c/aaaaaa:Climbing Claws]
|
||||
'''
|
||||
ToggleEffect: ", climb walls,"
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ AstralBreastplate: {
|
||||
'''
|
||||
{$CommonItemTooltip.IncreasesMaxManaBy}
|
||||
{$CommonItemTooltip.PercentIncreasedDamage@1}
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -95,7 +96,7 @@ DaedalusHeadRanged: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
20% chance to save ammo
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus: Getting hit causes you to emit a blast of crystal shards
|
||||
}
|
||||
@@ -238,7 +239,7 @@ HydrothermicHeadRanged: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
25% chance to save ammo
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus:
|
||||
'''
|
||||
@@ -317,7 +318,11 @@ LunicCorpsHelmet: {
|
||||
|
||||
LunicCorpsVest: {
|
||||
DisplayName: Lunic Corps Vest
|
||||
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}"
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}
|
||||
{$Common.AmmoUseReduction@1}
|
||||
'''
|
||||
}
|
||||
|
||||
MolluskShelleggings: {
|
||||
@@ -393,7 +398,7 @@ PlagueReaperMask: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
25% chance to save ammo
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus:
|
||||
'''
|
||||
|
||||
@@ -9,13 +9,18 @@ AuricTeslaCuisses: {
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}
|
||||
{$CommonItemTooltip.PercentIncreasedMovementSpeed@2}
|
||||
Magic carpet effect
|
||||
Provides a magical flying carpet
|
||||
[c/aaaaaa:Shift-<right> in your inventory to toggle] [i:FlyingCarpet] [c/aaaaaa:Flying Carpet's effect]
|
||||
'''
|
||||
}
|
||||
|
||||
AuricTeslaHeadRanged: {
|
||||
DisplayName: Auric Tesla Hooded Facemask
|
||||
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus:
|
||||
'''
|
||||
Ranged Tarragon, Bloodflare and God Slayer armor effects
|
||||
@@ -217,7 +222,11 @@ BloodflareHeadMelee: {
|
||||
|
||||
BloodflareHeadRanged: {
|
||||
DisplayName: Bloodflare Horned Helm
|
||||
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}"
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}
|
||||
{$Common.AmmoUseReduction@1}
|
||||
'''
|
||||
SetBonus: "{$BloodflareHeadRanged.SetBonusEffect}"
|
||||
SetBonusEffect:
|
||||
'''
|
||||
@@ -277,6 +286,7 @@ DemonshadeBreastplate: {
|
||||
{$CommonItemTooltip.IncreasesMaxManaBy}
|
||||
{$CommonItemTooltip.PercentIncreasedDamageCritChance@1}
|
||||
{$CommonItemTooltip.PercentIncreasedMeleeSpeed@2}
|
||||
{$Common.AmmoUseReduction@3}
|
||||
Standing still absorbs shadows to grant exponentially accelerating life regen
|
||||
'''
|
||||
}
|
||||
@@ -443,7 +453,11 @@ GodSlayerHeadMelee: {
|
||||
|
||||
GodSlayerHeadRanged: {
|
||||
DisplayName: God Slayer Helmet
|
||||
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus: "{$GodSlayerHeadRanged.SetBonusEffect}"
|
||||
SetBonusEffect:
|
||||
'''
|
||||
@@ -486,6 +500,7 @@ OmegaBlueChestplate: {
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}
|
||||
{$Common.AmmoUseReduction@2}
|
||||
Your attacks inflict Hadopelagic Pressure
|
||||
No positive life regen
|
||||
'''
|
||||
@@ -664,7 +679,11 @@ TarragonHeadMelee: {
|
||||
|
||||
TarragonHeadRanged: {
|
||||
DisplayName: Tarragon Visage
|
||||
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
|
||||
Tooltip:
|
||||
'''
|
||||
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
|
||||
{$Common.AmmoUseReduction@2}
|
||||
'''
|
||||
SetBonus: "{$TarragonHeadRanged.SetBonusEffect}"
|
||||
SetBonusEffect:
|
||||
'''
|
||||
|
||||
@@ -326,3 +326,8 @@ AnodizedWulfrumMetal: {
|
||||
DisplayName: Anodized Wulfrum Metal
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
WillOWisp: {
|
||||
DisplayName: Will O Wisp
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -4144,16 +4144,6 @@ EutrophicGlassWall: {
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
EutrophicSandWall: {
|
||||
DisplayName: Unsafe Eutrophic Sand Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
EutrophicSandWallSafe: {
|
||||
DisplayName: Eutrophic Sand Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
ExoPlatingWallItem: {
|
||||
DisplayName: Exo Plating Wall
|
||||
Tooltip: ""
|
||||
@@ -4195,11 +4185,6 @@ NavyplateWall: {
|
||||
}
|
||||
|
||||
NavystoneWall: {
|
||||
DisplayName: Unsafe Navystone Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
NavystoneWallSafe: {
|
||||
DisplayName: Navystone Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -4653,3 +4638,8 @@ BasaltSlab: {
|
||||
DisplayName: Basalt Slab
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
UnsafeNavystoneWall: {
|
||||
DisplayName: Unsafe Navystone Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -126,7 +126,11 @@ AstralBlaster: {
|
||||
|
||||
AstrealDefeat: {
|
||||
DisplayName: Astreal Defeat
|
||||
Tooltip: All arrows are converted to Astreal Arrows that emit flames as they travel
|
||||
Tooltip:
|
||||
'''
|
||||
All arrows are converted to Astreal Arrows that emit flames as they travel
|
||||
33% chance to save ammo
|
||||
'''
|
||||
}
|
||||
|
||||
Auralis: {
|
||||
@@ -210,6 +214,7 @@ BlossomFlux: {
|
||||
'''
|
||||
Fires a stream of leaves
|
||||
Press <right> to fire a spore orb that explodes into a cloud of spore gas
|
||||
50% chance to save ammo
|
||||
'''
|
||||
LegendaryText:
|
||||
'''
|
||||
@@ -635,6 +640,7 @@ Infinity: {
|
||||
'''
|
||||
Fires a twin stream of energy bolts that split
|
||||
Press <right> to fire a barrage of normal bullets
|
||||
80% chance to save ammo
|
||||
'They say infinity is neverending, yet you hold it in your hands'
|
||||
'''
|
||||
}
|
||||
@@ -1127,6 +1133,7 @@ Shredder: {
|
||||
'''
|
||||
Fires a barrage of energy bolts that split and bounce
|
||||
Press <right> to fire a barrage of normal bullets instead
|
||||
60% chance to save ammo
|
||||
'The myth, the legend, the weapon that drops more frames than any other'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -487,6 +487,7 @@ IgneousExaltation: {
|
||||
Summons an Igneous blade that orbits around you
|
||||
When your minion slots are full, <left> again to launch all blades towards the cursor
|
||||
This ability has a two-second cooldown that requires holding this item
|
||||
Shift-<right> this item in your inventory to change the rotation direction
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -864,6 +865,7 @@ ViridVanguard: {
|
||||
All weapons inflict Sage Poison, which becomes more powerful the more weapons are summoned
|
||||
When all minion slots are full, <left> again to spin up a flurry of slashes aimed at your cursor
|
||||
This ability has a five-second cooldown that requires holding this item
|
||||
Shift-<right> this item in your inventory to change the rotation direction
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -163,3 +163,13 @@ XykDeathAnim.DisplayName: Xyk Death Animation
|
||||
XykWings.DisplayName: Xyk Wings
|
||||
BatholithBangleProjectile.DisplayName: Batholith Bangle Projectile
|
||||
ScionsCurioMini.DisplayName: Scions Curio Mini
|
||||
BlackPearlFalling.DisplayName: Black Pearl Falling
|
||||
DunesandBallFalling.DisplayName: Dunesand Ball Falling
|
||||
EutrophicSandBallFalling.DisplayName: Eutrophic Sand Ball Falling
|
||||
PinkPearlFalling.DisplayName: Pink Pearl Falling
|
||||
PolypSandBallFalling.DisplayName: Polyp Sand Ball Falling
|
||||
VolcanicSandBallFalling.DisplayName: Volcanic Sand Ball Falling
|
||||
WhitePearlFalling.DisplayName: White Pearl Falling
|
||||
DuneSandBallGun.DisplayName: Dunesandball
|
||||
PolypSandBallGun.DisplayName: Polyp Sandball
|
||||
VolcanicSandBallGun.DisplayName: Volcanic Sandball
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
@@ -117,9 +118,9 @@ namespace CalamityMod.NPCs
|
||||
/// <summary>
|
||||
/// Applies this animation for the given frame
|
||||
/// </summary>
|
||||
/// <param name="HeadNPC"></param>
|
||||
/// <param name="HeadEntity"></param>
|
||||
/// <param name="frame"></param>
|
||||
public void ApplyAnimationFrame(BaseWormNPC HeadNPC, float frame)
|
||||
public void ApplyAnimationFrame(Entity HeadEntity, float frame)
|
||||
{
|
||||
var orderedKeyframes = AnimationKeyframes.OrderBy(x => x.Key);
|
||||
(int, float[], float)? prev = null;
|
||||
@@ -163,42 +164,136 @@ namespace CalamityMod.NPCs
|
||||
AnimationKeyframes[next.Value.Item1] = (AnimationKeyframes[next.Value.Item1].Item1, next.Value.Item3);
|
||||
}
|
||||
}
|
||||
if (HeadNPC.Segments.Count > 0)
|
||||
//We use the same animation framework for both projectiles and NPCs, but applying it is different for each type and so we do the final applications here.
|
||||
if (HeadEntity is NPC)
|
||||
{
|
||||
if (applyRotation && !(float.IsNaN(goalRotation)))
|
||||
BaseWormNPC HeadNPC = ((NPC)HeadEntity).ModNPC<BaseWormNPC>();
|
||||
if (HeadNPC.Segments.Count > 0)
|
||||
{
|
||||
HeadNPC.NPC.rotation = goalRotation * (mirror ? HeadNPC.NPC.velocity.X.DirectionalSign() : 1);
|
||||
}
|
||||
for (int i = 0; i < HeadNPC.Segments.Count; i++)
|
||||
{
|
||||
|
||||
Vector2 pos1 = HeadNPC.NPC.Center;
|
||||
float dist = HeadNPC.SegmentTypePositionOffsets[0];
|
||||
if (i != 0)
|
||||
if (applyRotation && !(float.IsNaN(goalRotation)))
|
||||
{
|
||||
dist = HeadNPC.SegmentTypePositionOffsets[HeadNPC.Segments[i - 1].segmentType + 1];
|
||||
HeadNPC.NPC.rotation = goalRotation * (mirror ? HeadNPC.NPC.velocity.X.DirectionalSign() : 1);
|
||||
}
|
||||
dist *= HeadNPC.NPC.scale;
|
||||
Vector2 rot = (HeadNPC.NPC.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
if (rot == Vector2.Zero)
|
||||
rot = HeadNPC.Segments[0].Center.AngleTo(HeadNPC.NPC.Center).ToRotationVector2();
|
||||
if (i >= 1)
|
||||
for (int i = 0; i < HeadNPC.Segments.Count; i++)
|
||||
{
|
||||
pos1 = HeadNPC.Segments[i - 1].Center;
|
||||
rot = HeadNPC.Segments[i - 1].velocity.SafeNormalize(Vector2.Zero);
|
||||
}
|
||||
rot = rot.RotatedBy(goalSegmentRotOffsets[i] * (mirror ? HeadNPC.NPC.velocity.X.DirectionalSign() : 1));
|
||||
var dir = HeadNPC.Segments[i].Center.DirectionFrom(pos1);
|
||||
HeadNPC.Segments[i].Center = pos1 + Vector2.Lerp(dir, -(rot), segmentRigidity) * dist;
|
||||
HeadNPC.Segments[i].velocity = HeadNPC.Segments[i].Center.DirectionTo(pos1);
|
||||
HeadNPC.Segments[i].rotation = HeadNPC.Segments[i].velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
for (int i = 1; i < HeadNPC.Segments.Count - 1; i++)
|
||||
{
|
||||
HeadNPC.Segments[i].rotation = HeadNPC.Segments[i + 1].Center.DirectionTo(HeadNPC.Segments[i - 1].Center).ToRotation() + MathHelper.PiOver2;
|
||||
Vector2 pos1 = HeadNPC.NPC.Center;
|
||||
float dist = HeadNPC.SegmentTypePositionOffsets[0];
|
||||
if (i != 0)
|
||||
{
|
||||
dist = HeadNPC.SegmentTypePositionOffsets[HeadNPC.Segments[i - 1].segmentType + 1];
|
||||
}
|
||||
dist *= HeadNPC.NPC.scale;
|
||||
Vector2 rot = (HeadNPC.NPC.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
if (rot == Vector2.Zero)
|
||||
rot = HeadNPC.Segments[0].Center.AngleTo(HeadNPC.NPC.Center).ToRotationVector2();
|
||||
if (i >= 1)
|
||||
{
|
||||
pos1 = HeadNPC.Segments[i - 1].Center;
|
||||
rot = HeadNPC.Segments[i - 1].velocity.SafeNormalize(Vector2.Zero);
|
||||
}
|
||||
rot = rot.RotatedBy(goalSegmentRotOffsets[i] * (mirror ? HeadNPC.NPC.velocity.X.DirectionalSign() : 1));
|
||||
var dir = HeadNPC.Segments[i].Center.DirectionFrom(pos1);
|
||||
HeadNPC.Segments[i].Center = pos1 + Vector2.Lerp(dir, -(rot), segmentRigidity) * dist;
|
||||
HeadNPC.Segments[i].velocity = HeadNPC.Segments[i].Center.DirectionTo(pos1);
|
||||
HeadNPC.Segments[i].rotation = HeadNPC.Segments[i].velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
for (int i = 1; i < HeadNPC.Segments.Count - 1; i++)
|
||||
{
|
||||
HeadNPC.Segments[i].rotation = HeadNPC.Segments[i + 1].Center.DirectionTo(HeadNPC.Segments[i - 1].Center).ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (HeadEntity is Projectile)
|
||||
{
|
||||
BaseWormProjectile HeadProjectile = ((Projectile)HeadEntity).ModProjectile<BaseWormProjectile>();
|
||||
if (HeadProjectile.Segments.Count > 0)
|
||||
{
|
||||
if (applyRotation && !(float.IsNaN(goalRotation)))
|
||||
{
|
||||
HeadProjectile.Projectile.rotation = goalRotation * (mirror ? HeadProjectile.Projectile.velocity.X.DirectionalSign() : 1);
|
||||
}
|
||||
for (int i = 0; i < HeadProjectile.Segments.Count; i++)
|
||||
{
|
||||
|
||||
Vector2 pos1 = HeadProjectile.Projectile.Center;
|
||||
float dist = HeadProjectile.SegmentTypePositionOffsets[0];
|
||||
if (i != 0)
|
||||
{
|
||||
dist = HeadProjectile.SegmentTypePositionOffsets[HeadProjectile.Segments[i - 1].segmentType + 1];
|
||||
}
|
||||
dist *= HeadProjectile.Projectile.scale;
|
||||
Vector2 rot = (HeadProjectile.Projectile.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
if (rot == Vector2.Zero)
|
||||
rot = HeadProjectile.Segments[0].Center.AngleTo(HeadProjectile.Projectile.Center).ToRotationVector2();
|
||||
if (i >= 1)
|
||||
{
|
||||
pos1 = HeadProjectile.Segments[i - 1].Center;
|
||||
rot = HeadProjectile.Segments[i - 1].velocity.SafeNormalize(Vector2.Zero);
|
||||
}
|
||||
rot = rot.RotatedBy(goalSegmentRotOffsets[i] * (mirror ? HeadProjectile.Projectile.velocity.X.DirectionalSign() : 1));
|
||||
var dir = HeadProjectile.Segments[i].Center.DirectionFrom(pos1);
|
||||
HeadProjectile.Segments[i].Center = pos1 + Vector2.Lerp(dir, -(rot), segmentRigidity) * dist;
|
||||
HeadProjectile.Segments[i].velocity = HeadProjectile.Segments[i].Center.DirectionTo(pos1);
|
||||
HeadProjectile.Segments[i].rotation = HeadProjectile.Segments[i].velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
for (int i = 1; i < HeadProjectile.Segments.Count - 1; i++)
|
||||
{
|
||||
HeadProjectile.Segments[i].rotation = HeadProjectile.Segments[i + 1].Center.DirectionTo(HeadProjectile.Segments[i - 1].Center).ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Segment Class
|
||||
/// <summary>
|
||||
/// This class is used to store the information of each segment's location, size, and texture path
|
||||
/// Due to the amount of segments, there is only one actual NPC for this boss
|
||||
/// </summary>
|
||||
public class BaseWormSegment
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of segment this is. Segment type is used to determine spacing and textures.
|
||||
/// </summary>
|
||||
public int segmentType = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The position of the center of this segment
|
||||
/// </summary>
|
||||
public Vector2 Center = Vector2.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// The rotation of this segment in radians
|
||||
/// </summary>
|
||||
public float rotation = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The velocity this segment has.
|
||||
/// Currently doesn't actually do anything besides be a token value if needed to be read by something
|
||||
/// </summary>
|
||||
public Vector2 velocity = Vector2.Zero;
|
||||
/// <summary>
|
||||
/// How opaque this segment is. Ranges from 1 (fully opaque) to 0 (fully transparent)
|
||||
/// </summary>
|
||||
public float Opacity = 1;
|
||||
public BaseWormSegment(ModNPC Head, int segmentStyle = 0)
|
||||
{
|
||||
Center = Head.NPC.Center;
|
||||
rotation = Head.NPC.rotation;
|
||||
velocity = Head.NPC.velocity;
|
||||
segmentType = segmentStyle;
|
||||
}
|
||||
|
||||
public BaseWormSegment(ModProjectile Head, int segmentStyle = 0)
|
||||
{
|
||||
Center = Head.Projectile.Center;
|
||||
rotation = Head.Projectile.rotation;
|
||||
velocity = Head.Projectile.velocity;
|
||||
segmentType = segmentStyle;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -244,7 +339,7 @@ namespace CalamityMod.NPCs
|
||||
/// <summary>
|
||||
/// The list of all segments of this worm
|
||||
/// </summary>
|
||||
public List<Segment> Segments = new();
|
||||
public List<BaseWormSegment> Segments = new();
|
||||
|
||||
/// <summary>
|
||||
/// The textures for each segment type of this worm. Works like getting a texture from TextureAssets
|
||||
@@ -272,40 +367,6 @@ namespace CalamityMod.NPCs
|
||||
/// </summary>
|
||||
private List<Asset<Texture2D>> internalTexAssets = new List<Asset<Texture2D>>();
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to store the information of each segment's location, size, and texture path
|
||||
/// Due to the amount of segments, there is only one actual NPC for this boss
|
||||
/// </summary>
|
||||
public class Segment
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of segment this is. Segment type is used to determine spacing and textures.
|
||||
/// </summary>
|
||||
public int segmentType = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The position of the center of this segment
|
||||
/// </summary>
|
||||
public Vector2 Center = Vector2.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// The rotation of this segment in radians
|
||||
/// </summary>
|
||||
public float rotation = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The velocity this segment has.
|
||||
/// Currently doesn't actually do anything besides be a token value if needed to be read by something
|
||||
/// </summary>
|
||||
public Vector2 velocity = Vector2.Zero;
|
||||
public Segment(ModNPC Head, int segmentStyle = 0)
|
||||
{
|
||||
Center = Head.NPC.Center;
|
||||
rotation = Head.NPC.rotation;
|
||||
velocity = Head.NPC.velocity;
|
||||
segmentType = segmentStyle;
|
||||
}
|
||||
}
|
||||
public enum SegmentFollowLogic
|
||||
{
|
||||
Regular = 0, //Traditional worm segment logic
|
||||
@@ -336,7 +397,7 @@ namespace CalamityMod.NPCs
|
||||
NPC.position += NPC.velocity; //Update this segment's movement so that all other segments use this as the base. This is undone at the end of the method.
|
||||
if (ActiveAnimation is not null)
|
||||
{
|
||||
ActiveAnimation.ApplyAnimationFrame(this, AnimationFrame);
|
||||
ActiveAnimation.ApplyAnimationFrame(NPC, AnimationFrame);
|
||||
AnimationFrame++;
|
||||
if (AnimationFrame > ActiveAnimation.AnimationKeyframes.Keys.Max())
|
||||
{
|
||||
@@ -377,7 +438,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
float segmentDistance = SegmentTypePositionOffsets[0];
|
||||
var thisSeg = Segments[i];
|
||||
var aheadSeg = new Segment(this);
|
||||
var aheadSeg = new BaseWormSegment(this);
|
||||
if (i != 0)
|
||||
{
|
||||
aheadSeg = Segments[i - 1];
|
||||
@@ -403,7 +464,7 @@ namespace CalamityMod.NPCs
|
||||
for (int i = 0; i < Segments.Count; i++)
|
||||
{
|
||||
var thisSeg = Segments[i];
|
||||
var aheadSeg = new Segment(this);
|
||||
var aheadSeg = new BaseWormSegment(this);
|
||||
if (i != 0)
|
||||
aheadSeg = Segments[i - 1];
|
||||
bool hasMoved = false;
|
||||
@@ -446,7 +507,6 @@ namespace CalamityMod.NPCs
|
||||
Segments[i].velocity = Segments[i].Center.DirectionTo(aheadSeg.Center);
|
||||
Segments[i].rotation = Segments[i].velocity.ToRotation() + MathHelper.PiOver2;
|
||||
hasMoved = true;
|
||||
hasMoved = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -486,9 +546,9 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
for (var i = 0; i < SegmentCount - 1; i++)
|
||||
{
|
||||
Segments.Add(new Segment(this, 0));
|
||||
Segments.Add(new BaseWormSegment(this, 0));
|
||||
}
|
||||
Segments.Add(new Segment(this, 1));
|
||||
Segments.Add(new BaseWormSegment(this, 1));
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -504,7 +564,7 @@ namespace CalamityMod.NPCs
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void DrawSegment(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor, Segment segment)
|
||||
public virtual void DrawSegment(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor, BaseWormSegment segment)
|
||||
{
|
||||
var color = Lighting.GetColor(segment.Center.ToTileCoordinates());
|
||||
if (!SegmentTextureAssets.IndexInRange(segment.segmentType))
|
||||
@@ -512,7 +572,7 @@ namespace CalamityMod.NPCs
|
||||
return;
|
||||
}
|
||||
var tex = SegmentTextureAssets[segment.segmentType].Value;
|
||||
spriteBatch.Draw(tex, segment.Center - Main.screenPosition, null, color, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
|
||||
spriteBatch.Draw(tex, segment.Center - Main.screenPosition, null, color * segment.Opacity, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -6110,13 +6110,6 @@ namespace CalamityMod.NPCs
|
||||
pool[NPCID.ChaosElemental] = SpawnCondition.Cavern.Chance * 0.125f;
|
||||
}
|
||||
|
||||
// Replace vanilla Lava Slimes with Calamity Lava Slimes to avoid annoying lava drops
|
||||
if (spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone && CalamityServerConfig.Instance.RemoveLavaDropsFromLavaSlimes && Main.expertMode)
|
||||
{
|
||||
pool.Add(NPCType<LavaSlimeNoLavaDrop>(), SpawnCondition.Underworld.Chance);
|
||||
pool.Remove(NPCID.LavaSlime);
|
||||
}
|
||||
|
||||
// Spawn Green Jellyfish in prehm and Blue Jellyfish in hardmode
|
||||
if (spawnInfo.Player.ZoneRockLayerHeight && spawnInfo.Water && !calamityBiomeZone)
|
||||
{
|
||||
|
||||
@@ -1157,6 +1157,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
shop.InsertBefore(ItemID.LesserHealingPotion, ItemID.Bottle)
|
||||
.InsertAfter(ItemID.ManaPotion, ItemID.WormholePotion, Condition.HappyEnoughToSellPylons)
|
||||
.InsertAfter(ItemID.Safe, ItemID.MusicBox)
|
||||
.InsertAfter(ItemID.Flare, ItemID.Flare, hasFlareGunUpgrade)
|
||||
.InsertAfter(ItemID.BlueFlare, ItemID.BlueFlare, hasFlareGunUpgrade)
|
||||
.AddWithCustomValue(ItemID.AngelStatue, Item.buyPrice(gold: 5), Condition.NpcIsPresent(NPCType<Bandit>()));
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
public class LavaSlimeNoLavaDrop : ModNPC
|
||||
{
|
||||
public override string Texture => $"Terraria/Images/NPC_{NPCID.LavaSlime}";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.npcFrameCount[Type] = 2;
|
||||
this.HideFromBestiary();
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.aiStyle = NPCAIStyleID.Slime;
|
||||
AIType = NPCID.LavaSlime;
|
||||
AnimationType = NPCID.LavaSlime;
|
||||
NPC.width = 24;
|
||||
NPC.height = 18;
|
||||
NPC.damage = 15;
|
||||
NPC.defense = 10;
|
||||
NPC.lifeMax = 50;
|
||||
NPC.HitSound = SoundID.NPCHit1;
|
||||
NPC.DeathSound = SoundID.NPCDeath1;
|
||||
NPC.scale = 1.1f;
|
||||
NPC.alpha = 50;
|
||||
NPC.lavaImmune = true;
|
||||
NPC.value = 120f;
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
NPC.damage = 7;
|
||||
NPC.defense = 2;
|
||||
NPC.lifeMax = 25;
|
||||
NPC.value = 25f;
|
||||
}
|
||||
//Banner = NPCID.LavaSlime;
|
||||
//BannerItem = ItemID.LavaSlimeBanner;
|
||||
|
||||
NPC.Calamity().VulnerableToCold = true;
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
NPC.Calamity().VulnerableToHeat = false;
|
||||
NPC.Calamity().VulnerableToWater = true;
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
if (NPC.life > 0)
|
||||
{
|
||||
for (int i = 0; (double)i < hit.Damage / (double)NPC.lifeMax * 80D; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hit.HitDirection * 2, -1f, NPC.alpha, default, 1.5f);
|
||||
if (Main.rand.Next(8) != 0)
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hit.HitDirection * 2, -1f, NPC.alpha, default, 1.5f);
|
||||
if (Main.rand.Next(8) != 0)
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
using System.IO;
|
||||
using CalamityMod.BiomeManagers;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -216,5 +219,9 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
spriteBatch.Draw(tex, NPC.Center - screenPos, frame, drawColor, NPC.rotation, frame.Size() / 2f, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
{
|
||||
npcLoot.Add(ModContent.ItemType<WillOWisp>(), 1, 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.Utilities;
|
||||
using System.IO;
|
||||
using CalamityMod.Items.Materials;
|
||||
|
||||
namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
@@ -179,5 +180,9 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
{
|
||||
npcLoot.Add(ModContent.ItemType<WillOWisp>(), 1, 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,6 +411,7 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
{
|
||||
base.SetDefaults();
|
||||
|
||||
Banner = Type;
|
||||
BannerItem = ItemType<ProbesnoutBanner>();
|
||||
|
||||
NPC.lifeMax = 5;
|
||||
|
||||