Initial commit

This commit is contained in:
FyloZ 2020-03-03 21:17:42 -05:00
commit 57dfc3dc99
392 changed files with 13874 additions and 0 deletions

43
.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.OLD
*.csproj.user
/obj
/bin/Debug
/.vs
/bin
/Properties
*.csproj

24
Buffs/Buffs/Commander.cs Normal file
View File

@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class Commander : DecimationBuff
{
protected override string DisplayName => "Commander";
protected override string Description => "Max minions +1 \nMinion's damages +10% \nMinion's Knockback +10%";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.maxMinions++;
player.minionDamage += 0.1f;
player.minionKB += 0.1f;
}
}
}

BIN
Buffs/Buffs/Commander.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

View File

@ -0,0 +1,25 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class DemonicallyBewitched : DecimationBuff
{
protected override string DisplayName => "Demonically Bewitched";
protected override string Description => "+1 minion" + "\nIncrease minions damages and knockback";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.maxMinions += 1;
player.minionDamage *= 1.05f;
player.minionKB *= 1.02f;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

24
Buffs/Buffs/FatesSmile.cs Normal file
View File

@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
namespace Decimation.Buffs.Buffs
{
internal class FatesSmile : DecimationBuff
{
protected override string DisplayName => "Fate's Smile";
protected override string Description => "Provide a slight life regeneration boost.";
protected override void Init()
{
save = false;
displayTime = false;
clearable = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.lifeRegen += 1;
}
}
}

BIN
Buffs/Buffs/FatesSmile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

View File

@ -0,0 +1,28 @@
using Terraria;
namespace Decimation.Buffs.Buffs
{
internal class MysticFlame : DecimationBuff
{
protected override string DisplayName => "Mystic Flame";
protected override string Description => "A warmth envelops you";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.lifeRegen += 2;
player.manaRegen += 1;
player.moveSpeed *= 1.05f;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.lifeRegen += 2;
}
}
}

BIN
Buffs/Buffs/MysticFlame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

View File

@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
namespace Decimation.Buffs.Buffs
{
internal class NaturesAura : DecimationBuff
{
protected override string DisplayName => "Natures Aura";
protected override string Description => "Nature strengthens your will and power.";
protected override void Init()
{
save = false;
displayTime = false;
clearable = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.lifeRegen += 2;
}
}
}

BIN
Buffs/Buffs/NaturesAura.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

View File

@ -0,0 +1,64 @@
using Decimation.Projectiles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class ScarabEndurance : DecimationBuff
{
protected override string DisplayName => "Scarab Endurance";
protected override string Description => "To add";
protected override void Init()
{
save = false;
clearable = false;
}
public override void Update(Player player, ref int buffIndex)
{
DecimationPlayer modPlayer = player.GetModPlayer<DecimationPlayer>();
if (modPlayer.scarabEnduranceBuffTimeCounter >= 180)
{
if (modPlayer.scarabCounter < 3)
{
modPlayer.scarabCounter++;
modPlayer.scarabs[modPlayer.scarabCounter - 1] = Projectile.NewProjectile(player.Center,
new Vector2(0, 0), ModContent.ProjectileType<Scarab>(), 0, 0, 255, player.whoAmI);
}
modPlayer.scarabEnduranceBuffTimeCounter = 0;
}
modPlayer.scarabEnduranceBuffTimeCounter++;
for (int i = 0; i < modPlayer.scarabCounter; i++)
player.statDefense += (int) (modPlayer.oldStatDefense * 0.15f);
}
public override void ModifyBuffTip(ref string tip, ref int rare)
{
DecimationPlayer modPlayer = Main.LocalPlayer.GetModPlayer<DecimationPlayer>();
int defenseAdded = 0;
for (int i = 0; i < modPlayer.scarabCounter; i++)
defenseAdded += (int) (modPlayer.oldStatDefense * 0.15f);
tip += "Summons scarabs to protect you.";
tip += "\nGive 15% more defense for each scarabs alive.";
tip += "\n3 scarabs maximum";
tip += "\nCurrently, you have " + defenseAdded + " defense added.";
}
}
public class ScarabEnduranceEffect : GlobalNPC
{
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
{
if (target.HasBuff(ModContent.BuffType<ScarabEndurance>())) npc.AddBuff(BuffID.OnFire, 300);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

48
Buffs/Buffs/SlimyFeet.cs Normal file
View File

@ -0,0 +1,48 @@
using Microsoft.Xna.Framework.Input;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class SlimyFeet : DecimationBuff
{
protected override string DisplayName => "Slimy feet!";
protected override string Description => "You now have the abilities of slimes!";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.noFallDmg = true;
player.waterWalk2 = true;
Keys[] pressedKeys = Main.keyState.GetPressedKeys();
if (player.GetModPlayer<DecimationPlayer>().lastJumpBoost > 5)
player.GetModPlayer<DecimationPlayer>().lastJumpBoost--;
for (int j = 0; j < pressedKeys.Length; j++)
{
string a = string.Concat(pressedKeys[j]);
if (a == Main.cJump)
{
if (!player.GetModPlayer<DecimationPlayer>().wasJumping && player.wingTime == player.wingTimeMax)
{
player.GetModPlayer<DecimationPlayer>().lastJumpBoost++;
}
player.GetModPlayer<DecimationPlayer>().wasJumping = true;
break;
}
player.GetModPlayer<DecimationPlayer>().wasJumping = false;
}
player.jumpSpeedBoost += player.GetModPlayer<DecimationPlayer>().lastJumpBoost;
}
}
}

BIN
Buffs/Buffs/SlimyFeet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

28
Buffs/Buffs/Ubered.cs Normal file
View File

@ -0,0 +1,28 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class Ubered : DecimationBuff
{
protected override string DisplayName => "Ubered!";
protected override string Description => "YOU ARE ZE UBERMENSCH!";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statDefense += (int)(player.statDefense * 0.5f);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense += (int)(npc.defense * 0.5f);
}
}
}

BIN
Buffs/Buffs/Ubered.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

35
Buffs/Buffs/Vampire.cs Normal file
View File

@ -0,0 +1,35 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class Vampire : DecimationBuff
{
protected override string DisplayName => "Vampire!";
protected override string Description => "You are now a vampire!";
protected override void Init()
{
save = true;
displayTime = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.lifeSteal *= 1.3f;
player.statDefense += 2;
player.moveSpeed *= 1.05f;
player.meleeSpeed *= 1.05f;
player.GetModPlayer<DecimationPlayer>().vampire = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense += 2;
}
}
}

BIN
Buffs/Buffs/Vampire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

27
Buffs/Buffs/Warlock.cs Normal file
View File

@ -0,0 +1,27 @@
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class Warlock : DecimationBuff
{
protected override string DisplayName => "Warlock";
protected override string Description => "Max mana +50 \nMana Regeneration Bonus +25 \nMagic Damages + 10% \nMagic Critical Chances + 5%";
protected override void Init()
{
displayTime = true;
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statManaMax2 += 50;
// To review
player.manaRegenBonus += 25;
player.magicDamage += 0.1f;
player.magicCrit += 5;
}
}
}

BIN
Buffs/Buffs/Warlock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

32
Buffs/Buffs/Werepire.cs Normal file
View File

@ -0,0 +1,32 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Buffs
{
internal class Werepire : DecimationBuff
{
protected override string DisplayName => "Werepire!";
protected override string Description => "Grants both Vampire! and Werewolf effects";
protected override void Init()
{
save = true;
clearable = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.AddBuff(BuffID.Werewolf, 1);
player.AddBuff(ModContent.BuffType<Vampire>(), 1);
player.wereWolf = false;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.AddBuff(BuffID.Werewolf, 1);
npc.AddBuff(ModContent.BuffType<Vampire>(), 1);
}
}
}

BIN
Buffs/Buffs/Werepire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

34
Buffs/Debuffs/Amnesia.cs Normal file
View File

@ -0,0 +1,34 @@
using Terraria;
using Terraria.ID;
namespace Decimation.Buffs.Debuffs
{
internal class Amnesia : DecimationBuff
{
protected override string DisplayName => "Amnesia";
protected override string Description => "Discombobulate";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.moveSpeed *= 0.95f;
player.buffImmune[BuffID.Confused] = false;
player.AddBuff(BuffID.Confused, 1, false);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.velocity *= 0.95f;
npc.buffImmune[BuffID.Confused] = false;
npc.AddBuff(BuffID.Confused, 1, false);
}
}
}

BIN
Buffs/Debuffs/Amnesia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

43
Buffs/Debuffs/AvianFlu.cs Normal file
View File

@ -0,0 +1,43 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class AvianFlu : DecimationBuff
{
protected override string DisplayName => "Avian Flu";
protected override string Description => "Your wings don't feel too hot...";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
if (player.lifeRegen > 0)
{
player.lifeRegen = 0;
}
player.lifeRegenTime = 0;
player.lifeRegen -= 3;
player.jumpSpeedBoost += -2;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.lifeRegen > 0)
{
npc.lifeRegen = 0;
}
npc.lifeRegenExpectedLossPerSecond += 3;
npc.lifeRegen -= 3;
}
}
}

BIN
Buffs/Debuffs/AvianFlu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,35 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class Corrosion : DecimationBuff
{
protected override string DisplayName => "Corrosion";
protected override string Description => "Your armor is getting lighter...";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.AddBuff(BuffID.Poisoned, 1);
player.statDefense -= (int)(player.statDefense * 0.25f);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.AddBuff(BuffID.Poisoned, 1);
npc.defense -= (int)(npc.defense * 0.25f);
}
}
}

BIN
Buffs/Debuffs/Corrosion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,33 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class Discombobulated : DecimationBuff
{
protected override string DisplayName => "Discombobulated?";
protected override string Description => "";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffImmune[BuffID.Confused] = false;
player.moveSpeed *= 0.95f;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.buffImmune[BuffID.Confused] = false;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,38 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class Enveloped : DecimationBuff
{
protected override string DisplayName => "Enveloped!";
protected override string Description => "Is it frostbite? Or are your nerves burnt out?";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.AddBuff(BuffID.OnFire, 1);
player.AddBuff(BuffID.Chilled, 1);
player.meleeDamage -= (int)(player.meleeDamage * 0.05f);
player.meleeCrit -= (int)(player.meleeCrit * 0.04f);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.AddBuff(BuffID.OnFire, 1);
npc.AddBuff(BuffID.Chilled, 1);
npc.damage -= (int)(npc.damage * 0.05f);
}
}
}

