Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
dd362818e3
35 files changed
+220
-400
No files matched your search
@@ -5196,7 +5196,7 @@ namespace CalamityMod.CalPlayer
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.065), knockBack * 0.5f, Player.whoAmI);
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.07), knockBack * 0.5f, Player.whoAmI);
|
||||
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].DamageType = DamageClass.Generic; //in case melee/rogue variants bug out
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Ethereal Extorter");
|
||||
Tooltip.SetDefault(@"Rogue projectiles explode into homing souls on death
|
||||
10% increased rogue damage and +10 maximum stealth");
|
||||
8% increased rogue damage and +10 maximum stealth");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.etherealExtorter = true;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
modPlayer.rogueStealthMax += 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Glove of Recklessness");
|
||||
Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 12%\n" +
|
||||
Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 13%\n" +
|
||||
"15% increased stealth regeneration\n" +
|
||||
"Adds inaccuracy to rogue weapons");
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.gloveOfRecklessness = true;
|
||||
modPlayer.stealthGenStandstill += 0.15f;
|
||||
modPlayer.stealthGenMoving += 0.15f;
|
||||
player.GetDamage<RogueDamageClass>() -= 0.12f;
|
||||
player.GetDamage<RogueDamageClass>() -= 0.13f;
|
||||
player.GetAttackSpeed<RogueDamageClass>() += 0.15f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Glove of Precision");
|
||||
Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage and crit by 15% and velocity by 25%");
|
||||
Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage by 12%, crit by 15% and velocity by 25%");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.gloveOfPrecision = true;
|
||||
player.GetDamage<RogueDamageClass>() += 0.15f;
|
||||
player.GetDamage<RogueDamageClass>() += 0.12f;
|
||||
player.GetCritChance<RogueDamageClass>() += 15;
|
||||
modPlayer.rogueVelocity += 0.25f;
|
||||
player.GetAttackSpeed<RogueDamageClass>() -= 0.15f;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
DisplayName.SetDefault("Grave Grimreaver");
|
||||
Tooltip.SetDefault("Hurls a cursed scythe which homes in\n"+
|
||||
"The scythe summons skulls as it flies and explodes into bats on hit\n"+
|
||||
"Stealth strikes spawn a flood of bats and falling skulls\n"+
|
||||
"Stealth strikes spawn a flood of bats and falling skulls when destroyed\n"+
|
||||
"Inflicts cursed flames and confusion\n"+
|
||||
"'A dapper skeleton's weapon of choice'");
|
||||
SacrificeTotal = 1;
|
||||
@@ -23,26 +23,26 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 80;
|
||||
Item.damage = 25;
|
||||
Item.damage = 31;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 50;
|
||||
Item.useTime = 50;
|
||||
Item.useAnimation = 48;
|
||||
Item.useTime = 48;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.knockBack = 4f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
Item.height = 68;
|
||||
Item.shoot = ModContent.ProjectileType<GraveGrimreaverProjectile>();
|
||||
Item.shootSpeed = 16f;
|
||||
Item.shootSpeed = 16.5f;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
||||
Item.rare = ItemRarityID.LightPurple;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 1.55f;
|
||||
public override float StealthVelocityMultiplier => 1.1f;
|
||||
public override float StealthDamageMultiplier => 0.45f;
|
||||
public override float StealthVelocityMultiplier => 1f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.noGravity = true;
|
||||
NPC.lavaImmune = true;
|
||||
NPC.width = 78;
|
||||
NPC.height = 70;
|
||||
NPC.height = 78;
|
||||
NPC.defense = 50;
|
||||
NPC.lifeMax = 5625;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -144,24 +144,16 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Yellow);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.noGravity = true;
|
||||
NPC.chaseable = false;
|
||||
NPC.damage = 34;
|
||||
NPC.width = 50;
|
||||
NPC.height = 28;
|
||||
NPC.width = 58;
|
||||
NPC.height = 30;
|
||||
NPC.defense = 8;
|
||||
NPC.lifeMax = 110;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -344,23 +344,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
if (NPC.IsABestiaryIconDummy)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
NPC.alpha = 0;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
+9
-13
@@ -42,8 +42,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.lavaImmune = true;
|
||||
NPC.Calamity().canBreakPlayerDefense = true;
|
||||
NPC.damage = 90;
|
||||
NPC.width = 126;
|
||||
NPC.height = 66;
|
||||
NPC.width = 136;
|
||||
NPC.height = 62;
|
||||
NPC.defense = 999999;
|
||||
NPC.lifeMax = 400;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -281,19 +281,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.lavaImmune = true;
|
||||
NPC.Calamity().canBreakPlayerDefense = true;
|
||||
NPC.damage = 90;
|
||||
NPC.width = 126;
|
||||
NPC.height = 66;
|
||||
NPC.width = 136;
|
||||
NPC.height = 62;
|
||||
NPC.defense = 999999;
|
||||
NPC.lifeMax = 400;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -277,19 +277,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -129,8 +129,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
|
||||
vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
@@ -428,8 +428,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
|
||||
vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
NPC.noGravity = true;
|
||||
NPC.damage = 100;
|
||||
NPC.width = 50;
|
||||
NPC.height = 220;
|
||||
NPC.width = 62;
|
||||
NPC.height = 226;
|
||||
NPC.defense = 18;
|
||||
NPC.lifeMax = 800;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -211,19 +211,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.White);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -134,8 +134,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow);
|
||||
vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
+9
-13
@@ -25,8 +25,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
NPC.noGravity = true;
|
||||
NPC.damage = 40;
|
||||
NPC.width = 60;
|
||||
NPC.height = 26;
|
||||
NPC.width = 58;
|
||||
NPC.height = 32;
|
||||
NPC.defense = 15;
|
||||
NPC.lifeMax = 480;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -96,19 +96,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LaserfishGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LaserfishGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LaserfishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.Yellow);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LaserfishGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
NPC.noGravity = true;
|
||||
NPC.damage = 10;
|
||||
NPC.width = 74;
|
||||
NPC.height = 56;
|
||||
NPC.width = 68;
|
||||
NPC.height = 58;
|
||||
NPC.defense = 12;
|
||||
NPC.lifeMax = 800;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -276,19 +276,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.noGravity = true;
|
||||
NPC.noTileCollide = true;
|
||||
NPC.damage = 100;
|
||||
NPC.width = 70;
|
||||
NPC.height = 162;
|
||||
NPC.width = 78;
|
||||
NPC.height = 170;
|
||||
NPC.defense = 10;
|
||||
NPC.lifeMax = 6000;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -189,19 +189,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Purple);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -117,22 +117,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
if (NPC.IsABestiaryIconDummy)
|
||||
return;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightGreen);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
+9
-13
@@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
NPC.noGravity = true;
|
||||
NPC.damage = 75;
|
||||
NPC.width = 72;
|
||||
NPC.height = 30;
|
||||
NPC.width = 76;
|
||||
NPC.height = 36;
|
||||
NPC.defense = 10;
|
||||
NPC.lifeMax = 320;
|
||||
NPC.aiStyle = -1;
|
||||
@@ -116,19 +116,15 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (NPC.spriteDirection == 1)
|
||||
if (!NPC.IsABestiaryIconDummy)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ViperfishGlow").Value;
|
||||
|
||||
var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4),
|
||||
NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0);
|
||||
}
|
||||
Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y);
|
||||
Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2));
|
||||
Vector2 vector = center - screenPos;
|
||||
vector -= new Vector2((float)ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ViperfishGlow").Value.Width, (float)(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ViperfishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY);
|
||||
Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/NPCs/Abyss/ViperfishGlow").Value, vector,
|
||||
new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -2645,7 +2645,7 @@ namespace CalamityMod.Projectiles
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(25);
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
|
||||
int soul = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, velocity, ProjectileType<LostSoulFriendly>(), damage, 0f, projectile.owner);
|
||||
Main.projectile[soul].tileCollide = false;
|
||||
if (soul.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2655,7 +2655,7 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0)
|
||||
{
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(15);
|
||||
int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType<JewelSpike>(), damage, projectile.knockBack, projectile.owner);
|
||||
Main.projectile[spike].frame = 4;
|
||||
if (spike.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -26,8 +27,6 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity);
|
||||
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] > 10f)
|
||||
{
|
||||
@@ -47,10 +46,12 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.G = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.B = (byte)(255 * Projectile.Opacity);
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor);
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f);
|
||||
Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY);
|
||||
Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]);
|
||||
Main.EntitySpriteDraw(tex, vector, rectangle, Color.DarkGray, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,7 +66,7 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Vector2 vector15 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
vector15.Normalize();
|
||||
vector15 *= Main.rand.Next(50, 401) * 0.01f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType<InkPoisonCloud>() + Main.rand.Next(3), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1));
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType<InkPoisonCloud>(), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1));
|
||||
}
|
||||
}
|
||||
Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 363 B |
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -27,8 +28,6 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity);
|
||||
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter > 9)
|
||||
{
|
||||
@@ -62,10 +61,12 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.G = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.B = (byte)(255 * Projectile.Opacity);
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor);
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f);
|
||||
Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY);
|
||||
Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]);
|
||||
Main.EntitySpriteDraw(tex, vector, rectangle, Color.DarkGray * 0.5f, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,85 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Enemy
|
||||
{
|
||||
public class InkPoisonCloud2 : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ink Cloud");
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 52;
|
||||
Projectile.height = 48;
|
||||
Projectile.hostile = true;
|
||||
Projectile.Opacity = 0f;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.timeLeft = 3600;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity);
|
||||
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter > 9)
|
||||
{
|
||||
Projectile.frame++;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
if (Projectile.frame > 3)
|
||||
Projectile.frame = 0;
|
||||
|
||||
Projectile.velocity *= 0.98f;
|
||||
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] >= 120f)
|
||||
{
|
||||
if (Projectile.Opacity > 0f)
|
||||
{
|
||||
Projectile.Opacity -= 0.02f;
|
||||
if (Projectile.Opacity < 0f)
|
||||
Projectile.Opacity = 0f;
|
||||
}
|
||||
else if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.Kill();
|
||||
}
|
||||
else if (Projectile.Opacity < 0.9f)
|
||||
{
|
||||
Projectile.Opacity += 0.12f;
|
||||
if (Projectile.Opacity > 0.9f)
|
||||
Projectile.Opacity = 0.9f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.G = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.B = (byte)(255 * Projectile.Opacity);
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 20f, targetHitbox);
|
||||
|
||||
public override bool CanHitPlayer(Player target) => Projectile.Opacity >= 0.9f;
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
if (Projectile.Opacity >= 0.9f)
|
||||
target.AddBuff(BuffID.Darkness, 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,85 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Enemy
|
||||
{
|
||||
public class InkPoisonCloud3 : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ink Cloud");
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 52;
|
||||
Projectile.height = 48;
|
||||
Projectile.hostile = true;
|
||||
Projectile.Opacity = 0f;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.timeLeft = 3600;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity);
|
||||
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter > 9)
|
||||
{
|
||||
Projectile.frame++;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
if (Projectile.frame > 3)
|
||||
Projectile.frame = 0;
|
||||
|
||||
Projectile.velocity *= 0.99f;
|
||||
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] >= 120f)
|
||||
{
|
||||
if (Projectile.Opacity > 0f)
|
||||
{
|
||||
Projectile.Opacity -= 0.02f;
|
||||
if (Projectile.Opacity < 0f)
|
||||
Projectile.Opacity = 0f;
|
||||
}
|
||||
else if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.Kill();
|
||||
}
|
||||
else if (Projectile.Opacity < 0.9f)
|
||||
{
|
||||
Projectile.Opacity += 0.12f;
|
||||
if (Projectile.Opacity > 0.9f)
|
||||
Projectile.Opacity = 0.9f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.G = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.B = (byte)(255 * Projectile.Opacity);
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 20f, targetHitbox);
|
||||
|
||||
public override bool CanHitPlayer(Player target) => Projectile.Opacity >= 0.9f;
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
if (Projectile.Opacity >= 0.9f)
|
||||
target.AddBuff(BuffID.Darkness, 300, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
Vector2 center2 = Projectile.Center;
|
||||
Vector2 vector48 = player.Center - center2;
|
||||
float playerDistance = vector48.Length();
|
||||
if (Projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 110f && Projectile.position.X == Projectile.oldPosition.X)))
|
||||
if (Projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 130f && Projectile.position.X == Projectile.oldPosition.X)))
|
||||
{
|
||||
Projectile.velocity.Y = -8f;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
Projectile.velocity.Y = 15f;
|
||||
}
|
||||
if (playerDistance > 600f)
|
||||
if (playerDistance > 520f)
|
||||
{
|
||||
fly = true;
|
||||
Projectile.velocity.X = 0f;
|
||||
@@ -114,18 +114,18 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
if (player.position.X - Projectile.position.X > 0f)
|
||||
{
|
||||
Projectile.velocity.X += 0.10f;
|
||||
if (Projectile.velocity.X > 5f)
|
||||
Projectile.velocity.X += 0.12f;
|
||||
if (Projectile.velocity.X > 6f)
|
||||
{
|
||||
Projectile.velocity.X = 5f;
|
||||
Projectile.velocity.X = 6f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.velocity.X -= 0.10f;
|
||||
if (Projectile.velocity.X < -5f)
|
||||
Projectile.velocity.X -= 0.12f;
|
||||
if (Projectile.velocity.X < -6f)
|
||||
{
|
||||
Projectile.velocity.X = -5f;
|
||||
Projectile.velocity.X = -6f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 310;
|
||||
Projectile.timeLeft = 210;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
@@ -38,15 +38,15 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
SoundEngine.PlaySound(SoundID.Item7, Projectile.position);
|
||||
}
|
||||
|
||||
//Spawn a skull ever 20 frames
|
||||
if (Projectile.timeLeft % 20 == 0)
|
||||
//Spawn a skull every 30 frames
|
||||
if (Projectile.timeLeft % 30 == 0)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.2f, ModContent.ProjectileType<GrimreaverSkull>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f, 0f);
|
||||
}
|
||||
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 4f, 14f);
|
||||
|
||||
Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt();
|
||||
Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 1).ToDirectionInt();
|
||||
Projectile.rotation += 0.1f * Projectile.spriteDirection;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.penetrate = 2;
|
||||
Projectile.timeLeft = 320;
|
||||
Projectile.timeLeft = 210;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.timeLeft = 210;
|
||||
Projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.CursedInferno, 240);
|
||||
target.AddBuff(BuffID.CursedInferno, 180);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.CursedInferno, 240);
|
||||
target.AddBuff(BuffID.CursedInferno, 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,24 +121,17 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
if (extraPlaces[k + 2])
|
||||
{
|
||||
WorldGen.PlaceTile(i + k, j, ModContent.TileType<SpineTree>(), true);
|
||||
|
||||
Framing.GetTileSafely(i + k, j).TileFrameX = 0;
|
||||
Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//always place the bottom segment on the first frame since it doesnt have variants
|
||||
Framing.GetTileSafely(i + k, j).TileFrameX = 0;
|
||||
Framing.GetTileSafely(i + k, j).TileFrameY = 0;
|
||||
|
||||
if (!extraPlaces[1] && !extraPlaces[3] && k == 0)
|
||||
{
|
||||
Framing.GetTileSafely(i + k, j).TileFrameX = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int branchSegmentDelay = 0;
|
||||
int numSegments = 0;
|
||||
|
||||
for (int k = 1; k < height; k++)
|
||||
{
|
||||
@@ -155,21 +148,21 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
{
|
||||
float divide = 1.65f;
|
||||
|
||||
if (numSegments < 2)
|
||||
if (k > 1 && k < 10)
|
||||
{
|
||||
Framing.GetTileSafely(i, j - k).TileFrameX = 3 * 18;
|
||||
}
|
||||
if (numSegments < 6 && numSegments > 2)
|
||||
if (k >= 10 && k < 17)
|
||||
{
|
||||
Framing.GetTileSafely(i, j - k).TileFrameX = 4 * 18;
|
||||
}
|
||||
if (numSegments > 6)
|
||||
if (k >= 17)
|
||||
{
|
||||
Framing.GetTileSafely(i, j - k).TileFrameX = 5 * 18;
|
||||
}
|
||||
|
||||
Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18);
|
||||
numSegments++;
|
||||
|
||||
branchSegmentDelay = 3;
|
||||
}
|
||||
//otherwise place a normal segment
|
||||
@@ -279,6 +272,38 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
Gore.NewGore(new EntitySource_TileInteraction(Main.LocalPlayer, i, j), (new Vector2(i, j - 2) * 16),
|
||||
new Vector2(Main.rand.Next(-3, 3), Main.rand.Next(-3, 3)), ModContent.Find<ModGore>("CalamityMod/WhateverGore").Type);
|
||||
*/
|
||||
|
||||
//TODO: spawn all the gores here
|
||||
|
||||
//bottom segment
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 0)
|
||||
{
|
||||
}
|
||||
|
||||
//regular segment
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 18)
|
||||
{
|
||||
}
|
||||
|
||||
//small branch
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 54)
|
||||
{
|
||||
}
|
||||
|
||||
//medium branch
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 72)
|
||||
{
|
||||
}
|
||||
|
||||
//large branch
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 90)
|
||||
{
|
||||
}
|
||||
|
||||
//top segment
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12;
|
||||
@@ -310,11 +335,13 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
|
||||
int frameSizeX = 16;
|
||||
int frameSizeY = 16;
|
||||
int frameSize = 16;
|
||||
int frameOff = 0;
|
||||
|
||||
Vector2 offset = new((xOff * 2) - (frameOff / 2), 0);
|
||||
Vector2 pos = TileCustomPosition(i, j) - offset;
|
||||
|
||||
Vector2 baseSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 26, 14);
|
||||
Vector2 treeSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 25, 14);
|
||||
Vector2 topSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 20, 16);
|
||||
|
||||
@@ -326,7 +353,7 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
{
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
DrawTreeSegments(i, j, baseTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
DrawTreeSegments(i, j, baseTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), baseSegmentOffset, false);
|
||||
}
|
||||
|
||||
//draw the different segments of the tree
|
||||
@@ -387,7 +414,7 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
Texture2D leftBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Left").Value;
|
||||
Texture2D rightBranchTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineRib3Right").Value;
|
||||
|
||||
Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 80, 14);
|
||||
Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 75, 14);
|
||||
Vector2 rightBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 4, 14);
|
||||
|
||||
DrawTreeSegments(i, j, leftBranchTex, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), leftBranchOffset, false);
|
||||
@@ -403,21 +430,21 @@ namespace CalamityMod.Tiles.Crags.Tree
|
||||
Texture2D topTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineTop").Value;
|
||||
int frame = tile.TileFrameY / 18;
|
||||
|
||||
DrawTreeSegments(i, j, topTex, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false);
|
||||
DrawTreeSegments(i, j - 1, topTex, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false);
|
||||
|
||||
//draw segments
|
||||
DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false);
|
||||
}
|
||||
|
||||
/*
|
||||
//keep this here for debugging
|
||||
Texture2D treeTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Tree/SpineTree").Value;
|
||||
|
||||
spriteBatch.Draw(treeTex, pos, new Rectangle(tile.TileFrameX + frameOff, tile.TileFrameY, frameSize, frameSizeY),
|
||||
new Color(col.R, col.G, col.B, 255), 0f, new Vector2(0, 0), 1f, SpriteEffects.None, 0f);
|
||||
*/
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
//this is where you can draw any glowmasks, if needed
|
||||
//literally all you have to do is copy all the code from predraw and just get the glowmask textures instead of the regular ones
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
+9
-1
@@ -307,6 +307,10 @@ namespace CalamityMod.World
|
||||
int realFossilY = 0;
|
||||
bool placedFossil = false;
|
||||
|
||||
//place islands to hide the fossil (funny)
|
||||
AbyssIsland(abyssChasmX + 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX - 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true);
|
||||
|
||||
while (!placedFossil)
|
||||
{
|
||||
//make sure it places at the very bottom, below where the terminus shrine is
|
||||
@@ -407,7 +411,7 @@ namespace CalamityMod.World
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(8))
|
||||
{
|
||||
int randomIsland = WorldGen.genRand.Next(2);
|
||||
int randomIsland = WorldGen.genRand.Next(3);
|
||||
switch (randomIsland)
|
||||
{
|
||||
case 0:
|
||||
@@ -416,6 +420,10 @@ namespace CalamityMod.World
|
||||
case 1:
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
break;
|
||||
case 2:
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
break;
|
||||
}
|
||||
|
||||
//increase y value so islands cant be spammed on top of each other
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace CalamityMod.World
|
||||
{
|
||||
float worldEdgeMargin = (float)Main.maxTilesX * 0.08f;
|
||||
int xLimit = Main.maxTilesX / 2;
|
||||
int x = Abyss.AtLeftSideOfWorld ? rand.Next(700, xLimit) : rand.Next(xLimit, Main.maxTilesX - 700);
|
||||
int x = Abyss.AtLeftSideOfWorld ? rand.Next(625, xLimit) : rand.Next(xLimit, Main.maxTilesX - 625);
|
||||
/*
|
||||
while ((float)x > (float)Main.spawnTileX - worldEdgeMargin && (float)x < (float)Main.spawnTileX + worldEdgeMargin)
|
||||
{
|
||||
|
||||
+18
-14
@@ -24,25 +24,27 @@ namespace CalamityMod.World
|
||||
|
||||
bool placedArchive = false;
|
||||
bool foundValidPosition = false;
|
||||
bool shouldPlaceTheDamnThing = false;
|
||||
int dungeonArchiveColor = 0; //0 = blue, 1 = green, 2 = pink
|
||||
|
||||
int heightLimit = (Main.maxTilesY / 2) + (Main.maxTilesY / 9);
|
||||
int heightLimit = (Main.maxTilesY / 2) + (Main.maxTilesY / 8);
|
||||
|
||||
int xMin = WorldGen.dungeonSide == -1 ? 5 : (Main.maxTilesX / 2) + 5;
|
||||
int xMax = WorldGen.dungeonSide == -1 ? (Main.maxTilesX / 2) - 5 : Main.maxTilesX - 5;
|
||||
|
||||
for (int x = xMin; x <= xMax; x++)
|
||||
for (int x = WorldGen.dungeonX - 100; x <= WorldGen.dungeonX + 100; x++)
|
||||
{
|
||||
for (int y = Main.maxTilesY - 5; y >= heightLimit; y--)
|
||||
for (int y = Main.maxTilesY - 200; y >= heightLimit; y--)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
Tile tileUp = Main.tile[x, y - 1];
|
||||
Tile tileUp2 = Main.tile[x, y - 2];
|
||||
Tile tileUp3 = Main.tile[x, y - 3];
|
||||
Tile tileDown = Main.tile[x, y + 1];
|
||||
|
||||
if ((tile.TileType == 41 || tile.TileType == 43 || tile.TileType == 44 || tile.TileType == 48) && !tileUp.HasTile)
|
||||
{
|
||||
//blue brick walls
|
||||
if (tileUp.WallType == 7 || tileUp.WallType == 94 || tileUp.WallType == 95)
|
||||
if ((tileUp.WallType == 7 || tileUp.WallType == 94 || tileUp.WallType == 95) &&
|
||||
(tileUp2.WallType == 7 || tileUp2.WallType == 94 || tileUp2.WallType == 95) &&
|
||||
(tileUp3.WallType == 7 || tileUp3.WallType == 94 || tileUp3.WallType == 95))
|
||||
{
|
||||
dungeonArchiveColor = 0;
|
||||
archiveX = x;
|
||||
@@ -51,7 +53,9 @@ namespace CalamityMod.World
|
||||
foundValidPosition = true;
|
||||
}
|
||||
//green brick walls
|
||||
if (tileUp.WallType == 8 || tileUp.WallType == 98 || tileUp.WallType == 99)
|
||||
if ((tileUp.WallType == 8 || tileUp.WallType == 98 || tileUp.WallType == 99) &&
|
||||
(tileUp2.WallType == 8 || tileUp2.WallType == 98 || tileUp2.WallType == 99) &&
|
||||
(tileUp3.WallType == 8 || tileUp3.WallType == 98 || tileUp3.WallType == 99))
|
||||
{
|
||||
dungeonArchiveColor = 1;
|
||||
archiveX = x;
|
||||
@@ -60,7 +64,9 @@ namespace CalamityMod.World
|
||||
foundValidPosition = true;
|
||||
}
|
||||
//pink brick walls
|
||||
if (tileUp.WallType == 9 || tileUp.WallType == 96 || tileUp.WallType == 97)
|
||||
if ((tileUp.WallType == 9 || tileUp.WallType == 96 || tileUp.WallType == 97) &&
|
||||
(tileUp2.WallType == 9 || tileUp2.WallType == 96 || tileUp2.WallType == 97) &&
|
||||
(tileUp3.WallType == 9 || tileUp3.WallType == 96 || tileUp3.WallType == 97))
|
||||
{
|
||||
dungeonArchiveColor = 2;
|
||||
archiveX = x;
|
||||
@@ -73,12 +79,10 @@ namespace CalamityMod.World
|
||||
//in order to make sure the archive places at the very bottom of the dungeon
|
||||
//loop upward a certain amount, and if it doesnt place reset everything and increase the maximum check height before the loop ends
|
||||
//this way it will keep checking upward so it places nicely and doesnt destroy other parts of the dungeon (or at least not as much)
|
||||
if (x >= Main.maxTilesX - 5 && y <= heightLimit + 5 && !foundValidPosition)
|
||||
if (x >= (WorldGen.dungeonX + 100) - 5 && y <= heightLimit + 5 && !foundValidPosition)
|
||||
{
|
||||
x = xMin;
|
||||
y = Main.maxTilesY - 5;
|
||||
|
||||
heightLimit = heightLimit - 2;
|
||||
x = WorldGen.dungeonX - 100;
|
||||
heightLimit -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user