Sulph Sea Reformation 2.0 (Also see description)

Changed IL Editing changes to not use a constant index set, fixed the mechworm UUID implementation, added a wulfrum droid summon projectile clone, and added some items/chests alongside the new worldgen changes.
This commit is contained in:
DominicKarma42 committed 2020-04-12 03:13:32 -05:00
1 parent b333d832eb
commit eabfa51179
103 files changed
+3021 -557

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Placeables
{
public class EffigyOfDecayBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Effigy of Decay");
Description.SetDefault("The sulphuric waters empower you");
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().decayEffigy = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class RustyDroneBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Rusty Drone");
Description.SetDefault("A pitifully fragile drone is observing you");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<RustyDrone>()] > 0)
{
modPlayer.rustyDrone = true;
}
if (!modPlayer.rustyDrone)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

+22
View File
@@ -509,6 +509,7 @@ namespace CalamityMod.CalPlayer
public int hallowedRuneCooldown = 0;
public bool silvaWings = false;
public int icicleCooldown = 0;
public bool rustyMedal = false;
#endregion
#region Armor Set
@@ -663,6 +664,7 @@ namespace CalamityMod.CalPlayer
public int chiBuffTimer = 0;
public bool corrEffigy = false;
public bool crimEffigy = false;
public bool decayEffigy = false;
public bool rRage = false;
public bool tRegen = false;
public bool xRage = false;
@@ -825,6 +827,7 @@ namespace CalamityMod.CalPlayer
public bool necrosteocytesDudes = false;
public bool gammaHead = false;
public List<int> GammaCanisters = new List<int>();
public bool rustyDrone = false;
#endregion
#region Biome
@@ -1475,6 +1478,7 @@ namespace CalamityMod.CalPlayer
camper = false;
silvaWings = false;
corrosiveSpine = false;
rustyMedal = false;
daedalusReflect = false;
daedalusSplit = false;
@@ -1611,6 +1615,7 @@ namespace CalamityMod.CalPlayer
trinketOfChiBuff = false;
corrEffigy = false;
crimEffigy = false;
decayEffigy = false;
rRage = false;
xRage = false;
xWrath = false;
@@ -1779,6 +1784,7 @@ namespace CalamityMod.CalPlayer
brimseeker = false;
necrosteocytesDudes = false;
gammaHead = false;
rustyDrone = false;
abyssalDivingSuitPrevious = abyssalDivingSuit;
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
@@ -6188,6 +6194,22 @@ namespace CalamityMod.CalPlayer
}
}
if (rustyMedal)
{
if (item.ranged)
{
if (Main.rand.NextBool(8))
{
for (int i = 0; i < 3; i++)
{
Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.4f) * 1250f;
Vector2 directionToMouse = (startingPosition - Main.MouseWorld).SafeNormalize(Vector2.UnitY).RotatedByRandom(0.1f);
Projectile.NewProjectile(startingPosition, directionToMouse * 12f, ModContent.ProjectileType<ToxicannonDrop>(), (int)(damage * 0.3f), 0f, player.whoAmI);
}
}
}
}
return true;
}
#endregion
+7
View File
@@ -2241,6 +2241,13 @@ namespace CalamityMod.CalPlayer
}
}
// Effigy of Decay effects
if (modPlayer.decayEffigy)
{
player.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = true;
player.gills = true;
}
if (modPlayer.astralInjection)
{
if (player.statMana < player.statManaMax2)
Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

+7 -12
View File
@@ -1,14 +1,6 @@
using CalamityMod.Events;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoMod.Cil;
using MonoMod.Cil;
using System;
using System.Reflection;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
using static Mono.Cecil.Cil.OpCodes;
namespace CalamityMod.ILEditing
{
@@ -21,10 +13,13 @@ namespace CalamityMod.ILEditing
{
IL.Terraria.WorldGen.MakeDungeon += (il) =>
{
var cursor = new ILCursor(il)
var cursor = new ILCursor(il);
if (!cursor.TryGotoNext(i => i.MatchStsfld("Terraria.WorldGen", "dMaxY")))
{
Index = 45
};
CalamityMod.instance.Logger.Warn("Dungeon movement editing code failed.");
return;
}
cursor.Index++;
cursor.EmitDelegate<Action>(() =>
{
WorldGen.dungeonX += (WorldGen.dungeonX < Main.maxTilesX / 2).ToDirectionInt() * 450;
+30
View File
@@ -0,0 +1,30 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class RustyMedallion : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Rusty Medallion");
Tooltip.SetDefault("Causes most ranged weapons to sometimes release acid droplets from the sky");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 32;
item.rare = 1;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rustyMedal = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.Projectiles.Typeless;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
public class BrokenWaterFilter : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Broken Water Filter");
Tooltip.SetDefault("Releases a bunch of caustic tears\n" +
"More tears are released in the water");
}
public override void SetDefaults()
{
item.width = 14;
item.height = 28;
item.maxStack = 999;
item.consumable = true;
item.rare = 1;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useAnimation = item.useTime = 25;
item.noUseGraphic = true;
item.shootSpeed = 7f;
item.UseSound = SoundID.Item1;
item.shoot = ModContent.ProjectileType<BrokenWaterFilterSpewer>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

@@ -0,0 +1,33 @@
using CalamityMod.Tiles.Furniture;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture
{
public class EffigyOfDecay : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Effigy of Decay");
Tooltip.SetDefault("When placed down nearby players have their damage can breath underwater\n" +
"This effect does not work in the abyss\n" +
"Nearby players are also immune to the sulphuric poisoning");
}
public override void SetDefaults()
{
item.width = 22;
item.height = 32;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = Item.buyPrice(0, 9, 0, 0);
item.rare = 3;
item.createTile = ModContent.TileType<EffigyOfDecayPlaceable>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Abyss;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture
{
public class RustyChest : ModItem
{
public override void SetStaticDefaults()
{
}
public override void SetDefaults()
{
item.width = 26;
item.height = 22;
item.maxStack = 99;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = 500;
item.createTile = ModContent.TileType<RustyChestLocked>();
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Chest);
recipe.AddIngredient(ModContent.ItemType<SulfuricScale>(), 5);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

@@ -0,0 +1,36 @@
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public class HardenedSulphurousSandstone : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Hardened Sulphurous Sandstone");
}
public override void SetDefaults()
{
item.createTile = ModContent.TileType<Tiles.Abyss.SulphurousSand>();
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTurn = true;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.consumable = true;
item.width = 16;
item.height = 16;
item.maxStack = 999;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddTile(18);
recipe.AddIngredient(ModContent.ItemType<Walls.HardenedSulphurousSandstoneWall>(), 4);
recipe.SetResult(this);
recipe.AddRecipe();
base.AddRecipes();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

@@ -0,0 +1,36 @@
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
namespace CalamityMod.Items.Placeables.Walls
{
public class HardenedSulphurousSandstoneWall : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Hardened Sulphurous Sandstone Wall");
}
public override void SetDefaults()
{
item.createWall = ModContent.WallType<WallTiles.HardenedSulphurousSandstoneWall>();
item.useStyle = 1;
item.useTurn = true;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.consumable = true;
item.width = 16;
item.height = 16;
item.maxStack = 999;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddTile(18);
recipe.AddIngredient(ModContent.ItemType<HardenedSulphurousSandstone>());
recipe.SetResult(this, 4);
recipe.AddRecipe();
base.AddRecipes();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

+30
View File
@@ -0,0 +1,30 @@
using CalamityMod.Items.Materials;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
public class RustyLockpick : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("Opens locked rusty chests");
}
public override void SetDefaults()
{
item.width = 14;
item.height = 28;
item.maxStack = 99;
item.rare = 1;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SulfuricScale>(), 15);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

@@ -0,0 +1,45 @@
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Summon
{
public class RustyBeaconPrototype : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Rusty Beacon Prototype");
Tooltip.SetDefault("Summons a long-abandoned drone to support you\n" +
"Clicking on an enemy gives them a tiny prick, causing them to become aggravated\n" +
"The drone hovers above nearby enemies and gives them various debuffs");
}
public override void SetDefaults()
{
item.mana = 10;
item.width = 28;
item.height = 20;
item.useTime = item.useAnimation = 35;
item.useStyle = 4;
item.noMelee = true;
item.knockBack = 0.5f;
item.value = CalamityGlobalItem.Rarity1BuyPrice;
item.rare = 1;
item.UseSound = SoundID.Item15; // Phaseblade sound effect
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<RustyDrone>();
item.shootSpeed = 10f;
item.summon = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.altFunctionUse != 2)
{
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 1f);
}
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

+25 -75
View File
@@ -65,46 +65,19 @@ namespace CalamityMod.Items.Weapons.Summon
maxMinionScale = 10;
}
damage = (int)(damage * ((player.minionDamage * 5 / 3) + (player.minionDamage * 0.46f * (maxMinionScale - 1))));
int owner = player.whoAmI;
float num72 = item.shootSpeed;
player.itemTime = item.useTime;
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default);
Vector2 vector3 = Main.MouseWorld - vector2;
float velX = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
float velY = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
if (player.gravDir == -1f)
{
velY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float dist = (float)Math.Sqrt((double)(velX * velX + velY * velY));
if ((float.IsNaN(velX) && float.IsNaN(velY)) || (velX == 0f && velY == 0f))
{
velX = (float)player.direction;
velY = 0f;
dist = num72;
}
else
{
dist = num72 / dist;
}
velX *= dist;
velY *= dist;
int head = -1;
int tail = -1;
int typeHead = ModContent.ProjectileType<MechwormHead>();
int typeTail = ModContent.ProjectileType<MechwormTail>();
for (int i = 0; i < Main.maxProjectiles; i++)
for (int num187 = 0; num187 < Main.projectile.Length; num187++)
{
if (Main.projectile[i].active && Main.projectile[i].owner == owner)
if (Main.projectile[num187].active && Main.projectile[num187].owner == Main.myPlayer)
{
if (head == -1 && Main.projectile[i].type == typeHead)
if (head == -1 && Main.projectile[num187].type == ModContent.ProjectileType<MechwormHead>())
{
head = i;
head = num187;
}
else if (tail == -1 && Main.projectile[i].type == typeTail)
if (tail == -1 && Main.projectile[num187].type == ModContent.ProjectileType<MechwormTail>())
{
tail = i;
tail = num187;
}
if (head != -1 && tail != -1)
{
@@ -114,53 +87,30 @@ namespace CalamityMod.Items.Weapons.Summon
}
if (head == -1 && tail == -1)
{
float num77 = Vector2.Dot(value, vector3);
if (num77 > 0f)
{
player.ChangeDir(1);
}
else
{
player.ChangeDir(-1);
}
velX = 0f;
velY = 0f;
vector2.X = (float)Main.mouseX + Main.screenPosition.X;
vector2.Y = (float)Main.mouseY + Main.screenPosition.Y;
int curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormHead>(), damage, knockBack, owner);
speedX = 0f;
speedY = 0f;
position.X = (float)Main.mouseX + Main.screenPosition.X;
position.Y = (float)Main.mouseY + Main.screenPosition.Y;
int curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<MechwormBody>(), damage, knockBack, player.whoAmI, curr, 0f);
int head2 = curr;
int prev = curr;
curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormBody>(), damage, knockBack, owner, (float)prev);
Main.projectile[curr].identity = head2;
prev = curr;
curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormBody2>(), damage, knockBack, owner, (float)prev);
Main.projectile[prev].localAI[1] = (float)curr;
Main.projectile[prev].netUpdate = true;
Main.projectile[curr].identity = head2;
prev = curr;
curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormTail>(), damage, knockBack, owner, (float)prev);
Main.projectile[prev].localAI[1] = (float)curr;
Main.projectile[prev].netUpdate = true;
curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<MechwormBody2>(), damage, knockBack, player.whoAmI, curr, 0f);
Main.projectile[head2].localAI[1] = curr;
head2 = curr;
curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<MechwormTail>(), damage, knockBack, player.whoAmI, curr, 0f);
Main.projectile[head2].localAI[1] = curr;
}
else if (head != -1 && tail != -1)
{
float uuid = (float)Projectile.GetByUUID(Main.myPlayer, Main.projectile[tail].ai[0]);
int body = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormBody>(), damage, knockBack, owner, uuid);
int back = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType<MechwormBody2>(), damage, knockBack, owner, (float)body);
Main.projectile[body].localAI[1] = (float)back;
Main.projectile[body].ai[1] = 1f;
int body = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<MechwormBody>(), damage, knockBack, player.whoAmI, Projectile.GetByUUID(Main.myPlayer, Main.projectile[tail].ai[0]), 0f);
int body2 = body;
body = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<MechwormBody2>(), damage, knockBack, player.whoAmI, body, 0f);
Main.projectile[body2].localAI[1] = body;
Main.projectile[body2].netUpdate = true;
Main.projectile[body2].ai[1] = 1f;
Main.projectile[body].localAI[1] = tail;
Main.projectile[body].netUpdate = true;
Main.projectile[body].identity = head;
Main.projectile[back].localAI[1] = (float)tail;
Main.projectile[back].netUpdate = true;
Main.projectile[back].ai[1] = 1f;
Main.projectile[body].identity = head;
Main.projectile[body].ai[1] = 1f;
Main.projectile[tail].ai[0] = Main.projectile[body].projUUID;
Main.projectile[tail].netUpdate = true;
Main.projectile[tail].ai[1] = 1f;
+90
View File
@@ -0,0 +1,90 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.NPCs.Abyss
{
public class MicrobialCluster : ModNPC
{
public const int ChargeRate = 120;
public const int SlowdownTime = 45;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Microbial Cluster");
}
public override void SetDefaults()
{
npc.noGravity = true;
npc.damage = 0;
npc.width = 24;
npc.height = 24;
npc.lifeMax = 5;
npc.aiStyle = aiType = -1;
for (int k = 0; k < npc.buffImmune.Length; k++)
{
npc.buffImmune[k] = true;
}
npc.noTileCollide = false;
npc.noGravity = true;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
npc.dontTakeDamageFromHostiles = true;
npc.knockBackResist = 0f;
}
public override void AI()
{
if (npc.collideX || npc.collideY)
{
npc.velocity *= -1f;
npc.netUpdate = true;
}
DelegateMethods.v3_1 = Color.GreenYellow.ToVector3() * 2f;
Utils.PlotTileLine(npc.Center, npc.Center + npc.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen));
npc.ai[0]++;
if (npc.ai[0] % SlowdownTime > SlowdownTime - SlowdownTime)
{
npc.velocity *= 0.98f;
}
if (npc.ai[0] % SlowdownTime == SlowdownTime - 1)
{
npc.velocity = npc.velocity.SafeNormalize(-Vector2.UnitY).RotatedByRandom(MathHelper.PiOver4) * 4f;
}
if (npc.ai[0] % 32f == 31f)
{
Dust dust = Dust.NewDustPerfect(npc.Center, (int)CalamityDusts.SulfurousSeaAcid);
dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1f, 2f);
dust.noGravity = true;
dust.scale = 1.6f;
}
}
public override float SpawnChance(NPCSpawnInfo spawnInfo) => spawnInfo.player.InSulphur() && spawnInfo.water ? 0.4f : 0f;
public override void NPCLoot()
{
}
public override void HitEffect(int hitDirection, double damage)
{
if (npc.life <= 0)
{
for (int k = 0; k < 6; k++)
{
Dust dust = Dust.NewDustPerfect(npc.Center, (int)CalamityDusts.SulfurousSeaAcid);
dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1f, 2f);
dust.scale = 1.2f;
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

-1
View File
@@ -3,7 +3,6 @@ using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
namespace CalamityMod.Projectiles.Ranged
+1 -1
View File
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.ai[1] = 0f;
projectile.netUpdate = true;
}
int chase = (int)projectile.ai[0];
int chase = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]);
float num1064;
float scaleFactor17;
float scaleFactor18;
+1 -1
View File
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.ai[1] = 0f;
projectile.netUpdate = true;
}
int chase = (int)projectile.ai[0];
int chase = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]);
float num1064;
float scaleFactor17;
float scaleFactor18;
+80
View File
@@ -0,0 +1,80 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class RustShrapnel : ModProjectile
{
public bool HitTile = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shrapnel");
Main.projFrames[projectile.type] = 3;
ProjectileID.Sets.TrailCacheLength[projectile.type] = 4;
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
}
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 14;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.timeLeft = 180;
projectile.tileCollide = true;
projectile.minionSlots = 0f;
projectile.minion = true;
}
public override void AI()
{
projectile.ai[0] += 1f;
if (HitTile)
{
projectile.velocity.X = 0f;
projectile.rotation = MathHelper.Pi;
}
else
{
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
projectile.velocity.Y += 0.4f;
projectile.velocity.X *= 0.96f;
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
HitTile = true;
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
projectile.Kill();
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
projectile.Kill();
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 15; i++)
{
Dust dust = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid);
dust.velocity = Vector2.One.RotatedBy(i / 15f * MathHelper.TwoPi) * 3f * (float)Math.Cos(i / 15f * MathHelper.TwoPi);
dust.scale = 2.5f;
dust.noGravity = true;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

+150
View File
@@ -0,0 +1,150 @@
using CalamityMod.Buffs.Summon;
using CalamityMod.Buffs.Cooldowns;
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class RustyDrone : ModProjectile
{
public const float PlayerHomingInertia = 32f;
public const float PlayerHomingSpeed = 11f;
public const float NPCHomingInertia = 20f;
public const float NPCHomingSpeed = 14f;
public const float AttackRate = 110f;
public const float DistanceToCheck = 750f;
public const int ExplosionShrapnelBaseDamage = 16; // Uses player.MinionDamage
public const int ResummonCooldownTime = 60 * 3;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Rusty Drone");
Main.projFrames[projectile.type] = 12;
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
}
public override void SetDefaults()
{
projectile.width = 36;
projectile.height = 30;
projectile.netImportant = true;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.minionSlots = 1f;
projectile.timeLeft = 18000;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft *= 5;
projectile.minion = true;
projectile.alpha = 255;
}
public override void AI()
{
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
if (projectile.localAI[0] == 0f)
{
int oldDamage = projectile.damage;
projectile.damage = 1; // For the initial tiny prick effect
projectile.Damage();
projectile.damage = oldDamage;
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
projectile.Center -= Vector2.UnitY * 1400f;
projectile.localAI[0] += 1f;
}
if (projectile.alpha > 0)
{
projectile.alpha = (int)MathHelper.Lerp(projectile.alpha, 0f, 0.02f);
projectile.velocity = Vector2.UnitY * 10f;
}
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
{
int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
projectile.Calamity().spawnedPlayerMinionDamageValue *
player.MinionDamage());
projectile.damage = trueDamage;
}
projectile.frameCounter++;
if (projectile.frameCounter > 8)
{
projectile.frame++;
projectile.frameCounter = 0;
}
bool isCorrectProjectile = projectile.type == ModContent.ProjectileType<RustyDrone>();
player.AddBuff(ModContent.BuffType<RustyDroneBuff>(), 3600);
if (isCorrectProjectile)
{
if (player.dead)
{
modPlayer.rustyDrone = false;
}
if (modPlayer.rustyDrone)
{
projectile.timeLeft = 2;
}
}
NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player);
if (potentialTarget == null)
{
if (projectile.Distance(player.Center) > 120f)
{
projectile.velocity = (projectile.velocity * PlayerHomingInertia + projectile.DirectionTo(player.Top) * PlayerHomingSpeed) / (PlayerHomingInertia + 1);
}
if (projectile.frame >= 8)
{
projectile.frame = 0;
}
}
else
{
// A bit above the target, and always on the opposite side of the target's sprite direction.
Vector2 destination = potentialTarget.Top + Vector2.UnitX * -potentialTarget.spriteDirection * Main.rand.NextFloat(50f, 75f) - Vector2.UnitY * 42f;
projectile.velocity = (projectile.velocity * NPCHomingInertia + projectile.DirectionTo(destination) * NPCHomingSpeed) / (NPCHomingInertia + 1);
if (projectile.frame < 8)
{
projectile.frame = 8;
}
if (projectile.frame >= Main.projFrames[projectile.type])
{
projectile.frame = 8;
}
if (projectile.Distance(destination) < 55f)
{
if (projectile.ai[0]++ % AttackRate == AttackRate - 1)
{
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(potentialTarget.Center, Vector2.Zero, ModContent.ProjectileType<RustyDroneTargetIndicator>(), 0, 0f, projectile.owner, projectile.whoAmI, potentialTarget.whoAmI);
}
}
}
}
projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt();
projectile.rotation = projectile.velocity.X * 0.05f;
projectile.ai[1]++;
if (projectile.ai[1] >= 360f)
{
Utils.PoofOfSmoke(projectile.Center);
for (int i = 0; i < 4; i++)
{
Projectile.NewProjectile(projectile.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 8f, ModContent.ProjectileType<RustShrapnel>(),
(int)(ExplosionShrapnelBaseDamage * player.MinionDamage()), 2f, projectile.owner);
}
projectile.Kill();
}
}
public override bool CanDamage() => projectile.localAI[0] == 0f; // Only do damage from the initial 1 damage prick, and never again. This is a support summon.
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,94 @@
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class RustyDroneTargetIndicator : ModProjectile
{
public float Outwardness = 45f;
public Vector2 DeltaPositionRelativetoTarget = Vector2.Zero;
public const int BuffTime = 180;
public const float TurnRate = 30f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Target Indicator");
ProjectileID.Sets.MinionShot[projectile.type] = true;
}
public override void SetDefaults()
{
projectile.width = 34;
projectile.height = 34;
projectile.tileCollide = false;
projectile.friendly = true;
projectile.minion = true;
projectile.minionSlots = 0f;
projectile.ignoreWater = true;
projectile.penetrate = 1;
projectile.timeLeft = 600;
projectile.alpha = 50;
}
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(Outwardness);
writer.WriteVector2(DeltaPositionRelativetoTarget);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
Outwardness = reader.ReadSingle();
DeltaPositionRelativetoTarget = reader.ReadVector2();
}
public override void AI()
{
if (projectile.ai[0] < 0 || projectile.ai[0] >= Main.projectile.Length || projectile.ai[1] < 0 || projectile.ai[1] >= Main.npc.Length)
{
projectile.Kill();
return;
}
if (Main.projectile[(int)projectile.ai[0]].type != ModContent.ProjectileType<RustyDrone>() ||
!Main.projectile[(int)projectile.ai[0]].active)
{
projectile.Kill();
}
if (!Main.npc[(int)projectile.ai[1]].active)
{
projectile.Kill();
}
projectile.Center = Vector2.Lerp(projectile.Center, Main.npc[(int)projectile.ai[1]].Center + DeltaPositionRelativetoTarget * Outwardness, 3f / TurnRate);
if (projectile.localAI[0] == 0f)
{
DeltaPositionRelativetoTarget = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi);
projectile.localAI[0] = 1f;
}
projectile.localAI[1]++;
if (projectile.localAI[1] % TurnRate == TurnRate - 1f)
{
Outwardness *= 0.6f;
DeltaPositionRelativetoTarget = DeltaPositionRelativetoTarget.RotatedByRandom(MathHelper.PiOver4);
projectile.scale = 1.5f;
projectile.netUpdate = true;
}
if (projectile.scale > 1f && Outwardness > 4f)
{
projectile.scale = MathHelper.Lerp(projectile.scale, 1f, 0.025f);
}
else if (Outwardness <= 4f)
{
Outwardness *= 0.935f;
if (projectile.timeLeft > 40)
{
projectile.timeLeft = 40;
Main.npc[(int)projectile.ai[1]].AddBuff(BuffID.Poisoned, BuffTime);
Main.npc[(int)projectile.ai[1]].AddBuff(ModContent.BuffType<Irradiated>(), BuffTime);
}
projectile.alpha = (int)MathHelper.Lerp(projectile.alpha, 255f, 1f / 40f);
projectile.scale += 0.05f;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

@@ -189,9 +189,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool CanDamage()
{
return false;
}
public override bool CanDamage() => false;
}
}
+58
View File
@@ -0,0 +1,58 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class WulfrumBoltMinion : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bolt");
ProjectileID.Sets.MinionShot[projectile.type] = true;
}
public override void SetDefaults()
{
projectile.width = 8;
projectile.height = 8;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.penetrate = 1;
projectile.extraUpdates = 1;
projectile.minionSlots = 0f;
projectile.minion = true;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.1f / 255f, 0f);
for (int num151 = 0; num151 < 3; num151++)
{
int num154 = 14;
int num155 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num154 * 2, projectile.height - num154 * 2, 61, 0f, 0f, 100, default, 3f);
Main.dust[num155].noGravity = true;
Main.dust[num155].noLight = true;
Main.dust[num155].velocity *= 0.1f;
Main.dust[num155].velocity += projectile.velocity * 0.5f;
}
if (Main.rand.NextBool(8))
{
int num156 = 16;
int num157 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num156 * 2, projectile.height - num156 * 2, 61, 0f, 0f, 100, default, 2.25f);
Main.dust[num157].velocity *= 0.25f;
Main.dust[num157].noLight = true;
Main.dust[num157].velocity += projectile.velocity * 0.5f;
return;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D tex = Main.projectileTexture[projectile.type];
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