BIN
Buffs/Debuffs/Enveloped.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,41 @@
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class Hyperthermic : DecimationBuff
{
protected override string DisplayName => "Hyperthermic!";
protected override string Description => "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%";
public override bool Debuff => true;
protected override void Init()
{
save = false;
clearable = false;
displayTime = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statDefense = (int)(player.statDefense * 0.90f);
player.moveSpeed *= 0.95f;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense = (int)(npc.defense * 0.90f);
npc.velocity *= 0.95f;
}
}
public class HyperthermicManaBlock : GlobalItem
{
public override bool CanUseItem(Item item, Player player)
{
return !(player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,37 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class InfernalGaze : DecimationBuff
{
protected override string DisplayName => "Infernal Gaze";
protected override string Description => "You feel your sins burning inside of you";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statDefense -= (int)(player.statDefense * 0.1f);
player.meleeDamage *= 0.90f;
player.AddBuff(BuffID.CursedInferno, 1);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense -= (int)(npc.defense * 0.1f);
npc.damage -= (int)(npc.damage * 0.1f);
npc.AddBuff(BuffID.CursedInferno, 1);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

View File

@ -0,0 +1,32 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class PiercingGaze : DecimationBuff
{
protected override string DisplayName => "Piercing Gaze";
protected override string Description => "Eyes are peering into your soul...";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
longerExpertDebuff = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statDefense -= (int)(player.statDefense * 0.08f);
player.moveSpeed *= 0.85f;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense -= (int)(npc.defense * 0.08f);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

46
Buffs/Debuffs/Singed.cs Normal file
View File

@ -0,0 +1,46 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Buffs.Debuffs
{
internal class Singed : DecimationBuff
{
protected override string DisplayName => "Singed!";
protected override string Description => "Burn target \nSlow target by 5% \nLower target defense by 5% \n Block potion use";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.onFire2 = true;
player.moveSpeed *= 0.95f;
player.statDefense = (int)(0.95f * player.statDefense);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.onFire = true;
npc.velocity *= 0.95f;
npc.defense = (int)(0.95f * npc.defense);
}
}
public class SingedGlobalItem : GlobalItem
{
public override bool CanUseItem(Item item, Player player)
{
if (player.HasBuff(ModContent.BuffType<Singed>()))
{
return !(item.UseSound != null && item.useStyle == 2);
}
return true;
}
}
}

BIN
Buffs/Debuffs/Singed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

47
Buffs/Debuffs/Slimed.cs Normal file
View File

@ -0,0 +1,47 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
namespace Decimation.Buffs.Debuffs
{
internal class Slimed : DecimationBuff
{
protected override string DisplayName => "Slimed!";
protected override string Description => "Movement speed -20% \nDeal 2 damages each 5 seconds \nIncrease jump height \n Block potion use";
public override bool Debuff => true;
protected override void Init()
{
save = false;
displayTime = true;
clearable = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.moveSpeed *= 0.80f;
player.jumpBoost = true;
if (player.miscCounter % 300 == 0)
player.Hurt(PlayerDeathReason.LegacyDefault(), 2, 0);
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.velocity *= 0.80f;
npc.lifeRegen -= 1;
}
}
public class SlimedGlobalItem : GlobalItem
{
public override bool CanUseItem(Item item, Player player)
{
if (player.HasBuff(ModContent.BuffType<Slimed>()))
{
return !(item.UseSound != null && item.useStyle == 2);
}
return true;
}
}
}

BIN
Buffs/Debuffs/Slimed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

34
Buffs/DecimationBuff.cs Normal file
View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ModLoader;
using Terraria;
namespace Decimation.Buffs
{
internal abstract class DecimationBuff : ModBuff
{
protected bool save = false;
protected bool displayTime = true;
protected bool clearable = true;
protected new abstract string DisplayName { get; }
protected new abstract string Description { get; }
public virtual bool Debuff { get; } = false;
protected abstract void Init();
public sealed override void SetDefaults()
{
base.DisplayName.SetDefault(DisplayName);
base.Description.SetDefault(Description);
Main.debuff[Type] = Debuff;
Main.buffNoSave[Type] = !save;
Main.buffNoTimeDisplay[Type] = !displayTime;
canBeCleared = clearable;
}
}
}

62
Core/Amulets/Amulet.cs Normal file
View File

@ -0,0 +1,62 @@
using System.Collections.Generic;
using Decimation.Core.Amulets.Synergy;
using Decimation.Core.Collections;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Core.Amulets
{
public abstract class Amulet : DecimationItem
{
public abstract AmuletClasses AmuletClass { get; }
public virtual IAmuletsSynergy Synergy { get; } = new AmuletSynergyAdapter();
protected abstract void GetAmuletTooltip(ref AmuletTooltip tooltip);
protected virtual void InitAmulet() { }
protected virtual void UpdateAmulet(Player player)
{
}
protected sealed override void Init()
{
width = 28;
height = 30;
rarity = Rarity.Green;
this.item.maxStack = 1;
InitAmulet();
AmuletList.Instance.Add(this);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
UpdateAmulet(Main.LocalPlayer);
}
public sealed override void ModifyTooltips(List<TooltipLine> tooltips)
{
AmuletTooltip tooltip = new AmuletTooltip(this.mod, this);
GetAmuletTooltip(ref tooltip);
tooltips.AddRange(tooltip.Lines);
}
}
public enum AmuletClasses
{
Melee,
Summoner,
Mage,
Ranger,
Throwing,
Tank,
Healer,
Builder,
Miner,
Creator
}
}

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria.ModLoader;
using Terraria.UI.Chat;
namespace Decimation.Core.Amulets
{
public class AmuletTooltip
{
private readonly Amulet _amulet;
private readonly Color _classColor = ChatManager.WaveColor(Color.Fuchsia);
private readonly Color _effectColor = Color.ForestGreen;
private readonly Mod _mod;
private readonly Color _synergyColor = Color.CadetBlue;
private int _effectCount;
private bool _hasSynergy;
public AmuletTooltip(Mod mod, Amulet amulet)
{
_mod = mod;
_amulet = amulet;
this.Lines = new List<TooltipLine>();
SetClassTooltip();
}
public List<TooltipLine> Lines { get; set; }
private void SetClassTooltip()
{
this.Lines.Add(new TooltipLine(_mod, "DecimationAmuletClass", _amulet.AmuletClass.ToString("F"))
{
overrideColor = _classColor
});
}
public AmuletTooltip AddEffect(string tooltip)
{
this.Lines.Add(new TooltipLine(_mod, $"Effect{_effectCount}", tooltip)
{
overrideColor = _effectColor
});
_effectCount++;
return this;
}
public AmuletTooltip AddSynergy(string tooltip)
{
if (!_hasSynergy)
{
this.Lines.Add(new TooltipLine(_mod, "Synergy", tooltip)
{
overrideColor = _synergyColor
});
_hasSynergy = true;
}
else
{
throw new InvalidOperationException($"Can't add more than one synergy tooltip to {_amulet.Name}");
}
return this;
}
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Core.Amulets.Synergy
{
public class AmuletSynergyAdapter : IAmuletsSynergy
{
public virtual void OnHitPlayer(DecimationModPlayer modPlayer, ref int damages)
{
}
public virtual void OnShoot(DecimationModPlayer modPlayer, Item item, ref Vector2 position, ref float speedX, ref float speedY,
ref int projectileType, ref int damages, ref float knockBack)
{
}
public virtual void Update(DecimationModPlayer modPlayer)
{
}
}
}

View File

@ -0,0 +1,14 @@
using Microsoft.Xna.Framework;
using Terraria;
namespace Decimation.Core.Amulets.Synergy
{
public interface IAmuletsSynergy
{
void OnHitPlayer(DecimationModPlayer modPlayer, ref int damages);
void OnShoot(DecimationModPlayer modPlayer, Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int projectileType, ref int damages, ref float knockBack);
void Update(DecimationModPlayer modPlayer);
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Decimation.Core.Amulets;
using Terraria;
namespace Decimation.Core.Collections
{
public class AmuletList : List<Amulet>
{
private static readonly AmuletList _instance = new AmuletList();
public static AmuletList Instance { get; } = _instance;
private AmuletList() { }
public Amulet GetAmuletForItem(Item item)
{
return this.FirstOrDefault(amulet => amulet.item.type == item.type);
}
public bool Contains(Item item)
{
return GetAmuletForItem(item) != null;
}
}
}

View File

@ -0,0 +1,12 @@
using Terraria.ModLoader;
namespace Decimation.Core
{
public abstract class DecimationModPlayer : ModPlayer, IDecimationPlayer
{
public abstract bool HasLavaCharm { get; set; }
public abstract bool HasShield { get; set; }
}
}

12
Core/IDecimationPlayer.cs Normal file
View File

@ -0,0 +1,12 @@
using Terraria.ModLoader;
namespace Decimation.Core
{
public interface IDecimationPlayer
{
bool HasLavaCharm { get; }
bool HasShield { get; }
}
}

View File

@ -0,0 +1,15 @@
namespace Decimation.Core.Items
{
public abstract class DecimationAccessory : DecimationItem
{
protected abstract void InitAccessory();
protected sealed override void Init()
{
this.item.accessory = true;
this.item.maxStack = 1;
InitAccessory();
}
}
}

View File

@ -0,0 +1,32 @@
using Decimation.Core.Util;
using Terraria;
namespace Decimation.Core.Items
{
public abstract class DecimationAmmo : DecimationItem
{
protected int damages = 0;
protected float projKnockBack = 0;
protected abstract string Projectile { get; }
protected abstract int Ammo { get; }
protected virtual bool VanillaProjectile { get; } = false;
protected abstract void InitAmmo();
protected sealed override void Init()
{
this.item.maxStack = 999;
this.item.consumable = true;
InitAmmo();
this.item.damage = damages;
this.item.knockBack = projKnockBack;
this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile);
this.item.ammo = this.Ammo;
this.item.ranged = true;
}
}
}

View File

@ -0,0 +1,97 @@
using System.Collections.Generic;
using Decimation.Core.Util;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Core.Items
{
public abstract class DecimationItem : ModItem
{
protected bool autoReuse = false;
protected bool consumable = false;
protected int height = 16;
protected Rarity rarity = Rarity.White;
protected int useAnimation = 20;
protected LegacySoundStyle useSound = SoundID.Item1;
protected int useStyle = 1;
protected int useTime = 20;
protected int value = 1;
protected int width = 16;
protected abstract string ItemName { get; }
protected virtual string ItemTooltip { get; } = "";
protected virtual DrawAnimation Animation { get; } = null;
protected virtual bool IsClone { get; } = false;
public sealed override void SetStaticDefaults()
{
this.DisplayName.SetDefault(this.ItemName);
this.Tooltip.SetDefault(this.ItemTooltip);
if (this.Animation != null) Main.RegisterItemAnimation(this.item.type, this.Animation);
}
public sealed override void SetDefaults()
{
this.item.maxStack = 999;
this.item.noMelee = true;
Init();
if (!this.IsClone)
{
this.item.width = width;
this.item.height = height;
this.item.rare = (int) rarity;
this.item.consumable = consumable;
this.item.autoReuse = autoReuse;
this.item.useStyle = useStyle;
this.item.useTime = useTime;
this.item.useAnimation = useAnimation;
this.item.UseSound = useSound;
this.item.value = value;
}
}
public sealed override void AddRecipes()
{
List<ModRecipe> recipes = GetAdditionalRecipes();
recipes.Add(GetRecipe());
foreach (ModRecipe recipe in recipes) recipe?.AddRecipe();
}
protected abstract void Init();
protected virtual ModRecipe GetRecipe()
{
return null;
}
protected virtual List<ModRecipe> GetAdditionalRecipes()
{
return new List<ModRecipe>();
}
protected static ModRecipe GetNewModRecipe(DecimationItem result, int quantity, int tile,
bool anyIronBar = false)
{
return GetNewModRecipe(result, quantity, new List<int> {tile}, anyIronBar);
}
protected static ModRecipe GetNewModRecipe(DecimationItem result, int quantity, List<int> tiles,
bool anyIronBar = false)
{
ModRecipe recipe = new ModRecipe(References.mod) {anyIronBar = anyIronBar};
recipe.SetResult(result, quantity);
foreach (int tile in tiles) recipe.AddTile(tile);
return recipe;
}
}
}

View File

@ -0,0 +1,26 @@
namespace Decimation.Core.Items
{
public abstract class DecimationPlaceableItem : DecimationItem
{
protected abstract int Tile { get; }
protected abstract void InitPlaceable();
protected sealed override void Init()
{
width = 12;
height = 12;
autoReuse = true;
useTime = 15;
useAnimation = 15;
useStyle = 1;
consumable = true;
this.item.useTurn = true;
InitPlaceable();
this.item.createTile = this.Tile;
}
}
}

View File

@ -0,0 +1,37 @@
namespace Decimation.Core.Items
{
public abstract class DecimationPotion : DecimationItem
{
protected virtual int HealLife { get; } = 0;
protected virtual int HealMana { get; } = 0;
protected abstract int BuffType { get; }
protected abstract int BuffTime { get; }
protected abstract void InitPotion();
protected sealed override void Init()
{
width = 20;
height = 20;
consumable = true;
useTime = 20;
useAnimation = 20;
item.maxStack = 30;
item.useTurn = true;
item.useStyle = 2;
InitPotion();
item.healLife = HealLife;
item.healMana = HealMana;
item.buffType = BuffType;
item.buffTime = BuffTime;
if (HealLife > 0)
{
item.potion = true;
}
}
}
}

View File

@ -0,0 +1,28 @@
namespace Decimation.Core.Items
{
public abstract class DecimationTool : DecimationItem
{
protected virtual int MeleeDamages { get; }
protected virtual int PickaxePower { get; }
protected virtual int AxePower { get; }
protected virtual int HammerPower { get; }
protected abstract void InitTool();
protected override void Init()
{
autoReuse = true;
this.item.useTurn = true;
this.item.maxStack = 1;
InitTool();
this.item.damage = this.MeleeDamages;
this.item.pick = this.PickaxePower;
this.item.axe = this.AxePower;
this.item.hammer = this.HammerPower;
if (this.MeleeDamages > 0) this.item.melee = true;
}
}
}

View File

@ -0,0 +1,69 @@
using Decimation.Core.Util;
using Terraria;
namespace Decimation.Core.Items
{
public abstract class DecimationWeapon : DecimationItem
{
protected int criticalStrikeChance = 0; // Percents
protected float knockBack = 0; // https://terraria.gamepedia.com/Knockback
protected float shootSpeed = 0;
protected virtual DamageType DamagesType { get; } = DamageType.MELEE;
protected virtual string Projectile { get; }
protected virtual string Ammo { get; }
protected virtual bool VanillaProjectile { get; } = false;
protected virtual bool VanillaAmmo { get; } = false;
protected abstract int Damages { get; }
protected abstract void InitWeapon();
protected override void Init()
{
useStyle = 1;
autoReuse = false;
this.item.useTurn = true;
this.item.maxStack = 1;
switch (this.DamagesType)
{
case DamageType.MAGIC:
this.item.magic = true;
break;
case DamageType.RANGED:
this.item.ranged = true;
break;
case DamageType.THROW:
this.item.thrown = true;
break;
default:
this.item.melee = true;
break;
}
InitWeapon();
this.item.damage = this.Damages;
this.item.crit = criticalStrikeChance;
this.item.knockBack = knockBack;
this.item.shootSpeed = shootSpeed;
if (this.Projectile != null)
this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile);
if (this.Ammo != null)
this.item.useAmmo = ItemUtils.GetIdFromName(this.Ammo, typeof(Item), this.VanillaAmmo);
if (!this.item.melee) this.item.noMelee = true;
}
public enum DamageType
{
MELEE,
MAGIC,
THROW,
RANGED
}
}
}

422
Core/NPCs/Worm.cs Normal file
View File

@ -0,0 +1,422 @@
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Core.NPCs
{
public abstract class Worm : ModNPC
{
public int bodyType;
public bool directional = false;
public bool flies = false;
/* ai[0] = follower
* ai[1] = following
* ai[2] = distanceFromTail
* ai[3] = head
*/
public bool head;
public int headType;
public int maxLength;
public int minLength;
public float speed;
public bool tail;
public int tailType;
public float turnSpeed;
public override void AI()
{
if (this.npc.localAI[1] == 0f)
{
this.npc.localAI[1] = 1f;
Init();
}
if (this.npc.ai[3] > 0f) this.npc.realLife = (int)this.npc.ai[3];
if (!head && this.npc.timeLeft < 300) this.npc.timeLeft = 300;
if (this.npc.target < 0 || this.npc.target == 255 || Main.player[this.npc.target].dead)
this.npc.TargetClosest();
if (Main.player[this.npc.target].dead && this.npc.timeLeft > 300) this.npc.timeLeft = 300;
if (Main.netMode != 1)
{
if (!tail && this.npc.ai[0] == 0f)
{
if (head)
{
this.npc.ai[3] = this.npc.whoAmI;
this.npc.realLife = this.npc.whoAmI;
this.npc.ai[2] = Main.rand.Next(minLength, maxLength + 1);
this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2),
(int)(this.npc.position.Y + this.npc.height), bodyType, this.npc.whoAmI);
}
else if (this.npc.ai[2] > 0f)
{
this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2),
(int)(this.npc.position.Y + this.npc.height), this.npc.type, this.npc.whoAmI);
}
else
{
this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2),
(int)(this.npc.position.Y + this.npc.height), tailType, this.npc.whoAmI);
}
Main.npc[(int)this.npc.ai[0]].ai[3] = this.npc.ai[3];
Main.npc[(int)this.npc.ai[0]].realLife = this.npc.realLife;
Main.npc[(int)this.npc.ai[0]].ai[1] = this.npc.whoAmI;
Main.npc[(int)this.npc.ai[0]].ai[2] = this.npc.ai[2] - 1f;
this.npc.netUpdate = true;
}
if (!head && (!Main.npc[(int)this.npc.ai[1]].active ||
Main.npc[(int)this.npc.ai[1]].type != headType &&
Main.npc[(int)this.npc.ai[1]].type != bodyType))
{
this.npc.life = 0;
this.npc.HitEffect();
this.npc.active = false;
}
if (!tail && (!Main.npc[(int)this.npc.ai[0]].active ||
Main.npc[(int)this.npc.ai[0]].type != bodyType &&
Main.npc[(int)this.npc.ai[0]].type != tailType))
{
this.npc.life = 0;
this.npc.HitEffect();
this.npc.active = false;
}
if (!this.npc.active && Main.netMode == 2) NetMessage.SendData(28, -1, -1, null, this.npc.whoAmI, -1f);
}
int num180 = (int)(this.npc.position.X / 16f) - 1;
int num181 = (int)((this.npc.position.X + this.npc.width) / 16f) + 2;
int num182 = (int)(this.npc.position.Y / 16f) - 1;
int num183 = (int)((this.npc.position.Y + this.npc.height) / 16f) + 2;
if (num180 < 0) num180 = 0;
if (num181 > Main.maxTilesX) num181 = Main.maxTilesX;
if (num182 < 0) num182 = 0;
if (num183 > Main.maxTilesY) num183 = Main.maxTilesY;
bool flag18 = flies;
if (!flag18)
for (int num184 = num180; num184 < num181; num184++)
for (int num185 = num182; num185 < num183; num185++)
if (Main.tile[num184, num185] != null &&
(Main.tile[num184, num185].nactive() &&
(Main.tileSolid[Main.tile[num184, num185].type] ||
Main.tileSolidTop[Main.tile[num184, num185].type] && Main.tile[num184, num185].frameY == 0) ||
Main.tile[num184, num185].liquid > 64))
{
Vector2 vector17;
vector17.X = num184 * 16;
vector17.Y = num185 * 16;
if (this.npc.position.X + this.npc.width > vector17.X &&
this.npc.position.X < vector17.X + 16f &&
this.npc.position.Y + this.npc.height > vector17.Y &&
this.npc.position.Y < vector17.Y + 16f)
{
flag18 = true;
if (Main.rand.NextBool(100) && this.npc.behindTiles && Main.tile[num184, num185].nactive())
WorldGen.KillTile(num184, num185, true, true);
if (Main.netMode != 1 && Main.tile[num184, num185].type == 2)
{
ushort arg_BFCA_0 = Main.tile[num184, num185 - 1].type;
}
}
}
if (!flag18 && head)
{
Rectangle rectangle = new Rectangle((int)this.npc.position.X, (int)this.npc.position.Y,
this.npc.width, this.npc.height);
int num186 = 1000;
bool flag19 = true;
for (int num187 = 0; num187 < 255; num187++)
if (Main.player[num187].active)
{
Rectangle rectangle2 = new Rectangle((int)Main.player[num187].position.X - num186,
(int)Main.player[num187].position.Y - num186, num186 * 2, num186 * 2);
if (rectangle.Intersects(rectangle2))
{
flag19 = false;
break;
}
}
if (flag19) flag18 = true;
}
if (directional)
{
if (this.npc.velocity.X < 0f)
this.npc.spriteDirection = 1;
else if (this.npc.velocity.X > 0f) this.npc.spriteDirection = -1;
}
float num188 = speed;
float num189 = turnSpeed;
Vector2 vector18 = new Vector2(this.npc.position.X + this.npc.width * 0.5f,
this.npc.position.Y + this.npc.height * 0.5f);
float num191 = Main.player[this.npc.target].position.X + Main.player[this.npc.target].width / 2;
float num192 = Main.player[this.npc.target].position.Y + Main.player[this.npc.target].height / 2;
num191 = (int)(num191 / 16f) * 16;
num192 = (int)(num192 / 16f) * 16;
vector18.X = (int)(vector18.X / 16f) * 16;
vector18.Y = (int)(vector18.Y / 16f) * 16;
num191 -= vector18.X;
num192 -= vector18.Y;
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
if (this.npc.ai[1] > 0f && this.npc.ai[1] < Main.npc.Length)
{
try
{
vector18 = new Vector2(this.npc.position.X + this.npc.width * 0.5f,
this.npc.position.Y + this.npc.height * 0.5f);
num191 = Main.npc[(int)this.npc.ai[1]].position.X + Main.npc[(int)this.npc.ai[1]].width / 2 -
vector18.X;
num192 = Main.npc[(int)this.npc.ai[1]].position.Y + Main.npc[(int)this.npc.ai[1]].height / 2 -
vector18.Y;
}
catch
{
}
this.npc.rotation = (float)Math.Atan2(num192, num191) + 1.57f;
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
int num194 = this.npc.width;
num193 = (num193 - num194) / num193;
num191 *= num193;
num192 *= num193;
this.npc.velocity = Vector2.Zero;
this.npc.position.X = this.npc.position.X + num191;
this.npc.position.Y = this.npc.position.Y + num192;
if (directional)
{
if (num191 < 0f) this.npc.spriteDirection = 1;
if (num191 > 0f) this.npc.spriteDirection = -1;
}
}
else
{
if (!flag18)
{
this.npc.TargetClosest();
this.npc.velocity.Y = this.npc.velocity.Y + 0.11f;
if (this.npc.velocity.Y > num188) this.npc.velocity.Y = num188;
if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.4)
{
if (this.npc.velocity.X < 0f)
this.npc.velocity.X = this.npc.velocity.X - num189 * 1.1f;
else
this.npc.velocity.X = this.npc.velocity.X + num189 * 1.1f;
}
else if (this.npc.velocity.Y == num188)
{
if (this.npc.velocity.X < num191)
this.npc.velocity.X = this.npc.velocity.X + num189;
else if (this.npc.velocity.X > num191) this.npc.velocity.X = this.npc.velocity.X - num189;
}
else if (this.npc.velocity.Y > 4f)
{
if (this.npc.velocity.X < 0f)
this.npc.velocity.X = this.npc.velocity.X + num189 * 0.9f;
else
this.npc.velocity.X = this.npc.velocity.X - num189 * 0.9f;
}
}
else
{
if (!flies && this.npc.behindTiles && this.npc.soundDelay == 0)
{
float num195 = num193 / 40f;
if (num195 < 10f) num195 = 10f;
if (num195 > 20f) num195 = 20f;
this.npc.soundDelay = (int)num195;
Main.PlaySound(SoundID.Roar, this.npc.position);
}
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
float num196 = Math.Abs(num191);
float num197 = Math.Abs(num192);
float num198 = num188 / num193;
num191 *= num198;
num192 *= num198;
if (ShouldRun())
{
if (Main.netMode != 1 &&
this.npc.position.Y / 16f > (Main.rockLayer + Main.maxTilesY) / 2.0)
{
this.npc.active = false;
int num200 = (int)this.npc.ai[0];
while (num200 > 0 && num200 < 200 && Main.npc[num200].active &&
Main.npc[num200].aiStyle == this.npc.aiStyle)
{
int num201 = (int)Main.npc[num200].ai[0];
Main.npc[num200].active = false;
this.npc.life = 0;
if (Main.netMode == 2) NetMessage.SendData(23, -1, -1, null, num200);
num200 = num201;
}
if (Main.netMode == 2) NetMessage.SendData(23, -1, -1, null, this.npc.whoAmI);
}
num191 = 0f;
num192 = num188;
}
bool flag21 = false;
if (this.npc.type == 87)
{
if ((this.npc.velocity.X > 0f && num191 < 0f || this.npc.velocity.X < 0f && num191 > 0f ||
this.npc.velocity.Y > 0f && num192 < 0f || this.npc.velocity.Y < 0f && num192 > 0f) &&
Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) > num189 / 2f &&
num193 < 300f)
{
flag21 = true;
if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188)
this.npc.velocity *= 1.1f;
}
if (this.npc.position.Y > Main.player[this.npc.target].position.Y ||
Main.player[this.npc.target].position.Y / 16f > Main.worldSurface ||
Main.player[this.npc.target].dead)
{
flag21 = true;
if (Math.Abs(this.npc.velocity.X) < num188 / 2f)
{
if (this.npc.velocity.X == 0f)
this.npc.velocity.X = this.npc.velocity.X - this.npc.direction;
this.npc.velocity.X = this.npc.velocity.X * 1.1f;
}
else
{
if (this.npc.velocity.Y > -num188) this.npc.velocity.Y = this.npc.velocity.Y - num189;
}
}
}
if (!flag21)
{
if (this.npc.velocity.X > 0f && num191 > 0f || this.npc.velocity.X < 0f && num191 < 0f ||
this.npc.velocity.Y > 0f && num192 > 0f || this.npc.velocity.Y < 0f && num192 < 0f)
{
if (this.npc.velocity.X < num191)
{
this.npc.velocity.X = this.npc.velocity.X + num189;
}
else
{
if (this.npc.velocity.X > num191) this.npc.velocity.X = this.npc.velocity.X - num189;
}
if (this.npc.velocity.Y < num192)
{
this.npc.velocity.Y = this.npc.velocity.Y + num189;
}
else
{
if (this.npc.velocity.Y > num192) this.npc.velocity.Y = this.npc.velocity.Y - num189;
}
if (Math.Abs(num192) < num188 * 0.2 &&
(this.npc.velocity.X > 0f && num191 < 0f || this.npc.velocity.X < 0f && num191 > 0f))
{
if (this.npc.velocity.Y > 0f)
this.npc.velocity.Y = this.npc.velocity.Y + num189 * 2f;
else
this.npc.velocity.Y = this.npc.velocity.Y - num189 * 2f;
}
if (Math.Abs(num191) < num188 * 0.2 &&
(this.npc.velocity.Y > 0f && num192 < 0f || this.npc.velocity.Y < 0f && num192 > 0f))
{
if (this.npc.velocity.X > 0f)
this.npc.velocity.X = this.npc.velocity.X + num189 * 2f;
else
this.npc.velocity.X = this.npc.velocity.X - num189 * 2f;
}
}
else
{
if (num196 > num197)
{
if (this.npc.velocity.X < num191)
this.npc.velocity.X = this.npc.velocity.X + num189 * 1.1f;
else if (this.npc.velocity.X > num191)
this.npc.velocity.X = this.npc.velocity.X - num189 * 1.1f;
if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.5)
{
if (this.npc.velocity.Y > 0f)
this.npc.velocity.Y = this.npc.velocity.Y + num189;
else
this.npc.velocity.Y = this.npc.velocity.Y - num189;
}
}
else
{
if (this.npc.velocity.Y < num192)
this.npc.velocity.Y = this.npc.velocity.Y + num189 * 1.1f;
else if (this.npc.velocity.Y > num192)
this.npc.velocity.Y = this.npc.velocity.Y - num189 * 1.1f;
if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.5)
{
if (this.npc.velocity.X > 0f)
this.npc.velocity.X = this.npc.velocity.X + num189;
else
this.npc.velocity.X = this.npc.velocity.X - num189;
}
}
}
}
}
this.npc.rotation = (float)Math.Atan2(this.npc.velocity.Y, this.npc.velocity.X) + 1.57f;
if (head)
{
if (flag18)
{
if (this.npc.localAI[0] != 1f) this.npc.netUpdate = true;
this.npc.localAI[0] = 1f;
}
else
{
if (this.npc.localAI[0] != 0f) this.npc.netUpdate = true;
this.npc.localAI[0] = 0f;
}
if ((this.npc.velocity.X > 0f && this.npc.oldVelocity.X < 0f ||
this.npc.velocity.X < 0f && this.npc.oldVelocity.X > 0f ||
this.npc.velocity.Y > 0f && this.npc.oldVelocity.Y < 0f ||
this.npc.velocity.Y < 0f && this.npc.oldVelocity.Y > 0f) && !this.npc.justHit)
{
this.npc.netUpdate = true;
return;
}
}
}
CustomBehavior();
}
public virtual void Init()
{
}
public virtual bool ShouldRun()
{
return false;
}
public virtual void CustomBehavior()
{
}
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return head ? (bool?)null : false;
}
}
}

