Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
1.0.12.0, the Massive Terran Bore
Browse files Browse the repository at this point in the history
  • Loading branch information
Xhuis committed Jul 13, 2018
1 parent 9a87373 commit 3b1c1c1
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Items/AurelianHarness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void SetDefaults()
{
item.width = 22;
item.height = 20;
item.value = 10000;
item.value = Item.sellPrice(0, 10, 0, 0);
item.rare = 3;
item.accessory = true;
item.defense = 1;
Expand Down
104 changes: 104 additions & 0 deletions Items/TerranBore.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Thaumaturgy.Items
{
public class TerranBore : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Massive Terran Bore");
Tooltip.SetDefault("An impressive technological feat that tunnels through earth\nUse to start it up, causing it to dig downwards until extreme heat destroys it\nThe bore shoves aside the earth into walls, and leaves a rope for safe descent\nDon't use if there's anything important below you");
}

public override void SetDefaults()
{
item.width = 20;
item.height = 30;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 4;
item.value = Item.sellPrice(0, 5, 0, 0);
item.rare = 4;
item.UseSound = SoundID.NPCDeath56;
item.maxStack = 3;
item.consumable = true;
item.noMelee = true;
}

public override bool UseItem(Player player) //HERE BE DRAGONS
{
Main.NewText("The terran bore howls with energy and rockets into the earth!", 0, 255, 0);
int x = (int)(player.position.X / 16f);
int y = (int)(player.position.Y / 16f);
int prog_x = 0;
int prog_y = 1;
for (int i = x - 3; i < x + 4; i++)
{
prog_y = 0;
for (int v = y; v < y + 4000; v++) //this should be more than enough for even the largest worlds
{
if(Main.tile[i, v].type != null)
{
if(Main.tile[i, v].type == TileID.Ash || Main.tile[i, v].type == TileID.ObsidianBrick || Main.tile[i, v].type == TileID.HellstoneBrick) //once we're at the Underworld, stop digging
{
break;
}
WorldGen.KillTile(i, v, false, false, false); //destroy each tile as we go down
if(Main.tile[i, v].liquid > 0) //and clear out liquids
{
Main.tile[i, v].lava(false);
Main.tile[i, v].liquid = 0;
WorldGen.SquareTileFrame(i, v, true);
}
if(prog_x == 0 || prog_x == 6) //on the borders, we'll put down walls; iridescent brick is made from ash - balance can't be broken by uncrafting mods, and you have to have reached the underworld first
{
WorldGen.PlaceTile(i, v, TileID.IridescentBrick, false, false, -1, 0);
}
if(prog_x == 3) //in the center, run a rope down the length
{
WorldGen.PlaceTile(i, v, TileID.SilkRope, false, false, -1, 0);
}
if(prog_x > 0 && prog_x < 6) //while not in the borders, smash walls and replace them
{
WorldGen.KillWall(i, v, false);
if(prog_y != 0)
{
if(prog_x == 3 && prog_y % 20 == 0)
{
WorldGen.PlaceWall(i, v, WallID.DiamondGemspark, false); //every 20 tiles, use a diamond gemspark block for lighting and aesthetic
}
else
{
WorldGen.PlaceWall(i, v, WallID.IridescentBrick, false);
}
}
}
if(prog_y == 5) //place platforms near the top to catch the player and provide a safety net
{
WorldGen.PlaceTile(i, v, TileID.Platforms, false, false, -1, 0);
}
}
prog_y++;
}
prog_x++;
}
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IridescentBrick, 300);
recipe.AddIngredient(ItemID.SilkRopeCoil, 100);
recipe.AddIngredient(ItemID.DiamondGemsparkBlock, 30);
recipe.AddIngredient(ItemID.MeteoriteBar, 30);
recipe.AddIngredient(mod.ItemType("AuricCore"), 10);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file added Items/TerranBore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ You are free to decompile, modify etc. this mod under the MIT License. The mod i
# Credit Where Due

* **Xhuis** - Code, sprites, writing.
* **Re-Logic** - Terraria, and the sprites I used as reference/basis for Thaumaturgy's!

# Changelog

### Jul. 13, 2018

#### 1.0.12.0
* Added the Massive Terran Bore, a quick and easy hellevator solution similar to the Instavator from Fargo's mod.

### Jul. 11, 2018

#### 1.0.11.1
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
author = Xhuis

version = 1.0.11.1
version = 1.0.12.0
displayName = Thaumaturgy
homepage = https://github.com/Xhuis/Thaumaturgy

0 comments on commit 3b1c1c1

Please sign in to comment.