+1 -5
View File
@@ -225,12 +225,8 @@ namespace CalamityMod.Projectiles.Summon
Vector2 vec = vector2_3 - projectile.Center;
vec.Normalize();
Vector2 vec2 = vec * 10f;
int bolt = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vec2.X, vec2.Y, ModContent.ProjectileType<WulfrumBolt>(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f);
Main.projectile[bolt].Calamity().forceMinion = true;
int bolt = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vec2.X, vec2.Y, ModContent.ProjectileType<WulfrumBoltMinion>(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f);
Main.projectile[bolt].netUpdate = true;
Main.projectile[bolt].penetrate = 1;
Main.projectile[bolt].extraUpdates = 1;
ProjectileID.Sets.MinionShot[Main.projectile[bolt].type] = true;
projectile.netUpdate = true;
}
@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using CalamityMod.Items.SummonItems.Invasion;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class BrokenWaterFilterSpewer : ModProjectile
{
public const int TimeLeft = 180;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Star");
}
public override void SetDefaults()
{
projectile.width = 24;
projectile.height = 24;
projectile.friendly = true;
projectile.timeLeft = TimeLeft;
projectile.penetrate = 1;
projectile.tileCollide = false;
}
public override void AI()
{
projectile.velocity *= 0.98f;
int totalTearCount = projectile.wet ? 5 : 3;
totalTearCount++;
if (projectile.ai[0]++ >= TimeLeft / totalTearCount)
{
Item.NewItem(projectile.Center, ModContent.ItemType<CausticTear>());
projectile.ai[0] = 0;
}
projectile.rotation = projectile.rotation.AngleTowards(MathHelper.PiOver4, 0.04f);
Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.SulfurousSeaAcid);
dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1.5f, 3f);
dust.noGravity = true;
dust.scale = 1.3f;
}
public override bool CanDamage() => false;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