View File

@ -0,0 +1,57 @@
using System.Collections.Generic;
using Terraria.ModLoader;
namespace Decimation.Core.Util.Builder
{
internal class RecipeBuilder
{
private readonly IDictionary<int, int> _ingredients = new Dictionary<int, int>();
private readonly Mod _mod;
private readonly int _result;
private readonly int _resultQuantity;
private readonly IList<int> _tiles = new List<int>();
private bool _anyIronBar;
public RecipeBuilder(Mod mod, ModItem result, int resultQuantity = 1)
{
_mod = mod;
_result = result.item.type;
_resultQuantity = resultQuantity;
}
public RecipeBuilder WithIngredient(int item, int quantity = 1)
{
_ingredients.Add(item, quantity);
return this;
}
public RecipeBuilder WithStation(int tile)
{
_tiles.Add(tile);
return this;
}
public RecipeBuilder AnyIronBar(bool anyIronBar)
{
_anyIronBar = anyIronBar;
return this;
}
public ModRecipe Build()
{
ModRecipe recipe = new ModRecipe(_mod) {anyIronBar = _anyIronBar};
foreach (KeyValuePair<int, int> ingredient in _ingredients)
recipe.AddIngredient(ingredient.Key, ingredient.Value);
foreach (int tile in _tiles) recipe.AddTile(tile);
recipe.SetResult(_result, _resultQuantity);
return recipe;
}
}
}

