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

Commit

Permalink
1.0.18.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilysen committed Aug 15, 2019
1 parent e9b0163 commit a1f16f2
Show file tree
Hide file tree
Showing 20 changed files with 194 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Items/Armor/StarbrassSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("Starbrass"), 10);
recipe.AddIngredient(mod.ItemType("AuricCore"), 2);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
2 changes: 1 addition & 1 deletion Items/AuraAegis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public override void AddRecipes()
recipe.AddIngredient(ItemID.EoCShield);
recipe.AddIngredient(ItemID.AnkhShield);
recipe.AddIngredient(mod.ItemType("Starbrass"), 5);
recipe.AddIngredient(mod.ItemType("AuricCore"), 3);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.SetResult(this);
Expand Down
22 changes: 17 additions & 5 deletions Items/AuralTether.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
Expand All @@ -18,7 +19,7 @@ public override void SetStaticDefaults()
"Must be on your hotbar to work");
}

public override void SetDefaults()
public override void SetDefaults()
{
item.width = 24;
item.height = 24;
Expand All @@ -33,24 +34,35 @@ public override void SetDefaults()
markedPoint = default;
}

public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
if (markedPoint != default)
{
Texture2D texture = mod.GetTexture("Items/AuralTether_Set");
spriteBatch.Draw(texture, position, null, Color.White, 0, origin, scale, SpriteEffects.None, 0f);
return false;
}
return true;
}

public override bool UseItem(Player player)
{
if(player.altFunctionUse == 2)
{
markedPoint = default;
Main.NewText("Tether point reset.", 135, 115, 255);
Thaumaturgy.NewText(player, "Tether point reset.", 135, 115, 255);
Main.PlaySound(SoundID.Item73.WithVolume(0.5f), player.Center);
return true;
}
if (markedPoint == default)
{
Main.NewText("Tether point marked.", 135, 115, 255);
Thaumaturgy.NewText(player, "Tether point marked.", 135, 115, 255);
markedPoint = player.position;
Main.PlaySound(SoundID.Item73.WithVolume(0.5f), player.Center);
}
else
{
Main.NewText("The tether yanks you through space and time.", 135, 115, 255);
Thaumaturgy.NewText(player, "The tether yanks you through space and time.", 135, 115, 255);
player.Teleport(markedPoint);
Main.PlaySound(SoundID.Item74.WithVolume(0.5f), player.Center);
markedPoint = default;
Expand All @@ -68,7 +80,7 @@ public override void AddRecipes()
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MagicMirror);
recipe.AddIngredient(ItemID.Book, 3);
recipe.AddIngredient(mod.ItemType("AuricCore"), 3);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("Starbrass"), 5);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
Binary file modified Items/AuralTether.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Items/AuralTether_Set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Items/AurelianHarness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public override void AddRecipes()
recipe.AddIngredient(ItemID.Wire, 30);
recipe.AddIngredient(ItemID.MeteoriteBar, 3);
recipe.AddIngredient(ItemID.Obsidian, 5);
recipe.AddIngredient(mod.ItemType("AuricCore"), 5);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 25);
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
Expand Down
3 changes: 1 addition & 2 deletions Items/AuricSteelWaraxe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public override void AddRecipes()
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("AuricSteel"), 15);
recipe.AddRecipeGroup("Wood", 5);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 5);
recipe.AddIngredient(mod.ItemType("AuricShard"), 3);
recipe.AddIngredient(ItemID.MeteorHamaxe);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
4 changes: 2 additions & 2 deletions Items/BindShackle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Shackle, 1);
recipe.AddIngredient(mod.ItemType("AuricCore"), 1);
recipe.AddIngredient(mod.ItemType("AuricShard"), 3);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 5);
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
3 changes: 1 addition & 2 deletions Items/BottledLightning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ItemID.Starfish);
recipe.AddIngredient(ItemID.Goldfish, 3);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"));
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.SetResult(this);
Expand Down
93 changes: 93 additions & 0 deletions Items/ChampionsCrest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Thaumaturgy.Items
{
public class ChampionsCrest : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Champion's Crest");
Tooltip.SetDefault("Most slimes become friendly\n" +
"Grants a charging dash attack\n" +
"Reduces damage taken by 17%\n" +
"Being struck may confuse nearby enemies\n" +
"Friendly bees are stronger\n" +
"Summons damaging spores around you\n" +
"Greatly increases life regen while stationary");
}