+101
View File
@@ -0,0 +1,101 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.Abyss
{
public class HardenedSulphurousSandstone : ModTile
{
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.MergeWithAbyss(Type);
dustType = 32;
drop = ModContent.ItemType<Items.Placeables.HardenedSulphurousSandstone>();
AddMapEntry(new Color(76, 58, 59));
mineResist = 1f;
minPick = 55;
soundType = 0;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() &&
CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType<SulphurousVines>())
{
WorldGen.KillTile(i, j + 1);
}
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AbyssGravel>(), false, false, false, false, resetFrame);
return false;
}
public override void RandomUpdate(int i, int j)
{
int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143));
int nearbyVineCount = 0;
for (int x = i - 15; x <= i + 15; x++)
{
for (int y = j - 15; y <= j + 15; y++)
{
if (WorldGen.InWorld(x, y))
{
if (CalamityUtils.ParanoidTileRetrieval(x, y).active() &&
CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType<SulphurousVines>())
{
nearbyVineCount++;
}
}
}
}
if (Main.tile[i, j + 1] != null && nearbyVineCount < 5)
{
if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType<SulphurousVines>())
{
if (Main.tile[i, j + 1].liquid == 255 &&
!Main.tile[i, j + 1].lava())
{
bool flag13 = false;
for (int num52 = num8; num52 > num8 - 10; num52--)
{
if (Main.tile[i, num52].bottomSlope())
{
flag13 = false;
break;
}
if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope())
{
flag13 = true;
break;
}
}
if (flag13)
{
int num53 = i;
int num54 = j + 1;
Main.tile[num53, num54].type = (ushort)ModContent.TileType<SulphurousVines>();
Main.tile[num53, num54].active(true);
WorldGen.SquareTileFrame(num53, num54, true);
if (Main.netMode == 2)
{
NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None);
}
}
}
Main.tile[i, j].slope(0);
Main.tile[i, j].halfBrick(false);
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+124
View File
@@ -0,0 +1,124 @@
using CalamityMod.Dusts;
using CalamityMod.Items;
using CalamityMod.Items.Placeables.Furniture;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.Abyss
{
public class RustyChestLocked : ModTile
{
public override void SetDefaults()
{
this.SetUpChest();
ModTranslation name = CreateMapEntryName("chestRusty");
name.SetDefault("Rusty Chest");
AddMapEntry(new Color(57, 48, 83), name, MapChestName);
dustType = ModContent.DustType<AstralBasic>();
disableSmartCursor = true;
adjTiles = new int[] { TileID.Containers };
chest = "Rusty Chest";
chestDrop = ModContent.ItemType<RustyChest>();
}
public override bool HasSmartInteract() => true;
public override bool IsLockedChest(int i, int j) => Main.tile[i, j].frameX / 36 == 1;
public override bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual)
{
Player closest = Main.player[Player.FindClosest(new Vector2(i, j) * 16f, 1, 1)];
if (!closest.InventoryHas(ModContent.ItemType<RustyLockpick>()))
return false;
for (int k = 0; k < closest.inventory.Length; k++)
{
if (closest.inventory[k].type == ModContent.ItemType<RustyLockpick>())
{
if (ItemLoader.ConsumeItem(closest.inventory[k], closest))
{
closest.inventory[k].stack--;
}
if (closest.inventory[k].stack <= 0)
{
closest.inventory[k] = new Item();
}
break;
}
}
dustType = this.dustType;
return true;
}
public string MapChestName(string name, int i, int j)
{
// Bounds check
if (i < 0 || i >= Main.maxTilesX || j < 0 || j >= Main.maxTilesY)
return name;
// Tile null check
Tile tile = Main.tile[i, j];
if (tile is null)
return name;
int left = i;
int top = j;
if (tile.frameX % 36 != 0)
left--;
if (tile.frameY != 0)
top--;
int chest = Chest.FindChest(left, top);
return name + (Main.chest[chest].name != "" ? ": " + Main.chest[chest].name : "");
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = 1;
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 32, 32, chestDrop);
Chest.DestroyChest(i, j);
}
public override bool NewRightClick(int i, int j)
{
Tile tile = Main.tile[i, j];
int left = i;
int top = j;
if (tile.frameX % 36 != 0)
{
left--;
}
if (tile.frameY != 0)
{
top--;
}
return CalamityUtils.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
}
public override void MouseOver(int i, int j)
{
if (IsLockedChest(i, j))
CalamityUtils.ChestMouseOver<RustyLockpick>("Rusty Chest", i, j);
else
CalamityUtils.ChestMouseOver<RustyChest>("Rusty Chest", i, j);
}
public override void MouseOverFar(int i, int j)
{
if (IsLockedChest(i, j))
CalamityUtils.ChestMouseFar<RustyLockpick>("Rusty Chest", i, j);
else
CalamityUtils.ChestMouseFar<RustyChest>("Rusty Chest", i, j);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite1 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.Origin = new Point16(0, 1);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite2 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.Origin = new Point16(0, 1);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite3 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 2);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite4 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 2);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

