Calclone takes more advice from SCal
This commit is contained in:
1 parent
c3ed37fef5
commit
d8fd1ec460
4 files changed
+117
-2
No files matched your search
@@ -1,6 +1,9 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.Calamitas;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -11,6 +14,15 @@ namespace CalamityMod.Items.SummonItems
|
||||
[LegacyName("BlightedEyeball")]
|
||||
public class EyeofDesolation : ModItem
|
||||
{
|
||||
public Rectangle safeBox = default;
|
||||
public int spawnX = 0;
|
||||
public int spawnX2 = 0;
|
||||
public int spawnXReset = 0;
|
||||
public int spawnXReset2 = 0;
|
||||
public int spawnXAdd = 200;
|
||||
public int spawnY = 0;
|
||||
public int spawnYReset = 0;
|
||||
public int spawnYAdd = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
@@ -51,9 +63,59 @@ namespace CalamityMod.Items.SummonItems
|
||||
else
|
||||
NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType<CalamitasClone>());
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld) // move to zenith seed later
|
||||
{
|
||||
safeBox.X = spawnX = spawnXReset = (int)(player.Center.X - 1250f);
|
||||
spawnX2 = spawnXReset2 = (int)(player.Center.X + 1250f);
|
||||
safeBox.Y = spawnY = spawnYReset = (int)(player.Center.Y - 1250f);
|
||||
safeBox.Width = 2500;
|
||||
safeBox.Height = 2500;
|
||||
spawnYAdd = 125;
|
||||
|
||||
int num52 = (int)(safeBox.X + (float)(safeBox.Width / 2)) / 16;
|
||||
int num53 = (int)(safeBox.Y + (float)(safeBox.Height / 2)) / 16;
|
||||
int num54 = safeBox.Width / 2 / 16 + 1;
|
||||
for (int num55 = num52 - num54; num55 <= num52 + num54; num55++)
|
||||
{
|
||||
for (int num56 = num53 - num54; num56 <= num53 + num54; num56++)
|
||||
{
|
||||
if (!WorldGen.InWorld(num55, num56, 2))
|
||||
continue;
|
||||
|
||||
int xoffset = 0;
|
||||
int yoffset = 0;
|
||||
|
||||
if ((num55 == num52 - num54 || num55 == num52 + num54 || num56 == num53 - num54 || num56 == num53 + num54) && !Main.tile[num55 + xoffset, num56 + yoffset].HasTile)
|
||||
{
|
||||
Main.tile[num55 + xoffset, num56 + yoffset].TileType = (ushort)ModContent.TileType<Tiles.ArenaTile>();
|
||||
Main.tile[num55 + xoffset, num56 + yoffset].Get<TileWallWireStateData>().HasTile = true;
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, num55 + xoffset, num56 + yoffset, 1, TileChangeType.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.SquareTileFrame(num55 + xoffset, num56 + yoffset, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
TooltipLine line4 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
|
||||
TooltipLine line5 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
|
||||
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
line4.Text = "Doing so will create a square arena of blocks, with you at its center\nNot consumable";
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -158,6 +158,10 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/NPCs/Calamitas/CalamitasCloneGlow").Value;
|
||||
Color color = Color.Lerp(Color.White, Color.Red, 0.5f);
|
||||
if (Main.getGoodWorld) // move to zenith seed later
|
||||
{
|
||||
color = Color.CornflowerBlue;
|
||||
}
|
||||
|
||||
if (CalamityConfig.Instance.Afterimages)
|
||||
{
|
||||
|
||||
@@ -1467,6 +1467,10 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
int type = ModContent.ProjectileType<SCalBrimstoneFireblast>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
if (Main.getGoodWorld) // move to zenith seed later
|
||||
{
|
||||
type = ModContent.ProjectileType<SCalBrimstoneGigablast>();
|
||||
}
|
||||
float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f;
|
||||
float projSpeed = bossRush ? 6.25f : 5f;
|
||||
if (calamityGlobalNPC.newAI[3] <= 300f)
|
||||
@@ -2012,6 +2016,28 @@ namespace CalamityMod.NPCs
|
||||
npc.velocity.X = num871 * num873;
|
||||
npc.velocity.Y = num872 * num873;
|
||||
npc.ai[1] = 2f;
|
||||
|
||||
if (Main.getGoodWorld) // move to zenith seed later
|
||||
{
|
||||
SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, npc.Center);
|
||||
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneFire>());
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 5f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 velocity2 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2292,6 +2318,28 @@ namespace CalamityMod.NPCs
|
||||
npc.velocity.X = num871 * num873;
|
||||
npc.velocity.Y = num872 * num873;
|
||||
npc.ai[1] = 2f;
|
||||
|
||||
if (Main.getGoodWorld) // move to zenith seed later
|
||||
{
|
||||
SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, npc.Center);
|
||||
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(ModContent.ProjectileType<BrimstoneBall>());
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 5f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 velocity2 = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Calamitas;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -34,7 +35,7 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
if (closer)
|
||||
{
|
||||
if (!NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()) && !SCalSky.RitualDramaProjectileIsPresent)
|
||||
if (!NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()) && !SCalSky.RitualDramaProjectileIsPresent && !(NPC.AnyNPCs(ModContent.NPCType<CalamitasClone>()) && Main.getGoodWorld))
|
||||
{
|
||||
WorldGen.KillTile(i, j, false, false, false);
|
||||
if (!Main.tile[i, j].HasTile && Main.netMode != NetmodeID.SinglePlayer)
|
||||
|
||||
Reference in new issue
Block a user