68
Core/Util/ItemUtils.cs Normal file
View File

@ -0,0 +1,68 @@
using System;
using System.Reflection;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
/**
* <summary>Class <c>ItemUtils</c> provides several static methods to simplify items </summary>
*/
namespace Decimation.Core.Util
{
public class ItemUtils
{
private static readonly Mod Mod = References.mod;
/**
* <summary>Returns the identifier of an entity.</summary>
*/
public static int GetIdFromName(string name, Type entityType, bool isVanilla)
{
return isVanilla
? GetVanillaEntityIdFromName(name, entityType)
: GetModdedEntityIdFromName(name, entityType);
}
/**
* <summary>Returns the identifier of a modded entity from its name.</summary>
*/
public static int GetModdedEntityIdFromName(string name, Type entityType)
{
int id = int.MinValue;
if (entityType == typeof(Item))
id = Mod.ItemType(name);
else if (entityType == typeof(Projectile))
id = Mod.ProjectileType(name);
else if (entityType == typeof(NPC)) id = Mod.NPCType(name);
if (id == int.MinValue)
throw new ArgumentException($"No entity of type {entityType.Name} found with the name '{name}'");
return id;
}
/**
* <summary>Returns the identifier of a vanilla entity from its name in an ID class using reflection.</summary>
*/
public static int GetVanillaEntityIdFromName(string name, Type entityType)
{
// Get which ID class to use
Type idType;
if (entityType == typeof(Item))
idType = typeof(ItemID);
else if (entityType == typeof(Projectile))
idType = typeof(ProjectileID);
else if (entityType == typeof(NPCID))
idType = typeof(NPCID);
else
throw new ArgumentException($"There is no entity of type ${entityType.Name}");
// Gets the field in the ID class and check if it's valid
FieldInfo correspondingItemField = idType.GetField(name);
if (correspondingItemField == null || correspondingItemField.FieldType != typeof(short))
throw new ArgumentException($"No entity of type {entityType.Name} found with the name '{name}'");
return (short) correspondingItemField.GetValue(null);
}
}
}

59
Core/Util/References.cs Normal file
View File

@ -0,0 +1,59 @@
using System.Collections;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Core.Util
{
public class References
{
public static Mod mod;
public static ArrayList bullets = new ArrayList
{
ProjectileID.Bullet,
ProjectileID.ChlorophyteBullet,
ProjectileID.CrystalBullet,
ProjectileID.ExplosiveBullet,
ProjectileID.GoldenBullet,
ProjectileID.IchorBullet,
ProjectileID.MoonlordBullet,
ProjectileID.CursedBullet,
ProjectileID.MeteorShot,
ProjectileID.NanoBullet,
ProjectileID.PartyBullet,
ProjectileID.BulletHighVelocity,
ProjectileID.RainbowRodBullet,
ProjectileID.SniperBullet,
ProjectileID.VenomBullet,
ProjectileID.BulletDeadeye,
ProjectileID.BulletSnowman
};
// TODO
//public static ArrayList styngerBolts = new ArrayList()
//{
// ProjectileID.Stynger,
// Decimation.Instance.ProjectileType<MoltenStyngerBolt>(),
// Decimation.Instance.ProjectileType<TitanicStyngerBolt>()
//};
}
public enum Rarity
{
Gray = -1,
White = 0,
Blue = 1,
Green = 2,
Orange = 3,
LightRed = 4,
Pink = 5,
LightPurple = 6,
Lime = 7,
Yellow = 8,
Cyan = 9,
Red = 10,
Purple = 11,
Rainbow = -12,
Quest = -11
}
}

166
Decimation.cs Normal file
View File

@ -0,0 +1,166 @@
using System;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.NPCs.Arachnus;
using Decimation.NPCs.AncientDuneWorm;
using Decimation.UI;
using System.Collections.Generic;
using Decimation.Core.Util;
using Terraria.UI;
using Microsoft.Xna.Framework;
namespace Decimation
{
public class Decimation : Mod
{
public static Decimation Instance { set; get; }
public static AmuletSlotState amuletSlotState;
private UserInterface amuletSlotInterface;
internal UserInterface skeletonUserInterface;
public Decimation()
{
Instance = this;
Properties = new ModProperties()
{
Autoload = true,
AutoloadGores = true,
AutoloadSounds = true
};
References.mod = this;
}
public override void Load()
{
if (!Main.dedServ)
{
amuletSlotState = new AmuletSlotState();
amuletSlotState.Activate();
amuletSlotInterface = new UserInterface();
amuletSlotInterface.SetState(amuletSlotState);
skeletonUserInterface = new UserInterface();
}
}
public override void UpdateUI(GameTime gameTime)
{
Player player = Main.LocalPlayer;
if (player.GetModPlayer<DecimationPlayer>().necrosisStoneEquipped && player.respawnTimer != 0)
player.respawnTimer -= 1;
amuletSlotInterface?.Update(gameTime);
skeletonUserInterface?.Update(gameTime);
}
public override void ModifyInterfaceLayers(List<GameInterfaceLayer> layers)
{
int inventoryIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Inventory"));
if (inventoryIndex != -1)
{
layers.Insert(inventoryIndex + 1, new LegacyGameInterfaceLayer(
"Decimation: Amulet Slot",
delegate
{
if (Main.playerInventory)
amuletSlotInterface.Draw(Main.spriteBatch, new GameTime());
return true;
},
InterfaceScaleType.UI)
);
layers.Insert(inventoryIndex + 2, new LegacyGameInterfaceLayer(
"Decimation: Skeleton UI",
delegate
{
skeletonUserInterface.Draw(Main.spriteBatch, new GameTime());
return true;
},
InterfaceScaleType.UI)
);
}
}
public override void PostSetupContent()
{
Mod bossChecklist = ModLoader.GetMod("BossChecklist");
if (bossChecklist != null)
{
bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func<bool>)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER");
bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func<bool>)(() => DecimationWorld.downedDuneWorm), "INSERT LATER");
bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func<bool>)(() => DecimationWorld.downedArachnus), "INSERT LATER");
}
}
public override void AddRecipeGroups()
{
RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[]
{
ItemID.Amethyst,
ItemID.Topaz,
ItemID.Emerald,
ItemID.Sapphire,
ItemID.Ruby,
ItemID.Diamond,
});
RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[]
{
ItemID.BlackThread,
ItemID.GreenThread,
ItemID.PinkThread
});
RecipeGroup.RegisterGroup("AnyGem", gems);
RecipeGroup.RegisterGroup("AnyThread", threads);
}
public override void HandlePacket(BinaryReader reader, int whoAmI)
{
DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte();
switch (msgType)
{
case DecimationModMessageType.Arachnus:
Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC;
if (arachnus != null && arachnus.npc.active)
{
arachnus.HandlePacket(reader);
}
break;
case DecimationModMessageType.DuneWorm:
AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC;
if (duneWorm != null && duneWorm.npc.active)
{
// TODO multiplayer
//duneWorm.HandlePacket(reader);
}
break;
case DecimationModMessageType.SpawnBoss:
int type = reader.ReadInt32();
int player = reader.ReadInt32();
Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0);
if (Main.netMode != 1)
NPC.SpawnOnPlayer(player, type);
break;
default:
ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType);
break;
}
}
}
enum DecimationModMessageType : byte
{
Arachnus,
DuneWorm,
SpawnBoss
}
}

448
Decimation.csproj Normal file
View File

