Astral, Vines, and kelp effects
This commit is contained in:
1 parent
653bd506a7
commit
36a7671a43
7 files changed
+79
-11
No files matched your search
@@ -63,6 +63,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -493,6 +494,7 @@ namespace CalamityMod.CalPlayer
|
||||
int astralOreID = ModContent.TileType<AstralOre>();
|
||||
int auricOreID = ModContent.TileType<AuricOre>();
|
||||
int chaotiOreID = ModContent.TileType<ChaoticOre>();
|
||||
int abyssKelpID = ModContent.TileType<AbyssKelp>();
|
||||
|
||||
int auricRejectionDamage = 300;
|
||||
float auricRejectionKB = Player.noKnockback ? 20f : 40f;
|
||||
@@ -503,6 +505,19 @@ namespace CalamityMod.CalPlayer
|
||||
if (!tile.HasTile || !tile.HasUnactuatedTile)
|
||||
continue;
|
||||
|
||||
if (tile.TileType == abyssKelpID)
|
||||
{
|
||||
if (Player.velocity.Length() == 0)
|
||||
{ return; }
|
||||
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(Player.Center, 16, 16, 304, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
}
|
||||
|
||||
// Ores below here
|
||||
// Astral Ore inflicts Astral Infection briefly on contact
|
||||
if (tile.TileType == astralOreID)
|
||||
Player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 2);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 150 B |
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -34,6 +34,17 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (closer && Main.rand.NextBool(100) && j > Main.worldSurface)
|
||||
{
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, 304, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -45,6 +45,17 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
b = 30f / 255f;
|
||||
}
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (closer && Main.rand.NextBool(100) && j > Main.worldSurface)
|
||||
{
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, 304, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -45,6 +45,17 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
b = 30f / 255f;
|
||||
}
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (closer && Main.rand.NextBool(100) && j > Main.worldSurface)
|
||||
{
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, 304, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,17 @@ namespace CalamityMod.Tiles.Abyss
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (closer && Main.rand.NextBool(200) && j > Main.worldSurface)
|
||||
{
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, 304, 0.23255825f, 10f, 0, new Color(22, 255, 0), 1.5116279f)];
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
}
|
||||
}
|
||||
|
||||
// Ozzatron 01JUL2022: heavily refactored this code to not suck. also, sulphurous vines won't grow in honey anymore.
|
||||
private const int MaxVineHeight = 10;
|
||||
|
||||
+17
-8
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -40,6 +41,22 @@ namespace CalamityMod.Tiles.Ores
|
||||
TileID.Sets.ChecksForMerge[Type] = true;
|
||||
TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true;
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
if (closer && Main.rand.NextBool(60) && !up.HasTile && !up2.HasTile && j < Main.worldSurface)
|
||||
{
|
||||
//Cyan Cinders below
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, ModContent.DustType<AstralBlue>(), -0.4651165f, 0f, 17, new Color(0, 255, 244), 1.5f)];
|
||||
|
||||
//Orange Cinders below
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, ModContent.DustType<AstralOrange>(), -0.4651165f, 0f, 17, new Color(255, 255, 255), 1.5f)];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanKillTile(int i, int j, ref bool blockDamaged)
|
||||
{
|
||||
@@ -56,14 +73,6 @@ namespace CalamityMod.Tiles.Ores
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
if (Main.rand.Next(7) <= 2)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, 156, Main.rand.NextFloat(-0.05f, 0.05f), Main.rand.NextFloat(-0.05f, -0.001f));
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
float brightness = 0.7f;
|
||||
|
||||
Reference in new issue
Block a user