public override void SetDefaults()
{
item.width = 28;
item.height = 28;
item.value = Item.sellPrice(0, 30, 0, 0);
item.rare = 8;
item.defense = 2;
item.accessory = true;
item.expert = true;
}

public override void UpdateEquip(Player player)
{
player.dash = 2;
player.endurance += 0.17f;
player.brainOfConfusion = true;
player.strongBees = true;
player.sporeSac = true;
player.shinyStone = true;
player.SporeSac();

// THIS IS VANILLA CODE. YEAH.
player.npcTypeNoAggro[1] = true;
player.npcTypeNoAggro[16] = true;
player.npcTypeNoAggro[59] = true;
player.npcTypeNoAggro[71] = true;
player.npcTypeNoAggro[81] = true;
player.npcTypeNoAggro[138] = true;
player.npcTypeNoAggro[121] = true;
player.npcTypeNoAggro[122] = true;
player.npcTypeNoAggro[141] = true;
player.npcTypeNoAggro[147] = true;
player.npcTypeNoAggro[183] = true;
player.npcTypeNoAggro[184] = true;
player.npcTypeNoAggro[204] = true;
player.npcTypeNoAggro[225] = true;
player.npcTypeNoAggro[244] = true;
player.npcTypeNoAggro[302] = true;
player.npcTypeNoAggro[333] = true;
player.npcTypeNoAggro[335] = true;
player.npcTypeNoAggro[334] = true;
player.npcTypeNoAggro[336] = true;
player.npcTypeNoAggro[537] = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RoyalGel);
recipe.AddIngredient(ItemID.EoCShield);
recipe.AddIngredient(ItemID.WormScarf);
recipe.AddIngredient(ItemID.SporeSac);
recipe.AddIngredient(ItemID.ShinyStone);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.AddRecipe();

recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RoyalGel);
recipe.AddIngredient(ItemID.EoCShield);
recipe.AddIngredient(ItemID.BrainOfConfusion);
recipe.AddIngredient(ItemID.SporeSac);
recipe.AddIngredient(ItemID.ShinyStone);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.AddRecipe();
}
}
}
Binary file added Items/ChampionsCrest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions Items/PhoenixDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,17 @@ public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Feather, 10);
recipe.AddIngredient(ItemID.SoulofFlight, 25);
recipe.AddIngredient(ItemID.SoulofLight, 25);
recipe.AddIngredient(mod.ItemType("AuricCore"), 2);
recipe.AddIngredient(ItemID.SoulofFlight, 10);
recipe.AddIngredient(ItemID.SoulofLight, 5);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.AddRecipe();

recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.FireFeather);
recipe.AddIngredient(ItemID.SoulofLight, 25);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 10);
recipe.SetResult(this);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
1 change: 0 additions & 1 deletion Items/Placeable/ConjurersLamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public override void AddRecipes()
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Torch, 5);
recipe.AddIngredient(mod.ItemType("AuricShard"), 10);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddRecipeGroup("Thaumaturgy:IronBar", 3);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
Expand Down
4 changes: 2 additions & 2 deletions Items/TemporalFlickerfin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public override bool CanUseItem(Player player)
public override bool UseItem(Player player)
{
Main.anglerQuestFinished = false;
Main.NewText("Time seems to slow for a moment.", 100, 100, 255);
Thaumaturgy.NewText(player, "Time seems to slow for a moment.", 100, 100, 255);
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddRecipeGroup("Thaumaturgy:PreyFish");
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 5);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("TransmutationFocus"));
recipe.SetResult(this);
Expand Down
2 changes: 1 addition & 1 deletion Items/TerranBore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public override void AddRecipes()
recipe.AddIngredient(ItemID.SilkRopeCoil, 100);
recipe.AddIngredient(ItemID.DiamondGemsparkBlock, 30);
recipe.AddIngredient(mod.ItemType("Starbrass"), 30);
recipe.AddIngredient(mod.ItemType("AuricCore"), 10);
recipe.AddIngredient(mod.ItemType("AuricCore"), 5);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.SetResult(this);
Expand Down
3 changes: 2 additions & 1 deletion Items/Weapons/AuricGunshell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public override void AddRecipes()
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.EndlessMusketPouch);
recipe.AddIngredient(mod.ItemType("Starbrass"));
recipe.AddIngredient(mod.ItemType("AuricCore"), 3);
recipe.AddIngredient(mod.ItemType("AuricCore"));
recipe.AddIngredient(mod.ItemType("AuricShard"), 2);
recipe.AddTile(mod.TileType("Thaumatrestle"));
recipe.AddTile(mod.TileType("SynthesisFocus"));
recipe.SetResult(this);
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,26 @@ You are free to decompile, modify etc. this mod under the MIT License. The mod i
* **Xhuis** - Code, sprites.
* **Ilysen** - Code, sprites, and writing after 1.0.15.0.
* **Flaqzar** - Sprites for the starbrass armor set, starbrass tools, auric steel, and auric steel tools.
* **Re-Logic** - Terraria, and the sprites I used as reference/basis for Thaumaturgy's!
* **Re-Logic** - Terraria, and the sprites used as reference and basis for Thaumaturgy's.