@ -0,0 +1,448 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0827514F-8B33-478D-82E2-67F4D4E07F3B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Decimation</RootNamespace>
<AssemblyName>Decimation</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FNA, Version=17.4.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\.steam\steam\steamapps\common\Terraria\FNA.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Terraria, Version=1.3.5.1, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\.steam\steam\steamapps\common\Terraria\tModLoader.exe</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Buffs\Buffs\Commander.cs" />
<Compile Include="Buffs\Buffs\DemonicallyBewitched.cs" />
<Compile Include="Buffs\Buffs\FatesSmile.cs" />
<Compile Include="Buffs\Buffs\MysticFlame.cs" />
<Compile Include="Buffs\Buffs\NaturesAura.cs" />
<Compile Include="Buffs\Buffs\ScarabEndurance.cs" />
<Compile Include="Buffs\Buffs\SlimyFeet.cs" />
<Compile Include="Buffs\Buffs\Ubered.cs" />
<Compile Include="Buffs\Buffs\Vampire.cs" />
<Compile Include="Buffs\Buffs\Warlock.cs" />
<Compile Include="Buffs\Buffs\Werepire.cs" />
<Compile Include="Buffs\Debuffs\Amnesia.cs" />
<Compile Include="Buffs\Debuffs\AvianFlu.cs" />
<Compile Include="Buffs\Debuffs\Corrosion.cs" />
<Compile Include="Buffs\Debuffs\Discombobulated.cs" />
<Compile Include="Buffs\Debuffs\Enveloped.cs" />
<Compile Include="Buffs\Debuffs\Hyperthermic.cs" />
<Compile Include="Buffs\Debuffs\InfernalGaze.cs" />
<Compile Include="Buffs\Debuffs\PiercingGaze.cs" />
<Compile Include="Buffs\Debuffs\Singed.cs" />
<Compile Include="Buffs\Debuffs\Slimed.cs" />
<Compile Include="Buffs\DecimationBuff.cs" />
<Compile Include="Core\Amulets\Amulet.cs" />
<Compile Include="Core\Amulets\AmuletTooltip.cs" />
<Compile Include="Core\Amulets\Synergy\AmuletSynergyAdapter.cs" />
<Compile Include="Core\Amulets\Synergy\IAmuletsSynergy.cs" />
<Compile Include="Core\Collections\AmuletList.cs" />
<Compile Include="Core\DecimationModPlayer.cs" />
<Compile Include="Core\IDecimationPlayer.cs" />
<Compile Include="Core\Items\DecimationAccessory.cs" />
<Compile Include="Core\Items\DecimationAmmo.cs" />
<Compile Include="Core\Items\DecimationItem.cs" />
<Compile Include="Core\Items\DecimationPlaceableItem.cs" />
<Compile Include="Core\Items\DecimationPotion.cs" />
<Compile Include="Core\Items\DecimationTool.cs" />
<Compile Include="Core\Items\DecimationWeapon.cs" />
<Compile Include="Core\NPCs\Worm.cs" />
<Compile Include="Core\Util\Builder\RecipeBuilder.cs" />
<Compile Include="Core\Util\ItemUtils.cs" />
<Compile Include="Core\Util\References.cs" />
<Compile Include="Decimation.cs" />
<Compile Include="DecimationPlayer.cs" />
<Compile Include="DecimationWorld.cs" />
<Compile Include="Dusts\Blood.cs" />
<Compile Include="Items\Accessories\AlucardPendant.cs" />
<Compile Include="Items\Accessories\CelestialTransmogrifier.cs" />
<Compile Include="Items\Accessories\CrystalSkull.cs" />
<Compile Include="Items\Accessories\DeadeyesQuiver.cs" />
<Compile Include="Items\Accessories\DraculaPendant.cs" />
<Compile Include="Items\Accessories\EnchantedFocuser.cs" />
<Compile Include="Items\Accessories\EndlessPouchofLife.cs" />
<Compile Include="Items\Accessories\EnergyFocuser.cs" />
<Compile Include="Items\Accessories\Focuser.cs" />
<Compile Include="Items\Accessories\GraniteLinedTunic.cs" />
<Compile Include="Items\Accessories\JestersQuiver.cs" />
<Compile Include="Items\Accessories\LightweightGlove.cs" />
<Compile Include="Items\Accessories\NecrosisStone.cs" />
<Compile Include="Items\Accessories\RangersPouch.cs" />
<Compile Include="Items\Accessories\RangersQuiver.cs" />
<Compile Include="Items\Accessories\RedHotShackle.cs" />
<Compile Include="Items\Accessories\ShinySentinel.cs" />
<Compile Include="Items\Accessories\SlimeBracelet.cs" />
<Compile Include="Items\Accessories\TideTurner.cs" />
<Compile Include="Items\Accessories\Wings\ScarabWings.cs" />
<Compile Include="Items\Ammo\MoltenStyngerBolt.cs" />
<Compile Include="Items\Ammo\Pebble.cs" />
<Compile Include="Items\Ammo\SiphonArrow.cs" />
<Compile Include="Items\Ammo\TitanicStyngerBolt.cs" />
<Compile Include="Items\Amulets\BuildersAmulet.cs" />
<Compile Include="Items\Amulets\CreatorAmulet.cs" />
<Compile Include="Items\Amulets\CrystalAmulet.cs" />
<Compile Include="Items\Amulets\FireAmulet.cs" />
<Compile Include="Items\Amulets\FrostAmulet.cs" />
<Compile Include="Items\Amulets\GraniteAmulet.cs" />
<Compile Include="Items\Amulets\HealtyAmulet.cs" />
<Compile Include="Items\Amulets\MarbleAmulet.cs" />
<Compile Include="Items\Amulets\MinersAmulet.cs" />
<Compile Include="Items\Amulets\SlimeAmulet.cs" />
<Compile Include="Items\Armors\ScarabArmor\ScarabBody.cs" />
<Compile Include="Items\Armors\ScarabArmor\ScarabHelmet.cs" />
<Compile Include="Items\Armors\ScarabArmor\ScarabLeggings.cs" />
<Compile Include="Items\Boss\Arachnus\ArachnusTreasureBag.cs" />
<Compile Include="Items\Boss\Arachnus\MoltenArachnidsAmulet.cs" />
<Compile Include="Items\Boss\Arachnus\Moltenkey.cs" />
<Compile Include="Items\Boss\Bloodshot\BloodiedMaw.cs" />
<Compile Include="Items\Boss\Bloodshot\TreasureBagBloodshotEye.cs" />
<Compile Include="Items\Boss\DuneWorm\DesertDessert.cs" />
<Compile Include="Items\Boss\DuneWorm\DuneWormTreasureBag.cs" />
<Compile Include="Items\CursedItem.cs" />
<Compile Include="Items\Misc\BloodiedEssence.cs" />
<Compile Include="Items\Misc\BloodyLunarTablet.cs" />
<Compile Include="Items\Misc\CondensedSouls\CondensedSpite.cs" />
<Compile Include="Items\Misc\EnchantedHeart.cs" />
<Compile Include="Items\Misc\HyperStar.cs" />
<Compile Include="Items\Misc\LunarTablet.cs" />
<Compile Include="Items\Misc\RedThread.cs" />
<Compile Include="Items\Misc\SoulFruit.cs" />
<Compile Include="Items\Misc\Souls\SoulofLife.cs" />
<Compile Include="Items\Misc\Souls\SoulofSpite.cs" />
<Compile Include="Items\Misc\Souls\SoulofTime.cs" />
<Compile Include="Items\Misc\Thermoplasm.cs" />
<Compile Include="Items\Ores\DenziumBar.cs" />
<Compile Include="Items\Ores\TitaniteBar.cs" />
<Compile Include="Items\Placeable\Basalt.cs" />
<Compile Include="Items\Placeable\ChlorophyteAnvil.cs" />
<Compile Include="Items\Placeable\DenziumOre.cs" />
<Compile Include="Items\Placeable\DenziumWall.cs" />
<Compile Include="Items\Placeable\DuneWorm\DuneWormTrophy.cs" />
<Compile Include="Items\Placeable\EnchantedAnvil.cs" />
<Compile Include="Items\Placeable\ShrineoftheMoltenOne\DeadEarth.cs" />
<Compile Include="Items\Placeable\ShrineoftheMoltenOne\RedHotSpike.cs" />
<Compile Include="Items\Placeable\ShrineoftheMoltenOne\ShrineAltar.cs" />
<Compile Include="Items\Placeable\ShrineoftheMoltenOne\ShrineBrick.cs" />
<Compile Include="Items\Placeable\ShrineoftheMoltenOne\ShrineDoor.cs" />
<Compile Include="Items\Placeable\TalonianPillar.cs" />
<Compile Include="Items\Placeable\TitanForge.cs" />
<Compile Include="Items\Potions\Antidote.cs" />
<Compile Include="Items\Potions\CommanderPotion.cs" />
<Compile Include="Items\Potions\EnchantedMushroom.cs" />
<Compile Include="Items\Potions\WarlockPotion.cs" />
<Compile Include="Items\Tools\GildedSickle.cs" />
<Compile Include="Items\Tools\GreatwoodHammer.cs" />
<Compile Include="Items\Tools\MultigrainHammer.cs" />
<Compile Include="Items\Tools\TheHourGlass.cs" />
<Compile Include="Items\Tools\TitanitePax.cs" />
<Compile Include="Items\Vanity\DuneWorm\DuneWormMask.cs" />
<Compile Include="Items\Weapons\Arachnus\ChainStynger.cs" />
<Compile Include="Items\Weapons\Arachnus\GlaiveWeaver.cs" />
<Compile Include="Items\Weapons\Arachnus\Infernolizer.cs" />
<Compile Include="Items\Weapons\Bloodshot\BloodStream.cs" />
<Compile Include="Items\Weapons\Bloodshot\Umbra.cs" />
<Compile Include="Items\Weapons\Bloodshot\VampiricShiv.cs" />
<Compile Include="Items\Weapons\MultigrainSword.cs" />
<Compile Include="Items\Weapons\RodofLightning.cs" />
<Compile Include="Items\Weapons\Sling.cs" />
<Compile Include="Items\Weapons\SlingshotWood.cs" />
<Compile Include="Items\Weapons\TheGreatwoodSword.cs" />
<Compile Include="Items\Weapons\TitanicGatliStynger.cs" />
<Compile Include="Items\Weapons\TitanicLongsword.cs" />
<Compile Include="Items\Weapons\TitanicPike.cs" />
<Compile Include="Items\Weapons\TitanicRepeater.cs" />
<Compile Include="Items\Weapons\VampiricEdge.cs" />
<Compile Include="NPCs\AncientDuneWorm\AncientDuneWorm.cs" />
<Compile Include="NPCs\AncientTombCrawlerBody.cs" />
<Compile Include="NPCs\AncientTombCrawlerHead.cs" />
<Compile Include="NPCs\AncientTombCrawlerTail.cs" />
<Compile Include="NPCs\Arachnus\Arachnus.cs" />
<Compile Include="NPCs\Bloodshot\BloodshotEye.cs" />
<Compile Include="NPCs\Bloodshot\MangledServant.cs" />
<Compile Include="NPCs\CoreSpider.cs" />
<Compile Include="NPCs\CoreSpiderWall.cs" />
<Compile Include="NPCs\CursedNPC.cs" />
<Compile Include="NPCs\LivingMagma.cs" />
<Compile Include="NPCs\NecroCaster.cs" />
<Compile Include="NPCs\TownNPCs\Skeleton.cs" />
<Compile Include="Projectiles\Ammonite.cs" />
<Compile Include="Projectiles\ArachnusFireball.cs" />
<Compile Include="Projectiles\ArchingSolarBlade.cs" />
<Compile Include="Projectiles\BlastofHeat.cs" />
<Compile Include="Projectiles\BlastofShadowFlame.cs" />
<Compile Include="Projectiles\BloodBeam.cs" />
<Compile Include="Projectiles\BloodBeamFriendly.cs" />
<Compile Include="Projectiles\BloodClot.cs" />
<Compile Include="Projectiles\BloodClotSmall.cs" />
<Compile Include="Projectiles\Bone.cs" />
<Compile Include="Projectiles\DecimationProjectile.cs" />
<Compile Include="Projectiles\Ember.cs" />
<Compile Include="Projectiles\LightningSphere.cs" />
<Compile Include="Projectiles\MoltenStyngerBolt.cs" />
<Compile Include="Projectiles\Pebble.cs" />
<Compile Include="Projectiles\Scarab.cs" />
<Compile Include="Projectiles\SiphonArrow.cs" />
<Compile Include="Projectiles\SkeletonBone.cs" />
<Compile Include="Projectiles\Stinger.cs" />
<Compile Include="Projectiles\TitanicPikeProjectile.cs" />
<Compile Include="Projectiles\TitanicStyngerBolt.cs" />
<Compile Include="Projectiles\Tooth.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Structures\ShrineoftheMoltenOne.cs" />
<Compile Include="Synergies\FireAmuletSynergy.cs" />
<Compile Include="Synergies\GraniteAmuletSynergy.cs" />
<Compile Include="Synergies\MarbleAmuletSynergy.cs" />
<Compile Include="Tiles\Basalt.cs" />
<Compile Include="Tiles\ChlorophyteAnvil.cs" />
<Compile Include="Tiles\DenziumOre.cs" />
<Compile Include="Tiles\DuneWormTrophy.cs" />
<Compile Include="Tiles\EnchantedAnvil.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\DeadEarth.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\LockedShrineDoor.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\RedHotSpike.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\ShrineAltar.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\ShrineBrick.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\ShrineDoorClosed.cs" />
<Compile Include="Tiles\ShrineoftheMoltenOne\ShrineDoorOpened.cs" />
<Compile Include="Tiles\TalonianPillar.cs" />
<Compile Include="Tiles\TitanForge.cs" />
<Compile Include="UI\AmuletSlot.cs" />
<Compile Include="UI\AmuletSlotState.cs" />
<Compile Include="UI\SkeletonUI.cs" />
<Compile Include="UI\VanillaItemSlotWrapper.cs" />
<Compile Include="Walls\DenziumWall.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Buffs\Buffs\Commander.png" />
<Content Include="Buffs\Buffs\DemonicallyBewitched.png" />
<Content Include="Buffs\Buffs\FatesSmile.png" />
<Content Include="Buffs\Buffs\MysticFlame.png" />
<Content Include="Buffs\Buffs\NaturesAura.png" />
<Content Include="Buffs\Buffs\ScarabEndurance.png" />
<Content Include="Buffs\Buffs\SlimyFeet.png" />
<Content Include="Buffs\Buffs\Ubered.png" />
<Content Include="Buffs\Buffs\Vampire.png" />
<Content Include="Buffs\Buffs\Warlock.png" />
<Content Include="Buffs\Buffs\Werepire.png" />
<Content Include="Buffs\Debuffs\Amnesia.png" />
<Content Include="Buffs\Debuffs\AvianFlu.png" />
<Content Include="Buffs\Debuffs\Corrosion.png" />
<Content Include="Buffs\Debuffs\Discombobulated.png" />
<Content Include="Buffs\Debuffs\Enveloped.png" />
<Content Include="Buffs\Debuffs\Hyperthermic.png" />
<Content Include="Buffs\Debuffs\InfernalGaze.png" />
<Content Include="Buffs\Debuffs\PiercingGaze.png" />
<Content Include="Buffs\Debuffs\Singed.png" />
<Content Include="Buffs\Debuffs\Slimed.png" />
<Content Include="build.txt" />
<Content Include="description.txt" />
<Content Include="Dusts\Blood.png" />
<Content Include="Items\Accessories\AlucardPendant.png" />
<Content Include="Items\Accessories\CelestialTransmogrifier.png" />
<Content Include="Items\Accessories\CrystalSkull.png" />
<Content Include="Items\Accessories\DeadeyesQuiver.png" />
<Content Include="Items\Accessories\DraculaPendant.png" />
<Content Include="Items\Accessories\EnchantedFocuser.png" />
<Content Include="Items\Accessories\EndlessPouchofLife.png" />
<Content Include="Items\Accessories\EnergyFocuser.png" />
<Content Include="Items\Accessories\Focuser.png" />
<Content Include="Items\Accessories\GraniteLinedTunic.png" />
<Content Include="Items\Accessories\JestersQuiver.png" />
<Content Include="Items\Accessories\LightweightGlove.png" />
<Content Include="Items\Accessories\NecrosisStone.png" />
<Content Include="Items\Accessories\RangersPouch.png" />
<Content Include="Items\Accessories\RangersQuiver.png" />
<Content Include="Items\Accessories\RedHotShackle.png" />
<Content Include="Items\Accessories\ShinySentinel.png" />
<Content Include="Items\Accessories\SlimeBracelet.png" />
<Content Include="Items\Accessories\TideTurner.png" />
<Content Include="Items\Accessories\Wings\ScarabWings.png" />
<Content Include="Items\Accessories\Wings\ScarabWings_Wings.png" />
<Content Include="Items\Ammo\MoltenStyngerBolt.png" />
<Content Include="Items\Ammo\Pebble.png" />
<Content Include="Items\Ammo\SiphonArrow.png" />
<Content Include="Items\Ammo\TitanicStyngerBolt.png" />
<Content Include="Items\Amulets\BuildersAmulet.png" />
<Content Include="Items\Amulets\CreatorAmulet.png" />
<Content Include="Items\Amulets\CrystalAmulet.png" />
<Content Include="Items\Amulets\FireAmulet.png" />
<Content Include="Items\Amulets\FrostAmulet.png" />
<Content Include="Items\Amulets\GraniteAmulet.png" />
<Content Include="Items\Amulets\HealtyAmulet.png" />
<Content Include="Items\Amulets\MarbleAmulet.png" />
<Content Include="Items\Amulets\MinersAmulet.png" />
<Content Include="Items\Amulets\SlimeAmulet.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabBody.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabBody_Arms.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabBody_Body.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabBody_FemaleBody.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabHelmet.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabHelmet_Head.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabLeggings.png" />
<Content Include="Items\Armors\ScarabArmor\ScarabLeggings_Legs.png" />
<Content Include="Items\Boss\Arachnus\ArachnusTreasureBag.png" />
<Content Include="Items\Boss\Arachnus\MoltenArachnidsAmulet.png" />
<Content Include="Items\Boss\Arachnus\MoltenKey.png" />
<Content Include="Items\Boss\Bloodshot\BloodiedMaw.png" />
<Content Include="Items\Boss\Bloodshot\TreasureBagBloodshotEye.png" />
<Content Include="Items\Boss\DuneWorm\DesertDessert.png" />
<Content Include="Items\Boss\DuneWorm\DuneWormTreasureBag.png" />
<Content Include="Items\Misc\BloodiedEssence.png" />
<Content Include="Items\Misc\BloodyLunarTablet.png" />
<Content Include="Items\Misc\CondensedSouls\CondensedSpite.gif" />
<Content Include="Items\Misc\CondensedSouls\CondensedSpite.png" />
<Content Include="Items\Misc\CondensedSouls\CondensedSpiteWiki.png" />
<Content Include="Items\Misc\HyperStar.png" />
<Content Include="Items\Misc\LunarTablet.png" />
<Content Include="Items\Misc\RedThread.png" />
<Content Include="Items\Misc\SoulFruit.png" />
<Content Include="Items\Misc\Souls\SoulofLife.png" />
<Content Include="Items\Misc\Souls\SoulofSpite.png" />
<Content Include="Items\Misc\Souls\SoulofTime.png" />
<Content Include="Items\Misc\Thermoplasm.png" />
<Content Include="Items\Ores\DenziumBar.png" />
<Content Include="Items\Ores\TitaniteBar.png" />
<Content Include="Items\Placeable\Basalt.png" />
<Content Include="Items\Placeable\ChlorophyteAnvil.png" />
<Content Include="Items\Placeable\DenziumOre.png" />
<Content Include="Items\Placeable\DenziumWall.png" />
<Content Include="Items\Placeable\DuneWorm\DuneWormTrophy.png" />
<Content Include="Items\Placeable\EnchantedAnvil.png" />
<Content Include="Items\Placeable\ShrineoftheMoltenOne\DeadEarth.png" />
<Content Include="Items\Placeable\ShrineoftheMoltenOne\RedHotSpike.png" />
<Content Include="Items\Placeable\ShrineoftheMoltenOne\ShrineAltar.png" />
<Content Include="Items\Placeable\ShrineoftheMoltenOne\ShrineBrick.png" />
<Content Include="Items\Placeable\ShrineoftheMoltenOne\ShrineDoor.png" />
<Content Include="Items\Placeable\TalonianPillar.png" />
<Content Include="Items\Placeable\TitanForge.png" />
<Content Include="Items\Potions\Antidote.png" />
<Content Include="Items\Potions\CommanderPotion.png" />
<Content Include="Items\Potions\EnchantedMushroom.png" />
<Content Include="Items\Potions\WarlockPotion.png" />
<Content Include="Items\Tools\GildedSickle.png" />
<Content Include="Items\Tools\GreatwoodHammer.png" />
<Content Include="Items\Tools\MultigrainHammer.png" />
<Content Include="Items\Tools\TheHourGlass.png" />
<Content Include="Items\Tools\TitanitePax.png" />
<Content Include="Items\Vanity\DuneWorm\DuneWormMask.png" />
<Content Include="Items\Vanity\DuneWorm\DuneWormMask_Head.png" />
<Content Include="Items\Weapons\Arachnus\ChainStynger.png" />
<Content Include="Items\Weapons\Arachnus\GlaiveWeaver.png" />
<Content Include="Items\Weapons\Arachnus\Infernolizer.png" />
<Content Include="Items\Weapons\Bloodshot\BloodStream.png" />
<Content Include="Items\Weapons\Bloodshot\Umbra.png" />
<Content Include="Items\Weapons\Bloodshot\VampiricShiv.png" />
<Content Include="Items\Weapons\CelestialEdge.png" />
<Content Include="Items\Weapons\MultigrainSword.png" />
<Content Include="Items\Weapons\RodofLightning.png" />
<Content Include="Items\Weapons\Sling.png" />
<Content Include="Items\Weapons\SlingshotWood.png" />
<Content Include="Items\Weapons\TheGreatwoodSword.png" />
<Content Include="Items\Weapons\TitanicGatliStynger.png" />
<Content Include="Items\Weapons\TitanicLongsword.png" />
<Content Include="Items\Weapons\TitanicPike.png" />
<Content Include="Items\Weapons\TitanicRepeater.png" />
<Content Include="Items\Weapons\VampiricEdge.png" />
<Content Include="NPCs\AncientDuneWorm\AncientDuneWormBody.png" />
<Content Include="NPCs\AncientDuneWorm\AncientDuneWormHead.png" />
<Content Include="NPCs\AncientDuneWorm\AncientDuneWormHead_Head_Boss.png" />
<Content Include="NPCs\AncientDuneWorm\AncientDuneWormTail.png" />
<Content Include="NPCs\AncientTombCrawlerBody.png" />
<Content Include="NPCs\AncientTombCrawlerHead.png" />
<Content Include="NPCs\AncientTombCrawlerTail.png" />
<Content Include="NPCs\Arachnus\Arachnus.png" />
<Content Include="NPCs\Arachnus\Arachnus_Head_Boss.png" />
<Content Include="NPCs\Bloodshot\BloodshotEye.png" />
<Content Include="NPCs\Bloodshot\BloodshotEye_Head_Boss.png" />
<Content Include="NPCs\Bloodshot\MangledServant.png" />
<Content Include="NPCs\CoreSpider.png" />
<Content Include="NPCs\CoreSpiderWall.png" />
<Content Include="NPCs\LivingMagma.png" />
<Content Include="NPCs\NecroCaster.png" />
<Content Include="NPCs\TownNPCs\Skeleton.png" />
<Content Include="NPCs\TownNPCs\Skeleton_Head.png" />
<Content Include="Projectiles\Ammonite.png" />
<Content Include="Projectiles\ArchingSolarBlade.png" />
<Content Include="Projectiles\BlastofHeat.png" />
<Content Include="Projectiles\BlastofShadowFlame.png" />
<Content Include="Projectiles\BloodClot.png" />
<Content Include="Projectiles\BloodClotSmall.png" />
<Content Include="Projectiles\Bone.png" />
<Content Include="Projectiles\LightningSphere.png" />
<Content Include="Projectiles\MoltenStyngerBolt.png" />
<Content Include="Projectiles\Scarab.png" />
<Content Include="Projectiles\SiphonArrow.png" />
<Content Include="Projectiles\SkeletonBone.png" />
<Content Include="Projectiles\Stinger.png" />
<Content Include="Projectiles\TitanicPikeProjectile.png" />
<Content Include="Projectiles\TitanicStyngerBolt.png" />
<Content Include="Projectiles\Tooth.png" />
<Content Include="Sounds\Custom\Earthquake.mp3" />
<Content Include="Sounds\Music\Drums_of_hell.mp3" />
<Content Include="Sounds\Music\Slimy_Showdown.mp3" />
<Content Include="Sounds\Music\The_Deserts_Call.mp3" />
<Content Include="Structures\shrine.piskel" />
<Content Include="Tiles\Basalt.png" />
<Content Include="Tiles\ChlorophyteAnvil.png" />
<Content Include="Tiles\DenziumOre.png" />
<Content Include="Tiles\DuneWormTrophy.png" />
<Content Include="Tiles\EnchantedAnvil.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\DeadEarth.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\LockedShrineDoor.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\LockedShrineDoor_Highlight.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\RedHotSpike.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineAltar.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineBrick.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineDoorClosed.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineDoorClosed_Highlight.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineDoorOpened.png" />
<Content Include="Tiles\ShrineoftheMoltenOne\ShrineDoorOpened_Highlight.png" />
<Content Include="Tiles\TalonianPillar.png" />
<Content Include="Tiles\TitanForge.png" />
<Content Include="UI\AmuletSlot.png" />
<Content Include="Walls\DenziumWall.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