@@ -0,0 +1,47 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite5 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 4;
TileObjectData.newTile.Origin = new Point16(0, 3);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

@@ -0,0 +1,47 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalacmite6 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 4;
TileObjectData.newTile.Origin = new Point16(0, 3);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalacmite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite1 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite2 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite3 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite4 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

@@ -0,0 +1,47 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite5 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 4;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss.Stalactite
{
public class SulphurousStalactite6 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 4;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Stalactite");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.Abyss
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.newTile.DrawYOffset = 4;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Geyser");
+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphuricFossil1 : ModTile
{
public override void SetDefaults()
{
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
Main.tileWaterDeath[Type] = false;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Fossil");
AddMapEntry(new Color(113, 90, 71), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphuricFossil2 : ModTile
{
public override void SetDefaults()
{
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
Main.tileWaterDeath[Type] = false;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Fossil");
AddMapEntry(new Color(113, 90, 71), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphuricFossil3 : ModTile
{
public override void SetDefaults()
{
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
Main.tileWaterDeath[Type] = false;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Fossil");
AddMapEntry(new Color(113, 90, 71), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

+57
View File
@@ -0,0 +1,57 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousColumn : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileSolid[Type] = false;
Main.tileSolidTop[Type] = true;
TileObjectData.newTile.Width = 2;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(1, 2);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
AddMapEntry(new Color(150, 100, 50), name);
name.SetDefault("Column");
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
for (int k = 0; k < WorldGen.genRand.Next(3, 4 + 1); k++)
{
Gore.NewGore(new Vector2(i, j) * 16f,
Vector2.One.RotatedByRandom(MathHelper.TwoPi) * WorldGen.genRand.NextFloat(1.4f, 3.2f),
mod.GetGoreSlot($"Gores/SulphSeaGen/SulphurousRockGore{WorldGen.genRand.Next(3) + 1}"));
}
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+47
View File
@@ -0,0 +1,47 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousRib1 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 4;
TileObjectData.newTile.Origin = new Point16(0, 3);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Ribs");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

+46
View File
@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousRib2 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 2);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Ribs");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

+45
View File
@@ -0,0 +1,45 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousRib3 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 2;
TileObjectData.newTile.Origin = new Point16(0, 1);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Ribs");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

+46
View File
@@ -0,0 +1,46 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousRib4 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.Origin = new Point16(0, 2);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16,
16,
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Ribs");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

+44
View File
@@ -0,0 +1,44 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousRib5 : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
TileObjectData.newTile.Width = 1;
TileObjectData.newTile.Height = 1;
TileObjectData.newTile.Origin = new Point16(0, 0);
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
TileObjectData.newTile.UsesCustomCanPlace = true;
TileObjectData.newTile.CoordinateHeights = new int[]
{
16
};
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.newTile.WaterDeath = false;
TileObjectData.newTile.LavaDeath = true;
TileObjectData.newTile.DrawYOffset = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Ribs");
AddMapEntry(new Color(57, 48, 83), name);
dustType = (int)CalamityDusts.SulfurousSeaAcid;
base.SetDefaults();
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 2;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

+63
View File
@@ -114,6 +114,14 @@ namespace CalamityMod.Tiles.Abyss
}
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() &&
CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType<SulphurousVines>())
{
WorldGen.KillTile(i, j + 1);
}
}
public override void RandomUpdate(int i, int j)
{
int tileLocationY = j - 1;
@@ -184,6 +192,61 @@ namespace CalamityMod.Tiles.Abyss
}
}
}
int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143));
int nearbyVineCount = 0;
for (int x = i - 15; x <= i + 15; x++)
{
for (int y = j - 15; y <= j + 15; y++)
{
if (WorldGen.InWorld(x, y))
{
if (CalamityUtils.ParanoidTileRetrieval(x, y).active() &&
CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType<SulphurousVines>())
{
nearbyVineCount++;
}
}
}
}
if (Main.tile[i, j + 1] != null && nearbyVineCount < 5)
{
if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType<SulphurousVines>())
{
if (Main.tile[i, j + 1].liquid == 255 &&
!Main.tile[i, j + 1].lava())
{
bool flag13 = false;
for (int num52 = num8; num52 > num8 - 10; num52--)
{
if (Main.tile[i, num52].bottomSlope())
{
flag13 = false;
break;
}
if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope())
{
flag13 = true;
break;
}
}
if (flag13)
{
int num53 = i;
int num54 = j + 1;
Main.tile[num53, num54].type = (ushort)ModContent.TileType<SulphurousVines>();
Main.tile[num53, num54].active(true);
WorldGen.SquareTileFrame(num53, num54, true);
if (Main.netMode == 2)
{
NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None);
}
}
Main.tile[i, j].slope(0);
Main.tile[i, j].halfBrick(false);
}
}
}
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
+66 -2
View File
@@ -1,6 +1,6 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.Abyss
@@ -27,11 +27,75 @@ namespace CalamityMod.Tiles.Abyss
{
num = fail ? 1 : 3;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() &&
CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType<SulphurousVines>())
{
WorldGen.KillTile(i, j + 1);
}
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AbyssGravel>(), false, false, false, false, resetFrame);
return false;
}
public override void RandomUpdate(int i, int j)
{
int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143));
int nearbyVineCount = 0;
for (int x = i - 15; x <= i + 15; x++)
{
for (int y = j - 15; y <= j + 15; y++)
{
if (WorldGen.InWorld(x, y))
{
if (CalamityUtils.ParanoidTileRetrieval(x, y).active() &&
CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType<SulphurousVines>())
{
nearbyVineCount++;
}
}
}
}
if (Main.tile[i, j + 1] != null && nearbyVineCount < 5)
{
if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType<SulphurousVines>())
{
if (Main.tile[i, j + 1].liquid == 255 &&
!Main.tile[i, j + 1].lava())
{
bool flag13 = false;
for (int num52 = num8; num52 > num8 - 10; num52--)
{
if (Main.tile[i, num52].bottomSlope())
{
flag13 = false;
break;
}
if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope())
{
flag13 = true;
break;
}
}
if (flag13)
{
int num53 = i;
int num54 = j + 1;
Main.tile[num53, num54].type = (ushort)ModContent.TileType<SulphurousVines>();
Main.tile[num53, num54].active(true);
WorldGen.SquareTileFrame(num53, num54, true);
if (Main.netMode == 2)
{
NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None);
}
}
Main.tile[i, j].slope(0);
Main.tile[i, j].halfBrick(false);
}
}
}
}
}
}
+96
View File
@@ -0,0 +1,96 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.Abyss
{
public class SulphurousVines : ModTile
{
public override void SetDefaults()
{
Main.tileCut[Type] = true;
Main.tileBlockLight[Type] = true;
Main.tileLavaDeath[Type] = true;
Main.tileNoFail[Type] = true;
ModTranslation name = CreateMapEntryName();
name.SetDefault("Sulphurous Vines");
AddMapEntry(new Color(0, 50, 0), name);
soundType = 6;
dustType = 2;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
//GIVE VINE ROPE IF SPECIAL VINE BOOK
if (WorldGen.genRand.Next(2) == 0 && Main.player[(int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16)].cordage)
{
Item.NewItem(new Vector2(i * 16 + 8f, j * 16 + 8f), ItemID.VineRope);
}
if (Main.tile[i, j + 1] != null)
{
if (Main.tile[i, j + 1].active())
{
if (Main.tile[i, j + 1].type == ModContent.TileType<SulphurousVines>())
{
WorldGen.KillTile(i, j + 1, false, false, false);
if (!Main.tile[i, j + 1].active() && Main.netMode != NetmodeID.SinglePlayer)
{
NetMessage.SendData(17, -1, -1, null, 0, (float)i, (float)j + 1, 0f, 0, 0, 0);
}
}
}
}
}
public override void RandomUpdate(int i, int j)
{
if (Main.tile[i, j + 1] != null)
{
if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType<SulphurousVines>())
{
if (Main.tile[i, j + 1].liquid >= 128 && !Main.tile[i, j + 1].lava())
{
bool flag13 = false;
for (int num52 = j; num52 > j - 10; j--)
{
if (Main.tile[i, num52].bottomSlope())
{
flag13 = false;
break;
}
if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope())
{
flag13 = true;
break;
}
}
if (flag13)
{
int num53 = i;
int num54 = j + 1;
Main.tile[num53, num54].type = (ushort)ModContent.TileType<SulphurousVines>();
Main.tile[num53, num54].frameX = (short)(WorldGen.genRand.Next(8) * 18);
Main.tile[num53, num54].frameY = (short)(4 * 18);
Main.tile[num53, num54 - 1].frameX = (short)(WorldGen.genRand.Next(12) * 18);
Main.tile[num53, num54 - 1].frameY = (short)(WorldGen.genRand.Next(4) * 18);
Main.tile[num53, num54].active(true);
WorldGen.SquareTileFrame(num53, num54, true);
WorldGen.SquareTileFrame(num53, num54 - 1, true);
if (Main.netMode == NetmodeID.Server)
{
NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None);
NetMessage.SendTileSquare(-1, num53, num54 - 1, 3, TileChangeType.None);
}
}
}
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

+39
View File
@@ -0,0 +1,39 @@
using CalamityMod.Buffs.Placeables;
using CalamityMod.Items.Placeables.Furniture;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Furniture
{
public class EffigyOfDecayPlaceable : ModTile
{
public override void SetDefaults()
{
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4);
TileObjectData.newTile.Width = 2;
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Effigy of Decay");
AddMapEntry(new Color(113, 90, 71), name);
}
public override void NearbyEffects(int i, int j, bool closer)
{
Player player = Main.LocalPlayer;
if (player is null)
return;
if (!player.dead && player.active)
player.AddBuff(ModContent.BuffType<EffigyOfDecayBuff>(), 20);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType<EffigyOfDecay>());
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+22
View File
@@ -0,0 +1,22 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
public class HardenedSulphurousSandstoneWall : ModWall
{
public override void SetDefaults()
{
Main.wallHouse[Type] = true;
dustType = 32;
drop = ModContent.ItemType<Items.Placeables.Walls.HardenedSulphurousSandstoneWall>();
AddMapEntry(new Color(62, 50, 39));
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff. Show more