# Changelog

### Aug. 15, 2019

#### 1.0.18.8

* Added the Champion's Crest, which combines the effects of all pre-Moon Lord expert accessories.
* Reduced auric core and shard costs across the board.
* Changed bottled lightning to use an auric shard in its recipe instead of an auric core, and removed its starfish requirement.
* The aural tether now has two different sprites, for telling if its mark is set at a glance.

### Aug. 14, 2019

#### 1.0.18.7

* Fixed an issue with Avarice's gem yield buff not working in multiplayer. (Thanks, jopojelly!)
* Added recipes for the enchanted nightcrawler and wand of sparking.

### Aug. 13, 2019

#### 1.0.18.6
Expand Down
27 changes: 27 additions & 0 deletions Thaumaturgy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public Thaumaturgy()
};
}

public static void NewText(Player player, string text, byte r, byte g, byte b)
{
if (player.whoAmI == Main.myPlayer)
{
Main.NewText(text, r, g, b);
}
}

public override void AddRecipeGroups()
{
RecipeGroup group = new RecipeGroup(() => "Iron or Lead Ore", new int[]
Expand Down Expand Up @@ -310,6 +318,25 @@ public override void AddRecipeGroups()
recipe.SetResult(ItemID.EndlessMusketPouch);
recipe.AddRecipe();

//Enchanted Nightcrawler - 1 worm and 1 auric shard
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.Worm);
recipe.AddIngredient(this.ItemType("AuricShard"));
recipe.AddTile(this.TileType("Thaumatrestle"));
recipe.AddTile(this.TileType("TransmutationFocus"));
recipe.SetResult(ItemID.EnchantedNightcrawler);
recipe.AddRecipe();

//Wand of Sparking - 1 wood, 1 torch, and 1 auric shard
recipe = new ModRecipe(this);
recipe.AddRecipeGroup("Wood");
recipe.AddIngredient(ItemID.Torch);
recipe.AddIngredient(this.ItemType("AuricShard"));
recipe.AddTile(this.TileType("Thaumatrestle"));
recipe.AddTile(this.TileType("SynthesisFocus"));
recipe.SetResult(ItemID.WandofSparking);
recipe.AddRecipe();

/////////////
// POTIONS //
/////////////
Expand Down
26 changes: 23 additions & 3 deletions ThaumaturgyGlobalTile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,30 @@ public class ThaumaturgyGlobalTile : GlobalTile
{
public override bool Drop(int i, int j, int type)
{
Player ourPlayer = Main.player[Main.myPlayer];
bool baseDropped = base.Drop(i, j, type);
bool avariceActive = false;
if (Main.netMode == NetmodeID.Server)
{
foreach (Player ourPlayer in Main.player)
{
if (ourPlayer.active && (ourPlayer.HasBuff(mod.BuffType("Avarice")) || ourPlayer.buffImmune[mod.BuffType("Avarice")]))
{
avariceActive = true;
break;
}
}
}
else
{
Player ourPlayer = Main.LocalPlayer;
if(ourPlayer.HasBuff(mod.BuffType("Avarice")) || ourPlayer.buffImmune[mod.BuffType("Avarice")])
{
avariceActive = true;
}
}

// only Daring and Daredevilry provide immunity to Avarice - and they both require its elixir - so we apply the effects either way
if(ourPlayer.HasBuff(mod.BuffType("Avarice")) || ourPlayer.buffImmune[mod.BuffType("Avarice")])
if(avariceActive && baseDropped)
{
int extraGems = Main.rand.Next(1, 3);
switch (type)
Expand All @@ -36,7 +56,7 @@ public override bool Drop(int i, int j, int type)
break;
}
}
return base.Drop(i, j, type);
return baseDropped;
}
}
}
Loading

0 comments on commit a1f16f2

Please sign in to comment.