828
DecimationPlayer.cs Normal file
View File

@ -0,0 +1,828 @@
using System;
using Decimation.Buffs.Buffs;
using Decimation.Core;
using Decimation.Core.Amulets;
using Decimation.Core.Collections;
using Decimation.Core.Util;
using Decimation.Items.Amulets;
using Decimation.Items.Misc;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
namespace Decimation
{
public class DecimationPlayer : DecimationModPlayer
{
// Amulet slot
private Amulet _amuletSlotAmulet;
private Item _amuletSlotItem;
// amulets
public int amuletsBuff;
public byte amuletsBuffChances;
public int amuletsBuffTime;
public bool amuletsBuffWhenAttacking;
public bool closeToEnchantedAnvil;
public uint combatTime;
public uint counter;
public int dash;
public int dashDamages;
public int dashDelay;
public int dashTime;
public bool deadeyesQuiverEquipped;
public uint enchantedHeartDropTime;
public bool endlessPouchofLifeEquipped;
public bool graniteLinedTunicEquipped;
// Effects
public bool hasCursedAccessory;
public byte hyperStars;
public byte soulFruits;
public bool isInCombat;
public bool jestersQuiverEquiped;
public byte lastHitCounter;
public float lastJumpBoost;
public bool necrosisStoneEquipped;
public int oldStatDefense;
public byte scarabCounter;
// Scarab Endurance buff
public byte scarabEnduranceBuffTimeCounter;
public int[] scarabs = new int[3];
// Scarab shield
public int solarCounter = 0;
public bool tideTurnerEquipped;
public int ttDash;
public int ttHit;
public bool vampire;
public bool wasHurt;
// Slimy Feet buff
public bool wasJumping = false;
public override bool HasShield { get; set; }
public override bool HasLavaCharm { get; set; }
public Item AmuletSlotItem
{
get => _amuletSlotItem;
set
{
_amuletSlotAmulet = AmuletList.Instance.GetAmuletForItem(value);
_amuletSlotItem = value;
}
}
public override void Initialize()
{
this.AmuletSlotItem = new Item();
this.AmuletSlotItem.SetDefaults(0, true);
}
public override void ResetEffects()
{
closeToEnchantedAnvil = false;
jestersQuiverEquiped = false;
deadeyesQuiverEquipped = false;
endlessPouchofLifeEquipped = false;
graniteLinedTunicEquipped = false;
necrosisStoneEquipped = false;
tideTurnerEquipped = false;
vampire = false;
this.HasLavaCharm = false;
this.HasShield = false;
hasCursedAccessory = false;
this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
if (combatTime > 360)
{
combatTime = 0;
enchantedHeartDropTime = 0;
isInCombat = false;
}
amuletsBuff = 0;
amuletsBuffChances = 0;
amuletsBuffTime = 0;
amuletsBuffWhenAttacking = false;
if (!this.player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
if (!this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
{
scarabEnduranceBuffTimeCounter = 0;
scarabCounter = 0;
}
dash = 0;
dashDamages = 0;
if (counter > uint.MaxValue - uint.MaxValue % 60)
counter = 0;
}
public override TagCompound Save()
{
Decimation.amuletSlotState.slot.item = new Item();
return new TagCompound
{
{"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)},
{"hyperStars", this.hyperStars},
{"soulFruits", soulFruits }
};
}
public override void Load(TagCompound tag)
{
this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
this.hyperStars = tag.GetByte("hyperStars");
this.soulFruits = tag.GetByte("soulFruits");
}
// FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS
public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type,
ref int damage, ref float knockBack)
{
Projectile toCheck = Main.projectile[type];
// Jester's Quiver
if (jestersQuiverEquiped && toCheck.arrow)
type = ProjectileID.JestersArrow;
// Endless Pouch of Life
if (endlessPouchofLifeEquipped && References.bullets.Contains(type))
type = ProjectileID.ChlorophyteBullet;
// Deadeye's Quiver
if (deadeyesQuiverEquipped && (toCheck.arrow || References.bullets.Contains(type)))
{
if (toCheck.arrow)
type = ProjectileID.IchorArrow;
else
type = ProjectileID.ChlorophyteBullet;
speedX *= 1.15f;
speedY *= 1.15f;
}
// Frost Amulet
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
{
speedX *= 1.03f;
speedY *= 1.03f;
}
_amuletSlotAmulet?.Synergy.OnShoot(this, item, ref position, ref speedX, ref speedY, ref type, ref damage,
ref knockBack);
return base.Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack);
}
public override bool ConsumeAmmo(Item weapon, Item ammo)
{
if (deadeyesQuiverEquipped && (ammo.ammo == AmmoID.Arrow || ammo.ammo == AmmoID.Bullet) &&
Main.rand.Next(20) > 3)
return false;
if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet)
return false;
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && ammo.ammo == AmmoID.Arrow &&
Main.rand.NextBool(50))
return false;
if (this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && weapon.thrown &&
Main.rand.NextBool(50) && weapon.thrown)
return false;
return base.ConsumeAmmo(weapon, ammo);
}
public override void UpdateVanityAccessories()
{
Decimation.amuletSlotState.UpdateAmulet(this);
_amuletSlotAmulet?.Synergy.Update(this);
base.UpdateVanityAccessories();
}
public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff)
{
DashMovement();
base.UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff);
}
public override void FrameEffects()
{
if (vampire)
{
this.player.head = 124;
this.player.body = 85;
this.player.legs = 72;
}
}
public override void PostUpdate()
{
oldStatDefense = this.player.statDefense;
if (lastHitCounter >= 60)
{
lastHitCounter = 0;
wasHurt = false;
}
if (wasHurt)
lastHitCounter++;
if (isInCombat)
{
combatTime++;
enchantedHeartDropTime++;
}
counter++;
base.PostUpdate();
}
public override void OnHitPvp(Item item, Player target, int damage, bool crit)
{
if (target.HasBuff(ModContent.BuffType<ScarabEndurance>())) this.player.AddBuff(BuffID.OnFire, 300);
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
CrystalAmuletEffect();
}
public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit)
{
isInCombat = true;
combatTime = 0;
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
}
public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit)
{
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
}
public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit)
{
isInCombat = true;
combatTime = 0;
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
}
public override void OnHitByNPC(NPC npc, int damage, bool crit)
{
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
lastHitCounter == 0 &&
!wasHurt)
{
Main.projectile[scarabs[scarabCounter - 1]].Kill();
scarabCounter--;
wasHurt = true;
}
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking)
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
npc.AddBuff(amuletsBuff, amuletsBuffTime);
if (graniteLinedTunicEquipped)
{
this.player.statLife += (int) (damage * 0.04f);
if (Main.rand.Next(3, 100) < 3)
npc.AddBuff(BuffID.Confused, 600);
}
if (tideTurnerEquipped && Main.rand.NextBool(2)) this.player.statLife += damage;
foreach (Player otherPlayer in Main.player)
if (otherPlayer.whoAmI != this.player.whoAmI)
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
{
this.player.statLife += (int) (damage * 0.03f);
break;
}
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
CrystalAmuletEffect();
}
public override void OnHitByProjectile(Projectile proj, int damage, bool crit)
{
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
lastHitCounter == 0 &&
!wasHurt)
{
Main.projectile[scarabs[scarabCounter - 1]].Kill();
scarabCounter--;
wasHurt = true;
}
if (amuletsBuff != 0 && amuletsBuffTime != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking)
{
if (proj.npcProj && Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
Main.npc[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime);
else if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
Main.player[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime);
}
if (graniteLinedTunicEquipped)
{
this.player.statLife += (int) (damage * 0.04f);
if (proj.npcProj && Main.rand.Next(3, 100) < 3)
Main.npc[proj.owner].AddBuff(BuffID.Confused, 600);
else if (Main.rand.Next(3, 100) < 3)
Main.player[proj.owner].AddBuff(BuffID.Confused, 600);
}
foreach (Player otherPlayer in Main.player)
if (otherPlayer.whoAmI != this.player.whoAmI)
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
{
this.player.statLife += (int) (damage * 0.03f);
break;
}
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
CrystalAmuletEffect();
}
public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit)
{
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
}
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
{
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
}
public void DashMovement()
{
if (dash == 2 && ttDash > 0)
{
if (ttHit < 0)
{
Rectangle rectangle =
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
this.player.height + 8);
for (int i = 0; i < 200; i++)
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC)))
{
float num = dashDamages * this.player.meleeDamage;
float num2 = 9f;
bool crit = false;
if (this.player.kbGlove) num2 *= 2f;
if (this.player.kbBuff) num2 *= 1.5f;
if (Main.rand.Next(100) < this.player.meleeCrit) crit = true;
int num3 = this.player.direction;
if (this.player.velocity.X < 0f) num3 = -1;
if (this.player.velocity.X > 0f) num3 = 1;
if (this.player.whoAmI == Main.myPlayer)
this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
ttDash = 10;
dashDelay = 30;
this.player.velocity.X = (0f - num3) * 9f;
this.player.velocity.Y = -4f;
this.player.immune = true;
this.player.immuneNoBlink = true;
this.player.immuneTime = 4;
ttHit = i;
}
}
}
else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) &&
(!this.player.controlRight || this.player.velocity.X <= 0f))
{
this.player.velocity.X = this.player.velocity.X * 0.95f;
}
}
if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer)
{
Rectangle rectangle2 =
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
this.player.height + 8);
for (int j = 0; j < 200; j++)
if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly &&
Main.npc[j].immune[this.player.whoAmI] <= 0)
{
NPC nPC2 = Main.npc[j];
Rectangle rect2 = nPC2.getRect();
if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2)))
{
float num4 = 150f * this.player.meleeDamage;
float num5 = 9f;
bool crit2 = false;
if (this.player.kbGlove) num5 *= 2f;
if (this.player.kbBuff) num5 *= 1.5f;
if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true;
int direction = this.player.direction;
if (this.player.velocity.X < 0f) direction = -1;
if (this.player.velocity.X > 0f) direction = 1;
if (this.player.whoAmI == Main.myPlayer)
{
this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f,
608, 150, 15f, Main.myPlayer);
Main.projectile[num6].Kill();
}
nPC2.immune[this.player.whoAmI] = 6;
this.player.immune = true;
this.player.immuneNoBlink = true;
this.player.immuneTime = 4;
}
}
}
if (dashDelay > 0)
{
if (ttDash > 0) ttDash--;
if (ttDash == 0) ttHit = -1;
dashDelay--;
}
else if (dashDelay < 0)
{
float num7 = 12f;
float num8 = 0.992f;
float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed);
float num10 = 0.96f;
int num11 = 20;
if (dash == 1)
{
for (int k = 0; k < 2; k++)
{
int num12 = this.player.velocity.Y != 0f
? Dust.NewDust(
new Vector2(this.player.position.X,
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
0f, 0f, 100, default, 1.4f)
: Dust.NewDust(
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
Dust obj = Main.dust[num12];
obj.velocity *= 0.1f;
Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
}
}
else if (dash == 2)
{
for (int l = 0; l < 0; l++)
{
int num13 = this.player.velocity.Y != 0f
? Dust.NewDust(
new Vector2(this.player.position.X,
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
0f, 0f, 100, default, 1.4f)
: Dust.NewDust(
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
Dust obj2 = Main.dust[num13];
obj2.velocity *= 0.1f;
Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
}
num8 = 0.985f;
num10 = 0.94f;
num11 = 30;
}
else if (dash == 3)
{
for (int m = 0; m < 4; m++)
{
int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
Dust obj3 = Main.dust[num14];
obj3.velocity *= 0.1f;
Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num14].shader =
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
Main.dust[num14].noGravity = true;
if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f;
}
num7 = 14f;
num8 = 0.985f;
num10 = 0.94f;
num11 = 20;
}
else if (dash == 4)
{
for (int n = 0; n < 2; n++)
{
int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
Dust obj4 = Main.dust[num15];
obj4.velocity *= 0.1f;
Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player);
Main.dust[num15].noGravity = true;
if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f;
}
num8 = 0.985f;
num10 = 0.94f;
num11 = 20;
}
if (dash > 0)
{
this.player.vortexStealthActive = false;
if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7)
{
this.player.velocity.X = this.player.velocity.X * num8;
}
else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9)
{
this.player.velocity.X = this.player.velocity.X * num10;
}
else
{
dashDelay = num11;
if (this.player.velocity.X < 0f)
this.player.velocity.X = 0f - num9;
else if (this.player.velocity.X > 0f) this.player.velocity.X = num9;
}
}
}
else if (dash > 0 && !this.player.mount.Active)
{
if (dash == 1)
{
int num16 = 0;
bool flag = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
{
if (dashTime > 0)
{
num16 = 1;
flag = true;
dashTime = 0;
}
else
{
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
{
if (dashTime < 0)
{
num16 = -1;
flag = true;
dashTime = 0;
}
else
{
dashTime = -15;
}
}
if (flag)
{
this.player.velocity.X = 16.9f * num16;
Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) ||
WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
dashDelay = -1;
for (int num17 = 0; num17 < 20; num17++)
{
int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num18];
dust.position.X = dust.position.X + Main.rand.Next(-5, 6);
Dust dust2 = Main.dust[num18];
dust2.position.Y = dust2.position.Y + Main.rand.Next(-5, 6);
Dust obj5 = Main.dust[num18];
obj5.velocity *= 0.2f;
Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num18].shader =
GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
}
int num19 = Gore.NewGore(
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
this.player.position.Y + this.player.height / 2 - 34f), default,
Main.rand.Next(61, 64));
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
Gore obj6 = Main.gore[num19];
obj6.velocity *= 0.4f;
num19 = Gore.NewGore(
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
this.player.position.Y + this.player.height / 2 - 14f), default,
Main.rand.Next(61, 64));
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
Gore obj7 = Main.gore[num19];
obj7.velocity *= 0.4f;
}
}
else if (dash == 2)
{
int num20 = 0;
bool flag2 = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
{
if (dashTime > 0)
{
num20 = 1;
flag2 = true;
dashTime = 0;
}
else
{
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
{
if (dashTime < 0)
{
num20 = -1;
flag2 = true;
dashTime = 0;
}
else
{
dashTime = -15;
}
}
if (flag2)
{
this.player.velocity.X = 14.5f * num20;
Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) ||
WorldGen.SolidOrSlopedTile(point4.X, point4.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
dashDelay = -1;
ttDash = 15;
for (int num21 = 0; num21 < 0; num21++)
{
int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
Dust dust3 = Main.dust[num22];
dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6);
Dust dust4 = Main.dust[num22];
dust4.position.Y = dust4.position.Y + Main.rand.Next(-5, 6);
Dust obj8 = Main.dust[num22];
obj8.velocity *= 0.2f;
Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num22].shader =
GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player);
}
}
}
else if (dash == 3)
{
int num23 = 0;
bool flag3 = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
{
if (dashTime > 0)
{
num23 = 1;
flag3 = true;
dashTime = 0;
}
else
{
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
{
if (dashTime < 0)
{
num23 = -1;
flag3 = true;
dashTime = 0;
}
else
{
dashTime = -15;
}
}
if (flag3)
{
this.player.velocity.X = 21.9f * num23;
Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) ||
WorldGen.SolidOrSlopedTile(point6.X, point6.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
dashDelay = -1;
for (int num24 = 0; num24 < 20; num24++)
{
int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f);
Dust dust5 = Main.dust[num25];
dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6);
Dust dust6 = Main.dust[num25];
dust6.position.Y = dust6.position.Y + Main.rand.Next(-5, 6);
Dust obj9 = Main.dust[num25];
obj9.velocity *= 0.2f;
Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num25].shader =
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
Main.dust[num25].noGravity = true;
Main.dust[num25].fadeIn = 0.5f;
}
}
}
}
}
private void CrystalAmuletEffect()
{
int shardNumber = Main.rand.Next(5, 11);
float angleDifference = (float) (Math.PI * 2) / shardNumber;
float speed = 5f;
float currentAngle = 0;
for (int i = 0; i < shardNumber; i++)
{
float speedX = (float) Math.Cos(currentAngle) * speed;
float speedY = (float) Math.Sin(currentAngle) * speed;
Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
5, this.player.whoAmI);
currentAngle += angleDifference;
}
}
}
public class PlayerPropertiesUpdater : GlobalItem
{
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
{
DecimationPlayer modPlayer = player.GetModPlayer<DecimationPlayer>();
if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield ||
item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true;
if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true;
}
}
}

