Added Boss Rush Monolith, Accursed now equippable
No files matched your search
@@ -1173,6 +1173,22 @@ namespace CalamityMod.CalPlayer
|
||||
public Vector2 FireDrawerPosition;
|
||||
|
||||
public int monolithAccursedShader = 0;
|
||||
|
||||
public int monolithBossRushShader = 0;
|
||||
|
||||
public int monolithExoShader = 0;
|
||||
|
||||
public int monolithLeviathanShader = 0;
|
||||
|
||||
public int monolithPlagueShader = 0;
|
||||
|
||||
public int monolithCryogenShader = 0;
|
||||
|
||||
public int monolithAstralShader = 0;
|
||||
|
||||
public int monolithDevourerShader = 0;
|
||||
|
||||
public int monolithYharonShader = 0;
|
||||
#endregion Draw Effects
|
||||
|
||||
#region Draedon Summoning
|
||||
|
||||
@@ -1504,6 +1504,22 @@ namespace CalamityMod.CalPlayer
|
||||
ChlorophyteHealDelay--;
|
||||
if (monolithAccursedShader > 0)
|
||||
monolithAccursedShader--;
|
||||
if (monolithBossRushShader > 0)
|
||||
monolithBossRushShader--;
|
||||
if (monolithExoShader > 0)
|
||||
monolithExoShader--;
|
||||
if (monolithLeviathanShader > 0)
|
||||
monolithLeviathanShader--;
|
||||
if (monolithCryogenShader > 0)
|
||||
monolithCryogenShader--;
|
||||
if (monolithDevourerShader > 0)
|
||||
monolithDevourerShader--;
|
||||
if (monolithYharonShader > 0)
|
||||
monolithYharonShader--;
|
||||
if (monolithPlagueShader > 0)
|
||||
monolithPlagueShader--;
|
||||
if (monolithAstralShader > 0)
|
||||
monolithAstralShader--;
|
||||
if (miningSetCooldown > 0)
|
||||
miningSetCooldown--;
|
||||
if (RustyMedallionCooldown > 0)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.Monoliths;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables.Furniture.Monoliths
|
||||
{
|
||||
public class BossRushMonolith : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 24;
|
||||
Item.height = 28;
|
||||
Item.maxStack = 9999;
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.consumable = true;
|
||||
Item.createTile = ModContent.TileType<BossRushMonolithTile>();
|
||||
Item.rare = ModContent.RarityType<HotPink>();
|
||||
Item.accessory = true;
|
||||
Item.vanity = true;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.Calamity().monolithBossRushShader = 30;
|
||||
}
|
||||
}
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.Calamity().monolithBossRushShader = 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 500 B |
|
After Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 647 B |
|
After Width: | Height: | Size: 603 B |
|
After Width: | Height: | Size: 589 B |
|
After Width: | Height: | Size: 727 B |
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using CalamityMod.Tiles.FurnitureSacrilegious;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables.FurnitureSacrilegious
|
||||
@@ -20,7 +21,23 @@ namespace CalamityMod.Items.Placeables.FurnitureSacrilegious
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.consumable = true;
|
||||
Item.createTile = ModContent.TileType<MonolithOfTheAccursedTile>();
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
Item.accessory = true;
|
||||
Item.vanity = true;
|
||||
}
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.Calamity().monolithAccursedShader = 30;
|
||||
}
|
||||
}
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.Calamity().monolithAccursedShader = 30;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -656,6 +656,12 @@ LanternCenter: {
|
||||
Tooltip: Lights up the night sky with celebratory lanterns
|
||||
}
|
||||
|
||||
BossRushMonolith: {
|
||||
DisplayName: Boss Rush Monolith
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
|
||||
NavyPrismTorch: {
|
||||
DisplayName: Navy Prism Torch
|
||||
Tooltip: Can be placed in water
|
||||
@@ -3517,4 +3523,4 @@ WaterTurret: {
|
||||
Shoots high-speed water blasts at nearby enemies
|
||||
Cannot attack while a boss is alive
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -23,7 +23,7 @@ namespace CalamityMod.Skies
|
||||
|
||||
public static bool DetermineDrawEligibility()
|
||||
{
|
||||
bool useEffect = ((BossRushEvent.BossRushActive && BossRushEvent.StartTimer > 100) || ShouldDrawRegularly) && !Main.gameMenu;
|
||||
bool useEffect = ((BossRushEvent.BossRushActive && BossRushEvent.StartTimer > 100) || ShouldDrawRegularly || Main.LocalPlayer?.Calamity()?.monolithBossRushShader > 0) && !Main.gameMenu;
|
||||
|
||||
if (SkyManager.Instance["CalamityMod:BossRush"] != null && useEffect != SkyManager.Instance["CalamityMod:BossRush"].IsActive())
|
||||
{
|
||||
@@ -68,6 +68,11 @@ namespace CalamityMod.Skies
|
||||
{
|
||||
if (ShouldDrawRegularly)
|
||||
return 1f;
|
||||
if (Main.LocalPlayer?.Calamity().monolithBossRushShader > 0)
|
||||
{
|
||||
float raito = Main.LocalPlayer.Calamity().monolithBossRushShader / 30;
|
||||
return Utils.GetLerpValue(0.57f, 1f, raito, true);
|
||||
}
|
||||
|
||||
float fadeRatio = BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime;
|
||||
return Utils.GetLerpValue(0.57f, 1f, fadeRatio, true);
|
||||
@@ -77,7 +82,7 @@ namespace CalamityMod.Skies
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
|
||||
{
|
||||
if (GetIntensity() == 0f)
|
||||
if (GetIntensity() == 0f && Main.LocalPlayer?.Calamity()?.monolithBossRushShader <= 0)
|
||||
return;
|
||||
|
||||
if (maxDepth >= 0 && minDepth < 0 && GetIntensity() > 0f)
|
||||
@@ -103,7 +108,7 @@ namespace CalamityMod.Skies
|
||||
Main.spriteBatch.Begin();
|
||||
|
||||
// Draw the Xeroc eye at the back of the sky.
|
||||
if (maxDepth >= float.MaxValue && minDepth < float.MaxValue && (BossRushEvent.EndTimer < BossRushEvent.EndVisualEffectTime - 40f || ShouldDrawRegularly))
|
||||
if (maxDepth >= float.MaxValue && minDepth < float.MaxValue && (BossRushEvent.EndTimer < BossRushEvent.EndVisualEffectTime - 40f || ShouldDrawRegularly || Main.LocalPlayer?.Calamity()?.monolithBossRushShader > 0))
|
||||
{
|
||||
Vector2 screenCenter = Main.screenPosition + new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f;
|
||||
screenCenter += new Vector2(Main.screenWidth, Main.screenHeight) * (Main.GameViewMatrix.Zoom - Vector2.One) * 0.5f;
|
||||
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,145 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.Furniture.Monoliths;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Furniture.Monoliths
|
||||
{
|
||||
public class BossRushMonolithTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<BossRushMonolith>());
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4);
|
||||
TileObjectData.newTile.Width = 4;
|
||||
TileObjectData.newTile.Origin = new Point16(2, 2);
|
||||
TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16, 16 };
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.newTile.UsesCustomCanPlace = true;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 4, 0);
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
TileID.Sets.HasOutlines[Type] = true;
|
||||
AddMapEntry(new Color(92, 24, 31));
|
||||
|
||||
DustType = (int)CalamityDusts.Brimstone;
|
||||
AnimationFrameHeight = 72;
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (Main.tile[i, j].TileFrameY < 72)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = Main.LocalPlayer;
|
||||
if (player is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.active)
|
||||
{
|
||||
Main.LocalPlayer.Calamity().monolithBossRushShader = 30;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AnimateTile(ref int frame, ref int frameCounter)
|
||||
{
|
||||
frameCounter++;
|
||||
if (frameCounter >= 7.2)
|
||||
{
|
||||
frameCounter = 0;
|
||||
if (++frame >= 3)
|
||||
{
|
||||
frame = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
|
||||
{
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = ModContent.ItemType<BossRushMonolith>();
|
||||
}
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
HitWire(i, j);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
int x = i - Main.tile[i, j].TileFrameX / 18 % 4;
|
||||
int y = j - Main.tile[i, j].TileFrameY / 18 % 4;
|
||||
int tileXX18 = 18 * 4;
|
||||
for (int l = x; l < x + 4; l++)
|
||||
{
|
||||
for (int m = y; m < y + 4; m++)
|
||||
{
|
||||
if (Main.tile[l, m].HasTile && Main.tile[l, m].TileType == Type)
|
||||
{
|
||||
if (Main.tile[l, m].TileFrameY < tileXX18)
|
||||
Main.tile[l, m].TileFrameY += (short)(tileXX18);
|
||||
else
|
||||
Main.tile[l, m].TileFrameY -= (short)(tileXX18);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Wiring.running)
|
||||
{
|
||||
for (int o = 0; o < 4; o++)
|
||||
{
|
||||
for (int p = 0; p < 4; p++)
|
||||
{
|
||||
Wiring.SkipWire(x + 0, x + p);
|
||||
}
|
||||
}
|
||||
}
|
||||
NetMessage.SendTileSquare(-1, x, y + 1, 3);
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Texture2D texture;
|
||||
texture = TextureAssets.Tile[Type].Value;
|
||||
Vector2 zero = new(Main.offScreenRange, Main.offScreenRange);
|
||||
if (Main.drawToScreen)
|
||||
{
|
||||
zero = Vector2.Zero;
|
||||
}
|
||||
int height = 16;
|
||||
int animate = 0;
|
||||
if (tile.TileFrameY >= 72)
|
||||
{
|
||||
animate = Main.tileFrame[Type] * AnimationFrameHeight;
|
||||
}
|
||||
Main.spriteBatch.Draw(texture, new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY + animate, 16, height), Lighting.GetColor(i, j), 0f, default(Vector2), 1f, SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.5 KiB |