100
DecimationWorld.cs Normal file
View File

@ -0,0 +1,100 @@
using System.IO;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;
using Terraria.ModLoader.IO;
using Decimation.Structures;
using Microsoft.Xna.Framework;
using System;
using Terraria.ID;
namespace Decimation
{
public class DecimationWorld : ModWorld
{
public static bool downedBloodshotEye;
public static bool downedDuneWorm;
public static bool downedArachnus;
public static bool downedWyvern;
public override void Initialize()
{
downedBloodshotEye = false;
downedDuneWorm = false;
downedArachnus = false;
downedWyvern = false;
}
public override TagCompound Save()
{
var downed = new List<string>();
if (downedBloodshotEye) downed.Add("downedBloodshotEye");
if (downedDuneWorm) downed.Add("downedDuneWorm");
if (downedArachnus) downed.Add("downedArachnus");
if (downedWyvern) downed.Add("downedWyvern");
return new TagCompound {
{"downed", downed},
};
}
public override void Load(TagCompound tag)
{
var downed = tag.GetList<string>("downed");
downedBloodshotEye = downed.Contains("downedBloodshotEye");
downedDuneWorm = downed.Contains("downedDuneWorm");
downedArachnus = downed.Contains("downedArachnus");
downedWyvern = downed.Contains("downedWyvern");
}
public override void NetSend(BinaryWriter writer)
{
BitsByte flags = new BitsByte();
flags[0] = downedBloodshotEye; //+1 flag number for each new boss
flags[1] = downedDuneWorm;
flags[2] = downedArachnus;
flags[3] = downedWyvern;
writer.Write(flags);
}
public override void NetReceive(BinaryReader reader)
{
BitsByte flags = reader.ReadByte();
downedBloodshotEye = flags[0];
downedDuneWorm = flags[1];
downedArachnus = flags[2];
downedWyvern = flags[3];
}
public override void LoadLegacy(BinaryReader reader)
{
int loadVersion = reader.ReadInt32();
if (loadVersion == 1)
{
byte flags = reader.ReadByte();
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss
DecimationWorld.downedArachnus = ((flags & 4) != 0);
DecimationWorld.downedWyvern = ((flags & 8) != 0);
}
else if (loadVersion == 2)
{
byte flags = reader.ReadByte();
byte flags2 = reader.ReadByte();
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
DecimationWorld.downedDuneWorm = ((flags & 2) != 0);
DecimationWorld.downedArachnus = ((flags & 4) != 0);
DecimationWorld.downedWyvern = ((flags & 8) != 0);
}
}
// For custom biome
public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
{
ShrineoftheMoltenOne biome = new ShrineoftheMoltenOne();
int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes"));
tasks.Insert(genIndex + 1, new PassLegacy("[Decimation] The Shrine of the Molten One", delegate (GenerationProgress progress)
{
biome.Generate();
}));
}
}
}

16
Dusts/Blood.cs Normal file
View File

@ -0,0 +1,16 @@
using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace Decimation.Dusts
{
class Blood : ModDust
{
public override void OnSpawn(Dust dust)
{
dust.velocity.Y = 0.02f;
dust.scale = 1f;
}
}
}

BIN
Dusts/Blood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

View File

@ -0,0 +1,57 @@
using System.Collections.Generic;
using Decimation.Buffs.Buffs;
using Decimation.Items.Misc.Souls;
using Decimation.Tiles;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class AlucardPendant : DecimationAccessory
{
protected override string ItemName => "Alucard Pendant";
protected override string ItemTooltip => "Stronger than your average vampire\n" +
"Gives Vampire buff\n"
+ "Bats will be friendly";
protected override void InitAccessory()
{
width = 46;
height = 62;
rarity = Rarity.LightPurple;
this.item.value = Item.buyPrice(0, 4);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.AddBuff(ModContent.BuffType<Vampire>(), 1);
player.npcTypeNoAggro[NPCID.CaveBat] = true;
player.npcTypeNoAggro[NPCID.JungleBat] = true;
player.npcTypeNoAggro[NPCID.Hellbat] = true;
player.npcTypeNoAggro[NPCID.IceBat] = true;
player.npcTypeNoAggro[NPCID.GiantBat] = true;
player.npcTypeNoAggro[NPCID.IlluminantBat] = true;
player.npcTypeNoAggro[NPCID.Lavabat] = true;
player.npcTypeNoAggro[NPCID.Slimer] = true;
player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true;
player.npcTypeNoAggro[NPCID.Vampire] = true;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<EnchantedAnvil>()});
recipe.AddIngredient(ModContent.ItemType<DraculaPendant>());
recipe.AddIngredient(ItemID.SoulofLight, 10);
recipe.AddIngredient(ModContent.ItemType<SoulofTime>(), 10);
recipe.AddIngredient(ItemID.HolyWater, 5);
return new List<ModRecipe> {recipe};
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

View File

@ -0,0 +1,74 @@
using System.Collections.Generic;
using Decimation.Buffs.Buffs;
using Decimation.Items.Misc.Souls;
using Decimation.Tiles;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class CelestialTransmogrifier : DecimationAccessory
{
protected override string ItemName => "Celestial Transmogrifier";
protected override string ItemTooltip => "Change form on a whim\n\n"
+ "Gives Werewolf buff\n"
+ "Transforms holder into merfolk when entering water\n"
+ "Gives Celestial Stone effects\n"
+ "Bats will be friendly";
protected override void InitAccessory()
{
width = 46;
height = 62;
rarity = Rarity.LightPurple;
this.item.value = Item.buyPrice(0, 4);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.AddBuff(ModContent.BuffType<Werepire>(), 1);
player.meleeSpeed *= 1.1f;
player.meleeDamage *= 1.1f;
player.magicDamage *= 1.1f;
player.rangedDamage *= 1.1f;
player.thrownDamage *= 1.1f;
player.meleeCrit += 2;
player.magicCrit += 2;
player.rangedCrit += 2;
player.thrownCrit += 2;
player.lifeRegen += 1;
player.statDefense += 4;
player.tileSpeed *= 1.15f;
player.minionKB *= 1.5f;
player.npcTypeNoAggro[NPCID.CaveBat] = true;
player.npcTypeNoAggro[NPCID.JungleBat] = true;
player.npcTypeNoAggro[NPCID.Hellbat] = true;
player.npcTypeNoAggro[NPCID.IceBat] = true;
player.npcTypeNoAggro[NPCID.GiantBat] = true;
player.npcTypeNoAggro[NPCID.IlluminantBat] = true;
player.npcTypeNoAggro[NPCID.Lavabat] = true;
player.npcTypeNoAggro[NPCID.Slimer] = true;
player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true;
player.npcTypeNoAggro[NPCID.Vampire] = true;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
recipe.AddIngredient(ModContent.ItemType<AlucardPendant>());
recipe.AddIngredient(ItemID.CelestialShell);
recipe.AddIngredient(ModContent.ItemType<SoulofSpite>(), 20);
recipe.AddIngredient(ItemID.FallenStar, 5);
return new List<ModRecipe> {recipe};
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

View File

@ -0,0 +1,43 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class CrystalSkull : DecimationAccessory
{
protected override string ItemName => "Crystal Skull";
protected override string ItemTooltip => "It seems that this skull has been enchanted.";
protected override void InitAccessory()
{
width = 24;
height = 24;
rarity = Rarity.Green;
this.item.value = Item.buyPrice(0, 0, 0, 10);
this.item.defense = 2;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.GlassKiln}, true);
recipe.AddIngredient(ItemID.ObsidianSkull);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddRecipeGroup("AnyGem", 4);
recipe.AddIngredient(ItemID.Glass, 6);
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.AddBuff(BuffID.Thorns, 1);
Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f));
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

View File

@ -0,0 +1,52 @@
using System.Collections.Generic;
using Decimation.Items.Misc;
using Decimation.Items.Misc.Souls;
using Decimation.Tiles;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class DeadeyesQuiver : DecimationAccessory
{
protected override string ItemName => "Deadeye's Quiver";
protected override string ItemTooltip =>
"Turns wooden arrows into ichor arrows and turns musket balls into chlorophyte bullets\n+16% ranged damage\n+15% arrow and bullet velocity\n15% chance not to consume ammo\n+2% increased ranged crit chance";
protected override void InitAccessory()
{
width = 30;
height = 30;
rarity = Rarity.Red;
this.item.value = Item.buyPrice(0, 15);
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
recipe.AddIngredient(ModContent.ItemType<JestersQuiver>());
//r.AddIngredient(ModContent.ItemType<SoulofKight>());
recipe.AddIngredient(ModContent.ItemType<SoulofSpite>(), 15);
recipe.AddIngredient(ItemID.SoulofSight, 15);
recipe.AddIngredient(ItemID.SoulofFright, 15);
recipe.AddIngredient(ModContent.ItemType<EndlessPouchofLife>());
recipe.AddIngredient(ModContent.ItemType<RedThread>(), 5);
recipe.AddIngredient(ItemID.FlaskofIchor, 5);
recipe.AddIngredient(ItemID.BlackDye, 3);
recipe.AddIngredient(ItemID.RedDye, 3);
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.16f;
player.rangedCrit += 2;
player.GetModPlayer<DecimationPlayer>().deadeyesQuiverEquipped = true;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

View File

@ -0,0 +1,60 @@
using Decimation.Buffs.Buffs;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class DraculaPendant : DecimationAccessory
{
protected override string ItemName => "Dracula's Pendant";
protected override string ItemTooltip => "Dont tread under the suns gaze!\n\n" +
"Gives Vampire debuff\n" +
"Bats will be friendly\n" +
"You will burn at sun";
protected override void InitAccessory()
{
width = 46;
height = 62;
rarity = Rarity.LightPurple;
this.item.value = Item.buyPrice(0, 4);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.AddBuff(ModContent.BuffType<Vampire>(), 1);
player.npcTypeNoAggro[NPCID.CaveBat] = true;
player.npcTypeNoAggro[NPCID.JungleBat] = true;
player.npcTypeNoAggro[NPCID.Hellbat] = true;
player.npcTypeNoAggro[NPCID.IceBat] = true;
player.npcTypeNoAggro[NPCID.GiantBat] = true;
player.npcTypeNoAggro[NPCID.IlluminantBat] = true;
player.npcTypeNoAggro[NPCID.Lavabat] = true;
player.npcTypeNoAggro[NPCID.Slimer] = true;
player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true;
player.npcTypeNoAggro[NPCID.Vampire] = true;
if (player.ZoneOverworldHeight && Main.dayTime)
{
int damages = 4;
player.lifeRegen -= damages;
Dust.NewDust(player.position, player.width, player.height, DustID.GoldFlame);
}
}
}
public class DraculaPendantDrop : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (npc.type == NPCID.Vampire && Main.rand.NextBool(50))
Item.NewItem(npc.getRect(), ModContent.ItemType<DraculaPendant>());
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

View File

@ -0,0 +1,48 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class EnchantedFocuser : DecimationAccessory
{
protected override string ItemName => "Enchanted Focuser";
protected override string ItemTooltip => "Focuses one's Ki.";
protected override void InitAccessory()
{
width = 62;
height = 46;
rarity = Rarity.Green;
this.item.value = Item.buyPrice(0, 0, 0, 10);
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
recipe.AddIngredient(ItemID.FallenStar, 5);
recipe.AddIngredient(ItemID.Wire, 15);
recipe.AddIngredient(ItemID.CopperBar, 5);
recipe.AddIngredient(ItemID.WaterCandle);
recipe.AddIngredient(ModContent.ItemType<Focuser>());
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.10f;
player.magicDamage += 0.10f;
player.rangedCrit += 02;
player.meleeCrit += 02;
player.magicCrit += 02;
player.thrownCrit += 02;
player.manaRegen += 2;
player.statManaMax2 += 20;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

View File

@ -0,0 +1,48 @@
using System.Collections.Generic;
using Decimation.Tiles;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class EndlessPouchofLife : DecimationAccessory
{
protected override string ItemName => "Endless Pouch of Life";
protected override string ItemTooltip => "Cancels ammunition consumption." +
"\nIncrease maximum life by 15" +
"\nChange ammunitions in Chlorophyte Bullets \nProvide a life regeneration boost \n+8% ranged damage \n+15% critical strike chance";
protected override void InitAccessory()
{
width = 24;
height = 32;
rarity = Rarity.Lime;
this.item.value = Item.buyPrice(0, 50);
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.lifeRegen += 5;
player.rangedDamage += 0.08f;
player.rangedCrit += 5;
player.statLifeMax2 += 15;
Main.LocalPlayer.GetModPlayer<DecimationPlayer>().endlessPouchofLifeEquipped = true;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
recipe.AddIngredient(ItemID.ChlorophyteBar, 25);
recipe.AddIngredient(ModContent.ItemType<EnergyFocuser>());
recipe.AddIngredient(ItemID.EndlessMusketPouch);
recipe.AddIngredient(ItemID.SoulofSight, 50);
return new List<ModRecipe> {recipe};
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

View File

@ -0,0 +1,51 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class EnergyFocuser : DecimationAccessory
{
protected override string ItemName => "Energy Focuser";
protected override string ItemTooltip => "Opens one's chakra points.";
protected override void InitAccessory()
{
width = 62;
height = 46;
rarity = Rarity.Green;
this.item.value = Item.buyPrice(0, 0, 0, 10);
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
recipe.AddIngredient(ModContent.ItemType<EnchantedFocuser>());
recipe.AddIngredient(ItemID.PixieDust, 40);
recipe.AddIngredient(ItemID.SoulofSight, 15);
recipe.AddIngredient(ItemID.SoulofLight, 15);
recipe.AddIngredient(ModContent.ItemType<Focuser>());
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.10f;
player.magicDamage += 0.10f;
player.rangedCrit += 05;
player.meleeCrit += 05;
player.magicCrit += 05;
player.thrownCrit += 05;
player.manaRegen += 2;
player.statManaMax2 += 20;
player.statLifeMax2 += 20;
player.lifeRegen += 2;
player.meleeDamage += 0.04f;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,45 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class Focuser : DecimationAccessory
{
protected override string ItemName => "Focuser";
protected override string ItemTooltip => "Focuses one's inner strength.";
protected override void InitAccessory()
{
width = 54;
height = 46;
rarity = Rarity.Green;
this.item.value = Item.buyPrice(0, 0, 0, 10);
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
recipe.AddIngredient(ItemID.Chain, 3);
recipe.AddIngredient(ItemID.CopperBar, 10);
recipe.AddIngredient(ItemID.GoldBar);
recipe.AddIngredient(ItemID.Ruby);
recipe.AddIngredient(ItemID.IronBar, 3);
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.05f;
player.rangedCrit += 05;
player.meleeCrit += 05;
player.magicCrit += 05;
player.thrownCrit += 05;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

@ -0,0 +1,36 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class GraniteLinedTunic : DecimationAccessory
{
protected override string ItemName => "Granite Lined Tunic";
protected override void InitAccessory()
{
width = 30;
height = 20;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statDefense += 2;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
recipe.AddIngredient(ItemID.FamiliarShirt);
recipe.AddIngredient(ItemID.Granite, 16);
recipe.AddRecipeGroup("AnyThread", 10);
recipe.AddIngredient(ItemID.Chain, 6);
return new List<ModRecipe> {recipe};
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

View File

@ -0,0 +1,42 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class JestersQuiver : DecimationAccessory
{
protected override string ItemName => "Jester's Quiver";
protected override string ItemTooltip =>
"Turns wooden arrows into jesters arrows \n+15% Ranged Damage \n-20% Ammo Cost \n+5% Ranged Critical Chance";
protected override void InitAccessory()
{
width = 20;
height = 20;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.15f;
player.ammoCost80 = true;
player.rangedCrit += 5;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
recipe.AddIngredient(ModContent.ItemType<RangersQuiver>());
recipe.AddIngredient(ModContent.ItemType<RangersPouch>());
recipe.AddIngredient(ItemID.SoulofSight, 25);
recipe.AddIngredient(ItemID.SoulofFright, 5);
recipe.AddIngredient(ItemID.FallenStar, 15);
return new List<ModRecipe> {recipe};
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

View File

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Core.Items;
namespace Decimation.Items.Accessories
{
internal class LightweightGlove : DecimationAccessory
{
protected override string ItemName => "Lightweight Glove";
protected override string ItemTooltip =>
"+5% throwing velocity\n+4% throwing damages\n+3% throwing critical strikes chances";
protected override void InitAccessory()
{
width = 22;
height = 28;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.thrownVelocity *= 1.05f;
player.thrownDamage *= 1.04f;
player.thrownCrit += 3;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Loom }, false);
recipe.AddIngredient(ItemID.Leather, 6);
recipe.AddRecipeGroup("AnyThread", 2);
recipe.AddIngredient(ItemID.Sapphire, 2);
return new List<ModRecipe>() { recipe };
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

View File

@ -0,0 +1,28 @@
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
namespace Decimation.Items.Accessories
{
internal class NecrosisStone : DecimationAccessory
{
protected override string ItemName => "Necrosis Stone";
protected override string ItemTooltip =>
"This stone breathes life into once deceased creatures\nReduces respawn time by 50%";
protected override void InitAccessory()
{
width = 20;
height = 20;
rarity = Rarity.Rainbow;
this.item.value = Item.buyPrice(0, 5);
this.item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.GetModPlayer<DecimationPlayer>().necrosisStoneEquipped = true;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

View File

@ -0,0 +1,43 @@
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Core.Items;
using Decimation.Core.Util;
namespace Decimation.Items.Accessories
{
internal class RangersPouch : DecimationAccessory
{
protected override string ItemName => "Ranger's Pouch";
protected override string ItemTooltip =>
"25% Chance to not consume ammo \n+10% Ranged damage \n+5% Ranged critical chance";
protected override void InitAccessory()
{
width = 30;
height = 30;
item.value = 10;
rarity = Rarity.Green;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.MythrilAnvil }, false);
recipe.AddIngredient(ItemID.EndlessMusketPouch);
recipe.AddIngredient(ItemID.RangerEmblem);
recipe.AddIngredient(ItemID.SoulofSight, 5);
return new List<ModRecipe>() { recipe };
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.10f;
player.rangedCrit += 5;
player.ammoCost75 = true;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

View File

@ -0,0 +1,43 @@
using System.Collections.Generic;
using Decimation.Core.Items;
using Decimation.Core.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Items.Accessories
{
internal class RangersQuiver : DecimationAccessory
{
protected override string ItemName => "Ranger's Quiver";
protected override string ItemTooltip =>
"25% Chance not to consume ammo\n+10%ranged damage\n+15% arrow velocity\n+5% ranged Crit Chance";
protected override void InitAccessory()
{
width = 32;
height = 32;
rarity = Rarity.Green;
this.item.value = Item.buyPrice(0, 0, 0, 10);
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
recipe.AddIngredient(ItemID.MagicQuiver);
recipe.AddIngredient(ItemID.RangerEmblem);
recipe.AddIngredient(ItemID.SoulofSight, 5);
return new List<ModRecipe> {recipe};
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.10f;
player.rangedCrit += 05;
player.ammoCost75 = true;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Core.Items;
using Decimation.Core.Util;
namespace Decimation.Items.Accessories
{
internal class RedHotShackle : DecimationAccessory
{
protected override string ItemName => "Red Hot Shackle";
protected override string ItemTooltip => "WIP";
protected override void InitAccessory()
{
width = 24;
height = 24;
rarity = Rarity.Green;
item.value = Item.buyPrice(0, 0, 2);
item.defense = 1;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Furnaces }, true);
recipe.AddIngredient(ItemID.Shackle);
recipe.AddIngredient(ItemID.Gel, 10);
return new List<ModRecipe>() { recipe };
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Some files were not shown because too many files have changed in this diff Show More